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

namespace Google\Cloud\Ces\V1;

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

/**
 * Represents a client-side function that the agent can invoke. When the
 * tool is chosen by the agent, control is handed off to the client.
 * The client is responsible for executing the function and returning the result
 * as a [ToolResponse][google.cloud.ces.v1.ToolResponse] to continue the
 * interaction with the agent.
 *
 * Generated from protobuf message <code>google.cloud.ces.v1.ClientFunction</code>
 */
class ClientFunction extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The function name.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $name = '';
    /**
     * Optional. The function description.
     *
     * Generated from protobuf field <code>string description = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $description = '';
    /**
     * Optional. The schema of the function parameters.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $parameters = null;
    /**
     * Optional. The schema of the function response.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $response = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. The function name.
     *     @type string $description
     *           Optional. The function description.
     *     @type \Google\Cloud\Ces\V1\Schema $parameters
     *           Optional. The schema of the function parameters.
     *     @type \Google\Cloud\Ces\V1\Schema $response
     *           Optional. The schema of the function response.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Ces\V1\ClientFunction::initOnce();
        parent::__construct($data);
    }

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

    /**
     * Required. The function name.
     *
     * 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. The function description.
     *
     * Generated from protobuf field <code>string description = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Optional. The function description.
     *
     * 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 schema of the function parameters.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Ces\V1\Schema|null
     */
    public function getParameters()
    {
        return $this->parameters;
    }

    public function hasParameters()
    {
        return isset($this->parameters);
    }

    public function clearParameters()
    {
        unset($this->parameters);
    }

    /**
     * Optional. The schema of the function parameters.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Ces\V1\Schema $var
     * @return $this
     */
    public function setParameters($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Ces\V1\Schema::class);
        $this->parameters = $var;

        return $this;
    }

    /**
     * Optional. The schema of the function response.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Ces\V1\Schema|null
     */
    public function getResponse()
    {
        return $this->response;
    }

    public function hasResponse()
    {
        return isset($this->response);
    }

    public function clearResponse()
    {
        unset($this->response);
    }

    /**
     * Optional. The schema of the function response.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Ces\V1\Schema $var
     * @return $this
     */
    public function setResponse($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Ces\V1\Schema::class);
        $this->response = $var;

        return $this;
    }

}

