Class Document.Page.Token.StyleInfo.Builder

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

public static final class Document.Page.Token.StyleInfo.Builder extends com.google.protobuf.GeneratedMessage.Builder<Document.Page.Token.StyleInfo.Builder> implements Document.Page.Token.StyleInfoOrBuilder
 Font and other text style attributes.
 
Protobuf type google.cloud.documentai.v1.Document.Page.Token.StyleInfo
  • 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.Builder<Document.Page.Token.StyleInfo.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<Document.Page.Token.StyleInfo.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Document.Page.Token.StyleInfo.Builder>
    • 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
    • build

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

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

      public Document.Page.Token.StyleInfo.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Document.Page.Token.StyleInfo.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<Document.Page.Token.StyleInfo.Builder>
    • mergeFrom

      public Document.Page.Token.StyleInfo.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Document.Page.Token.StyleInfo.Builder>
      Throws:
      IOException
    • 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.
    • setFontSize

      public Document.Page.Token.StyleInfo.Builder setFontSize(int value)
       Font size in points (`1` point is `¹⁄₇₂` inches).
       
      int32 font_size = 1;
      Parameters:
      value - The fontSize to set.
      Returns:
      This builder for chaining.
    • clearFontSize

      public Document.Page.Token.StyleInfo.Builder clearFontSize()
       Font size in points (`1` point is `¹⁄₇₂` inches).
       
      int32 font_size = 1;
      Returns:
      This builder for chaining.
    • 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.
    • setPixelFontSize

      public Document.Page.Token.StyleInfo.Builder setPixelFontSize(double value)
       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;
      Parameters:
      value - The pixelFontSize to set.
      Returns:
      This builder for chaining.
    • clearPixelFontSize

      public Document.Page.Token.StyleInfo.Builder clearPixelFontSize()
       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;
      Returns:
      This builder for chaining.
    • getLetterSpacing

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

      public Document.Page.Token.StyleInfo.Builder setLetterSpacing(double value)
       Letter spacing in points.
       
      double letter_spacing = 3;
      Parameters:
      value - The letterSpacing to set.
      Returns:
      This builder for chaining.
    • clearLetterSpacing

      public Document.Page.Token.StyleInfo.Builder clearLetterSpacing()
       Letter spacing in points.
       
      double letter_spacing = 3;
      Returns:
      This builder for chaining.
    • 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.
    • setFontType

      public Document.Page.Token.StyleInfo.Builder setFontType(String value)
       Name or style of the font.
       
      string font_type = 4;
      Parameters:
      value - The fontType to set.
      Returns:
      This builder for chaining.
    • clearFontType

      public Document.Page.Token.StyleInfo.Builder clearFontType()
       Name or style of the font.
       
      string font_type = 4;
      Returns:
      This builder for chaining.
    • setFontTypeBytes

      public Document.Page.Token.StyleInfo.Builder setFontTypeBytes(com.google.protobuf.ByteString value)
       Name or style of the font.
       
      string font_type = 4;
      Parameters:
      value - The bytes for fontType to set.
      Returns:
      This builder for chaining.
    • 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.
    • setBold

      public Document.Page.Token.StyleInfo.Builder setBold(boolean value)
       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;
      Parameters:
      value - The bold to set.
      Returns:
      This builder for chaining.
    • clearBold

       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;
      Returns:
      This builder for chaining.
    • getItalic

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

      public Document.Page.Token.StyleInfo.Builder setItalic(boolean value)
       Whether the text is italic.
       
      bool italic = 6;
      Parameters:
      value - The italic to set.
      Returns:
      This builder for chaining.
    • clearItalic

       Whether the text is italic.
       
      bool italic = 6;
      Returns:
      This builder for chaining.
    • getUnderlined

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

      public Document.Page.Token.StyleInfo.Builder setUnderlined(boolean value)
       Whether the text is underlined.
       
      bool underlined = 7;
      Parameters:
      value - The underlined to set.
      Returns:
      This builder for chaining.
    • clearUnderlined

      public Document.Page.Token.StyleInfo.Builder clearUnderlined()
       Whether the text is underlined.
       
      bool underlined = 7;
      Returns:
      This builder for chaining.
    • 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.
    • setStrikeout

      public Document.Page.Token.StyleInfo.Builder setStrikeout(boolean value)
       Whether the text is strikethrough. This feature is not supported yet.
       
      bool strikeout = 8;
      Parameters:
      value - The strikeout to set.
      Returns:
      This builder for chaining.
    • clearStrikeout

      public Document.Page.Token.StyleInfo.Builder clearStrikeout()
       Whether the text is strikethrough. This feature is not supported yet.
       
      bool strikeout = 8;
      Returns:
      This builder for chaining.
    • 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.
    • setSubscript

      public Document.Page.Token.StyleInfo.Builder setSubscript(boolean value)
       Whether the text is a subscript. This feature is not supported yet.
       
      bool subscript = 9;
      Parameters:
      value - The subscript to set.
      Returns:
      This builder for chaining.
    • clearSubscript

      public Document.Page.Token.StyleInfo.Builder clearSubscript()
       Whether the text is a subscript. This feature is not supported yet.
       
      bool subscript = 9;
      Returns:
      This builder for chaining.
    • 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.
    • setSuperscript

      public Document.Page.Token.StyleInfo.Builder setSuperscript(boolean value)
       Whether the text is a superscript. This feature is not supported yet.
       
      bool superscript = 10;
      Parameters:
      value - The superscript to set.
      Returns:
      This builder for chaining.
    • clearSuperscript

      public Document.Page.Token.StyleInfo.Builder clearSuperscript()
       Whether the text is a superscript. This feature is not supported yet.
       
      bool superscript = 10;
      Returns:
      This builder for chaining.
    • 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.
    • setSmallcaps

      public Document.Page.Token.StyleInfo.Builder setSmallcaps(boolean value)
       Whether the text is in small caps. This feature is not supported yet.
       
      bool smallcaps = 11;
      Parameters:
      value - The smallcaps to set.
      Returns:
      This builder for chaining.
    • clearSmallcaps

      public Document.Page.Token.StyleInfo.Builder clearSmallcaps()
       Whether the text is in small caps. This feature is not supported yet.
       
      bool smallcaps = 11;
      Returns:
      This builder for chaining.
    • 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.
    • setFontWeight

      public Document.Page.Token.StyleInfo.Builder setFontWeight(int value)
       TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy).
       Normal is `400`, bold is `700`.
       
      int32 font_weight = 12;
      Parameters:
      value - The fontWeight to set.
      Returns:
      This builder for chaining.
    • clearFontWeight

      public Document.Page.Token.StyleInfo.Builder clearFontWeight()
       TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy).
       Normal is `400`, bold is `700`.
       
      int32 font_weight = 12;
      Returns:
      This builder for chaining.
    • getHandwritten

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

      public Document.Page.Token.StyleInfo.Builder setHandwritten(boolean value)
       Whether the text is handwritten.
       
      bool handwritten = 13;
      Parameters:
      value - The handwritten to set.
      Returns:
      This builder for chaining.
    • clearHandwritten

      public Document.Page.Token.StyleInfo.Builder clearHandwritten()
       Whether the text is handwritten.
       
      bool handwritten = 13;
      Returns:
      This builder for chaining.
    • 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.
    • setTextColor

      public Document.Page.Token.StyleInfo.Builder setTextColor(Color value)
       Color of the text.
       
      .google.type.Color text_color = 14;
    • setTextColor

      public Document.Page.Token.StyleInfo.Builder setTextColor(Color.Builder builderForValue)
       Color of the text.
       
      .google.type.Color text_color = 14;
    • mergeTextColor

      public Document.Page.Token.StyleInfo.Builder mergeTextColor(Color value)
       Color of the text.
       
      .google.type.Color text_color = 14;
    • clearTextColor

      public Document.Page.Token.StyleInfo.Builder clearTextColor()
       Color of the text.
       
      .google.type.Color text_color = 14;
    • getTextColorBuilder

      public Color.Builder getTextColorBuilder()
       Color of the text.
       
      .google.type.Color text_color = 14;
    • 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.
    • setBackgroundColor

      public Document.Page.Token.StyleInfo.Builder setBackgroundColor(Color value)
       Color of the background.
       
      .google.type.Color background_color = 15;
    • setBackgroundColor

      public Document.Page.Token.StyleInfo.Builder setBackgroundColor(Color.Builder builderForValue)
       Color of the background.
       
      .google.type.Color background_color = 15;
    • mergeBackgroundColor

      public Document.Page.Token.StyleInfo.Builder mergeBackgroundColor(Color value)
       Color of the background.
       
      .google.type.Color background_color = 15;
    • clearBackgroundColor

      public Document.Page.Token.StyleInfo.Builder clearBackgroundColor()
       Color of the background.
       
      .google.type.Color background_color = 15;
    • getBackgroundColorBuilder

      public Color.Builder getBackgroundColorBuilder()
       Color of the background.
       
      .google.type.Color background_color = 15;
    • getBackgroundColorOrBuilder

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