public static enum Document.Layout.TextSegmentType extends Enum<Document.Layout.TextSegmentType> implements com.google.protobuf.ProtocolMessageEnum
The type of TextSegment in the context of the original document.Protobuf enum
google.cloud.automl.v1.Document.Layout.TextSegmentType| Enum Constant and Description |
|---|
FORM_FIELD
The text segment is a form field.
|
FORM_FIELD_CONTENTS
The text segment is the text content part of a form field.
|
FORM_FIELD_NAME
The text segment is the name part of a form field.
|
PARAGRAPH
The text segment is a paragraph.
|
TABLE
The text segment is a whole table, including headers, and all rows.
|
TABLE_CELL
The text segment is a cell in table.
|
TABLE_HEADER
The text segment is a table's headers.
|
TABLE_ROW
The text segment is a row in table.
|
TEXT_SEGMENT_TYPE_UNSPECIFIED
Should not be used.
|
TOKEN
The text segment is a token. e.g. word.
|
UNRECOGNIZED |
| Modifier and Type | Field and Description |
|---|---|
static int |
FORM_FIELD_CONTENTS_VALUE
The text segment is the text content part of a form field.
|
static int |
FORM_FIELD_NAME_VALUE
The text segment is the name part of a form field.
|
static int |
FORM_FIELD_VALUE
The text segment is a form field.
|
static int |
PARAGRAPH_VALUE
The text segment is a paragraph.
|
static int |
TABLE_CELL_VALUE
The text segment is a cell in table.
|
static int |
TABLE_HEADER_VALUE
The text segment is a table's headers.
|
static int |
TABLE_ROW_VALUE
The text segment is a row in table.
|
static int |
TABLE_VALUE
The text segment is a whole table, including headers, and all rows.
|
static int |
TEXT_SEGMENT_TYPE_UNSPECIFIED_VALUE
Should not be used.
|
static int |
TOKEN_VALUE
The text segment is a token. e.g. word.
|
| Modifier and Type | Method and Description |
|---|---|
static Document.Layout.TextSegmentType |
forNumber(int value) |
static com.google.protobuf.Descriptors.EnumDescriptor |
getDescriptor() |
com.google.protobuf.Descriptors.EnumDescriptor |
getDescriptorForType() |
int |
getNumber() |
com.google.protobuf.Descriptors.EnumValueDescriptor |
getValueDescriptor() |
static com.google.protobuf.Internal.EnumLiteMap<Document.Layout.TextSegmentType> |
internalGetValueMap() |
static Document.Layout.TextSegmentType |
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) |
static Document.Layout.TextSegmentType |
valueOf(int value)
Deprecated.
Use
forNumber(int) instead. |
static Document.Layout.TextSegmentType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Document.Layout.TextSegmentType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Document.Layout.TextSegmentType TEXT_SEGMENT_TYPE_UNSPECIFIED
Should not be used.
TEXT_SEGMENT_TYPE_UNSPECIFIED = 0;public static final Document.Layout.TextSegmentType TOKEN
The text segment is a token. e.g. word.
TOKEN = 1;public static final Document.Layout.TextSegmentType PARAGRAPH
The text segment is a paragraph.
PARAGRAPH = 2;public static final Document.Layout.TextSegmentType FORM_FIELD
The text segment is a form field.
FORM_FIELD = 3;public static final Document.Layout.TextSegmentType FORM_FIELD_NAME
The text segment is the name part of a form field. It will be treated as child of another FORM_FIELD TextSegment if its span is subspan of another TextSegment with type FORM_FIELD.
FORM_FIELD_NAME = 4;public static final Document.Layout.TextSegmentType FORM_FIELD_CONTENTS
The text segment is the text content part of a form field. It will be treated as child of another FORM_FIELD TextSegment if its span is subspan of another TextSegment with type FORM_FIELD.
FORM_FIELD_CONTENTS = 5;public static final Document.Layout.TextSegmentType TABLE
The text segment is a whole table, including headers, and all rows.
TABLE = 6;public static final Document.Layout.TextSegmentType TABLE_HEADER
The text segment is a table's headers. It will be treated as child of another TABLE TextSegment if its span is subspan of another TextSegment with type TABLE.
TABLE_HEADER = 7;public static final Document.Layout.TextSegmentType TABLE_ROW
The text segment is a row in table. It will be treated as child of another TABLE TextSegment if its span is subspan of another TextSegment with type TABLE.
TABLE_ROW = 8;public static final Document.Layout.TextSegmentType TABLE_CELL
The text segment is a cell in table. It will be treated as child of another TABLE_ROW TextSegment if its span is subspan of another TextSegment with type TABLE_ROW.
TABLE_CELL = 9;public static final Document.Layout.TextSegmentType UNRECOGNIZED
public static final int TEXT_SEGMENT_TYPE_UNSPECIFIED_VALUE
Should not be used.
TEXT_SEGMENT_TYPE_UNSPECIFIED = 0;public static final int TOKEN_VALUE
The text segment is a token. e.g. word.
TOKEN = 1;public static final int PARAGRAPH_VALUE
The text segment is a paragraph.
PARAGRAPH = 2;public static final int FORM_FIELD_VALUE
The text segment is a form field.
FORM_FIELD = 3;public static final int FORM_FIELD_NAME_VALUE
The text segment is the name part of a form field. It will be treated as child of another FORM_FIELD TextSegment if its span is subspan of another TextSegment with type FORM_FIELD.
FORM_FIELD_NAME = 4;public static final int FORM_FIELD_CONTENTS_VALUE
The text segment is the text content part of a form field. It will be treated as child of another FORM_FIELD TextSegment if its span is subspan of another TextSegment with type FORM_FIELD.
FORM_FIELD_CONTENTS = 5;public static final int TABLE_VALUE
The text segment is a whole table, including headers, and all rows.
TABLE = 6;public static final int TABLE_HEADER_VALUE
The text segment is a table's headers. It will be treated as child of another TABLE TextSegment if its span is subspan of another TextSegment with type TABLE.
TABLE_HEADER = 7;public static final int TABLE_ROW_VALUE
The text segment is a row in table. It will be treated as child of another TABLE TextSegment if its span is subspan of another TextSegment with type TABLE.
TABLE_ROW = 8;public static final int TABLE_CELL_VALUE
The text segment is a cell in table. It will be treated as child of another TABLE_ROW TextSegment if its span is subspan of another TextSegment with type TABLE_ROW.
TABLE_CELL = 9;public static Document.Layout.TextSegmentType[] values()
for (Document.Layout.TextSegmentType c : Document.Layout.TextSegmentType.values()) System.out.println(c);
public static Document.Layout.TextSegmentType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic final int getNumber()
getNumber in interface com.google.protobuf.Internal.EnumLitegetNumber in interface com.google.protobuf.ProtocolMessageEnum@Deprecated public static Document.Layout.TextSegmentType valueOf(int value)
forNumber(int) instead.value - The numeric wire value of the corresponding enum entry.public static Document.Layout.TextSegmentType forNumber(int value)
value - The numeric wire value of the corresponding enum entry.public static com.google.protobuf.Internal.EnumLiteMap<Document.Layout.TextSegmentType> internalGetValueMap()
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnumpublic final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnumpublic static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
public static Document.Layout.TextSegmentType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
Copyright © 2025 Google LLC. All rights reserved.