Class PredictRequest.Builder (2.4.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public PredictRequest build()
Returns
TypeDescription
PredictRequest

buildPartial()

public PredictRequest buildPartial()
Returns
TypeDescription
PredictRequest

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public PredictRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
PredictRequest.Builder
Overrides

clearParams()

public PredictRequest.Builder clearParams()
Returns
TypeDescription
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
TypeDescription
PredictRequest.Builder

clone()

public PredictRequest.Builder clone()
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
boolean

getDefaultInstanceForType()

public PredictRequest getDefaultInstanceForType()
Returns
TypeDescription
PredictRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMutableParams()

public Map<String,String> getMutableParams()

Use alternate mutation accessors instead.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for name.

getParams()

public Map<String,String> getParams()

Use #getParamsMap() instead.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
keyString
defaultValueString
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the payload field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(PredictRequest other)

public PredictRequest.Builder mergeFrom(PredictRequest other)
Parameter
NameDescription
otherPredictRequest
Returns
TypeDescription
PredictRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final PredictRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valuesMap<String,String>
Returns
TypeDescription
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
NameDescription
keyString
valueString
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
PredictRequest.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

The name to set.

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

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
valueExamplePayload
Returns
TypeDescription
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
NameDescription
builderForValueExamplePayload.Builder
Returns
TypeDescription
PredictRequest.Builder

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

public PredictRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
PredictRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

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