Class EntityAnnotation

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.vision.v1.EntityAnnotation
All Implemented Interfaces:
EntityAnnotationOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class EntityAnnotation extends com.google.protobuf.GeneratedMessage implements EntityAnnotationOrBuilder
 Set of detected entity features.
 
Protobuf type google.cloud.vision.v1.EntityAnnotation
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    Set of detected entity features.

    Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage

    com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage

    com.google.protobuf.AbstractMessage.BuilderParent

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessage

    alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessage

    memoizedSize

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Image region to which this entity belongs.
    Image region to which this entity belongs.
    float
    Deprecated.
    google.cloud.vision.v1.EntityAnnotation.confidence is deprecated.
     
     
    Entity textual description, expressed in its `locale` language.
    com.google.protobuf.ByteString
    Entity textual description, expressed in its `locale` language.
    static final com.google.protobuf.Descriptors.Descriptor
     
    The language code for the locale in which the entity textual `description` is expressed.
    com.google.protobuf.ByteString
    The language code for the locale in which the entity textual `description` is expressed.
    getLocations(int index)
    The location information for the detected entity.
    int
    The location information for the detected entity.
    The location information for the detected entity.
    The location information for the detected entity.
    The location information for the detected entity.
    Opaque entity ID.
    com.google.protobuf.ByteString
    Opaque entity ID.
    com.google.protobuf.Parser<EntityAnnotation>
     
    getProperties(int index)
    Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.
    int
    Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.
    Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.
    Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.
    Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.
    float
    Overall score of the result.
    int
     
    float
    The relevancy of the ICA (Image Content Annotation) label to the image.
    boolean
    Image region to which this entity belongs.
    int
     
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
     
     
    newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
     
     
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(byte[] data)
     
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.ByteString data)
     
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<EntityAnnotation>
     
     
    void
    writeTo(com.google.protobuf.CodedOutputStream output)
     

    Methods inherited from class com.google.protobuf.GeneratedMessage

    canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag

    Methods inherited from class com.google.protobuf.AbstractMessage

    findInitializationErrors, getInitializationErrorString, hashFields, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLite

    toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Field Details

  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • 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

      @Deprecated public float getConfidence()
      Deprecated.
      google.cloud.vision.v1.EntityAnnotation.confidence is deprecated. See google/cloud/vision/v1/image_annotator.proto;l=510
       **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 [deprecated = true];
      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.v1.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.v1.BoundingPoly bounding_poly = 7;
      Specified by:
      getBoundingPoly in interface EntityAnnotationOrBuilder
      Returns:
      The boundingPoly.
    • getBoundingPolyOrBuilder

      public BoundingPolyOrBuilder getBoundingPolyOrBuilder()
       Image region to which this entity belongs. Not produced
       for `LABEL_DETECTION` features.
       
      .google.cloud.vision.v1.BoundingPoly bounding_poly = 7;
      Specified by:
      getBoundingPolyOrBuilder in interface EntityAnnotationOrBuilder
    • 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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.GeneratedMessage
    • 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.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • 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(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static EntityAnnotation parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static EntityAnnotation parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static EntityAnnotation parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static EntityAnnotation parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • 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
    • newBuilder

      public static EntityAnnotation.Builder newBuilder()
    • newBuilder

      public static EntityAnnotation.Builder newBuilder(EntityAnnotation prototype)
    • 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.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static EntityAnnotation getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<EntityAnnotation> parser()
    • 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.GeneratedMessage
    • getDefaultInstanceForType

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