Class Document.Style

  • All Implemented Interfaces:
    Document.StyleOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
    Enclosing class:
    Document

    public static final class Document.Style
    extends com.google.protobuf.GeneratedMessageV3
    implements Document.StyleOrBuilder
     Annotation for common text style attributes. This adheres to CSS
     conventions as much as possible.
     
    Protobuf type google.cloud.documentai.v1beta1.Document.Style
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • hasTextAnchor

        public boolean hasTextAnchor()
         Text anchor indexing into the
         [Document.text][google.cloud.documentai.v1beta1.Document.text].
         
        .google.cloud.documentai.v1beta1.Document.TextAnchor text_anchor = 1;
        Specified by:
        hasTextAnchor in interface Document.StyleOrBuilder
        Returns:
        Whether the textAnchor field is set.
      • getTextAnchor

        public Document.TextAnchor getTextAnchor()
         Text anchor indexing into the
         [Document.text][google.cloud.documentai.v1beta1.Document.text].
         
        .google.cloud.documentai.v1beta1.Document.TextAnchor text_anchor = 1;
        Specified by:
        getTextAnchor in interface Document.StyleOrBuilder
        Returns:
        The textAnchor.
      • hasColor

        public boolean hasColor()
         Text color.
         
        .google.type.Color color = 2;
        Specified by:
        hasColor in interface Document.StyleOrBuilder
        Returns:
        Whether the color field is set.
      • getColor

        public com.google.type.Color getColor()
         Text color.
         
        .google.type.Color color = 2;
        Specified by:
        getColor in interface Document.StyleOrBuilder
        Returns:
        The color.
      • hasBackgroundColor

        public boolean hasBackgroundColor()
         Text background color.
         
        .google.type.Color background_color = 3;
        Specified by:
        hasBackgroundColor in interface Document.StyleOrBuilder
        Returns:
        Whether the backgroundColor field is set.
      • getBackgroundColor

        public com.google.type.Color getBackgroundColor()
         Text background color.
         
        .google.type.Color background_color = 3;
        Specified by:
        getBackgroundColor in interface Document.StyleOrBuilder
        Returns:
        The backgroundColor.
      • getFontWeight

        public String getFontWeight()
         Font weight. Possible values are normal, bold, bolder, and lighter.
         https://www.w3schools.com/cssref/pr_font_weight.asp
         
        string font_weight = 4;
        Specified by:
        getFontWeight in interface Document.StyleOrBuilder
        Returns:
        The fontWeight.
      • getFontWeightBytes

        public com.google.protobuf.ByteString getFontWeightBytes()
         Font weight. Possible values are normal, bold, bolder, and lighter.
         https://www.w3schools.com/cssref/pr_font_weight.asp
         
        string font_weight = 4;
        Specified by:
        getFontWeightBytes in interface Document.StyleOrBuilder
        Returns:
        The bytes for fontWeight.
      • getTextStyle

        public String getTextStyle()
         Text style. Possible values are normal, italic, and oblique.
         https://www.w3schools.com/cssref/pr_font_font-style.asp
         
        string text_style = 5;
        Specified by:
        getTextStyle in interface Document.StyleOrBuilder
        Returns:
        The textStyle.
      • getTextStyleBytes

        public com.google.protobuf.ByteString getTextStyleBytes()
         Text style. Possible values are normal, italic, and oblique.
         https://www.w3schools.com/cssref/pr_font_font-style.asp
         
        string text_style = 5;
        Specified by:
        getTextStyleBytes in interface Document.StyleOrBuilder
        Returns:
        The bytes for textStyle.
      • getTextDecoration

        public String getTextDecoration()
         Text decoration. Follows CSS standard.
         <text-decoration-line> <text-decoration-color> <text-decoration-style>
         https://www.w3schools.com/cssref/pr_text_text-decoration.asp
         
        string text_decoration = 6;
        Specified by:
        getTextDecoration in interface Document.StyleOrBuilder
        Returns:
        The textDecoration.
      • getTextDecorationBytes

        public com.google.protobuf.ByteString getTextDecorationBytes()
         Text decoration. Follows CSS standard.
         <text-decoration-line> <text-decoration-color> <text-decoration-style>
         https://www.w3schools.com/cssref/pr_text_text-decoration.asp
         
        string text_decoration = 6;
        Specified by:
        getTextDecorationBytes in interface Document.StyleOrBuilder
        Returns:
        The bytes for textDecoration.
      • hasFontSize

        public boolean hasFontSize()
         Font size.
         
        .google.cloud.documentai.v1beta1.Document.Style.FontSize font_size = 7;
        Specified by:
        hasFontSize in interface Document.StyleOrBuilder
        Returns:
        Whether the fontSize field is set.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • 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.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • 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.Style parseFrom​(ByteBuffer data)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

        public static Document.Style parseFrom​(com.google.protobuf.ByteString data)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Document.Style 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.Style parseFrom​(byte[] data)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

        public Document.Style.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public Document.Style.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected Document.Style.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static Document.Style getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<Document.Style> parser()
      • getParserForType

        public com.google.protobuf.Parser<Document.Style> 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.GeneratedMessageV3
      • getDefaultInstanceForType

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