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

namespace Google\Cloud\Dialogflow\V2\GeneratorSuggestion;

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

/**
 * Request and response for a tool call.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.GeneratorSuggestion.ToolCallInfo</code>
 */
class ToolCallInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Request for a tool call.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.ToolCall tool_call = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $tool_call = null;
    /**
     * Required. Response for a tool call.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.ToolCallResult tool_call_result = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $tool_call_result = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Dialogflow\V2\ToolCall $tool_call
     *           Required. Request for a tool call.
     *     @type \Google\Cloud\Dialogflow\V2\ToolCallResult $tool_call_result
     *           Required. Response for a tool call.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Generator::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Request for a tool call.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.ToolCall tool_call = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Dialogflow\V2\ToolCall|null
     */
    public function getToolCall()
    {
        return $this->tool_call;
    }

    public function hasToolCall()
    {
        return isset($this->tool_call);
    }

    public function clearToolCall()
    {
        unset($this->tool_call);
    }

    /**
     * Required. Request for a tool call.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.ToolCall tool_call = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Dialogflow\V2\ToolCall $var
     * @return $this
     */
    public function setToolCall($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ToolCall::class);
        $this->tool_call = $var;

        return $this;
    }

    /**
     * Required. Response for a tool call.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.ToolCallResult tool_call_result = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Dialogflow\V2\ToolCallResult|null
     */
    public function getToolCallResult()
    {
        return $this->tool_call_result;
    }

    public function hasToolCallResult()
    {
        return isset($this->tool_call_result);
    }

    public function clearToolCallResult()
    {
        unset($this->tool_call_result);
    }

    /**
     * Required. Response for a tool call.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.ToolCallResult tool_call_result = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Dialogflow\V2\ToolCallResult $var
     * @return $this
     */
    public function setToolCallResult($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ToolCallResult::class);
        $this->tool_call_result = $var;

        return $this;
    }

}

