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 Details

    • TEXT_SEGMENT_TYPE_UNSPECIFIED

      public static final Document.Layout.TextSegmentType TEXT_SEGMENT_TYPE_UNSPECIFIED
       Should not be used.
       
      TEXT_SEGMENT_TYPE_UNSPECIFIED = 0;
    • TOKEN

      public static final Document.Layout.TextSegmentType TOKEN
       The text segment is a token. e.g. word.
       
      TOKEN = 1;
    • PARAGRAPH

      public static final Document.Layout.TextSegmentType PARAGRAPH
       The text segment is a paragraph.
       
      PARAGRAPH = 2;
    • FORM_FIELD

      public static final Document.Layout.TextSegmentType FORM_FIELD
       The text segment is a form field.
       
      FORM_FIELD = 3;
    • FORM_FIELD_NAME

      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;
    • FORM_FIELD_CONTENTS

      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;
    • TABLE

      public static final Document.Layout.TextSegmentType TABLE
       The text segment is a whole table, including headers, and all rows.
       
      TABLE = 6;
    • TABLE_HEADER

      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;
    • TABLE_ROW

      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;
    • TABLE_CELL

      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;
    • UNRECOGNIZED

      public static final Document.Layout.TextSegmentType UNRECOGNIZED
  • Field Details

    • TEXT_SEGMENT_TYPE_UNSPECIFIED_VALUE

      public static final int TEXT_SEGMENT_TYPE_UNSPECIFIED_VALUE
       Should not be used.
       
      TEXT_SEGMENT_TYPE_UNSPECIFIED = 0;
      See Also:
    • TOKEN_VALUE

      public static final int TOKEN_VALUE
       The text segment is a token. e.g. word.
       
      TOKEN = 1;
      See Also:
    • PARAGRAPH_VALUE

      public static final int PARAGRAPH_VALUE
       The text segment is a paragraph.
       
      PARAGRAPH = 2;
      See Also:
    • FORM_FIELD_VALUE

      public static final int FORM_FIELD_VALUE
       The text segment is a form field.
       
      FORM_FIELD = 3;
      See Also:
    • FORM_FIELD_NAME_VALUE

      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;
      See Also:
    • FORM_FIELD_CONTENTS_VALUE

      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;
      See Also:
    • TABLE_VALUE

      public static final int TABLE_VALUE
       The text segment is a whole table, including headers, and all rows.
       
      TABLE = 6;
      See Also:
    • TABLE_HEADER_VALUE

      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;
      See Also:
    • TABLE_ROW_VALUE

      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;
      See Also:
    • TABLE_CELL_VALUE

      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;
      See Also:
  • Method Details

    • values

      public static Document.Layout.TextSegmentType[] 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

      public static Document.Layout.TextSegmentType valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getNumber

      public final int getNumber()
      Specified by:
      getNumber in interface com.google.protobuf.Internal.EnumLite
      Specified by:
      getNumber in interface com.google.protobuf.ProtocolMessageEnum
    • valueOf

      @Deprecated public static Document.Layout.TextSegmentType valueOf(int value)
      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 name
      NullPointerException - if the argument is null
    • forNumber

      public static Document.Layout.TextSegmentType forNumber(int value)
      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:
      getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptorForType

      public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.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 name
      NullPointerException - if the argument is null