Package com.google.cloud.vision.v1
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 ClassesModifier and TypeClassDescriptionstatic final classSet 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.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanImage region to which this entity belongs.Image region to which this entity belongs.floatDeprecated.google.cloud.vision.v1.EntityAnnotation.confidence is deprecated.static EntityAnnotationEntity textual description, expressed in its `locale` language.com.google.protobuf.ByteStringEntity textual description, expressed in its `locale` language.static final com.google.protobuf.Descriptors.DescriptorThe language code for the locale in which the entity textual `description` is expressed.com.google.protobuf.ByteStringThe language code for the locale in which the entity textual `description` is expressed.getLocations(int index) The location information for the detected entity.intThe location information for the detected entity.The location information for the detected entity.getLocationsOrBuilder(int index) The location information for the detected entity.List<? extends LocationInfoOrBuilder>The location information for the detected entity.getMid()Opaque entity ID.com.google.protobuf.ByteStringOpaque 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.intSome 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.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>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.intfloatThe relevancy of the ICA (Image Content Annotation) label to the image.booleanImage region to which this entity belongs.inthashCode()protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic EntityAnnotation.Builderstatic EntityAnnotation.BuildernewBuilder(EntityAnnotation prototype) protected EntityAnnotation.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) 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()voidwriteTo(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, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
MID_FIELD_NUMBER
public static final int MID_FIELD_NUMBER- See Also:
-
LOCALE_FIELD_NUMBER
public static final int LOCALE_FIELD_NUMBER- See Also:
-
DESCRIPTION_FIELD_NUMBER
public static final int DESCRIPTION_FIELD_NUMBER- See Also:
-
SCORE_FIELD_NUMBER
public static final int SCORE_FIELD_NUMBER- See Also:
-
CONFIDENCE_FIELD_NUMBER
public static final int CONFIDENCE_FIELD_NUMBER- See Also:
-
TOPICALITY_FIELD_NUMBER
public static final int TOPICALITY_FIELD_NUMBER- See Also:
-
BOUNDING_POLY_FIELD_NUMBER
public static final int BOUNDING_POLY_FIELD_NUMBER- See Also:
-
LOCATIONS_FIELD_NUMBER
public static final int LOCATIONS_FIELD_NUMBER- See Also:
-
PROPERTIES_FIELD_NUMBER
public static final int PROPERTIES_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
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
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
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.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:
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
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
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
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
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
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
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
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
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
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
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.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- 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
- Throws:
IOException
-
parseFrom
public static EntityAnnotation parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- 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
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected EntityAnnotation.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-