Package com.google.cloud.automl.v1beta1
Class PredictResponse.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<PredictResponse.Builder>
com.google.cloud.automl.v1beta1.PredictResponse.Builder
- All Implemented Interfaces:
PredictResponseOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- PredictResponse
public static final class PredictResponse.Builder
extends com.google.protobuf.GeneratedMessage.Builder<PredictResponse.Builder>
implements PredictResponseOrBuilder
Response message for [PredictionService.Predict][google.cloud.automl.v1beta1.PredictionService.Predict].Protobuf type
google.cloud.automl.v1beta1.PredictResponse-
Method Summary
Modifier and TypeMethodDescriptionaddAllPayload(Iterable<? extends AnnotationPayload> values) Prediction result.addPayload(int index, AnnotationPayload value) Prediction result.addPayload(int index, AnnotationPayload.Builder builderForValue) Prediction result.addPayload(AnnotationPayload value) Prediction result.addPayload(AnnotationPayload.Builder builderForValue) Prediction result.Prediction result.addPayloadBuilder(int index) Prediction result.build()clear()Prediction result.The preprocessed example that AutoML actually makes prediction on.booleancontainsMetadata(String key) Additional domain-specific prediction response metadatastatic final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorDeprecated.intAdditional domain-specific prediction response metadataAdditional domain-specific prediction response metadatagetMetadataOrDefault(String key, String defaultValue) Additional domain-specific prediction response metadatagetMetadataOrThrow(String key) Additional domain-specific prediction response metadataDeprecated.getPayload(int index) Prediction result.getPayloadBuilder(int index) Prediction result.Prediction result.intPrediction result.Prediction result.getPayloadOrBuilder(int index) Prediction result.List<? extends AnnotationPayloadOrBuilder>Prediction result.The preprocessed example that AutoML actually makes prediction on.The preprocessed example that AutoML actually makes prediction on.The preprocessed example that AutoML actually makes prediction on.booleanThe preprocessed example that AutoML actually makes prediction on.protected com.google.protobuf.GeneratedMessage.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) protected com.google.protobuf.MapFieldReflectionAccessorinternalGetMutableMapFieldReflection(int number) final booleanmergeFrom(PredictResponse other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) The preprocessed example that AutoML actually makes prediction on.putAllMetadata(Map<String, String> values) Additional domain-specific prediction response metadataputMetadata(String key, String value) Additional domain-specific prediction response metadataremoveMetadata(String key) Additional domain-specific prediction response metadataremovePayload(int index) Prediction result.setPayload(int index, AnnotationPayload value) Prediction result.setPayload(int index, AnnotationPayload.Builder builderForValue) Prediction result.The preprocessed example that AutoML actually makes prediction on.setPreprocessedInput(ExamplePayload.Builder builderForValue) The preprocessed example that AutoML actually makes prediction on.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number) - Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<PredictResponse.Builder>
-
internalGetMutableMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number) - Overrides:
internalGetMutableMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<PredictResponse.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<PredictResponse.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<PredictResponse.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<PredictResponse.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<PredictResponse.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<PredictResponse.Builder>
-
mergeFrom
public PredictResponse.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<PredictResponse.Builder>- Throws:
IOException
-
getPayloadList
Prediction result. Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1;- Specified by:
getPayloadListin interfacePredictResponseOrBuilder
-
getPayloadCount
public int getPayloadCount()Prediction result. Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1;- Specified by:
getPayloadCountin interfacePredictResponseOrBuilder
-
getPayload
Prediction result. Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1;- Specified by:
getPayloadin interfacePredictResponseOrBuilder
-
setPayload
Prediction result. Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; -
setPayload
Prediction result. Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; -
addPayload
Prediction result. Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; -
addPayload
Prediction result. Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; -
addPayload
Prediction result. Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; -
addPayload
Prediction result. Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; -
addAllPayload
Prediction result. Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; -
clearPayload
Prediction result. Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; -
removePayload
Prediction result. Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; -
getPayloadBuilder
Prediction result. Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; -
getPayloadOrBuilder
Prediction result. Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1;- Specified by:
getPayloadOrBuilderin interfacePredictResponseOrBuilder
-
getPayloadOrBuilderList
Prediction result. Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1;- Specified by:
getPayloadOrBuilderListin interfacePredictResponseOrBuilder
-
addPayloadBuilder
Prediction result. Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; -
addPayloadBuilder
Prediction result. Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; -
getPayloadBuilderList
Prediction result. Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; -
hasPreprocessedInput
public boolean hasPreprocessedInput()The preprocessed example that AutoML actually makes prediction on. Empty if AutoML does not preprocess the input example. * For Text Extraction: If the input is a .pdf file, the OCR'ed text will be provided in [document_text][google.cloud.automl.v1beta1.Document.document_text].
.google.cloud.automl.v1beta1.ExamplePayload preprocessed_input = 3;- Specified by:
hasPreprocessedInputin interfacePredictResponseOrBuilder- Returns:
- Whether the preprocessedInput field is set.
-
getPreprocessedInput
The preprocessed example that AutoML actually makes prediction on. Empty if AutoML does not preprocess the input example. * For Text Extraction: If the input is a .pdf file, the OCR'ed text will be provided in [document_text][google.cloud.automl.v1beta1.Document.document_text].
.google.cloud.automl.v1beta1.ExamplePayload preprocessed_input = 3;- Specified by:
getPreprocessedInputin interfacePredictResponseOrBuilder- Returns:
- The preprocessedInput.
-
setPreprocessedInput
The preprocessed example that AutoML actually makes prediction on. Empty if AutoML does not preprocess the input example. * For Text Extraction: If the input is a .pdf file, the OCR'ed text will be provided in [document_text][google.cloud.automl.v1beta1.Document.document_text].
.google.cloud.automl.v1beta1.ExamplePayload preprocessed_input = 3; -
setPreprocessedInput
The preprocessed example that AutoML actually makes prediction on. Empty if AutoML does not preprocess the input example. * For Text Extraction: If the input is a .pdf file, the OCR'ed text will be provided in [document_text][google.cloud.automl.v1beta1.Document.document_text].
.google.cloud.automl.v1beta1.ExamplePayload preprocessed_input = 3; -
mergePreprocessedInput
The preprocessed example that AutoML actually makes prediction on. Empty if AutoML does not preprocess the input example. * For Text Extraction: If the input is a .pdf file, the OCR'ed text will be provided in [document_text][google.cloud.automl.v1beta1.Document.document_text].
.google.cloud.automl.v1beta1.ExamplePayload preprocessed_input = 3; -
clearPreprocessedInput
The preprocessed example that AutoML actually makes prediction on. Empty if AutoML does not preprocess the input example. * For Text Extraction: If the input is a .pdf file, the OCR'ed text will be provided in [document_text][google.cloud.automl.v1beta1.Document.document_text].
.google.cloud.automl.v1beta1.ExamplePayload preprocessed_input = 3; -
getPreprocessedInputBuilder
The preprocessed example that AutoML actually makes prediction on. Empty if AutoML does not preprocess the input example. * For Text Extraction: If the input is a .pdf file, the OCR'ed text will be provided in [document_text][google.cloud.automl.v1beta1.Document.document_text].
.google.cloud.automl.v1beta1.ExamplePayload preprocessed_input = 3; -
getPreprocessedInputOrBuilder
The preprocessed example that AutoML actually makes prediction on. Empty if AutoML does not preprocess the input example. * For Text Extraction: If the input is a .pdf file, the OCR'ed text will be provided in [document_text][google.cloud.automl.v1beta1.Document.document_text].
.google.cloud.automl.v1beta1.ExamplePayload preprocessed_input = 3;- Specified by:
getPreprocessedInputOrBuilderin interfacePredictResponseOrBuilder
-
getMetadataCount
public int getMetadataCount()Description copied from interface:PredictResponseOrBuilderAdditional domain-specific prediction response metadata. * For Image Object Detection: `max_bounding_box_count` - (int64) At most that many bounding boxes per image could have been returned. * For Text Sentiment: `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 will be also positive (though the least). The sentiment_score shouldn't be confused with "score" or "magnitude" from the previous Natural Language Sentiment Analysis API.
map<string, string> metadata = 2;- Specified by:
getMetadataCountin interfacePredictResponseOrBuilder
-
containsMetadata
Additional domain-specific prediction response metadata. * For Image Object Detection: `max_bounding_box_count` - (int64) At most that many bounding boxes per image could have been returned. * For Text Sentiment: `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 will be also positive (though the least). The sentiment_score shouldn't be confused with "score" or "magnitude" from the previous Natural Language Sentiment Analysis API.
map<string, string> metadata = 2;- Specified by:
containsMetadatain interfacePredictResponseOrBuilder
-
getMetadata
Deprecated.UsegetMetadataMap()instead.- Specified by:
getMetadatain interfacePredictResponseOrBuilder
-
getMetadataMap
Additional domain-specific prediction response metadata. * For Image Object Detection: `max_bounding_box_count` - (int64) At most that many bounding boxes per image could have been returned. * For Text Sentiment: `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 will be also positive (though the least). The sentiment_score shouldn't be confused with "score" or "magnitude" from the previous Natural Language Sentiment Analysis API.
map<string, string> metadata = 2;- Specified by:
getMetadataMapin interfacePredictResponseOrBuilder
-
getMetadataOrDefault
Additional domain-specific prediction response metadata. * For Image Object Detection: `max_bounding_box_count` - (int64) At most that many bounding boxes per image could have been returned. * For Text Sentiment: `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 will be also positive (though the least). The sentiment_score shouldn't be confused with "score" or "magnitude" from the previous Natural Language Sentiment Analysis API.
map<string, string> metadata = 2;- Specified by:
getMetadataOrDefaultin interfacePredictResponseOrBuilder
-
getMetadataOrThrow
Additional domain-specific prediction response metadata. * For Image Object Detection: `max_bounding_box_count` - (int64) At most that many bounding boxes per image could have been returned. * For Text Sentiment: `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 will be also positive (though the least). The sentiment_score shouldn't be confused with "score" or "magnitude" from the previous Natural Language Sentiment Analysis API.
map<string, string> metadata = 2;- Specified by:
getMetadataOrThrowin interfacePredictResponseOrBuilder
-
clearMetadata
-
removeMetadata
Additional domain-specific prediction response metadata. * For Image Object Detection: `max_bounding_box_count` - (int64) At most that many bounding boxes per image could have been returned. * For Text Sentiment: `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 will be also positive (though the least). The sentiment_score shouldn't be confused with "score" or "magnitude" from the previous Natural Language Sentiment Analysis API.
map<string, string> metadata = 2; -
getMutableMetadata
Deprecated.Use alternate mutation accessors instead. -
putMetadata
Additional domain-specific prediction response metadata. * For Image Object Detection: `max_bounding_box_count` - (int64) At most that many bounding boxes per image could have been returned. * For Text Sentiment: `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 will be also positive (though the least). The sentiment_score shouldn't be confused with "score" or "magnitude" from the previous Natural Language Sentiment Analysis API.
map<string, string> metadata = 2; -
putAllMetadata
Additional domain-specific prediction response metadata. * For Image Object Detection: `max_bounding_box_count` - (int64) At most that many bounding boxes per image could have been returned. * For Text Sentiment: `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 will be also positive (though the least). The sentiment_score shouldn't be confused with "score" or "magnitude" from the previous Natural Language Sentiment Analysis API.
map<string, string> metadata = 2;
-