Class FunctionDeclaration.Builder (3.47.0)

public static final class FunctionDeclaration.Builder extends GeneratedMessageV3.Builder<FunctionDeclaration.Builder> implements FunctionDeclarationOrBuilder

Structured representation of a function declaration as defined by the OpenAPI 3.0 specification. Included in this declaration are the function name and parameters. This FunctionDeclaration is a representation of a block of code that can be used as a Tool by the model and executed by the client.

Protobuf type google.cloud.aiplatform.v1.FunctionDeclaration

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public FunctionDeclaration.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
FunctionDeclaration.Builder
Overrides

build()

public FunctionDeclaration build()
Returns
Type Description
FunctionDeclaration

buildPartial()

public FunctionDeclaration buildPartial()
Returns
Type Description
FunctionDeclaration

clear()

public FunctionDeclaration.Builder clear()
Returns
Type Description
FunctionDeclaration.Builder
Overrides

clearDescription()

public FunctionDeclaration.Builder clearDescription()

Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function.

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

Returns
Type Description
FunctionDeclaration.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public FunctionDeclaration.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
FunctionDeclaration.Builder
Overrides

clearName()

public FunctionDeclaration.Builder clearName()

Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
FunctionDeclaration.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public FunctionDeclaration.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
FunctionDeclaration.Builder
Overrides

clearParameters()

public FunctionDeclaration.Builder clearParameters()

Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required:

  • param1

.google.cloud.aiplatform.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
FunctionDeclaration.Builder

clone()

public FunctionDeclaration.Builder clone()
Returns
Type Description
FunctionDeclaration.Builder
Overrides

getDefaultInstanceForType()

public FunctionDeclaration getDefaultInstanceForType()
Returns
Type Description
FunctionDeclaration

getDescription()

public String getDescription()

Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function.

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

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function.

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

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getName()

public String getName()

Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for name.

getParameters()

public Schema getParameters()

Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required:

  • param1

.google.cloud.aiplatform.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Schema

The parameters.

getParametersBuilder()

public Schema.Builder getParametersBuilder()

Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required:

  • param1

.google.cloud.aiplatform.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Schema.Builder

getParametersOrBuilder()

public SchemaOrBuilder getParametersOrBuilder()

Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required:

  • param1

.google.cloud.aiplatform.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SchemaOrBuilder

hasParameters()

public boolean hasParameters()

Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required:

  • param1

.google.cloud.aiplatform.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the parameters field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(FunctionDeclaration other)

public FunctionDeclaration.Builder mergeFrom(FunctionDeclaration other)
Parameter
Name Description
other FunctionDeclaration
Returns
Type Description
FunctionDeclaration.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public FunctionDeclaration.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FunctionDeclaration.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public FunctionDeclaration.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
FunctionDeclaration.Builder
Overrides

mergeParameters(Schema value)

public FunctionDeclaration.Builder mergeParameters(Schema value)

Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required:

  • param1

.google.cloud.aiplatform.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Schema
Returns
Type Description
FunctionDeclaration.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final FunctionDeclaration.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
FunctionDeclaration.Builder
Overrides

setDescription(String value)

public FunctionDeclaration.Builder setDescription(String value)

Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function.

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

Parameter
Name Description
value String

The description to set.

Returns
Type Description
FunctionDeclaration.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public FunctionDeclaration.Builder setDescriptionBytes(ByteString value)

Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function.

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

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
FunctionDeclaration.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public FunctionDeclaration.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
FunctionDeclaration.Builder
Overrides

setName(String value)

public FunctionDeclaration.Builder setName(String value)

Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
FunctionDeclaration.Builder

This builder for chaining.

setNameBytes(ByteString value)

public FunctionDeclaration.Builder setNameBytes(ByteString value)

Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
FunctionDeclaration.Builder

This builder for chaining.

setParameters(Schema value)

public FunctionDeclaration.Builder setParameters(Schema value)

Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required:

  • param1

.google.cloud.aiplatform.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Schema
Returns
Type Description
FunctionDeclaration.Builder

setParameters(Schema.Builder builderForValue)

public FunctionDeclaration.Builder setParameters(Schema.Builder builderForValue)

Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required:

  • param1

.google.cloud.aiplatform.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Schema.Builder
Returns
Type Description
FunctionDeclaration.Builder

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

public FunctionDeclaration.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
FunctionDeclaration.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final FunctionDeclaration.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
FunctionDeclaration.Builder
Overrides