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

namespace Google\Cloud\Dialogflow\V2;

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

/**
 * Suggestion generated using a Generator.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.GeneratorSuggestion</code>
 */
class GeneratorSuggestion extends \Google\Protobuf\Internal\Message
{
    protected $suggestion;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Dialogflow\V2\FreeFormSuggestion $free_form_suggestion
     *           Optional. Free form suggestion.
     *     @type \Google\Cloud\Dialogflow\V2\SummarySuggestion $summary_suggestion
     *           Optional. Suggested summary.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Generator::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Free form suggestion.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.FreeFormSuggestion free_form_suggestion = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Dialogflow\V2\FreeFormSuggestion|null
     */
    public function getFreeFormSuggestion()
    {
        return $this->readOneof(1);
    }

    public function hasFreeFormSuggestion()
    {
        return $this->hasOneof(1);
    }

    /**
     * Optional. Free form suggestion.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.FreeFormSuggestion free_form_suggestion = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Dialogflow\V2\FreeFormSuggestion $var
     * @return $this
     */
    public function setFreeFormSuggestion($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\FreeFormSuggestion::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Optional. Suggested summary.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.SummarySuggestion summary_suggestion = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Dialogflow\V2\SummarySuggestion|null
     */
    public function getSummarySuggestion()
    {
        return $this->readOneof(2);
    }

    public function hasSummarySuggestion()
    {
        return $this->hasOneof(2);
    }

    /**
     * Optional. Suggested summary.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.SummarySuggestion summary_suggestion = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Dialogflow\V2\SummarySuggestion $var
     * @return $this
     */
    public function setSummarySuggestion($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SummarySuggestion::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getSuggestion()
    {
        return $this->whichOneof("suggestion");
    }

}

