Class EntityAnnotation

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

    public final class EntityAnnotation
    extends com.google.protobuf.GeneratedMessageV3
    implements EntityAnnotationOrBuilder
     Set of detected entity features.
     
    Protobuf type google.cloud.vision.v1p3beta1.EntityAnnotation
    See Also:
    Serialized Form
    • 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
      • getMid

        public String getMid()
         Opaque entity ID. Some IDs may be available in
         [Google Knowledge Graph Search
         API](https://developers.google.com/knowledge-graph/).
         
        string mid = 1;
        Specified by:
        getMid in interface EntityAnnotationOrBuilder
        Returns:
        The mid.
      • getMidBytes

        public com.google.protobuf.ByteString getMidBytes()
         Opaque entity ID. Some IDs may be available in
         [Google Knowledge Graph Search
         API](https://developers.google.com/knowledge-graph/).
         
        string mid = 1;
        Specified by:
        getMidBytes in interface EntityAnnotationOrBuilder
        Returns:
        The bytes for mid.
      • getLocale

        public String getLocale()
         The language code for the locale in which the entity textual
         `description` is expressed.
         
        string locale = 2;
        Specified by:
        getLocale in interface EntityAnnotationOrBuilder
        Returns:
        The locale.
      • getLocaleBytes

        public com.google.protobuf.ByteString getLocaleBytes()
         The language code for the locale in which the entity textual
         `description` is expressed.
         
        string locale = 2;
        Specified by:
        getLocaleBytes in interface EntityAnnotationOrBuilder
        Returns:
        The bytes for locale.
      • getDescription

        public String getDescription()
         Entity textual description, expressed in its `locale` language.
         
        string description = 3;
        Specified by:
        getDescription in interface EntityAnnotationOrBuilder
        Returns:
        The description.
      • getDescriptionBytes

        public com.google.protobuf.ByteString getDescriptionBytes()
         Entity textual description, expressed in its `locale` language.
         
        string description = 3;
        Specified by:
        getDescriptionBytes in interface EntityAnnotationOrBuilder
        Returns:
        The bytes for description.
      • getScore

        public float getScore()
         Overall score of the result. Range [0, 1].
         
        float score = 4;
        Specified by:
        getScore in interface EntityAnnotationOrBuilder
        Returns:
        The score.
      • getConfidence

        public float getConfidence()
         **Deprecated. Use `score` instead.**
         The accuracy of the entity detection in an image.
         For example, for an image in which the "Eiffel Tower" entity is detected,
         this field represents the confidence that there is a tower in the query
         image. Range [0, 1].
         
        float confidence = 5;
        Specified by:
        getConfidence in interface EntityAnnotationOrBuilder
        Returns:
        The confidence.
      • getTopicality

        public float getTopicality()
         The relevancy of the ICA (Image Content Annotation) label to the
         image. For example, the relevancy of "tower" is likely higher to an image
         containing the detected "Eiffel Tower" than to an image containing a
         detected distant towering building, even though the confidence that
         there is a tower in each image may be the same. Range [0, 1].
         
        float topicality = 6;
        Specified by:
        getTopicality in interface EntityAnnotationOrBuilder
        Returns:
        The topicality.
      • hasBoundingPoly

        public boolean hasBoundingPoly()
         Image region to which this entity belongs. Not produced
         for `LABEL_DETECTION` features.
         
        .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7;
        Specified by:
        hasBoundingPoly in interface EntityAnnotationOrBuilder
        Returns:
        Whether the boundingPoly field is set.
      • getBoundingPoly

        public BoundingPoly getBoundingPoly()
         Image region to which this entity belongs. Not produced
         for `LABEL_DETECTION` features.
         
        .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7;
        Specified by:
        getBoundingPoly in interface EntityAnnotationOrBuilder
        Returns:
        The boundingPoly.
      • getLocationsList

        public List<LocationInfo> getLocationsList()
         The location information for the detected entity. Multiple
         `LocationInfo` elements can be present because one location may
         indicate the location of the scene in the image, and another location
         may indicate the location of the place where the image was taken.
         Location information is usually present for landmarks.
         
        repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8;
        Specified by:
        getLocationsList in interface EntityAnnotationOrBuilder
      • getLocationsOrBuilderList

        public List<? extends LocationInfoOrBuilder> getLocationsOrBuilderList()
         The location information for the detected entity. Multiple
         `LocationInfo` elements can be present because one location may
         indicate the location of the scene in the image, and another location
         may indicate the location of the place where the image was taken.
         Location information is usually present for landmarks.
         
        repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8;
        Specified by:
        getLocationsOrBuilderList in interface EntityAnnotationOrBuilder
      • getLocationsCount

        public int getLocationsCount()
         The location information for the detected entity. Multiple
         `LocationInfo` elements can be present because one location may
         indicate the location of the scene in the image, and another location
         may indicate the location of the place where the image was taken.
         Location information is usually present for landmarks.
         
        repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8;
        Specified by:
        getLocationsCount in interface EntityAnnotationOrBuilder
      • getLocations

        public LocationInfo getLocations​(int index)
         The location information for the detected entity. Multiple
         `LocationInfo` elements can be present because one location may
         indicate the location of the scene in the image, and another location
         may indicate the location of the place where the image was taken.
         Location information is usually present for landmarks.
         
        repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8;
        Specified by:
        getLocations in interface EntityAnnotationOrBuilder
      • getLocationsOrBuilder

        public LocationInfoOrBuilder getLocationsOrBuilder​(int index)
         The location information for the detected entity. Multiple
         `LocationInfo` elements can be present because one location may
         indicate the location of the scene in the image, and another location
         may indicate the location of the place where the image was taken.
         Location information is usually present for landmarks.
         
        repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8;
        Specified by:
        getLocationsOrBuilder in interface EntityAnnotationOrBuilder
      • getPropertiesList

        public List<Property> getPropertiesList()
         Some entities may have optional user-supplied `Property` (name/value)
         fields, such a score or string that qualifies the entity.
         
        repeated .google.cloud.vision.v1p3beta1.Property properties = 9;
        Specified by:
        getPropertiesList in interface EntityAnnotationOrBuilder
      • getPropertiesOrBuilderList

        public List<? extends PropertyOrBuilder> getPropertiesOrBuilderList()
         Some entities may have optional user-supplied `Property` (name/value)
         fields, such a score or string that qualifies the entity.
         
        repeated .google.cloud.vision.v1p3beta1.Property properties = 9;
        Specified by:
        getPropertiesOrBuilderList in interface EntityAnnotationOrBuilder
      • getPropertiesCount

        public int getPropertiesCount()
         Some entities may have optional user-supplied `Property` (name/value)
         fields, such a score or string that qualifies the entity.
         
        repeated .google.cloud.vision.v1p3beta1.Property properties = 9;
        Specified by:
        getPropertiesCount in interface EntityAnnotationOrBuilder
      • getProperties

        public Property getProperties​(int index)
         Some entities may have optional user-supplied `Property` (name/value)
         fields, such a score or string that qualifies the entity.
         
        repeated .google.cloud.vision.v1p3beta1.Property properties = 9;
        Specified by:
        getProperties in interface EntityAnnotationOrBuilder
      • getPropertiesOrBuilder

        public PropertyOrBuilder getPropertiesOrBuilder​(int index)
         Some entities may have optional user-supplied `Property` (name/value)
         fields, such a score or string that qualifies the entity.
         
        repeated .google.cloud.vision.v1p3beta1.Property properties = 9;
        Specified by:
        getPropertiesOrBuilder in interface EntityAnnotationOrBuilder
      • 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 EntityAnnotation parseFrom​(ByteBuffer data)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

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

        public static EntityAnnotation parseFrom​(com.google.protobuf.CodedInputStream input,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws IOException
        Throws:
        IOException
      • newBuilderForType

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

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

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

        public com.google.protobuf.Parser<EntityAnnotation> 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 EntityAnnotation getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder