Package com.google.cloud.automl.v1
Enum Document.Layout.TextSegmentType
java.lang.Object
java.lang.Enum<Document.Layout.TextSegmentType>
com.google.cloud.automl.v1.Document.Layout.TextSegmentType
- All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite,com.google.protobuf.ProtocolMessageEnum,Serializable,Comparable<Document.Layout.TextSegmentType>
- Enclosing class:
- Document.Layout
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 Summary
Enum ConstantsEnum ConstantDescriptionThe text segment is a form field.The text segment is the text content part of a form field.The text segment is the name part of a form field.The text segment is a paragraph.The text segment is a whole table, including headers, and all rows.The text segment is a cell in table.The text segment is a table's headers.The text segment is a row in table.Should not be used.The text segment is a token. e.g. word. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe text segment is the text content part of a form field.static final intThe text segment is the name part of a form field.static final intThe text segment is a form field.static final intThe text segment is a paragraph.static final intThe text segment is a cell in table.static final intThe text segment is a table's headers.static final intThe text segment is a row in table.static final intThe text segment is a whole table, including headers, and all rows.static final intShould not be used.static final intThe text segment is a token. e.g. word. -
Method Summary
Modifier and TypeMethodDescriptionforNumber(int value) static com.google.protobuf.Descriptors.EnumDescriptorfinal com.google.protobuf.Descriptors.EnumDescriptorfinal intfinal com.google.protobuf.Descriptors.EnumValueDescriptorstatic com.google.protobuf.Internal.EnumLiteMap<Document.Layout.TextSegmentType>valueOf(int value) Deprecated.valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) Returns the enum constant of this type with the specified 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.
-
Enum Constant Details
-
TEXT_SEGMENT_TYPE_UNSPECIFIED
Should not be used.
TEXT_SEGMENT_TYPE_UNSPECIFIED = 0; -
TOKEN
The text segment is a token. e.g. word.
TOKEN = 1; -
PARAGRAPH
The text segment is a paragraph.
PARAGRAPH = 2; -
FORM_FIELD
The text segment is a form field.
FORM_FIELD = 3; -
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; -
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; -
TABLE
The text segment is a whole table, including headers, and all rows.
TABLE = 6; -
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; -
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; -
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; -
UNRECOGNIZED
-
-
Field Details
-
TEXT_SEGMENT_TYPE_UNSPECIFIED_VALUE
public static final int TEXT_SEGMENT_TYPE_UNSPECIFIED_VALUEShould not be used.
TEXT_SEGMENT_TYPE_UNSPECIFIED = 0;- See Also:
-
TOKEN_VALUE
public static final int TOKEN_VALUEThe text segment is a token. e.g. word.
TOKEN = 1;- See Also:
-
PARAGRAPH_VALUE
public static final int PARAGRAPH_VALUEThe text segment is a paragraph.
PARAGRAPH = 2;- See Also:
-
FORM_FIELD_VALUE
public static final int FORM_FIELD_VALUEThe text segment is a form field.
FORM_FIELD = 3;- See Also:
-
FORM_FIELD_NAME_VALUE
public static final int FORM_FIELD_NAME_VALUEThe 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;- See Also:
-
FORM_FIELD_CONTENTS_VALUE
public static final int FORM_FIELD_CONTENTS_VALUEThe 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;- See Also:
-
TABLE_VALUE
public static final int TABLE_VALUEThe text segment is a whole table, including headers, and all rows.
TABLE = 6;- See Also:
-
TABLE_HEADER_VALUE
public static final int TABLE_HEADER_VALUEThe 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;- See Also:
-
TABLE_ROW_VALUE
public static final int TABLE_ROW_VALUEThe 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;- See Also:
-
TABLE_CELL_VALUE
public static final int TABLE_CELL_VALUEThe 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;- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getNumber
public final int getNumber()- Specified by:
getNumberin interfacecom.google.protobuf.Internal.EnumLite- Specified by:
getNumberin interfacecom.google.protobuf.ProtocolMessageEnum
-
valueOf
Deprecated.Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
value- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
forNumber
- Parameters:
value- The numeric wire value of the corresponding enum entry.- Returns:
- The enum associated with the given numeric wire value.
-
internalGetValueMap
public static com.google.protobuf.Internal.EnumLiteMap<Document.Layout.TextSegmentType> internalGetValueMap() -
getValueDescriptor
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()- Specified by:
getValueDescriptorin interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptor
public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() -
valueOf
public static Document.Layout.TextSegmentType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
desc- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-