Send feedback
  
   
 
  
    
      Class Document.Style (2.24.0) 
  
  
  
   
  
    
  
  
    
    
    
    
    
  Version 2.24.0keyboard_arrow_down  
  
 
    
    
    
    
      
  
  
  
    
public   static   final   class  Document . Style   extends   GeneratedMessageV3   implements   Document . StyleOrBuilder  
   Annotation for common text style attributes. This adheres to CSS
 conventions as much as possible.
 Protobuf type google.cloud.documentai.v1beta2.Document.Style
    Inherited Members 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT) 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
   
  Static Fields
   
  BACKGROUND_COLOR_FIELD_NUMBER 
  
    
public   static   final   int   BACKGROUND_COLOR_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  COLOR_FIELD_NUMBER 
  
    
public   static   final   int   COLOR_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  FONT_SIZE_FIELD_NUMBER 
  
    
public   static   final   int   FONT_SIZE_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  FONT_WEIGHT_FIELD_NUMBER 
  
    
public   static   final   int   FONT_WEIGHT_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  TEXT_ANCHOR_FIELD_NUMBER 
  
    
public   static   final   int   TEXT_ANCHOR_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  TEXT_DECORATION_FIELD_NUMBER 
  
    
public   static   final   int   TEXT_DECORATION_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  TEXT_STYLE_FIELD_NUMBER 
  
    
public   static   final   int   TEXT_STYLE_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  Static Methods
   
  getDefaultInstance() 
  
    
public   static   Document . Style   getDefaultInstance ()  
  
  getDescriptor() 
  
    
public   static   final   Descriptors . Descriptor   getDescriptor ()  
  
  newBuilder() 
  
    
public   static   Document . Style . Builder   newBuilder ()  
  
  newBuilder(Document.Style prototype) 
  
    
public   static   Document . Style . Builder   newBuilder ( Document . Style   prototype )  
  
  
  
    
public   static   Document . Style   parseDelimitedFrom ( InputStream   input )  
  
  
  
  
    
public   static   Document . Style   parseDelimitedFrom ( InputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  parseFrom(byte[] data) 
  
    
public   static   Document . Style   parseFrom ( byte []   data )  
  
    
      
        Parameter  
      
        Name Description  
      
        databyte [] 
     
  
  
  
  parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   Document . Style   parseFrom ( byte []   data ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  parseFrom(ByteString data) 
  
    
public   static   Document . Style   parseFrom ( ByteString   data )  
  
  
  
  parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   Document . Style   parseFrom ( ByteString   data ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  
    
public   static   Document . Style   parseFrom ( CodedInputStream   input )  
  
  
  
  
    
public   static   Document . Style   parseFrom ( CodedInputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  
    
public   static   Document . Style   parseFrom ( InputStream   input )  
  
  
  
  
    
public   static   Document . Style   parseFrom ( InputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  parseFrom(ByteBuffer data) 
  
    
public   static   Document . Style   parseFrom ( ByteBuffer   data )  
  
  
  
  parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   Document . Style   parseFrom ( ByteBuffer   data ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  parser() 
  
    
public   static   Parser<Document . Style >  parser ()  
  
  Methods
   
  equals(Object obj) 
  
    
public   boolean   equals ( Object   obj )  
  
    
      
        Parameter  
      
        Name Description  
      
        objObject  
     
  
  
  Overrides 
  
  getBackgroundColor() 
  
    
public   Color   getBackgroundColor ()  
   Text background color.
 .google.type.Color background_color = 3;
    
      
        Returns  
      
        Type Description  
      
        com.google.type.Color The backgroundColor.
 
     
  
  getBackgroundColorOrBuilder() 
  
    
public   ColorOrBuilder   getBackgroundColorOrBuilder ()  
   Text background color.
 .google.type.Color background_color = 3;
    
      
        Returns  
      
        Type Description  
      
        com.google.type.ColorOrBuilder  
     
  
  getColor() 
  
   Text color.
 .google.type.Color color = 2;
    
      
        Returns  
      
        Type Description  
      
        com.google.type.Color The color.
 
     
  
  getColorOrBuilder() 
  
    
public   ColorOrBuilder   getColorOrBuilder ()  
   Text color.
 .google.type.Color color = 2;
    
      
        Returns  
      
        Type Description  
      
        com.google.type.ColorOrBuilder  
     
  
  getDefaultInstanceForType() 
  
    
public   Document . Style   getDefaultInstanceForType ()  
  
  getFontSize() 
  
    
public   Document . Style . FontSize   getFontSize ()  
   Font size.
 .google.cloud.documentai.v1beta2.Document.Style.FontSize font_size = 7;
getFontSizeOrBuilder() 
  
    
public   Document . Style . FontSizeOrBuilder   getFontSizeOrBuilder ()  
   Font size.
 .google.cloud.documentai.v1beta2.Document.Style.FontSize font_size = 7;
getFontWeight() 
  
    
public   String   getFontWeight ()  
  
  
    
      
        Returns  
      
        Type Description  
      
        String The fontWeight.
 
     
  
  getFontWeightBytes() 
  
    
public   ByteString   getFontWeightBytes ()  
  
  
    
      
        Returns  
      
        Type Description  
      
        ByteString The bytes for fontWeight.
 
     
  
  getParserForType() 
  
    
public   Parser<Document . Style >  getParserForType ()  
  
  Overrides 
  
  getSerializedSize() 
  
    
public   int   getSerializedSize ()  
  
    
      
        Returns  
      
        Type Description  
      
        int  
     
  
  Overrides 
  
  getTextAnchor() 
  
    
public   Document . TextAnchor   getTextAnchor ()  
   Text anchor indexing into the Document.text .
 .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1;
getTextAnchorOrBuilder() 
  
    
public   Document . TextAnchorOrBuilder   getTextAnchorOrBuilder ()  
   Text anchor indexing into the Document.text .
 .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1;
getTextDecoration() 
  
    
public   String   getTextDecoration ()  
  
  
    
      
        Returns  
      
        Type Description  
      
        String The textDecoration.
 
     
  
  getTextDecorationBytes() 
  
    
public   ByteString   getTextDecorationBytes ()  
  
  
    
      
        Returns  
      
        Type Description  
      
        ByteString The bytes for textDecoration.
 
     
  
  getTextStyle() 
  
    
public   String   getTextStyle ()  
  
  
    
      
        Returns  
      
        Type Description  
      
        String The textStyle.
 
     
  
  getTextStyleBytes() 
  
    
public   ByteString   getTextStyleBytes ()  
  
  
    
      
        Returns  
      
        Type Description  
      
        ByteString The bytes for textStyle.
 
     
  
  hasBackgroundColor() 
  
    
public   boolean   hasBackgroundColor ()  
   Text background color.
 .google.type.Color background_color = 3;
    
      
        Returns  
      
        Type Description  
      
        boolean Whether the backgroundColor field is set.
 
     
  
  hasColor() 
  
    
public   boolean   hasColor ()  
   Text color.
 .google.type.Color color = 2;
    
      
        Returns  
      
        Type Description  
      
        boolean Whether the color field is set.
 
     
  
  hasFontSize() 
  
    
public   boolean   hasFontSize ()  
   Font size.
 .google.cloud.documentai.v1beta2.Document.Style.FontSize font_size = 7;
    
      
        Returns  
      
        Type Description  
      
        boolean Whether the fontSize field is set.
 
     
  
  hasTextAnchor() 
  
    
public   boolean   hasTextAnchor ()  
   Text anchor indexing into the Document.text .
 .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1;
    
      
        Returns  
      
        Type Description  
      
        boolean Whether the textAnchor field is set.
 
     
  
  hashCode() 
  
  
    
      
        Returns  
      
        Type Description  
      
        int  
     
  
  Overrides 
  
  internalGetFieldAccessorTable() 
  
    
protected   GeneratedMessageV3 . FieldAccessorTable   internalGetFieldAccessorTable ()  
  
  Overrides 
  
  isInitialized() 
  
    
public   final   boolean   isInitialized ()  
  
  Overrides 
  
  newBuilderForType() 
  
    
public   Document . Style . Builder   newBuilderForType ()  
  
  newBuilderForType(GeneratedMessageV3.BuilderParent parent) 
  
    
protected   Document . Style . Builder   newBuilderForType ( GeneratedMessageV3 . BuilderParent   parent )  
  
  
  Overrides 
  
  newInstance(GeneratedMessageV3.UnusedPrivateParameter unused) 
  
    
protected   Object   newInstance ( GeneratedMessageV3 . UnusedPrivateParameter   unused )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Object  
     
  
  Overrides 
  
  toBuilder() 
  
    
public   Document . Style . Builder   toBuilder ()  
  
  writeTo(CodedOutputStream output) 
  
    
public   void   writeTo ( CodedOutputStream   output )  
  
  Overrides 
  
  
 
     
    
  
  
  
     
  
    
    
      
       
         
  
  
    
    Send feedback
  
   
 
       
    
    
  
  
 
  Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
  Last updated 2025-10-29 UTC.
 
 
  
  
    
    
    
      
  
  
    Need to tell us more?
  
   
 
     
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-29 UTC."],[],[]]