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

namespace Google\Cloud\Dialogflow\V2\Tool;

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

/**
 * A Function tool describes the functions to be invoked on the client side.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.Tool.FunctionTool</code>
 */
class FunctionTool extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. The JSON schema is encapsulated in a
     * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
     * the function. This input is a JSON object that contains the function's
     * parameters as properties of the object.
     *
     * Generated from protobuf field <code>.google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $input_schema = null;
    /**
     * Optional. The JSON schema is encapsulated in a
     * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
     * of the function. This output is a JSON object that contains the
     * function's parameters as properties of the object.
     *
     * Generated from protobuf field <code>.google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $output_schema = null;
    /**
     * Optional. The method type of the function. If not specified, the default
     * value is GET.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.Tool.MethodType method_type = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $method_type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Protobuf\Struct $input_schema
     *           Optional. The JSON schema is encapsulated in a
     *           [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
     *           the function. This input is a JSON object that contains the function's
     *           parameters as properties of the object.
     *     @type \Google\Protobuf\Struct $output_schema
     *           Optional. The JSON schema is encapsulated in a
     *           [google.protobuf.Struct][google.protobuf.Struct] to describe the output
     *           of the function. This output is a JSON object that contains the
     *           function's parameters as properties of the object.
     *     @type int $method_type
     *           Optional. The method type of the function. If not specified, the default
     *           value is GET.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Tool::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. The JSON schema is encapsulated in a
     * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
     * the function. This input is a JSON object that contains the function's
     * parameters as properties of the object.
     *
     * Generated from protobuf field <code>.google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Struct|null
     */
    public function getInputSchema()
    {
        return $this->input_schema;
    }

    public function hasInputSchema()
    {
        return isset($this->input_schema);
    }

    public function clearInputSchema()
    {
        unset($this->input_schema);
    }

    /**
     * Optional. The JSON schema is encapsulated in a
     * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
     * the function. This input is a JSON object that contains the function's
     * parameters as properties of the object.
     *
     * Generated from protobuf field <code>.google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Protobuf\Struct $var
     * @return $this
     */
    public function setInputSchema($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class);
        $this->input_schema = $var;

        return $this;
    }

    /**
     * Optional. The JSON schema is encapsulated in a
     * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
     * of the function. This output is a JSON object that contains the
     * function's parameters as properties of the object.
     *
     * Generated from protobuf field <code>.google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Struct|null
     */
    public function getOutputSchema()
    {
        return $this->output_schema;
    }

    public function hasOutputSchema()
    {
        return isset($this->output_schema);
    }

    public function clearOutputSchema()
    {
        unset($this->output_schema);
    }

    /**
     * Optional. The JSON schema is encapsulated in a
     * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
     * of the function. This output is a JSON object that contains the
     * function's parameters as properties of the object.
     *
     * Generated from protobuf field <code>.google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Protobuf\Struct $var
     * @return $this
     */
    public function setOutputSchema($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class);
        $this->output_schema = $var;

        return $this;
    }

    /**
     * Optional. The method type of the function. If not specified, the default
     * value is GET.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.Tool.MethodType method_type = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getMethodType()
    {
        return $this->method_type;
    }

    /**
     * Optional. The method type of the function. If not specified, the default
     * value is GET.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.Tool.MethodType method_type = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setMethodType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Tool\MethodType::class);
        $this->method_type = $var;

        return $this;
    }

}


