Class PredictRequest (2.17.0)

public final class PredictRequest extends GeneratedMessageV3 implements PredictRequestOrBuilder

Request message for PredictionService.Predict.

Protobuf type google.cloud.automl.v1.PredictRequest

Static Fields

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

PARAMS_FIELD_NUMBER

public static final int PARAMS_FIELD_NUMBER
Field Value
TypeDescription
int

PAYLOAD_FIELD_NUMBER

public static final int PAYLOAD_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static PredictRequest getDefaultInstance()
Returns
TypeDescription
PredictRequest

getDescriptor()

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

newBuilder()

public static PredictRequest.Builder newBuilder()
Returns
TypeDescription
PredictRequest.Builder

newBuilder(PredictRequest prototype)

public static PredictRequest.Builder newBuilder(PredictRequest prototype)
Parameter
NameDescription
prototypePredictRequest
Returns
TypeDescription
PredictRequest.Builder

parseDelimitedFrom(InputStream input)

public static PredictRequest parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
PredictRequest
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static PredictRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PredictRequest
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static PredictRequest parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
PredictRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static PredictRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PredictRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static PredictRequest parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
PredictRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static PredictRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PredictRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static PredictRequest parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
PredictRequest
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static PredictRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PredictRequest
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static PredictRequest parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
PredictRequest
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static PredictRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PredictRequest
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static PredictRequest parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
PredictRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static PredictRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PredictRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<PredictRequest> parser()
Returns
TypeDescription
Parser<PredictRequest>

Methods

containsParams(String key)

public boolean containsParams(String key)

Additional domain-specific parameters, any string must be up to 25000 characters long. AutoML Vision 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. AutoML Vision 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) The maximum number of bounding boxes returned. The default is 100. The number of returned bounding boxes might be limited by the server. AutoML Tables feature_importance : (boolean) Whether feature_importance is populated in the returned list of TablesAnnotation objects. The default is false.

map<string, string> params = 3;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public PredictRequest getDefaultInstanceForType()
Returns
TypeDescription
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
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. AutoML Vision 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. AutoML Vision 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) The maximum number of bounding boxes returned. The default is 100. The number of returned bounding boxes might be limited by the server. AutoML Tables feature_importance : (boolean) Whether feature_importance is populated in the returned list of TablesAnnotation objects. 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. AutoML Vision 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. AutoML Vision 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) The maximum number of bounding boxes returned. The default is 100. The number of returned bounding boxes might be limited by the server. AutoML Tables feature_importance : (boolean) Whether feature_importance is populated in the returned list of TablesAnnotation objects. 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. AutoML Vision 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. AutoML Vision 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) The maximum number of bounding boxes returned. The default is 100. The number of returned bounding boxes might be limited by the server. AutoML Tables feature_importance : (boolean) Whether feature_importance is populated in the returned list of TablesAnnotation objects. 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. AutoML Vision 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. AutoML Vision 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) The maximum number of bounding boxes returned. The default is 100. The number of returned bounding boxes might be limited by the server. AutoML Tables feature_importance : (boolean) Whether feature_importance is populated in the returned list of TablesAnnotation objects. The default is false.

map<string, string> params = 3;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getParserForType()

public Parser<PredictRequest> getParserForType()
Returns
TypeDescription
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.v1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
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.v1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ExamplePayloadOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
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.v1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
boolean

Whether the payload field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

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

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public PredictRequest.Builder newBuilderForType()
Returns
TypeDescription
PredictRequest.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected PredictRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
PredictRequest.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public PredictRequest.Builder toBuilder()
Returns
TypeDescription
PredictRequest.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException