<?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 response message for
 * [Conversations.SuggestConversationSummary][google.cloud.dialogflow.v2.Conversations.SuggestConversationSummary].
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.SuggestConversationSummaryResponse</code>
 */
class SuggestConversationSummaryResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated summary.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary summary = 1;</code>
     */
    private $summary = null;
    /**
     * The name of the latest conversation message used as context for
     * compiling suggestion.
     * 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>
     */
    private $latest_message = '';
    /**
     * Number of messages prior to and including
     * [last_conversation_message][] used to compile the suggestion. It may be
     * smaller than the [SuggestSummaryRequest.context_size][] field in the
     * request if there weren't that many messages in the conversation.
     *
     * Generated from protobuf field <code>int32 context_size = 3;</code>
     */
    private $context_size = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Dialogflow\V2\SuggestConversationSummaryResponse\Summary $summary
     *           Generated summary.
     *     @type string $latest_message
     *           The name of the latest conversation message used as context for
     *           compiling suggestion.
     *           Format: `projects/<Project ID>/locations/<Location
     *           ID>/conversations/<Conversation ID>/messages/<Message ID>`.
     *     @type int $context_size
     *           Number of messages prior to and including
     *           [last_conversation_message][] used to compile the suggestion. It may be
     *           smaller than the [SuggestSummaryRequest.context_size][] field in the
     *           request if there weren't that many messages in the conversation.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated summary.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary summary = 1;</code>
     * @return \Google\Cloud\Dialogflow\V2\SuggestConversationSummaryResponse\Summary|null
     */
    public function getSummary()
    {
        return $this->summary;
    }

    public function hasSummary()
    {
        return isset($this->summary);
    }

    public function clearSummary()
    {
        unset($this->summary);
    }

    /**
     * Generated summary.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary summary = 1;</code>
     * @param \Google\Cloud\Dialogflow\V2\SuggestConversationSummaryResponse\Summary $var
     * @return $this
     */
    public function setSummary($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SuggestConversationSummaryResponse\Summary::class);
        $this->summary = $var;

        return $this;
    }

    /**
     * The name of the latest conversation message used as context for
     * compiling suggestion.
     * 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 as context for
     * compiling suggestion.
     * 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
     * [last_conversation_message][] used to compile the suggestion. It may be
     * smaller than the [SuggestSummaryRequest.context_size][] field in the
     * request if there weren'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
     * [last_conversation_message][] used to compile the suggestion. It may be
     * smaller than the [SuggestSummaryRequest.context_size][] field in the
     * request if there weren'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;
    }

}

