Class Document.Style.Builder

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

    public static final class Document.Style.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Document.Style.Builder>
    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
    • Method Detail

      • 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.Builder<Document.Style.Builder>
      • clear

        public Document.Style.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.GeneratedMessageV3.Builder<Document.Style.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.GeneratedMessageV3.Builder<Document.Style.Builder>
      • getDefaultInstanceForType

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

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

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

        public Document.Style.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Style.Builder>
      • setField

        public Document.Style.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                               Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Style.Builder>
      • clearField

        public Document.Style.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Style.Builder>
      • clearOneof

        public Document.Style.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Style.Builder>
      • setRepeatedField

        public Document.Style.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                       int index,
                                                       Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Style.Builder>
      • addRepeatedField

        public Document.Style.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                       Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Style.Builder>
      • mergeFrom

        public Document.Style.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.Style.Builder>
      • isInitialized

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

        public Document.Style.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.Style.Builder>
        Throws:
        IOException
      • hasTextAnchor

        public boolean hasTextAnchor()
         Text anchor indexing into the
         [Document.text][google.cloud.documentai.v1beta2.Document.text].
         
        .google.cloud.documentai.v1beta2.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.v1beta2.Document.text].
         
        .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1;
        Specified by:
        getTextAnchor in interface Document.StyleOrBuilder
        Returns:
        The textAnchor.
      • setTextAnchor

        public Document.Style.Builder setTextAnchor​(Document.TextAnchor value)
         Text anchor indexing into the
         [Document.text][google.cloud.documentai.v1beta2.Document.text].
         
        .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1;
      • setTextAnchor

        public Document.Style.Builder setTextAnchor​(Document.TextAnchor.Builder builderForValue)
         Text anchor indexing into the
         [Document.text][google.cloud.documentai.v1beta2.Document.text].
         
        .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1;
      • mergeTextAnchor

        public Document.Style.Builder mergeTextAnchor​(Document.TextAnchor value)
         Text anchor indexing into the
         [Document.text][google.cloud.documentai.v1beta2.Document.text].
         
        .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1;
      • clearTextAnchor

        public Document.Style.Builder clearTextAnchor()
         Text anchor indexing into the
         [Document.text][google.cloud.documentai.v1beta2.Document.text].
         
        .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1;
      • getTextAnchorBuilder

        public Document.TextAnchor.Builder getTextAnchorBuilder()
         Text anchor indexing into the
         [Document.text][google.cloud.documentai.v1beta2.Document.text].
         
        .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1;
      • 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.
      • setColor

        public Document.Style.Builder setColor​(com.google.type.Color value)
         Text color.
         
        .google.type.Color color = 2;
      • setColor

        public Document.Style.Builder setColor​(com.google.type.Color.Builder builderForValue)
         Text color.
         
        .google.type.Color color = 2;
      • mergeColor

        public Document.Style.Builder mergeColor​(com.google.type.Color value)
         Text color.
         
        .google.type.Color color = 2;
      • getColorBuilder

        public com.google.type.Color.Builder getColorBuilder()
         Text color.
         
        .google.type.Color color = 2;
      • 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.
      • setBackgroundColor

        public Document.Style.Builder setBackgroundColor​(com.google.type.Color value)
         Text background color.
         
        .google.type.Color background_color = 3;
      • setBackgroundColor

        public Document.Style.Builder setBackgroundColor​(com.google.type.Color.Builder builderForValue)
         Text background color.
         
        .google.type.Color background_color = 3;
      • mergeBackgroundColor

        public Document.Style.Builder mergeBackgroundColor​(com.google.type.Color value)
         Text background color.
         
        .google.type.Color background_color = 3;
      • clearBackgroundColor

        public Document.Style.Builder clearBackgroundColor()
         Text background color.
         
        .google.type.Color background_color = 3;
      • getBackgroundColorBuilder

        public com.google.type.Color.Builder getBackgroundColorBuilder()
         Text background color.
         
        .google.type.Color background_color = 3;
      • getFontWeight

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

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

        public Document.Style.Builder setFontWeight​(String value)
         [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp).
         Possible values are `normal`, `bold`, `bolder`, and `lighter`.
         
        string font_weight = 4;
        Parameters:
        value - The fontWeight to set.
        Returns:
        This builder for chaining.
      • clearFontWeight

        public Document.Style.Builder clearFontWeight()
         [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp).
         Possible values are `normal`, `bold`, `bolder`, and `lighter`.
         
        string font_weight = 4;
        Returns:
        This builder for chaining.
      • setFontWeightBytes

        public Document.Style.Builder setFontWeightBytes​(com.google.protobuf.ByteString value)
         [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp).
         Possible values are `normal`, `bold`, `bolder`, and `lighter`.
         
        string font_weight = 4;
        Parameters:
        value - The bytes for fontWeight to set.
        Returns:
        This builder for chaining.
      • getTextStyle

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

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

        public Document.Style.Builder setTextStyle​(String value)
         [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).
         Possible values are `normal`, `italic`, and `oblique`.
         
        string text_style = 5;
        Parameters:
        value - The textStyle to set.
        Returns:
        This builder for chaining.
      • clearTextStyle

        public Document.Style.Builder clearTextStyle()
         [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).
         Possible values are `normal`, `italic`, and `oblique`.
         
        string text_style = 5;
        Returns:
        This builder for chaining.
      • setTextStyleBytes

        public Document.Style.Builder setTextStyleBytes​(com.google.protobuf.ByteString value)
         [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).
         Possible values are `normal`, `italic`, and `oblique`.
         
        string text_style = 5;
        Parameters:
        value - The bytes for textStyle to set.
        Returns:
        This builder for chaining.
      • getTextDecoration

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

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

        public Document.Style.Builder setTextDecoration​(String value)
         [Text
         decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp).
         Follows CSS standard. <text-decoration-line> <text-decoration-color>
         <text-decoration-style>
         
        string text_decoration = 6;
        Parameters:
        value - The textDecoration to set.
        Returns:
        This builder for chaining.
      • clearTextDecoration

        public Document.Style.Builder clearTextDecoration()
         [Text
         decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp).
         Follows CSS standard. <text-decoration-line> <text-decoration-color>
         <text-decoration-style>
         
        string text_decoration = 6;
        Returns:
        This builder for chaining.
      • setTextDecorationBytes

        public Document.Style.Builder setTextDecorationBytes​(com.google.protobuf.ByteString value)
         [Text
         decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp).
         Follows CSS standard. <text-decoration-line> <text-decoration-color>
         <text-decoration-style>
         
        string text_decoration = 6;
        Parameters:
        value - The bytes for textDecoration to set.
        Returns:
        This builder for chaining.
      • hasFontSize

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

        public Document.Style.Builder clearFontSize()
         Font size.
         
        .google.cloud.documentai.v1beta2.Document.Style.FontSize font_size = 7;
      • getFontSizeBuilder

        public Document.Style.FontSize.Builder getFontSizeBuilder()
         Font size.
         
        .google.cloud.documentai.v1beta2.Document.Style.FontSize font_size = 7;
      • getFontFamily

        public String getFontFamily()
         Font family such as `Arial`, `Times New Roman`.
         https://www.w3schools.com/cssref/pr_font_font-family.asp
         
        string font_family = 8;
        Specified by:
        getFontFamily in interface Document.StyleOrBuilder
        Returns:
        The fontFamily.
      • getFontFamilyBytes

        public com.google.protobuf.ByteString getFontFamilyBytes()
         Font family such as `Arial`, `Times New Roman`.
         https://www.w3schools.com/cssref/pr_font_font-family.asp
         
        string font_family = 8;
        Specified by:
        getFontFamilyBytes in interface Document.StyleOrBuilder
        Returns:
        The bytes for fontFamily.
      • setFontFamily

        public Document.Style.Builder setFontFamily​(String value)
         Font family such as `Arial`, `Times New Roman`.
         https://www.w3schools.com/cssref/pr_font_font-family.asp
         
        string font_family = 8;
        Parameters:
        value - The fontFamily to set.
        Returns:
        This builder for chaining.
      • clearFontFamily

        public Document.Style.Builder clearFontFamily()
         Font family such as `Arial`, `Times New Roman`.
         https://www.w3schools.com/cssref/pr_font_font-family.asp
         
        string font_family = 8;
        Returns:
        This builder for chaining.
      • setFontFamilyBytes

        public Document.Style.Builder setFontFamilyBytes​(com.google.protobuf.ByteString value)
         Font family such as `Arial`, `Times New Roman`.
         https://www.w3schools.com/cssref/pr_font_font-family.asp
         
        string font_family = 8;
        Parameters:
        value - The bytes for fontFamily to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final Document.Style.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Style.Builder>
      • mergeUnknownFields

        public final Document.Style.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Style.Builder>