Class FunctionDeclaration (3.44.0)

public final class FunctionDeclaration extends GeneratedMessageV3 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

Static Fields

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

PARAMETERS_FIELD_NUMBER

public static final int PARAMETERS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static FunctionDeclaration getDefaultInstance()
Returns
Type Description
FunctionDeclaration

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static FunctionDeclaration.Builder newBuilder()
Returns
Type Description
FunctionDeclaration.Builder

newBuilder(FunctionDeclaration prototype)

public static FunctionDeclaration.Builder newBuilder(FunctionDeclaration prototype)
Parameter
Name Description
prototype FunctionDeclaration
Returns
Type Description
FunctionDeclaration.Builder

parseDelimitedFrom(InputStream input)

public static FunctionDeclaration parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
FunctionDeclaration
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static FunctionDeclaration parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FunctionDeclaration
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static FunctionDeclaration parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
FunctionDeclaration
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static FunctionDeclaration parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FunctionDeclaration
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static FunctionDeclaration parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
FunctionDeclaration
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static FunctionDeclaration parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FunctionDeclaration
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static FunctionDeclaration parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
FunctionDeclaration
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static FunctionDeclaration parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FunctionDeclaration
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static FunctionDeclaration parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
FunctionDeclaration
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static FunctionDeclaration parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FunctionDeclaration
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static FunctionDeclaration parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
FunctionDeclaration
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static FunctionDeclaration parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FunctionDeclaration
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<FunctionDeclaration> parser()
Returns
Type Description
Parser<FunctionDeclaration>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public FunctionDeclaration getDefaultInstanceForType()
Returns
Type Description
FunctionDeclaration

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.

getName()

public 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];

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:

  • param1

.google.cloud.aiplatform.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Schema

The parameters.

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:

  • param1

.google.cloud.aiplatform.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SchemaOrBuilder

getParserForType()

public Parser<FunctionDeclaration> getParserForType()
Returns
Type Description
Parser<FunctionDeclaration>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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:

  • param1

.google.cloud.aiplatform.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the parameters field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public FunctionDeclaration.Builder newBuilderForType()
Returns
Type Description
FunctionDeclaration.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected FunctionDeclaration.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
FunctionDeclaration.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public FunctionDeclaration.Builder toBuilder()
Returns
Type Description
FunctionDeclaration.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException