<?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;

/**
 * Function calling config.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.FunctionCallingConfig</code>
 */
class FunctionCallingConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. Function calling mode.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.FunctionCallingConfig.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $mode = 0;
    /**
     * Optional. Function names to call. Only set when the Mode is ANY. Function
     * names should match [FunctionDeclaration.name]. With mode set to ANY, model
     * will predict a function call from the set of function names provided.
     *
     * Generated from protobuf field <code>repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $allowed_function_names;
    /**
     * Optional. When set to true, arguments of a single function call will be
     * streamed out in multiple parts/contents/responses. Partial parameter
     * results will be returned in the [FunctionCall.partial_args] field.
     *
     * Generated from protobuf field <code>bool stream_function_call_arguments = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $stream_function_call_arguments = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $mode
     *           Optional. Function calling mode.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $allowed_function_names
     *           Optional. Function names to call. Only set when the Mode is ANY. Function
     *           names should match [FunctionDeclaration.name]. With mode set to ANY, model
     *           will predict a function call from the set of function names provided.
     *     @type bool $stream_function_call_arguments
     *           Optional. When set to true, arguments of a single function call will be
     *           streamed out in multiple parts/contents/responses. Partial parameter
     *           results will be returned in the [FunctionCall.partial_args] field.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\Tool::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Function calling mode.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.FunctionCallingConfig.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getMode()
    {
        return $this->mode;
    }

    /**
     * Optional. Function calling mode.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.FunctionCallingConfig.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setMode($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\FunctionCallingConfig\Mode::class);
        $this->mode = $var;

        return $this;
    }

    /**
     * Optional. Function names to call. Only set when the Mode is ANY. Function
     * names should match [FunctionDeclaration.name]. With mode set to ANY, model
     * will predict a function call from the set of function names provided.
     *
     * Generated from protobuf field <code>repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getAllowedFunctionNames()
    {
        return $this->allowed_function_names;
    }

    /**
     * Optional. Function names to call. Only set when the Mode is ANY. Function
     * names should match [FunctionDeclaration.name]. With mode set to ANY, model
     * will predict a function call from the set of function names provided.
     *
     * Generated from protobuf field <code>repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAllowedFunctionNames($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->allowed_function_names = $arr;

        return $this;
    }

    /**
     * Optional. When set to true, arguments of a single function call will be
     * streamed out in multiple parts/contents/responses. Partial parameter
     * results will be returned in the [FunctionCall.partial_args] field.
     *
     * Generated from protobuf field <code>bool stream_function_call_arguments = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getStreamFunctionCallArguments()
    {
        return $this->stream_function_call_arguments;
    }

    /**
     * Optional. When set to true, arguments of a single function call will be
     * streamed out in multiple parts/contents/responses. Partial parameter
     * results will be returned in the [FunctionCall.partial_args] field.
     *
     * Generated from protobuf field <code>bool stream_function_call_arguments = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setStreamFunctionCallArguments($var)
    {
        GPBUtil::checkBool($var);
        $this->stream_function_call_arguments = $var;

        return $this;
    }

}

