Class FunctionDeclaration (3.41.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
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

PARAMETERS_FIELD_NUMBER

public static final int PARAMETERS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static FunctionDeclaration getDefaultInstance()
Returns
TypeDescription
FunctionDeclaration

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static FunctionDeclaration.Builder newBuilder()
Returns
TypeDescription
FunctionDeclaration.Builder

newBuilder(FunctionDeclaration prototype)

public static FunctionDeclaration.Builder newBuilder(FunctionDeclaration prototype)
Parameter
NameDescription
prototypeFunctionDeclaration
Returns
TypeDescription
FunctionDeclaration.Builder

parseDelimitedFrom(InputStream input)

public static FunctionDeclaration parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
FunctionDeclaration
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static FunctionDeclaration parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FunctionDeclaration
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static FunctionDeclaration parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
FunctionDeclaration
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static FunctionDeclaration parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FunctionDeclaration
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static FunctionDeclaration parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
FunctionDeclaration
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static FunctionDeclaration parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FunctionDeclaration
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static FunctionDeclaration parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
FunctionDeclaration
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static FunctionDeclaration parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FunctionDeclaration
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static FunctionDeclaration parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
FunctionDeclaration
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static FunctionDeclaration parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FunctionDeclaration
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static FunctionDeclaration parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
FunctionDeclaration
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static FunctionDeclaration parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FunctionDeclaration
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<FunctionDeclaration> parser()
Returns
TypeDescription
Parser<FunctionDeclaration>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public FunctionDeclaration getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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 and dashes, with a maximum length of 64.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
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 and dashes, with a maximum length of 64.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
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. 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
TypeDescription
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. 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
TypeDescription
SchemaOrBuilder

getParserForType()

public Parser<FunctionDeclaration> getParserForType()
Returns
TypeDescription
Parser<FunctionDeclaration>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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. 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
TypeDescription
boolean

Whether the parameters field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public FunctionDeclaration.Builder newBuilderForType()
Returns
TypeDescription
FunctionDeclaration.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected FunctionDeclaration.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
FunctionDeclaration.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public FunctionDeclaration.Builder toBuilder()
Returns
TypeDescription
FunctionDeclaration.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException