public final class PredictResponse extends com.google.protobuf.GeneratedMessageV3 implements PredictResponseOrBuilder
Response message for [PredictionService.Predict][google.cloud.automl.v1.PredictionService.Predict].Protobuf type
google.cloud.automl.v1.PredictResponse| Modifier and Type | Class and Description |
|---|---|
static class |
PredictResponse.Builder
Response message for [PredictionService.Predict][google.cloud.automl.v1.PredictionService.Predict].
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
METADATA_FIELD_NUMBER |
static int |
PAYLOAD_FIELD_NUMBER |
static int |
PREPROCESSED_INPUT_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsMetadata(String key)
Additional domain-specific prediction response metadata.
|
boolean |
equals(Object obj) |
static PredictResponse |
getDefaultInstance() |
PredictResponse |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
Map<String,String> |
getMetadata()
Deprecated.
|
int |
getMetadataCount()
Additional domain-specific prediction response metadata.
|
Map<String,String> |
getMetadataMap()
Additional domain-specific prediction response metadata.
|
String |
getMetadataOrDefault(String key,
String defaultValue)
Additional domain-specific prediction response metadata.
|
String |
getMetadataOrThrow(String key)
Additional domain-specific prediction response metadata.
|
com.google.protobuf.Parser<PredictResponse> |
getParserForType() |
AnnotationPayload |
getPayload(int index)
Prediction result.
|
int |
getPayloadCount()
Prediction result.
|
List<AnnotationPayload> |
getPayloadList()
Prediction result.
|
AnnotationPayloadOrBuilder |
getPayloadOrBuilder(int index)
Prediction result.
|
List<? extends AnnotationPayloadOrBuilder> |
getPayloadOrBuilderList()
Prediction result.
|
ExamplePayload |
getPreprocessedInput()
The preprocessed example that AutoML actually makes prediction on.
|
ExamplePayloadOrBuilder |
getPreprocessedInputOrBuilder()
The preprocessed example that AutoML actually makes prediction on.
|
int |
getSerializedSize() |
int |
hashCode() |
boolean |
hasPreprocessedInput()
The preprocessed example that AutoML actually makes prediction on.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected com.google.protobuf.MapFieldReflectionAccessor |
internalGetMapFieldReflection(int number) |
boolean |
isInitialized() |
static PredictResponse.Builder |
newBuilder() |
static PredictResponse.Builder |
newBuilder(PredictResponse prototype) |
PredictResponse.Builder |
newBuilderForType() |
protected PredictResponse.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static PredictResponse |
parseDelimitedFrom(InputStream input) |
static PredictResponse |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PredictResponse |
parseFrom(byte[] data) |
static PredictResponse |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PredictResponse |
parseFrom(ByteBuffer data) |
static PredictResponse |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PredictResponse |
parseFrom(com.google.protobuf.ByteString data) |
static PredictResponse |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PredictResponse |
parseFrom(com.google.protobuf.CodedInputStream input) |
static PredictResponse |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PredictResponse |
parseFrom(InputStream input) |
static PredictResponse |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<PredictResponse> |
parser() |
PredictResponse.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int PAYLOAD_FIELD_NUMBER
public static final int PREPROCESSED_INPUT_FIELD_NUMBER
public static final int METADATA_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessageV3protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public List<AnnotationPayload> getPayloadList()
Prediction result. AutoML Translation and AutoML Natural Language Sentiment Analysis return precisely one payload.
repeated .google.cloud.automl.v1.AnnotationPayload payload = 1;getPayloadList in interface PredictResponseOrBuilderpublic List<? extends AnnotationPayloadOrBuilder> getPayloadOrBuilderList()
Prediction result. AutoML Translation and AutoML Natural Language Sentiment Analysis return precisely one payload.
repeated .google.cloud.automl.v1.AnnotationPayload payload = 1;getPayloadOrBuilderList in interface PredictResponseOrBuilderpublic int getPayloadCount()
Prediction result. AutoML Translation and AutoML Natural Language Sentiment Analysis return precisely one payload.
repeated .google.cloud.automl.v1.AnnotationPayload payload = 1;getPayloadCount in interface PredictResponseOrBuilderpublic AnnotationPayload getPayload(int index)
Prediction result. AutoML Translation and AutoML Natural Language Sentiment Analysis return precisely one payload.
repeated .google.cloud.automl.v1.AnnotationPayload payload = 1;getPayload in interface PredictResponseOrBuilderpublic AnnotationPayloadOrBuilder getPayloadOrBuilder(int index)
Prediction result. AutoML Translation and AutoML Natural Language Sentiment Analysis return precisely one payload.
repeated .google.cloud.automl.v1.AnnotationPayload payload = 1;getPayloadOrBuilder in interface PredictResponseOrBuilderpublic boolean hasPreprocessedInput()
The preprocessed example that AutoML actually makes prediction on. Empty if AutoML does not preprocess the input example. For AutoML Natural Language (Classification, Entity Extraction, and Sentiment Analysis), if the input is a document, the recognized text is returned in the [document_text][google.cloud.automl.v1.Document.document_text] property.
.google.cloud.automl.v1.ExamplePayload preprocessed_input = 3;hasPreprocessedInput in interface PredictResponseOrBuilderpublic ExamplePayload getPreprocessedInput()
The preprocessed example that AutoML actually makes prediction on. Empty if AutoML does not preprocess the input example. For AutoML Natural Language (Classification, Entity Extraction, and Sentiment Analysis), if the input is a document, the recognized text is returned in the [document_text][google.cloud.automl.v1.Document.document_text] property.
.google.cloud.automl.v1.ExamplePayload preprocessed_input = 3;getPreprocessedInput in interface PredictResponseOrBuilderpublic ExamplePayloadOrBuilder getPreprocessedInputOrBuilder()
The preprocessed example that AutoML actually makes prediction on. Empty if AutoML does not preprocess the input example. For AutoML Natural Language (Classification, Entity Extraction, and Sentiment Analysis), if the input is a document, the recognized text is returned in the [document_text][google.cloud.automl.v1.Document.document_text] property.
.google.cloud.automl.v1.ExamplePayload preprocessed_input = 3;getPreprocessedInputOrBuilder in interface PredictResponseOrBuilderpublic int getMetadataCount()
PredictResponseOrBuilderAdditional domain-specific prediction response metadata. AutoML Vision Object Detection `max_bounding_box_count` : (int64) The maximum number of bounding boxes to return per image. AutoML Natural Language Sentiment Analysis `sentiment_score` : (float, deprecated) A value between -1 and 1, -1 maps to least positive sentiment, while 1 maps to the most positive one and the higher the score, the more positive the sentiment in the document is. Yet these values are relative to the training data, so e.g. if all data was positive then -1 is also positive (though the least). `sentiment_score` is not the same as "score" and "magnitude" from Sentiment Analysis in the Natural Language API.
map<string, string> metadata = 2;getMetadataCount in interface PredictResponseOrBuilderpublic boolean containsMetadata(String key)
Additional domain-specific prediction response metadata. AutoML Vision Object Detection `max_bounding_box_count` : (int64) The maximum number of bounding boxes to return per image. AutoML Natural Language Sentiment Analysis `sentiment_score` : (float, deprecated) A value between -1 and 1, -1 maps to least positive sentiment, while 1 maps to the most positive one and the higher the score, the more positive the sentiment in the document is. Yet these values are relative to the training data, so e.g. if all data was positive then -1 is also positive (though the least). `sentiment_score` is not the same as "score" and "magnitude" from Sentiment Analysis in the Natural Language API.
map<string, string> metadata = 2;containsMetadata in interface PredictResponseOrBuilder@Deprecated public Map<String,String> getMetadata()
getMetadataMap() instead.getMetadata in interface PredictResponseOrBuilderpublic Map<String,String> getMetadataMap()
Additional domain-specific prediction response metadata. AutoML Vision Object Detection `max_bounding_box_count` : (int64) The maximum number of bounding boxes to return per image. AutoML Natural Language Sentiment Analysis `sentiment_score` : (float, deprecated) A value between -1 and 1, -1 maps to least positive sentiment, while 1 maps to the most positive one and the higher the score, the more positive the sentiment in the document is. Yet these values are relative to the training data, so e.g. if all data was positive then -1 is also positive (though the least). `sentiment_score` is not the same as "score" and "magnitude" from Sentiment Analysis in the Natural Language API.
map<string, string> metadata = 2;getMetadataMap in interface PredictResponseOrBuilderpublic String getMetadataOrDefault(String key, String defaultValue)
Additional domain-specific prediction response metadata. AutoML Vision Object Detection `max_bounding_box_count` : (int64) The maximum number of bounding boxes to return per image. AutoML Natural Language Sentiment Analysis `sentiment_score` : (float, deprecated) A value between -1 and 1, -1 maps to least positive sentiment, while 1 maps to the most positive one and the higher the score, the more positive the sentiment in the document is. Yet these values are relative to the training data, so e.g. if all data was positive then -1 is also positive (though the least). `sentiment_score` is not the same as "score" and "magnitude" from Sentiment Analysis in the Natural Language API.
map<string, string> metadata = 2;getMetadataOrDefault in interface PredictResponseOrBuilderpublic String getMetadataOrThrow(String key)
Additional domain-specific prediction response metadata. AutoML Vision Object Detection `max_bounding_box_count` : (int64) The maximum number of bounding boxes to return per image. AutoML Natural Language Sentiment Analysis `sentiment_score` : (float, deprecated) A value between -1 and 1, -1 maps to least positive sentiment, while 1 maps to the most positive one and the higher the score, the more positive the sentiment in the document is. Yet these values are relative to the training data, so e.g. if all data was positive then -1 is also positive (though the least). `sentiment_score` is not the same as "score" and "magnitude" from Sentiment Analysis in the Natural Language API.
map<string, string> metadata = 2;getMetadataOrThrow in interface PredictResponseOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static PredictResponse parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PredictResponse parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PredictResponse parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PredictResponse parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PredictResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PredictResponse parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PredictResponse parseFrom(InputStream input) throws IOException
IOExceptionpublic static PredictResponse parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static PredictResponse parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static PredictResponse parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static PredictResponse parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static PredictResponse parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic PredictResponse.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static PredictResponse.Builder newBuilder()
public static PredictResponse.Builder newBuilder(PredictResponse prototype)
public PredictResponse.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected PredictResponse.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static PredictResponse getDefaultInstance()
public static com.google.protobuf.Parser<PredictResponse> parser()
public com.google.protobuf.Parser<PredictResponse> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public PredictResponse getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2025 Google LLC. All rights reserved.