# Document AI V1 API - Class Google::Cloud::DocumentAI::V1::Document::ShardInfo (v1.12.1)

1.12.1 (latest) 1.12.0 1.11.0 1.10.2 1.9.0 1.8.0 1.7.0 1.6.1 1.5.1 1.4.0 1.3.0 1.2.0 1.1.1 1.0.0 0.23.1 0.22.0 0.21.1 0.20.0 0.19.0 0.18.0 0.17.2 0.16.2 0.15.0 0.14.0 0.13.0 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.0 0.3.0 0.2.4 Reference documentation and code samples for the Document AI V1 API class Google::Cloud::DocumentAI::V1::Document::ShardInfo.

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.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #shard_count

    def shard_count() -> ::Integer

**Returns**

- (::Integer) --- Total number of shards.

### #shard_count=

    def shard_count=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- Total number of shards.
**Returns**

- (::Integer) --- Total number of shards.

### #shard_index

    def shard_index() -> ::Integer

**Returns**

- (::Integer) --- The 0-based index of this shard.

### #shard_index=

    def shard_index=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- The 0-based index of this shard.
**Returns**

- (::Integer) --- The 0-based index of this shard.

### #text_offset

    def text_offset() -> ::Integer

**Returns**

- (::Integer) --- The index of the first character in [Document.text](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-document_ai-v1/latest/Google-Cloud-DocumentAI-V1-Document#Google__Cloud__DocumentAI__V1__Document_text_instance_ "Google::Cloud::DocumentAI::V1::Document#text (method)") in the overall document global text.

### #text_offset=

    def text_offset=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- The index of the first character in [Document.text](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-document_ai-v1/latest/Google-Cloud-DocumentAI-V1-Document#Google__Cloud__DocumentAI__V1__Document_text_instance_ "Google::Cloud::DocumentAI::V1::Document#text (method)") in the overall document global text.
**Returns**

- (::Integer) --- The index of the first character in [Document.text](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-document_ai-v1/latest/Google-Cloud-DocumentAI-V1-Document#Google__Cloud__DocumentAI__V1__Document_text_instance_ "Google::Cloud::DocumentAI::V1::Document#text (method)") in the overall document global text.