Class Document.Page.Token.StyleInfo.Builder (2.31.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Document.Page.Token.StyleInfo build()
Returns
TypeDescription
Document.Page.Token.StyleInfo

buildPartial()

public Document.Page.Token.StyleInfo buildPartial()
Returns
TypeDescription
Document.Page.Token.StyleInfo

clear()

public Document.Page.Token.StyleInfo.Builder clear()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

This builder for chaining.

clearSmallcaps()

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

Whether the text is in small caps.

bool smallcaps = 11;

Returns
TypeDescription
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

clearStrikeout()

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

Whether the text is strikethrough.

bool strikeout = 8;

Returns
TypeDescription
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

clearSubscript()

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

Whether the text is a subscript.

bool subscript = 9;

Returns
TypeDescription
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

clearSuperscript()

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

Whether the text is a superscript.

bool superscript = 10;

Returns
TypeDescription
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
TypeDescription
Document.Page.Token.StyleInfo.Builder

clearUnderlined()

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

Whether the text is underlined.

bool underlined = 7;

Returns
TypeDescription
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

clone()

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

getBackgroundColor()

public Color getBackgroundColor()

Color of the background.

.google.type.Color background_color = 15;

Returns
TypeDescription
com.google.type.Color

The backgroundColor.

getBackgroundColorBuilder()

public Color.Builder getBackgroundColorBuilder()

Color of the background.

.google.type.Color background_color = 15;

Returns
TypeDescription
com.google.type.Color.Builder

getBackgroundColorOrBuilder()

public ColorOrBuilder getBackgroundColorOrBuilder()

Color of the background.

.google.type.Color background_color = 15;

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

The bold.

getDefaultInstanceForType()

public Document.Page.Token.StyleInfo getDefaultInstanceForType()
Returns
TypeDescription
Document.Page.Token.StyleInfo

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getFontSize()

public int getFontSize()

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

int32 font_size = 1;

Returns
TypeDescription
int

The fontSize.

getFontType()

public String getFontType()

Name or style of the font.

string font_type = 4;

Returns
TypeDescription
String

The fontType.

getFontTypeBytes()

public ByteString getFontTypeBytes()

Name or style of the font.

string font_type = 4;

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

The fontWeight.

getHandwritten()

public boolean getHandwritten()

Whether the text is handwritten.

bool handwritten = 13;

Returns
TypeDescription
boolean

The handwritten.

getItalic()

public boolean getItalic()

Whether the text is italic.

bool italic = 6;

Returns
TypeDescription
boolean

The italic.

getLetterSpacing()

public double getLetterSpacing()

Letter spacing in points.

double letter_spacing = 3;

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

The pixelFontSize.

getSmallcaps()

public boolean getSmallcaps()

Whether the text is in small caps.

bool smallcaps = 11;

Returns
TypeDescription
boolean

The smallcaps.

getStrikeout()

public boolean getStrikeout()

Whether the text is strikethrough.

bool strikeout = 8;

Returns
TypeDescription
boolean

The strikeout.

getSubscript()

public boolean getSubscript()

Whether the text is a subscript.

bool subscript = 9;

Returns
TypeDescription
boolean

The subscript.

getSuperscript()

public boolean getSuperscript()

Whether the text is a superscript.

bool superscript = 10;

Returns
TypeDescription
boolean

The superscript.

getTextColor()

public Color getTextColor()

Color of the text.

.google.type.Color text_color = 14;

Returns
TypeDescription
com.google.type.Color

The textColor.

getTextColorBuilder()

public Color.Builder getTextColorBuilder()

Color of the text.

.google.type.Color text_color = 14;

Returns
TypeDescription
com.google.type.Color.Builder

getTextColorOrBuilder()

public ColorOrBuilder getTextColorOrBuilder()

Color of the text.

.google.type.Color text_color = 14;

Returns
TypeDescription
com.google.type.ColorOrBuilder

getUnderlined()

public boolean getUnderlined()

Whether the text is underlined.

bool underlined = 7;

Returns
TypeDescription
boolean

The underlined.

hasBackgroundColor()

public boolean hasBackgroundColor()

Color of the background.

.google.type.Color background_color = 15;

Returns
TypeDescription
boolean

Whether the backgroundColor field is set.

hasTextColor()

public boolean hasTextColor()

Color of the text.

.google.type.Color text_color = 14;

Returns
TypeDescription
boolean

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

Color of the background.

.google.type.Color background_color = 15;

Parameter
NameDescription
valuecom.google.type.Color
Returns
TypeDescription
Document.Page.Token.StyleInfo.Builder

mergeFrom(Document.Page.Token.StyleInfo other)

public Document.Page.Token.StyleInfo.Builder mergeFrom(Document.Page.Token.StyleInfo other)
Parameter
NameDescription
otherDocument.Page.Token.StyleInfo
Returns
TypeDescription
Document.Page.Token.StyleInfo.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public Document.Page.Token.StyleInfo.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valuecom.google.type.Color
Returns
TypeDescription
Document.Page.Token.StyleInfo.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Document.Page.Token.StyleInfo.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valuecom.google.type.Color
Returns
TypeDescription
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
NameDescription
builderForValuecom.google.type.Color.Builder
Returns
TypeDescription
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
NameDescription
valueboolean

The bold to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueint

The fontSize to set.

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

The fontType to set.

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

The bytes for fontType to set.

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

The fontWeight to set.

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

The handwritten to set.

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

The italic to set.

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

The letterSpacing to set.

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

The pixelFontSize to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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.

bool smallcaps = 11;

Parameter
NameDescription
valueboolean

The smallcaps to set.

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

bool strikeout = 8;

Parameter
NameDescription
valueboolean

The strikeout to set.

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

bool subscript = 9;

Parameter
NameDescription
valueboolean

The subscript to set.

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

bool superscript = 10;

Parameter
NameDescription
valueboolean

The superscript to set.

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

The underlined to set.

Returns
TypeDescription
Document.Page.Token.StyleInfo.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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