Class FunctionDeclaration.Builder (3.34.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.v1beta1.FunctionDeclaration

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public FunctionDeclaration build()
Returns
TypeDescription
FunctionDeclaration

buildPartial()

public FunctionDeclaration buildPartial()
Returns
TypeDescription
FunctionDeclaration

clear()

public FunctionDeclaration.Builder clear()
Returns
TypeDescription
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
TypeDescription
FunctionDeclaration.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public FunctionDeclaration.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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 and dashes, with a maximum length of 64.

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

Returns
TypeDescription
FunctionDeclaration.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public FunctionDeclaration.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required:

  • param1

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

Returns
TypeDescription
FunctionDeclaration.Builder

clone()

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

getDefaultInstanceForType()

public FunctionDeclaration getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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 and dashes, with a maximum length of 64.

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

Returns
TypeDescription
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 and dashes, with a maximum length of 64.

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

Returns
TypeDescription
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. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required:

  • param1

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

Returns
TypeDescription
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. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required:

  • param1

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

Returns
TypeDescription
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. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required:

  • param1

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

Returns
TypeDescription
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. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required:

  • param1

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

Returns
TypeDescription
boolean

Whether the parameters field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(FunctionDeclaration other)

public FunctionDeclaration.Builder mergeFrom(FunctionDeclaration other)
Parameter
NameDescription
otherFunctionDeclaration
Returns
TypeDescription
FunctionDeclaration.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public FunctionDeclaration.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required:

  • param1

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

Parameter
NameDescription
valueSchema
Returns
TypeDescription
FunctionDeclaration.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final FunctionDeclaration.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueString

The description to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
FunctionDeclaration.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public FunctionDeclaration.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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 and dashes, with a maximum length of 64.

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

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
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 and dashes, with a maximum length of 64.

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

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
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. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required:

  • param1

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

Parameter
NameDescription
valueSchema
Returns
TypeDescription
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. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required:

  • param1

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

Parameter
NameDescription
builderForValueSchema.Builder
Returns
TypeDescription
FunctionDeclaration.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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