Class DocumentSchema.EntityType (2.7.2)

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.v1beta3.DocumentSchema.EntityType

Static Fields

BASE_TYPES_FIELD_NUMBER

public static final int BASE_TYPES_FIELD_NUMBER
Field Value
TypeDescription
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

ENUM_VALUES_FIELD_NUMBER

public static final int ENUM_VALUES_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

PROPERTIES_FIELD_NUMBER

public static final int PROPERTIES_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static DocumentSchema.EntityType getDefaultInstance()
Returns
TypeDescription
DocumentSchema.EntityType

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static DocumentSchema.EntityType.Builder newBuilder()
Returns
TypeDescription
DocumentSchema.EntityType.Builder

newBuilder(DocumentSchema.EntityType prototype)

public static DocumentSchema.EntityType.Builder newBuilder(DocumentSchema.EntityType prototype)
Parameter
NameDescription
prototypeDocumentSchema.EntityType
Returns
TypeDescription
DocumentSchema.EntityType.Builder

parseDelimitedFrom(InputStream input)

public static DocumentSchema.EntityType parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
DocumentSchema.EntityType
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DocumentSchema.EntityType parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DocumentSchema.EntityType
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static DocumentSchema.EntityType parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
DocumentSchema.EntityType
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static DocumentSchema.EntityType parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DocumentSchema.EntityType
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static DocumentSchema.EntityType parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
DocumentSchema.EntityType
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static DocumentSchema.EntityType parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DocumentSchema.EntityType
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static DocumentSchema.EntityType parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
DocumentSchema.EntityType
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static DocumentSchema.EntityType parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DocumentSchema.EntityType
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static DocumentSchema.EntityType parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
DocumentSchema.EntityType
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DocumentSchema.EntityType parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DocumentSchema.EntityType
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static DocumentSchema.EntityType parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
DocumentSchema.EntityType
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static DocumentSchema.EntityType parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DocumentSchema.EntityType
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

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

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ProtocolStringList

A list containing the baseTypes.

getDefaultInstanceForType()

public DocumentSchema.EntityType getDefaultInstanceForType()
Returns
TypeDescription
DocumentSchema.EntityType

getDisplayName()

public String getDisplayName()

User defined name for the type.

string display_name = 13;

Returns
TypeDescription
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

User defined name for the type.

string display_name = 13;

Returns
TypeDescription
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.v1beta3.DocumentSchema.EntityType.EnumValues enum_values = 14;

Returns
TypeDescription
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.v1beta3.DocumentSchema.EntityType.EnumValues enum_values = 14;

Returns
TypeDescription
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'. Besides that we use the following naming conventions:

  • use snake_casing
  • name matching is case-insensitive
  • 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
TypeDescription
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'. Besides that we use the following naming conventions:

  • use snake_casing
  • name matching is case-insensitive
  • 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
TypeDescription
ByteString

The bytes for name.

getParserForType()

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

getProperties(int index)

public DocumentSchema.EntityType.Property getProperties(int index)

Describing the nested structure, or composition of an entity.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
DocumentSchema.EntityType.Property

getPropertiesCount()

public int getPropertiesCount()

Describing the nested structure, or composition of an entity.

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

Returns
TypeDescription
int

getPropertiesList()

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

Describing the nested structure, or composition of an entity.

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

Returns
TypeDescription
List<Property>

getPropertiesOrBuilder(int index)

public DocumentSchema.EntityType.PropertyOrBuilder getPropertiesOrBuilder(int index)

Describing the nested structure, or composition of an entity.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
DocumentSchema.EntityType.PropertyOrBuilder

getPropertiesOrBuilderList()

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

Describing the nested structure, or composition of an entity.

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

Returns
TypeDescription
List<? extends com.google.cloud.documentai.v1beta3.DocumentSchema.EntityType.PropertyOrBuilder>

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

getValueSourceCase()

public DocumentSchema.EntityType.ValueSourceCase getValueSourceCase()
Returns
TypeDescription
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.v1beta3.DocumentSchema.EntityType.EnumValues enum_values = 14;

Returns
TypeDescription
boolean

Whether the enumValues field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public DocumentSchema.EntityType.Builder newBuilderForType()
Returns
TypeDescription
DocumentSchema.EntityType.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected DocumentSchema.EntityType.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
DocumentSchema.EntityType.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public DocumentSchema.EntityType.Builder toBuilder()
Returns
TypeDescription
DocumentSchema.EntityType.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException