Class FunctionCallingConfig.Builder (3.41.0)

public static final class FunctionCallingConfig.Builder extends GeneratedMessageV3.Builder<FunctionCallingConfig.Builder> implements FunctionCallingConfigOrBuilder

Function calling config.

Protobuf type google.cloud.aiplatform.v1beta1.FunctionCallingConfig

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllAllowedFunctionNames(Iterable<String> values)

public FunctionCallingConfig.Builder addAllAllowedFunctionNames(Iterable<String> values)

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.

repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valuesIterable<String>

The allowedFunctionNames to add.

Returns
TypeDescription
FunctionCallingConfig.Builder

This builder for chaining.

addAllowedFunctionNames(String value)

public FunctionCallingConfig.Builder addAllowedFunctionNames(String value)

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.

repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueString

The allowedFunctionNames to add.

Returns
TypeDescription
FunctionCallingConfig.Builder

This builder for chaining.

addAllowedFunctionNamesBytes(ByteString value)

public FunctionCallingConfig.Builder addAllowedFunctionNamesBytes(ByteString value)

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.

repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The bytes of the allowedFunctionNames to add.

Returns
TypeDescription
FunctionCallingConfig.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public FunctionCallingConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
FunctionCallingConfig.Builder
Overrides

build()

public FunctionCallingConfig build()
Returns
TypeDescription
FunctionCallingConfig

buildPartial()

public FunctionCallingConfig buildPartial()
Returns
TypeDescription
FunctionCallingConfig

clear()

public FunctionCallingConfig.Builder clear()
Returns
TypeDescription
FunctionCallingConfig.Builder
Overrides

clearAllowedFunctionNames()

public FunctionCallingConfig.Builder clearAllowedFunctionNames()

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.

repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
FunctionCallingConfig.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public FunctionCallingConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
FunctionCallingConfig.Builder
Overrides

clearMode()

public FunctionCallingConfig.Builder clearMode()

Function calling mode.

.google.cloud.aiplatform.v1beta1.FunctionCallingConfig.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
FunctionCallingConfig.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public FunctionCallingConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
FunctionCallingConfig.Builder
Overrides

clone()

public FunctionCallingConfig.Builder clone()
Returns
TypeDescription
FunctionCallingConfig.Builder
Overrides

getAllowedFunctionNames(int index)

public String getAllowedFunctionNames(int index)

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.

repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The allowedFunctionNames at the given index.

getAllowedFunctionNamesBytes(int index)

public ByteString getAllowedFunctionNamesBytes(int index)

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.

repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the allowedFunctionNames at the given index.

getAllowedFunctionNamesCount()

public int getAllowedFunctionNamesCount()

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.

repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

The count of allowedFunctionNames.

getAllowedFunctionNamesList()

public ProtocolStringList getAllowedFunctionNamesList()

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.

repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ProtocolStringList

A list containing the allowedFunctionNames.

getDefaultInstanceForType()

public FunctionCallingConfig getDefaultInstanceForType()
Returns
TypeDescription
FunctionCallingConfig

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMode()

public FunctionCallingConfig.Mode getMode()

Function calling mode.

.google.cloud.aiplatform.v1beta1.FunctionCallingConfig.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
FunctionCallingConfig.Mode

The mode.

getModeValue()

public int getModeValue()

Function calling mode.

.google.cloud.aiplatform.v1beta1.FunctionCallingConfig.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

The enum numeric value on the wire for mode.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(FunctionCallingConfig other)

public FunctionCallingConfig.Builder mergeFrom(FunctionCallingConfig other)
Parameter
NameDescription
otherFunctionCallingConfig
Returns
TypeDescription
FunctionCallingConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public FunctionCallingConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FunctionCallingConfig.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public FunctionCallingConfig.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
FunctionCallingConfig.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final FunctionCallingConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
FunctionCallingConfig.Builder
Overrides

setAllowedFunctionNames(int index, String value)

public FunctionCallingConfig.Builder setAllowedFunctionNames(int index, String value)

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.

repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The allowedFunctionNames to set.

Returns
TypeDescription
FunctionCallingConfig.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public FunctionCallingConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
FunctionCallingConfig.Builder
Overrides

setMode(FunctionCallingConfig.Mode value)

public FunctionCallingConfig.Builder setMode(FunctionCallingConfig.Mode value)

Function calling mode.

.google.cloud.aiplatform.v1beta1.FunctionCallingConfig.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueFunctionCallingConfig.Mode

The mode to set.

Returns
TypeDescription
FunctionCallingConfig.Builder

This builder for chaining.

setModeValue(int value)

public FunctionCallingConfig.Builder setModeValue(int value)

Function calling mode.

.google.cloud.aiplatform.v1beta1.FunctionCallingConfig.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueint

The enum numeric value on the wire for mode to set.

Returns
TypeDescription
FunctionCallingConfig.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public FunctionCallingConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
FunctionCallingConfig.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final FunctionCallingConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
FunctionCallingConfig.Builder
Overrides