Class PredictRequest.Builder (2.43.0)

public static final class PredictRequest.Builder extends GeneratedMessageV3.Builder<PredictRequest.Builder> implements PredictRequestOrBuilder

Request message for PredictionService.Predict.

Protobuf type google.cloud.automl.v1beta1.PredictRequest

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public PredictRequest build()
Returns
Type Description
PredictRequest

buildPartial()

public PredictRequest buildPartial()
Returns
Type Description
PredictRequest

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public PredictRequest.Builder clearName()

Required. Name of the model requested to serve the prediction.

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
PredictRequest.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearParams()

public PredictRequest.Builder clearParams()
Returns
Type Description
PredictRequest.Builder

clearPayload()

public PredictRequest.Builder clearPayload()

Required. Payload to perform a prediction on. The payload must match the problem type that the model was trained to solve.

.google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
PredictRequest.Builder

clone()

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

containsParams(String key)

public boolean containsParams(String key)

Additional domain-specific parameters, any string must be up to 25000 characters long.

  • For Image Classification:

    score_threshold - (float) A value from 0.0 to 1.0. When the model makes predictions for an image, it will only produce results that have at least this confidence score. The default is 0.5.

    • For Image Object Detection: score_threshold - (float) When Model detects objects on the image, it will only produce bounding boxes which have at least this confidence score. Value in 0 to 1 range, default is 0.5. max_bounding_box_count - (int64) No more than this number of bounding boxes will be returned in the response. Default is 100, the requested value may be limited by server.
  • For Tables: feature_imp<span>ortan</span>ce - (boolean) Whether feature importance should be populated in the returned TablesAnnotation. The default is false.

map<string, string> params = 3;

Parameter
Name Description
key String
Returns
Type Description
boolean

getDefaultInstanceForType()

public PredictRequest getDefaultInstanceForType()
Returns
Type Description
PredictRequest

getDescriptorForType()

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

getMutableParams() (deprecated)

public Map<String,String> getMutableParams()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getName()

public String getName()

Required. Name of the model requested to serve the prediction.

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Required. Name of the model requested to serve the prediction.

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for name.

getParams() (deprecated)

public Map<String,String> getParams()

Use #getParamsMap() instead.

Returns
Type Description
Map<String,String>

getParamsCount()

public int getParamsCount()

Additional domain-specific parameters, any string must be up to 25000 characters long.

  • For Image Classification:

    score_threshold - (float) A value from 0.0 to 1.0. When the model makes predictions for an image, it will only produce results that have at least this confidence score. The default is 0.5.

    • For Image Object Detection: score_threshold - (float) When Model detects objects on the image, it will only produce bounding boxes which have at least this confidence score. Value in 0 to 1 range, default is 0.5. max_bounding_box_count - (int64) No more than this number of bounding boxes will be returned in the response. Default is 100, the requested value may be limited by server.
  • For Tables: feature_imp<span>ortan</span>ce - (boolean) Whether feature importance should be populated in the returned TablesAnnotation. The default is false.

map<string, string> params = 3;

Returns
Type Description
int

getParamsMap()

public Map<String,String> getParamsMap()

Additional domain-specific parameters, any string must be up to 25000 characters long.

  • For Image Classification:

    score_threshold - (float) A value from 0.0 to 1.0. When the model makes predictions for an image, it will only produce results that have at least this confidence score. The default is 0.5.

    • For Image Object Detection: score_threshold - (float) When Model detects objects on the image, it will only produce bounding boxes which have at least this confidence score. Value in 0 to 1 range, default is 0.5. max_bounding_box_count - (int64) No more than this number of bounding boxes will be returned in the response. Default is 100, the requested value may be limited by server.
  • For Tables: feature_imp<span>ortan</span>ce - (boolean) Whether feature importance should be populated in the returned TablesAnnotation. The default is false.

map<string, string> params = 3;

Returns
Type Description
Map<String,String>

getParamsOrDefault(String key, String defaultValue)

public String getParamsOrDefault(String key, String defaultValue)

Additional domain-specific parameters, any string must be up to 25000 characters long.

  • For Image Classification:

    score_threshold - (float) A value from 0.0 to 1.0. When the model makes predictions for an image, it will only produce results that have at least this confidence score. The default is 0.5.

    • For Image Object Detection: score_threshold - (float) When Model detects objects on the image, it will only produce bounding boxes which have at least this confidence score. Value in 0 to 1 range, default is 0.5. max_bounding_box_count - (int64) No more than this number of bounding boxes will be returned in the response. Default is 100, the requested value may be limited by server.
  • For Tables: feature_imp<span>ortan</span>ce - (boolean) Whether feature importance should be populated in the returned TablesAnnotation. The default is false.

map<string, string> params = 3;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getParamsOrThrow(String key)

public String getParamsOrThrow(String key)

Additional domain-specific parameters, any string must be up to 25000 characters long.

  • For Image Classification:

    score_threshold - (float) A value from 0.0 to 1.0. When the model makes predictions for an image, it will only produce results that have at least this confidence score. The default is 0.5.

    • For Image Object Detection: score_threshold - (float) When Model detects objects on the image, it will only produce bounding boxes which have at least this confidence score. Value in 0 to 1 range, default is 0.5. max_bounding_box_count - (int64) No more than this number of bounding boxes will be returned in the response. Default is 100, the requested value may be limited by server.
  • For Tables: feature_imp<span>ortan</span>ce - (boolean) Whether feature importance should be populated in the returned TablesAnnotation. The default is false.

map<string, string> params = 3;

Parameter
Name Description
key String
Returns
Type Description
String

getPayload()

public ExamplePayload getPayload()

Required. Payload to perform a prediction on. The payload must match the problem type that the model was trained to solve.

.google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ExamplePayload

The payload.

getPayloadBuilder()

public ExamplePayload.Builder getPayloadBuilder()

Required. Payload to perform a prediction on. The payload must match the problem type that the model was trained to solve.

.google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ExamplePayload.Builder

getPayloadOrBuilder()

public ExamplePayloadOrBuilder getPayloadOrBuilder()

Required. Payload to perform a prediction on. The payload must match the problem type that the model was trained to solve.

.google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ExamplePayloadOrBuilder

hasPayload()

public boolean hasPayload()

Required. Payload to perform a prediction on. The payload must match the problem type that the model was trained to solve.

.google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the payload field is set.

internalGetFieldAccessorTable()

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

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(PredictRequest other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergePayload(ExamplePayload value)

public PredictRequest.Builder mergePayload(ExamplePayload value)

Required. Payload to perform a prediction on. The payload must match the problem type that the model was trained to solve.

.google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ExamplePayload
Returns
Type Description
PredictRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAllParams(Map<String,String> values)

public PredictRequest.Builder putAllParams(Map<String,String> values)

Additional domain-specific parameters, any string must be up to 25000 characters long.

  • For Image Classification:

    score_threshold - (float) A value from 0.0 to 1.0. When the model makes predictions for an image, it will only produce results that have at least this confidence score. The default is 0.5.

    • For Image Object Detection: score_threshold - (float) When Model detects objects on the image, it will only produce bounding boxes which have at least this confidence score. Value in 0 to 1 range, default is 0.5. max_bounding_box_count - (int64) No more than this number of bounding boxes will be returned in the response. Default is 100, the requested value may be limited by server.
  • For Tables: feature_imp<span>ortan</span>ce - (boolean) Whether feature importance should be populated in the returned TablesAnnotation. The default is false.

map<string, string> params = 3;

Parameter
Name Description
values Map<String,String>
Returns
Type Description
PredictRequest.Builder

putParams(String key, String value)

public PredictRequest.Builder putParams(String key, String value)

Additional domain-specific parameters, any string must be up to 25000 characters long.

  • For Image Classification:

    score_threshold - (float) A value from 0.0 to 1.0. When the model makes predictions for an image, it will only produce results that have at least this confidence score. The default is 0.5.

    • For Image Object Detection: score_threshold - (float) When Model detects objects on the image, it will only produce bounding boxes which have at least this confidence score. Value in 0 to 1 range, default is 0.5. max_bounding_box_count - (int64) No more than this number of bounding boxes will be returned in the response. Default is 100, the requested value may be limited by server.
  • For Tables: feature_imp<span>ortan</span>ce - (boolean) Whether feature importance should be populated in the returned TablesAnnotation. The default is false.

map<string, string> params = 3;

Parameters
Name Description
key String
value String
Returns
Type Description
PredictRequest.Builder

removeParams(String key)

public PredictRequest.Builder removeParams(String key)

Additional domain-specific parameters, any string must be up to 25000 characters long.

  • For Image Classification:

    score_threshold - (float) A value from 0.0 to 1.0. When the model makes predictions for an image, it will only produce results that have at least this confidence score. The default is 0.5.

    • For Image Object Detection: score_threshold - (float) When Model detects objects on the image, it will only produce bounding boxes which have at least this confidence score. Value in 0 to 1 range, default is 0.5. max_bounding_box_count - (int64) No more than this number of bounding boxes will be returned in the response. Default is 100, the requested value may be limited by server.
  • For Tables: feature_imp<span>ortan</span>ce - (boolean) Whether feature importance should be populated in the returned TablesAnnotation. The default is false.

map<string, string> params = 3;

Parameter
Name Description
key String
Returns
Type Description
PredictRequest.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public PredictRequest.Builder setName(String value)

Required. Name of the model requested to serve the prediction.

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The name to set.

Returns
Type Description
PredictRequest.Builder

This builder for chaining.

setNameBytes(ByteString value)

public PredictRequest.Builder setNameBytes(ByteString value)

Required. Name of the model requested to serve the prediction.

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
PredictRequest.Builder

This builder for chaining.

setPayload(ExamplePayload value)

public PredictRequest.Builder setPayload(ExamplePayload value)

Required. Payload to perform a prediction on. The payload must match the problem type that the model was trained to solve.

.google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ExamplePayload
Returns
Type Description
PredictRequest.Builder

setPayload(ExamplePayload.Builder builderForValue)

public PredictRequest.Builder setPayload(ExamplePayload.Builder builderForValue)

Required. Payload to perform a prediction on. The payload must match the problem type that the model was trained to solve.

.google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue ExamplePayload.Builder
Returns
Type Description
PredictRequest.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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