Starting April 29, 2025, Gemini 1.5 Pro and Gemini 1.5 Flash models are not available in projects that have no prior usage of these models, including new projects. For details, see Model versions and lifecycle.
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];
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];
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:
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:
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.
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.
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:
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Interface FunctionDeclarationOrBuilder (1.32.0)\n\n public interface FunctionDeclarationOrBuilder extends MessageOrBuilder\n\nImplements\n----------\n\n[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)\n\nMethods\n-------\n\n### getDescription()\n\n public abstract String getDescription()\n\nOptional. Description and purpose of the function.\nModel uses it to decide how and whether to call the function.\n\n`string description = 2 [(.google.api.field_behavior) = OPTIONAL];`\n\n### getDescriptionBytes()\n\n public abstract ByteString getDescriptionBytes()\n\nOptional. Description and purpose of the function.\nModel uses it to decide how and whether to call the function.\n\n`string description = 2 [(.google.api.field_behavior) = OPTIONAL];`\n\n### getName()\n\n public abstract String getName()\n\nRequired. The name of the function to call.\nMust start with a letter or an underscore.\nMust be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a\nmaximum length of 64.\n\n`string name = 1 [(.google.api.field_behavior) = REQUIRED];`\n\n### getNameBytes()\n\n public abstract ByteString getNameBytes()\n\nRequired. The name of the function to call.\nMust start with a letter or an underscore.\nMust be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a\nmaximum length of 64.\n\n`string name = 1 [(.google.api.field_behavior) = REQUIRED];`\n\n### getParameters()\n\n public abstract Schema getParameters()\n\nOptional. Describes the parameters to this function in JSON Schema Object\nformat. Reflects the Open API 3.03 Parameter Object. string Key: the name\nof the parameter. Parameter names are case sensitive. Schema Value: the\nSchema defining the type used for the parameter. For function with no\nparameters, this can be left unset. Parameter names must start with a\nletter or an underscore and must only contain chars a-z, A-Z, 0-9, or\nunderscores with a maximum length of 64. Example with 1 required and 1\noptional parameter: type: OBJECT properties:\nparam1:\ntype: STRING\nparam2:\ntype: INTEGER\nrequired:\n\n- param1\n\n`\n.google.cloud.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];\n`\n\n### getParametersOrBuilder()\n\n public abstract SchemaOrBuilder getParametersOrBuilder()\n\nOptional. Describes the parameters to this function in JSON Schema Object\nformat. Reflects the Open API 3.03 Parameter Object. string Key: the name\nof the parameter. Parameter names are case sensitive. Schema Value: the\nSchema defining the type used for the parameter. For function with no\nparameters, this can be left unset. Parameter names must start with a\nletter or an underscore and must only contain chars a-z, A-Z, 0-9, or\nunderscores with a maximum length of 64. Example with 1 required and 1\noptional parameter: type: OBJECT properties:\nparam1:\ntype: STRING\nparam2:\ntype: INTEGER\nrequired:\n\n- param1\n\n`\n.google.cloud.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];\n`\n\n### getResponse()\n\n public abstract Schema getResponse()\n\nOptional. Describes the output from this function in JSON Schema format.\nReflects the Open API 3.03 Response Object. The Schema defines the type\nused for the response value of the function.\n\n`.google.cloud.vertexai.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL];\n`\n\n### getResponseOrBuilder()\n\n public abstract SchemaOrBuilder getResponseOrBuilder()\n\nOptional. Describes the output from this function in JSON Schema format.\nReflects the Open API 3.03 Response Object. The Schema defines the type\nused for the response value of the function.\n\n`.google.cloud.vertexai.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL];\n`\n\n### hasParameters()\n\n public abstract boolean hasParameters()\n\nOptional. Describes the parameters to this function in JSON Schema Object\nformat. Reflects the Open API 3.03 Parameter Object. string Key: the name\nof the parameter. Parameter names are case sensitive. Schema Value: the\nSchema defining the type used for the parameter. For function with no\nparameters, this can be left unset. Parameter names must start with a\nletter or an underscore and must only contain chars a-z, A-Z, 0-9, or\nunderscores with a maximum length of 64. Example with 1 required and 1\noptional parameter: type: OBJECT properties:\nparam1:\ntype: STRING\nparam2:\ntype: INTEGER\nrequired:\n\n- param1\n\n`\n.google.cloud.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];\n`\n\n### hasResponse()\n\n public abstract boolean hasResponse()\n\nOptional. Describes the output from this function in JSON Schema format.\nReflects the Open API 3.03 Response Object. The Schema defines the type\nused for the response value of the function.\n\n`.google.cloud.vertexai.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL];\n`"]]