Class FunctionDeclaration.Builder (1.33.0)
Stay organized with collections
Save and categorize content based on your preferences.
publicstaticfinalclass FunctionDeclaration.BuilderextendsGeneratedMessageV3.Builder<FunctionDeclaration.Builder>implementsFunctionDeclarationOrBuilder Structured representation of a function declaration as defined by the
OpenAPI 3.0 specification. 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.vertexai.v1.FunctionDeclaration
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > FunctionDeclaration.BuilderImplements
FunctionDeclarationOrBuilderInherited Members
Static Methods
getDescriptor()
publicstaticfinalDescriptors.DescriptorgetDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
publicFunctionDeclaration.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
FunctionDeclaration.Builder |
|
build()
publicFunctionDeclarationbuild()| Returns | |
|---|---|
| Type | Description |
FunctionDeclaration |
|
buildPartial()
publicFunctionDeclarationbuildPartial()| Returns | |
|---|---|
| Type | Description |
FunctionDeclaration |
|
clear()
publicFunctionDeclaration.Builderclear()| Returns | |
|---|---|
| Type | Description |
FunctionDeclaration.Builder |
|
clearDescription()
publicFunctionDeclaration.BuilderclearDescription()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)
publicFunctionDeclaration.BuilderclearField(Descriptors.FieldDescriptorfield)| Parameter | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
| Returns | |
|---|---|
| Type | Description |
FunctionDeclaration.Builder |
|
clearName()
publicFunctionDeclaration.BuilderclearName()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)
publicFunctionDeclaration.BuilderclearOneof(Descriptors.OneofDescriptoroneof)| Parameter | |
|---|---|
| Name | Description |
oneof |
OneofDescriptor |
| Returns | |
|---|---|
| Type | Description |
FunctionDeclaration.Builder |
|
clearParameters()
publicFunctionDeclaration.BuilderclearParameters()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.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
FunctionDeclaration.Builder |
|
clearResponse()
publicFunctionDeclaration.BuilderclearResponse()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.vertexai.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
FunctionDeclaration.Builder |
|
clone()
publicFunctionDeclaration.Builderclone()| Returns | |
|---|---|
| Type | Description |
FunctionDeclaration.Builder |
|
getDefaultInstanceForType()
publicFunctionDeclarationgetDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
FunctionDeclaration |
|
getDescription()
publicStringgetDescription()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()
publicByteStringgetDescriptionBytes()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()
publicDescriptors.DescriptorgetDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getName()
publicStringgetName()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()
publicByteStringgetNameBytes()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()
publicSchemagetParameters()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.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Schema |
The parameters. |
getParametersBuilder()
publicSchema.BuildergetParametersBuilder()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.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Schema.Builder |
|
getParametersOrBuilder()
publicSchemaOrBuildergetParametersOrBuilder()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.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
SchemaOrBuilder |
|
getResponse()
publicSchemagetResponse()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.vertexai.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Schema |
The response. |
getResponseBuilder()
publicSchema.BuildergetResponseBuilder()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.vertexai.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Schema.Builder |
|
getResponseOrBuilder()
publicSchemaOrBuildergetResponseOrBuilder()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.vertexai.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
SchemaOrBuilder |
|
hasParameters()
publicbooleanhasParameters()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.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the parameters field is set. |
hasResponse()
publicbooleanhasResponse()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.vertexai.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the response field is set. |
internalGetFieldAccessorTable()
protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
publicfinalbooleanisInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(FunctionDeclaration other)
publicFunctionDeclaration.BuildermergeFrom(FunctionDeclarationother)| Parameter | |
|---|---|
| Name | Description |
other |
FunctionDeclaration |
| Returns | |
|---|---|
| Type | Description |
FunctionDeclaration.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
publicFunctionDeclaration.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
FunctionDeclaration.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
publicFunctionDeclaration.BuildermergeFrom(Messageother)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
FunctionDeclaration.Builder |
|
mergeParameters(Schema value)
publicFunctionDeclaration.BuildermergeParameters(Schemavalue)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.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
Schema |
| Returns | |
|---|---|
| Type | Description |
FunctionDeclaration.Builder |
|
mergeResponse(Schema value)
publicFunctionDeclaration.BuildermergeResponse(Schemavalue)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.vertexai.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
Schema |
| Returns | |
|---|---|
| Type | Description |
FunctionDeclaration.Builder |
|
mergeUnknownFields(UnknownFieldSet unknownFields)
publicfinalFunctionDeclaration.BuildermergeUnknownFields(UnknownFieldSetunknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
FunctionDeclaration.Builder |
|
setDescription(String value)
publicFunctionDeclaration.BuildersetDescription(Stringvalue)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)
publicFunctionDeclaration.BuildersetDescriptionBytes(ByteStringvalue)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)
publicFunctionDeclaration.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
FunctionDeclaration.Builder |
|
setName(String value)
publicFunctionDeclaration.BuildersetName(Stringvalue)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)
publicFunctionDeclaration.BuildersetNameBytes(ByteStringvalue)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)
publicFunctionDeclaration.BuildersetParameters(Schemavalue)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.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
Schema |
| Returns | |
|---|---|
| Type | Description |
FunctionDeclaration.Builder |
|
setParameters(Schema.Builder builderForValue)
publicFunctionDeclaration.BuildersetParameters(Schema.BuilderbuilderForValue)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.vertexai.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)
publicFunctionDeclaration.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
FunctionDeclaration.Builder |
|
setResponse(Schema value)
publicFunctionDeclaration.BuildersetResponse(Schemavalue)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.vertexai.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
Schema |
| Returns | |
|---|---|
| Type | Description |
FunctionDeclaration.Builder |
|
setResponse(Schema.Builder builderForValue)
publicFunctionDeclaration.BuildersetResponse(Schema.BuilderbuilderForValue)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.vertexai.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Schema.Builder |
| Returns | |
|---|---|
| Type | Description |
FunctionDeclaration.Builder |
|
setUnknownFields(UnknownFieldSet unknownFields)
publicfinalFunctionDeclaration.BuildersetUnknownFields(UnknownFieldSetunknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
FunctionDeclaration.Builder |
|