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

    /**
     * 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.
     * }
     */
    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;
    }

}

