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

namespace Google\Cloud\Ces\V1;

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

/**
 * A tool represents an action that the CES agent can take to achieve certain
 * goals.
 *
 * Generated from protobuf message <code>google.cloud.ces.v1.Tool</code>
 */
class Tool extends \Google\Protobuf\Internal\Message
{
    /**
     * Identifier. The unique identifier of the tool.
     * Format:
     * - `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` for
     * ## standalone tools.
     * `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}/tools/{tool}`
     * for tools retrieved from a toolset. These tools are dynamic and
     * output-only, they cannot be referenced directly where a tool is expected.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     */
    protected $name = '';
    /**
     * Output only. The display name of the tool, derived based on the tool's
     * type. For example, display name of a [ClientFunction][Tool.ClientFunction]
     * is derived from its `name` property.
     *
     * Generated from protobuf field <code>string display_name = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $display_name = '';
    /**
     * Optional. The execution type of the tool.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.ExecutionType execution_type = 12 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $execution_type = 0;
    /**
     * Output only. Timestamp when the tool was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $create_time = null;
    /**
     * Output only. Timestamp when the tool was last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $update_time = null;
    /**
     * Etag used to ensure the object hasn't changed during a read-modify-write
     * operation. If the etag is empty, the update will overwrite any concurrent
     * changes.
     *
     * Generated from protobuf field <code>string etag = 14;</code>
     */
    protected $etag = '';
    /**
     * Output only. If the tool is generated by the LLM assistant, this field
     * contains a descriptive summary of the generation.
     *
     * Generated from protobuf field <code>string generated_summary = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $generated_summary = '';
    /**
     * Optional. Configuration for tool behavior in fake mode.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.ToolFakeConfig tool_fake_config = 20 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $tool_fake_config = null;
    protected $tool_type;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Ces\V1\ClientFunction $client_function
     *           Optional. The client function.
     *     @type \Google\Cloud\Ces\V1\OpenApiTool $open_api_tool
     *           Optional. The open API tool.
     *     @type \Google\Cloud\Ces\V1\GoogleSearchTool $google_search_tool
     *           Optional. The google search tool.
     *     @type \Google\Cloud\Ces\V1\ConnectorTool $connector_tool
     *           Optional. The Integration Connector tool.
     *     @type \Google\Cloud\Ces\V1\DataStoreTool $data_store_tool
     *           Optional. The data store tool.
     *     @type \Google\Cloud\Ces\V1\PythonFunction $python_function
     *           Optional. The python function tool.
     *     @type \Google\Cloud\Ces\V1\McpTool $mcp_tool
     *           Optional. The MCP tool. An MCP tool cannot be created or updated directly
     *           and is managed by the MCP toolset.
     *     @type \Google\Cloud\Ces\V1\FileSearchTool $file_search_tool
     *           Optional. The file search tool.
     *     @type \Google\Cloud\Ces\V1\SystemTool $system_tool
     *           Optional. The system tool.
     *     @type \Google\Cloud\Ces\V1\WidgetTool $widget_tool
     *           Optional. The widget tool.
     *     @type string $name
     *           Identifier. The unique identifier of the tool.
     *           Format:
     *           - `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` for
     *           ## standalone tools.
     *           `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}/tools/{tool}`
     *           for tools retrieved from a toolset. These tools are dynamic and
     *           output-only, they cannot be referenced directly where a tool is expected.
     *     @type string $display_name
     *           Output only. The display name of the tool, derived based on the tool's
     *           type. For example, display name of a [ClientFunction][Tool.ClientFunction]
     *           is derived from its `name` property.
     *     @type int $execution_type
     *           Optional. The execution type of the tool.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. Timestamp when the tool was created.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Output only. Timestamp when the tool was last updated.
     *     @type string $etag
     *           Etag used to ensure the object hasn't changed during a read-modify-write
     *           operation. If the etag is empty, the update will overwrite any concurrent
     *           changes.
     *     @type string $generated_summary
     *           Output only. If the tool is generated by the LLM assistant, this field
     *           contains a descriptive summary of the generation.
     *     @type \Google\Cloud\Ces\V1\ToolFakeConfig $tool_fake_config
     *           Optional. Configuration for tool behavior in fake mode.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Ces\V1\Tool::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. The client function.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.ClientFunction client_function = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Ces\V1\ClientFunction|null
     */
    public function getClientFunction()
    {
        return $this->readOneof(2);
    }

    public function hasClientFunction()
    {
        return $this->hasOneof(2);
    }

    /**
     * Optional. The client function.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.ClientFunction client_function = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Ces\V1\ClientFunction $var
     * @return $this
     */
    public function setClientFunction($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Ces\V1\ClientFunction::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Optional. The open API tool.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.OpenApiTool open_api_tool = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Ces\V1\OpenApiTool|null
     */
    public function getOpenApiTool()
    {
        return $this->readOneof(3);
    }

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

    /**
     * Optional. The open API tool.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.OpenApiTool open_api_tool = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Ces\V1\OpenApiTool $var
     * @return $this
     */
    public function setOpenApiTool($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Ces\V1\OpenApiTool::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * Optional. The google search tool.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.GoogleSearchTool google_search_tool = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Ces\V1\GoogleSearchTool|null
     */
    public function getGoogleSearchTool()
    {
        return $this->readOneof(5);
    }

    public function hasGoogleSearchTool()
    {
        return $this->hasOneof(5);
    }

    /**
     * Optional. The google search tool.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.GoogleSearchTool google_search_tool = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Ces\V1\GoogleSearchTool $var
     * @return $this
     */
    public function setGoogleSearchTool($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Ces\V1\GoogleSearchTool::class);
        $this->writeOneof(5, $var);

        return $this;
    }

    /**
     * Optional. The Integration Connector tool.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.ConnectorTool connector_tool = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Ces\V1\ConnectorTool|null
     */
    public function getConnectorTool()
    {
        return $this->readOneof(8);
    }

    public function hasConnectorTool()
    {
        return $this->hasOneof(8);
    }

    /**
     * Optional. The Integration Connector tool.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.ConnectorTool connector_tool = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Ces\V1\ConnectorTool $var
     * @return $this
     */
    public function setConnectorTool($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Ces\V1\ConnectorTool::class);
        $this->writeOneof(8, $var);

        return $this;
    }

    /**
     * Optional. The data store tool.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.DataStoreTool data_store_tool = 10 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Ces\V1\DataStoreTool|null
     */
    public function getDataStoreTool()
    {
        return $this->readOneof(10);
    }

    public function hasDataStoreTool()
    {
        return $this->hasOneof(10);
    }

    /**
     * Optional. The data store tool.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.DataStoreTool data_store_tool = 10 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Ces\V1\DataStoreTool $var
     * @return $this
     */
    public function setDataStoreTool($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Ces\V1\DataStoreTool::class);
        $this->writeOneof(10, $var);

        return $this;
    }

    /**
     * Optional. The python function tool.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.PythonFunction python_function = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Ces\V1\PythonFunction|null
     */
    public function getPythonFunction()
    {
        return $this->readOneof(11);
    }

    public function hasPythonFunction()
    {
        return $this->hasOneof(11);
    }

    /**
     * Optional. The python function tool.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.PythonFunction python_function = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Ces\V1\PythonFunction $var
     * @return $this
     */
    public function setPythonFunction($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Ces\V1\PythonFunction::class);
        $this->writeOneof(11, $var);

        return $this;
    }

    /**
     * Optional. The MCP tool. An MCP tool cannot be created or updated directly
     * and is managed by the MCP toolset.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.McpTool mcp_tool = 16 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Ces\V1\McpTool|null
     */
    public function getMcpTool()
    {
        return $this->readOneof(16);
    }

    public function hasMcpTool()
    {
        return $this->hasOneof(16);
    }

    /**
     * Optional. The MCP tool. An MCP tool cannot be created or updated directly
     * and is managed by the MCP toolset.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.McpTool mcp_tool = 16 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Ces\V1\McpTool $var
     * @return $this
     */
    public function setMcpTool($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Ces\V1\McpTool::class);
        $this->writeOneof(16, $var);

        return $this;
    }

    /**
     * Optional. The file search tool.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.FileSearchTool file_search_tool = 17 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Ces\V1\FileSearchTool|null
     */
    public function getFileSearchTool()
    {
        return $this->readOneof(17);
    }

    public function hasFileSearchTool()
    {
        return $this->hasOneof(17);
    }

    /**
     * Optional. The file search tool.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.FileSearchTool file_search_tool = 17 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Ces\V1\FileSearchTool $var
     * @return $this
     */
    public function setFileSearchTool($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Ces\V1\FileSearchTool::class);
        $this->writeOneof(17, $var);

        return $this;
    }

    /**
     * Optional. The system tool.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.SystemTool system_tool = 18 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Ces\V1\SystemTool|null
     */
    public function getSystemTool()
    {
        return $this->readOneof(18);
    }

    public function hasSystemTool()
    {
        return $this->hasOneof(18);
    }

    /**
     * Optional. The system tool.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.SystemTool system_tool = 18 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Ces\V1\SystemTool $var
     * @return $this
     */
    public function setSystemTool($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Ces\V1\SystemTool::class);
        $this->writeOneof(18, $var);

        return $this;
    }

    /**
     * Optional. The widget tool.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.WidgetTool widget_tool = 24 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Ces\V1\WidgetTool|null
     */
    public function getWidgetTool()
    {
        return $this->readOneof(24);
    }

    public function hasWidgetTool()
    {
        return $this->hasOneof(24);
    }

    /**
     * Optional. The widget tool.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.WidgetTool widget_tool = 24 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Ces\V1\WidgetTool $var
     * @return $this
     */
    public function setWidgetTool($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Ces\V1\WidgetTool::class);
        $this->writeOneof(24, $var);

        return $this;
    }

    /**
     * Identifier. The unique identifier of the tool.
     * Format:
     * - `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` for
     * ## standalone tools.
     * `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}/tools/{tool}`
     * for tools retrieved from a toolset. These tools are dynamic and
     * output-only, they cannot be referenced directly where a tool is expected.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Identifier. The unique identifier of the tool.
     * Format:
     * - `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` for
     * ## standalone tools.
     * `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}/tools/{tool}`
     * for tools retrieved from a toolset. These tools are dynamic and
     * output-only, they cannot be referenced directly where a tool is expected.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Output only. The display name of the tool, derived based on the tool's
     * type. For example, display name of a [ClientFunction][Tool.ClientFunction]
     * is derived from its `name` property.
     *
     * Generated from protobuf field <code>string display_name = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * Output only. The display name of the tool, derived based on the tool's
     * type. For example, display name of a [ClientFunction][Tool.ClientFunction]
     * is derived from its `name` property.
     *
     * Generated from protobuf field <code>string display_name = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

    /**
     * Optional. The execution type of the tool.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.ExecutionType execution_type = 12 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getExecutionType()
    {
        return $this->execution_type;
    }

    /**
     * Optional. The execution type of the tool.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.ExecutionType execution_type = 12 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setExecutionType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Ces\V1\ExecutionType::class);
        $this->execution_type = $var;

        return $this;
    }

    /**
     * Output only. Timestamp when the tool was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCreateTime()
    {
        return $this->create_time;
    }

    public function hasCreateTime()
    {
        return isset($this->create_time);
    }

    public function clearCreateTime()
    {
        unset($this->create_time);
    }

    /**
     * Output only. Timestamp when the tool was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->create_time = $var;

        return $this;
    }

    /**
     * Output only. Timestamp when the tool was last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getUpdateTime()
    {
        return $this->update_time;
    }

    public function hasUpdateTime()
    {
        return isset($this->update_time);
    }

    public function clearUpdateTime()
    {
        unset($this->update_time);
    }

    /**
     * Output only. Timestamp when the tool was last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setUpdateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->update_time = $var;

        return $this;
    }

    /**
     * Etag used to ensure the object hasn't changed during a read-modify-write
     * operation. If the etag is empty, the update will overwrite any concurrent
     * changes.
     *
     * Generated from protobuf field <code>string etag = 14;</code>
     * @return string
     */
    public function getEtag()
    {
        return $this->etag;
    }

    /**
     * Etag used to ensure the object hasn't changed during a read-modify-write
     * operation. If the etag is empty, the update will overwrite any concurrent
     * changes.
     *
     * Generated from protobuf field <code>string etag = 14;</code>
     * @param string $var
     * @return $this
     */
    public function setEtag($var)
    {
        GPBUtil::checkString($var, True);
        $this->etag = $var;

        return $this;
    }

    /**
     * Output only. If the tool is generated by the LLM assistant, this field
     * contains a descriptive summary of the generation.
     *
     * Generated from protobuf field <code>string generated_summary = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getGeneratedSummary()
    {
        return $this->generated_summary;
    }

    /**
     * Output only. If the tool is generated by the LLM assistant, this field
     * contains a descriptive summary of the generation.
     *
     * Generated from protobuf field <code>string generated_summary = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setGeneratedSummary($var)
    {
        GPBUtil::checkString($var, True);
        $this->generated_summary = $var;

        return $this;
    }

    /**
     * Optional. Configuration for tool behavior in fake mode.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.ToolFakeConfig tool_fake_config = 20 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Ces\V1\ToolFakeConfig|null
     */
    public function getToolFakeConfig()
    {
        return $this->tool_fake_config;
    }

    public function hasToolFakeConfig()
    {
        return isset($this->tool_fake_config);
    }

    public function clearToolFakeConfig()
    {
        unset($this->tool_fake_config);
    }

    /**
     * Optional. Configuration for tool behavior in fake mode.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.ToolFakeConfig tool_fake_config = 20 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Ces\V1\ToolFakeConfig $var
     * @return $this
     */
    public function setToolFakeConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Ces\V1\ToolFakeConfig::class);
        $this->tool_fake_config = $var;

        return $this;
    }

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

}

