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.vertexai.v1.FunctionDeclaration
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public FunctionDeclaration.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public FunctionDeclaration build()
buildPartial()
public FunctionDeclaration buildPartial()
clear()
public FunctionDeclaration.Builder clear()
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];
clearField(Descriptors.FieldDescriptor field)
public FunctionDeclaration.Builder clearField(Descriptors.FieldDescriptor field)
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];
clearOneof(Descriptors.OneofDescriptor oneof)
public FunctionDeclaration.Builder clearOneof(Descriptors.OneofDescriptor oneof)
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:
.google.cloud.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
clone()
public FunctionDeclaration.Builder clone()
Overrides
getDefaultInstanceForType()
public FunctionDeclaration getDefaultInstanceForType()
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()
Overrides
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:
.google.cloud.vertexai.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:
.google.cloud.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
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:
.google.cloud.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
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:
.google.cloud.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
boolean |
Whether the parameters field is set.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(FunctionDeclaration other)
public FunctionDeclaration.Builder mergeFrom(FunctionDeclaration other)
public FunctionDeclaration.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public FunctionDeclaration.Builder mergeFrom(Message other)
Parameter |
Name |
Description |
other |
Message
|
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:
.google.cloud.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
Parameter |
Name |
Description |
value |
Schema
|
mergeUnknownFields(UnknownFieldSet unknownFields)
public final FunctionDeclaration.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
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.
|
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.
|
setField(Descriptors.FieldDescriptor field, Object value)
public FunctionDeclaration.Builder setField(Descriptors.FieldDescriptor field, Object value)
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.
|
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.
|
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:
.google.cloud.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
Parameter |
Name |
Description |
value |
Schema
|
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:
.google.cloud.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public FunctionDeclaration.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final FunctionDeclaration.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides