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

namespace Google\Cloud\Dialogflow\V2;

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

/**
 * A tool that is created from a toolset.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.ToolsetTool</code>
 */
class ToolsetTool extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The name of the toolset to retrieve the schema for.
     * Format:
     * `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}`
     *
     * Generated from protobuf field <code>string toolset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $toolset = '';
    /**
     * Optional. The operationId field of the OpenAPI endpoint. The operationId
     * must be present in the toolset's definition.
     *
     * Generated from protobuf field <code>string operation_id = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $operation_id = '';
    /**
     * Optional. Indicates whether the tool requires human confirmation.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.Tool.ConfirmationRequirement confirmation_requirement = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $confirmation_requirement = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $toolset
     *           Required. The name of the toolset to retrieve the schema for.
     *           Format:
     *           `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}`
     *     @type string $operation_id
     *           Optional. The operationId field of the OpenAPI endpoint. The operationId
     *           must be present in the toolset's definition.
     *     @type int $confirmation_requirement
     *           Optional. Indicates whether the tool requires human confirmation.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Toolset::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The name of the toolset to retrieve the schema for.
     * Format:
     * `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}`
     *
     * Generated from protobuf field <code>string toolset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getToolset()
    {
        return $this->toolset;
    }

    /**
     * Required. The name of the toolset to retrieve the schema for.
     * Format:
     * `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}`
     *
     * Generated from protobuf field <code>string toolset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setToolset($var)
    {
        GPBUtil::checkString($var, True);
        $this->toolset = $var;

        return $this;
    }

    /**
     * Optional. The operationId field of the OpenAPI endpoint. The operationId
     * must be present in the toolset's definition.
     *
     * Generated from protobuf field <code>string operation_id = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getOperationId()
    {
        return $this->operation_id;
    }

    /**
     * Optional. The operationId field of the OpenAPI endpoint. The operationId
     * must be present in the toolset's definition.
     *
     * Generated from protobuf field <code>string operation_id = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setOperationId($var)
    {
        GPBUtil::checkString($var, True);
        $this->operation_id = $var;

        return $this;
    }

    /**
     * Optional. Indicates whether the tool requires human confirmation.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.Tool.ConfirmationRequirement confirmation_requirement = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getConfirmationRequirement()
    {
        return $this->confirmation_requirement;
    }

    /**
     * Optional. Indicates whether the tool requires human confirmation.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.Tool.ConfirmationRequirement confirmation_requirement = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setConfirmationRequirement($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Tool\ConfirmationRequirement::class);
        $this->confirmation_requirement = $var;

        return $this;
    }

}

