public static final class FunctionDeclaration.Builder extends com.google.protobuf.GeneratedMessage.Builder<FunctionDeclaration.Builder> implements FunctionDeclarationOrBuilder
Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. 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.FunctionDeclarationaddRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<FunctionDeclaration.Builder>public FunctionDeclaration.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessage.Builder<FunctionDeclaration.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<FunctionDeclaration.Builder>public FunctionDeclaration getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic FunctionDeclaration build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic FunctionDeclaration buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic FunctionDeclaration.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<FunctionDeclaration.Builder>public FunctionDeclaration.Builder mergeFrom(FunctionDeclaration other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessage.Builder<FunctionDeclaration.Builder>public FunctionDeclaration.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<FunctionDeclaration.Builder>IOExceptionpublic 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];getName in interface FunctionDeclarationOrBuilderpublic com.google.protobuf.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];getNameBytes in interface FunctionDeclarationOrBuilderpublic 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];value - The name to set.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];public FunctionDeclaration.Builder setNameBytes(com.google.protobuf.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];value - The bytes for name to set.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];getDescription in interface FunctionDeclarationOrBuilderpublic com.google.protobuf.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];getDescriptionBytes in interface FunctionDeclarationOrBuilderpublic 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];value - The description to set.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 setDescriptionBytes(com.google.protobuf.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];value - The bytes for description to set.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];
hasParameters in interface FunctionDeclarationOrBuilderpublic 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];
getParameters in interface FunctionDeclarationOrBuilderpublic 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];
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];
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];
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];
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];
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];
getParametersOrBuilder in interface FunctionDeclarationOrBuilderpublic boolean hasParametersJsonSchema()
Optional. Describes the parameters to the function in JSON Schema format.
The schema must describe an object where the properties are the parameters
to the function. For example:
```
{
"type": "object",
"properties": {
"name": { "type": "string" },
"age": { "type": "integer" }
},
"additionalProperties": false,
"required": ["name", "age"],
"propertyOrdering": ["name", "age"]
}
```
This field is mutually exclusive with `parameters`.
.google.protobuf.Value parameters_json_schema = 5 [(.google.api.field_behavior) = OPTIONAL];
hasParametersJsonSchema in interface FunctionDeclarationOrBuilderpublic com.google.protobuf.Value getParametersJsonSchema()
Optional. Describes the parameters to the function in JSON Schema format.
The schema must describe an object where the properties are the parameters
to the function. For example:
```
{
"type": "object",
"properties": {
"name": { "type": "string" },
"age": { "type": "integer" }
},
"additionalProperties": false,
"required": ["name", "age"],
"propertyOrdering": ["name", "age"]
}
```
This field is mutually exclusive with `parameters`.
.google.protobuf.Value parameters_json_schema = 5 [(.google.api.field_behavior) = OPTIONAL];
getParametersJsonSchema in interface FunctionDeclarationOrBuilderpublic FunctionDeclaration.Builder setParametersJsonSchema(com.google.protobuf.Value value)
Optional. Describes the parameters to the function in JSON Schema format.
The schema must describe an object where the properties are the parameters
to the function. For example:
```
{
"type": "object",
"properties": {
"name": { "type": "string" },
"age": { "type": "integer" }
},
"additionalProperties": false,
"required": ["name", "age"],
"propertyOrdering": ["name", "age"]
}
```
This field is mutually exclusive with `parameters`.
.google.protobuf.Value parameters_json_schema = 5 [(.google.api.field_behavior) = OPTIONAL];
public FunctionDeclaration.Builder setParametersJsonSchema(com.google.protobuf.Value.Builder builderForValue)
Optional. Describes the parameters to the function in JSON Schema format.
The schema must describe an object where the properties are the parameters
to the function. For example:
```
{
"type": "object",
"properties": {
"name": { "type": "string" },
"age": { "type": "integer" }
},
"additionalProperties": false,
"required": ["name", "age"],
"propertyOrdering": ["name", "age"]
}
```
This field is mutually exclusive with `parameters`.
.google.protobuf.Value parameters_json_schema = 5 [(.google.api.field_behavior) = OPTIONAL];
public FunctionDeclaration.Builder mergeParametersJsonSchema(com.google.protobuf.Value value)
Optional. Describes the parameters to the function in JSON Schema format.
The schema must describe an object where the properties are the parameters
to the function. For example:
```
{
"type": "object",
"properties": {
"name": { "type": "string" },
"age": { "type": "integer" }
},
"additionalProperties": false,
"required": ["name", "age"],
"propertyOrdering": ["name", "age"]
}
```
This field is mutually exclusive with `parameters`.
.google.protobuf.Value parameters_json_schema = 5 [(.google.api.field_behavior) = OPTIONAL];
public FunctionDeclaration.Builder clearParametersJsonSchema()
Optional. Describes the parameters to the function in JSON Schema format.
The schema must describe an object where the properties are the parameters
to the function. For example:
```
{
"type": "object",
"properties": {
"name": { "type": "string" },
"age": { "type": "integer" }
},
"additionalProperties": false,
"required": ["name", "age"],
"propertyOrdering": ["name", "age"]
}
```
This field is mutually exclusive with `parameters`.
.google.protobuf.Value parameters_json_schema = 5 [(.google.api.field_behavior) = OPTIONAL];
public com.google.protobuf.Value.Builder getParametersJsonSchemaBuilder()
Optional. Describes the parameters to the function in JSON Schema format.
The schema must describe an object where the properties are the parameters
to the function. For example:
```
{
"type": "object",
"properties": {
"name": { "type": "string" },
"age": { "type": "integer" }
},
"additionalProperties": false,
"required": ["name", "age"],
"propertyOrdering": ["name", "age"]
}
```
This field is mutually exclusive with `parameters`.
.google.protobuf.Value parameters_json_schema = 5 [(.google.api.field_behavior) = OPTIONAL];
public com.google.protobuf.ValueOrBuilder getParametersJsonSchemaOrBuilder()
Optional. Describes the parameters to the function in JSON Schema format.
The schema must describe an object where the properties are the parameters
to the function. For example:
```
{
"type": "object",
"properties": {
"name": { "type": "string" },
"age": { "type": "integer" }
},
"additionalProperties": false,
"required": ["name", "age"],
"propertyOrdering": ["name", "age"]
}
```
This field is mutually exclusive with `parameters`.
.google.protobuf.Value parameters_json_schema = 5 [(.google.api.field_behavior) = OPTIONAL];
getParametersJsonSchemaOrBuilder in interface FunctionDeclarationOrBuilderpublic boolean hasResponse()
Optional. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.
.google.cloud.aiplatform.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL];
hasResponse in interface FunctionDeclarationOrBuilderpublic Schema getResponse()
Optional. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.
.google.cloud.aiplatform.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL];
getResponse in interface FunctionDeclarationOrBuilderpublic FunctionDeclaration.Builder setResponse(Schema value)
Optional. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.
.google.cloud.aiplatform.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL];
public FunctionDeclaration.Builder setResponse(Schema.Builder builderForValue)
Optional. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.
.google.cloud.aiplatform.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL];
public FunctionDeclaration.Builder mergeResponse(Schema value)
Optional. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.
.google.cloud.aiplatform.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL];
public FunctionDeclaration.Builder clearResponse()
Optional. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.
.google.cloud.aiplatform.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL];
public Schema.Builder getResponseBuilder()
Optional. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.
.google.cloud.aiplatform.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL];
public SchemaOrBuilder getResponseOrBuilder()
Optional. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.
.google.cloud.aiplatform.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL];
getResponseOrBuilder in interface FunctionDeclarationOrBuilderpublic boolean hasResponseJsonSchema()
Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`.
.google.protobuf.Value response_json_schema = 6 [(.google.api.field_behavior) = OPTIONAL];
hasResponseJsonSchema in interface FunctionDeclarationOrBuilderpublic com.google.protobuf.Value getResponseJsonSchema()
Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`.
.google.protobuf.Value response_json_schema = 6 [(.google.api.field_behavior) = OPTIONAL];
getResponseJsonSchema in interface FunctionDeclarationOrBuilderpublic FunctionDeclaration.Builder setResponseJsonSchema(com.google.protobuf.Value value)
Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`.
.google.protobuf.Value response_json_schema = 6 [(.google.api.field_behavior) = OPTIONAL];
public FunctionDeclaration.Builder setResponseJsonSchema(com.google.protobuf.Value.Builder builderForValue)
Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`.
.google.protobuf.Value response_json_schema = 6 [(.google.api.field_behavior) = OPTIONAL];
public FunctionDeclaration.Builder mergeResponseJsonSchema(com.google.protobuf.Value value)
Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`.
.google.protobuf.Value response_json_schema = 6 [(.google.api.field_behavior) = OPTIONAL];
public FunctionDeclaration.Builder clearResponseJsonSchema()
Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`.
.google.protobuf.Value response_json_schema = 6 [(.google.api.field_behavior) = OPTIONAL];
public com.google.protobuf.Value.Builder getResponseJsonSchemaBuilder()
Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`.
.google.protobuf.Value response_json_schema = 6 [(.google.api.field_behavior) = OPTIONAL];
public com.google.protobuf.ValueOrBuilder getResponseJsonSchemaOrBuilder()
Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`.
.google.protobuf.Value response_json_schema = 6 [(.google.api.field_behavior) = OPTIONAL];
getResponseJsonSchemaOrBuilder in interface FunctionDeclarationOrBuilderCopyright © 2026 Google LLC. All rights reserved.