Class Document.Style.Builder (2.13.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Document.Style.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Document.Style.Builder
Overrides

build()

public Document.Style build()
Returns
TypeDescription
Document.Style

buildPartial()

public Document.Style buildPartial()
Returns
TypeDescription
Document.Style

clear()

public Document.Style.Builder clear()
Returns
TypeDescription
Document.Style.Builder
Overrides

clearBackgroundColor()

public Document.Style.Builder clearBackgroundColor()

Text background color.

.google.type.Color background_color = 3;

Returns
TypeDescription
Document.Style.Builder

clearColor()

public Document.Style.Builder clearColor()

Text color.

.google.type.Color color = 2;

Returns
TypeDescription
Document.Style.Builder

clearField(Descriptors.FieldDescriptor field)

public Document.Style.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
Document.Style.Builder

clearFontWeight()

public Document.Style.Builder clearFontWeight()

Font weight. Possible values are normal, bold, bolder, and lighter. https://www.w3schools.com/cssref/pr_font_weight.asp

string font_weight = 4;

Returns
TypeDescription
Document.Style.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Document.Style.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
Document.Style.Builder

clearTextDecoration()

public Document.Style.Builder clearTextDecoration()

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;

Returns
TypeDescription
Document.Style.Builder

This builder for chaining.

clearTextStyle()

public Document.Style.Builder clearTextStyle()

Text style. Possible values are normal, italic, and oblique. https://www.w3schools.com/cssref/pr_font_font-style.asp

string text_style = 5;

Returns
TypeDescription
Document.Style.Builder

This builder for chaining.

clone()

public Document.Style.Builder clone()
Returns
TypeDescription
Document.Style.Builder
Overrides

getBackgroundColor()

public Color getBackgroundColor()

Text background color.

.google.type.Color background_color = 3;

Returns
TypeDescription
com.google.type.Color

The backgroundColor.

getBackgroundColorBuilder()

public Color.Builder getBackgroundColorBuilder()

Text background color.

.google.type.Color background_color = 3;

Returns
TypeDescription
com.google.type.Color.Builder

getBackgroundColorOrBuilder()

public ColorOrBuilder getBackgroundColorOrBuilder()

Text background color.

.google.type.Color background_color = 3;

Returns
TypeDescription
com.google.type.ColorOrBuilder

getColor()

public Color getColor()

Text color.

.google.type.Color color = 2;

Returns
TypeDescription
com.google.type.Color

The color.

getColorBuilder()

public Color.Builder getColorBuilder()

Text color.

.google.type.Color color = 2;

Returns
TypeDescription
com.google.type.Color.Builder

getColorOrBuilder()

public ColorOrBuilder getColorOrBuilder()

Text color.

.google.type.Color color = 2;

Returns
TypeDescription
com.google.type.ColorOrBuilder

getDefaultInstanceForType()

public Document.Style getDefaultInstanceForType()
Returns
TypeDescription
Document.Style

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for fontFamily.

getFontSize()

public Document.Style.FontSize getFontSize()

Font size.

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

Returns
TypeDescription
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
TypeDescription
Document.Style.FontSize.Builder

getFontSizeOrBuilder()

public Document.Style.FontSizeOrBuilder getFontSizeOrBuilder()

Font size.

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

Returns
TypeDescription
Document.Style.FontSizeOrBuilder

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;

Returns
TypeDescription
String

The fontWeight.

getFontWeightBytes()

public 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;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
Document.TextAnchorOrBuilder

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;

Returns
TypeDescription
String

The textDecoration.

getTextDecorationBytes()

public 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;

Returns
TypeDescription
ByteString

The bytes for textDecoration.

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;

Returns
TypeDescription
String

The textStyle.

getTextStyleBytes()

public 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;

Returns
TypeDescription
ByteString

The bytes for textStyle.

hasBackgroundColor()

public boolean hasBackgroundColor()

Text background color.

.google.type.Color background_color = 3;

Returns
TypeDescription
boolean

Whether the backgroundColor field is set.

hasColor()

public boolean hasColor()

Text color.

.google.type.Color color = 2;

Returns
TypeDescription
boolean

Whether the color field is set.

hasFontSize()

public boolean hasFontSize()

Font size.

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

Returns
TypeDescription
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
TypeDescription
boolean

Whether the textAnchor field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeBackgroundColor(Color value)

public Document.Style.Builder mergeBackgroundColor(Color value)

Text background color.

.google.type.Color background_color = 3;

Parameter
NameDescription
valuecom.google.type.Color
Returns
TypeDescription
Document.Style.Builder

mergeColor(Color value)

public Document.Style.Builder mergeColor(Color value)

Text color.

.google.type.Color color = 2;

Parameter
NameDescription
valuecom.google.type.Color
Returns
TypeDescription
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
NameDescription
valueDocument.Style.FontSize
Returns
TypeDescription
Document.Style.Builder

mergeFrom(Document.Style other)

public Document.Style.Builder mergeFrom(Document.Style other)
Parameter
NameDescription
otherDocument.Style
Returns
TypeDescription
Document.Style.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Document.Style.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document.Style.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Document.Style.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueDocument.TextAnchor
Returns
TypeDescription
Document.Style.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Document.Style.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Document.Style.Builder
Overrides

setBackgroundColor(Color value)

public Document.Style.Builder setBackgroundColor(Color value)

Text background color.

.google.type.Color background_color = 3;

Parameter
NameDescription
valuecom.google.type.Color
Returns
TypeDescription
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
NameDescription
builderForValuecom.google.type.Color.Builder
Returns
TypeDescription
Document.Style.Builder

setColor(Color value)

public Document.Style.Builder setColor(Color value)

Text color.

.google.type.Color color = 2;

Parameter
NameDescription
valuecom.google.type.Color
Returns
TypeDescription
Document.Style.Builder

setColor(Color.Builder builderForValue)

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

Text color.

.google.type.Color color = 2;

Parameter
NameDescription
builderForValuecom.google.type.Color.Builder
Returns
TypeDescription
Document.Style.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Document.Style.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The fontFamily to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for fontFamily to set.

Returns
TypeDescription
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
NameDescription
valueDocument.Style.FontSize
Returns
TypeDescription
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
NameDescription
builderForValueDocument.Style.FontSize.Builder
Returns
TypeDescription
Document.Style.Builder

setFontWeight(String value)

public Document.Style.Builder setFontWeight(String value)

Font weight. Possible values are normal, bold, bolder, and lighter. https://www.w3schools.com/cssref/pr_font_weight.asp

string font_weight = 4;

Parameter
NameDescription
valueString

The fontWeight to set.

Returns
TypeDescription
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. https://www.w3schools.com/cssref/pr_font_weight.asp

string font_weight = 4;

Parameter
NameDescription
valueByteString

The bytes for fontWeight to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueDocument.TextAnchor
Returns
TypeDescription
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
NameDescription
builderForValueDocument.TextAnchor.Builder
Returns
TypeDescription
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> https://www.w3schools.com/cssref/pr_text_text-decoration.asp

string text_decoration = 6;

Parameter
NameDescription
valueString

The textDecoration to set.

Returns
TypeDescription
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> https://www.w3schools.com/cssref/pr_text_text-decoration.asp

string text_decoration = 6;

Parameter
NameDescription
valueByteString

The bytes for textDecoration to set.

Returns
TypeDescription
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. https://www.w3schools.com/cssref/pr_font_font-style.asp

string text_style = 5;

Parameter
NameDescription
valueString

The textStyle to set.

Returns
TypeDescription
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. https://www.w3schools.com/cssref/pr_font_font-style.asp

string text_style = 5;

Parameter
NameDescription
valueByteString

The bytes for textStyle to set.

Returns
TypeDescription
Document.Style.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Document.Style.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Document.Style.Builder
Overrides