public final class AnnotateImageResponse extends GeneratedMessageV3 implements AnnotateImageResponseOrBuilder
Response to an image annotation request.
Protobuf type google.cloud.vision.v1p2beta1.AnnotateImageResponse
Static Fields
CONTEXT_FIELD_NUMBER
public static final int CONTEXT_FIELD_NUMBER
Field Value
CROP_HINTS_ANNOTATION_FIELD_NUMBER
public static final int CROP_HINTS_ANNOTATION_FIELD_NUMBER
Field Value
ERROR_FIELD_NUMBER
public static final int ERROR_FIELD_NUMBER
Field Value
FACE_ANNOTATIONS_FIELD_NUMBER
public static final int FACE_ANNOTATIONS_FIELD_NUMBER
Field Value
FULL_TEXT_ANNOTATION_FIELD_NUMBER
public static final int FULL_TEXT_ANNOTATION_FIELD_NUMBER
Field Value
IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER
public static final int IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER
Field Value
LABEL_ANNOTATIONS_FIELD_NUMBER
public static final int LABEL_ANNOTATIONS_FIELD_NUMBER
Field Value
LANDMARK_ANNOTATIONS_FIELD_NUMBER
public static final int LANDMARK_ANNOTATIONS_FIELD_NUMBER
Field Value
LOGO_ANNOTATIONS_FIELD_NUMBER
public static final int LOGO_ANNOTATIONS_FIELD_NUMBER
Field Value
SAFE_SEARCH_ANNOTATION_FIELD_NUMBER
public static final int SAFE_SEARCH_ANNOTATION_FIELD_NUMBER
Field Value
TEXT_ANNOTATIONS_FIELD_NUMBER
public static final int TEXT_ANNOTATIONS_FIELD_NUMBER
Field Value
WEB_DETECTION_FIELD_NUMBER
public static final int WEB_DETECTION_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static AnnotateImageResponse getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static AnnotateImageResponse.Builder newBuilder()
Returns
newBuilder(AnnotateImageResponse prototype)
public static AnnotateImageResponse.Builder newBuilder(AnnotateImageResponse prototype)
Parameter
Returns
public static AnnotateImageResponse parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static AnnotateImageResponse parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static AnnotateImageResponse parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static AnnotateImageResponse parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static AnnotateImageResponse parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static AnnotateImageResponse parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static AnnotateImageResponse parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static AnnotateImageResponse parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static AnnotateImageResponse parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static AnnotateImageResponse parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static AnnotateImageResponse parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static AnnotateImageResponse parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<AnnotateImageResponse> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getContext()
public ImageAnnotationContext getContext()
If present, contextual information is needed to understand where this image
comes from.
.google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21;
Returns
getContextOrBuilder()
public ImageAnnotationContextOrBuilder getContextOrBuilder()
If present, contextual information is needed to understand where this image
comes from.
.google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21;
Returns
getCropHintsAnnotation()
public CropHintsAnnotation getCropHintsAnnotation()
If present, crop hints have completed successfully.
.google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11;
Returns
getCropHintsAnnotationOrBuilder()
public CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder()
If present, crop hints have completed successfully.
.google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11;
Returns
getDefaultInstanceForType()
public AnnotateImageResponse getDefaultInstanceForType()
Returns
getError()
If set, represents the error message for the operation.
Note that filled-in image annotations are guaranteed to be
correct, even when error
is set.
.google.rpc.Status error = 9;
Returns
Type | Description |
com.google.rpc.Status | The error.
|
getErrorOrBuilder()
public StatusOrBuilder getErrorOrBuilder()
If set, represents the error message for the operation.
Note that filled-in image annotations are guaranteed to be
correct, even when error
is set.
.google.rpc.Status error = 9;
Returns
Type | Description |
com.google.rpc.StatusOrBuilder | |
getFaceAnnotations(int index)
public FaceAnnotation getFaceAnnotations(int index)
If present, face detection has completed successfully.
repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1;
Parameter
Returns
getFaceAnnotationsCount()
public int getFaceAnnotationsCount()
If present, face detection has completed successfully.
repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1;
Returns
getFaceAnnotationsList()
public List<FaceAnnotation> getFaceAnnotationsList()
If present, face detection has completed successfully.
repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1;
Returns
getFaceAnnotationsOrBuilder(int index)
public FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder(int index)
If present, face detection has completed successfully.
repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1;
Parameter
Returns
getFaceAnnotationsOrBuilderList()
public List<? extends FaceAnnotationOrBuilder> getFaceAnnotationsOrBuilderList()
If present, face detection has completed successfully.
repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1;
Returns
Type | Description |
List<? extends com.google.cloud.vision.v1p2beta1.FaceAnnotationOrBuilder> | |
getFullTextAnnotation()
public TextAnnotation getFullTextAnnotation()
If present, text (OCR) detection or document (OCR) text detection has
completed successfully.
This annotation provides the structural hierarchy for the OCR detected
text.
.google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12;
Returns
getFullTextAnnotationOrBuilder()
public TextAnnotationOrBuilder getFullTextAnnotationOrBuilder()
If present, text (OCR) detection or document (OCR) text detection has
completed successfully.
This annotation provides the structural hierarchy for the OCR detected
text.
.google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12;
Returns
getImagePropertiesAnnotation()
public ImageProperties getImagePropertiesAnnotation()
If present, image properties were extracted successfully.
.google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8;
Returns
getImagePropertiesAnnotationOrBuilder()
public ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder()
If present, image properties were extracted successfully.
.google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8;
Returns
getLabelAnnotations(int index)
public EntityAnnotation getLabelAnnotations(int index)
If present, label detection has completed successfully.
repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4;
Parameter
Returns
getLabelAnnotationsCount()
public int getLabelAnnotationsCount()
If present, label detection has completed successfully.
repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4;
Returns
getLabelAnnotationsList()
public List<EntityAnnotation> getLabelAnnotationsList()
If present, label detection has completed successfully.
repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4;
Returns
getLabelAnnotationsOrBuilder(int index)
public EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder(int index)
If present, label detection has completed successfully.
repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4;
Parameter
Returns
getLabelAnnotationsOrBuilderList()
public List<? extends EntityAnnotationOrBuilder> getLabelAnnotationsOrBuilderList()
If present, label detection has completed successfully.
repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4;
Returns
Type | Description |
List<? extends com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder> | |
getLandmarkAnnotations(int index)
public EntityAnnotation getLandmarkAnnotations(int index)
If present, landmark detection has completed successfully.
repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2;
Parameter
Returns
getLandmarkAnnotationsCount()
public int getLandmarkAnnotationsCount()
If present, landmark detection has completed successfully.
repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2;
Returns
getLandmarkAnnotationsList()
public List<EntityAnnotation> getLandmarkAnnotationsList()
If present, landmark detection has completed successfully.
repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2;
Returns
getLandmarkAnnotationsOrBuilder(int index)
public EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder(int index)
If present, landmark detection has completed successfully.
repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2;
Parameter
Returns
getLandmarkAnnotationsOrBuilderList()
public List<? extends EntityAnnotationOrBuilder> getLandmarkAnnotationsOrBuilderList()
If present, landmark detection has completed successfully.
repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2;
Returns
Type | Description |
List<? extends com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder> | |
getLogoAnnotations(int index)
public EntityAnnotation getLogoAnnotations(int index)
If present, logo detection has completed successfully.
repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3;
Parameter
Returns
getLogoAnnotationsCount()
public int getLogoAnnotationsCount()
If present, logo detection has completed successfully.
repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3;
Returns
getLogoAnnotationsList()
public List<EntityAnnotation> getLogoAnnotationsList()
If present, logo detection has completed successfully.
repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3;
Returns
getLogoAnnotationsOrBuilder(int index)
public EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder(int index)
If present, logo detection has completed successfully.
repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3;
Parameter
Returns
getLogoAnnotationsOrBuilderList()
public List<? extends EntityAnnotationOrBuilder> getLogoAnnotationsOrBuilderList()
If present, logo detection has completed successfully.
repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3;
Returns
Type | Description |
List<? extends com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder> | |
getParserForType()
public Parser<AnnotateImageResponse> getParserForType()
Returns
Overrides
getSafeSearchAnnotation()
public SafeSearchAnnotation getSafeSearchAnnotation()
If present, safe-search annotation has completed successfully.
.google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6;
Returns
getSafeSearchAnnotationOrBuilder()
public SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder()
If present, safe-search annotation has completed successfully.
.google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6;
Returns
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getTextAnnotations(int index)
public EntityAnnotation getTextAnnotations(int index)
If present, text (OCR) detection has completed successfully.
repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5;
Parameter
Returns
getTextAnnotationsCount()
public int getTextAnnotationsCount()
If present, text (OCR) detection has completed successfully.
repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5;
Returns
getTextAnnotationsList()
public List<EntityAnnotation> getTextAnnotationsList()
If present, text (OCR) detection has completed successfully.
repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5;
Returns
getTextAnnotationsOrBuilder(int index)
public EntityAnnotationOrBuilder getTextAnnotationsOrBuilder(int index)
If present, text (OCR) detection has completed successfully.
repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5;
Parameter
Returns
getTextAnnotationsOrBuilderList()
public List<? extends EntityAnnotationOrBuilder> getTextAnnotationsOrBuilderList()
If present, text (OCR) detection has completed successfully.
repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5;
Returns
Type | Description |
List<? extends com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder> | |
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
getWebDetection()
public WebDetection getWebDetection()
If present, web detection has completed successfully.
.google.cloud.vision.v1p2beta1.WebDetection web_detection = 13;
Returns
getWebDetectionOrBuilder()
public WebDetectionOrBuilder getWebDetectionOrBuilder()
If present, web detection has completed successfully.
.google.cloud.vision.v1p2beta1.WebDetection web_detection = 13;
Returns
hasContext()
public boolean hasContext()
If present, contextual information is needed to understand where this image
comes from.
.google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21;
Returns
Type | Description |
boolean | Whether the context field is set.
|
hasCropHintsAnnotation()
public boolean hasCropHintsAnnotation()
If present, crop hints have completed successfully.
.google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11;
Returns
Type | Description |
boolean | Whether the cropHintsAnnotation field is set.
|
hasError()
public boolean hasError()
If set, represents the error message for the operation.
Note that filled-in image annotations are guaranteed to be
correct, even when error
is set.
.google.rpc.Status error = 9;
Returns
Type | Description |
boolean | Whether the error field is set.
|
hasFullTextAnnotation()
public boolean hasFullTextAnnotation()
If present, text (OCR) detection or document (OCR) text detection has
completed successfully.
This annotation provides the structural hierarchy for the OCR detected
text.
.google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12;
Returns
Type | Description |
boolean | Whether the fullTextAnnotation field is set.
|
hasImagePropertiesAnnotation()
public boolean hasImagePropertiesAnnotation()
If present, image properties were extracted successfully.
.google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8;
Returns
Type | Description |
boolean | Whether the imagePropertiesAnnotation field is set.
|
hasSafeSearchAnnotation()
public boolean hasSafeSearchAnnotation()
If present, safe-search annotation has completed successfully.
.google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6;
Returns
Type | Description |
boolean | Whether the safeSearchAnnotation field is set.
|
hasWebDetection()
public boolean hasWebDetection()
If present, web detection has completed successfully.
.google.cloud.vision.v1p2beta1.WebDetection web_detection = 13;
Returns
Type | Description |
boolean | Whether the webDetection field is set.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public AnnotateImageResponse.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected AnnotateImageResponse.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public AnnotateImageResponse.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions