Class Document.Style.Builder (2.46.0)

public static final class Document.Style.Builder extends 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.v1.Document.Style

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Document.Style.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Document.Style.Builder
Overrides

build()

public Document.Style build()
Returns
Type Description
Document.Style

buildPartial()

public Document.Style buildPartial()
Returns
Type Description
Document.Style

clear()

public Document.Style.Builder clear()
Returns
Type Description
Document.Style.Builder
Overrides

clearBackgroundColor()

public Document.Style.Builder clearBackgroundColor()

Text background color.

.google.type.Color background_color = 3;

Returns
Type Description
Document.Style.Builder

clearColor()

public Document.Style.Builder clearColor()

Text color.

.google.type.Color color = 2;

Returns
Type Description
Document.Style.Builder

clearField(Descriptors.FieldDescriptor field)

public Document.Style.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Document.Style.Builder
Overrides

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
Type Description
Document.Style.Builder

This builder for chaining.

clearFontSize()

public Document.Style.Builder clearFontSize()

Font size.

.google.cloud.documentai.v1.Document.Style.FontSize font_size = 7;

Returns
Type Description
Document.Style.Builder

clearFontWeight()

public Document.Style.Builder clearFontWeight()

Font weight. Possible values are normal, bold, bolder, and lighter.

string font_weight = 4;

Returns
Type Description
Document.Style.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Document.Style.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Document.Style.Builder
Overrides

clearTextAnchor()

public Document.Style.Builder clearTextAnchor()

Text anchor indexing into the Document.text.

.google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1;

Returns
Type Description
Document.Style.Builder

clearTextDecoration()

public Document.Style.Builder clearTextDecoration()

Text decoration. Follows CSS standard. <text-decoration-line> <text-decoration-color> <text-decoration-style>

string text_decoration = 6;

Returns
Type Description
Document.Style.Builder

This builder for chaining.

clearTextStyle()

public Document.Style.Builder clearTextStyle()

Text style. Possible values are normal, italic, and oblique.

string text_style = 5;

Returns
Type Description
Document.Style.Builder

This builder for chaining.

clone()

public Document.Style.Builder clone()
Returns
Type Description
Document.Style.Builder
Overrides

getBackgroundColor()

public Color getBackgroundColor()

Text background color.

.google.type.Color background_color = 3;

Returns
Type Description
com.google.type.Color

The backgroundColor.

getBackgroundColorBuilder()

public Color.Builder getBackgroundColorBuilder()

Text background color.

.google.type.Color background_color = 3;

Returns
Type Description
com.google.type.Color.Builder

getBackgroundColorOrBuilder()

public ColorOrBuilder getBackgroundColorOrBuilder()

Text background color.

.google.type.Color background_color = 3;

Returns
Type Description
com.google.type.ColorOrBuilder

getColor()

public Color getColor()

Text color.

.google.type.Color color = 2;

Returns
Type Description
com.google.type.Color

The color.

getColorBuilder()

public Color.Builder getColorBuilder()

Text color.

.google.type.Color color = 2;

Returns
Type Description
com.google.type.Color.Builder

getColorOrBuilder()

public ColorOrBuilder getColorOrBuilder()

Text color.

.google.type.Color color = 2;

Returns
Type Description
com.google.type.ColorOrBuilder

getDefaultInstanceForType()

public Document.Style getDefaultInstanceForType()
Returns
Type Description
Document.Style

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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;

Returns
Type Description
String

The fontFamily.

getFontFamilyBytes()

public ByteString getFontFamilyBytes()

Font family such as Arial, Times New Roman. https://www.w3schools.com/cssref/pr_font_font-family.asp

string font_family = 8;

Returns
Type Description
ByteString

The bytes for fontFamily.

getFontSize()

public Document.Style.FontSize getFontSize()

Font size.

.google.cloud.documentai.v1.Document.Style.FontSize font_size = 7;

Returns
Type Description
Document.Style.FontSize

The fontSize.

getFontSizeBuilder()

public Document.Style.FontSize.Builder getFontSizeBuilder()

Font size.

.google.cloud.documentai.v1.Document.Style.FontSize font_size = 7;

Returns
Type Description
Document.Style.FontSize.Builder

getFontSizeOrBuilder()

public Document.Style.FontSizeOrBuilder getFontSizeOrBuilder()

Font size.

.google.cloud.documentai.v1.Document.Style.FontSize font_size = 7;

Returns
Type Description
Document.Style.FontSizeOrBuilder

getFontWeight()

public String getFontWeight()

Font weight. Possible values are normal, bold, bolder, and lighter.

string font_weight = 4;

Returns
Type Description
String

The fontWeight.

getFontWeightBytes()

public ByteString getFontWeightBytes()

Font weight. Possible values are normal, bold, bolder, and lighter.

string font_weight = 4;

Returns
Type Description
ByteString

The bytes for fontWeight.

getTextAnchor()

public Document.TextAnchor getTextAnchor()

Text anchor indexing into the Document.text.

.google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1;

Returns
Type Description
Document.TextAnchor

The textAnchor.

getTextAnchorBuilder()

public Document.TextAnchor.Builder getTextAnchorBuilder()

Text anchor indexing into the Document.text.

.google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1;

Returns
Type Description
Document.TextAnchor.Builder

getTextAnchorOrBuilder()

public Document.TextAnchorOrBuilder getTextAnchorOrBuilder()

Text anchor indexing into the Document.text.

.google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1;

Returns
Type Description
Document.TextAnchorOrBuilder

getTextDecoration()

public String getTextDecoration()

Text decoration. Follows CSS standard. <text-decoration-line> <text-decoration-color> <text-decoration-style>

string text_decoration = 6;

Returns
Type Description
String

The textDecoration.

getTextDecorationBytes()

public ByteString getTextDecorationBytes()

Text decoration. Follows CSS standard. <text-decoration-line> <text-decoration-color> <text-decoration-style>

string text_decoration = 6;

Returns
Type Description
ByteString

The bytes for textDecoration.

getTextStyle()

public String getTextStyle()

Text style. Possible values are normal, italic, and oblique.

string text_style = 5;

Returns
Type Description
String

The textStyle.

getTextStyleBytes()

public ByteString getTextStyleBytes()

Text style. Possible values are normal, italic, and oblique.

string text_style = 5;

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.v1.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.v1.Document.TextAnchor text_anchor = 1;

Returns
Type Description
boolean

Whether the textAnchor field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeBackgroundColor(Color value)

public Document.Style.Builder mergeBackgroundColor(Color value)

Text background color.

.google.type.Color background_color = 3;

Parameter
Name Description
value com.google.type.Color
Returns
Type Description
Document.Style.Builder

mergeColor(Color value)

public Document.Style.Builder mergeColor(Color value)

Text color.

.google.type.Color color = 2;

Parameter
Name Description
value com.google.type.Color
Returns
Type Description
Document.Style.Builder

mergeFontSize(Document.Style.FontSize value)

public Document.Style.Builder mergeFontSize(Document.Style.FontSize value)

Font size.

.google.cloud.documentai.v1.Document.Style.FontSize font_size = 7;

Parameter
Name Description
value Document.Style.FontSize
Returns
Type Description
Document.Style.Builder

mergeFrom(Document.Style other)

public Document.Style.Builder mergeFrom(Document.Style other)
Parameter
Name Description
other Document.Style
Returns
Type Description
Document.Style.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Document.Style.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Document.Style.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Document.Style.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Document.Style.Builder
Overrides

mergeTextAnchor(Document.TextAnchor value)

public Document.Style.Builder mergeTextAnchor(Document.TextAnchor value)

Text anchor indexing into the Document.text.

.google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1;

Parameter
Name Description
value Document.TextAnchor
Returns
Type Description
Document.Style.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Document.Style.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Document.Style.Builder
Overrides

setBackgroundColor(Color value)

public Document.Style.Builder setBackgroundColor(Color value)

Text background color.

.google.type.Color background_color = 3;

Parameter
Name Description
value com.google.type.Color
Returns
Type Description
Document.Style.Builder

setBackgroundColor(Color.Builder builderForValue)

public Document.Style.Builder setBackgroundColor(Color.Builder builderForValue)

Text background color.

.google.type.Color background_color = 3;

Parameter
Name Description
builderForValue com.google.type.Color.Builder
Returns
Type Description
Document.Style.Builder

setColor(Color value)

public Document.Style.Builder setColor(Color value)

Text color.

.google.type.Color color = 2;

Parameter
Name Description
value com.google.type.Color
Returns
Type Description
Document.Style.Builder

setColor(Color.Builder builderForValue)

public Document.Style.Builder setColor(Color.Builder builderForValue)

Text color.

.google.type.Color color = 2;

Parameter
Name Description
builderForValue com.google.type.Color.Builder
Returns
Type Description
Document.Style.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Document.Style.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Document.Style.Builder
Overrides

setFontFamily(String value)

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;

Parameter
Name Description
value String

The fontFamily to set.

Returns
Type Description
Document.Style.Builder

This builder for chaining.

setFontFamilyBytes(ByteString value)

public Document.Style.Builder setFontFamilyBytes(ByteString value)

Font family such as Arial, Times New Roman. https://www.w3schools.com/cssref/pr_font_font-family.asp

string font_family = 8;

Parameter
Name Description
value ByteString

The bytes for fontFamily to set.

Returns
Type Description
Document.Style.Builder

This builder for chaining.

setFontSize(Document.Style.FontSize value)

public Document.Style.Builder setFontSize(Document.Style.FontSize value)

Font size.

.google.cloud.documentai.v1.Document.Style.FontSize font_size = 7;

Parameter
Name Description
value Document.Style.FontSize
Returns
Type Description
Document.Style.Builder

setFontSize(Document.Style.FontSize.Builder builderForValue)

public Document.Style.Builder setFontSize(Document.Style.FontSize.Builder builderForValue)

Font size.

.google.cloud.documentai.v1.Document.Style.FontSize font_size = 7;

Parameter
Name Description
builderForValue Document.Style.FontSize.Builder
Returns
Type Description
Document.Style.Builder

setFontWeight(String value)

public Document.Style.Builder setFontWeight(String value)

Font weight. Possible values are normal, bold, bolder, and lighter.

string font_weight = 4;

Parameter
Name Description
value String

The fontWeight to set.

Returns
Type Description
Document.Style.Builder

This builder for chaining.

setFontWeightBytes(ByteString value)

public Document.Style.Builder setFontWeightBytes(ByteString value)

Font weight. Possible values are normal, bold, bolder, and lighter.

string font_weight = 4;

Parameter
Name Description
value ByteString

The bytes for fontWeight to set.

Returns
Type Description
Document.Style.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Document.Style.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Document.Style.Builder
Overrides

setTextAnchor(Document.TextAnchor value)

public Document.Style.Builder setTextAnchor(Document.TextAnchor value)

Text anchor indexing into the Document.text.

.google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1;

Parameter
Name Description
value Document.TextAnchor
Returns
Type Description
Document.Style.Builder

setTextAnchor(Document.TextAnchor.Builder builderForValue)

public Document.Style.Builder setTextAnchor(Document.TextAnchor.Builder builderForValue)

Text anchor indexing into the Document.text.

.google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1;

Parameter
Name Description
builderForValue Document.TextAnchor.Builder
Returns
Type Description
Document.Style.Builder

setTextDecoration(String value)

public Document.Style.Builder setTextDecoration(String value)

Text decoration. Follows CSS standard. <text-decoration-line> <text-decoration-color> <text-decoration-style>

string text_decoration = 6;

Parameter
Name Description
value String

The textDecoration to set.

Returns
Type Description
Document.Style.Builder

This builder for chaining.

setTextDecorationBytes(ByteString value)

public Document.Style.Builder setTextDecorationBytes(ByteString value)

Text decoration. Follows CSS standard. <text-decoration-line> <text-decoration-color> <text-decoration-style>

string text_decoration = 6;

Parameter
Name Description
value ByteString

The bytes for textDecoration to set.

Returns
Type Description
Document.Style.Builder

This builder for chaining.

setTextStyle(String value)

public Document.Style.Builder setTextStyle(String value)

Text style. Possible values are normal, italic, and oblique.

string text_style = 5;

Parameter
Name Description
value String

The textStyle to set.

Returns
Type Description
Document.Style.Builder

This builder for chaining.

setTextStyleBytes(ByteString value)

public Document.Style.Builder setTextStyleBytes(ByteString value)

Text style. Possible values are normal, italic, and oblique.

string text_style = 5;

Parameter
Name Description
value ByteString

The bytes for textStyle to set.

Returns
Type Description
Document.Style.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Document.Style.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Document.Style.Builder
Overrides