Class Document.Style (2.43.0)

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

Static Fields

BACKGROUND_COLOR_FIELD_NUMBER

public static final int BACKGROUND_COLOR_FIELD_NUMBER
Field Value
TypeDescription
int

COLOR_FIELD_NUMBER

public static final int COLOR_FIELD_NUMBER
Field Value
TypeDescription
int

FONT_FAMILY_FIELD_NUMBER

public static final int FONT_FAMILY_FIELD_NUMBER
Field Value
TypeDescription
int

FONT_SIZE_FIELD_NUMBER

public static final int FONT_SIZE_FIELD_NUMBER
Field Value
TypeDescription
int

FONT_WEIGHT_FIELD_NUMBER

public static final int FONT_WEIGHT_FIELD_NUMBER
Field Value
TypeDescription
int

TEXT_ANCHOR_FIELD_NUMBER

public static final int TEXT_ANCHOR_FIELD_NUMBER
Field Value
TypeDescription
int

TEXT_DECORATION_FIELD_NUMBER

public static final int TEXT_DECORATION_FIELD_NUMBER
Field Value
TypeDescription
int

TEXT_STYLE_FIELD_NUMBER

public static final int TEXT_STYLE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Document.Style getDefaultInstance()
Returns
TypeDescription
Document.Style

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Document.Style.Builder newBuilder()
Returns
TypeDescription
Document.Style.Builder

newBuilder(Document.Style prototype)

public static Document.Style.Builder newBuilder(Document.Style prototype)
Parameter
NameDescription
prototypeDocument.Style
Returns
TypeDescription
Document.Style.Builder

parseDelimitedFrom(InputStream input)

public static Document.Style parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Document.Style
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Document.Style parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document.Style
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Document.Style parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Document.Style
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Document.Style parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document.Style
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Document.Style parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Document.Style
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Document.Style parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document.Style
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Document.Style parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Document.Style
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Document.Style parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document.Style
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Document.Style parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Document.Style
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Document.Style parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document.Style
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Document.Style parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Document.Style
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Document.Style parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document.Style
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Document.Style> parser()
Returns
TypeDescription
Parser<Style>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getBackgroundColor()

public Color getBackgroundColor()

Text background color.

.google.type.Color background_color = 3;

Returns
TypeDescription
com.google.type.Color

The backgroundColor.

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.

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

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.v1beta2.Document.Style.FontSize font_size = 7;

Returns
TypeDescription
Document.Style.FontSize

The fontSize.

getFontSizeOrBuilder()

public Document.Style.FontSizeOrBuilder getFontSizeOrBuilder()

Font size.

.google.cloud.documentai.v1beta2.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.

string font_weight = 4;

Returns
TypeDescription
String

The fontWeight.

getFontWeightBytes()

public ByteString getFontWeightBytes()

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

string font_weight = 4;

Returns
TypeDescription
ByteString

The bytes for fontWeight.

getParserForType()

public Parser<Document.Style> getParserForType()
Returns
TypeDescription
Parser<Style>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getTextAnchor()

public Document.TextAnchor getTextAnchor()

Text anchor indexing into the Document.text.

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

Returns
TypeDescription
Document.TextAnchor

The textAnchor.

getTextAnchorOrBuilder()

public Document.TextAnchorOrBuilder getTextAnchorOrBuilder()

Text anchor indexing into the Document.text.

.google.cloud.documentai.v1beta2.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>

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>

string text_decoration = 6;

Returns
TypeDescription
ByteString

The bytes for textDecoration.

getTextStyle()

public String getTextStyle()

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

string text_style = 5;

Returns
TypeDescription
String

The textStyle.

getTextStyleBytes()

public ByteString getTextStyleBytes()

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

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

Returns
TypeDescription
boolean

Whether the textAnchor field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Document.Style.Builder newBuilderForType()
Returns
TypeDescription
Document.Style.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Document.Style.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Document.Style.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Document.Style.Builder toBuilder()
Returns
TypeDescription
Document.Style.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException