Class AnnotateImageResponse

  • All Implemented Interfaces:
    AnnotateImageResponseOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class AnnotateImageResponse
    extends com.google.protobuf.GeneratedMessageV3
    implements AnnotateImageResponseOrBuilder
     Response to an image annotation request.
     
    Protobuf type google.cloud.vision.v1p3beta1.AnnotateImageResponse
    See Also:
    Serialized Form
    • Field Detail

      • FACE_ANNOTATIONS_FIELD_NUMBER

        public static final int FACE_ANNOTATIONS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • LANDMARK_ANNOTATIONS_FIELD_NUMBER

        public static final int LANDMARK_ANNOTATIONS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • LOGO_ANNOTATIONS_FIELD_NUMBER

        public static final int LOGO_ANNOTATIONS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • LABEL_ANNOTATIONS_FIELD_NUMBER

        public static final int LABEL_ANNOTATIONS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • LOCALIZED_OBJECT_ANNOTATIONS_FIELD_NUMBER

        public static final int LOCALIZED_OBJECT_ANNOTATIONS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • TEXT_ANNOTATIONS_FIELD_NUMBER

        public static final int TEXT_ANNOTATIONS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • FULL_TEXT_ANNOTATION_FIELD_NUMBER

        public static final int FULL_TEXT_ANNOTATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • SAFE_SEARCH_ANNOTATION_FIELD_NUMBER

        public static final int SAFE_SEARCH_ANNOTATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER

        public static final int IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • CROP_HINTS_ANNOTATION_FIELD_NUMBER

        public static final int CROP_HINTS_ANNOTATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • WEB_DETECTION_FIELD_NUMBER

        public static final int WEB_DETECTION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • PRODUCT_SEARCH_RESULTS_FIELD_NUMBER

        public static final int PRODUCT_SEARCH_RESULTS_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getFaceAnnotationsCount

        public int getFaceAnnotationsCount()
         If present, face detection has completed successfully.
         
        repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1;
        Specified by:
        getFaceAnnotationsCount in interface AnnotateImageResponseOrBuilder
      • getLandmarkAnnotationsCount

        public int getLandmarkAnnotationsCount()
         If present, landmark detection has completed successfully.
         
        repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2;
        Specified by:
        getLandmarkAnnotationsCount in interface AnnotateImageResponseOrBuilder
      • getLogoAnnotationsCount

        public int getLogoAnnotationsCount()
         If present, logo detection has completed successfully.
         
        repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3;
        Specified by:
        getLogoAnnotationsCount in interface AnnotateImageResponseOrBuilder
      • getLabelAnnotationsCount

        public int getLabelAnnotationsCount()
         If present, label detection has completed successfully.
         
        repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4;
        Specified by:
        getLabelAnnotationsCount in interface AnnotateImageResponseOrBuilder
      • getLocalizedObjectAnnotationsCount

        public int getLocalizedObjectAnnotationsCount()
         If present, localized object detection has completed successfully.
         This will be sorted descending by confidence score.
         
        repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
        Specified by:
        getLocalizedObjectAnnotationsCount in interface AnnotateImageResponseOrBuilder
      • getLocalizedObjectAnnotations

        public LocalizedObjectAnnotation getLocalizedObjectAnnotations​(int index)
         If present, localized object detection has completed successfully.
         This will be sorted descending by confidence score.
         
        repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
        Specified by:
        getLocalizedObjectAnnotations in interface AnnotateImageResponseOrBuilder
      • getTextAnnotationsCount

        public int getTextAnnotationsCount()
         If present, text (OCR) detection has completed successfully.
         
        repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5;
        Specified by:
        getTextAnnotationsCount in interface AnnotateImageResponseOrBuilder
      • 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.v1p3beta1.TextAnnotation full_text_annotation = 12;
        Specified by:
        hasFullTextAnnotation in interface AnnotateImageResponseOrBuilder
        Returns:
        Whether the fullTextAnnotation field is set.
      • 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.v1p3beta1.TextAnnotation full_text_annotation = 12;
        Specified by:
        getFullTextAnnotation in interface AnnotateImageResponseOrBuilder
        Returns:
        The fullTextAnnotation.
      • 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.v1p3beta1.TextAnnotation full_text_annotation = 12;
        Specified by:
        getFullTextAnnotationOrBuilder in interface AnnotateImageResponseOrBuilder
      • hasSafeSearchAnnotation

        public boolean hasSafeSearchAnnotation()
         If present, safe-search annotation has completed successfully.
         
        .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6;
        Specified by:
        hasSafeSearchAnnotation in interface AnnotateImageResponseOrBuilder
        Returns:
        Whether the safeSearchAnnotation field is set.
      • hasImagePropertiesAnnotation

        public boolean hasImagePropertiesAnnotation()
         If present, image properties were extracted successfully.
         
        .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8;
        Specified by:
        hasImagePropertiesAnnotation in interface AnnotateImageResponseOrBuilder
        Returns:
        Whether the imagePropertiesAnnotation field is set.
      • hasCropHintsAnnotation

        public boolean hasCropHintsAnnotation()
         If present, crop hints have completed successfully.
         
        .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11;
        Specified by:
        hasCropHintsAnnotation in interface AnnotateImageResponseOrBuilder
        Returns:
        Whether the cropHintsAnnotation field is set.
      • hasWebDetection

        public boolean hasWebDetection()
         If present, web detection has completed successfully.
         
        .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13;
        Specified by:
        hasWebDetection in interface AnnotateImageResponseOrBuilder
        Returns:
        Whether the webDetection field is set.
      • hasProductSearchResults

        public boolean hasProductSearchResults()
         If present, product search has completed successfully.
         
        .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14;
        Specified by:
        hasProductSearchResults in interface AnnotateImageResponseOrBuilder
        Returns:
        Whether the productSearchResults 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;
        Specified by:
        hasError in interface AnnotateImageResponseOrBuilder
        Returns:
        Whether the error field is set.
      • getError

        public com.google.rpc.Status 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;
        Specified by:
        getError in interface AnnotateImageResponseOrBuilder
        Returns:
        The error.
      • getErrorOrBuilder

        public com.google.rpc.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;
        Specified by:
        getErrorOrBuilder in interface AnnotateImageResponseOrBuilder
      • hasContext

        public boolean hasContext()
         If present, contextual information is needed to understand where this image
         comes from.
         
        .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21;
        Specified by:
        hasContext in interface AnnotateImageResponseOrBuilder
        Returns:
        Whether the context field is set.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static AnnotateImageResponse parseFrom​(ByteBuffer data)
                                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AnnotateImageResponse parseFrom​(ByteBuffer data,
                                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AnnotateImageResponse parseFrom​(com.google.protobuf.ByteString data)
                                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AnnotateImageResponse parseFrom​(com.google.protobuf.ByteString data,
                                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AnnotateImageResponse parseFrom​(byte[] data)
                                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AnnotateImageResponse parseFrom​(byte[] data,
                                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • newBuilderForType

        public AnnotateImageResponse.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public AnnotateImageResponse.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected AnnotateImageResponse.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<AnnotateImageResponse> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public AnnotateImageResponse getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder