All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.documentai.v1beta3.Document Maven / Gradle / Ivy

There is a newer version: 0.71.0
Show newest version
/*
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/documentai/v1beta3/document.proto

// Protobuf Java Version: 3.25.2
package com.google.cloud.documentai.v1beta3;

/**
 *
 *
 * 
 * Document represents the canonical document resource in Document AI. It is an
 * interchange format that provides insights into documents and allows for
 * collaboration between users and Document AI to iterate and optimize for
 * quality.
 * 
* * Protobuf type {@code google.cloud.documentai.v1beta3.Document} */ public final class Document extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Document) DocumentOrBuilder { private static final long serialVersionUID = 0L; // Use Document.newBuilder() to construct. private Document(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Document() { mimeType_ = ""; text_ = ""; textStyles_ = java.util.Collections.emptyList(); pages_ = java.util.Collections.emptyList(); entities_ = java.util.Collections.emptyList(); entityRelations_ = java.util.Collections.emptyList(); textChanges_ = java.util.Collections.emptyList(); revisions_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new Document(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.documentai.v1beta3.DocumentProto .internal_static_google_cloud_documentai_v1beta3_Document_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.documentai.v1beta3.DocumentProto .internal_static_google_cloud_documentai_v1beta3_Document_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.documentai.v1beta3.Document.class, com.google.cloud.documentai.v1beta3.Document.Builder.class); } public interface ShardInfoOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Document.ShardInfo) com.google.protobuf.MessageOrBuilder { /** * * *
     * The 0-based index of this shard.
     * 
* * int64 shard_index = 1; * * @return The shardIndex. */ long getShardIndex(); /** * * *
     * Total number of shards.
     * 
* * int64 shard_count = 2; * * @return The shardCount. */ long getShardCount(); /** * * *
     * The index of the first character in
     * [Document.text][google.cloud.documentai.v1beta3.Document.text] in the
     * overall document global text.
     * 
* * int64 text_offset = 3; * * @return The textOffset. */ long getTextOffset(); } /** * * *
   * For a large document, sharding may be performed to produce several
   * document shards. Each document shard contains this field to detail which
   * shard it is.
   * 
* * Protobuf type {@code google.cloud.documentai.v1beta3.Document.ShardInfo} */ public static final class ShardInfo extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Document.ShardInfo) ShardInfoOrBuilder { private static final long serialVersionUID = 0L; // Use ShardInfo.newBuilder() to construct. private ShardInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ShardInfo() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new ShardInfo(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.documentai.v1beta3.DocumentProto .internal_static_google_cloud_documentai_v1beta3_Document_ShardInfo_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.documentai.v1beta3.DocumentProto .internal_static_google_cloud_documentai_v1beta3_Document_ShardInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.documentai.v1beta3.Document.ShardInfo.class, com.google.cloud.documentai.v1beta3.Document.ShardInfo.Builder.class); } public static final int SHARD_INDEX_FIELD_NUMBER = 1; private long shardIndex_ = 0L; /** * * *
     * The 0-based index of this shard.
     * 
* * int64 shard_index = 1; * * @return The shardIndex. */ @java.lang.Override public long getShardIndex() { return shardIndex_; } public static final int SHARD_COUNT_FIELD_NUMBER = 2; private long shardCount_ = 0L; /** * * *
     * Total number of shards.
     * 
* * int64 shard_count = 2; * * @return The shardCount. */ @java.lang.Override public long getShardCount() { return shardCount_; } public static final int TEXT_OFFSET_FIELD_NUMBER = 3; private long textOffset_ = 0L; /** * * *
     * The index of the first character in
     * [Document.text][google.cloud.documentai.v1beta3.Document.text] in the
     * overall document global text.
     * 
* * int64 text_offset = 3; * * @return The textOffset. */ @java.lang.Override public long getTextOffset() { return textOffset_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (shardIndex_ != 0L) { output.writeInt64(1, shardIndex_); } if (shardCount_ != 0L) { output.writeInt64(2, shardCount_); } if (textOffset_ != 0L) { output.writeInt64(3, textOffset_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (shardIndex_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, shardIndex_); } if (shardCount_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, shardCount_); } if (textOffset_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, textOffset_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.documentai.v1beta3.Document.ShardInfo)) { return super.equals(obj); } com.google.cloud.documentai.v1beta3.Document.ShardInfo other = (com.google.cloud.documentai.v1beta3.Document.ShardInfo) obj; if (getShardIndex() != other.getShardIndex()) return false; if (getShardCount() != other.getShardCount()) return false; if (getTextOffset() != other.getTextOffset()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + SHARD_INDEX_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getShardIndex()); hash = (37 * hash) + SHARD_COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getShardCount()); hash = (37 * hash) + TEXT_OFFSET_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTextOffset()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.documentai.v1beta3.Document.ShardInfo parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.documentai.v1beta3.Document.ShardInfo parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.documentai.v1beta3.Document.ShardInfo parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.documentai.v1beta3.Document.ShardInfo parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.documentai.v1beta3.Document.ShardInfo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.documentai.v1beta3.Document.ShardInfo parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.documentai.v1beta3.Document.ShardInfo parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.documentai.v1beta3.Document.ShardInfo parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.documentai.v1beta3.Document.ShardInfo parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.documentai.v1beta3.Document.ShardInfo parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.documentai.v1beta3.Document.ShardInfo parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.documentai.v1beta3.Document.ShardInfo parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder( com.google.cloud.documentai.v1beta3.Document.ShardInfo prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
     * For a large document, sharding may be performed to produce several
     * document shards. Each document shard contains this field to detail which
     * shard it is.
     * 
* * Protobuf type {@code google.cloud.documentai.v1beta3.Document.ShardInfo} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.Document.ShardInfo) com.google.cloud.documentai.v1beta3.Document.ShardInfoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.documentai.v1beta3.DocumentProto .internal_static_google_cloud_documentai_v1beta3_Document_ShardInfo_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.documentai.v1beta3.DocumentProto .internal_static_google_cloud_documentai_v1beta3_Document_ShardInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.documentai.v1beta3.Document.ShardInfo.class, com.google.cloud.documentai.v1beta3.Document.ShardInfo.Builder.class); } // Construct using com.google.cloud.documentai.v1beta3.Document.ShardInfo.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; shardIndex_ = 0L; shardCount_ = 0L; textOffset_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.documentai.v1beta3.DocumentProto .internal_static_google_cloud_documentai_v1beta3_Document_ShardInfo_descriptor; } @java.lang.Override public com.google.cloud.documentai.v1beta3.Document.ShardInfo getDefaultInstanceForType() { return com.google.cloud.documentai.v1beta3.Document.ShardInfo.getDefaultInstance(); } @java.lang.Override public com.google.cloud.documentai.v1beta3.Document.ShardInfo build() { com.google.cloud.documentai.v1beta3.Document.ShardInfo result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.documentai.v1beta3.Document.ShardInfo buildPartial() { com.google.cloud.documentai.v1beta3.Document.ShardInfo result = new com.google.cloud.documentai.v1beta3.Document.ShardInfo(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.cloud.documentai.v1beta3.Document.ShardInfo result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.shardIndex_ = shardIndex_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.shardCount_ = shardCount_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.textOffset_ = textOffset_; } } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.documentai.v1beta3.Document.ShardInfo) { return mergeFrom((com.google.cloud.documentai.v1beta3.Document.ShardInfo) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.documentai.v1beta3.Document.ShardInfo other) { if (other == com.google.cloud.documentai.v1beta3.Document.ShardInfo.getDefaultInstance()) return this; if (other.getShardIndex() != 0L) { setShardIndex(other.getShardIndex()); } if (other.getShardCount() != 0L) { setShardCount(other.getShardCount()); } if (other.getTextOffset() != 0L) { setTextOffset(other.getTextOffset()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { shardIndex_ = input.readInt64(); bitField0_ |= 0x00000001; break; } // case 8 case 16: { shardCount_ = input.readInt64(); bitField0_ |= 0x00000002; break; } // case 16 case 24: { textOffset_ = input.readInt64(); bitField0_ |= 0x00000004; break; } // case 24 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private long shardIndex_; /** * * *
       * The 0-based index of this shard.
       * 
* * int64 shard_index = 1; * * @return The shardIndex. */ @java.lang.Override public long getShardIndex() { return shardIndex_; } /** * * *
       * The 0-based index of this shard.
       * 
* * int64 shard_index = 1; * * @param value The shardIndex to set. * @return This builder for chaining. */ public Builder setShardIndex(long value) { shardIndex_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * The 0-based index of this shard.
       * 
* * int64 shard_index = 1; * * @return This builder for chaining. */ public Builder clearShardIndex() { bitField0_ = (bitField0_ & ~0x00000001); shardIndex_ = 0L; onChanged(); return this; } private long shardCount_; /** * * *
       * Total number of shards.
       * 
* * int64 shard_count = 2; * * @return The shardCount. */ @java.lang.Override public long getShardCount() { return shardCount_; } /** * * *
       * Total number of shards.
       * 
* * int64 shard_count = 2; * * @param value The shardCount to set. * @return This builder for chaining. */ public Builder setShardCount(long value) { shardCount_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
       * Total number of shards.
       * 
* * int64 shard_count = 2; * * @return This builder for chaining. */ public Builder clearShardCount() { bitField0_ = (bitField0_ & ~0x00000002); shardCount_ = 0L; onChanged(); return this; } private long textOffset_; /** * * *
       * The index of the first character in
       * [Document.text][google.cloud.documentai.v1beta3.Document.text] in the
       * overall document global text.
       * 
* * int64 text_offset = 3; * * @return The textOffset. */ @java.lang.Override public long getTextOffset() { return textOffset_; } /** * * *
       * The index of the first character in
       * [Document.text][google.cloud.documentai.v1beta3.Document.text] in the
       * overall document global text.
       * 
* * int64 text_offset = 3; * * @param value The textOffset to set. * @return This builder for chaining. */ public Builder setTextOffset(long value) { textOffset_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
       * The index of the first character in
       * [Document.text][google.cloud.documentai.v1beta3.Document.text] in the
       * overall document global text.
       * 
* * int64 text_offset = 3; * * @return This builder for chaining. */ public Builder clearTextOffset() { bitField0_ = (bitField0_ & ~0x00000004); textOffset_ = 0L; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.Document.ShardInfo) } // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.Document.ShardInfo) private static final com.google.cloud.documentai.v1beta3.Document.ShardInfo DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.Document.ShardInfo(); } public static com.google.cloud.documentai.v1beta3.Document.ShardInfo getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ShardInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException() .setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.documentai.v1beta3.Document.ShardInfo getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface StyleOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Document.Style) com.google.protobuf.MessageOrBuilder { /** * * *
     * Text anchor indexing into the
     * [Document.text][google.cloud.documentai.v1beta3.Document.text].
     * 
* * .google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1; * * @return Whether the textAnchor field is set. */ boolean hasTextAnchor(); /** * * *
     * Text anchor indexing into the
     * [Document.text][google.cloud.documentai.v1beta3.Document.text].
     * 
* * .google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1; * * @return The textAnchor. */ com.google.cloud.documentai.v1beta3.Document.TextAnchor getTextAnchor(); /** * * *
     * Text anchor indexing into the
     * [Document.text][google.cloud.documentai.v1beta3.Document.text].
     * 
* * .google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1; */ com.google.cloud.documentai.v1beta3.Document.TextAnchorOrBuilder getTextAnchorOrBuilder(); /** * * *
     * Text color.
     * 
* * .google.type.Color color = 2; * * @return Whether the color field is set. */ boolean hasColor(); /** * * *
     * Text color.
     * 
* * .google.type.Color color = 2; * * @return The color. */ com.google.type.Color getColor(); /** * * *
     * Text color.
     * 
* * .google.type.Color color = 2; */ com.google.type.ColorOrBuilder getColorOrBuilder(); /** * * *
     * Text background color.
     * 
* * .google.type.Color background_color = 3; * * @return Whether the backgroundColor field is set. */ boolean hasBackgroundColor(); /** * * *
     * Text background color.
     * 
* * .google.type.Color background_color = 3; * * @return The backgroundColor. */ com.google.type.Color getBackgroundColor(); /** * * *
     * Text background color.
     * 
* * .google.type.Color background_color = 3; */ com.google.type.ColorOrBuilder getBackgroundColorOrBuilder(); /** * * *
     * [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp).
     * Possible values are `normal`, `bold`, `bolder`, and `lighter`.
     * 
* * string font_weight = 4; * * @return The fontWeight. */ java.lang.String getFontWeight(); /** * * *
     * [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp).
     * Possible values are `normal`, `bold`, `bolder`, and `lighter`.
     * 
* * string font_weight = 4; * * @return The bytes for fontWeight. */ com.google.protobuf.ByteString getFontWeightBytes(); /** * * *
     * [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).
     * Possible values are `normal`, `italic`, and `oblique`.
     * 
* * string text_style = 5; * * @return The textStyle. */ java.lang.String getTextStyle(); /** * * *
     * [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).
     * Possible values are `normal`, `italic`, and `oblique`.
     * 
* * string text_style = 5; * * @return The bytes for textStyle. */ com.google.protobuf.ByteString getTextStyleBytes(); /** * * *
     * [Text
     * decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp).
     * Follows CSS standard. <text-decoration-line> <text-decoration-color>
     * <text-decoration-style>
     * 
* * string text_decoration = 6; * * @return The textDecoration. */ java.lang.String getTextDecoration(); /** * * *
     * [Text
     * decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp).
     * Follows CSS standard. <text-decoration-line> <text-decoration-color>
     * <text-decoration-style>
     * 
* * string text_decoration = 6; * * @return The bytes for textDecoration. */ com.google.protobuf.ByteString getTextDecorationBytes(); /** * * *
     * Font size.
     * 
* * .google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7; * * @return Whether the fontSize field is set. */ boolean hasFontSize(); /** * * *
     * Font size.
     * 
* * .google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7; * * @return The fontSize. */ com.google.cloud.documentai.v1beta3.Document.Style.FontSize getFontSize(); /** * * *
     * Font size.
     * 
* * .google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7; */ com.google.cloud.documentai.v1beta3.Document.Style.FontSizeOrBuilder getFontSizeOrBuilder(); /** * * *
     * Font family such as `Arial`, `Times New Roman`.
     * https://www.w3schools.com/cssref/pr_font_font-family.asp
     * 
* * string font_family = 8; * * @return The fontFamily. */ java.lang.String getFontFamily(); /** * * *
     * Font family such as `Arial`, `Times New Roman`.
     * https://www.w3schools.com/cssref/pr_font_font-family.asp
     * 
* * string font_family = 8; * * @return The bytes for fontFamily. */ com.google.protobuf.ByteString getFontFamilyBytes(); } /** * * *
   * Annotation for common text style attributes. This adheres to CSS
   * conventions as much as possible.
   * 
* * Protobuf type {@code google.cloud.documentai.v1beta3.Document.Style} */ public static final class Style extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Document.Style) StyleOrBuilder { private static final long serialVersionUID = 0L; // Use Style.newBuilder() to construct. private Style(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Style() { fontWeight_ = ""; textStyle_ = ""; textDecoration_ = ""; fontFamily_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new Style(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.documentai.v1beta3.DocumentProto .internal_static_google_cloud_documentai_v1beta3_Document_Style_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.documentai.v1beta3.DocumentProto .internal_static_google_cloud_documentai_v1beta3_Document_Style_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.documentai.v1beta3.Document.Style.class, com.google.cloud.documentai.v1beta3.Document.Style.Builder.class); } public interface FontSizeOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Document.Style.FontSize) com.google.protobuf.MessageOrBuilder { /** * * *
       * Font size for the text.
       * 
* * float size = 1; * * @return The size. */ float getSize(); /** * * *
       * Unit for the font size. Follows CSS naming (such as `in`, `px`, and
       * `pt`).
       * 
* * string unit = 2; * * @return The unit. */ java.lang.String getUnit(); /** * * *
       * Unit for the font size. Follows CSS naming (such as `in`, `px`, and
       * `pt`).
       * 
* * string unit = 2; * * @return The bytes for unit. */ com.google.protobuf.ByteString getUnitBytes(); } /** * * *
     * Font size with unit.
     * 
* * Protobuf type {@code google.cloud.documentai.v1beta3.Document.Style.FontSize} */ public static final class FontSize extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Document.Style.FontSize) FontSizeOrBuilder { private static final long serialVersionUID = 0L; // Use FontSize.newBuilder() to construct. private FontSize(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private FontSize() { unit_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new FontSize(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.documentai.v1beta3.DocumentProto .internal_static_google_cloud_documentai_v1beta3_Document_Style_FontSize_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.documentai.v1beta3.DocumentProto .internal_static_google_cloud_documentai_v1beta3_Document_Style_FontSize_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.documentai.v1beta3.Document.Style.FontSize.class, com.google.cloud.documentai.v1beta3.Document.Style.FontSize.Builder.class); } public static final int SIZE_FIELD_NUMBER = 1; private float size_ = 0F; /** * * *
       * Font size for the text.
       * 
* * float size = 1; * * @return The size. */ @java.lang.Override public float getSize() { return size_; } public static final int UNIT_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object unit_ = ""; /** * * *
       * Unit for the font size. Follows CSS naming (such as `in`, `px`, and
       * `pt`).
       * 
* * string unit = 2; * * @return The unit. */ @java.lang.Override public java.lang.String getUnit() { java.lang.Object ref = unit_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); unit_ = s; return s; } } /** * * *
       * Unit for the font size. Follows CSS naming (such as `in`, `px`, and
       * `pt`).
       * 
* * string unit = 2; * * @return The bytes for unit. */ @java.lang.Override public com.google.protobuf.ByteString getUnitBytes() { java.lang.Object ref = unit_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); unit_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (java.lang.Float.floatToRawIntBits(size_) != 0) { output.writeFloat(1, size_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(unit_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, unit_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (java.lang.Float.floatToRawIntBits(size_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, size_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(unit_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, unit_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.documentai.v1beta3.Document.Style.FontSize)) { return super.equals(obj); } com.google.cloud.documentai.v1beta3.Document.Style.FontSize other = (com.google.cloud.documentai.v1beta3.Document.Style.FontSize) obj; if (java.lang.Float.floatToIntBits(getSize()) != java.lang.Float.floatToIntBits(other.getSize())) return false; if (!getUnit().equals(other.getUnit())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + SIZE_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getSize()); hash = (37 * hash) + UNIT_FIELD_NUMBER; hash = (53 * hash) + getUnit().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.documentai.v1beta3.Document.Style.FontSize parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.documentai.v1beta3.Document.Style.FontSize parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.documentai.v1beta3.Document.Style.FontSize parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.documentai.v1beta3.Document.Style.FontSize parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.documentai.v1beta3.Document.Style.FontSize parseFrom( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.documentai.v1beta3.Document.Style.FontSize parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.documentai.v1beta3.Document.Style.FontSize parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.documentai.v1beta3.Document.Style.FontSize parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.documentai.v1beta3.Document.Style.FontSize parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.documentai.v1beta3.Document.Style.FontSize parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.documentai.v1beta3.Document.Style.FontSize parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.documentai.v1beta3.Document.Style.FontSize parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder( com.google.cloud.documentai.v1beta3.Document.Style.FontSize prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
       * Font size with unit.
       * 
* * Protobuf type {@code google.cloud.documentai.v1beta3.Document.Style.FontSize} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.Document.Style.FontSize) com.google.cloud.documentai.v1beta3.Document.Style.FontSizeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.documentai.v1beta3.DocumentProto .internal_static_google_cloud_documentai_v1beta3_Document_Style_FontSize_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.documentai.v1beta3.DocumentProto .internal_static_google_cloud_documentai_v1beta3_Document_Style_FontSize_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.documentai.v1beta3.Document.Style.FontSize.class, com.google.cloud.documentai.v1beta3.Document.Style.FontSize.Builder.class); } // Construct using com.google.cloud.documentai.v1beta3.Document.Style.FontSize.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; size_ = 0F; unit_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.documentai.v1beta3.DocumentProto .internal_static_google_cloud_documentai_v1beta3_Document_Style_FontSize_descriptor; } @java.lang.Override public com.google.cloud.documentai.v1beta3.Document.Style.FontSize getDefaultInstanceForType() { return com.google.cloud.documentai.v1beta3.Document.Style.FontSize.getDefaultInstance(); } @java.lang.Override public com.google.cloud.documentai.v1beta3.Document.Style.FontSize build() { com.google.cloud.documentai.v1beta3.Document.Style.FontSize result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.documentai.v1beta3.Document.Style.FontSize buildPartial() { com.google.cloud.documentai.v1beta3.Document.Style.FontSize result = new com.google.cloud.documentai.v1beta3.Document.Style.FontSize(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0( com.google.cloud.documentai.v1beta3.Document.Style.FontSize result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.size_ = size_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.unit_ = unit_; } } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.documentai.v1beta3.Document.Style.FontSize) { return mergeFrom((com.google.cloud.documentai.v1beta3.Document.Style.FontSize) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom( com.google.cloud.documentai.v1beta3.Document.Style.FontSize other) { if (other == com.google.cloud.documentai.v1beta3.Document.Style.FontSize.getDefaultInstance()) return this; if (other.getSize() != 0F) { setSize(other.getSize()); } if (!other.getUnit().isEmpty()) { unit_ = other.unit_; bitField0_ |= 0x00000002; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 13: { size_ = input.readFloat(); bitField0_ |= 0x00000001; break; } // case 13 case 18: { unit_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private float size_; /** * * *
         * Font size for the text.
         * 
* * float size = 1; * * @return The size. */ @java.lang.Override public float getSize() { return size_; } /** * * *
         * Font size for the text.
         * 
* * float size = 1; * * @param value The size to set. * @return This builder for chaining. */ public Builder setSize(float value) { size_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
         * Font size for the text.
         * 
* * float size = 1; * * @return This builder for chaining. */ public Builder clearSize() { bitField0_ = (bitField0_ & ~0x00000001); size_ = 0F; onChanged(); return this; } private java.lang.Object unit_ = ""; /** * * *
         * Unit for the font size. Follows CSS naming (such as `in`, `px`, and
         * `pt`).
         * 
* * string unit = 2; * * @return The unit. */ public java.lang.String getUnit() { java.lang.Object ref = unit_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); unit_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
         * Unit for the font size. Follows CSS naming (such as `in`, `px`, and
         * `pt`).
         * 
* * string unit = 2; * * @return The bytes for unit. */ public com.google.protobuf.ByteString getUnitBytes() { java.lang.Object ref = unit_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); unit_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
         * Unit for the font size. Follows CSS naming (such as `in`, `px`, and
         * `pt`).
         * 
* * string unit = 2; * * @param value The unit to set. * @return This builder for chaining. */ public Builder setUnit(java.lang.String value) { if (value == null) { throw new NullPointerException(); } unit_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
         * Unit for the font size. Follows CSS naming (such as `in`, `px`, and
         * `pt`).
         * 
* * string unit = 2; * * @return This builder for chaining. */ public Builder clearUnit() { unit_ = getDefaultInstance().getUnit(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * * *
         * Unit for the font size. Follows CSS naming (such as `in`, `px`, and
         * `pt`).
         * 
* * string unit = 2; * * @param value The bytes for unit to set. * @return This builder for chaining. */ public Builder setUnitBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); unit_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.Document.Style.FontSize) } // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.Document.Style.FontSize) private static final com.google.cloud.documentai.v1beta3.Document.Style.FontSize DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.Document.Style.FontSize(); } public static com.google.cloud.documentai.v1beta3.Document.Style.FontSize getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public FontSize parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException() .setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.documentai.v1beta3.Document.Style.FontSize getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int bitField0_; public static final int TEXT_ANCHOR_FIELD_NUMBER = 1; private com.google.cloud.documentai.v1beta3.Document.TextAnchor textAnchor_; /** * * *
     * Text anchor indexing into the
     * [Document.text][google.cloud.documentai.v1beta3.Document.text].
     * 
* * .google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1; * * @return Whether the textAnchor field is set. */ @java.lang.Override public boolean hasTextAnchor() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
     * Text anchor indexing into the
     * [Document.text][google.cloud.documentai.v1beta3.Document.text].
     * 
* * .google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1; * * @return The textAnchor. */ @java.lang.Override public com.google.cloud.documentai.v1beta3.Document.TextAnchor getTextAnchor() { return textAnchor_ == null ? com.google.cloud.documentai.v1beta3.Document.TextAnchor.getDefaultInstance() : textAnchor_; } /** * * *
     * Text anchor indexing into the
     * [Document.text][google.cloud.documentai.v1beta3.Document.text].
     * 
* * .google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1; */ @java.lang.Override public com.google.cloud.documentai.v1beta3.Document.TextAnchorOrBuilder getTextAnchorOrBuilder() { return textAnchor_ == null ? com.google.cloud.documentai.v1beta3.Document.TextAnchor.getDefaultInstance() : textAnchor_; } public static final int COLOR_FIELD_NUMBER = 2; private com.google.type.Color color_; /** * * *
     * Text color.
     * 
* * .google.type.Color color = 2; * * @return Whether the color field is set. */ @java.lang.Override public boolean hasColor() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
     * Text color.
     * 
* * .google.type.Color color = 2; * * @return The color. */ @java.lang.Override public com.google.type.Color getColor() { return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; } /** * * *
     * Text color.
     * 
* * .google.type.Color color = 2; */ @java.lang.Override public com.google.type.ColorOrBuilder getColorOrBuilder() { return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; } public static final int BACKGROUND_COLOR_FIELD_NUMBER = 3; private com.google.type.Color backgroundColor_; /** * * *
     * Text background color.
     * 
* * .google.type.Color background_color = 3; * * @return Whether the backgroundColor field is set. */ @java.lang.Override public boolean hasBackgroundColor() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
     * Text background color.
     * 
* * .google.type.Color background_color = 3; * * @return The backgroundColor. */ @java.lang.Override public com.google.type.Color getBackgroundColor() { return backgroundColor_ == null ? com.google.type.Color.getDefaultInstance() : backgroundColor_; } /** * * *
     * Text background color.
     * 
* * .google.type.Color background_color = 3; */ @java.lang.Override public com.google.type.ColorOrBuilder getBackgroundColorOrBuilder() { return backgroundColor_ == null ? com.google.type.Color.getDefaultInstance() : backgroundColor_; } public static final int FONT_WEIGHT_FIELD_NUMBER = 4; @SuppressWarnings("serial") private volatile java.lang.Object fontWeight_ = ""; /** * * *
     * [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp).
     * Possible values are `normal`, `bold`, `bolder`, and `lighter`.
     * 
* * string font_weight = 4; * * @return The fontWeight. */ @java.lang.Override public java.lang.String getFontWeight() { java.lang.Object ref = fontWeight_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); fontWeight_ = s; return s; } } /** * * *
     * [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp).
     * Possible values are `normal`, `bold`, `bolder`, and `lighter`.
     * 
* * string font_weight = 4; * * @return The bytes for fontWeight. */ @java.lang.Override public com.google.protobuf.ByteString getFontWeightBytes() { java.lang.Object ref = fontWeight_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); fontWeight_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int TEXT_STYLE_FIELD_NUMBER = 5; @SuppressWarnings("serial") private volatile java.lang.Object textStyle_ = ""; /** * * *
     * [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).
     * Possible values are `normal`, `italic`, and `oblique`.
     * 
* * string text_style = 5; * * @return The textStyle. */ @java.lang.Override public java.lang.String getTextStyle() { java.lang.Object ref = textStyle_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); textStyle_ = s; return s; } } /** * * *
     * [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).
     * Possible values are `normal`, `italic`, and `oblique`.
     * 
* * string text_style = 5; * * @return The bytes for textStyle. */ @java.lang.Override public com.google.protobuf.ByteString getTextStyleBytes() { java.lang.Object ref = textStyle_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); textStyle_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int TEXT_DECORATION_FIELD_NUMBER = 6; @SuppressWarnings("serial") private volatile java.lang.Object textDecoration_ = ""; /** * * *
     * [Text
     * decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp).
     * Follows CSS standard. <text-decoration-line> <text-decoration-color>
     * <text-decoration-style>
     * 
* * string text_decoration = 6; * * @return The textDecoration. */ @java.lang.Override public java.lang.String getTextDecoration() { java.lang.Object ref = textDecoration_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); textDecoration_ = s; return s; } } /** * * *
     * [Text
     * decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp).
     * Follows CSS standard. <text-decoration-line> <text-decoration-color>
     * <text-decoration-style>
     * 
* * string text_decoration = 6; * * @return The bytes for textDecoration. */ @java.lang.Override public com.google.protobuf.ByteString getTextDecorationBytes() { java.lang.Object ref = textDecoration_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); textDecoration_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int FONT_SIZE_FIELD_NUMBER = 7; private com.google.cloud.documentai.v1beta3.Document.Style.FontSize fontSize_; /** * * *
     * Font size.
     * 
* * .google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7; * * @return Whether the fontSize field is set. */ @java.lang.Override public boolean hasFontSize() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
     * Font size.
     * 
* * .google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7; * * @return The fontSize. */ @java.lang.Override public com.google.cloud.documentai.v1beta3.Document.Style.FontSize getFontSize() { return fontSize_ == null ? com.google.cloud.documentai.v1beta3.Document.Style.FontSize.getDefaultInstance() : fontSize_; } /** * * *
     * Font size.
     * 
* * .google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7; */ @java.lang.Override public com.google.cloud.documentai.v1beta3.Document.Style.FontSizeOrBuilder getFontSizeOrBuilder() { return fontSize_ == null ? com.google.cloud.documentai.v1beta3.Document.Style.FontSize.getDefaultInstance() : fontSize_; } public static final int FONT_FAMILY_FIELD_NUMBER = 8; @SuppressWarnings("serial") private volatile java.lang.Object fontFamily_ = ""; /** * * *
     * Font family such as `Arial`, `Times New Roman`.
     * https://www.w3schools.com/cssref/pr_font_font-family.asp
     * 
* * string font_family = 8; * * @return The fontFamily. */ @java.lang.Override public java.lang.String getFontFamily() { java.lang.Object ref = fontFamily_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); fontFamily_ = s; return s; } } /** * * *
     * Font family such as `Arial`, `Times New Roman`.
     * https://www.w3schools.com/cssref/pr_font_font-family.asp
     * 
* * string font_family = 8; * * @return The bytes for fontFamily. */ @java.lang.Override public com.google.protobuf.ByteString getFontFamilyBytes() { java.lang.Object ref = fontFamily_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); fontFamily_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getTextAnchor()); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(2, getColor()); } if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(3, getBackgroundColor()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fontWeight_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, fontWeight_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(textStyle_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, textStyle_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(textDecoration_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, textDecoration_); } if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(7, getFontSize()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fontFamily_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, fontFamily_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTextAnchor()); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getColor()); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBackgroundColor()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fontWeight_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, fontWeight_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(textStyle_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, textStyle_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(textDecoration_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, textDecoration_); } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getFontSize()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fontFamily_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, fontFamily_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.documentai.v1beta3.Document.Style)) { return super.equals(obj); } com.google.cloud.documentai.v1beta3.Document.Style other = (com.google.cloud.documentai.v1beta3.Document.Style) obj; if (hasTextAnchor() != other.hasTextAnchor()) return false; if (hasTextAnchor()) { if (!getTextAnchor().equals(other.getTextAnchor())) return false; } if (hasColor() != other.hasColor()) return false; if (hasColor()) { if (!getColor().equals(other.getColor())) return false; } if (hasBackgroundColor() != other.hasBackgroundColor()) return false; if (hasBackgroundColor()) { if (!getBackgroundColor().equals(other.getBackgroundColor())) return false; } if (!getFontWeight().equals(other.getFontWeight())) return false; if (!getTextStyle().equals(other.getTextStyle())) return false; if (!getTextDecoration().equals(other.getTextDecoration())) return false; if (hasFontSize() != other.hasFontSize()) return false; if (hasFontSize()) { if (!getFontSize().equals(other.getFontSize())) return false; } if (!getFontFamily().equals(other.getFontFamily())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasTextAnchor()) { hash = (37 * hash) + TEXT_ANCHOR_FIELD_NUMBER; hash = (53 * hash) + getTextAnchor().hashCode(); } if (hasColor()) { hash = (37 * hash) + COLOR_FIELD_NUMBER; hash = (53 * hash) + getColor().hashCode(); } if (hasBackgroundColor()) { hash = (37 * hash) + BACKGROUND_COLOR_FIELD_NUMBER; hash = (53 * hash) + getBackgroundColor().hashCode(); } hash = (37 * hash) + FONT_WEIGHT_FIELD_NUMBER; hash = (53 * hash) + getFontWeight().hashCode(); hash = (37 * hash) + TEXT_STYLE_FIELD_NUMBER; hash = (53 * hash) + getTextStyle().hashCode(); hash = (37 * hash) + TEXT_DECORATION_FIELD_NUMBER; hash = (53 * hash) + getTextDecoration().hashCode(); if (hasFontSize()) { hash = (37 * hash) + FONT_SIZE_FIELD_NUMBER; hash = (53 * hash) + getFontSize().hashCode(); } hash = (37 * hash) + FONT_FAMILY_FIELD_NUMBER; hash = (53 * hash) + getFontFamily().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.documentai.v1beta3.Document.Style parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.documentai.v1beta3.Document.Style parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.documentai.v1beta3.Document.Style parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.documentai.v1beta3.Document.Style parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.documentai.v1beta3.Document.Style parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.documentai.v1beta3.Document.Style parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.documentai.v1beta3.Document.Style parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.documentai.v1beta3.Document.Style parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.documentai.v1beta3.Document.Style parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.documentai.v1beta3.Document.Style parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.documentai.v1beta3.Document.Style parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.documentai.v1beta3.Document.Style parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.cloud.documentai.v1beta3.Document.Style prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
     * Annotation for common text style attributes. This adheres to CSS
     * conventions as much as possible.
     * 
* * Protobuf type {@code google.cloud.documentai.v1beta3.Document.Style} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.Document.Style) com.google.cloud.documentai.v1beta3.Document.StyleOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.documentai.v1beta3.DocumentProto .internal_static_google_cloud_documentai_v1beta3_Document_Style_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.documentai.v1beta3.DocumentProto .internal_static_google_cloud_documentai_v1beta3_Document_Style_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.documentai.v1beta3.Document.Style.class, com.google.cloud.documentai.v1beta3.Document.Style.Builder.class); } // Construct using com.google.cloud.documentai.v1beta3.Document.Style.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getTextAnchorFieldBuilder(); getColorFieldBuilder(); getBackgroundColorFieldBuilder(); getFontSizeFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; textAnchor_ = null; if (textAnchorBuilder_ != null) { textAnchorBuilder_.dispose(); textAnchorBuilder_ = null; } color_ = null; if (colorBuilder_ != null) { colorBuilder_.dispose(); colorBuilder_ = null; } backgroundColor_ = null; if (backgroundColorBuilder_ != null) { backgroundColorBuilder_.dispose(); backgroundColorBuilder_ = null; } fontWeight_ = ""; textStyle_ = ""; textDecoration_ = ""; fontSize_ = null; if (fontSizeBuilder_ != null) { fontSizeBuilder_.dispose(); fontSizeBuilder_ = null; } fontFamily_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.documentai.v1beta3.DocumentProto .internal_static_google_cloud_documentai_v1beta3_Document_Style_descriptor; } @java.lang.Override public com.google.cloud.documentai.v1beta3.Document.Style getDefaultInstanceForType() { return com.google.cloud.documentai.v1beta3.Document.Style.getDefaultInstance(); } @java.lang.Override public com.google.cloud.documentai.v1beta3.Document.Style build() { com.google.cloud.documentai.v1beta3.Document.Style result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.documentai.v1beta3.Document.Style buildPartial() { com.google.cloud.documentai.v1beta3.Document.Style result = new com.google.cloud.documentai.v1beta3.Document.Style(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.cloud.documentai.v1beta3.Document.Style result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.textAnchor_ = textAnchorBuilder_ == null ? textAnchor_ : textAnchorBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.color_ = colorBuilder_ == null ? color_ : colorBuilder_.build(); to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000004) != 0)) { result.backgroundColor_ = backgroundColorBuilder_ == null ? backgroundColor_ : backgroundColorBuilder_.build(); to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000008) != 0)) { result.fontWeight_ = fontWeight_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.textStyle_ = textStyle_; } if (((from_bitField0_ & 0x00000020) != 0)) { result.textDecoration_ = textDecoration_; } if (((from_bitField0_ & 0x00000040) != 0)) { result.fontSize_ = fontSizeBuilder_ == null ? fontSize_ : fontSizeBuilder_.build(); to_bitField0_ |= 0x00000008; } if (((from_bitField0_ & 0x00000080) != 0)) { result.fontFamily_ = fontFamily_; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.documentai.v1beta3.Document.Style) { return mergeFrom((com.google.cloud.documentai.v1beta3.Document.Style) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.documentai.v1beta3.Document.Style other) { if (other == com.google.cloud.documentai.v1beta3.Document.Style.getDefaultInstance()) return this; if (other.hasTextAnchor()) { mergeTextAnchor(other.getTextAnchor()); } if (other.hasColor()) { mergeColor(other.getColor()); } if (other.hasBackgroundColor()) { mergeBackgroundColor(other.getBackgroundColor()); } if (!other.getFontWeight().isEmpty()) { fontWeight_ = other.fontWeight_; bitField0_ |= 0x00000008; onChanged(); } if (!other.getTextStyle().isEmpty()) { textStyle_ = other.textStyle_; bitField0_ |= 0x00000010; onChanged(); } if (!other.getTextDecoration().isEmpty()) { textDecoration_ = other.textDecoration_; bitField0_ |= 0x00000020; onChanged(); } if (other.hasFontSize()) { mergeFontSize(other.getFontSize()); } if (!other.getFontFamily().isEmpty()) { fontFamily_ = other.fontFamily_; bitField0_ |= 0x00000080; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { input.readMessage(getTextAnchorFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { input.readMessage(getColorFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { input.readMessage( getBackgroundColorFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { fontWeight_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000008; break; } // case 34 case 42: { textStyle_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000010; break; } // case 42 case 50: { textDecoration_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000020; break; } // case 50 case 58: { input.readMessage(getFontSizeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000040; break; } // case 58 case 66: { fontFamily_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000080; break; } // case 66 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private com.google.cloud.documentai.v1beta3.Document.TextAnchor textAnchor_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.documentai.v1beta3.Document.TextAnchor, com.google.cloud.documentai.v1beta3.Document.TextAnchor.Builder, com.google.cloud.documentai.v1beta3.Document.TextAnchorOrBuilder> textAnchorBuilder_; /** * * *
       * Text anchor indexing into the
       * [Document.text][google.cloud.documentai.v1beta3.Document.text].
       * 
* * .google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1; * * @return Whether the textAnchor field is set. */ public boolean hasTextAnchor() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
       * Text anchor indexing into the
       * [Document.text][google.cloud.documentai.v1beta3.Document.text].
       * 
* * .google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1; * * @return The textAnchor. */ public com.google.cloud.documentai.v1beta3.Document.TextAnchor getTextAnchor() { if (textAnchorBuilder_ == null) { return textAnchor_ == null ? com.google.cloud.documentai.v1beta3.Document.TextAnchor.getDefaultInstance() : textAnchor_; } else { return textAnchorBuilder_.getMessage(); } } /** * * *
       * Text anchor indexing into the
       * [Document.text][google.cloud.documentai.v1beta3.Document.text].
       * 
* * .google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1; */ public Builder setTextAnchor(com.google.cloud.documentai.v1beta3.Document.TextAnchor value) { if (textAnchorBuilder_ == null) { if (value == null) { throw new NullPointerException(); } textAnchor_ = value; } else { textAnchorBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * Text anchor indexing into the
       * [Document.text][google.cloud.documentai.v1beta3.Document.text].
       * 
* * .google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1; */ public Builder setTextAnchor( com.google.cloud.documentai.v1beta3.Document.TextAnchor.Builder builderForValue) { if (textAnchorBuilder_ == null) { textAnchor_ = builderForValue.build(); } else { textAnchorBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * Text anchor indexing into the
       * [Document.text][google.cloud.documentai.v1beta3.Document.text].
       * 
* * .google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1; */ public Builder mergeTextAnchor( com.google.cloud.documentai.v1beta3.Document.TextAnchor value) { if (textAnchorBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && textAnchor_ != null && textAnchor_ != com.google.cloud.documentai.v1beta3.Document.TextAnchor.getDefaultInstance()) { getTextAnchorBuilder().mergeFrom(value); } else { textAnchor_ = value; } } else { textAnchorBuilder_.mergeFrom(value); } if (textAnchor_ != null) { bitField0_ |= 0x00000001; onChanged(); } return this; } /** * * *
       * Text anchor indexing into the
       * [Document.text][google.cloud.documentai.v1beta3.Document.text].
       * 
* * .google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1; */ public Builder clearTextAnchor() { bitField0_ = (bitField0_ & ~0x00000001); textAnchor_ = null; if (textAnchorBuilder_ != null) { textAnchorBuilder_.dispose(); textAnchorBuilder_ = null; } onChanged(); return this; } /** * * *
       * Text anchor indexing into the
       * [Document.text][google.cloud.documentai.v1beta3.Document.text].
       * 
* * .google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1; */ public com.google.cloud.documentai.v1beta3.Document.TextAnchor.Builder getTextAnchorBuilder() { bitField0_ |= 0x00000001; onChanged(); return getTextAnchorFieldBuilder().getBuilder(); } /** * * *
       * Text anchor indexing into the
       * [Document.text][google.cloud.documentai.v1beta3.Document.text].
       * 
* * .google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1; */ public com.google.cloud.documentai.v1beta3.Document.TextAnchorOrBuilder getTextAnchorOrBuilder() { if (textAnchorBuilder_ != null) { return textAnchorBuilder_.getMessageOrBuilder(); } else { return textAnchor_ == null ? com.google.cloud.documentai.v1beta3.Document.TextAnchor.getDefaultInstance() : textAnchor_; } } /** * * *
       * Text anchor indexing into the
       * [Document.text][google.cloud.documentai.v1beta3.Document.text].
       * 
* * .google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.documentai.v1beta3.Document.TextAnchor, com.google.cloud.documentai.v1beta3.Document.TextAnchor.Builder, com.google.cloud.documentai.v1beta3.Document.TextAnchorOrBuilder> getTextAnchorFieldBuilder() { if (textAnchorBuilder_ == null) { textAnchorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.documentai.v1beta3.Document.TextAnchor, com.google.cloud.documentai.v1beta3.Document.TextAnchor.Builder, com.google.cloud.documentai.v1beta3.Document.TextAnchorOrBuilder>( getTextAnchor(), getParentForChildren(), isClean()); textAnchor_ = null; } return textAnchorBuilder_; } private com.google.type.Color color_; private com.google.protobuf.SingleFieldBuilderV3< com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> colorBuilder_; /** * * *
       * Text color.
       * 
* * .google.type.Color color = 2; * * @return Whether the color field is set. */ public boolean hasColor() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
       * Text color.
       * 
* * .google.type.Color color = 2; * * @return The color. */ public com.google.type.Color getColor() { if (colorBuilder_ == null) { return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; } else { return colorBuilder_.getMessage(); } } /** * * *
       * Text color.
       * 
* * .google.type.Color color = 2; */ public Builder setColor(com.google.type.Color value) { if (colorBuilder_ == null) { if (value == null) { throw new NullPointerException(); } color_ = value; } else { colorBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
       * Text color.
       * 
* * .google.type.Color color = 2; */ public Builder setColor(com.google.type.Color.Builder builderForValue) { if (colorBuilder_ == null) { color_ = builderForValue.build(); } else { colorBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
       * Text color.
       * 
* * .google.type.Color color = 2; */ public Builder mergeColor(com.google.type.Color value) { if (colorBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && color_ != null && color_ != com.google.type.Color.getDefaultInstance()) { getColorBuilder().mergeFrom(value); } else { color_ = value; } } else { colorBuilder_.mergeFrom(value); } if (color_ != null) { bitField0_ |= 0x00000002; onChanged(); } return this; } /** * * *
       * Text color.
       * 
* * .google.type.Color color = 2; */ public Builder clearColor() { bitField0_ = (bitField0_ & ~0x00000002); color_ = null; if (colorBuilder_ != null) { colorBuilder_.dispose(); colorBuilder_ = null; } onChanged(); return this; } /** * * *
       * Text color.
       * 
* * .google.type.Color color = 2; */ public com.google.type.Color.Builder getColorBuilder() { bitField0_ |= 0x00000002; onChanged(); return getColorFieldBuilder().getBuilder(); } /** * * *
       * Text color.
       * 
* * .google.type.Color color = 2; */ public com.google.type.ColorOrBuilder getColorOrBuilder() { if (colorBuilder_ != null) { return colorBuilder_.getMessageOrBuilder(); } else { return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; } } /** * * *
       * Text color.
       * 
* * .google.type.Color color = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> getColorFieldBuilder() { if (colorBuilder_ == null) { colorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder>(getColor(), getParentForChildren(), isClean()); color_ = null; } return colorBuilder_; } private com.google.type.Color backgroundColor_; private com.google.protobuf.SingleFieldBuilderV3< com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> backgroundColorBuilder_; /** * * *
       * Text background color.
       * 
* * .google.type.Color background_color = 3; * * @return Whether the backgroundColor field is set. */ public boolean hasBackgroundColor() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
       * Text background color.
       * 
* * .google.type.Color background_color = 3; * * @return The backgroundColor. */ public com.google.type.Color getBackgroundColor() { if (backgroundColorBuilder_ == null) { return backgroundColor_ == null ? com.google.type.Color.getDefaultInstance() : backgroundColor_; } else { return backgroundColorBuilder_.getMessage(); } } /** * * *
       * Text background color.
       * 
* * .google.type.Color background_color = 3; */ public Builder setBackgroundColor(com.google.type.Color value) { if (backgroundColorBuilder_ == null) { if (value == null) { throw new NullPointerException(); } backgroundColor_ = value; } else { backgroundColorBuilder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
       * Text background color.
       * 
* * .google.type.Color background_color = 3; */ public Builder setBackgroundColor(com.google.type.Color.Builder builderForValue) { if (backgroundColorBuilder_ == null) { backgroundColor_ = builderForValue.build(); } else { backgroundColorBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
       * Text background color.
       * 
* * .google.type.Color background_color = 3; */ public Builder mergeBackgroundColor(com.google.type.Color value) { if (backgroundColorBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && backgroundColor_ != null && backgroundColor_ != com.google.type.Color.getDefaultInstance()) { getBackgroundColorBuilder().mergeFrom(value); } else { backgroundColor_ = value; } } else { backgroundColorBuilder_.mergeFrom(value); } if (backgroundColor_ != null) { bitField0_ |= 0x00000004; onChanged(); } return this; } /** * * *
       * Text background color.
       * 
* * .google.type.Color background_color = 3; */ public Builder clearBackgroundColor() { bitField0_ = (bitField0_ & ~0x00000004); backgroundColor_ = null; if (backgroundColorBuilder_ != null) { backgroundColorBuilder_.dispose(); backgroundColorBuilder_ = null; } onChanged(); return this; } /** * * *
       * Text background color.
       * 
* * .google.type.Color background_color = 3; */ public com.google.type.Color.Builder getBackgroundColorBuilder() { bitField0_ |= 0x00000004; onChanged(); return getBackgroundColorFieldBuilder().getBuilder(); } /** * * *
       * Text background color.
       * 
* * .google.type.Color background_color = 3; */ public com.google.type.ColorOrBuilder getBackgroundColorOrBuilder() { if (backgroundColorBuilder_ != null) { return backgroundColorBuilder_.getMessageOrBuilder(); } else { return backgroundColor_ == null ? com.google.type.Color.getDefaultInstance() : backgroundColor_; } } /** * * *
       * Text background color.
       * 
* * .google.type.Color background_color = 3; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> getBackgroundColorFieldBuilder() { if (backgroundColorBuilder_ == null) { backgroundColorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder>( getBackgroundColor(), getParentForChildren(), isClean()); backgroundColor_ = null; } return backgroundColorBuilder_; } private java.lang.Object fontWeight_ = ""; /** * * *
       * [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp).
       * Possible values are `normal`, `bold`, `bolder`, and `lighter`.
       * 
* * string font_weight = 4; * * @return The fontWeight. */ public java.lang.String getFontWeight() { java.lang.Object ref = fontWeight_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); fontWeight_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
       * [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp).
       * Possible values are `normal`, `bold`, `bolder`, and `lighter`.
       * 
* * string font_weight = 4; * * @return The bytes for fontWeight. */ public com.google.protobuf.ByteString getFontWeightBytes() { java.lang.Object ref = fontWeight_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); fontWeight_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp).
       * Possible values are `normal`, `bold`, `bolder`, and `lighter`.
       * 
* * string font_weight = 4; * * @param value The fontWeight to set. * @return This builder for chaining. */ public Builder setFontWeight(java.lang.String value) { if (value == null) { throw new NullPointerException(); } fontWeight_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
       * [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp).
       * Possible values are `normal`, `bold`, `bolder`, and `lighter`.
       * 
* * string font_weight = 4; * * @return This builder for chaining. */ public Builder clearFontWeight() { fontWeight_ = getDefaultInstance().getFontWeight(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } /** * * *
       * [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp).
       * Possible values are `normal`, `bold`, `bolder`, and `lighter`.
       * 
* * string font_weight = 4; * * @param value The bytes for fontWeight to set. * @return This builder for chaining. */ public Builder setFontWeightBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); fontWeight_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } private java.lang.Object textStyle_ = ""; /** * * *
       * [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).
       * Possible values are `normal`, `italic`, and `oblique`.
       * 
* * string text_style = 5; * * @return The textStyle. */ public java.lang.String getTextStyle() { java.lang.Object ref = textStyle_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); textStyle_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
       * [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).
       * Possible values are `normal`, `italic`, and `oblique`.
       * 
* * string text_style = 5; * * @return The bytes for textStyle. */ public com.google.protobuf.ByteString getTextStyleBytes() { java.lang.Object ref = textStyle_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); textStyle_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).
       * Possible values are `normal`, `italic`, and `oblique`.
       * 
* * string text_style = 5; * * @param value The textStyle to set. * @return This builder for chaining. */ public Builder setTextStyle(java.lang.String value) { if (value == null) { throw new NullPointerException(); } textStyle_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
       * [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).
       * Possible values are `normal`, `italic`, and `oblique`.
       * 
* * string text_style = 5; * * @return This builder for chaining. */ public Builder clearTextStyle() { textStyle_ = getDefaultInstance().getTextStyle(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** * * *
       * [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).
       * Possible values are `normal`, `italic`, and `oblique`.
       * 
* * string text_style = 5; * * @param value The bytes for textStyle to set. * @return This builder for chaining. */ public Builder setTextStyleBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); textStyle_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } private java.lang.Object textDecoration_ = ""; /** * * *
       * [Text
       * decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp).
       * Follows CSS standard. <text-decoration-line> <text-decoration-color>
       * <text-decoration-style>
       * 
* * string text_decoration = 6; * * @return The textDecoration. */ public java.lang.String getTextDecoration() { java.lang.Object ref = textDecoration_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); textDecoration_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
       * [Text
       * decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp).
       * Follows CSS standard. <text-decoration-line> <text-decoration-color>
       * <text-decoration-style>
       * 
* * string text_decoration = 6; * * @return The bytes for textDecoration. */ public com.google.protobuf.ByteString getTextDecorationBytes() { java.lang.Object ref = textDecoration_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); textDecoration_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * [Text
       * decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp).
       * Follows CSS standard. <text-decoration-line> <text-decoration-color>
       * <text-decoration-style>
       * 
* * string text_decoration = 6; * * @param value The textDecoration to set. * @return This builder for chaining. */ public Builder setTextDecoration(java.lang.String value) { if (value == null) { throw new NullPointerException(); } textDecoration_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
       * [Text
       * decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp).
       * Follows CSS standard. <text-decoration-line> <text-decoration-color>
       * <text-decoration-style>
       * 
* * string text_decoration = 6; * * @return This builder for chaining. */ public Builder clearTextDecoration() { textDecoration_ = getDefaultInstance().getTextDecoration(); bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } /** * * *
       * [Text
       * decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp).
       * Follows CSS standard. <text-decoration-line> <text-decoration-color>
       * <text-decoration-style>
       * 
* * string text_decoration = 6; * * @param value The bytes for textDecoration to set. * @return This builder for chaining. */ public Builder setTextDecorationBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); textDecoration_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } private com.google.cloud.documentai.v1beta3.Document.Style.FontSize fontSize_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.documentai.v1beta3.Document.Style.FontSize, com.google.cloud.documentai.v1beta3.Document.Style.FontSize.Builder, com.google.cloud.documentai.v1beta3.Document.Style.FontSizeOrBuilder> fontSizeBuilder_; /** * * *
       * Font size.
       * 
* * .google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7; * * @return Whether the fontSize field is set. */ public boolean hasFontSize() { return ((bitField0_ & 0x00000040) != 0); } /** * * *
       * Font size.
       * 
* * .google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7; * * @return The fontSize. */ public com.google.cloud.documentai.v1beta3.Document.Style.FontSize getFontSize() { if (fontSizeBuilder_ == null) { return fontSize_ == null ? com.google.cloud.documentai.v1beta3.Document.Style.FontSize.getDefaultInstance() : fontSize_; } else { return fontSizeBuilder_.getMessage(); } } /** * * *
       * Font size.
       * 
* * .google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7; */ public Builder setFontSize( com.google.cloud.documentai.v1beta3.Document.Style.FontSize value) { if (fontSizeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } fontSize_ = value; } else { fontSizeBuilder_.setMessage(value); } bitField0_ |= 0x00000040; onChanged(); return this; } /** * * *
       * Font size.
       * 
* * .google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7; */ public Builder setFontSize( com.google.cloud.documentai.v1beta3.Document.Style.FontSize.Builder builderForValue) { if (fontSizeBuilder_ == null) { fontSize_ = builderForValue.build(); } else { fontSizeBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000040; onChanged(); return this; } /** * * *
       * Font size.
       * 
* * .google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7; */ public Builder mergeFontSize( com.google.cloud.documentai.v1beta3.Document.Style.FontSize value) { if (fontSizeBuilder_ == null) { if (((bitField0_ & 0x00000040) != 0) && fontSize_ != null && fontSize_ != com.google.cloud.documentai.v1beta3.Document.Style.FontSize .getDefaultInstance()) { getFontSizeBuilder().mergeFrom(value); } else { fontSize_ = value; } } else { fontSizeBuilder_.mergeFrom(value); } if (fontSize_ != null) { bitField0_ |= 0x00000040; onChanged(); } return this; } /** * * *
       * Font size.
       * 
* * .google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7; */ public Builder clearFontSize() { bitField0_ = (bitField0_ & ~0x00000040); fontSize_ = null; if (fontSizeBuilder_ != null) { fontSizeBuilder_.dispose(); fontSizeBuilder_ = null; } onChanged(); return this; } /** * * *
       * Font size.
       * 
* * .google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7; */ public com.google.cloud.documentai.v1beta3.Document.Style.FontSize.Builder getFontSizeBuilder() { bitField0_ |= 0x00000040; onChanged(); return getFontSizeFieldBuilder().getBuilder(); } /** * * *
       * Font size.
       * 
* * .google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7; */ public com.google.cloud.documentai.v1beta3.Document.Style.FontSizeOrBuilder getFontSizeOrBuilder() { if (fontSizeBuilder_ != null) { return fontSizeBuilder_.getMessageOrBuilder(); } else { return fontSize_ == null ? com.google.cloud.documentai.v1beta3.Document.Style.FontSize.getDefaultInstance() : fontSize_; } } /** * * *
       * Font size.
       * 
* * .google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.documentai.v1beta3.Document.Style.FontSize, com.google.cloud.documentai.v1beta3.Document.Style.FontSize.Builder, com.google.cloud.documentai.v1beta3.Document.Style.FontSizeOrBuilder> getFontSizeFieldBuilder() { if (fontSizeBuilder_ == null) { fontSizeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.documentai.v1beta3.Document.Style.FontSize, com.google.cloud.documentai.v1beta3.Document.Style.FontSize.Builder, com.google.cloud.documentai.v1beta3.Document.Style.FontSizeOrBuilder>( getFontSize(), getParentForChildren(), isClean()); fontSize_ = null; } return fontSizeBuilder_; } private java.lang.Object fontFamily_ = ""; /** * * *
       * Font family such as `Arial`, `Times New Roman`.
       * https://www.w3schools.com/cssref/pr_font_font-family.asp
       * 
* * string font_family = 8; * * @return The fontFamily. */ public java.lang.String getFontFamily() { java.lang.Object ref = fontFamily_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); fontFamily_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
       * Font family such as `Arial`, `Times New Roman`.
       * https://www.w3schools.com/cssref/pr_font_font-family.asp
       * 
* * string font_family = 8; * * @return The bytes for fontFamily. */ public com.google.protobuf.ByteString getFontFamilyBytes() { java.lang.Object ref = fontFamily_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); fontFamily_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * Font family such as `Arial`, `Times New Roman`.
       * https://www.w3schools.com/cssref/pr_font_font-family.asp
       * 
* * string font_family = 8; * * @param value The fontFamily to set. * @return This builder for chaining. */ public Builder setFontFamily(java.lang.String value) { if (value == null) { throw new NullPointerException(); } fontFamily_ = value; bitField0_ |= 0x00000080; onChanged(); return this; } /** * * *
       * Font family such as `Arial`, `Times New Roman`.
       * https://www.w3schools.com/cssref/pr_font_font-family.asp
       * 
* * string font_family = 8; * * @return This builder for chaining. */ public Builder clearFontFamily() { fontFamily_ = getDefaultInstance().getFontFamily(); bitField0_ = (bitField0_ & ~0x00000080); onChanged(); return this; } /** * * *
       * Font family such as `Arial`, `Times New Roman`.
       * https://www.w3schools.com/cssref/pr_font_font-family.asp
       * 
* * string font_family = 8; * * @param value The bytes for fontFamily to set. * @return This builder for chaining. */ public Builder setFontFamilyBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); fontFamily_ = value; bitField0_ |= 0x00000080; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.Document.Style) } // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.Document.Style) private static final com.google.cloud.documentai.v1beta3.Document.Style DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.Document.Style(); } public static com.google.cloud.documentai.v1beta3.Document.Style getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser