aws-sdk-textract 1.29.0 → 1.33.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 21745a57da0d542599a55a2e970fe622d03aab5ca36a68beefeba1d646742e77
4
- data.tar.gz: cc8f2bd26c1e1d5abd46f3a713127ca33422feb9a553c4ce82412d702d5c60a1
3
+ metadata.gz: a0597249191f85abe9b4ae750150b66eaefed975cedb814a3c73efeb291e4c63
4
+ data.tar.gz: 6af502a9d4c6a3878f78fb37027173beec935fdfb6acdb5fe90e16f20cb83694
5
5
  SHA512:
6
- metadata.gz: b160a4d857d91a1b33251482cf1a40e7b1a09cf353144e39f28c848d2a6e58ea03cf8cafd2d5bea67f274ee27fc0c3135bbef81ffd1a759213704bc071ad3858
7
- data.tar.gz: 6fe0cef5fd5d1bc68eab3bfdf4bcb00122f55362e7852488c641bb374cbb7eef7e397881df6d66fdf6c3cb9679b37e284146f1d860ae8be58bf858d10b9af33d
6
+ metadata.gz: 6e858249348d25143446c78a3d118eeeb65e5281566ff57c2a4a4dea5b5df246b9fbbc2c9b730c63609df4930dfc252f86ba592c99e4ccc97d2c83809e01c213
7
+ data.tar.gz: ccdd7d3aea333704476ca909be54de710468520c621f320091818896638e624bfb389674b3c099d6e2e6b8ad2b789a599eaaf816e8754eeaefcd0dbc1efd20d7
data/CHANGELOG.md CHANGED
@@ -1,6 +1,26 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.33.0 (2021-11-30)
5
+ ------------------
6
+
7
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
8
+
9
+ 1.32.0 (2021-11-29)
10
+ ------------------
11
+
12
+ * Feature - This release adds support for synchronously analyzing identity documents through a new API: AnalyzeID
13
+
14
+ 1.31.0 (2021-11-04)
15
+ ------------------
16
+
17
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
18
+
19
+ 1.30.0 (2021-10-27)
20
+ ------------------
21
+
22
+ * Feature - This release adds support for asynchronously analyzing invoice and receipt documents through two new APIs: StartExpenseAnalysis and GetExpenseAnalysis
23
+
4
24
  1.29.0 (2021-10-18)
5
25
  ------------------
6
26
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.29.0
1
+ 1.33.0
@@ -119,7 +119,9 @@ module Aws::Textract
119
119
  # * EC2/ECS IMDS instance profile - When used by default, the timeouts
120
120
  # are very aggressive. Construct and pass an instance of
121
121
  # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
122
- # enable retries and extended timeouts.
122
+ # enable retries and extended timeouts. Instance profile credential
123
+ # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
124
+ # to true.
123
125
  #
124
126
  # @option options [required, String] :region
125
127
  # The AWS region to connect to. The configured `:region` is
@@ -285,6 +287,15 @@ module Aws::Textract
285
287
  # ** Please note ** When response stubbing is enabled, no HTTP
286
288
  # requests are made, and retries are disabled.
287
289
  #
290
+ # @option options [Boolean] :use_dualstack_endpoint
291
+ # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
292
+ # will be used if available.
293
+ #
294
+ # @option options [Boolean] :use_fips_endpoint
295
+ # When set to `true`, fips compatible endpoints will be used if available.
296
+ # When a `fips` region is used, the region is normalized and this config
297
+ # is set to `true`.
298
+ #
288
299
  # @option options [Boolean] :validate_params (true)
289
300
  # When `true`, request parameters are validated before
290
301
  # sending the request.
@@ -467,8 +478,8 @@ module Aws::Textract
467
478
  req.send_request(options)
468
479
  end
469
480
 
470
- # Analyzes an input document for financially related relationships
471
- # between text.
481
+ # `AnalyzeExpense` synchronously analyzes an input document for
482
+ # financially related relationships between text.
472
483
  #
473
484
  # Information is returned as `ExpenseDocuments` and seperated as
474
485
  # follows.
@@ -585,6 +596,59 @@ module Aws::Textract
585
596
  req.send_request(options)
586
597
  end
587
598
 
599
+ # Analyzes identity documents for relevant information. This information
600
+ # is extracted and returned as `IdentityDocumentFields`, which records
601
+ # both the normalized field and value of the extracted text.
602
+ #
603
+ # @option params [required, Array<Types::Document>] :document_pages
604
+ # The document being passed to AnalyzeID.
605
+ #
606
+ # @return [Types::AnalyzeIDResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
607
+ #
608
+ # * {Types::AnalyzeIDResponse#identity_documents #identity_documents} => Array&lt;Types::IdentityDocument&gt;
609
+ # * {Types::AnalyzeIDResponse#document_metadata #document_metadata} => Types::DocumentMetadata
610
+ # * {Types::AnalyzeIDResponse#analyze_id_model_version #analyze_id_model_version} => String
611
+ #
612
+ # @example Request syntax with placeholder values
613
+ #
614
+ # resp = client.analyze_id({
615
+ # document_pages: [ # required
616
+ # {
617
+ # bytes: "data",
618
+ # s3_object: {
619
+ # bucket: "S3Bucket",
620
+ # name: "S3ObjectName",
621
+ # version: "S3ObjectVersion",
622
+ # },
623
+ # },
624
+ # ],
625
+ # })
626
+ #
627
+ # @example Response structure
628
+ #
629
+ # resp.identity_documents #=> Array
630
+ # resp.identity_documents[0].document_index #=> Integer
631
+ # resp.identity_documents[0].identity_document_fields #=> Array
632
+ # resp.identity_documents[0].identity_document_fields[0].type.text #=> String
633
+ # resp.identity_documents[0].identity_document_fields[0].type.normalized_value.value #=> String
634
+ # resp.identity_documents[0].identity_document_fields[0].type.normalized_value.value_type #=> String, one of "DATE"
635
+ # resp.identity_documents[0].identity_document_fields[0].type.confidence #=> Float
636
+ # resp.identity_documents[0].identity_document_fields[0].value_detection.text #=> String
637
+ # resp.identity_documents[0].identity_document_fields[0].value_detection.normalized_value.value #=> String
638
+ # resp.identity_documents[0].identity_document_fields[0].value_detection.normalized_value.value_type #=> String, one of "DATE"
639
+ # resp.identity_documents[0].identity_document_fields[0].value_detection.confidence #=> Float
640
+ # resp.document_metadata.pages #=> Integer
641
+ # resp.analyze_id_model_version #=> String
642
+ #
643
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/AnalyzeID AWS API Documentation
644
+ #
645
+ # @overload analyze_id(params = {})
646
+ # @param [Hash] params ({})
647
+ def analyze_id(params = {}, options = {})
648
+ req = build_request(:analyze_id, params)
649
+ req.send_request(options)
650
+ end
651
+
588
652
  # Detects text in the input document. Amazon Textract can detect lines
589
653
  # of text and the words that make up a line of text. The input document
590
654
  # must be an image in JPEG or PNG format. `DetectDocumentText` returns
@@ -922,14 +986,148 @@ module Aws::Textract
922
986
  req.send_request(options)
923
987
  end
924
988
 
989
+ # Gets the results for an Amazon Textract asynchronous operation that
990
+ # analyzes invoices and receipts. Amazon Textract finds contact
991
+ # information, items purchased, and vendor name, from input invoices and
992
+ # receipts.
993
+ #
994
+ # You start asynchronous invoice/receipt analysis by calling
995
+ # StartExpenseAnalysis, which returns a job identifier (`JobId`). Upon
996
+ # completion of the invoice/receipt analysis, Amazon Textract publishes
997
+ # the completion status to the Amazon Simple Notification Service
998
+ # (Amazon SNS) topic. This topic must be registered in the initial call
999
+ # to `StartExpenseAnalysis`. To get the results of the invoice/receipt
1000
+ # analysis operation, first ensure that the status value published to
1001
+ # the Amazon SNS topic is `SUCCEEDED`. If so, call `GetExpenseAnalysis`,
1002
+ # and pass the job identifier (`JobId`) from the initial call to
1003
+ # `StartExpenseAnalysis`.
1004
+ #
1005
+ # Use the MaxResults parameter to limit the number of blocks that are
1006
+ # returned. If there are more results than specified in `MaxResults`,
1007
+ # the value of `NextToken` in the operation response contains a
1008
+ # pagination token for getting the next set of results. To get the next
1009
+ # page of results, call `GetExpenseAnalysis`, and populate the
1010
+ # `NextToken` request parameter with the token value that's returned
1011
+ # from the previous call to `GetExpenseAnalysis`.
1012
+ #
1013
+ # For more information, see [Analyzing Invoices and Receipts][1].
1014
+ #
1015
+ #
1016
+ #
1017
+ # [1]: https://docs.aws.amazon.com/textract/latest/dg/invoices-receipts.html
1018
+ #
1019
+ # @option params [required, String] :job_id
1020
+ # A unique identifier for the text detection job. The `JobId` is
1021
+ # returned from `StartExpenseAnalysis`. A `JobId` value is only valid
1022
+ # for 7 days.
1023
+ #
1024
+ # @option params [Integer] :max_results
1025
+ # The maximum number of results to return per paginated call. The
1026
+ # largest value you can specify is 20. If you specify a value greater
1027
+ # than 20, a maximum of 20 results is returned. The default value is 20.
1028
+ #
1029
+ # @option params [String] :next_token
1030
+ # If the previous response was incomplete (because there are more blocks
1031
+ # to retrieve), Amazon Textract returns a pagination token in the
1032
+ # response. You can use this pagination token to retrieve the next set
1033
+ # of blocks.
1034
+ #
1035
+ # @return [Types::GetExpenseAnalysisResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1036
+ #
1037
+ # * {Types::GetExpenseAnalysisResponse#document_metadata #document_metadata} => Types::DocumentMetadata
1038
+ # * {Types::GetExpenseAnalysisResponse#job_status #job_status} => String
1039
+ # * {Types::GetExpenseAnalysisResponse#next_token #next_token} => String
1040
+ # * {Types::GetExpenseAnalysisResponse#expense_documents #expense_documents} => Array&lt;Types::ExpenseDocument&gt;
1041
+ # * {Types::GetExpenseAnalysisResponse#warnings #warnings} => Array&lt;Types::Warning&gt;
1042
+ # * {Types::GetExpenseAnalysisResponse#status_message #status_message} => String
1043
+ # * {Types::GetExpenseAnalysisResponse#analyze_expense_model_version #analyze_expense_model_version} => String
1044
+ #
1045
+ # @example Request syntax with placeholder values
1046
+ #
1047
+ # resp = client.get_expense_analysis({
1048
+ # job_id: "JobId", # required
1049
+ # max_results: 1,
1050
+ # next_token: "PaginationToken",
1051
+ # })
1052
+ #
1053
+ # @example Response structure
1054
+ #
1055
+ # resp.document_metadata.pages #=> Integer
1056
+ # resp.job_status #=> String, one of "IN_PROGRESS", "SUCCEEDED", "FAILED", "PARTIAL_SUCCESS"
1057
+ # resp.next_token #=> String
1058
+ # resp.expense_documents #=> Array
1059
+ # resp.expense_documents[0].expense_index #=> Integer
1060
+ # resp.expense_documents[0].summary_fields #=> Array
1061
+ # resp.expense_documents[0].summary_fields[0].type.text #=> String
1062
+ # resp.expense_documents[0].summary_fields[0].type.confidence #=> Float
1063
+ # resp.expense_documents[0].summary_fields[0].label_detection.text #=> String
1064
+ # resp.expense_documents[0].summary_fields[0].label_detection.geometry.bounding_box.width #=> Float
1065
+ # resp.expense_documents[0].summary_fields[0].label_detection.geometry.bounding_box.height #=> Float
1066
+ # resp.expense_documents[0].summary_fields[0].label_detection.geometry.bounding_box.left #=> Float
1067
+ # resp.expense_documents[0].summary_fields[0].label_detection.geometry.bounding_box.top #=> Float
1068
+ # resp.expense_documents[0].summary_fields[0].label_detection.geometry.polygon #=> Array
1069
+ # resp.expense_documents[0].summary_fields[0].label_detection.geometry.polygon[0].x #=> Float
1070
+ # resp.expense_documents[0].summary_fields[0].label_detection.geometry.polygon[0].y #=> Float
1071
+ # resp.expense_documents[0].summary_fields[0].label_detection.confidence #=> Float
1072
+ # resp.expense_documents[0].summary_fields[0].value_detection.text #=> String
1073
+ # resp.expense_documents[0].summary_fields[0].value_detection.geometry.bounding_box.width #=> Float
1074
+ # resp.expense_documents[0].summary_fields[0].value_detection.geometry.bounding_box.height #=> Float
1075
+ # resp.expense_documents[0].summary_fields[0].value_detection.geometry.bounding_box.left #=> Float
1076
+ # resp.expense_documents[0].summary_fields[0].value_detection.geometry.bounding_box.top #=> Float
1077
+ # resp.expense_documents[0].summary_fields[0].value_detection.geometry.polygon #=> Array
1078
+ # resp.expense_documents[0].summary_fields[0].value_detection.geometry.polygon[0].x #=> Float
1079
+ # resp.expense_documents[0].summary_fields[0].value_detection.geometry.polygon[0].y #=> Float
1080
+ # resp.expense_documents[0].summary_fields[0].value_detection.confidence #=> Float
1081
+ # resp.expense_documents[0].summary_fields[0].page_number #=> Integer
1082
+ # resp.expense_documents[0].line_item_groups #=> Array
1083
+ # resp.expense_documents[0].line_item_groups[0].line_item_group_index #=> Integer
1084
+ # resp.expense_documents[0].line_item_groups[0].line_items #=> Array
1085
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields #=> Array
1086
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].type.text #=> String
1087
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].type.confidence #=> Float
1088
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.text #=> String
1089
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.geometry.bounding_box.width #=> Float
1090
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.geometry.bounding_box.height #=> Float
1091
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.geometry.bounding_box.left #=> Float
1092
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.geometry.bounding_box.top #=> Float
1093
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.geometry.polygon #=> Array
1094
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.geometry.polygon[0].x #=> Float
1095
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.geometry.polygon[0].y #=> Float
1096
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.confidence #=> Float
1097
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.text #=> String
1098
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.bounding_box.width #=> Float
1099
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.bounding_box.height #=> Float
1100
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.bounding_box.left #=> Float
1101
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.bounding_box.top #=> Float
1102
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.polygon #=> Array
1103
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.polygon[0].x #=> Float
1104
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.polygon[0].y #=> Float
1105
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.confidence #=> Float
1106
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].page_number #=> Integer
1107
+ # resp.warnings #=> Array
1108
+ # resp.warnings[0].error_code #=> String
1109
+ # resp.warnings[0].pages #=> Array
1110
+ # resp.warnings[0].pages[0] #=> Integer
1111
+ # resp.status_message #=> String
1112
+ # resp.analyze_expense_model_version #=> String
1113
+ #
1114
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/GetExpenseAnalysis AWS API Documentation
1115
+ #
1116
+ # @overload get_expense_analysis(params = {})
1117
+ # @param [Hash] params ({})
1118
+ def get_expense_analysis(params = {}, options = {})
1119
+ req = build_request(:get_expense_analysis, params)
1120
+ req.send_request(options)
1121
+ end
1122
+
925
1123
  # Starts the asynchronous analysis of an input document for
926
1124
  # relationships between detected items such as key-value pairs, tables,
927
1125
  # and selection elements.
928
1126
  #
929
1127
  # `StartDocumentAnalysis` can analyze text in documents that are in
930
- # JPEG, PNG, and PDF format. The documents are stored in an Amazon S3
931
- # bucket. Use DocumentLocation to specify the bucket name and file name
932
- # of the document.
1128
+ # JPEG, PNG, TIFF, and PDF format. The documents are stored in an Amazon
1129
+ # S3 bucket. Use DocumentLocation to specify the bucket name and file
1130
+ # name of the document.
933
1131
  #
934
1132
  # `StartDocumentAnalysis` returns a job identifier (`JobId`) that you
935
1133
  # use to get the results of the operation. When text analysis is
@@ -1037,9 +1235,9 @@ module Aws::Textract
1037
1235
  # text.
1038
1236
  #
1039
1237
  # `StartDocumentTextDetection` can analyze text in documents that are in
1040
- # JPEG, PNG, and PDF format. The documents are stored in an Amazon S3
1041
- # bucket. Use DocumentLocation to specify the bucket name and file name
1042
- # of the document.
1238
+ # JPEG, PNG, TIFF, and PDF format. The documents are stored in an Amazon
1239
+ # S3 bucket. Use DocumentLocation to specify the bucket name and file
1240
+ # name of the document.
1043
1241
  #
1044
1242
  # `StartTextDetection` returns a job identifier (`JobId`) that you use
1045
1243
  # to get the results of the operation. When text detection is finished,
@@ -1134,6 +1332,108 @@ module Aws::Textract
1134
1332
  req.send_request(options)
1135
1333
  end
1136
1334
 
1335
+ # Starts the asynchronous analysis of invoices or receipts for data like
1336
+ # contact information, items purchased, and vendor names.
1337
+ #
1338
+ # `StartExpenseAnalysis` can analyze text in documents that are in JPEG,
1339
+ # PNG, and PDF format. The documents must be stored in an Amazon S3
1340
+ # bucket. Use the DocumentLocation parameter to specify the name of your
1341
+ # S3 bucket and the name of the document in that bucket.
1342
+ #
1343
+ # `StartExpenseAnalysis` returns a job identifier (`JobId`) that you
1344
+ # will provide to `GetExpenseAnalysis` to retrieve the results of the
1345
+ # operation. When the analysis of the input invoices/receipts is
1346
+ # finished, Amazon Textract publishes a completion status to the Amazon
1347
+ # Simple Notification Service (Amazon SNS) topic that you provide to the
1348
+ # `NotificationChannel`. To obtain the results of the invoice and
1349
+ # receipt analysis operation, ensure that the status value published to
1350
+ # the Amazon SNS topic is `SUCCEEDED`. If so, call GetExpenseAnalysis,
1351
+ # and pass the job identifier (`JobId`) that was returned by your call
1352
+ # to `StartExpenseAnalysis`.
1353
+ #
1354
+ # For more information, see [Analyzing Invoices and Receipts][1].
1355
+ #
1356
+ #
1357
+ #
1358
+ # [1]: https://docs.aws.amazon.com/textract/latest/dg/invoice-receipts.html
1359
+ #
1360
+ # @option params [required, Types::DocumentLocation] :document_location
1361
+ # The location of the document to be processed.
1362
+ #
1363
+ # @option params [String] :client_request_token
1364
+ # The idempotent token that's used to identify the start request. If
1365
+ # you use the same token with multiple `StartDocumentTextDetection`
1366
+ # requests, the same `JobId` is returned. Use `ClientRequestToken` to
1367
+ # prevent the same job from being accidentally started more than once.
1368
+ # For more information, see [Calling Amazon Textract Asynchronous
1369
+ # Operations][1]
1370
+ #
1371
+ #
1372
+ #
1373
+ # [1]: https://docs.aws.amazon.com/textract/latest/dg/api-async.html
1374
+ #
1375
+ # @option params [String] :job_tag
1376
+ # An identifier you specify that's included in the completion
1377
+ # notification published to the Amazon SNS topic. For example, you can
1378
+ # use `JobTag` to identify the type of document that the completion
1379
+ # notification corresponds to (such as a tax form or a receipt).
1380
+ #
1381
+ # @option params [Types::NotificationChannel] :notification_channel
1382
+ # The Amazon SNS topic ARN that you want Amazon Textract to publish the
1383
+ # completion status of the operation to.
1384
+ #
1385
+ # @option params [Types::OutputConfig] :output_config
1386
+ # Sets if the output will go to a customer defined bucket. By default,
1387
+ # Amazon Textract will save the results internally to be accessed by the
1388
+ # `GetExpenseAnalysis` operation.
1389
+ #
1390
+ # @option params [String] :kms_key_id
1391
+ # The KMS key used to encrypt the inference results. This can be in
1392
+ # either Key ID or Key Alias format. When a KMS key is provided, the KMS
1393
+ # key will be used for server-side encryption of the objects in the
1394
+ # customer bucket. When this parameter is not enabled, the result will
1395
+ # be encrypted server side,using SSE-S3.
1396
+ #
1397
+ # @return [Types::StartExpenseAnalysisResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1398
+ #
1399
+ # * {Types::StartExpenseAnalysisResponse#job_id #job_id} => String
1400
+ #
1401
+ # @example Request syntax with placeholder values
1402
+ #
1403
+ # resp = client.start_expense_analysis({
1404
+ # document_location: { # required
1405
+ # s3_object: {
1406
+ # bucket: "S3Bucket",
1407
+ # name: "S3ObjectName",
1408
+ # version: "S3ObjectVersion",
1409
+ # },
1410
+ # },
1411
+ # client_request_token: "ClientRequestToken",
1412
+ # job_tag: "JobTag",
1413
+ # notification_channel: {
1414
+ # sns_topic_arn: "SNSTopicArn", # required
1415
+ # role_arn: "RoleArn", # required
1416
+ # },
1417
+ # output_config: {
1418
+ # s3_bucket: "S3Bucket", # required
1419
+ # s3_prefix: "S3ObjectName",
1420
+ # },
1421
+ # kms_key_id: "KMSKeyId",
1422
+ # })
1423
+ #
1424
+ # @example Response structure
1425
+ #
1426
+ # resp.job_id #=> String
1427
+ #
1428
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/StartExpenseAnalysis AWS API Documentation
1429
+ #
1430
+ # @overload start_expense_analysis(params = {})
1431
+ # @param [Hash] params ({})
1432
+ def start_expense_analysis(params = {}, options = {})
1433
+ req = build_request(:start_expense_analysis, params)
1434
+ req.send_request(options)
1435
+ end
1436
+
1137
1437
  # @!endgroup
1138
1438
 
1139
1439
  # @param params ({})
@@ -1147,7 +1447,7 @@ module Aws::Textract
1147
1447
  params: params,
1148
1448
  config: config)
1149
1449
  context[:gem_name] = 'aws-sdk-textract'
1150
- context[:gem_version] = '1.29.0'
1450
+ context[:gem_version] = '1.33.0'
1151
1451
  Seahorse::Client::Request.new(handlers, context)
1152
1452
  end
1153
1453
 
@@ -18,6 +18,9 @@ module Aws::Textract
18
18
  AnalyzeDocumentResponse = Shapes::StructureShape.new(name: 'AnalyzeDocumentResponse')
19
19
  AnalyzeExpenseRequest = Shapes::StructureShape.new(name: 'AnalyzeExpenseRequest')
20
20
  AnalyzeExpenseResponse = Shapes::StructureShape.new(name: 'AnalyzeExpenseResponse')
21
+ AnalyzeIDDetections = Shapes::StructureShape.new(name: 'AnalyzeIDDetections')
22
+ AnalyzeIDRequest = Shapes::StructureShape.new(name: 'AnalyzeIDRequest')
23
+ AnalyzeIDResponse = Shapes::StructureShape.new(name: 'AnalyzeIDResponse')
21
24
  BadDocumentException = Shapes::StructureShape.new(name: 'BadDocumentException')
22
25
  Block = Shapes::StructureShape.new(name: 'Block')
23
26
  BlockList = Shapes::ListShape.new(name: 'BlockList')
@@ -31,6 +34,7 @@ module Aws::Textract
31
34
  Document = Shapes::StructureShape.new(name: 'Document')
32
35
  DocumentLocation = Shapes::StructureShape.new(name: 'DocumentLocation')
33
36
  DocumentMetadata = Shapes::StructureShape.new(name: 'DocumentMetadata')
37
+ DocumentPages = Shapes::ListShape.new(name: 'DocumentPages')
34
38
  DocumentTooLargeException = Shapes::StructureShape.new(name: 'DocumentTooLargeException')
35
39
  EntityType = Shapes::StringShape.new(name: 'EntityType')
36
40
  EntityTypes = Shapes::ListShape.new(name: 'EntityTypes')
@@ -50,6 +54,8 @@ module Aws::Textract
50
54
  GetDocumentAnalysisResponse = Shapes::StructureShape.new(name: 'GetDocumentAnalysisResponse')
51
55
  GetDocumentTextDetectionRequest = Shapes::StructureShape.new(name: 'GetDocumentTextDetectionRequest')
52
56
  GetDocumentTextDetectionResponse = Shapes::StructureShape.new(name: 'GetDocumentTextDetectionResponse')
57
+ GetExpenseAnalysisRequest = Shapes::StructureShape.new(name: 'GetExpenseAnalysisRequest')
58
+ GetExpenseAnalysisResponse = Shapes::StructureShape.new(name: 'GetExpenseAnalysisResponse')
53
59
  HumanLoopActivationConditionsEvaluationResults = Shapes::StringShape.new(name: 'HumanLoopActivationConditionsEvaluationResults')
54
60
  HumanLoopActivationOutput = Shapes::StructureShape.new(name: 'HumanLoopActivationOutput')
55
61
  HumanLoopActivationReason = Shapes::StringShape.new(name: 'HumanLoopActivationReason')
@@ -61,6 +67,10 @@ module Aws::Textract
61
67
  HumanLoopQuotaExceededException = Shapes::StructureShape.new(name: 'HumanLoopQuotaExceededException')
62
68
  IdList = Shapes::ListShape.new(name: 'IdList')
63
69
  IdempotentParameterMismatchException = Shapes::StructureShape.new(name: 'IdempotentParameterMismatchException')
70
+ IdentityDocument = Shapes::StructureShape.new(name: 'IdentityDocument')
71
+ IdentityDocumentField = Shapes::StructureShape.new(name: 'IdentityDocumentField')
72
+ IdentityDocumentFieldList = Shapes::ListShape.new(name: 'IdentityDocumentFieldList')
73
+ IdentityDocumentList = Shapes::ListShape.new(name: 'IdentityDocumentList')
64
74
  ImageBlob = Shapes::BlobShape.new(name: 'ImageBlob')
65
75
  InternalServerError = Shapes::StructureShape.new(name: 'InternalServerError')
66
76
  InvalidJobIdException = Shapes::StructureShape.new(name: 'InvalidJobIdException')
@@ -78,6 +88,7 @@ module Aws::Textract
78
88
  LineItemList = Shapes::ListShape.new(name: 'LineItemList')
79
89
  MaxResults = Shapes::IntegerShape.new(name: 'MaxResults')
80
90
  NonEmptyString = Shapes::StringShape.new(name: 'NonEmptyString')
91
+ NormalizedValue = Shapes::StructureShape.new(name: 'NormalizedValue')
81
92
  NotificationChannel = Shapes::StructureShape.new(name: 'NotificationChannel')
82
93
  OutputConfig = Shapes::StructureShape.new(name: 'OutputConfig')
83
94
  Pages = Shapes::ListShape.new(name: 'Pages')
@@ -100,12 +111,15 @@ module Aws::Textract
100
111
  StartDocumentAnalysisResponse = Shapes::StructureShape.new(name: 'StartDocumentAnalysisResponse')
101
112
  StartDocumentTextDetectionRequest = Shapes::StructureShape.new(name: 'StartDocumentTextDetectionRequest')
102
113
  StartDocumentTextDetectionResponse = Shapes::StructureShape.new(name: 'StartDocumentTextDetectionResponse')
114
+ StartExpenseAnalysisRequest = Shapes::StructureShape.new(name: 'StartExpenseAnalysisRequest')
115
+ StartExpenseAnalysisResponse = Shapes::StructureShape.new(name: 'StartExpenseAnalysisResponse')
103
116
  StatusMessage = Shapes::StringShape.new(name: 'StatusMessage')
104
117
  String = Shapes::StringShape.new(name: 'String')
105
118
  TextType = Shapes::StringShape.new(name: 'TextType')
106
119
  ThrottlingException = Shapes::StructureShape.new(name: 'ThrottlingException')
107
120
  UInteger = Shapes::IntegerShape.new(name: 'UInteger')
108
121
  UnsupportedDocumentException = Shapes::StructureShape.new(name: 'UnsupportedDocumentException')
122
+ ValueType = Shapes::StringShape.new(name: 'ValueType')
109
123
  Warning = Shapes::StructureShape.new(name: 'Warning')
110
124
  Warnings = Shapes::ListShape.new(name: 'Warnings')
111
125
 
@@ -129,6 +143,19 @@ module Aws::Textract
129
143
  AnalyzeExpenseResponse.add_member(:expense_documents, Shapes::ShapeRef.new(shape: ExpenseDocumentList, location_name: "ExpenseDocuments"))
130
144
  AnalyzeExpenseResponse.struct_class = Types::AnalyzeExpenseResponse
131
145
 
146
+ AnalyzeIDDetections.add_member(:text, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Text"))
147
+ AnalyzeIDDetections.add_member(:normalized_value, Shapes::ShapeRef.new(shape: NormalizedValue, location_name: "NormalizedValue"))
148
+ AnalyzeIDDetections.add_member(:confidence, Shapes::ShapeRef.new(shape: Percent, location_name: "Confidence"))
149
+ AnalyzeIDDetections.struct_class = Types::AnalyzeIDDetections
150
+
151
+ AnalyzeIDRequest.add_member(:document_pages, Shapes::ShapeRef.new(shape: DocumentPages, required: true, location_name: "DocumentPages"))
152
+ AnalyzeIDRequest.struct_class = Types::AnalyzeIDRequest
153
+
154
+ AnalyzeIDResponse.add_member(:identity_documents, Shapes::ShapeRef.new(shape: IdentityDocumentList, location_name: "IdentityDocuments"))
155
+ AnalyzeIDResponse.add_member(:document_metadata, Shapes::ShapeRef.new(shape: DocumentMetadata, location_name: "DocumentMetadata"))
156
+ AnalyzeIDResponse.add_member(:analyze_id_model_version, Shapes::ShapeRef.new(shape: String, location_name: "AnalyzeIDModelVersion"))
157
+ AnalyzeIDResponse.struct_class = Types::AnalyzeIDResponse
158
+
132
159
  BadDocumentException.struct_class = Types::BadDocumentException
133
160
 
134
161
  Block.add_member(:block_type, Shapes::ShapeRef.new(shape: BlockType, location_name: "BlockType"))
@@ -175,6 +202,8 @@ module Aws::Textract
175
202
  DocumentMetadata.add_member(:pages, Shapes::ShapeRef.new(shape: UInteger, location_name: "Pages"))
176
203
  DocumentMetadata.struct_class = Types::DocumentMetadata
177
204
 
205
+ DocumentPages.member = Shapes::ShapeRef.new(shape: Document)
206
+
178
207
  DocumentTooLargeException.struct_class = Types::DocumentTooLargeException
179
208
 
180
209
  EntityTypes.member = Shapes::ShapeRef.new(shape: EntityType)
@@ -237,6 +266,20 @@ module Aws::Textract
237
266
  GetDocumentTextDetectionResponse.add_member(:detect_document_text_model_version, Shapes::ShapeRef.new(shape: String, location_name: "DetectDocumentTextModelVersion"))
238
267
  GetDocumentTextDetectionResponse.struct_class = Types::GetDocumentTextDetectionResponse
239
268
 
269
+ GetExpenseAnalysisRequest.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, required: true, location_name: "JobId"))
270
+ GetExpenseAnalysisRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResults, location_name: "MaxResults"))
271
+ GetExpenseAnalysisRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: PaginationToken, location_name: "NextToken"))
272
+ GetExpenseAnalysisRequest.struct_class = Types::GetExpenseAnalysisRequest
273
+
274
+ GetExpenseAnalysisResponse.add_member(:document_metadata, Shapes::ShapeRef.new(shape: DocumentMetadata, location_name: "DocumentMetadata"))
275
+ GetExpenseAnalysisResponse.add_member(:job_status, Shapes::ShapeRef.new(shape: JobStatus, location_name: "JobStatus"))
276
+ GetExpenseAnalysisResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: PaginationToken, location_name: "NextToken"))
277
+ GetExpenseAnalysisResponse.add_member(:expense_documents, Shapes::ShapeRef.new(shape: ExpenseDocumentList, location_name: "ExpenseDocuments"))
278
+ GetExpenseAnalysisResponse.add_member(:warnings, Shapes::ShapeRef.new(shape: Warnings, location_name: "Warnings"))
279
+ GetExpenseAnalysisResponse.add_member(:status_message, Shapes::ShapeRef.new(shape: StatusMessage, location_name: "StatusMessage"))
280
+ GetExpenseAnalysisResponse.add_member(:analyze_expense_model_version, Shapes::ShapeRef.new(shape: String, location_name: "AnalyzeExpenseModelVersion"))
281
+ GetExpenseAnalysisResponse.struct_class = Types::GetExpenseAnalysisResponse
282
+
240
283
  HumanLoopActivationOutput.add_member(:human_loop_arn, Shapes::ShapeRef.new(shape: HumanLoopArn, location_name: "HumanLoopArn"))
241
284
  HumanLoopActivationOutput.add_member(:human_loop_activation_reasons, Shapes::ShapeRef.new(shape: HumanLoopActivationReasons, location_name: "HumanLoopActivationReasons"))
242
285
  HumanLoopActivationOutput.add_member(:human_loop_activation_conditions_evaluation_results, Shapes::ShapeRef.new(shape: HumanLoopActivationConditionsEvaluationResults, location_name: "HumanLoopActivationConditionsEvaluationResults", metadata: {"jsonvalue"=>true}))
@@ -261,6 +304,18 @@ module Aws::Textract
261
304
 
262
305
  IdempotentParameterMismatchException.struct_class = Types::IdempotentParameterMismatchException
263
306
 
307
+ IdentityDocument.add_member(:document_index, Shapes::ShapeRef.new(shape: UInteger, location_name: "DocumentIndex"))
308
+ IdentityDocument.add_member(:identity_document_fields, Shapes::ShapeRef.new(shape: IdentityDocumentFieldList, location_name: "IdentityDocumentFields"))
309
+ IdentityDocument.struct_class = Types::IdentityDocument
310
+
311
+ IdentityDocumentField.add_member(:type, Shapes::ShapeRef.new(shape: AnalyzeIDDetections, location_name: "Type"))
312
+ IdentityDocumentField.add_member(:value_detection, Shapes::ShapeRef.new(shape: AnalyzeIDDetections, location_name: "ValueDetection"))
313
+ IdentityDocumentField.struct_class = Types::IdentityDocumentField
314
+
315
+ IdentityDocumentFieldList.member = Shapes::ShapeRef.new(shape: IdentityDocumentField)
316
+
317
+ IdentityDocumentList.member = Shapes::ShapeRef.new(shape: IdentityDocument)
318
+
264
319
  InternalServerError.struct_class = Types::InternalServerError
265
320
 
266
321
  InvalidJobIdException.struct_class = Types::InvalidJobIdException
@@ -284,6 +339,10 @@ module Aws::Textract
284
339
 
285
340
  LineItemList.member = Shapes::ShapeRef.new(shape: LineItemFields)
286
341
 
342
+ NormalizedValue.add_member(:value, Shapes::ShapeRef.new(shape: String, location_name: "Value"))
343
+ NormalizedValue.add_member(:value_type, Shapes::ShapeRef.new(shape: ValueType, location_name: "ValueType"))
344
+ NormalizedValue.struct_class = Types::NormalizedValue
345
+
287
346
  NotificationChannel.add_member(:sns_topic_arn, Shapes::ShapeRef.new(shape: SNSTopicArn, required: true, location_name: "SNSTopicArn"))
288
347
  NotificationChannel.add_member(:role_arn, Shapes::ShapeRef.new(shape: RoleArn, required: true, location_name: "RoleArn"))
289
348
  NotificationChannel.struct_class = Types::NotificationChannel
@@ -336,6 +395,17 @@ module Aws::Textract
336
395
  StartDocumentTextDetectionResponse.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, location_name: "JobId"))
337
396
  StartDocumentTextDetectionResponse.struct_class = Types::StartDocumentTextDetectionResponse
338
397
 
398
+ StartExpenseAnalysisRequest.add_member(:document_location, Shapes::ShapeRef.new(shape: DocumentLocation, required: true, location_name: "DocumentLocation"))
399
+ StartExpenseAnalysisRequest.add_member(:client_request_token, Shapes::ShapeRef.new(shape: ClientRequestToken, location_name: "ClientRequestToken"))
400
+ StartExpenseAnalysisRequest.add_member(:job_tag, Shapes::ShapeRef.new(shape: JobTag, location_name: "JobTag"))
401
+ StartExpenseAnalysisRequest.add_member(:notification_channel, Shapes::ShapeRef.new(shape: NotificationChannel, location_name: "NotificationChannel"))
402
+ StartExpenseAnalysisRequest.add_member(:output_config, Shapes::ShapeRef.new(shape: OutputConfig, location_name: "OutputConfig"))
403
+ StartExpenseAnalysisRequest.add_member(:kms_key_id, Shapes::ShapeRef.new(shape: KMSKeyId, location_name: "KMSKeyId"))
404
+ StartExpenseAnalysisRequest.struct_class = Types::StartExpenseAnalysisRequest
405
+
406
+ StartExpenseAnalysisResponse.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, location_name: "JobId"))
407
+ StartExpenseAnalysisResponse.struct_class = Types::StartExpenseAnalysisResponse
408
+
339
409
  ThrottlingException.struct_class = Types::ThrottlingException
340
410
 
341
411
  UnsupportedDocumentException.struct_class = Types::UnsupportedDocumentException
@@ -399,6 +469,23 @@ module Aws::Textract
399
469
  o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
400
470
  end)
401
471
 
472
+ api.add_operation(:analyze_id, Seahorse::Model::Operation.new.tap do |o|
473
+ o.name = "AnalyzeID"
474
+ o.http_method = "POST"
475
+ o.http_request_uri = "/"
476
+ o.input = Shapes::ShapeRef.new(shape: AnalyzeIDRequest)
477
+ o.output = Shapes::ShapeRef.new(shape: AnalyzeIDResponse)
478
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
479
+ o.errors << Shapes::ShapeRef.new(shape: InvalidS3ObjectException)
480
+ o.errors << Shapes::ShapeRef.new(shape: UnsupportedDocumentException)
481
+ o.errors << Shapes::ShapeRef.new(shape: DocumentTooLargeException)
482
+ o.errors << Shapes::ShapeRef.new(shape: BadDocumentException)
483
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
484
+ o.errors << Shapes::ShapeRef.new(shape: ProvisionedThroughputExceededException)
485
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
486
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
487
+ end)
488
+
402
489
  api.add_operation(:detect_document_text, Seahorse::Model::Operation.new.tap do |o|
403
490
  o.name = "DetectDocumentText"
404
491
  o.http_method = "POST"
@@ -448,6 +535,22 @@ module Aws::Textract
448
535
  o.errors << Shapes::ShapeRef.new(shape: InvalidKMSKeyException)
449
536
  end)
450
537
 
538
+ api.add_operation(:get_expense_analysis, Seahorse::Model::Operation.new.tap do |o|
539
+ o.name = "GetExpenseAnalysis"
540
+ o.http_method = "POST"
541
+ o.http_request_uri = "/"
542
+ o.input = Shapes::ShapeRef.new(shape: GetExpenseAnalysisRequest)
543
+ o.output = Shapes::ShapeRef.new(shape: GetExpenseAnalysisResponse)
544
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
545
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
546
+ o.errors << Shapes::ShapeRef.new(shape: ProvisionedThroughputExceededException)
547
+ o.errors << Shapes::ShapeRef.new(shape: InvalidJobIdException)
548
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
549
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
550
+ o.errors << Shapes::ShapeRef.new(shape: InvalidS3ObjectException)
551
+ o.errors << Shapes::ShapeRef.new(shape: InvalidKMSKeyException)
552
+ end)
553
+
451
554
  api.add_operation(:start_document_analysis, Seahorse::Model::Operation.new.tap do |o|
452
555
  o.name = "StartDocumentAnalysis"
453
556
  o.http_method = "POST"
@@ -487,6 +590,26 @@ module Aws::Textract
487
590
  o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
488
591
  o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
489
592
  end)
593
+
594
+ api.add_operation(:start_expense_analysis, Seahorse::Model::Operation.new.tap do |o|
595
+ o.name = "StartExpenseAnalysis"
596
+ o.http_method = "POST"
597
+ o.http_request_uri = "/"
598
+ o.input = Shapes::ShapeRef.new(shape: StartExpenseAnalysisRequest)
599
+ o.output = Shapes::ShapeRef.new(shape: StartExpenseAnalysisResponse)
600
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
601
+ o.errors << Shapes::ShapeRef.new(shape: InvalidS3ObjectException)
602
+ o.errors << Shapes::ShapeRef.new(shape: InvalidKMSKeyException)
603
+ o.errors << Shapes::ShapeRef.new(shape: UnsupportedDocumentException)
604
+ o.errors << Shapes::ShapeRef.new(shape: DocumentTooLargeException)
605
+ o.errors << Shapes::ShapeRef.new(shape: BadDocumentException)
606
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
607
+ o.errors << Shapes::ShapeRef.new(shape: ProvisionedThroughputExceededException)
608
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
609
+ o.errors << Shapes::ShapeRef.new(shape: IdempotentParameterMismatchException)
610
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
611
+ o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
612
+ end)
490
613
  end
491
614
 
492
615
  end
@@ -168,6 +168,84 @@ module Aws::Textract
168
168
  include Aws::Structure
169
169
  end
170
170
 
171
+ # Used to contain the information detected by an AnalyzeID operation.
172
+ #
173
+ # @!attribute [rw] text
174
+ # Text of either the normalized field or value associated with it.
175
+ # @return [String]
176
+ #
177
+ # @!attribute [rw] normalized_value
178
+ # Only returned for dates, returns the type of value detected and the
179
+ # date written in a more machine readable way.
180
+ # @return [Types::NormalizedValue]
181
+ #
182
+ # @!attribute [rw] confidence
183
+ # The confidence score of the detected text.
184
+ # @return [Float]
185
+ #
186
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/AnalyzeIDDetections AWS API Documentation
187
+ #
188
+ class AnalyzeIDDetections < Struct.new(
189
+ :text,
190
+ :normalized_value,
191
+ :confidence)
192
+ SENSITIVE = []
193
+ include Aws::Structure
194
+ end
195
+
196
+ # @note When making an API call, you may pass AnalyzeIDRequest
197
+ # data as a hash:
198
+ #
199
+ # {
200
+ # document_pages: [ # required
201
+ # {
202
+ # bytes: "data",
203
+ # s3_object: {
204
+ # bucket: "S3Bucket",
205
+ # name: "S3ObjectName",
206
+ # version: "S3ObjectVersion",
207
+ # },
208
+ # },
209
+ # ],
210
+ # }
211
+ #
212
+ # @!attribute [rw] document_pages
213
+ # The document being passed to AnalyzeID.
214
+ # @return [Array<Types::Document>]
215
+ #
216
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/AnalyzeIDRequest AWS API Documentation
217
+ #
218
+ class AnalyzeIDRequest < Struct.new(
219
+ :document_pages)
220
+ SENSITIVE = []
221
+ include Aws::Structure
222
+ end
223
+
224
+ # @!attribute [rw] identity_documents
225
+ # The list of documents processed by AnalyzeID. Includes a number
226
+ # denoting their place in the list and the response structure for the
227
+ # document.
228
+ # @return [Array<Types::IdentityDocument>]
229
+ #
230
+ # @!attribute [rw] document_metadata
231
+ # Information about the input document.
232
+ # @return [Types::DocumentMetadata]
233
+ #
234
+ # @!attribute [rw] analyze_id_model_version
235
+ # The version of the AnalyzeIdentity API being used to process
236
+ # documents.
237
+ # @return [String]
238
+ #
239
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/AnalyzeIDResponse AWS API Documentation
240
+ #
241
+ class AnalyzeIDResponse < Struct.new(
242
+ :identity_documents,
243
+ :document_metadata,
244
+ :analyze_id_model_version)
245
+ SENSITIVE = []
246
+ include Aws::Structure
247
+ end
248
+
171
249
  # Amazon Textract isn't able to read the document. For more information
172
250
  # on the document limits in Amazon Textract, see limits.
173
251
  #
@@ -322,11 +400,12 @@ module Aws::Textract
322
400
  # @!attribute [rw] page
323
401
  # The page on which a block was detected. `Page` is returned by
324
402
  # asynchronous operations. Page values greater than 1 are only
325
- # returned for multipage documents that are in PDF format. A scanned
326
- # image (JPEG/PNG), even if it contains multiple document pages, is
327
- # considered to be a single-page document. The value of `Page` is
328
- # always 1. Synchronous operations don't return `Page` because every
329
- # input document is considered to be a single-page document.
403
+ # returned for multipage documents that are in PDF or TIFF format. A
404
+ # scanned image (JPEG/PNG), even if it contains multiple document
405
+ # pages, is considered to be a single-page document. The value of
406
+ # `Page` is always 1. Synchronous operations don't return `Page`
407
+ # because every input document is considered to be a single-page
408
+ # document.
330
409
  # @return [Integer]
331
410
  #
332
411
  # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/Block AWS API Documentation
@@ -618,7 +697,7 @@ module Aws::Textract
618
697
  end
619
698
 
620
699
  # Breakdown of detected information, seperated into the catagories Type,
621
- # LableDetection, and ValueDetection
700
+ # LabelDetection, and ValueDetection
622
701
  #
623
702
  # @!attribute [rw] type
624
703
  # The implied label of a detected element. Present alongside
@@ -864,6 +943,93 @@ module Aws::Textract
864
943
  include Aws::Structure
865
944
  end
866
945
 
946
+ # @note When making an API call, you may pass GetExpenseAnalysisRequest
947
+ # data as a hash:
948
+ #
949
+ # {
950
+ # job_id: "JobId", # required
951
+ # max_results: 1,
952
+ # next_token: "PaginationToken",
953
+ # }
954
+ #
955
+ # @!attribute [rw] job_id
956
+ # A unique identifier for the text detection job. The `JobId` is
957
+ # returned from `StartExpenseAnalysis`. A `JobId` value is only valid
958
+ # for 7 days.
959
+ # @return [String]
960
+ #
961
+ # @!attribute [rw] max_results
962
+ # The maximum number of results to return per paginated call. The
963
+ # largest value you can specify is 20. If you specify a value greater
964
+ # than 20, a maximum of 20 results is returned. The default value is
965
+ # 20.
966
+ # @return [Integer]
967
+ #
968
+ # @!attribute [rw] next_token
969
+ # If the previous response was incomplete (because there are more
970
+ # blocks to retrieve), Amazon Textract returns a pagination token in
971
+ # the response. You can use this pagination token to retrieve the next
972
+ # set of blocks.
973
+ # @return [String]
974
+ #
975
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/GetExpenseAnalysisRequest AWS API Documentation
976
+ #
977
+ class GetExpenseAnalysisRequest < Struct.new(
978
+ :job_id,
979
+ :max_results,
980
+ :next_token)
981
+ SENSITIVE = []
982
+ include Aws::Structure
983
+ end
984
+
985
+ # @!attribute [rw] document_metadata
986
+ # Information about a document that Amazon Textract processed.
987
+ # `DocumentMetadata` is returned in every page of paginated responses
988
+ # from an Amazon Textract operation.
989
+ # @return [Types::DocumentMetadata]
990
+ #
991
+ # @!attribute [rw] job_status
992
+ # The current status of the text detection job.
993
+ # @return [String]
994
+ #
995
+ # @!attribute [rw] next_token
996
+ # If the response is truncated, Amazon Textract returns this token.
997
+ # You can use this token in the subsequent request to retrieve the
998
+ # next set of text-detection results.
999
+ # @return [String]
1000
+ #
1001
+ # @!attribute [rw] expense_documents
1002
+ # The expenses detected by Amazon Textract.
1003
+ # @return [Array<Types::ExpenseDocument>]
1004
+ #
1005
+ # @!attribute [rw] warnings
1006
+ # A list of warnings that occurred during the text-detection operation
1007
+ # for the document.
1008
+ # @return [Array<Types::Warning>]
1009
+ #
1010
+ # @!attribute [rw] status_message
1011
+ # Returns if the detection job could not be completed. Contains
1012
+ # explanation for what error occured.
1013
+ # @return [String]
1014
+ #
1015
+ # @!attribute [rw] analyze_expense_model_version
1016
+ # The current model version of AnalyzeExpense.
1017
+ # @return [String]
1018
+ #
1019
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/GetExpenseAnalysisResponse AWS API Documentation
1020
+ #
1021
+ class GetExpenseAnalysisResponse < Struct.new(
1022
+ :document_metadata,
1023
+ :job_status,
1024
+ :next_token,
1025
+ :expense_documents,
1026
+ :warnings,
1027
+ :status_message,
1028
+ :analyze_expense_model_version)
1029
+ SENSITIVE = []
1030
+ include Aws::Structure
1031
+ end
1032
+
867
1033
  # Shows the results of the human in the loop evaluation. If there is no
868
1034
  # HumanLoopArn, the input did not trigger human review.
869
1035
  #
@@ -985,6 +1151,50 @@ module Aws::Textract
985
1151
  #
986
1152
  class IdempotentParameterMismatchException < Aws::EmptyStructure; end
987
1153
 
1154
+ # The structure that lists each document processed in an AnalyzeID
1155
+ # operation.
1156
+ #
1157
+ # @!attribute [rw] document_index
1158
+ # Denotes the placement of a document in the IdentityDocument list.
1159
+ # The first document is marked 1, the second 2 and so on.
1160
+ # @return [Integer]
1161
+ #
1162
+ # @!attribute [rw] identity_document_fields
1163
+ # The structure used to record information extracted from identity
1164
+ # documents. Contains both normalized field and value of the extracted
1165
+ # text.
1166
+ # @return [Array<Types::IdentityDocumentField>]
1167
+ #
1168
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/IdentityDocument AWS API Documentation
1169
+ #
1170
+ class IdentityDocument < Struct.new(
1171
+ :document_index,
1172
+ :identity_document_fields)
1173
+ SENSITIVE = []
1174
+ include Aws::Structure
1175
+ end
1176
+
1177
+ # Structure containing both the normalized type of the extracted
1178
+ # information and the text associated with it. These are extracted as
1179
+ # Type and Value respectively.
1180
+ #
1181
+ # @!attribute [rw] type
1182
+ # Used to contain the information detected by an AnalyzeID operation.
1183
+ # @return [Types::AnalyzeIDDetections]
1184
+ #
1185
+ # @!attribute [rw] value_detection
1186
+ # Used to contain the information detected by an AnalyzeID operation.
1187
+ # @return [Types::AnalyzeIDDetections]
1188
+ #
1189
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/IdentityDocumentField AWS API Documentation
1190
+ #
1191
+ class IdentityDocumentField < Struct.new(
1192
+ :type,
1193
+ :value_detection)
1194
+ SENSITIVE = []
1195
+ include Aws::Structure
1196
+ end
1197
+
988
1198
  # Amazon Textract experienced a service issue. Try your call again.
989
1199
  #
990
1200
  # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/InternalServerError AWS API Documentation
@@ -1077,6 +1287,26 @@ module Aws::Textract
1077
1287
  include Aws::Structure
1078
1288
  end
1079
1289
 
1290
+ # Contains information relating to dates in a document, including the
1291
+ # type of value, and the value.
1292
+ #
1293
+ # @!attribute [rw] value
1294
+ # The value of the date, written as Year-Month-DayTHour:Minute:Second.
1295
+ # @return [String]
1296
+ #
1297
+ # @!attribute [rw] value_type
1298
+ # The normalized type of the value detected. In this case, DATE.
1299
+ # @return [String]
1300
+ #
1301
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/NormalizedValue AWS API Documentation
1302
+ #
1303
+ class NormalizedValue < Struct.new(
1304
+ :value,
1305
+ :value_type)
1306
+ SENSITIVE = []
1307
+ include Aws::Structure
1308
+ end
1309
+
1080
1310
  # The Amazon Simple Notification Service (Amazon SNS) topic to which
1081
1311
  # Amazon Textract publishes the completion status of an asynchronous
1082
1312
  # document operation, such as StartDocumentTextDetection.
@@ -1253,7 +1483,7 @@ module Aws::Textract
1253
1483
  # @!attribute [rw] name
1254
1484
  # The file name of the input document. Synchronous operations can use
1255
1485
  # image files that are in JPEG or PNG format. Asynchronous operations
1256
- # also support PDF format files.
1486
+ # also support PDF and TIFF format files.
1257
1487
  # @return [String]
1258
1488
  #
1259
1489
  # @!attribute [rw] version
@@ -1472,6 +1702,100 @@ module Aws::Textract
1472
1702
  include Aws::Structure
1473
1703
  end
1474
1704
 
1705
+ # @note When making an API call, you may pass StartExpenseAnalysisRequest
1706
+ # data as a hash:
1707
+ #
1708
+ # {
1709
+ # document_location: { # required
1710
+ # s3_object: {
1711
+ # bucket: "S3Bucket",
1712
+ # name: "S3ObjectName",
1713
+ # version: "S3ObjectVersion",
1714
+ # },
1715
+ # },
1716
+ # client_request_token: "ClientRequestToken",
1717
+ # job_tag: "JobTag",
1718
+ # notification_channel: {
1719
+ # sns_topic_arn: "SNSTopicArn", # required
1720
+ # role_arn: "RoleArn", # required
1721
+ # },
1722
+ # output_config: {
1723
+ # s3_bucket: "S3Bucket", # required
1724
+ # s3_prefix: "S3ObjectName",
1725
+ # },
1726
+ # kms_key_id: "KMSKeyId",
1727
+ # }
1728
+ #
1729
+ # @!attribute [rw] document_location
1730
+ # The location of the document to be processed.
1731
+ # @return [Types::DocumentLocation]
1732
+ #
1733
+ # @!attribute [rw] client_request_token
1734
+ # The idempotent token that's used to identify the start request. If
1735
+ # you use the same token with multiple `StartDocumentTextDetection`
1736
+ # requests, the same `JobId` is returned. Use `ClientRequestToken` to
1737
+ # prevent the same job from being accidentally started more than once.
1738
+ # For more information, see [Calling Amazon Textract Asynchronous
1739
+ # Operations][1]
1740
+ #
1741
+ #
1742
+ #
1743
+ # [1]: https://docs.aws.amazon.com/textract/latest/dg/api-async.html
1744
+ # @return [String]
1745
+ #
1746
+ # @!attribute [rw] job_tag
1747
+ # An identifier you specify that's included in the completion
1748
+ # notification published to the Amazon SNS topic. For example, you can
1749
+ # use `JobTag` to identify the type of document that the completion
1750
+ # notification corresponds to (such as a tax form or a receipt).
1751
+ # @return [String]
1752
+ #
1753
+ # @!attribute [rw] notification_channel
1754
+ # The Amazon SNS topic ARN that you want Amazon Textract to publish
1755
+ # the completion status of the operation to.
1756
+ # @return [Types::NotificationChannel]
1757
+ #
1758
+ # @!attribute [rw] output_config
1759
+ # Sets if the output will go to a customer defined bucket. By default,
1760
+ # Amazon Textract will save the results internally to be accessed by
1761
+ # the `GetExpenseAnalysis` operation.
1762
+ # @return [Types::OutputConfig]
1763
+ #
1764
+ # @!attribute [rw] kms_key_id
1765
+ # The KMS key used to encrypt the inference results. This can be in
1766
+ # either Key ID or Key Alias format. When a KMS key is provided, the
1767
+ # KMS key will be used for server-side encryption of the objects in
1768
+ # the customer bucket. When this parameter is not enabled, the result
1769
+ # will be encrypted server side,using SSE-S3.
1770
+ # @return [String]
1771
+ #
1772
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/StartExpenseAnalysisRequest AWS API Documentation
1773
+ #
1774
+ class StartExpenseAnalysisRequest < Struct.new(
1775
+ :document_location,
1776
+ :client_request_token,
1777
+ :job_tag,
1778
+ :notification_channel,
1779
+ :output_config,
1780
+ :kms_key_id)
1781
+ SENSITIVE = []
1782
+ include Aws::Structure
1783
+ end
1784
+
1785
+ # @!attribute [rw] job_id
1786
+ # A unique identifier for the text detection job. The `JobId` is
1787
+ # returned from `StartExpenseAnalysis`. A `JobId` value is only valid
1788
+ # for 7 days.
1789
+ # @return [String]
1790
+ #
1791
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/StartExpenseAnalysisResponse AWS API Documentation
1792
+ #
1793
+ class StartExpenseAnalysisResponse < Struct.new(
1794
+ :job_id)
1795
+ SENSITIVE = []
1796
+ include Aws::Structure
1797
+ end
1798
+
1475
1799
  # Amazon Textract is temporarily unable to process the request. Try your
1476
1800
  # call again.
1477
1801
  #
@@ -1480,8 +1804,8 @@ module Aws::Textract
1480
1804
  class ThrottlingException < Aws::EmptyStructure; end
1481
1805
 
1482
1806
  # The format of the input document isn't supported. Documents for
1483
- # synchronous operations can be in PNG or JPEG format. Documents for
1484
- # asynchronous operations can also be in PDF format.
1807
+ # synchronous operations can be in PNG or JPEG format only. Documents
1808
+ # for asynchronous operations can be in PDF format.
1485
1809
  #
1486
1810
  # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/UnsupportedDocumentException AWS API Documentation
1487
1811
  #
@@ -48,6 +48,6 @@ require_relative 'aws-sdk-textract/customizations'
48
48
  # @!group service
49
49
  module Aws::Textract
50
50
 
51
- GEM_VERSION = '1.29.0'
51
+ GEM_VERSION = '1.33.0'
52
52
 
53
53
  end
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.29.0
4
+ version: 1.33.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: 2021-10-18 00:00:00.000000000 Z
11
+ date: 2021-11-30 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.121.2
22
+ version: 3.122.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.121.2
32
+ version: 3.122.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: aws-sigv4
35
35
  requirement: !ruby/object:Gem::Requirement