Class PredictRequest (2.46.0)

public final class PredictRequest extends GeneratedMessageV3 implements PredictRequestOrBuilder

Request message for PredictionService.Predict.

Protobuf type google.cloud.automl.v1beta1.PredictRequest

Static Fields

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

PARAMS_FIELD_NUMBER

public static final int PARAMS_FIELD_NUMBER
Field Value
Type Description
int

PAYLOAD_FIELD_NUMBER

public static final int PAYLOAD_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static PredictRequest getDefaultInstance()
Returns
Type Description
PredictRequest

getDescriptor()

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

newBuilder()

public static PredictRequest.Builder newBuilder()
Returns
Type Description
PredictRequest.Builder

newBuilder(PredictRequest prototype)

public static PredictRequest.Builder newBuilder(PredictRequest prototype)
Parameter
Name Description
prototype PredictRequest
Returns
Type Description
PredictRequest.Builder

parseDelimitedFrom(InputStream input)

public static PredictRequest parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
PredictRequest
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static PredictRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PredictRequest
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static PredictRequest parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
PredictRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static PredictRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PredictRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static PredictRequest parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
PredictRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static PredictRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PredictRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static PredictRequest parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
PredictRequest
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static PredictRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PredictRequest
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static PredictRequest parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
PredictRequest
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static PredictRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PredictRequest
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static PredictRequest parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
PredictRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static PredictRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PredictRequest
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<PredictRequest> parser()
Returns
Type Description
Parser<PredictRequest>

Methods

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

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public PredictRequest getDefaultInstanceForType()
Returns
Type Description
PredictRequest

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

getParserForType()

public Parser<PredictRequest> getParserForType()
Returns
Type Description
Parser<PredictRequest>
Overrides

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.

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

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.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected PredictRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
PredictRequest.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException