<?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\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * The response message for
 * [Conversations.GenerateSuggestions][google.cloud.dialogflow.v2.Conversations.GenerateSuggestions].
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.GenerateSuggestionsResponse</code>
 */
class GenerateSuggestionsResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * The answers generated for the conversation based on context.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.GenerateSuggestionsResponse.GeneratorSuggestionAnswer generator_suggestion_answers = 1;</code>
     */
    private $generator_suggestion_answers;
    /**
     * 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>
     */
    protected $latest_message = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Dialogflow\V2\GenerateSuggestionsResponse\GeneratorSuggestionAnswer>|\Google\Protobuf\Internal\RepeatedField $generator_suggestion_answers
     *           The answers generated for the conversation based on context.
     *     @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>`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce();
        parent::__construct($data);
    }

    /**
     * The answers generated for the conversation based on context.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.GenerateSuggestionsResponse.GeneratorSuggestionAnswer generator_suggestion_answers = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getGeneratorSuggestionAnswers()
    {
        return $this->generator_suggestion_answers;
    }

    /**
     * The answers generated for the conversation based on context.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.GenerateSuggestionsResponse.GeneratorSuggestionAnswer generator_suggestion_answers = 1;</code>
     * @param array<\Google\Cloud\Dialogflow\V2\GenerateSuggestionsResponse\GeneratorSuggestionAnswer>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setGeneratorSuggestionAnswers($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\GenerateSuggestionsResponse\GeneratorSuggestionAnswer::class);
        $this->generator_suggestion_answers = $arr;

        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;
    }

}

