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

/**
 * Suggestion generated using a Generator.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.GeneratorSuggestion</code>
 */
class GeneratorSuggestion extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. List of request and response for tool calls executed.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.GeneratorSuggestion.ToolCallInfo tool_call_info = 9 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $tool_call_info;
    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.
     *     @type \Google\Cloud\Dialogflow\V2\AgentCoachingSuggestion $agent_coaching_suggestion
     *           Optional. Suggestion to coach the agent.
     *     @type \Google\Cloud\Dialogflow\V2\GeneratorSuggestion\ToolCallInfo[] $tool_call_info
     *           Optional. List of request and response for tool calls executed.
     * }
     */
    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;
    }

    /**
     * Optional. Suggestion to coach the agent.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.AgentCoachingSuggestion agent_coaching_suggestion = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Dialogflow\V2\AgentCoachingSuggestion|null
     */
    public function getAgentCoachingSuggestion()
    {
        return $this->readOneof(3);
    }

    public function hasAgentCoachingSuggestion()
    {
        return $this->hasOneof(3);
    }

    /**
     * Optional. Suggestion to coach the agent.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.AgentCoachingSuggestion agent_coaching_suggestion = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Dialogflow\V2\AgentCoachingSuggestion $var
     * @return $this
     */
    public function setAgentCoachingSuggestion($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\AgentCoachingSuggestion::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * Optional. List of request and response for tool calls executed.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.GeneratorSuggestion.ToolCallInfo tool_call_info = 9 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return RepeatedField<\Google\Cloud\Dialogflow\V2\GeneratorSuggestion\ToolCallInfo>
     */
    public function getToolCallInfo()
    {
        return $this->tool_call_info;
    }

    /**
     * Optional. List of request and response for tool calls executed.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.GeneratorSuggestion.ToolCallInfo tool_call_info = 9 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Dialogflow\V2\GeneratorSuggestion\ToolCallInfo[] $var
     * @return $this
     */
    public function setToolCallInfo($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\GeneratorSuggestion\ToolCallInfo::class);
        $this->tool_call_info = $arr;

        return $this;
    }

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

}

