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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * A predicted [FunctionCall] returned from the model that contains a string
 * representing the [FunctionDeclaration.name] and a structured JSON object
 * containing the parameters and their values.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.FunctionCall</code>
 */
class FunctionCall extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The name of the function to call.
     * Matches [FunctionDeclaration.name].
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $name = '';
    /**
     * Optional. Required. The function parameters and values in JSON object
     * format. See [FunctionDeclaration.parameters] for parameter details.
     *
     * Generated from protobuf field <code>.google.protobuf.Struct args = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $args = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. The name of the function to call.
     *           Matches [FunctionDeclaration.name].
     *     @type \Google\Protobuf\Struct $args
     *           Optional. Required. The function parameters and values in JSON object
     *           format. See [FunctionDeclaration.parameters] for parameter details.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\Tool::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The name of the function to call.
     * Matches [FunctionDeclaration.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 name of the function to call.
     * Matches [FunctionDeclaration.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. Required. The function parameters and values in JSON object
     * format. See [FunctionDeclaration.parameters] for parameter details.
     *
     * Generated from protobuf field <code>.google.protobuf.Struct args = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Struct|null
     */
    public function getArgs()
    {
        return $this->args;
    }

    public function hasArgs()
    {
        return isset($this->args);
    }

    public function clearArgs()
    {
        unset($this->args);
    }

    /**
     * Optional. Required. The function parameters and values in JSON object
     * format. See [FunctionDeclaration.parameters] for parameter details.
     *
     * Generated from protobuf field <code>.google.protobuf.Struct args = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Protobuf\Struct $var
     * @return $this
     */
    public function setArgs($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class);
        $this->args = $var;

        return $this;
    }

}

