Class Document.Page.Token.StyleInfo.Builder (2.50.0)

public static final class Document.Page.Token.StyleInfo.Builder extends GeneratedMessageV3.Builder<Document.Page.Token.StyleInfo.Builder> implements Document.Page.Token.StyleInfoOrBuilder

Font and other text style attributes.

Protobuf type google.cloud.documentai.v1.Document.Page.Token.StyleInfo

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Document.Page.Token.StyleInfo build()
Returns
Type Description
Document.Page.Token.StyleInfo

buildPartial()

public Document.Page.Token.StyleInfo buildPartial()
Returns
Type Description
Document.Page.Token.StyleInfo

clear()

public Document.Page.Token.StyleInfo.Builder clear()
Returns
Type Description
Document.Page.Token.StyleInfo.Builder
Overrides

clearBackgroundColor()

public Document.Page.Token.StyleInfo.Builder clearBackgroundColor()

Color of the background.

.google.type.Color background_color = 15;

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

clearBold()

public Document.Page.Token.StyleInfo.Builder clearBold()

Whether the text is bold (equivalent to font_weight is at least 700).

bool bold = 5;

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearFontSize()

public Document.Page.Token.StyleInfo.Builder clearFontSize()

Font size in points (1 point is ¹⁄₇₂ inches).

int32 font_size = 1;

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

clearFontType()

public Document.Page.Token.StyleInfo.Builder clearFontType()

Name or style of the font.

string font_type = 4;

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

clearFontWeight()

public Document.Page.Token.StyleInfo.Builder clearFontWeight()

TrueType weight on a scale 100 (thin) to 1000 (ultra-heavy). Normal is 400, bold is 700.

int32 font_weight = 12;

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

clearHandwritten()

public Document.Page.Token.StyleInfo.Builder clearHandwritten()

Whether the text is handwritten.

bool handwritten = 13;

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

clearItalic()

public Document.Page.Token.StyleInfo.Builder clearItalic()

Whether the text is italic.

bool italic = 6;

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

clearLetterSpacing()

public Document.Page.Token.StyleInfo.Builder clearLetterSpacing()

Letter spacing in points.

double letter_spacing = 3;

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPixelFontSize()

public Document.Page.Token.StyleInfo.Builder clearPixelFontSize()

Font size in pixels, equal to unrounded font_size

  • resolution ÷ 72.0.

double pixel_font_size = 2;

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

clearSmallcaps()

public Document.Page.Token.StyleInfo.Builder clearSmallcaps()

Whether the text is in small caps. This feature is not supported yet.

bool smallcaps = 11;

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

clearStrikeout()

public Document.Page.Token.StyleInfo.Builder clearStrikeout()

Whether the text is strikethrough. This feature is not supported yet.

bool strikeout = 8;

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

clearSubscript()

public Document.Page.Token.StyleInfo.Builder clearSubscript()

Whether the text is a subscript. This feature is not supported yet.

bool subscript = 9;

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

clearSuperscript()

public Document.Page.Token.StyleInfo.Builder clearSuperscript()

Whether the text is a superscript. This feature is not supported yet.

bool superscript = 10;

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

clearTextColor()

public Document.Page.Token.StyleInfo.Builder clearTextColor()

Color of the text.

.google.type.Color text_color = 14;

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

clearUnderlined()

public Document.Page.Token.StyleInfo.Builder clearUnderlined()

Whether the text is underlined.

bool underlined = 7;

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

clone()

public Document.Page.Token.StyleInfo.Builder clone()
Returns
Type Description
Document.Page.Token.StyleInfo.Builder
Overrides

getBackgroundColor()

public Color getBackgroundColor()

Color of the background.

.google.type.Color background_color = 15;

Returns
Type Description
com.google.type.Color

The backgroundColor.

getBackgroundColorBuilder()

public Color.Builder getBackgroundColorBuilder()

Color of the background.

.google.type.Color background_color = 15;

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

getBackgroundColorOrBuilder()

public ColorOrBuilder getBackgroundColorOrBuilder()

Color of the background.

.google.type.Color background_color = 15;

Returns
Type Description
com.google.type.ColorOrBuilder

getBold()

public boolean getBold()

Whether the text is bold (equivalent to font_weight is at least 700).

bool bold = 5;

Returns
Type Description
boolean

The bold.

getDefaultInstanceForType()

public Document.Page.Token.StyleInfo getDefaultInstanceForType()
Returns
Type Description
Document.Page.Token.StyleInfo

getDescriptorForType()

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

getFontSize()

public int getFontSize()

Font size in points (1 point is ¹⁄₇₂ inches).

int32 font_size = 1;

Returns
Type Description
int

The fontSize.

getFontType()

public String getFontType()

Name or style of the font.

string font_type = 4;

Returns
Type Description
String

The fontType.

getFontTypeBytes()

public ByteString getFontTypeBytes()

Name or style of the font.

string font_type = 4;

Returns
Type Description
ByteString

The bytes for fontType.

getFontWeight()

public int getFontWeight()

TrueType weight on a scale 100 (thin) to 1000 (ultra-heavy). Normal is 400, bold is 700.

int32 font_weight = 12;

Returns
Type Description
int

The fontWeight.

getHandwritten()

public boolean getHandwritten()

Whether the text is handwritten.

bool handwritten = 13;

Returns
Type Description
boolean

The handwritten.

getItalic()

public boolean getItalic()

Whether the text is italic.

bool italic = 6;

Returns
Type Description
boolean

The italic.

getLetterSpacing()

public double getLetterSpacing()

Letter spacing in points.

double letter_spacing = 3;

Returns
Type Description
double

The letterSpacing.

getPixelFontSize()

public double getPixelFontSize()

Font size in pixels, equal to unrounded font_size

  • resolution ÷ 72.0.

double pixel_font_size = 2;

Returns
Type Description
double

The pixelFontSize.

getSmallcaps()

public boolean getSmallcaps()

Whether the text is in small caps. This feature is not supported yet.

bool smallcaps = 11;

Returns
Type Description
boolean

The smallcaps.

getStrikeout()

public boolean getStrikeout()

Whether the text is strikethrough. This feature is not supported yet.

bool strikeout = 8;

Returns
Type Description
boolean

The strikeout.

getSubscript()

public boolean getSubscript()

Whether the text is a subscript. This feature is not supported yet.

bool subscript = 9;

Returns
Type Description
boolean

The subscript.

getSuperscript()

public boolean getSuperscript()

Whether the text is a superscript. This feature is not supported yet.

bool superscript = 10;

Returns
Type Description
boolean

The superscript.

getTextColor()

public Color getTextColor()

Color of the text.

.google.type.Color text_color = 14;

Returns
Type Description
com.google.type.Color

The textColor.

getTextColorBuilder()

public Color.Builder getTextColorBuilder()

Color of the text.

.google.type.Color text_color = 14;

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

getTextColorOrBuilder()

public ColorOrBuilder getTextColorOrBuilder()

Color of the text.

.google.type.Color text_color = 14;

Returns
Type Description
com.google.type.ColorOrBuilder

getUnderlined()

public boolean getUnderlined()

Whether the text is underlined.

bool underlined = 7;

Returns
Type Description
boolean

The underlined.

hasBackgroundColor()

public boolean hasBackgroundColor()

Color of the background.

.google.type.Color background_color = 15;

Returns
Type Description
boolean

Whether the backgroundColor field is set.

hasTextColor()

public boolean hasTextColor()

Color of the text.

.google.type.Color text_color = 14;

Returns
Type Description
boolean

Whether the textColor 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.Page.Token.StyleInfo.Builder mergeBackgroundColor(Color value)

Color of the background.

.google.type.Color background_color = 15;

Parameter
Name Description
value com.google.type.Color
Returns
Type Description
Document.Page.Token.StyleInfo.Builder

mergeFrom(Document.Page.Token.StyleInfo other)

public Document.Page.Token.StyleInfo.Builder mergeFrom(Document.Page.Token.StyleInfo other)
Parameter
Name Description
other Document.Page.Token.StyleInfo
Returns
Type Description
Document.Page.Token.StyleInfo.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public Document.Page.Token.StyleInfo.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Document.Page.Token.StyleInfo.Builder
Overrides

mergeTextColor(Color value)

public Document.Page.Token.StyleInfo.Builder mergeTextColor(Color value)

Color of the text.

.google.type.Color text_color = 14;

Parameter
Name Description
value com.google.type.Color
Returns
Type Description
Document.Page.Token.StyleInfo.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setBackgroundColor(Color value)

public Document.Page.Token.StyleInfo.Builder setBackgroundColor(Color value)

Color of the background.

.google.type.Color background_color = 15;

Parameter
Name Description
value com.google.type.Color
Returns
Type Description
Document.Page.Token.StyleInfo.Builder

setBackgroundColor(Color.Builder builderForValue)

public Document.Page.Token.StyleInfo.Builder setBackgroundColor(Color.Builder builderForValue)

Color of the background.

.google.type.Color background_color = 15;

Parameter
Name Description
builderForValue com.google.type.Color.Builder
Returns
Type Description
Document.Page.Token.StyleInfo.Builder

setBold(boolean value)

public Document.Page.Token.StyleInfo.Builder setBold(boolean value)

Whether the text is bold (equivalent to font_weight is at least 700).

bool bold = 5;

Parameter
Name Description
value boolean

The bold to set.

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setFontSize(int value)

public Document.Page.Token.StyleInfo.Builder setFontSize(int value)

Font size in points (1 point is ¹⁄₇₂ inches).

int32 font_size = 1;

Parameter
Name Description
value int

The fontSize to set.

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

setFontType(String value)

public Document.Page.Token.StyleInfo.Builder setFontType(String value)

Name or style of the font.

string font_type = 4;

Parameter
Name Description
value String

The fontType to set.

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

setFontTypeBytes(ByteString value)

public Document.Page.Token.StyleInfo.Builder setFontTypeBytes(ByteString value)

Name or style of the font.

string font_type = 4;

Parameter
Name Description
value ByteString

The bytes for fontType to set.

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

setFontWeight(int value)

public Document.Page.Token.StyleInfo.Builder setFontWeight(int value)

TrueType weight on a scale 100 (thin) to 1000 (ultra-heavy). Normal is 400, bold is 700.

int32 font_weight = 12;

Parameter
Name Description
value int

The fontWeight to set.

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

setHandwritten(boolean value)

public Document.Page.Token.StyleInfo.Builder setHandwritten(boolean value)

Whether the text is handwritten.

bool handwritten = 13;

Parameter
Name Description
value boolean

The handwritten to set.

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

setItalic(boolean value)

public Document.Page.Token.StyleInfo.Builder setItalic(boolean value)

Whether the text is italic.

bool italic = 6;

Parameter
Name Description
value boolean

The italic to set.

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

setLetterSpacing(double value)

public Document.Page.Token.StyleInfo.Builder setLetterSpacing(double value)

Letter spacing in points.

double letter_spacing = 3;

Parameter
Name Description
value double

The letterSpacing to set.

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

setPixelFontSize(double value)

public Document.Page.Token.StyleInfo.Builder setPixelFontSize(double value)

Font size in pixels, equal to unrounded font_size

  • resolution ÷ 72.0.

double pixel_font_size = 2;

Parameter
Name Description
value double

The pixelFontSize to set.

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

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

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

setSmallcaps(boolean value)

public Document.Page.Token.StyleInfo.Builder setSmallcaps(boolean value)

Whether the text is in small caps. This feature is not supported yet.

bool smallcaps = 11;

Parameter
Name Description
value boolean

The smallcaps to set.

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

setStrikeout(boolean value)

public Document.Page.Token.StyleInfo.Builder setStrikeout(boolean value)

Whether the text is strikethrough. This feature is not supported yet.

bool strikeout = 8;

Parameter
Name Description
value boolean

The strikeout to set.

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

setSubscript(boolean value)

public Document.Page.Token.StyleInfo.Builder setSubscript(boolean value)

Whether the text is a subscript. This feature is not supported yet.

bool subscript = 9;

Parameter
Name Description
value boolean

The subscript to set.

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

setSuperscript(boolean value)

public Document.Page.Token.StyleInfo.Builder setSuperscript(boolean value)

Whether the text is a superscript. This feature is not supported yet.

bool superscript = 10;

Parameter
Name Description
value boolean

The superscript to set.

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

setTextColor(Color value)

public Document.Page.Token.StyleInfo.Builder setTextColor(Color value)

Color of the text.

.google.type.Color text_color = 14;

Parameter
Name Description
value com.google.type.Color
Returns
Type Description
Document.Page.Token.StyleInfo.Builder

setTextColor(Color.Builder builderForValue)

public Document.Page.Token.StyleInfo.Builder setTextColor(Color.Builder builderForValue)

Color of the text.

.google.type.Color text_color = 14;

Parameter
Name Description
builderForValue com.google.type.Color.Builder
Returns
Type Description
Document.Page.Token.StyleInfo.Builder

setUnderlined(boolean value)

public Document.Page.Token.StyleInfo.Builder setUnderlined(boolean value)

Whether the text is underlined.

bool underlined = 7;

Parameter
Name Description
value boolean

The underlined to set.

Returns
Type Description
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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