Package com.google.cloud.automl.v1
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.v1.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.v1.PredictionService.Predict].Protobuf type
google.cloud.automl.v1.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 metadata.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorDeprecated.intAdditional domain-specific prediction response metadata.Additional domain-specific prediction response metadata.getMetadataOrDefault(String key, String defaultValue) Additional domain-specific prediction response metadata.getMetadataOrThrow(String key) Additional domain-specific prediction response metadata.Deprecated.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 metadata.putMetadata(String key, String value) Additional domain-specific prediction response metadata.removeMetadata(String key) Additional domain-specific prediction response metadata.removePayload(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. AutoML Translation and AutoML Natural Language Sentiment Analysis return precisely one payload.
repeated .google.cloud.automl.v1.AnnotationPayload payload = 1;- Specified by:
getPayloadListin interfacePredictResponseOrBuilder
-
getPayloadCount
public int getPayloadCount()Prediction result. AutoML Translation and AutoML Natural Language Sentiment Analysis return precisely one payload.
repeated .google.cloud.automl.v1.AnnotationPayload payload = 1;- Specified by:
getPayloadCountin interfacePredictResponseOrBuilder
-
getPayload
Prediction result. AutoML Translation and AutoML Natural Language Sentiment Analysis return precisely one payload.
repeated .google.cloud.automl.v1.AnnotationPayload payload = 1;- Specified by:
getPayloadin interfacePredictResponseOrBuilder
-
setPayload
Prediction result. AutoML Translation and AutoML Natural Language Sentiment Analysis return precisely one payload.
repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; -
setPayload
Prediction result. AutoML Translation and AutoML Natural Language Sentiment Analysis return precisely one payload.
repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; -
addPayload
Prediction result. AutoML Translation and AutoML Natural Language Sentiment Analysis return precisely one payload.
repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; -
addPayload
Prediction result. AutoML Translation and AutoML Natural Language Sentiment Analysis return precisely one payload.
repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; -
addPayload
Prediction result. AutoML Translation and AutoML Natural Language Sentiment Analysis return precisely one payload.
repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; -
addPayload
Prediction result. AutoML Translation and AutoML Natural Language Sentiment Analysis return precisely one payload.
repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; -
addAllPayload
Prediction result. AutoML Translation and AutoML Natural Language Sentiment Analysis return precisely one payload.
repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; -
clearPayload
Prediction result. AutoML Translation and AutoML Natural Language Sentiment Analysis return precisely one payload.
repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; -
removePayload
Prediction result. AutoML Translation and AutoML Natural Language Sentiment Analysis return precisely one payload.
repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; -
getPayloadBuilder
Prediction result. AutoML Translation and AutoML Natural Language Sentiment Analysis return precisely one payload.
repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; -
getPayloadOrBuilder
Prediction result. AutoML Translation and AutoML Natural Language Sentiment Analysis return precisely one payload.
repeated .google.cloud.automl.v1.AnnotationPayload payload = 1;- Specified by:
getPayloadOrBuilderin interfacePredictResponseOrBuilder
-
getPayloadOrBuilderList
Prediction result. AutoML Translation and AutoML Natural Language Sentiment Analysis return precisely one payload.
repeated .google.cloud.automl.v1.AnnotationPayload payload = 1;- Specified by:
getPayloadOrBuilderListin interfacePredictResponseOrBuilder
-
addPayloadBuilder
Prediction result. AutoML Translation and AutoML Natural Language Sentiment Analysis return precisely one payload.
repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; -
addPayloadBuilder
Prediction result. AutoML Translation and AutoML Natural Language Sentiment Analysis return precisely one payload.
repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; -
getPayloadBuilderList
Prediction result. AutoML Translation and AutoML Natural Language Sentiment Analysis return precisely one payload.
repeated .google.cloud.automl.v1.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 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;- 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 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;- 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 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; -
setPreprocessedInput
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; -
mergePreprocessedInput
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; -
clearPreprocessedInput
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; -
getPreprocessedInputBuilder
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
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;- Specified by:
getPreprocessedInputOrBuilderin interfacePredictResponseOrBuilder
-
getMetadataCount
public int getMetadataCount()Description copied from interface: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;- Specified by:
getMetadataCountin interfacePredictResponseOrBuilder
-
containsMetadata
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;- Specified by:
containsMetadatain interfacePredictResponseOrBuilder
-
getMetadata
Deprecated.UsegetMetadataMap()instead.- Specified by:
getMetadatain interfacePredictResponseOrBuilder
-
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;- Specified by:
getMetadataMapin interfacePredictResponseOrBuilder
-
getMetadataOrDefault
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;- Specified by:
getMetadataOrDefaultin interfacePredictResponseOrBuilder
-
getMetadataOrThrow
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;- Specified by:
getMetadataOrThrowin interfacePredictResponseOrBuilder
-
clearMetadata
-
removeMetadata
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; -
getMutableMetadata
Deprecated.Use alternate mutation accessors instead. -
putMetadata
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; -
putAllMetadata
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;
-