Class: Google::Cloud::DocumentAI::V1::Document::ChunkedDocument

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/documentai/v1/document.rb

Overview

Represents the chunks that the document is divided into.

Defined Under Namespace

Classes: Chunk

Instance Attribute Summary collapse

Instance Attribute Details

#chunks::Array<::Google::Cloud::DocumentAI::V1::Document::ChunkedDocument::Chunk>

Returns List of chunks.



1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
# File 'proto_docs/google/cloud/documentai/v1/document.rb', line 1316

class ChunkedDocument
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents a chunk.
  # @!attribute [rw] chunk_id
  #   @return [::String]
  #     ID of the chunk.
  # @!attribute [rw] source_block_ids
  #   @return [::Array<::String>]
  #     Unused.
  # @!attribute [rw] content
  #   @return [::String]
  #     Text content of the chunk.
  # @!attribute [rw] page_span
  #   @return [::Google::Cloud::DocumentAI::V1::Document::ChunkedDocument::Chunk::ChunkPageSpan]
  #     Page span of the chunk.
  # @!attribute [rw] page_headers
  #   @return [::Array<::Google::Cloud::DocumentAI::V1::Document::ChunkedDocument::Chunk::ChunkPageHeader>]
  #     Page headers associated with the chunk.
  # @!attribute [rw] page_footers
  #   @return [::Array<::Google::Cloud::DocumentAI::V1::Document::ChunkedDocument::Chunk::ChunkPageFooter>]
  #     Page footers associated with the chunk.
  # @!attribute [rw] chunk_fields
  #   @return [::Array<::Google::Cloud::DocumentAI::V1::Document::ChunkedDocument::Chunk::ChunkField>]
  #     Chunk fields inside this chunk.
  class Chunk
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Represents where the chunk starts and ends in the document.
    # @!attribute [rw] page_start
    #   @return [::Integer]
    #     Page where chunk starts in the document.
    # @!attribute [rw] page_end
    #   @return [::Integer]
    #     Page where chunk ends in the document.
    class ChunkPageSpan
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Represents the page header associated with the chunk.
    # @!attribute [rw] text
    #   @return [::String]
    #     Header in text format.
    # @!attribute [rw] page_span
    #   @return [::Google::Cloud::DocumentAI::V1::Document::ChunkedDocument::Chunk::ChunkPageSpan]
    #     Page span of the header.
    class ChunkPageHeader
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Represents the page footer associated with the chunk.
    # @!attribute [rw] text
    #   @return [::String]
    #     Footer in text format.
    # @!attribute [rw] page_span
    #   @return [::Google::Cloud::DocumentAI::V1::Document::ChunkedDocument::Chunk::ChunkPageSpan]
    #     Page span of the footer.
    class ChunkPageFooter
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # The image chunk field in the chunk.
    # @!attribute [rw] blob_asset_id
    #   @return [::String]
    #     Optional. Asset id of the inline image. If set, find the image
    #     content in the blob_assets field.
    #
    #     Note: The following fields are mutually exclusive: `blob_asset_id`, `gcs_uri`, `data_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] gcs_uri
    #   @return [::String]
    #     Optional. Google Cloud Storage uri of the image.
    #
    #     Note: The following fields are mutually exclusive: `gcs_uri`, `blob_asset_id`, `data_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] data_uri
    #   @return [::String]
    #     Optional. Data uri of the image.
    #     It is composed of four parts: a prefix (data:), a MIME type
    #     indicating the type of data, an optional base64 token if
    #     non-textual, and the data itself:
    #     data:[<mediatype>][;base64],<data>
    #
    #     Note: The following fields are mutually exclusive: `data_uri`, `blob_asset_id`, `gcs_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] annotations
    #   @return [::Google::Cloud::DocumentAI::V1::Document::Annotations]
    #     Annotation of the image chunk field.
    class ImageChunkField
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # The table chunk field in the chunk.
    # @!attribute [rw] annotations
    #   @return [::Google::Cloud::DocumentAI::V1::Document::Annotations]
    #     Annotation of the table chunk field.
    class TableChunkField
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # The chunk field in the chunk. A chunk field could be one of the various
    # types (for example, image, table) supported.
    # @!attribute [rw] image_chunk_field
    #   @return [::Google::Cloud::DocumentAI::V1::Document::ChunkedDocument::Chunk::ImageChunkField]
    #     The image chunk field in the chunk.
    #
    #     Note: The following fields are mutually exclusive: `image_chunk_field`, `table_chunk_field`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] table_chunk_field
    #   @return [::Google::Cloud::DocumentAI::V1::Document::ChunkedDocument::Chunk::TableChunkField]
    #     The table chunk field in the chunk.
    #
    #     Note: The following fields are mutually exclusive: `table_chunk_field`, `image_chunk_field`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    class ChunkField
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end
end