Class DocumentSchema.EntityType (2.46.0)

public static final class DocumentSchema.EntityType extends GeneratedMessageV3 implements DocumentSchema.EntityTypeOrBuilder

EntityType is the wrapper of a label of the corresponding model with detailed attributes and limitations for entity-based processors. Multiple types can also compose a dependency tree to represent nested types.

Protobuf type google.cloud.documentai.v1.DocumentSchema.EntityType

Static Fields

BASE_TYPES_FIELD_NUMBER

public static final int BASE_TYPES_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

ENUM_VALUES_FIELD_NUMBER

public static final int ENUM_VALUES_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

PROPERTIES_FIELD_NUMBER

public static final int PROPERTIES_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static DocumentSchema.EntityType getDefaultInstance()
Returns
Type Description
DocumentSchema.EntityType

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static DocumentSchema.EntityType.Builder newBuilder()
Returns
Type Description
DocumentSchema.EntityType.Builder

newBuilder(DocumentSchema.EntityType prototype)

public static DocumentSchema.EntityType.Builder newBuilder(DocumentSchema.EntityType prototype)
Parameter
Name Description
prototype DocumentSchema.EntityType
Returns
Type Description
DocumentSchema.EntityType.Builder

parseDelimitedFrom(InputStream input)

public static DocumentSchema.EntityType parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
DocumentSchema.EntityType
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DocumentSchema.EntityType parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DocumentSchema.EntityType
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static DocumentSchema.EntityType parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
DocumentSchema.EntityType
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static DocumentSchema.EntityType parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DocumentSchema.EntityType
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static DocumentSchema.EntityType parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
DocumentSchema.EntityType
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static DocumentSchema.EntityType parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DocumentSchema.EntityType
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static DocumentSchema.EntityType parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
DocumentSchema.EntityType
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static DocumentSchema.EntityType parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DocumentSchema.EntityType
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static DocumentSchema.EntityType parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
DocumentSchema.EntityType
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DocumentSchema.EntityType parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DocumentSchema.EntityType
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static DocumentSchema.EntityType parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
DocumentSchema.EntityType
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static DocumentSchema.EntityType parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DocumentSchema.EntityType
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<DocumentSchema.EntityType> parser()
Returns
Type Description
Parser<EntityType>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getBaseTypes(int index)

public String getBaseTypes(int index)

The entity type that this type is derived from. For now, one and only one should be set.

repeated string base_types = 2;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The baseTypes at the given index.

getBaseTypesBytes(int index)

public ByteString getBaseTypesBytes(int index)

The entity type that this type is derived from. For now, one and only one should be set.

repeated string base_types = 2;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the baseTypes at the given index.

getBaseTypesCount()

public int getBaseTypesCount()

The entity type that this type is derived from. For now, one and only one should be set.

repeated string base_types = 2;

Returns
Type Description
int

The count of baseTypes.

getBaseTypesList()

public ProtocolStringList getBaseTypesList()

The entity type that this type is derived from. For now, one and only one should be set.

repeated string base_types = 2;

Returns
Type Description
ProtocolStringList

A list containing the baseTypes.

getDefaultInstanceForType()

public DocumentSchema.EntityType getDefaultInstanceForType()
Returns
Type Description
DocumentSchema.EntityType

getDisplayName()

public String getDisplayName()

User defined name for the type.

string display_name = 13;

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

User defined name for the type.

string display_name = 13;

Returns
Type Description
ByteString

The bytes for displayName.

getEnumValues()

public DocumentSchema.EntityType.EnumValues getEnumValues()

If specified, lists all the possible values for this entity. This should not be more than a handful of values. If the number of values is >10 or could change frequently use the EntityType.value_ontology field and specify a list of all possible values in a value ontology file.

.google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues enum_values = 14;

Returns
Type Description
DocumentSchema.EntityType.EnumValues

The enumValues.

getEnumValuesOrBuilder()

public DocumentSchema.EntityType.EnumValuesOrBuilder getEnumValuesOrBuilder()

If specified, lists all the possible values for this entity. This should not be more than a handful of values. If the number of values is >10 or could change frequently use the EntityType.value_ontology field and specify a list of all possible values in a value ontology file.

.google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues enum_values = 14;

Returns
Type Description
DocumentSchema.EntityType.EnumValuesOrBuilder

getName()

public String getName()

Name of the type. It must be unique within the schema file and cannot be a "Common Type". The following naming conventions are used:

  • Use snake_casing.
  • Name matching is case-sensitive.
  • Maximum 64 characters.
  • Must start with a letter.
  • Allowed characters: ASCII letters [a-z0-9_-]. (For backward compatibility internal infrastructure and tooling can handle any ascii character.)
  • The / is sometimes used to denote a property of a type. For example line_item/amount. This convention is deprecated, but will still be honored for backward compatibility.

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Name of the type. It must be unique within the schema file and cannot be a "Common Type". The following naming conventions are used:

  • Use snake_casing.
  • Name matching is case-sensitive.
  • Maximum 64 characters.
  • Must start with a letter.
  • Allowed characters: ASCII letters [a-z0-9_-]. (For backward compatibility internal infrastructure and tooling can handle any ascii character.)
  • The / is sometimes used to denote a property of a type. For example line_item/amount. This convention is deprecated, but will still be honored for backward compatibility.

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<DocumentSchema.EntityType> getParserForType()
Returns
Type Description
Parser<EntityType>
Overrides

getProperties(int index)

public DocumentSchema.EntityType.Property getProperties(int index)

Description the nested structure, or composition of an entity.

repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6;

Parameter
Name Description
index int
Returns
Type Description
DocumentSchema.EntityType.Property

getPropertiesCount()

public int getPropertiesCount()

Description the nested structure, or composition of an entity.

repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6;

Returns
Type Description
int

getPropertiesList()

public List<DocumentSchema.EntityType.Property> getPropertiesList()

Description the nested structure, or composition of an entity.

repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6;

Returns
Type Description
List<Property>

getPropertiesOrBuilder(int index)

public DocumentSchema.EntityType.PropertyOrBuilder getPropertiesOrBuilder(int index)

Description the nested structure, or composition of an entity.

repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6;

Parameter
Name Description
index int
Returns
Type Description
DocumentSchema.EntityType.PropertyOrBuilder

getPropertiesOrBuilderList()

public List<? extends DocumentSchema.EntityType.PropertyOrBuilder> getPropertiesOrBuilderList()

Description the nested structure, or composition of an entity.

repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6;

Returns
Type Description
List<? extends com.google.cloud.documentai.v1.DocumentSchema.EntityType.PropertyOrBuilder>

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getValueSourceCase()

public DocumentSchema.EntityType.ValueSourceCase getValueSourceCase()
Returns
Type Description
DocumentSchema.EntityType.ValueSourceCase

hasEnumValues()

public boolean hasEnumValues()

If specified, lists all the possible values for this entity. This should not be more than a handful of values. If the number of values is >10 or could change frequently use the EntityType.value_ontology field and specify a list of all possible values in a value ontology file.

.google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues enum_values = 14;

Returns
Type Description
boolean

Whether the enumValues field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public DocumentSchema.EntityType.Builder newBuilderForType()
Returns
Type Description
DocumentSchema.EntityType.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected DocumentSchema.EntityType.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
DocumentSchema.EntityType.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public DocumentSchema.EntityType.Builder toBuilder()
Returns
Type Description
DocumentSchema.EntityType.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException