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

namespace Google\Cloud\Dialogflow\V2\GenerateSuggestionsResponse;

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

/**
 * A GeneratorSuggestion answer.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.GenerateSuggestionsResponse.GeneratorSuggestionAnswer</code>
 */
class GeneratorSuggestionAnswer extends \Google\Protobuf\Internal\Message
{
    /**
     * Suggestion details.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.GeneratorSuggestion generator_suggestion = 1;</code>
     */
    protected $generator_suggestion = null;
    /**
     * The name of the generator used to generate this suggestion. Format:
     * `projects/<Project ID>/locations/<Location ID>/generators/<Generator
     * ID>`.
     *
     * Generated from protobuf field <code>string source_generator = 2;</code>
     */
    protected $source_generator = '';
    /**
     * Answer record that uniquely identifies the suggestion. This can be used
     * to provide suggestion feedback.
     *
     * Generated from protobuf field <code>string answer_record = 3 [(.google.api.resource_reference) = {</code>
     */
    protected $answer_record = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Dialogflow\V2\GeneratorSuggestion $generator_suggestion
     *           Suggestion details.
     *     @type string $source_generator
     *           The name of the generator used to generate this suggestion. Format:
     *           `projects/<Project ID>/locations/<Location ID>/generators/<Generator
     *           ID>`.
     *     @type string $answer_record
     *           Answer record that uniquely identifies the suggestion. This can be used
     *           to provide suggestion feedback.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce();
        parent::__construct($data);
    }

    /**
     * Suggestion details.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.GeneratorSuggestion generator_suggestion = 1;</code>
     * @return \Google\Cloud\Dialogflow\V2\GeneratorSuggestion|null
     */
    public function getGeneratorSuggestion()
    {
        return $this->generator_suggestion;
    }

    public function hasGeneratorSuggestion()
    {
        return isset($this->generator_suggestion);
    }

    public function clearGeneratorSuggestion()
    {
        unset($this->generator_suggestion);
    }

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

        return $this;
    }

    /**
     * The name of the generator used to generate this suggestion. Format:
     * `projects/<Project ID>/locations/<Location ID>/generators/<Generator
     * ID>`.
     *
     * Generated from protobuf field <code>string source_generator = 2;</code>
     * @return string
     */
    public function getSourceGenerator()
    {
        return $this->source_generator;
    }

    /**
     * The name of the generator used to generate this suggestion. Format:
     * `projects/<Project ID>/locations/<Location ID>/generators/<Generator
     * ID>`.
     *
     * Generated from protobuf field <code>string source_generator = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setSourceGenerator($var)
    {
        GPBUtil::checkString($var, True);
        $this->source_generator = $var;

        return $this;
    }

    /**
     * Answer record that uniquely identifies the suggestion. This can be used
     * to provide suggestion feedback.
     *
     * Generated from protobuf field <code>string answer_record = 3 [(.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getAnswerRecord()
    {
        return $this->answer_record;
    }

    /**
     * Answer record that uniquely identifies the suggestion. This can be used
     * to provide suggestion feedback.
     *
     * Generated from protobuf field <code>string answer_record = 3 [(.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setAnswerRecord($var)
    {
        GPBUtil::checkString($var, True);
        $this->answer_record = $var;

        return $this;
    }

}


