Package com.google.cloud.vision.v1
Class EntityAnnotation
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- 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
public final class EntityAnnotation extends com.google.protobuf.GeneratedMessageV3 implements EntityAnnotationOrBuilder
Set of detected entity features.
Protobuf typegoogle.cloud.vision.v1.EntityAnnotation- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEntityAnnotation.BuilderSet 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 intBOUNDING_POLY_FIELD_NUMBERstatic intCONFIDENCE_FIELD_NUMBERstatic intDESCRIPTION_FIELD_NUMBERstatic intLOCALE_FIELD_NUMBERstatic intLOCATIONS_FIELD_NUMBERstatic intMID_FIELD_NUMBERstatic intPROPERTIES_FIELD_NUMBERstatic intSCORE_FIELD_NUMBERstatic intTOPICALITY_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(Object obj)BoundingPolygetBoundingPoly()Image region to which this entity belongs.BoundingPolyOrBuildergetBoundingPolyOrBuilder()Image region to which this entity belongs.floatgetConfidence()Deprecated.google.cloud.vision.v1.EntityAnnotation.confidence is deprecated.static EntityAnnotationgetDefaultInstance()EntityAnnotationgetDefaultInstanceForType()StringgetDescription()Entity textual description, expressed in its `locale` language.com.google.protobuf.ByteStringgetDescriptionBytes()Entity textual description, expressed in its `locale` language.static com.google.protobuf.Descriptors.DescriptorgetDescriptor()StringgetLocale()The language code for the locale in which the entity textual `description` is expressed.com.google.protobuf.ByteStringgetLocaleBytes()The language code for the locale in which the entity textual `description` is expressed.LocationInfogetLocations(int index)The location information for the detected entity.intgetLocationsCount()The location information for the detected entity.List<LocationInfo>getLocationsList()The location information for the detected entity.LocationInfoOrBuildergetLocationsOrBuilder(int index)The location information for the detected entity.List<? extends LocationInfoOrBuilder>getLocationsOrBuilderList()The location information for the detected entity.StringgetMid()Opaque entity ID.com.google.protobuf.ByteStringgetMidBytes()Opaque entity ID.com.google.protobuf.Parser<EntityAnnotation>getParserForType()PropertygetProperties(int index)Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.intgetPropertiesCount()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.PropertyOrBuildergetPropertiesOrBuilder(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.floatgetScore()Overall score of the result.intgetSerializedSize()floatgetTopicality()The relevancy of the ICA (Image Content Annotation) label to the image.booleanhasBoundingPoly()Image region to which this entity belongs.inthashCode()protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static EntityAnnotation.BuildernewBuilder()static EntityAnnotation.BuildernewBuilder(EntityAnnotation prototype)EntityAnnotation.BuildernewBuilderForType()protected EntityAnnotation.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static EntityAnnotationparseDelimitedFrom(InputStream input)static EntityAnnotationparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static EntityAnnotationparseFrom(byte[] data)static EntityAnnotationparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static EntityAnnotationparseFrom(com.google.protobuf.ByteString data)static EntityAnnotationparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static EntityAnnotationparseFrom(com.google.protobuf.CodedInputStream input)static EntityAnnotationparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static EntityAnnotationparseFrom(InputStream input)static EntityAnnotationparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static EntityAnnotationparseFrom(ByteBuffer data)static EntityAnnotationparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<EntityAnnotation>parser()EntityAnnotation.BuildertoBuilder()voidwriteTo(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:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein 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:
getMidin 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:
getMidBytesin 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:
getLocalein 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:
getLocaleBytesin interfaceEntityAnnotationOrBuilder- Returns:
- The bytes for locale.
-
getDescription
public String getDescription()
Entity textual description, expressed in its `locale` language.
string description = 3;- Specified by:
getDescriptionin interfaceEntityAnnotationOrBuilder- Returns:
- The description.
-
getDescriptionBytes
public com.google.protobuf.ByteString getDescriptionBytes()
Entity textual description, expressed in its `locale` language.
string description = 3;- Specified by:
getDescriptionBytesin interfaceEntityAnnotationOrBuilder- Returns:
- The bytes for description.
-
getScore
public float getScore()
Overall score of the result. Range [0, 1].
float score = 4;- Specified by:
getScorein interfaceEntityAnnotationOrBuilder- 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=506**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:
getConfidencein 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:
getTopicalityin interfaceEntityAnnotationOrBuilder- 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:
hasBoundingPolyin 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.v1.BoundingPoly bounding_poly = 7;- Specified by:
getBoundingPolyin interfaceEntityAnnotationOrBuilder- 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:
getBoundingPolyOrBuilderin 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.v1.LocationInfo locations = 8;- Specified by:
getLocationsListin 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.v1.LocationInfo locations = 8;- Specified by:
getLocationsOrBuilderListin 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.v1.LocationInfo locations = 8;- Specified by:
getLocationsCountin 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.v1.LocationInfo locations = 8;- Specified by:
getLocationsin 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.v1.LocationInfo locations = 8;- Specified by:
getLocationsOrBuilderin 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.v1.Property properties = 9;- Specified by:
getPropertiesListin 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.v1.Property properties = 9;- Specified by:
getPropertiesOrBuilderListin 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.v1.Property properties = 9;- Specified by:
getPropertiesCountin 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.v1.Property properties = 9;- Specified by:
getPropertiesin 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.v1.Property properties = 9;- Specified by:
getPropertiesOrBuilderin interfaceEntityAnnotationOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein 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:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein 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:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected EntityAnnotation.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein 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:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public EntityAnnotation getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-