Class Document.Page.Token.StyleInfo

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.documentai.v1.Document.Page.Token.StyleInfo
All Implemented Interfaces:
Document.Page.Token.StyleInfoOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
Enclosing class:
Document.Page.Token

public static final class Document.Page.Token.StyleInfo extends com.google.protobuf.GeneratedMessage implements Document.Page.Token.StyleInfoOrBuilder
 Font and other text style attributes.
 
Protobuf type google.cloud.documentai.v1.Document.Page.Token.StyleInfo
See Also:
  • Field Details

    • FONT_SIZE_FIELD_NUMBER

      public static final int FONT_SIZE_FIELD_NUMBER
      See Also:
    • PIXEL_FONT_SIZE_FIELD_NUMBER

      public static final int PIXEL_FONT_SIZE_FIELD_NUMBER
      See Also:
    • LETTER_SPACING_FIELD_NUMBER

      public static final int LETTER_SPACING_FIELD_NUMBER
      See Also:
    • FONT_TYPE_FIELD_NUMBER

      public static final int FONT_TYPE_FIELD_NUMBER
      See Also:
    • BOLD_FIELD_NUMBER

      public static final int BOLD_FIELD_NUMBER
      See Also:
    • ITALIC_FIELD_NUMBER

      public static final int ITALIC_FIELD_NUMBER
      See Also:
    • UNDERLINED_FIELD_NUMBER

      public static final int UNDERLINED_FIELD_NUMBER
      See Also:
    • STRIKEOUT_FIELD_NUMBER

      public static final int STRIKEOUT_FIELD_NUMBER
      See Also:
    • SUBSCRIPT_FIELD_NUMBER

      public static final int SUBSCRIPT_FIELD_NUMBER
      See Also:
    • SUPERSCRIPT_FIELD_NUMBER

      public static final int SUPERSCRIPT_FIELD_NUMBER
      See Also:
    • SMALLCAPS_FIELD_NUMBER

      public static final int SMALLCAPS_FIELD_NUMBER
      See Also:
    • FONT_WEIGHT_FIELD_NUMBER

      public static final int FONT_WEIGHT_FIELD_NUMBER
      See Also:
    • HANDWRITTEN_FIELD_NUMBER

      public static final int HANDWRITTEN_FIELD_NUMBER
      See Also:
    • TEXT_COLOR_FIELD_NUMBER

      public static final int TEXT_COLOR_FIELD_NUMBER
      See Also:
    • BACKGROUND_COLOR_FIELD_NUMBER

      public static final int BACKGROUND_COLOR_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getFontSize

      public int getFontSize()
       Font size in points (`1` point is `¹⁄₇₂` inches).
       
      int32 font_size = 1;
      Specified by:
      getFontSize in interface Document.Page.Token.StyleInfoOrBuilder
      Returns:
      The fontSize.
    • getPixelFontSize

      public double getPixelFontSize()
       Font size in pixels, equal to _unrounded
       [font_size][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_size]_
       * _resolution_ ÷ `72.0`.
       
      double pixel_font_size = 2;
      Specified by:
      getPixelFontSize in interface Document.Page.Token.StyleInfoOrBuilder
      Returns:
      The pixelFontSize.
    • getLetterSpacing

      public double getLetterSpacing()
       Letter spacing in points.
       
      double letter_spacing = 3;
      Specified by:
      getLetterSpacing in interface Document.Page.Token.StyleInfoOrBuilder
      Returns:
      The letterSpacing.
    • getFontType

      public String getFontType()
       Name or style of the font.
       
      string font_type = 4;
      Specified by:
      getFontType in interface Document.Page.Token.StyleInfoOrBuilder
      Returns:
      The fontType.
    • getFontTypeBytes

      public com.google.protobuf.ByteString getFontTypeBytes()
       Name or style of the font.
       
      string font_type = 4;
      Specified by:
      getFontTypeBytes in interface Document.Page.Token.StyleInfoOrBuilder
      Returns:
      The bytes for fontType.
    • getBold

      public boolean getBold()
       Whether the text is bold (equivalent to
       [font_weight][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_weight]
       is at least `700`).
       
      bool bold = 5;
      Specified by:
      getBold in interface Document.Page.Token.StyleInfoOrBuilder
      Returns:
      The bold.
    • getItalic

      public boolean getItalic()
       Whether the text is italic.
       
      bool italic = 6;
      Specified by:
      getItalic in interface Document.Page.Token.StyleInfoOrBuilder
      Returns:
      The italic.
    • getUnderlined

      public boolean getUnderlined()
       Whether the text is underlined.
       
      bool underlined = 7;
      Specified by:
      getUnderlined in interface Document.Page.Token.StyleInfoOrBuilder
      Returns:
      The underlined.
    • getStrikeout

      public boolean getStrikeout()
       Whether the text is strikethrough. This feature is not supported yet.
       
      bool strikeout = 8;
      Specified by:
      getStrikeout in interface Document.Page.Token.StyleInfoOrBuilder
      Returns:
      The strikeout.
    • getSubscript

      public boolean getSubscript()
       Whether the text is a subscript. This feature is not supported yet.
       
      bool subscript = 9;
      Specified by:
      getSubscript in interface Document.Page.Token.StyleInfoOrBuilder
      Returns:
      The subscript.
    • getSuperscript

      public boolean getSuperscript()
       Whether the text is a superscript. This feature is not supported yet.
       
      bool superscript = 10;
      Specified by:
      getSuperscript in interface Document.Page.Token.StyleInfoOrBuilder
      Returns:
      The superscript.
    • getSmallcaps

      public boolean getSmallcaps()
       Whether the text is in small caps. This feature is not supported yet.
       
      bool smallcaps = 11;
      Specified by:
      getSmallcaps in interface Document.Page.Token.StyleInfoOrBuilder
      Returns:
      The smallcaps.
    • getFontWeight

      public int getFontWeight()
       TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy).
       Normal is `400`, bold is `700`.
       
      int32 font_weight = 12;
      Specified by:
      getFontWeight in interface Document.Page.Token.StyleInfoOrBuilder
      Returns:
      The fontWeight.
    • getHandwritten

      public boolean getHandwritten()
       Whether the text is handwritten.
       
      bool handwritten = 13;
      Specified by:
      getHandwritten in interface Document.Page.Token.StyleInfoOrBuilder
      Returns:
      The handwritten.
    • hasTextColor

      public boolean hasTextColor()
       Color of the text.
       
      .google.type.Color text_color = 14;
      Specified by:
      hasTextColor in interface Document.Page.Token.StyleInfoOrBuilder
      Returns:
      Whether the textColor field is set.
    • getTextColor

      public Color getTextColor()
       Color of the text.
       
      .google.type.Color text_color = 14;
      Specified by:
      getTextColor in interface Document.Page.Token.StyleInfoOrBuilder
      Returns:
      The textColor.
    • getTextColorOrBuilder

      public ColorOrBuilder getTextColorOrBuilder()
       Color of the text.
       
      .google.type.Color text_color = 14;
      Specified by:
      getTextColorOrBuilder in interface Document.Page.Token.StyleInfoOrBuilder
    • hasBackgroundColor

      public boolean hasBackgroundColor()
       Color of the background.
       
      .google.type.Color background_color = 15;
      Specified by:
      hasBackgroundColor in interface Document.Page.Token.StyleInfoOrBuilder
      Returns:
      Whether the backgroundColor field is set.
    • getBackgroundColor

      public Color getBackgroundColor()
       Color of the background.
       
      .google.type.Color background_color = 15;
      Specified by:
      getBackgroundColor in interface Document.Page.Token.StyleInfoOrBuilder
      Returns:
      The backgroundColor.
    • getBackgroundColorOrBuilder

      public ColorOrBuilder getBackgroundColorOrBuilder()
       Color of the background.
       
      .google.type.Color background_color = 15;
      Specified by:
      getBackgroundColorOrBuilder in interface Document.Page.Token.StyleInfoOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static Document.Page.Token.StyleInfo parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Document.Page.Token.StyleInfo parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Document.Page.Token.StyleInfo parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Document.Page.Token.StyleInfo parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Document.Page.Token.StyleInfo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Document.Page.Token.StyleInfo parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Document.Page.Token.StyleInfo parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Document.Page.Token.StyleInfo parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Document.Page.Token.StyleInfo parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Document.Page.Token.StyleInfo parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Document.Page.Token.StyleInfo parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Document.Page.Token.StyleInfo parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public Document.Page.Token.StyleInfo.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static Document.Page.Token.StyleInfo.Builder newBuilder()
    • newBuilder

    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected Document.Page.Token.StyleInfo.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static Document.Page.Token.StyleInfo getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Document.Page.Token.StyleInfo> parser()
    • getParserForType

      public com.google.protobuf.Parser<Document.Page.Token.StyleInfo> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public Document.Page.Token.StyleInfo getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder