Class Document.ShardInfo (2.6.0)

public static final class Document.ShardInfo extends GeneratedMessageV3 implements Document.ShardInfoOrBuilder

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

Static Fields

SHARD_COUNT_FIELD_NUMBER

public static final int SHARD_COUNT_FIELD_NUMBER
Field Value
TypeDescription
int

SHARD_INDEX_FIELD_NUMBER

public static final int SHARD_INDEX_FIELD_NUMBER
Field Value
TypeDescription
int

TEXT_OFFSET_FIELD_NUMBER

public static final int TEXT_OFFSET_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

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

getDescriptor()

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

newBuilder()

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

newBuilder(Document.ShardInfo prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getDefaultInstanceForType()

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

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getShardCount()

public long getShardCount()

Total number of shards.

int64 shard_count = 2;

Returns
TypeDescription
long

The shardCount.

getShardIndex()

public long getShardIndex()

The 0-based index of this shard.

int64 shard_index = 1;

Returns
TypeDescription
long

The shardIndex.

getTextOffset()

public long getTextOffset()

The index of the first character in Document.text in the overall document global text.

int64 text_offset = 3;

Returns
TypeDescription
long

The textOffset.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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