Class PredictResponse.Builder (3.56.0)

public static final class PredictResponse.Builder extends GeneratedMessageV3.Builder<PredictResponse.Builder> implements PredictResponseOrBuilder

Response message for PredictionService.Predict.

Protobuf type google.cloud.aiplatform.v1.PredictResponse

Static Methods

getDescriptor()

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

Methods

addAllPredictions(Iterable<? extends Value> values)

public PredictResponse.Builder addAllPredictions(Iterable<? extends Value> values)

The predictions that are the output of the predictions call. The schema of any single prediction may be specified via Endpoint's DeployedModels' Model's PredictSchemata's prediction_schema_uri.

repeated .google.protobuf.Value predictions = 1;

Parameter
Name Description
values Iterable<? extends com.google.protobuf.Value>
Returns
Type Description
PredictResponse.Builder

addPredictions(Value value)

public PredictResponse.Builder addPredictions(Value value)

The predictions that are the output of the predictions call. The schema of any single prediction may be specified via Endpoint's DeployedModels' Model's PredictSchemata's prediction_schema_uri.

repeated .google.protobuf.Value predictions = 1;

Parameter
Name Description
value Value
Returns
Type Description
PredictResponse.Builder

addPredictions(Value.Builder builderForValue)

public PredictResponse.Builder addPredictions(Value.Builder builderForValue)

The predictions that are the output of the predictions call. The schema of any single prediction may be specified via Endpoint's DeployedModels' Model's PredictSchemata's prediction_schema_uri.

repeated .google.protobuf.Value predictions = 1;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
PredictResponse.Builder

addPredictions(int index, Value value)

public PredictResponse.Builder addPredictions(int index, Value value)

The predictions that are the output of the predictions call. The schema of any single prediction may be specified via Endpoint's DeployedModels' Model's PredictSchemata's prediction_schema_uri.

repeated .google.protobuf.Value predictions = 1;

Parameters
Name Description
index int
value Value
Returns
Type Description
PredictResponse.Builder

addPredictions(int index, Value.Builder builderForValue)

public PredictResponse.Builder addPredictions(int index, Value.Builder builderForValue)

The predictions that are the output of the predictions call. The schema of any single prediction may be specified via Endpoint's DeployedModels' Model's PredictSchemata's prediction_schema_uri.

repeated .google.protobuf.Value predictions = 1;

Parameters
Name Description
index int
builderForValue Builder
Returns
Type Description
PredictResponse.Builder

addPredictionsBuilder()

public Value.Builder addPredictionsBuilder()

The predictions that are the output of the predictions call. The schema of any single prediction may be specified via Endpoint's DeployedModels' Model's PredictSchemata's prediction_schema_uri.

repeated .google.protobuf.Value predictions = 1;

Returns
Type Description
Builder

addPredictionsBuilder(int index)

public Value.Builder addPredictionsBuilder(int index)

The predictions that are the output of the predictions call. The schema of any single prediction may be specified via Endpoint's DeployedModels' Model's PredictSchemata's prediction_schema_uri.

repeated .google.protobuf.Value predictions = 1;

Parameter
Name Description
index int
Returns
Type Description
Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public PredictResponse build()
Returns
Type Description
PredictResponse

buildPartial()

public PredictResponse buildPartial()
Returns
Type Description
PredictResponse

clear()

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

clearDeployedModelId()

public PredictResponse.Builder clearDeployedModelId()

ID of the Endpoint's DeployedModel that served this prediction.

string deployed_model_id = 2;

Returns
Type Description
PredictResponse.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearMetadata()

public PredictResponse.Builder clearMetadata()

Output only. Request-level metadata returned by the model. The metadata type will be dependent upon the model implementation.

.google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
PredictResponse.Builder

clearModel()

public PredictResponse.Builder clearModel()

Output only. The resource name of the Model which is deployed as the DeployedModel that this prediction hits.

string model = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
PredictResponse.Builder

This builder for chaining.

clearModelDisplayName()

public PredictResponse.Builder clearModelDisplayName()

Output only. The display name of the Model which is deployed as the DeployedModel that this prediction hits.

string model_display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
PredictResponse.Builder

This builder for chaining.

clearModelVersionId()

public PredictResponse.Builder clearModelVersionId()

Output only. The version ID of the Model which is deployed as the DeployedModel that this prediction hits.

string model_version_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
PredictResponse.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPredictions()

public PredictResponse.Builder clearPredictions()

The predictions that are the output of the predictions call. The schema of any single prediction may be specified via Endpoint's DeployedModels' Model's PredictSchemata's prediction_schema_uri.

repeated .google.protobuf.Value predictions = 1;

Returns
Type Description
PredictResponse.Builder

clone()

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

getDefaultInstanceForType()

public PredictResponse getDefaultInstanceForType()
Returns
Type Description
PredictResponse

getDeployedModelId()

public String getDeployedModelId()

ID of the Endpoint's DeployedModel that served this prediction.

string deployed_model_id = 2;

Returns
Type Description
String

The deployedModelId.

getDeployedModelIdBytes()

public ByteString getDeployedModelIdBytes()

ID of the Endpoint's DeployedModel that served this prediction.

string deployed_model_id = 2;

Returns
Type Description
ByteString

The bytes for deployedModelId.

getDescriptorForType()

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

getMetadata()

public Value getMetadata()

Output only. Request-level metadata returned by the model. The metadata type will be dependent upon the model implementation.

.google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Value

The metadata.

getMetadataBuilder()

public Value.Builder getMetadataBuilder()

Output only. Request-level metadata returned by the model. The metadata type will be dependent upon the model implementation.

.google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getMetadataOrBuilder()

public ValueOrBuilder getMetadataOrBuilder()

Output only. Request-level metadata returned by the model. The metadata type will be dependent upon the model implementation.

.google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ValueOrBuilder

getModel()

public String getModel()

Output only. The resource name of the Model which is deployed as the DeployedModel that this prediction hits.

string model = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The model.

getModelBytes()

public ByteString getModelBytes()

Output only. The resource name of the Model which is deployed as the DeployedModel that this prediction hits.

string model = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for model.

getModelDisplayName()

public String getModelDisplayName()

Output only. The display name of the Model which is deployed as the DeployedModel that this prediction hits.

string model_display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The modelDisplayName.

getModelDisplayNameBytes()

public ByteString getModelDisplayNameBytes()

Output only. The display name of the Model which is deployed as the DeployedModel that this prediction hits.

string model_display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for modelDisplayName.

getModelVersionId()

public String getModelVersionId()

Output only. The version ID of the Model which is deployed as the DeployedModel that this prediction hits.

string model_version_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The modelVersionId.

getModelVersionIdBytes()

public ByteString getModelVersionIdBytes()

Output only. The version ID of the Model which is deployed as the DeployedModel that this prediction hits.

string model_version_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for modelVersionId.

getPredictions(int index)

public Value getPredictions(int index)

The predictions that are the output of the predictions call. The schema of any single prediction may be specified via Endpoint's DeployedModels' Model's PredictSchemata's prediction_schema_uri.

repeated .google.protobuf.Value predictions = 1;

Parameter
Name Description
index int
Returns
Type Description
Value

getPredictionsBuilder(int index)

public Value.Builder getPredictionsBuilder(int index)

The predictions that are the output of the predictions call. The schema of any single prediction may be specified via Endpoint's DeployedModels' Model's PredictSchemata's prediction_schema_uri.

repeated .google.protobuf.Value predictions = 1;

Parameter
Name Description
index int
Returns
Type Description
Builder

getPredictionsBuilderList()

public List<Value.Builder> getPredictionsBuilderList()

The predictions that are the output of the predictions call. The schema of any single prediction may be specified via Endpoint's DeployedModels' Model's PredictSchemata's prediction_schema_uri.

repeated .google.protobuf.Value predictions = 1;

Returns
Type Description
List<Builder>

getPredictionsCount()

public int getPredictionsCount()

The predictions that are the output of the predictions call. The schema of any single prediction may be specified via Endpoint's DeployedModels' Model's PredictSchemata's prediction_schema_uri.

repeated .google.protobuf.Value predictions = 1;

Returns
Type Description
int

getPredictionsList()

public List<Value> getPredictionsList()

The predictions that are the output of the predictions call. The schema of any single prediction may be specified via Endpoint's DeployedModels' Model's PredictSchemata's prediction_schema_uri.

repeated .google.protobuf.Value predictions = 1;

Returns
Type Description
List<Value>

getPredictionsOrBuilder(int index)

public ValueOrBuilder getPredictionsOrBuilder(int index)

The predictions that are the output of the predictions call. The schema of any single prediction may be specified via Endpoint's DeployedModels' Model's PredictSchemata's prediction_schema_uri.

repeated .google.protobuf.Value predictions = 1;

Parameter
Name Description
index int
Returns
Type Description
ValueOrBuilder

getPredictionsOrBuilderList()

public List<? extends ValueOrBuilder> getPredictionsOrBuilderList()

The predictions that are the output of the predictions call. The schema of any single prediction may be specified via Endpoint's DeployedModels' Model's PredictSchemata's prediction_schema_uri.

repeated .google.protobuf.Value predictions = 1;

Returns
Type Description
List<? extends com.google.protobuf.ValueOrBuilder>

hasMetadata()

public boolean hasMetadata()

Output only. Request-level metadata returned by the model. The metadata type will be dependent upon the model implementation.

.google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the metadata field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(PredictResponse other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeMetadata(Value value)

public PredictResponse.Builder mergeMetadata(Value value)

Output only. Request-level metadata returned by the model. The metadata type will be dependent upon the model implementation.

.google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Value
Returns
Type Description
PredictResponse.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removePredictions(int index)

public PredictResponse.Builder removePredictions(int index)

The predictions that are the output of the predictions call. The schema of any single prediction may be specified via Endpoint's DeployedModels' Model's PredictSchemata's prediction_schema_uri.

repeated .google.protobuf.Value predictions = 1;

Parameter
Name Description
index int
Returns
Type Description
PredictResponse.Builder

setDeployedModelId(String value)

public PredictResponse.Builder setDeployedModelId(String value)

ID of the Endpoint's DeployedModel that served this prediction.

string deployed_model_id = 2;

Parameter
Name Description
value String

The deployedModelId to set.

Returns
Type Description
PredictResponse.Builder

This builder for chaining.

setDeployedModelIdBytes(ByteString value)

public PredictResponse.Builder setDeployedModelIdBytes(ByteString value)

ID of the Endpoint's DeployedModel that served this prediction.

string deployed_model_id = 2;

Parameter
Name Description
value ByteString

The bytes for deployedModelId to set.

Returns
Type Description
PredictResponse.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setMetadata(Value value)

public PredictResponse.Builder setMetadata(Value value)

Output only. Request-level metadata returned by the model. The metadata type will be dependent upon the model implementation.

.google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Value
Returns
Type Description
PredictResponse.Builder

setMetadata(Value.Builder builderForValue)

public PredictResponse.Builder setMetadata(Value.Builder builderForValue)

Output only. Request-level metadata returned by the model. The metadata type will be dependent upon the model implementation.

.google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
PredictResponse.Builder

setModel(String value)

public PredictResponse.Builder setModel(String value)

Output only. The resource name of the Model which is deployed as the DeployedModel that this prediction hits.

string model = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The model to set.

Returns
Type Description
PredictResponse.Builder

This builder for chaining.

setModelBytes(ByteString value)

public PredictResponse.Builder setModelBytes(ByteString value)

Output only. The resource name of the Model which is deployed as the DeployedModel that this prediction hits.

string model = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for model to set.

Returns
Type Description
PredictResponse.Builder

This builder for chaining.

setModelDisplayName(String value)

public PredictResponse.Builder setModelDisplayName(String value)

Output only. The display name of the Model which is deployed as the DeployedModel that this prediction hits.

string model_display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The modelDisplayName to set.

Returns
Type Description
PredictResponse.Builder

This builder for chaining.

setModelDisplayNameBytes(ByteString value)

public PredictResponse.Builder setModelDisplayNameBytes(ByteString value)

Output only. The display name of the Model which is deployed as the DeployedModel that this prediction hits.

string model_display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for modelDisplayName to set.

Returns
Type Description
PredictResponse.Builder

This builder for chaining.

setModelVersionId(String value)

public PredictResponse.Builder setModelVersionId(String value)

Output only. The version ID of the Model which is deployed as the DeployedModel that this prediction hits.

string model_version_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The modelVersionId to set.

Returns
Type Description
PredictResponse.Builder

This builder for chaining.

setModelVersionIdBytes(ByteString value)

public PredictResponse.Builder setModelVersionIdBytes(ByteString value)

Output only. The version ID of the Model which is deployed as the DeployedModel that this prediction hits.

string model_version_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for modelVersionId to set.

Returns
Type Description
PredictResponse.Builder

This builder for chaining.

setPredictions(int index, Value value)

public PredictResponse.Builder setPredictions(int index, Value value)

The predictions that are the output of the predictions call. The schema of any single prediction may be specified via Endpoint's DeployedModels' Model's PredictSchemata's prediction_schema_uri.

repeated .google.protobuf.Value predictions = 1;

Parameters
Name Description
index int
value Value
Returns
Type Description
PredictResponse.Builder

setPredictions(int index, Value.Builder builderForValue)

public PredictResponse.Builder setPredictions(int index, Value.Builder builderForValue)

The predictions that are the output of the predictions call. The schema of any single prediction may be specified via Endpoint's DeployedModels' Model's PredictSchemata's prediction_schema_uri.

repeated .google.protobuf.Value predictions = 1;

Parameters
Name Description
index int
builderForValue Builder
Returns
Type Description
PredictResponse.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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