Package com.google.cloud.documentai.v1
Class Document.Entity
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.documentai.v1.Document.Entity
- All Implemented Interfaces:
Document.EntityOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
- Enclosing class:
- Document
public static final class Document.Entity
extends com.google.protobuf.GeneratedMessage
implements Document.EntityOrBuilder
An entity that could be a phrase in the text or a property that belongs to the document. It is a known entity type, such as a person, an organization, or location.Protobuf type
google.cloud.documentai.v1.Document.Entity- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAn entity that could be a phrase in the text or a property that belongs to the document.static enumSpecifies how the entity's value is obtained.static final classParsed and normalized entity value.static interfaceNested 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 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 TypeMethodDescriptionbooleanfloatOptional.static Document.Entitystatic final com.google.protobuf.Descriptors.DescriptorgetId()Optional.com.google.protobuf.ByteStringOptional.Optional.com.google.protobuf.ByteStringOptional.Optional.com.google.protobuf.ByteStringOptional.Optional.intOptional.Optional.Optional.Optional.Optional.com.google.protobuf.Parser<Document.Entity>getProperties(int index) Optional.intOptional.Optional.getPropertiesOrBuilder(int index) Optional.List<? extends Document.EntityOrBuilder>Optional.Optional.Optional.booleanOptional.intOptional.Optional.getType()Required.com.google.protobuf.ByteStringRequired.inthashCode()booleanOptional.booleanOptional.booleanOptional.booleanOptional.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic Document.Entity.Builderstatic Document.Entity.BuildernewBuilder(Document.Entity prototype) protected Document.Entity.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static Document.EntityparseDelimitedFrom(InputStream input) static Document.EntityparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Document.EntityparseFrom(byte[] data) static Document.EntityparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Document.EntityparseFrom(com.google.protobuf.ByteString data) static Document.EntityparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Document.EntityparseFrom(com.google.protobuf.CodedInputStream input) static Document.EntityparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Document.EntityparseFrom(InputStream input) static Document.EntityparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Document.EntityparseFrom(ByteBuffer data) static Document.EntityparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<Document.Entity>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
-
TEXT_ANCHOR_FIELD_NUMBER
public static final int TEXT_ANCHOR_FIELD_NUMBER- See Also:
-
TYPE_FIELD_NUMBER
public static final int TYPE_FIELD_NUMBER- See Also:
-
MENTION_TEXT_FIELD_NUMBER
public static final int MENTION_TEXT_FIELD_NUMBER- See Also:
-
MENTION_ID_FIELD_NUMBER
public static final int MENTION_ID_FIELD_NUMBER- See Also:
-
CONFIDENCE_FIELD_NUMBER
public static final int CONFIDENCE_FIELD_NUMBER- See Also:
-
PAGE_ANCHOR_FIELD_NUMBER
public static final int PAGE_ANCHOR_FIELD_NUMBER- See Also:
-
ID_FIELD_NUMBER
public static final int ID_FIELD_NUMBER- See Also:
-
NORMALIZED_VALUE_FIELD_NUMBER
public static final int NORMALIZED_VALUE_FIELD_NUMBER- See Also:
-
PROPERTIES_FIELD_NUMBER
public static final int PROPERTIES_FIELD_NUMBER- See Also:
-
PROVENANCE_FIELD_NUMBER
public static final int PROVENANCE_FIELD_NUMBER- See Also:
-
REDACTED_FIELD_NUMBER
public static final int REDACTED_FIELD_NUMBER- See Also:
-
METHOD_FIELD_NUMBER
public static final int METHOD_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
-
hasTextAnchor
public boolean hasTextAnchor()Optional. Provenance of the entity. Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text].
.google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasTextAnchorin interfaceDocument.EntityOrBuilder- Returns:
- Whether the textAnchor field is set.
-
getTextAnchor
Optional. Provenance of the entity. Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text].
.google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getTextAnchorin interfaceDocument.EntityOrBuilder- Returns:
- The textAnchor.
-
getTextAnchorOrBuilder
Optional. Provenance of the entity. Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text].
.google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getTextAnchorOrBuilderin interfaceDocument.EntityOrBuilder
-
getType
Required. Entity type from a schema, for example, `Address`.
string type = 2 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getTypein interfaceDocument.EntityOrBuilder- Returns:
- The type.
-
getTypeBytes
public com.google.protobuf.ByteString getTypeBytes()Required. Entity type from a schema, for example, `Address`.
string type = 2 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getTypeBytesin interfaceDocument.EntityOrBuilder- Returns:
- The bytes for type.
-
getMentionText
Optional. Text value of the entity, for example, `1600 Amphitheatre Pkwy`.
string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getMentionTextin interfaceDocument.EntityOrBuilder- Returns:
- The mentionText.
-
getMentionTextBytes
public com.google.protobuf.ByteString getMentionTextBytes()Optional. Text value of the entity, for example, `1600 Amphitheatre Pkwy`.
string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getMentionTextBytesin interfaceDocument.EntityOrBuilder- Returns:
- The bytes for mentionText.
-
getMentionId
Optional. Deprecated. Use `id` field instead.
string mention_id = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getMentionIdin interfaceDocument.EntityOrBuilder- Returns:
- The mentionId.
-
getMentionIdBytes
public com.google.protobuf.ByteString getMentionIdBytes()Optional. Deprecated. Use `id` field instead.
string mention_id = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getMentionIdBytesin interfaceDocument.EntityOrBuilder- Returns:
- The bytes for mentionId.
-
getConfidence
public float getConfidence()Optional. Confidence of detected Schema entity. Range `[0, 1]`.
float confidence = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getConfidencein interfaceDocument.EntityOrBuilder- Returns:
- The confidence.
-
hasPageAnchor
public boolean hasPageAnchor()Optional. Represents the provenance of this entity wrt. the location on the page where it was found.
.google.cloud.documentai.v1.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasPageAnchorin interfaceDocument.EntityOrBuilder- Returns:
- Whether the pageAnchor field is set.
-
getPageAnchor
Optional. Represents the provenance of this entity wrt. the location on the page where it was found.
.google.cloud.documentai.v1.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getPageAnchorin interfaceDocument.EntityOrBuilder- Returns:
- The pageAnchor.
-
getPageAnchorOrBuilder
Optional. Represents the provenance of this entity wrt. the location on the page where it was found.
.google.cloud.documentai.v1.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getPageAnchorOrBuilderin interfaceDocument.EntityOrBuilder
-
getId
Optional. Canonical id. This will be a unique value in the entity list for this document.
string id = 7 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getIdin interfaceDocument.EntityOrBuilder- Returns:
- The id.
-
getIdBytes
public com.google.protobuf.ByteString getIdBytes()Optional. Canonical id. This will be a unique value in the entity list for this document.
string id = 7 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getIdBytesin interfaceDocument.EntityOrBuilder- Returns:
- The bytes for id.
-
hasNormalizedValue
public boolean hasNormalizedValue()Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (for example, address) is not supported for certain parsers. This field is also only populated for certain supported document types.
.google.cloud.documentai.v1.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasNormalizedValuein interfaceDocument.EntityOrBuilder- Returns:
- Whether the normalizedValue field is set.
-
getNormalizedValue
Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (for example, address) is not supported for certain parsers. This field is also only populated for certain supported document types.
.google.cloud.documentai.v1.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getNormalizedValuein interfaceDocument.EntityOrBuilder- Returns:
- The normalizedValue.
-
getNormalizedValueOrBuilder
Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (for example, address) is not supported for certain parsers. This field is also only populated for certain supported document types.
.google.cloud.documentai.v1.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getNormalizedValueOrBuilderin interfaceDocument.EntityOrBuilder
-
getPropertiesList
Optional. Entities can be nested to form a hierarchical data structure representing the content in the document.
repeated .google.cloud.documentai.v1.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getPropertiesListin interfaceDocument.EntityOrBuilder
-
getPropertiesOrBuilderList
Optional. Entities can be nested to form a hierarchical data structure representing the content in the document.
repeated .google.cloud.documentai.v1.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getPropertiesOrBuilderListin interfaceDocument.EntityOrBuilder
-
getPropertiesCount
public int getPropertiesCount()Optional. Entities can be nested to form a hierarchical data structure representing the content in the document.
repeated .google.cloud.documentai.v1.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getPropertiesCountin interfaceDocument.EntityOrBuilder
-
getProperties
Optional. Entities can be nested to form a hierarchical data structure representing the content in the document.
repeated .google.cloud.documentai.v1.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getPropertiesin interfaceDocument.EntityOrBuilder
-
getPropertiesOrBuilder
Optional. Entities can be nested to form a hierarchical data structure representing the content in the document.
repeated .google.cloud.documentai.v1.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getPropertiesOrBuilderin interfaceDocument.EntityOrBuilder
-
hasProvenance
public boolean hasProvenance()Optional. The history of this annotation.
.google.cloud.documentai.v1.Document.Provenance provenance = 11 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasProvenancein interfaceDocument.EntityOrBuilder- Returns:
- Whether the provenance field is set.
-
getProvenance
Optional. The history of this annotation.
.google.cloud.documentai.v1.Document.Provenance provenance = 11 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getProvenancein interfaceDocument.EntityOrBuilder- Returns:
- The provenance.
-
getProvenanceOrBuilder
Optional. The history of this annotation.
.google.cloud.documentai.v1.Document.Provenance provenance = 11 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getProvenanceOrBuilderin interfaceDocument.EntityOrBuilder
-
getRedacted
public boolean getRedacted()Optional. Whether the entity will be redacted for de-identification purposes.
bool redacted = 12 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getRedactedin interfaceDocument.EntityOrBuilder- Returns:
- The redacted.
-
getMethodValue
public int getMethodValue()Optional. Specifies how the entity's value is obtained.
.google.cloud.documentai.v1.Document.Entity.Method method = 15 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getMethodValuein interfaceDocument.EntityOrBuilder- Returns:
- The enum numeric value on the wire for method.
-
getMethod
Optional. Specifies how the entity's value is obtained.
.google.cloud.documentai.v1.Document.Entity.Method method = 15 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getMethodin interfaceDocument.EntityOrBuilder- Returns:
- The method.
-
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 Document.Entity parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Document.Entity parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Document.Entity parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Document.Entity parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Document.Entity parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Document.Entity parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Document.Entity parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Document.Entity parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static Document.Entity parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static Document.Entity 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 Document.Entity.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
-