aws-sdk-textract 1.35.0 → 1.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-textract/client.rb +75 -19
- data/lib/aws-sdk-textract/client_api.rb +21 -0
- data/lib/aws-sdk-textract/types.rb +122 -9
- data/lib/aws-sdk-textract.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1c0745ba62589de2b8ca471baf1dcf0d2b6c00fa02a261932fe84c60f142a809
|
|
4
|
+
data.tar.gz: 566d64e6b216f71f6499a0a6d8fc5d3024eb55a446222201bd8f53a688e312f8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 47b02e10bf8525c1b58e411b321cbe87c26aaa2c06ff1541241e4c74daac1e4eba98af115a20805e3d49b84e3215ac15b4574a35eed49f406f477ebbb85360bf
|
|
7
|
+
data.tar.gz: ba5841d57712faf447a8c7596e5bdb75fe0251a0ed4ec39f7ba73c9f0916172cfc85a0c2c0b96a6ee927dee360569f68d3d9b5b6cf1e93b4aef0861c9ac535f9
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
Unreleased Changes
|
|
2
2
|
------------------
|
|
3
3
|
|
|
4
|
+
1.38.0 (2022-04-19)
|
|
5
|
+
------------------
|
|
6
|
+
|
|
7
|
+
* Feature - This release adds support for specifying and extracting information from documents using the Queries feature within Analyze Document API
|
|
8
|
+
|
|
9
|
+
1.37.0 (2022-02-24)
|
|
10
|
+
------------------
|
|
11
|
+
|
|
12
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
|
13
|
+
|
|
14
|
+
1.36.0 (2022-02-23)
|
|
15
|
+
------------------
|
|
16
|
+
|
|
17
|
+
* Feature - Added support for merged cells and column header for table response.
|
|
18
|
+
|
|
4
19
|
1.35.0 (2022-02-03)
|
|
5
20
|
------------------
|
|
6
21
|
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.
|
|
1
|
+
1.38.0
|
|
@@ -27,6 +27,7 @@ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
|
|
27
27
|
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
|
28
28
|
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
|
29
29
|
require 'aws-sdk-core/plugins/http_checksum.rb'
|
|
30
|
+
require 'aws-sdk-core/plugins/checksum_algorithm.rb'
|
|
30
31
|
require 'aws-sdk-core/plugins/defaults_mode.rb'
|
|
31
32
|
require 'aws-sdk-core/plugins/recursion_detection.rb'
|
|
32
33
|
require 'aws-sdk-core/plugins/signature_v4.rb'
|
|
@@ -75,6 +76,7 @@ module Aws::Textract
|
|
|
75
76
|
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
|
76
77
|
add_plugin(Aws::Plugins::TransferEncoding)
|
|
77
78
|
add_plugin(Aws::Plugins::HttpChecksum)
|
|
79
|
+
add_plugin(Aws::Plugins::ChecksumAlgorithm)
|
|
78
80
|
add_plugin(Aws::Plugins::DefaultsMode)
|
|
79
81
|
add_plugin(Aws::Plugins::RecursionDetection)
|
|
80
82
|
add_plugin(Aws::Plugins::SignatureV4)
|
|
@@ -378,6 +380,11 @@ module Aws::Textract
|
|
|
378
380
|
# document are returned (including text that doesn't have a
|
|
379
381
|
# relationship with the value of `FeatureTypes`).
|
|
380
382
|
#
|
|
383
|
+
# * Queries.A QUERIES\_RESULT Block object contains the answer to the
|
|
384
|
+
# query, the alias associated and an ID that connect it to the query
|
|
385
|
+
# asked. This Block also contains a location and attached confidence
|
|
386
|
+
# score.
|
|
387
|
+
#
|
|
381
388
|
# Selection elements such as check boxes and option buttons (radio
|
|
382
389
|
# buttons) can be detected in form data and in tables. A
|
|
383
390
|
# SELECTION\_ELEMENT `Block` object contains information about a
|
|
@@ -400,7 +407,8 @@ module Aws::Textract
|
|
|
400
407
|
# @option params [required, Types::Document] :document
|
|
401
408
|
# The input document as base64-encoded bytes or an Amazon S3 object. If
|
|
402
409
|
# you use the AWS CLI to call Amazon Textract operations, you can't
|
|
403
|
-
# pass image bytes. The document must be an image in JPEG
|
|
410
|
+
# pass image bytes. The document must be an image in JPEG, PNG, PDF, or
|
|
411
|
+
# TIFF format.
|
|
404
412
|
#
|
|
405
413
|
# If you're using an AWS SDK to call Amazon Textract, you might not
|
|
406
414
|
# need to base64-encode image bytes that are passed using the `Bytes`
|
|
@@ -418,6 +426,10 @@ module Aws::Textract
|
|
|
418
426
|
# Sets the configuration for the human in the loop workflow for
|
|
419
427
|
# analyzing documents.
|
|
420
428
|
#
|
|
429
|
+
# @option params [Types::QueriesConfig] :queries_config
|
|
430
|
+
# Contains Queries and the alias for those Queries, as determined by the
|
|
431
|
+
# input.
|
|
432
|
+
#
|
|
421
433
|
# @return [Types::AnalyzeDocumentResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
422
434
|
#
|
|
423
435
|
# * {Types::AnalyzeDocumentResponse#document_metadata #document_metadata} => Types::DocumentMetadata
|
|
@@ -436,7 +448,7 @@ module Aws::Textract
|
|
|
436
448
|
# version: "S3ObjectVersion",
|
|
437
449
|
# },
|
|
438
450
|
# },
|
|
439
|
-
# feature_types: ["TABLES"], # required, accepts TABLES, FORMS
|
|
451
|
+
# feature_types: ["TABLES"], # required, accepts TABLES, FORMS, QUERIES
|
|
440
452
|
# human_loop_config: {
|
|
441
453
|
# human_loop_name: "HumanLoopName", # required
|
|
442
454
|
# flow_definition_arn: "FlowDefinitionArn", # required
|
|
@@ -444,13 +456,22 @@ module Aws::Textract
|
|
|
444
456
|
# content_classifiers: ["FreeOfPersonallyIdentifiableInformation"], # accepts FreeOfPersonallyIdentifiableInformation, FreeOfAdultContent
|
|
445
457
|
# },
|
|
446
458
|
# },
|
|
459
|
+
# queries_config: {
|
|
460
|
+
# queries: [ # required
|
|
461
|
+
# {
|
|
462
|
+
# text: "QueryInput", # required
|
|
463
|
+
# alias: "QueryInput",
|
|
464
|
+
# pages: ["QueryPage"],
|
|
465
|
+
# },
|
|
466
|
+
# ],
|
|
467
|
+
# },
|
|
447
468
|
# })
|
|
448
469
|
#
|
|
449
470
|
# @example Response structure
|
|
450
471
|
#
|
|
451
472
|
# resp.document_metadata.pages #=> Integer
|
|
452
473
|
# resp.blocks #=> Array
|
|
453
|
-
# resp.blocks[0].block_type #=> String, one of "KEY_VALUE_SET", "PAGE", "LINE", "WORD", "TABLE", "CELL", "SELECTION_ELEMENT"
|
|
474
|
+
# resp.blocks[0].block_type #=> String, one of "KEY_VALUE_SET", "PAGE", "LINE", "WORD", "TABLE", "CELL", "SELECTION_ELEMENT", "MERGED_CELL", "TITLE", "QUERY", "QUERY_RESULT"
|
|
454
475
|
# resp.blocks[0].confidence #=> Float
|
|
455
476
|
# resp.blocks[0].text #=> String
|
|
456
477
|
# resp.blocks[0].text_type #=> String, one of "HANDWRITING", "PRINTED"
|
|
@@ -467,13 +488,17 @@ module Aws::Textract
|
|
|
467
488
|
# resp.blocks[0].geometry.polygon[0].y #=> Float
|
|
468
489
|
# resp.blocks[0].id #=> String
|
|
469
490
|
# resp.blocks[0].relationships #=> Array
|
|
470
|
-
# resp.blocks[0].relationships[0].type #=> String, one of "VALUE", "CHILD", "COMPLEX_FEATURES"
|
|
491
|
+
# resp.blocks[0].relationships[0].type #=> String, one of "VALUE", "CHILD", "COMPLEX_FEATURES", "MERGED_CELL", "TITLE", "ANSWER"
|
|
471
492
|
# resp.blocks[0].relationships[0].ids #=> Array
|
|
472
493
|
# resp.blocks[0].relationships[0].ids[0] #=> String
|
|
473
494
|
# resp.blocks[0].entity_types #=> Array
|
|
474
|
-
# resp.blocks[0].entity_types[0] #=> String, one of "KEY", "VALUE"
|
|
495
|
+
# resp.blocks[0].entity_types[0] #=> String, one of "KEY", "VALUE", "COLUMN_HEADER"
|
|
475
496
|
# resp.blocks[0].selection_status #=> String, one of "SELECTED", "NOT_SELECTED"
|
|
476
497
|
# resp.blocks[0].page #=> Integer
|
|
498
|
+
# resp.blocks[0].query.text #=> String
|
|
499
|
+
# resp.blocks[0].query.alias #=> String
|
|
500
|
+
# resp.blocks[0].query.pages #=> Array
|
|
501
|
+
# resp.blocks[0].query.pages[0] #=> String
|
|
477
502
|
# resp.human_loop_activation_output.human_loop_arn #=> String
|
|
478
503
|
# resp.human_loop_activation_output.human_loop_activation_reasons #=> Array
|
|
479
504
|
# resp.human_loop_activation_output.human_loop_activation_reasons[0] #=> String
|
|
@@ -609,7 +634,9 @@ module Aws::Textract
|
|
|
609
634
|
|
|
610
635
|
# Analyzes identity documents for relevant information. This information
|
|
611
636
|
# is extracted and returned as `IdentityDocumentFields`, which records
|
|
612
|
-
# both the normalized field and value of the extracted text.
|
|
637
|
+
# both the normalized field and value of the extracted text.Unlike other
|
|
638
|
+
# Amazon Textract operations, `AnalyzeID` doesn't return any Geometry
|
|
639
|
+
# data.
|
|
613
640
|
#
|
|
614
641
|
# @option params [required, Array<Types::Document>] :document_pages
|
|
615
642
|
# The document being passed to AnalyzeID.
|
|
@@ -662,8 +689,9 @@ module Aws::Textract
|
|
|
662
689
|
|
|
663
690
|
# Detects text in the input document. Amazon Textract can detect lines
|
|
664
691
|
# of text and the words that make up a line of text. The input document
|
|
665
|
-
# must be an image in JPEG or
|
|
666
|
-
# the detected text in an array of Block
|
|
692
|
+
# must be an image in JPEG, PNG, PDF, or TIFF format.
|
|
693
|
+
# `DetectDocumentText` returns the detected text in an array of Block
|
|
694
|
+
# objects.
|
|
667
695
|
#
|
|
668
696
|
# Each document page has as an associated `Block` of type PAGE. Each
|
|
669
697
|
# PAGE `Block` object is the parent of LINE `Block` objects that
|
|
@@ -712,7 +740,7 @@ module Aws::Textract
|
|
|
712
740
|
#
|
|
713
741
|
# resp.document_metadata.pages #=> Integer
|
|
714
742
|
# resp.blocks #=> Array
|
|
715
|
-
# resp.blocks[0].block_type #=> String, one of "KEY_VALUE_SET", "PAGE", "LINE", "WORD", "TABLE", "CELL", "SELECTION_ELEMENT"
|
|
743
|
+
# resp.blocks[0].block_type #=> String, one of "KEY_VALUE_SET", "PAGE", "LINE", "WORD", "TABLE", "CELL", "SELECTION_ELEMENT", "MERGED_CELL", "TITLE", "QUERY", "QUERY_RESULT"
|
|
716
744
|
# resp.blocks[0].confidence #=> Float
|
|
717
745
|
# resp.blocks[0].text #=> String
|
|
718
746
|
# resp.blocks[0].text_type #=> String, one of "HANDWRITING", "PRINTED"
|
|
@@ -729,13 +757,17 @@ module Aws::Textract
|
|
|
729
757
|
# resp.blocks[0].geometry.polygon[0].y #=> Float
|
|
730
758
|
# resp.blocks[0].id #=> String
|
|
731
759
|
# resp.blocks[0].relationships #=> Array
|
|
732
|
-
# resp.blocks[0].relationships[0].type #=> String, one of "VALUE", "CHILD", "COMPLEX_FEATURES"
|
|
760
|
+
# resp.blocks[0].relationships[0].type #=> String, one of "VALUE", "CHILD", "COMPLEX_FEATURES", "MERGED_CELL", "TITLE", "ANSWER"
|
|
733
761
|
# resp.blocks[0].relationships[0].ids #=> Array
|
|
734
762
|
# resp.blocks[0].relationships[0].ids[0] #=> String
|
|
735
763
|
# resp.blocks[0].entity_types #=> Array
|
|
736
|
-
# resp.blocks[0].entity_types[0] #=> String, one of "KEY", "VALUE"
|
|
764
|
+
# resp.blocks[0].entity_types[0] #=> String, one of "KEY", "VALUE", "COLUMN_HEADER"
|
|
737
765
|
# resp.blocks[0].selection_status #=> String, one of "SELECTED", "NOT_SELECTED"
|
|
738
766
|
# resp.blocks[0].page #=> Integer
|
|
767
|
+
# resp.blocks[0].query.text #=> String
|
|
768
|
+
# resp.blocks[0].query.alias #=> String
|
|
769
|
+
# resp.blocks[0].query.pages #=> Array
|
|
770
|
+
# resp.blocks[0].query.pages[0] #=> String
|
|
739
771
|
# resp.detect_document_text_model_version #=> String
|
|
740
772
|
#
|
|
741
773
|
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/DetectDocumentText AWS API Documentation
|
|
@@ -779,6 +811,11 @@ module Aws::Textract
|
|
|
779
811
|
# relationship with the value of the `StartDocumentAnalysis`
|
|
780
812
|
# `FeatureTypes` input parameter).
|
|
781
813
|
#
|
|
814
|
+
# * Queries. A QUERIES\_RESULT Block object contains the answer to the
|
|
815
|
+
# query, the alias associated and an ID that connect it to the query
|
|
816
|
+
# asked. This Block also contains a location and attached confidence
|
|
817
|
+
# score
|
|
818
|
+
#
|
|
782
819
|
# Selection elements such as check boxes and option buttons (radio
|
|
783
820
|
# buttons) can be detected in form data and in tables. A
|
|
784
821
|
# SELECTION\_ELEMENT `Block` object contains information about a
|
|
@@ -839,7 +876,7 @@ module Aws::Textract
|
|
|
839
876
|
# resp.job_status #=> String, one of "IN_PROGRESS", "SUCCEEDED", "FAILED", "PARTIAL_SUCCESS"
|
|
840
877
|
# resp.next_token #=> String
|
|
841
878
|
# resp.blocks #=> Array
|
|
842
|
-
# resp.blocks[0].block_type #=> String, one of "KEY_VALUE_SET", "PAGE", "LINE", "WORD", "TABLE", "CELL", "SELECTION_ELEMENT"
|
|
879
|
+
# resp.blocks[0].block_type #=> String, one of "KEY_VALUE_SET", "PAGE", "LINE", "WORD", "TABLE", "CELL", "SELECTION_ELEMENT", "MERGED_CELL", "TITLE", "QUERY", "QUERY_RESULT"
|
|
843
880
|
# resp.blocks[0].confidence #=> Float
|
|
844
881
|
# resp.blocks[0].text #=> String
|
|
845
882
|
# resp.blocks[0].text_type #=> String, one of "HANDWRITING", "PRINTED"
|
|
@@ -856,13 +893,17 @@ module Aws::Textract
|
|
|
856
893
|
# resp.blocks[0].geometry.polygon[0].y #=> Float
|
|
857
894
|
# resp.blocks[0].id #=> String
|
|
858
895
|
# resp.blocks[0].relationships #=> Array
|
|
859
|
-
# resp.blocks[0].relationships[0].type #=> String, one of "VALUE", "CHILD", "COMPLEX_FEATURES"
|
|
896
|
+
# resp.blocks[0].relationships[0].type #=> String, one of "VALUE", "CHILD", "COMPLEX_FEATURES", "MERGED_CELL", "TITLE", "ANSWER"
|
|
860
897
|
# resp.blocks[0].relationships[0].ids #=> Array
|
|
861
898
|
# resp.blocks[0].relationships[0].ids[0] #=> String
|
|
862
899
|
# resp.blocks[0].entity_types #=> Array
|
|
863
|
-
# resp.blocks[0].entity_types[0] #=> String, one of "KEY", "VALUE"
|
|
900
|
+
# resp.blocks[0].entity_types[0] #=> String, one of "KEY", "VALUE", "COLUMN_HEADER"
|
|
864
901
|
# resp.blocks[0].selection_status #=> String, one of "SELECTED", "NOT_SELECTED"
|
|
865
902
|
# resp.blocks[0].page #=> Integer
|
|
903
|
+
# resp.blocks[0].query.text #=> String
|
|
904
|
+
# resp.blocks[0].query.alias #=> String
|
|
905
|
+
# resp.blocks[0].query.pages #=> Array
|
|
906
|
+
# resp.blocks[0].query.pages[0] #=> String
|
|
866
907
|
# resp.warnings #=> Array
|
|
867
908
|
# resp.warnings[0].error_code #=> String
|
|
868
909
|
# resp.warnings[0].pages #=> Array
|
|
@@ -957,7 +998,7 @@ module Aws::Textract
|
|
|
957
998
|
# resp.job_status #=> String, one of "IN_PROGRESS", "SUCCEEDED", "FAILED", "PARTIAL_SUCCESS"
|
|
958
999
|
# resp.next_token #=> String
|
|
959
1000
|
# resp.blocks #=> Array
|
|
960
|
-
# resp.blocks[0].block_type #=> String, one of "KEY_VALUE_SET", "PAGE", "LINE", "WORD", "TABLE", "CELL", "SELECTION_ELEMENT"
|
|
1001
|
+
# resp.blocks[0].block_type #=> String, one of "KEY_VALUE_SET", "PAGE", "LINE", "WORD", "TABLE", "CELL", "SELECTION_ELEMENT", "MERGED_CELL", "TITLE", "QUERY", "QUERY_RESULT"
|
|
961
1002
|
# resp.blocks[0].confidence #=> Float
|
|
962
1003
|
# resp.blocks[0].text #=> String
|
|
963
1004
|
# resp.blocks[0].text_type #=> String, one of "HANDWRITING", "PRINTED"
|
|
@@ -974,13 +1015,17 @@ module Aws::Textract
|
|
|
974
1015
|
# resp.blocks[0].geometry.polygon[0].y #=> Float
|
|
975
1016
|
# resp.blocks[0].id #=> String
|
|
976
1017
|
# resp.blocks[0].relationships #=> Array
|
|
977
|
-
# resp.blocks[0].relationships[0].type #=> String, one of "VALUE", "CHILD", "COMPLEX_FEATURES"
|
|
1018
|
+
# resp.blocks[0].relationships[0].type #=> String, one of "VALUE", "CHILD", "COMPLEX_FEATURES", "MERGED_CELL", "TITLE", "ANSWER"
|
|
978
1019
|
# resp.blocks[0].relationships[0].ids #=> Array
|
|
979
1020
|
# resp.blocks[0].relationships[0].ids[0] #=> String
|
|
980
1021
|
# resp.blocks[0].entity_types #=> Array
|
|
981
|
-
# resp.blocks[0].entity_types[0] #=> String, one of "KEY", "VALUE"
|
|
1022
|
+
# resp.blocks[0].entity_types[0] #=> String, one of "KEY", "VALUE", "COLUMN_HEADER"
|
|
982
1023
|
# resp.blocks[0].selection_status #=> String, one of "SELECTED", "NOT_SELECTED"
|
|
983
1024
|
# resp.blocks[0].page #=> Integer
|
|
1025
|
+
# resp.blocks[0].query.text #=> String
|
|
1026
|
+
# resp.blocks[0].query.alias #=> String
|
|
1027
|
+
# resp.blocks[0].query.pages #=> Array
|
|
1028
|
+
# resp.blocks[0].query.pages[0] #=> String
|
|
984
1029
|
# resp.warnings #=> Array
|
|
985
1030
|
# resp.warnings[0].error_code #=> String
|
|
986
1031
|
# resp.warnings[0].pages #=> Array
|
|
@@ -1200,6 +1245,8 @@ module Aws::Textract
|
|
|
1200
1245
|
# customer bucket. When this parameter is not enabled, the result will
|
|
1201
1246
|
# be encrypted server side,using SSE-S3.
|
|
1202
1247
|
#
|
|
1248
|
+
# @option params [Types::QueriesConfig] :queries_config
|
|
1249
|
+
#
|
|
1203
1250
|
# @return [Types::StartDocumentAnalysisResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
1204
1251
|
#
|
|
1205
1252
|
# * {Types::StartDocumentAnalysisResponse#job_id #job_id} => String
|
|
@@ -1214,7 +1261,7 @@ module Aws::Textract
|
|
|
1214
1261
|
# version: "S3ObjectVersion",
|
|
1215
1262
|
# },
|
|
1216
1263
|
# },
|
|
1217
|
-
# feature_types: ["TABLES"], # required, accepts TABLES, FORMS
|
|
1264
|
+
# feature_types: ["TABLES"], # required, accepts TABLES, FORMS, QUERIES
|
|
1218
1265
|
# client_request_token: "ClientRequestToken",
|
|
1219
1266
|
# job_tag: "JobTag",
|
|
1220
1267
|
# notification_channel: {
|
|
@@ -1226,6 +1273,15 @@ module Aws::Textract
|
|
|
1226
1273
|
# s3_prefix: "S3ObjectName",
|
|
1227
1274
|
# },
|
|
1228
1275
|
# kms_key_id: "KMSKeyId",
|
|
1276
|
+
# queries_config: {
|
|
1277
|
+
# queries: [ # required
|
|
1278
|
+
# {
|
|
1279
|
+
# text: "QueryInput", # required
|
|
1280
|
+
# alias: "QueryInput",
|
|
1281
|
+
# pages: ["QueryPage"],
|
|
1282
|
+
# },
|
|
1283
|
+
# ],
|
|
1284
|
+
# },
|
|
1229
1285
|
# })
|
|
1230
1286
|
#
|
|
1231
1287
|
# @example Response structure
|
|
@@ -1458,7 +1514,7 @@ module Aws::Textract
|
|
|
1458
1514
|
params: params,
|
|
1459
1515
|
config: config)
|
|
1460
1516
|
context[:gem_name] = 'aws-sdk-textract'
|
|
1461
|
-
context[:gem_version] = '1.
|
|
1517
|
+
context[:gem_version] = '1.38.0'
|
|
1462
1518
|
Seahorse::Client::Request.new(handlers, context)
|
|
1463
1519
|
end
|
|
1464
1520
|
|
|
@@ -97,6 +97,12 @@ module Aws::Textract
|
|
|
97
97
|
Point = Shapes::StructureShape.new(name: 'Point')
|
|
98
98
|
Polygon = Shapes::ListShape.new(name: 'Polygon')
|
|
99
99
|
ProvisionedThroughputExceededException = Shapes::StructureShape.new(name: 'ProvisionedThroughputExceededException')
|
|
100
|
+
Queries = Shapes::ListShape.new(name: 'Queries')
|
|
101
|
+
QueriesConfig = Shapes::StructureShape.new(name: 'QueriesConfig')
|
|
102
|
+
Query = Shapes::StructureShape.new(name: 'Query')
|
|
103
|
+
QueryInput = Shapes::StringShape.new(name: 'QueryInput')
|
|
104
|
+
QueryPage = Shapes::StringShape.new(name: 'QueryPage')
|
|
105
|
+
QueryPages = Shapes::ListShape.new(name: 'QueryPages')
|
|
100
106
|
Relationship = Shapes::StructureShape.new(name: 'Relationship')
|
|
101
107
|
RelationshipList = Shapes::ListShape.new(name: 'RelationshipList')
|
|
102
108
|
RelationshipType = Shapes::StringShape.new(name: 'RelationshipType')
|
|
@@ -128,6 +134,7 @@ module Aws::Textract
|
|
|
128
134
|
AnalyzeDocumentRequest.add_member(:document, Shapes::ShapeRef.new(shape: Document, required: true, location_name: "Document"))
|
|
129
135
|
AnalyzeDocumentRequest.add_member(:feature_types, Shapes::ShapeRef.new(shape: FeatureTypes, required: true, location_name: "FeatureTypes"))
|
|
130
136
|
AnalyzeDocumentRequest.add_member(:human_loop_config, Shapes::ShapeRef.new(shape: HumanLoopConfig, location_name: "HumanLoopConfig"))
|
|
137
|
+
AnalyzeDocumentRequest.add_member(:queries_config, Shapes::ShapeRef.new(shape: QueriesConfig, location_name: "QueriesConfig"))
|
|
131
138
|
AnalyzeDocumentRequest.struct_class = Types::AnalyzeDocumentRequest
|
|
132
139
|
|
|
133
140
|
AnalyzeDocumentResponse.add_member(:document_metadata, Shapes::ShapeRef.new(shape: DocumentMetadata, location_name: "DocumentMetadata"))
|
|
@@ -172,6 +179,7 @@ module Aws::Textract
|
|
|
172
179
|
Block.add_member(:entity_types, Shapes::ShapeRef.new(shape: EntityTypes, location_name: "EntityTypes"))
|
|
173
180
|
Block.add_member(:selection_status, Shapes::ShapeRef.new(shape: SelectionStatus, location_name: "SelectionStatus"))
|
|
174
181
|
Block.add_member(:page, Shapes::ShapeRef.new(shape: UInteger, location_name: "Page"))
|
|
182
|
+
Block.add_member(:query, Shapes::ShapeRef.new(shape: Query, location_name: "Query"))
|
|
175
183
|
Block.struct_class = Types::Block
|
|
176
184
|
|
|
177
185
|
BlockList.member = Shapes::ShapeRef.new(shape: Block)
|
|
@@ -361,6 +369,18 @@ module Aws::Textract
|
|
|
361
369
|
|
|
362
370
|
ProvisionedThroughputExceededException.struct_class = Types::ProvisionedThroughputExceededException
|
|
363
371
|
|
|
372
|
+
Queries.member = Shapes::ShapeRef.new(shape: Query)
|
|
373
|
+
|
|
374
|
+
QueriesConfig.add_member(:queries, Shapes::ShapeRef.new(shape: Queries, required: true, location_name: "Queries"))
|
|
375
|
+
QueriesConfig.struct_class = Types::QueriesConfig
|
|
376
|
+
|
|
377
|
+
Query.add_member(:text, Shapes::ShapeRef.new(shape: QueryInput, required: true, location_name: "Text"))
|
|
378
|
+
Query.add_member(:alias, Shapes::ShapeRef.new(shape: QueryInput, location_name: "Alias"))
|
|
379
|
+
Query.add_member(:pages, Shapes::ShapeRef.new(shape: QueryPages, location_name: "Pages"))
|
|
380
|
+
Query.struct_class = Types::Query
|
|
381
|
+
|
|
382
|
+
QueryPages.member = Shapes::ShapeRef.new(shape: QueryPage)
|
|
383
|
+
|
|
364
384
|
Relationship.add_member(:type, Shapes::ShapeRef.new(shape: RelationshipType, location_name: "Type"))
|
|
365
385
|
Relationship.add_member(:ids, Shapes::ShapeRef.new(shape: IdList, location_name: "Ids"))
|
|
366
386
|
Relationship.struct_class = Types::Relationship
|
|
@@ -379,6 +399,7 @@ module Aws::Textract
|
|
|
379
399
|
StartDocumentAnalysisRequest.add_member(:notification_channel, Shapes::ShapeRef.new(shape: NotificationChannel, location_name: "NotificationChannel"))
|
|
380
400
|
StartDocumentAnalysisRequest.add_member(:output_config, Shapes::ShapeRef.new(shape: OutputConfig, location_name: "OutputConfig"))
|
|
381
401
|
StartDocumentAnalysisRequest.add_member(:kms_key_id, Shapes::ShapeRef.new(shape: KMSKeyId, location_name: "KMSKeyId"))
|
|
402
|
+
StartDocumentAnalysisRequest.add_member(:queries_config, Shapes::ShapeRef.new(shape: QueriesConfig, location_name: "QueriesConfig"))
|
|
382
403
|
StartDocumentAnalysisRequest.struct_class = Types::StartDocumentAnalysisRequest
|
|
383
404
|
|
|
384
405
|
StartDocumentAnalysisResponse.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, location_name: "JobId"))
|
|
@@ -29,7 +29,7 @@ module Aws::Textract
|
|
|
29
29
|
# version: "S3ObjectVersion",
|
|
30
30
|
# },
|
|
31
31
|
# },
|
|
32
|
-
# feature_types: ["TABLES"], # required, accepts TABLES, FORMS
|
|
32
|
+
# feature_types: ["TABLES"], # required, accepts TABLES, FORMS, QUERIES
|
|
33
33
|
# human_loop_config: {
|
|
34
34
|
# human_loop_name: "HumanLoopName", # required
|
|
35
35
|
# flow_definition_arn: "FlowDefinitionArn", # required
|
|
@@ -37,13 +37,22 @@ module Aws::Textract
|
|
|
37
37
|
# content_classifiers: ["FreeOfPersonallyIdentifiableInformation"], # accepts FreeOfPersonallyIdentifiableInformation, FreeOfAdultContent
|
|
38
38
|
# },
|
|
39
39
|
# },
|
|
40
|
+
# queries_config: {
|
|
41
|
+
# queries: [ # required
|
|
42
|
+
# {
|
|
43
|
+
# text: "QueryInput", # required
|
|
44
|
+
# alias: "QueryInput",
|
|
45
|
+
# pages: ["QueryPage"],
|
|
46
|
+
# },
|
|
47
|
+
# ],
|
|
48
|
+
# },
|
|
40
49
|
# }
|
|
41
50
|
#
|
|
42
51
|
# @!attribute [rw] document
|
|
43
52
|
# The input document as base64-encoded bytes or an Amazon S3 object.
|
|
44
53
|
# If you use the AWS CLI to call Amazon Textract operations, you
|
|
45
|
-
# can't pass image bytes. The document must be an image in JPEG
|
|
46
|
-
#
|
|
54
|
+
# can't pass image bytes. The document must be an image in JPEG, PNG,
|
|
55
|
+
# PDF, or TIFF format.
|
|
47
56
|
#
|
|
48
57
|
# If you're using an AWS SDK to call Amazon Textract, you might not
|
|
49
58
|
# need to base64-encode image bytes that are passed using the `Bytes`
|
|
@@ -65,12 +74,18 @@ module Aws::Textract
|
|
|
65
74
|
# analyzing documents.
|
|
66
75
|
# @return [Types::HumanLoopConfig]
|
|
67
76
|
#
|
|
77
|
+
# @!attribute [rw] queries_config
|
|
78
|
+
# Contains Queries and the alias for those Queries, as determined by
|
|
79
|
+
# the input.
|
|
80
|
+
# @return [Types::QueriesConfig]
|
|
81
|
+
#
|
|
68
82
|
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/AnalyzeDocumentRequest AWS API Documentation
|
|
69
83
|
#
|
|
70
84
|
class AnalyzeDocumentRequest < Struct.new(
|
|
71
85
|
:document,
|
|
72
86
|
:feature_types,
|
|
73
|
-
:human_loop_config
|
|
87
|
+
:human_loop_config,
|
|
88
|
+
:queries_config)
|
|
74
89
|
SENSITIVE = []
|
|
75
90
|
include Aws::Structure
|
|
76
91
|
end
|
|
@@ -315,6 +330,14 @@ module Aws::Textract
|
|
|
315
330
|
# button (radio button) or a check box that's detected on a
|
|
316
331
|
# document page. Use the value of `SelectionStatus` to determine the
|
|
317
332
|
# status of the selection element.
|
|
333
|
+
#
|
|
334
|
+
# * *QUERY* - A question asked during the call of AnalyzeDocument.
|
|
335
|
+
# Contains an alias and an ID that attachs it to its answer.
|
|
336
|
+
#
|
|
337
|
+
# * *QUERY\_RESULT* - A response to a question asked during the call
|
|
338
|
+
# of analyze document. Comes with an alias and ID for ease of
|
|
339
|
+
# locating in a response. Also contains location and confidence
|
|
340
|
+
# score.
|
|
318
341
|
# @return [String]
|
|
319
342
|
#
|
|
320
343
|
# @!attribute [rw] confidence
|
|
@@ -408,6 +431,9 @@ module Aws::Textract
|
|
|
408
431
|
# document.
|
|
409
432
|
# @return [Integer]
|
|
410
433
|
#
|
|
434
|
+
# @!attribute [rw] query
|
|
435
|
+
# @return [Types::Query]
|
|
436
|
+
#
|
|
411
437
|
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/Block AWS API Documentation
|
|
412
438
|
#
|
|
413
439
|
class Block < Struct.new(
|
|
@@ -424,7 +450,8 @@ module Aws::Textract
|
|
|
424
450
|
:relationships,
|
|
425
451
|
:entity_types,
|
|
426
452
|
:selection_status,
|
|
427
|
-
:page
|
|
453
|
+
:page,
|
|
454
|
+
:query)
|
|
428
455
|
SENSITIVE = []
|
|
429
456
|
include Aws::Structure
|
|
430
457
|
end
|
|
@@ -1427,6 +1454,80 @@ module Aws::Textract
|
|
|
1427
1454
|
#
|
|
1428
1455
|
class ProvisionedThroughputExceededException < Aws::EmptyStructure; end
|
|
1429
1456
|
|
|
1457
|
+
# @note When making an API call, you may pass QueriesConfig
|
|
1458
|
+
# data as a hash:
|
|
1459
|
+
#
|
|
1460
|
+
# {
|
|
1461
|
+
# queries: [ # required
|
|
1462
|
+
# {
|
|
1463
|
+
# text: "QueryInput", # required
|
|
1464
|
+
# alias: "QueryInput",
|
|
1465
|
+
# pages: ["QueryPage"],
|
|
1466
|
+
# },
|
|
1467
|
+
# ],
|
|
1468
|
+
# }
|
|
1469
|
+
#
|
|
1470
|
+
# @!attribute [rw] queries
|
|
1471
|
+
# @return [Array<Types::Query>]
|
|
1472
|
+
#
|
|
1473
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/QueriesConfig AWS API Documentation
|
|
1474
|
+
#
|
|
1475
|
+
class QueriesConfig < Struct.new(
|
|
1476
|
+
:queries)
|
|
1477
|
+
SENSITIVE = []
|
|
1478
|
+
include Aws::Structure
|
|
1479
|
+
end
|
|
1480
|
+
|
|
1481
|
+
# Each query contains the question you want to ask in the Text and the
|
|
1482
|
+
# alias you want to associate.
|
|
1483
|
+
#
|
|
1484
|
+
# @note When making an API call, you may pass Query
|
|
1485
|
+
# data as a hash:
|
|
1486
|
+
#
|
|
1487
|
+
# {
|
|
1488
|
+
# text: "QueryInput", # required
|
|
1489
|
+
# alias: "QueryInput",
|
|
1490
|
+
# pages: ["QueryPage"],
|
|
1491
|
+
# }
|
|
1492
|
+
#
|
|
1493
|
+
# @!attribute [rw] text
|
|
1494
|
+
# Question that Amazon Textract will apply to the document. An example
|
|
1495
|
+
# would be "What is the customer's SSN?"
|
|
1496
|
+
# @return [String]
|
|
1497
|
+
#
|
|
1498
|
+
# @!attribute [rw] alias
|
|
1499
|
+
# Alias attached to the query, for ease of location.
|
|
1500
|
+
# @return [String]
|
|
1501
|
+
#
|
|
1502
|
+
# @!attribute [rw] pages
|
|
1503
|
+
# List of pages associated with the query. The following is a list of
|
|
1504
|
+
# rules for using this parameter.
|
|
1505
|
+
#
|
|
1506
|
+
# * If a page is not specified, it is set to `["1"]` by default.
|
|
1507
|
+
#
|
|
1508
|
+
# * The following characters are allowed in the parameter's string:
|
|
1509
|
+
# `0 1 2 3 4 5 6 7 8 9 - *`. No whitespace is allowed.
|
|
1510
|
+
#
|
|
1511
|
+
# * When using `*` to indicate all pages, it must be the only element
|
|
1512
|
+
# in the string.
|
|
1513
|
+
#
|
|
1514
|
+
# * You can use page intervals, such as `[“1-3”, “1-1”, “4-*”]`. Where
|
|
1515
|
+
# `*` indicates last page of document.
|
|
1516
|
+
#
|
|
1517
|
+
# * Specified pages must be greater than 0 and less than or equal to
|
|
1518
|
+
# the number of pages in the document.
|
|
1519
|
+
# @return [Array<String>]
|
|
1520
|
+
#
|
|
1521
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/Query AWS API Documentation
|
|
1522
|
+
#
|
|
1523
|
+
class Query < Struct.new(
|
|
1524
|
+
:text,
|
|
1525
|
+
:alias,
|
|
1526
|
+
:pages)
|
|
1527
|
+
SENSITIVE = []
|
|
1528
|
+
include Aws::Structure
|
|
1529
|
+
end
|
|
1530
|
+
|
|
1430
1531
|
# Information about how blocks are related to each other. A `Block`
|
|
1431
1532
|
# object contains 0 or more `Relation` objects in a list,
|
|
1432
1533
|
# `Relationships`. For more information, see Block.
|
|
@@ -1512,7 +1613,7 @@ module Aws::Textract
|
|
|
1512
1613
|
# version: "S3ObjectVersion",
|
|
1513
1614
|
# },
|
|
1514
1615
|
# },
|
|
1515
|
-
# feature_types: ["TABLES"], # required, accepts TABLES, FORMS
|
|
1616
|
+
# feature_types: ["TABLES"], # required, accepts TABLES, FORMS, QUERIES
|
|
1516
1617
|
# client_request_token: "ClientRequestToken",
|
|
1517
1618
|
# job_tag: "JobTag",
|
|
1518
1619
|
# notification_channel: {
|
|
@@ -1524,6 +1625,15 @@ module Aws::Textract
|
|
|
1524
1625
|
# s3_prefix: "S3ObjectName",
|
|
1525
1626
|
# },
|
|
1526
1627
|
# kms_key_id: "KMSKeyId",
|
|
1628
|
+
# queries_config: {
|
|
1629
|
+
# queries: [ # required
|
|
1630
|
+
# {
|
|
1631
|
+
# text: "QueryInput", # required
|
|
1632
|
+
# alias: "QueryInput",
|
|
1633
|
+
# pages: ["QueryPage"],
|
|
1634
|
+
# },
|
|
1635
|
+
# ],
|
|
1636
|
+
# },
|
|
1527
1637
|
# }
|
|
1528
1638
|
#
|
|
1529
1639
|
# @!attribute [rw] document_location
|
|
@@ -1579,6 +1689,9 @@ module Aws::Textract
|
|
|
1579
1689
|
# will be encrypted server side,using SSE-S3.
|
|
1580
1690
|
# @return [String]
|
|
1581
1691
|
#
|
|
1692
|
+
# @!attribute [rw] queries_config
|
|
1693
|
+
# @return [Types::QueriesConfig]
|
|
1694
|
+
#
|
|
1582
1695
|
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/StartDocumentAnalysisRequest AWS API Documentation
|
|
1583
1696
|
#
|
|
1584
1697
|
class StartDocumentAnalysisRequest < Struct.new(
|
|
@@ -1588,7 +1701,8 @@ module Aws::Textract
|
|
|
1588
1701
|
:job_tag,
|
|
1589
1702
|
:notification_channel,
|
|
1590
1703
|
:output_config,
|
|
1591
|
-
:kms_key_id
|
|
1704
|
+
:kms_key_id,
|
|
1705
|
+
:queries_config)
|
|
1592
1706
|
SENSITIVE = []
|
|
1593
1707
|
include Aws::Structure
|
|
1594
1708
|
end
|
|
@@ -1804,8 +1918,7 @@ module Aws::Textract
|
|
|
1804
1918
|
class ThrottlingException < Aws::EmptyStructure; end
|
|
1805
1919
|
|
|
1806
1920
|
# The format of the input document isn't supported. Documents for
|
|
1807
|
-
#
|
|
1808
|
-
# for asynchronous operations can be in PDF format.
|
|
1921
|
+
# operations can be in PNG, JPEG, PDF, or TIFF format.
|
|
1809
1922
|
#
|
|
1810
1923
|
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/UnsupportedDocumentException AWS API Documentation
|
|
1811
1924
|
#
|
data/lib/aws-sdk-textract.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: aws-sdk-textract
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.38.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Amazon Web Services
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-04-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aws-sdk-core
|
|
@@ -19,7 +19,7 @@ dependencies:
|
|
|
19
19
|
version: '3'
|
|
20
20
|
- - ">="
|
|
21
21
|
- !ruby/object:Gem::Version
|
|
22
|
-
version: 3.
|
|
22
|
+
version: 3.127.0
|
|
23
23
|
type: :runtime
|
|
24
24
|
prerelease: false
|
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -29,7 +29,7 @@ dependencies:
|
|
|
29
29
|
version: '3'
|
|
30
30
|
- - ">="
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: 3.
|
|
32
|
+
version: 3.127.0
|
|
33
33
|
- !ruby/object:Gem::Dependency
|
|
34
34
|
name: aws-sigv4
|
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|