Class FunctionResponse.Builder (3.37.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.v1beta1.FunctionResponse

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public FunctionResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
FunctionResponse.Builder
Overrides

build()

public FunctionResponse build()
Returns
TypeDescription
FunctionResponse

buildPartial()

public FunctionResponse buildPartial()
Returns
TypeDescription
FunctionResponse

clear()

public FunctionResponse.Builder clear()
Returns
TypeDescription
FunctionResponse.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public FunctionResponse.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
FunctionResponse.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public FunctionResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
FunctionResponse.Builder

clone()

public FunctionResponse.Builder clone()
Returns
TypeDescription
FunctionResponse.Builder
Overrides

getDefaultInstanceForType()

public FunctionResponse getDefaultInstanceForType()
Returns
TypeDescription
FunctionResponse

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
Builder

getResponseOrBuilder()

public StructOrBuilder getResponseOrBuilder()

Required. The function response in JSON object format.

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

Returns
TypeDescription
StructOrBuilder

hasResponse()

public boolean hasResponse()

Required. The function response in JSON object format.

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

Returns
TypeDescription
boolean

Whether the response field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(FunctionResponse other)

public FunctionResponse.Builder mergeFrom(FunctionResponse other)
Parameter
NameDescription
otherFunctionResponse
Returns
TypeDescription
FunctionResponse.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public FunctionResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FunctionResponse.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public FunctionResponse.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueStruct
Returns
TypeDescription
FunctionResponse.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final FunctionResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
FunctionResponse.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public FunctionResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The name to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueStruct
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
FunctionResponse.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final FunctionResponse.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
FunctionResponse.Builder
Overrides