<?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.GenerateStatelessSummary][google.cloud.dialogflow.v2.Conversations.GenerateStatelessSummary].
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest</code>
 */
class GenerateStatelessSummaryRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The conversation to suggest a summary for.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation stateless_conversation = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $stateless_conversation = null;
    /**
     * Required. A ConversationProfile containing information required for Summary
     * generation.
     * Required fields: {language_code, security_settings}
     * Optional fields: {agent_assistant_config}
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.ConversationProfile conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $conversation_profile = null;
    /**
     * Optional. The name of the latest conversation message used as context for
     * generating a Summary. If empty, the latest message of the conversation will
     * be used. The format is specific to the user and the names of the messages
     * provided.
     *
     * 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 max_context_size = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $max_context_size = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Dialogflow\V2\GenerateStatelessSummaryRequest\MinimalConversation $stateless_conversation
     *           Required. The conversation to suggest a summary for.
     *     @type \Google\Cloud\Dialogflow\V2\ConversationProfile $conversation_profile
     *           Required. A ConversationProfile containing information required for Summary
     *           generation.
     *           Required fields: {language_code, security_settings}
     *           Optional fields: {agent_assistant_config}
     *     @type string $latest_message
     *           Optional. The name of the latest conversation message used as context for
     *           generating a Summary. If empty, the latest message of the conversation will
     *           be used. The format is specific to the user and the names of the messages
     *           provided.
     *     @type int $max_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.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The conversation to suggest a summary for.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation stateless_conversation = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Dialogflow\V2\GenerateStatelessSummaryRequest\MinimalConversation|null
     */
    public function getStatelessConversation()
    {
        return $this->stateless_conversation;
    }

    public function hasStatelessConversation()
    {
        return isset($this->stateless_conversation);
    }

    public function clearStatelessConversation()
    {
        unset($this->stateless_conversation);
    }

    /**
     * Required. The conversation to suggest a summary for.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation stateless_conversation = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Dialogflow\V2\GenerateStatelessSummaryRequest\MinimalConversation $var
     * @return $this
     */
    public function setStatelessConversation($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\GenerateStatelessSummaryRequest\MinimalConversation::class);
        $this->stateless_conversation = $var;

        return $this;
    }

    /**
     * Required. A ConversationProfile containing information required for Summary
     * generation.
     * Required fields: {language_code, security_settings}
     * Optional fields: {agent_assistant_config}
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.ConversationProfile conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Dialogflow\V2\ConversationProfile|null
     */
    public function getConversationProfile()
    {
        return $this->conversation_profile;
    }

    public function hasConversationProfile()
    {
        return isset($this->conversation_profile);
    }

    public function clearConversationProfile()
    {
        unset($this->conversation_profile);
    }

    /**
     * Required. A ConversationProfile containing information required for Summary
     * generation.
     * Required fields: {language_code, security_settings}
     * Optional fields: {agent_assistant_config}
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.ConversationProfile conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Dialogflow\V2\ConversationProfile $var
     * @return $this
     */
    public function setConversationProfile($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ConversationProfile::class);
        $this->conversation_profile = $var;

        return $this;
    }

    /**
     * Optional. The name of the latest conversation message used as context for
     * generating a Summary. If empty, the latest message of the conversation will
     * be used. The format is specific to the user and the names of the messages
     * provided.
     *
     * 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
     * generating a Summary. If empty, the latest message of the conversation will
     * be used. The format is specific to the user and the names of the messages
     * provided.
     *
     * 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 max_context_size = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getMaxContextSize()
    {
        return $this->max_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 max_context_size = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setMaxContextSize($var)
    {
        GPBUtil::checkInt32($var);
        $this->max_context_size = $var;

        return $this;
    }

}

