Class: Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/documentai/v1beta3/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::V1beta3::Document::ChunkedDocument::Chunk>

Returns List of chunks.



1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
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
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 1275

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::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageSpan]
  #     Page span of the chunk.
  # @!attribute [rw] page_headers
  #   @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageHeader>]
  #     Page headers associated with the chunk.
  # @!attribute [rw] page_footers
  #   @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::ChunkedDocument::Chunk::ChunkPageFooter>]
  #     Page footers associated with the chunk.
  # @!attribute [rw] chunk_fields
  #   @return [::Array<::Google::Cloud::DocumentAI::V1beta3::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::V1beta3::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::V1beta3::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::V1beta3::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::V1beta3::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 (e.g. image, table) supported.
    # @!attribute [rw] image_chunk_field
    #   @return [::Google::Cloud::DocumentAI::V1beta3::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::V1beta3::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