Class EntityAnnotation
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.cloud.vision.v1p1beta1.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 typegoogle.cloud.vision.v1p1beta1.EntityAnnotation
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EntityAnnotation.Builder
Set of detected entity features.-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static int
BOUNDING_POLY_FIELD_NUMBER
static int
CONFIDENCE_FIELD_NUMBER
static int
DESCRIPTION_FIELD_NUMBER
static int
LOCALE_FIELD_NUMBER
static int
LOCATIONS_FIELD_NUMBER
static int
MID_FIELD_NUMBER
static int
PROPERTIES_FIELD_NUMBER
static int
SCORE_FIELD_NUMBER
static int
TOPICALITY_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
BoundingPoly
getBoundingPoly()
Image region to which this entity belongs.BoundingPolyOrBuilder
getBoundingPolyOrBuilder()
Image region to which this entity belongs.float
getConfidence()
The accuracy of the entity detection in an image.static EntityAnnotation
getDefaultInstance()
EntityAnnotation
getDefaultInstanceForType()
String
getDescription()
Entity textual description, expressed in its `locale` language.com.google.protobuf.ByteString
getDescriptionBytes()
Entity textual description, expressed in its `locale` language.static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
String
getLocale()
The language code for the locale in which the entity textual `description` is expressed.com.google.protobuf.ByteString
getLocaleBytes()
The language code for the locale in which the entity textual `description` is expressed.LocationInfo
getLocations(int index)
The location information for the detected entity.int
getLocationsCount()
The location information for the detected entity.List<LocationInfo>
getLocationsList()
The location information for the detected entity.LocationInfoOrBuilder
getLocationsOrBuilder(int index)
The location information for the detected entity.List<? extends LocationInfoOrBuilder>
getLocationsOrBuilderList()
The location information for the detected entity.String
getMid()
Opaque entity ID.com.google.protobuf.ByteString
getMidBytes()
Opaque entity ID.com.google.protobuf.Parser<EntityAnnotation>
getParserForType()
Property
getProperties(int index)
Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.int
getPropertiesCount()
Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.List<Property>
getPropertiesList()
Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.PropertyOrBuilder
getPropertiesOrBuilder(int index)
Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.List<? extends PropertyOrBuilder>
getPropertiesOrBuilderList()
Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.float
getScore()
Overall score of the result.int
getSerializedSize()
float
getTopicality()
The relevancy of the ICA (Image Content Annotation) label to the image.boolean
hasBoundingPoly()
Image region to which this entity belongs.int
hashCode()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
static EntityAnnotation.Builder
newBuilder()
static EntityAnnotation.Builder
newBuilder(EntityAnnotation prototype)
EntityAnnotation.Builder
newBuilderForType()
protected EntityAnnotation.Builder
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected Object
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
static EntityAnnotation
parseDelimitedFrom(InputStream input)
static EntityAnnotation
parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static EntityAnnotation
parseFrom(byte[] data)
static EntityAnnotation
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static EntityAnnotation
parseFrom(com.google.protobuf.ByteString data)
static EntityAnnotation
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static EntityAnnotation
parseFrom(com.google.protobuf.CodedInputStream input)
static EntityAnnotation
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static EntityAnnotation
parseFrom(InputStream input)
static EntityAnnotation
parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static EntityAnnotation
parseFrom(ByteBuffer data)
static EntityAnnotation
parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<EntityAnnotation>
parser()
EntityAnnotation.Builder
toBuilder()
void
writeTo(com.google.protobuf.CodedOutputStream output)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, 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, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
MID_FIELD_NUMBER
public static final int MID_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LOCALE_FIELD_NUMBER
public static final int LOCALE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DESCRIPTION_FIELD_NUMBER
public static final int DESCRIPTION_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SCORE_FIELD_NUMBER
public static final int SCORE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
CONFIDENCE_FIELD_NUMBER
public static final int CONFIDENCE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
TOPICALITY_FIELD_NUMBER
public static final int TOPICALITY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
BOUNDING_POLY_FIELD_NUMBER
public static final int BOUNDING_POLY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LOCATIONS_FIELD_NUMBER
public static final int LOCATIONS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PROPERTIES_FIELD_NUMBER
public static final int PROPERTIES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstance
in classcom.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 classcom.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 interfaceEntityAnnotationOrBuilder
- 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 interfaceEntityAnnotationOrBuilder
- 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 interfaceEntityAnnotationOrBuilder
- 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 interfaceEntityAnnotationOrBuilder
- Returns:
- The bytes for locale.
-
getDescription
public String getDescription()
Entity textual description, expressed in its `locale` language.
string description = 3;
- Specified by:
getDescription
in interfaceEntityAnnotationOrBuilder
- 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 interfaceEntityAnnotationOrBuilder
- Returns:
- The bytes for description.
-
getScore
public float getScore()
Overall score of the result. Range [0, 1].
float score = 4;
- Specified by:
getScore
in interfaceEntityAnnotationOrBuilder
- Returns:
- The score.
-
getConfidence
public float getConfidence()
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 interfaceEntityAnnotationOrBuilder
- 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 interfaceEntityAnnotationOrBuilder
- Returns:
- The topicality.
-
hasBoundingPoly
public boolean hasBoundingPoly()
Image region to which this entity belongs. Not produced for `LABEL_DETECTION` features.
.google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7;
- Specified by:
hasBoundingPoly
in interfaceEntityAnnotationOrBuilder
- 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.v1p1beta1.BoundingPoly bounding_poly = 7;
- Specified by:
getBoundingPoly
in interfaceEntityAnnotationOrBuilder
- Returns:
- The boundingPoly.
-
getBoundingPolyOrBuilder
public BoundingPolyOrBuilder getBoundingPolyOrBuilder()
Image region to which this entity belongs. Not produced for `LABEL_DETECTION` features.
.google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7;
- Specified by:
getBoundingPolyOrBuilder
in interfaceEntityAnnotationOrBuilder
-
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.v1p1beta1.LocationInfo locations = 8;
- Specified by:
getLocationsList
in interfaceEntityAnnotationOrBuilder
-
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.v1p1beta1.LocationInfo locations = 8;
- Specified by:
getLocationsOrBuilderList
in interfaceEntityAnnotationOrBuilder
-
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.v1p1beta1.LocationInfo locations = 8;
- Specified by:
getLocationsCount
in interfaceEntityAnnotationOrBuilder
-
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.v1p1beta1.LocationInfo locations = 8;
- Specified by:
getLocations
in interfaceEntityAnnotationOrBuilder
-
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.v1p1beta1.LocationInfo locations = 8;
- Specified by:
getLocationsOrBuilder
in interfaceEntityAnnotationOrBuilder
-
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.v1p1beta1.Property properties = 9;
- Specified by:
getPropertiesList
in interfaceEntityAnnotationOrBuilder
-
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.v1p1beta1.Property properties = 9;
- Specified by:
getPropertiesOrBuilderList
in interfaceEntityAnnotationOrBuilder
-
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.v1p1beta1.Property properties = 9;
- Specified by:
getPropertiesCount
in interfaceEntityAnnotationOrBuilder
-
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.v1p1beta1.Property properties = 9;
- Specified by:
getProperties
in interfaceEntityAnnotationOrBuilder
-
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.v1p1beta1.Property properties = 9;
- Specified by:
getPropertiesOrBuilder
in interfaceEntityAnnotationOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessageV3
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in classcom.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 interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.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 interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected EntityAnnotation.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in classcom.google.protobuf.GeneratedMessageV3
-
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 interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public EntityAnnotation getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-