<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/ces/v1/agent_tool.proto

namespace Google\Cloud\Ces\V1;

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

/**
 * Represents a tool that allows the agent to call another agent.
 *
 * Generated from protobuf message <code>google.cloud.ces.v1.AgentTool</code>
 */
class AgentTool extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The name of the agent tool.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $name = '';
    /**
     * Optional. Description of the tool's purpose.
     *
     * Generated from protobuf field <code>string description = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $description = '';
    /**
     * Optional. The resource name of the root agent that is the entry point of
     * the tool. Format: `projects/{project}/locations/{location}/agents/{agent}`
     *
     * Generated from protobuf field <code>string root_agent = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     */
    protected $root_agent = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. The name of the agent tool.
     *     @type string $description
     *           Optional. Description of the tool's purpose.
     *     @type string $root_agent
     *           Optional. The resource name of the root agent that is the entry point of
     *           the tool. Format: `projects/{project}/locations/{location}/agents/{agent}`
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Ces\V1\AgentTool::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The name of the agent tool.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. The name of the agent tool.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Optional. Description of the tool's purpose.
     *
     * Generated from protobuf field <code>string description = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Optional. Description of the tool's purpose.
     *
     * Generated from protobuf field <code>string description = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * Optional. The resource name of the root agent that is the entry point of
     * the tool. Format: `projects/{project}/locations/{location}/agents/{agent}`
     *
     * Generated from protobuf field <code>string root_agent = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getRootAgent()
    {
        return $this->root_agent;
    }

    /**
     * Optional. The resource name of the root agent that is the entry point of
     * the tool. Format: `projects/{project}/locations/{location}/agents/{agent}`
     *
     * Generated from protobuf field <code>string root_agent = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setRootAgent($var)
    {
        GPBUtil::checkString($var, True);
        $this->root_agent = $var;

        return $this;
    }

}

