public static final class PredictResponse.Builder extends GeneratedMessageV3.Builder<PredictResponse.Builder> implements PredictResponseOrBuilder
Response message for PredictionService.Predict.
Protobuf type google.cloud.automl.v1beta1.PredictResponse
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addAllPayload(Iterable<? extends AnnotationPayload> values)
public PredictResponse.Builder addAllPayload(Iterable<? extends AnnotationPayload> values)
Prediction result.
Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1;
Parameter
Name | Description |
values | Iterable<? extends com.google.cloud.automl.v1beta1.AnnotationPayload>
|
Returns
addPayload(AnnotationPayload value)
public PredictResponse.Builder addPayload(AnnotationPayload value)
Prediction result.
Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1;
Parameter
Returns
addPayload(AnnotationPayload.Builder builderForValue)
public PredictResponse.Builder addPayload(AnnotationPayload.Builder builderForValue)
Prediction result.
Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1;
Parameter
Returns
addPayload(int index, AnnotationPayload value)
public PredictResponse.Builder addPayload(int index, AnnotationPayload value)
Prediction result.
Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1;
Parameters
Returns
addPayload(int index, AnnotationPayload.Builder builderForValue)
public PredictResponse.Builder addPayload(int index, AnnotationPayload.Builder builderForValue)
Prediction result.
Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1;
Parameters
Returns
addPayloadBuilder()
public AnnotationPayload.Builder addPayloadBuilder()
Prediction result.
Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1;
Returns
addPayloadBuilder(int index)
public AnnotationPayload.Builder addPayloadBuilder(int index)
Prediction result.
Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1;
Parameter
Returns
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public PredictResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
public PredictResponse build()
Returns
buildPartial()
public PredictResponse buildPartial()
Returns
clear()
public PredictResponse.Builder clear()
Returns
Overrides
clearField(Descriptors.FieldDescriptor field)
public PredictResponse.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
public PredictResponse.Builder clearMetadata()
Returns
clearOneof(Descriptors.OneofDescriptor oneof)
public PredictResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clearPayload()
public PredictResponse.Builder clearPayload()
Prediction result.
Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1;
Returns
public PredictResponse.Builder 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.ExamplePayload preprocessed_input = 3;
Returns
clone()
public PredictResponse.Builder clone()
Returns
Overrides
public boolean containsMetadata(String key)
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;
Parameter
Returns
getDefaultInstanceForType()
public PredictResponse getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
public Map<String,String> getMetadata()
Returns
public int getMetadataCount()
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;
Returns
public Map<String,String> 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;
Returns
public String getMetadataOrDefault(String key, String defaultValue)
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;
Parameters
Returns
public String getMetadataOrThrow(String key)
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;
Parameter
Returns
public Map<String,String> getMutableMetadata()
Use alternate mutation accessors instead.
Returns
getPayload(int index)
public AnnotationPayload getPayload(int index)
Prediction result.
Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1;
Parameter
Returns
getPayloadBuilder(int index)
public AnnotationPayload.Builder getPayloadBuilder(int index)
Prediction result.
Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1;
Parameter
Returns
getPayloadBuilderList()
public List<AnnotationPayload.Builder> getPayloadBuilderList()
Prediction result.
Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1;
Returns
getPayloadCount()
public int getPayloadCount()
Prediction result.
Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1;
Returns
getPayloadList()
public List<AnnotationPayload> getPayloadList()
Prediction result.
Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1;
Returns
getPayloadOrBuilder(int index)
public AnnotationPayloadOrBuilder getPayloadOrBuilder(int index)
Prediction result.
Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1;
Parameter
Returns
getPayloadOrBuilderList()
public List<? extends AnnotationPayloadOrBuilder> getPayloadOrBuilderList()
Prediction result.
Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1;
Returns
Type | Description |
List<? extends com.google.cloud.automl.v1beta1.AnnotationPayloadOrBuilder> | |
public ExamplePayload 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.ExamplePayload preprocessed_input = 3;
Returns
public ExamplePayload.Builder 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.ExamplePayload preprocessed_input = 3;
Returns
public ExamplePayloadOrBuilder 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.ExamplePayload preprocessed_input = 3;
Returns
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.ExamplePayload preprocessed_input = 3;
Returns
Type | Description |
boolean | Whether the preprocessedInput field is set.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter
Returns
Overrides
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Parameter
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(PredictResponse other)
public PredictResponse.Builder mergeFrom(PredictResponse other)
Parameter
Returns
public PredictResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public PredictResponse.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
public PredictResponse.Builder mergePreprocessedInput(ExamplePayload value)
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.ExamplePayload preprocessed_input = 3;
Parameter
Returns
mergeUnknownFields(UnknownFieldSet unknownFields)
public final PredictResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
public PredictResponse.Builder putAllMetadata(Map<String,String> values)
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;
Parameter
Returns
public PredictResponse.Builder putMetadata(String key, String value)
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;
Parameters
Returns
public PredictResponse.Builder removeMetadata(String key)
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;
Parameter
Returns
removePayload(int index)
public PredictResponse.Builder removePayload(int index)
Prediction result.
Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1;
Parameter
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public PredictResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setPayload(int index, AnnotationPayload value)
public PredictResponse.Builder setPayload(int index, AnnotationPayload value)
Prediction result.
Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1;
Parameters
Returns
setPayload(int index, AnnotationPayload.Builder builderForValue)
public PredictResponse.Builder setPayload(int index, AnnotationPayload.Builder builderForValue)
Prediction result.
Translation and Text Sentiment will return precisely one payload.
repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1;
Parameters
Returns
public PredictResponse.Builder setPreprocessedInput(ExamplePayload value)
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.ExamplePayload preprocessed_input = 3;
Parameter
Returns
public PredictResponse.Builder setPreprocessedInput(ExamplePayload.Builder builderForValue)
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.ExamplePayload preprocessed_input = 3;
Parameter
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public PredictResponse.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final PredictResponse.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides