Class FunctionResponse.Builder (3.54.0)

public static final class FunctionResponse.Builder extends GeneratedMessageV3.Builder<FunctionResponse.Builder> implements FunctionResponseOrBuilder

The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a [FunctionCall] made based on model prediction.

Protobuf type google.cloud.aiplatform.v1.FunctionResponse

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public FunctionResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
FunctionResponse.Builder
Overrides

build()

public FunctionResponse build()
Returns
Type Description
FunctionResponse

buildPartial()

public FunctionResponse buildPartial()
Returns
Type Description
FunctionResponse

clear()

public FunctionResponse.Builder clear()
Returns
Type Description
FunctionResponse.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public FunctionResponse.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
FunctionResponse.Builder
Overrides

clearName()

public FunctionResponse.Builder clearName()

Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name].

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

Returns
Type Description
FunctionResponse.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public FunctionResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
FunctionResponse.Builder
Overrides

clearResponse()

public FunctionResponse.Builder clearResponse()

Required. The function response in JSON object format.

.google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
FunctionResponse.Builder

clone()

public FunctionResponse.Builder clone()
Returns
Type Description
FunctionResponse.Builder
Overrides

getDefaultInstanceForType()

public FunctionResponse getDefaultInstanceForType()
Returns
Type Description
FunctionResponse

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getName()

public String getName()

Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name].

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. Matches [FunctionDeclaration.name] and [FunctionCall.name].

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

Returns
Type Description
ByteString

The bytes for name.

getResponse()

public Struct getResponse()

Required. The function response in JSON object format.

.google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Struct

The response.

getResponseBuilder()

public Struct.Builder getResponseBuilder()

Required. The function response in JSON object format.

.google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Builder

getResponseOrBuilder()

public StructOrBuilder getResponseOrBuilder()

Required. The function response in JSON object format.

.google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
StructOrBuilder

hasResponse()

public boolean hasResponse()

Required. The function response in JSON object format.

.google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the response field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(FunctionResponse other)

public FunctionResponse.Builder mergeFrom(FunctionResponse other)
Parameter
Name Description
other FunctionResponse
Returns
Type Description
FunctionResponse.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public FunctionResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FunctionResponse.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public FunctionResponse.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
FunctionResponse.Builder
Overrides

mergeResponse(Struct value)

public FunctionResponse.Builder mergeResponse(Struct value)

Required. The function response in JSON object format.

.google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Struct
Returns
Type Description
FunctionResponse.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final FunctionResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
FunctionResponse.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public FunctionResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
FunctionResponse.Builder
Overrides

setName(String value)

public FunctionResponse.Builder setName(String value)

Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name].

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
FunctionResponse.Builder

This builder for chaining.

setNameBytes(ByteString value)

public FunctionResponse.Builder setNameBytes(ByteString value)

Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name].

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
FunctionResponse.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public FunctionResponse.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
FunctionResponse.Builder
Overrides

setResponse(Struct value)

public FunctionResponse.Builder setResponse(Struct value)

Required. The function response in JSON object format.

.google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Struct
Returns
Type Description
FunctionResponse.Builder

setResponse(Struct.Builder builderForValue)

public FunctionResponse.Builder setResponse(Struct.Builder builderForValue)

Required. The function response in JSON object format.

.google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
FunctionResponse.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final FunctionResponse.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
FunctionResponse.Builder
Overrides