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

namespace Google\Cloud\Dialogflow\V2;

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

/**
 * The request message for
 * [Conversations.SuggestConversationSummary][google.cloud.dialogflow.v2.Conversations.SuggestConversationSummary].
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.SuggestConversationSummaryRequest</code>
 */
class SuggestConversationSummaryRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The conversation to fetch suggestion for.
     * Format: `projects/<Project ID>/locations/<Location
     * ID>/conversations/<Conversation ID>`.
     *
     * Generated from protobuf field <code>string conversation = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $conversation = '';
    /**
     * Optional. The name of the latest conversation message used as context for
     * compiling suggestion. If empty, the latest message of the conversation will
     * be used.
     * Format: `projects/<Project ID>/locations/<Location
     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
     *
     * Generated from protobuf field <code>string latest_message = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     */
    protected $latest_message = '';
    /**
     * Optional. Max number of messages prior to and including
     * [latest_message] to use as context when compiling the
     * suggestion. By default 500 and at most 1000.
     *
     * Generated from protobuf field <code>int32 context_size = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $context_size = 0;
    /**
     * Optional. Parameters for a human assist query. Only used for POC/demo
     * purpose.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $assist_query_params = null;

    /**
     * @param string $conversation Required. The conversation to fetch suggestion for.
     *                             Format: `projects/<Project ID>/locations/<Location
     *                             ID>/conversations/<Conversation ID>`. Please see
     *                             {@see ConversationsClient::conversationName()} for help formatting this field.
     *
     * @return \Google\Cloud\Dialogflow\V2\SuggestConversationSummaryRequest
     *
     * @experimental
     */
    public static function build(string $conversation): self
    {
        return (new self())
            ->setConversation($conversation);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $conversation
     *           Required. The conversation to fetch suggestion for.
     *           Format: `projects/<Project ID>/locations/<Location
     *           ID>/conversations/<Conversation ID>`.
     *     @type string $latest_message
     *           Optional. The name of the latest conversation message used as context for
     *           compiling suggestion. If empty, the latest message of the conversation will
     *           be used.
     *           Format: `projects/<Project ID>/locations/<Location
     *           ID>/conversations/<Conversation ID>/messages/<Message ID>`.
     *     @type int $context_size
     *           Optional. Max number of messages prior to and including
     *           [latest_message] to use as context when compiling the
     *           suggestion. By default 500 and at most 1000.
     *     @type \Google\Cloud\Dialogflow\V2\AssistQueryParameters $assist_query_params
     *           Optional. Parameters for a human assist query. Only used for POC/demo
     *           purpose.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The conversation to fetch suggestion for.
     * Format: `projects/<Project ID>/locations/<Location
     * ID>/conversations/<Conversation ID>`.
     *
     * Generated from protobuf field <code>string conversation = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getConversation()
    {
        return $this->conversation;
    }

    /**
     * Required. The conversation to fetch suggestion for.
     * Format: `projects/<Project ID>/locations/<Location
     * ID>/conversations/<Conversation ID>`.
     *
     * Generated from protobuf field <code>string conversation = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setConversation($var)
    {
        GPBUtil::checkString($var, True);
        $this->conversation = $var;

        return $this;
    }

    /**
     * Optional. The name of the latest conversation message used as context for
     * compiling suggestion. If empty, the latest message of the conversation will
     * be used.
     * Format: `projects/<Project ID>/locations/<Location
     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
     *
     * Generated from protobuf field <code>string latest_message = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getLatestMessage()
    {
        return $this->latest_message;
    }

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

        return $this;
    }

    /**
     * Optional. Max number of messages prior to and including
     * [latest_message] to use as context when compiling the
     * suggestion. By default 500 and at most 1000.
     *
     * Generated from protobuf field <code>int32 context_size = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getContextSize()
    {
        return $this->context_size;
    }

    /**
     * Optional. Max number of messages prior to and including
     * [latest_message] to use as context when compiling the
     * suggestion. By default 500 and at most 1000.
     *
     * Generated from protobuf field <code>int32 context_size = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setContextSize($var)
    {
        GPBUtil::checkInt32($var);
        $this->context_size = $var;

        return $this;
    }

    /**
     * Optional. Parameters for a human assist query. Only used for POC/demo
     * purpose.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Dialogflow\V2\AssistQueryParameters|null
     */
    public function getAssistQueryParams()
    {
        return $this->assist_query_params;
    }

    public function hasAssistQueryParams()
    {
        return isset($this->assist_query_params);
    }

    public function clearAssistQueryParams()
    {
        unset($this->assist_query_params);
    }

    /**
     * Optional. Parameters for a human assist query. Only used for POC/demo
     * purpose.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Dialogflow\V2\AssistQueryParameters $var
     * @return $this
     */
    public function setAssistQueryParams($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\AssistQueryParameters::class);
        $this->assist_query_params = $var;

        return $this;
    }

}

