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
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
public static final Descriptors.Descriptor getDescriptor()
Methods
public FunctionDeclaration.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
public FunctionDeclaration build()
public FunctionDeclaration buildPartial()
public FunctionDeclaration.Builder clear()
Overrides
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];
public FunctionDeclaration.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
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];
public FunctionDeclaration.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
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:
.google.cloud.aiplatform.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
public FunctionDeclaration.Builder clone()
Overrides
public FunctionDeclaration getDefaultInstanceForType()
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.
|
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.
|
public Descriptors.Descriptor getDescriptorForType()
Overrides
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 |
---|
Type | Description |
String | The name.
|
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 |
---|
Type | Description |
ByteString | The bytes for name.
|
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:
.google.cloud.aiplatform.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns |
---|
Type | Description |
Schema | The parameters.
|
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:
.google.cloud.aiplatform.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
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:
.google.cloud.aiplatform.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
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:
.google.cloud.aiplatform.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns |
---|
Type | Description |
boolean | Whether the parameters field is set.
|
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
public final boolean isInitialized()
Overrides
public FunctionDeclaration.Builder mergeFrom(FunctionDeclaration other)
public FunctionDeclaration.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
public FunctionDeclaration.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
Overrides
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:
.google.cloud.aiplatform.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
Parameter |
---|
Name | Description |
value | Schema
|
public final FunctionDeclaration.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
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.
|
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.
|
public FunctionDeclaration.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
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 |
---|
Name | Description |
value | String
The name to set.
|
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 |
---|
Name | Description |
value | ByteString
The bytes for name to set.
|
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:
.google.cloud.aiplatform.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
Parameter |
---|
Name | Description |
value | Schema
|
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:
.google.cloud.aiplatform.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
public FunctionDeclaration.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
public final FunctionDeclaration.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides