<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/dialogflow/v2/participant.proto

namespace Google\Cloud\Dialogflow\V2;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * The response message for
 * [Participants.SuggestSmartReplies][google.cloud.dialogflow.v2.Participants.SuggestSmartReplies].
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.SuggestSmartRepliesResponse</code>
 */
class SuggestSmartRepliesResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. Multiple reply options provided by smart reply service. The
     * order is based on the rank of the model prediction.
     * The maximum number of the returned replies is set in SmartReplyConfig.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.SmartReplyAnswer smart_reply_answers = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $smart_reply_answers;
    /**
     * The name of the latest conversation message used to compile
     * suggestion for.
     * Format: `projects/<Project ID>/locations/<Location
     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
     *
     * Generated from protobuf field <code>string latest_message = 2 [(.google.api.resource_reference) = {</code>
     */
    protected $latest_message = '';
    /**
     * Number of messages prior to and including
     * [latest_message][google.cloud.dialogflow.v2.SuggestSmartRepliesResponse.latest_message]
     * to compile the suggestion. It may be smaller than the
     * [SuggestSmartRepliesRequest.context_size][google.cloud.dialogflow.v2.SuggestSmartRepliesRequest.context_size]
     * field in the request if there aren't that many messages in the
     * conversation.
     *
     * Generated from protobuf field <code>int32 context_size = 3;</code>
     */
    protected $context_size = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Dialogflow\V2\SmartReplyAnswer[] $smart_reply_answers
     *           Output only. Multiple reply options provided by smart reply service. The
     *           order is based on the rank of the model prediction.
     *           The maximum number of the returned replies is set in SmartReplyConfig.
     *     @type string $latest_message
     *           The name of the latest conversation message used to compile
     *           suggestion for.
     *           Format: `projects/<Project ID>/locations/<Location
     *           ID>/conversations/<Conversation ID>/messages/<Message ID>`.
     *     @type int $context_size
     *           Number of messages prior to and including
     *           [latest_message][google.cloud.dialogflow.v2.SuggestSmartRepliesResponse.latest_message]
     *           to compile the suggestion. It may be smaller than the
     *           [SuggestSmartRepliesRequest.context_size][google.cloud.dialogflow.v2.SuggestSmartRepliesRequest.context_size]
     *           field in the request if there aren't that many messages in the
     *           conversation.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. Multiple reply options provided by smart reply service. The
     * order is based on the rank of the model prediction.
     * The maximum number of the returned replies is set in SmartReplyConfig.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.SmartReplyAnswer smart_reply_answers = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return RepeatedField<\Google\Cloud\Dialogflow\V2\SmartReplyAnswer>
     */
    public function getSmartReplyAnswers()
    {
        return $this->smart_reply_answers;
    }

    /**
     * Output only. Multiple reply options provided by smart reply service. The
     * order is based on the rank of the model prediction.
     * The maximum number of the returned replies is set in SmartReplyConfig.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.SmartReplyAnswer smart_reply_answers = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\Dialogflow\V2\SmartReplyAnswer[] $var
     * @return $this
     */
    public function setSmartReplyAnswers($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SmartReplyAnswer::class);
        $this->smart_reply_answers = $arr;

        return $this;
    }

    /**
     * The name of the latest conversation message used to compile
     * suggestion for.
     * Format: `projects/<Project ID>/locations/<Location
     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
     *
     * Generated from protobuf field <code>string latest_message = 2 [(.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getLatestMessage()
    {
        return $this->latest_message;
    }

    /**
     * The name of the latest conversation message used to compile
     * suggestion for.
     * Format: `projects/<Project ID>/locations/<Location
     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
     *
     * Generated from protobuf field <code>string latest_message = 2 [(.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setLatestMessage($var)
    {
        GPBUtil::checkString($var, True);
        $this->latest_message = $var;

        return $this;
    }

    /**
     * Number of messages prior to and including
     * [latest_message][google.cloud.dialogflow.v2.SuggestSmartRepliesResponse.latest_message]
     * to compile the suggestion. It may be smaller than the
     * [SuggestSmartRepliesRequest.context_size][google.cloud.dialogflow.v2.SuggestSmartRepliesRequest.context_size]
     * field in the request if there aren't that many messages in the
     * conversation.
     *
     * Generated from protobuf field <code>int32 context_size = 3;</code>
     * @return int
     */
    public function getContextSize()
    {
        return $this->context_size;
    }

    /**
     * Number of messages prior to and including
     * [latest_message][google.cloud.dialogflow.v2.SuggestSmartRepliesResponse.latest_message]
     * to compile the suggestion. It may be smaller than the
     * [SuggestSmartRepliesRequest.context_size][google.cloud.dialogflow.v2.SuggestSmartRepliesRequest.context_size]
     * field in the request if there aren't that many messages in the
     * conversation.
     *
     * Generated from protobuf field <code>int32 context_size = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setContextSize($var)
    {
        GPBUtil::checkInt32($var);
        $this->context_size = $var;

        return $this;
    }

}

