aws-sdk-textract 1.27.0 → 1.31.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d228ed1c571dcdd4b2407922fdc75c5db1b08b4c61c0b6afa10e5690ce784f96
4
- data.tar.gz: ef93e031bbb89d7687dff1bb4a4ecacb676dd46a5dec0d05301401a64fde6f61
3
+ metadata.gz: 146350b4bc9ecb2c715e74c84a0d9490a722b86435165d1b14fc56f470b60203
4
+ data.tar.gz: 3093e0a174b32d9bd8a1760dab6168a9e3ea2248bde39300af77efc62c530feb
5
5
  SHA512:
6
- metadata.gz: 5db64b2b0ff7e7cce32f97ba1eaac74e4315e6dfd2de9409b014c8c56ff8e0d06b42fe3f196118cd2cc30282c95a4b1e34b1641082c17ec672f29555af75a365
7
- data.tar.gz: 4166d960bbae179247296530ab832b02200bb900cc925a2195f32437480d33b88cc5df8fee933c6195b68e7c12b9e873b1d046e76b893646a941f80900a338aa
6
+ metadata.gz: 6117a6cb2d44f1102304221e6eb1a7401f8bd7191b45dc6a39fcfb3a54e84f04392bdf8fd95cfdcb387d36914ced0f432480cf09d541d1df567ff4a253056f6e
7
+ data.tar.gz: a81d1716f67ea9babf365c24f36cdac5fe2ec8e3ea0761f3721489181ac9874541f3d0aa238b96a2f71481e8fb870cd9425c109cfd40e3685e455c263c184521
data/CHANGELOG.md CHANGED
@@ -1,6 +1,26 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.31.0 (2021-11-04)
5
+ ------------------
6
+
7
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
8
+
9
+ 1.30.0 (2021-10-27)
10
+ ------------------
11
+
12
+ * Feature - This release adds support for asynchronously analyzing invoice and receipt documents through two new APIs: StartExpenseAnalysis and GetExpenseAnalysis
13
+
14
+ 1.29.0 (2021-10-18)
15
+ ------------------
16
+
17
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
18
+
19
+ 1.28.0 (2021-09-01)
20
+ ------------------
21
+
22
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
23
+
4
24
  1.27.0 (2021-07-30)
5
25
  ------------------
6
26
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.27.0
1
+ 1.31.0
@@ -285,6 +285,15 @@ module Aws::Textract
285
285
  # ** Please note ** When response stubbing is enabled, no HTTP
286
286
  # requests are made, and retries are disabled.
287
287
  #
288
+ # @option options [Boolean] :use_dualstack_endpoint
289
+ # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
290
+ # will be used if available.
291
+ #
292
+ # @option options [Boolean] :use_fips_endpoint
293
+ # When set to `true`, fips compatible endpoints will be used if available.
294
+ # When a `fips` region is used, the region is normalized and this config
295
+ # is set to `true`.
296
+ #
288
297
  # @option options [Boolean] :validate_params (true)
289
298
  # When `true`, request parameters are validated before
290
299
  # sending the request.
@@ -922,14 +931,148 @@ module Aws::Textract
922
931
  req.send_request(options)
923
932
  end
924
933
 
934
+ # Gets the results for an Amazon Textract asynchronous operation that
935
+ # analyzes invoices and receipts. Amazon Textract finds contact
936
+ # information, items purchased, and vendor name, from input invoices and
937
+ # receipts.
938
+ #
939
+ # You start asynchronous invoice/receipt analysis by calling
940
+ # StartExpenseAnalysis, which returns a job identifier (`JobId`). Upon
941
+ # completion of the invoice/receipt analysis, Amazon Textract publishes
942
+ # the completion status to the Amazon Simple Notification Service
943
+ # (Amazon SNS) topic. This topic must be registered in the initial call
944
+ # to `StartExpenseAnalysis`. To get the results of the invoice/receipt
945
+ # analysis operation, first ensure that the status value published to
946
+ # the Amazon SNS topic is `SUCCEEDED`. If so, call `GetExpenseAnalysis`,
947
+ # and pass the job identifier (`JobId`) from the initial call to
948
+ # `StartExpenseAnalysis`.
949
+ #
950
+ # Use the MaxResults parameter to limit the number of blocks that are
951
+ # returned. If there are more results than specified in `MaxResults`,
952
+ # the value of `NextToken` in the operation response contains a
953
+ # pagination token for getting the next set of results. To get the next
954
+ # page of results, call `GetExpenseAnalysis`, and populate the
955
+ # `NextToken` request parameter with the token value that's returned
956
+ # from the previous call to `GetExpenseAnalysis`.
957
+ #
958
+ # For more information, see [Analyzing Invoices and Receipts][1].
959
+ #
960
+ #
961
+ #
962
+ # [1]: https://docs.aws.amazon.com/textract/latest/dg/invoices-receipts.html
963
+ #
964
+ # @option params [required, String] :job_id
965
+ # A unique identifier for the text detection job. The `JobId` is
966
+ # returned from `StartExpenseAnalysis`. A `JobId` value is only valid
967
+ # for 7 days.
968
+ #
969
+ # @option params [Integer] :max_results
970
+ # The maximum number of results to return per paginated call. The
971
+ # largest value you can specify is 20. If you specify a value greater
972
+ # than 20, a maximum of 20 results is returned. The default value is 20.
973
+ #
974
+ # @option params [String] :next_token
975
+ # If the previous response was incomplete (because there are more blocks
976
+ # to retrieve), Amazon Textract returns a pagination token in the
977
+ # response. You can use this pagination token to retrieve the next set
978
+ # of blocks.
979
+ #
980
+ # @return [Types::GetExpenseAnalysisResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
981
+ #
982
+ # * {Types::GetExpenseAnalysisResponse#document_metadata #document_metadata} => Types::DocumentMetadata
983
+ # * {Types::GetExpenseAnalysisResponse#job_status #job_status} => String
984
+ # * {Types::GetExpenseAnalysisResponse#next_token #next_token} => String
985
+ # * {Types::GetExpenseAnalysisResponse#expense_documents #expense_documents} => Array<Types::ExpenseDocument>
986
+ # * {Types::GetExpenseAnalysisResponse#warnings #warnings} => Array<Types::Warning>
987
+ # * {Types::GetExpenseAnalysisResponse#status_message #status_message} => String
988
+ # * {Types::GetExpenseAnalysisResponse#analyze_expense_model_version #analyze_expense_model_version} => String
989
+ #
990
+ # @example Request syntax with placeholder values
991
+ #
992
+ # resp = client.get_expense_analysis({
993
+ # job_id: "JobId", # required
994
+ # max_results: 1,
995
+ # next_token: "PaginationToken",
996
+ # })
997
+ #
998
+ # @example Response structure
999
+ #
1000
+ # resp.document_metadata.pages #=> Integer
1001
+ # resp.job_status #=> String, one of "IN_PROGRESS", "SUCCEEDED", "FAILED", "PARTIAL_SUCCESS"
1002
+ # resp.next_token #=> String
1003
+ # resp.expense_documents #=> Array
1004
+ # resp.expense_documents[0].expense_index #=> Integer
1005
+ # resp.expense_documents[0].summary_fields #=> Array
1006
+ # resp.expense_documents[0].summary_fields[0].type.text #=> String
1007
+ # resp.expense_documents[0].summary_fields[0].type.confidence #=> Float
1008
+ # resp.expense_documents[0].summary_fields[0].label_detection.text #=> String
1009
+ # resp.expense_documents[0].summary_fields[0].label_detection.geometry.bounding_box.width #=> Float
1010
+ # resp.expense_documents[0].summary_fields[0].label_detection.geometry.bounding_box.height #=> Float
1011
+ # resp.expense_documents[0].summary_fields[0].label_detection.geometry.bounding_box.left #=> Float
1012
+ # resp.expense_documents[0].summary_fields[0].label_detection.geometry.bounding_box.top #=> Float
1013
+ # resp.expense_documents[0].summary_fields[0].label_detection.geometry.polygon #=> Array
1014
+ # resp.expense_documents[0].summary_fields[0].label_detection.geometry.polygon[0].x #=> Float
1015
+ # resp.expense_documents[0].summary_fields[0].label_detection.geometry.polygon[0].y #=> Float
1016
+ # resp.expense_documents[0].summary_fields[0].label_detection.confidence #=> Float
1017
+ # resp.expense_documents[0].summary_fields[0].value_detection.text #=> String
1018
+ # resp.expense_documents[0].summary_fields[0].value_detection.geometry.bounding_box.width #=> Float
1019
+ # resp.expense_documents[0].summary_fields[0].value_detection.geometry.bounding_box.height #=> Float
1020
+ # resp.expense_documents[0].summary_fields[0].value_detection.geometry.bounding_box.left #=> Float
1021
+ # resp.expense_documents[0].summary_fields[0].value_detection.geometry.bounding_box.top #=> Float
1022
+ # resp.expense_documents[0].summary_fields[0].value_detection.geometry.polygon #=> Array
1023
+ # resp.expense_documents[0].summary_fields[0].value_detection.geometry.polygon[0].x #=> Float
1024
+ # resp.expense_documents[0].summary_fields[0].value_detection.geometry.polygon[0].y #=> Float
1025
+ # resp.expense_documents[0].summary_fields[0].value_detection.confidence #=> Float
1026
+ # resp.expense_documents[0].summary_fields[0].page_number #=> Integer
1027
+ # resp.expense_documents[0].line_item_groups #=> Array
1028
+ # resp.expense_documents[0].line_item_groups[0].line_item_group_index #=> Integer
1029
+ # resp.expense_documents[0].line_item_groups[0].line_items #=> Array
1030
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields #=> Array
1031
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].type.text #=> String
1032
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].type.confidence #=> Float
1033
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.text #=> String
1034
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.geometry.bounding_box.width #=> Float
1035
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.geometry.bounding_box.height #=> Float
1036
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.geometry.bounding_box.left #=> Float
1037
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.geometry.bounding_box.top #=> Float
1038
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.geometry.polygon #=> Array
1039
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.geometry.polygon[0].x #=> Float
1040
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.geometry.polygon[0].y #=> Float
1041
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.confidence #=> Float
1042
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.text #=> String
1043
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.bounding_box.width #=> Float
1044
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.bounding_box.height #=> Float
1045
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.bounding_box.left #=> Float
1046
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.bounding_box.top #=> Float
1047
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.polygon #=> Array
1048
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.polygon[0].x #=> Float
1049
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.polygon[0].y #=> Float
1050
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.confidence #=> Float
1051
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].page_number #=> Integer
1052
+ # resp.warnings #=> Array
1053
+ # resp.warnings[0].error_code #=> String
1054
+ # resp.warnings[0].pages #=> Array
1055
+ # resp.warnings[0].pages[0] #=> Integer
1056
+ # resp.status_message #=> String
1057
+ # resp.analyze_expense_model_version #=> String
1058
+ #
1059
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/GetExpenseAnalysis AWS API Documentation
1060
+ #
1061
+ # @overload get_expense_analysis(params = {})
1062
+ # @param [Hash] params ({})
1063
+ def get_expense_analysis(params = {}, options = {})
1064
+ req = build_request(:get_expense_analysis, params)
1065
+ req.send_request(options)
1066
+ end
1067
+
925
1068
  # Starts the asynchronous analysis of an input document for
926
1069
  # relationships between detected items such as key-value pairs, tables,
927
1070
  # and selection elements.
928
1071
  #
929
1072
  # `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.
1073
+ # JPEG, PNG, TIFF, and PDF format. The documents are stored in an Amazon
1074
+ # S3 bucket. Use DocumentLocation to specify the bucket name and file
1075
+ # name of the document.
933
1076
  #
934
1077
  # `StartDocumentAnalysis` returns a job identifier (`JobId`) that you
935
1078
  # use to get the results of the operation. When text analysis is
@@ -1037,9 +1180,9 @@ module Aws::Textract
1037
1180
  # text.
1038
1181
  #
1039
1182
  # `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.
1183
+ # JPEG, PNG, TIFF, and PDF format. The documents are stored in an Amazon
1184
+ # S3 bucket. Use DocumentLocation to specify the bucket name and file
1185
+ # name of the document.
1043
1186
  #
1044
1187
  # `StartTextDetection` returns a job identifier (`JobId`) that you use
1045
1188
  # to get the results of the operation. When text detection is finished,
@@ -1134,6 +1277,108 @@ module Aws::Textract
1134
1277
  req.send_request(options)
1135
1278
  end
1136
1279
 
1280
+ # Starts the asynchronous analysis of invoices or receipts for data like
1281
+ # contact information, items purchased, and vendor names.
1282
+ #
1283
+ # `StartExpenseAnalysis` can analyze text in documents that are in JPEG,
1284
+ # PNG, and PDF format. The documents must be stored in an Amazon S3
1285
+ # bucket. Use the DocumentLocation parameter to specify the name of your
1286
+ # S3 bucket and the name of the document in that bucket.
1287
+ #
1288
+ # `StartExpenseAnalysis` returns a job identifier (`JobId`) that you
1289
+ # will provide to `GetExpenseAnalysis` to retrieve the results of the
1290
+ # operation. When the analysis of the input invoices/receipts is
1291
+ # finished, Amazon Textract publishes a completion status to the Amazon
1292
+ # Simple Notification Service (Amazon SNS) topic that you provide to the
1293
+ # `NotificationChannel`. To obtain the results of the invoice and
1294
+ # receipt analysis operation, ensure that the status value published to
1295
+ # the Amazon SNS topic is `SUCCEEDED`. If so, call GetExpenseAnalysis,
1296
+ # and pass the job identifier (`JobId`) that was returned by your call
1297
+ # to `StartExpenseAnalysis`.
1298
+ #
1299
+ # For more information, see [Analyzing Invoices and Receipts][1].
1300
+ #
1301
+ #
1302
+ #
1303
+ # [1]: https://docs.aws.amazon.com/textract/latest/dg/invoice-receipts.html
1304
+ #
1305
+ # @option params [required, Types::DocumentLocation] :document_location
1306
+ # The location of the document to be processed.
1307
+ #
1308
+ # @option params [String] :client_request_token
1309
+ # The idempotent token that's used to identify the start request. If
1310
+ # you use the same token with multiple `StartDocumentTextDetection`
1311
+ # requests, the same `JobId` is returned. Use `ClientRequestToken` to
1312
+ # prevent the same job from being accidentally started more than once.
1313
+ # For more information, see [Calling Amazon Textract Asynchronous
1314
+ # Operations][1]
1315
+ #
1316
+ #
1317
+ #
1318
+ # [1]: https://docs.aws.amazon.com/textract/latest/dg/api-async.html
1319
+ #
1320
+ # @option params [String] :job_tag
1321
+ # An identifier you specify that's included in the completion
1322
+ # notification published to the Amazon SNS topic. For example, you can
1323
+ # use `JobTag` to identify the type of document that the completion
1324
+ # notification corresponds to (such as a tax form or a receipt).
1325
+ #
1326
+ # @option params [Types::NotificationChannel] :notification_channel
1327
+ # The Amazon SNS topic ARN that you want Amazon Textract to publish the
1328
+ # completion status of the operation to.
1329
+ #
1330
+ # @option params [Types::OutputConfig] :output_config
1331
+ # Sets if the output will go to a customer defined bucket. By default,
1332
+ # Amazon Textract will save the results internally to be accessed by the
1333
+ # `GetExpenseAnalysis` operation.
1334
+ #
1335
+ # @option params [String] :kms_key_id
1336
+ # The KMS key used to encrypt the inference results. This can be in
1337
+ # either Key ID or Key Alias format. When a KMS key is provided, the KMS
1338
+ # key will be used for server-side encryption of the objects in the
1339
+ # customer bucket. When this parameter is not enabled, the result will
1340
+ # be encrypted server side,using SSE-S3.
1341
+ #
1342
+ # @return [Types::StartExpenseAnalysisResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1343
+ #
1344
+ # * {Types::StartExpenseAnalysisResponse#job_id #job_id} => String
1345
+ #
1346
+ # @example Request syntax with placeholder values
1347
+ #
1348
+ # resp = client.start_expense_analysis({
1349
+ # document_location: { # required
1350
+ # s3_object: {
1351
+ # bucket: "S3Bucket",
1352
+ # name: "S3ObjectName",
1353
+ # version: "S3ObjectVersion",
1354
+ # },
1355
+ # },
1356
+ # client_request_token: "ClientRequestToken",
1357
+ # job_tag: "JobTag",
1358
+ # notification_channel: {
1359
+ # sns_topic_arn: "SNSTopicArn", # required
1360
+ # role_arn: "RoleArn", # required
1361
+ # },
1362
+ # output_config: {
1363
+ # s3_bucket: "S3Bucket", # required
1364
+ # s3_prefix: "S3ObjectName",
1365
+ # },
1366
+ # kms_key_id: "KMSKeyId",
1367
+ # })
1368
+ #
1369
+ # @example Response structure
1370
+ #
1371
+ # resp.job_id #=> String
1372
+ #
1373
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/StartExpenseAnalysis AWS API Documentation
1374
+ #
1375
+ # @overload start_expense_analysis(params = {})
1376
+ # @param [Hash] params ({})
1377
+ def start_expense_analysis(params = {}, options = {})
1378
+ req = build_request(:start_expense_analysis, params)
1379
+ req.send_request(options)
1380
+ end
1381
+
1137
1382
  # @!endgroup
1138
1383
 
1139
1384
  # @param params ({})
@@ -1147,7 +1392,7 @@ module Aws::Textract
1147
1392
  params: params,
1148
1393
  config: config)
1149
1394
  context[:gem_name] = 'aws-sdk-textract'
1150
- context[:gem_version] = '1.27.0'
1395
+ context[:gem_version] = '1.31.0'
1151
1396
  Seahorse::Client::Request.new(handlers, context)
1152
1397
  end
1153
1398
 
@@ -50,6 +50,8 @@ module Aws::Textract
50
50
  GetDocumentAnalysisResponse = Shapes::StructureShape.new(name: 'GetDocumentAnalysisResponse')
51
51
  GetDocumentTextDetectionRequest = Shapes::StructureShape.new(name: 'GetDocumentTextDetectionRequest')
52
52
  GetDocumentTextDetectionResponse = Shapes::StructureShape.new(name: 'GetDocumentTextDetectionResponse')
53
+ GetExpenseAnalysisRequest = Shapes::StructureShape.new(name: 'GetExpenseAnalysisRequest')
54
+ GetExpenseAnalysisResponse = Shapes::StructureShape.new(name: 'GetExpenseAnalysisResponse')
53
55
  HumanLoopActivationConditionsEvaluationResults = Shapes::StringShape.new(name: 'HumanLoopActivationConditionsEvaluationResults')
54
56
  HumanLoopActivationOutput = Shapes::StructureShape.new(name: 'HumanLoopActivationOutput')
55
57
  HumanLoopActivationReason = Shapes::StringShape.new(name: 'HumanLoopActivationReason')
@@ -100,6 +102,8 @@ module Aws::Textract
100
102
  StartDocumentAnalysisResponse = Shapes::StructureShape.new(name: 'StartDocumentAnalysisResponse')
101
103
  StartDocumentTextDetectionRequest = Shapes::StructureShape.new(name: 'StartDocumentTextDetectionRequest')
102
104
  StartDocumentTextDetectionResponse = Shapes::StructureShape.new(name: 'StartDocumentTextDetectionResponse')
105
+ StartExpenseAnalysisRequest = Shapes::StructureShape.new(name: 'StartExpenseAnalysisRequest')
106
+ StartExpenseAnalysisResponse = Shapes::StructureShape.new(name: 'StartExpenseAnalysisResponse')
103
107
  StatusMessage = Shapes::StringShape.new(name: 'StatusMessage')
104
108
  String = Shapes::StringShape.new(name: 'String')
105
109
  TextType = Shapes::StringShape.new(name: 'TextType')
@@ -237,6 +241,20 @@ module Aws::Textract
237
241
  GetDocumentTextDetectionResponse.add_member(:detect_document_text_model_version, Shapes::ShapeRef.new(shape: String, location_name: "DetectDocumentTextModelVersion"))
238
242
  GetDocumentTextDetectionResponse.struct_class = Types::GetDocumentTextDetectionResponse
239
243
 
244
+ GetExpenseAnalysisRequest.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, required: true, location_name: "JobId"))
245
+ GetExpenseAnalysisRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResults, location_name: "MaxResults"))
246
+ GetExpenseAnalysisRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: PaginationToken, location_name: "NextToken"))
247
+ GetExpenseAnalysisRequest.struct_class = Types::GetExpenseAnalysisRequest
248
+
249
+ GetExpenseAnalysisResponse.add_member(:document_metadata, Shapes::ShapeRef.new(shape: DocumentMetadata, location_name: "DocumentMetadata"))
250
+ GetExpenseAnalysisResponse.add_member(:job_status, Shapes::ShapeRef.new(shape: JobStatus, location_name: "JobStatus"))
251
+ GetExpenseAnalysisResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: PaginationToken, location_name: "NextToken"))
252
+ GetExpenseAnalysisResponse.add_member(:expense_documents, Shapes::ShapeRef.new(shape: ExpenseDocumentList, location_name: "ExpenseDocuments"))
253
+ GetExpenseAnalysisResponse.add_member(:warnings, Shapes::ShapeRef.new(shape: Warnings, location_name: "Warnings"))
254
+ GetExpenseAnalysisResponse.add_member(:status_message, Shapes::ShapeRef.new(shape: StatusMessage, location_name: "StatusMessage"))
255
+ GetExpenseAnalysisResponse.add_member(:analyze_expense_model_version, Shapes::ShapeRef.new(shape: String, location_name: "AnalyzeExpenseModelVersion"))
256
+ GetExpenseAnalysisResponse.struct_class = Types::GetExpenseAnalysisResponse
257
+
240
258
  HumanLoopActivationOutput.add_member(:human_loop_arn, Shapes::ShapeRef.new(shape: HumanLoopArn, location_name: "HumanLoopArn"))
241
259
  HumanLoopActivationOutput.add_member(:human_loop_activation_reasons, Shapes::ShapeRef.new(shape: HumanLoopActivationReasons, location_name: "HumanLoopActivationReasons"))
242
260
  HumanLoopActivationOutput.add_member(:human_loop_activation_conditions_evaluation_results, Shapes::ShapeRef.new(shape: HumanLoopActivationConditionsEvaluationResults, location_name: "HumanLoopActivationConditionsEvaluationResults", metadata: {"jsonvalue"=>true}))
@@ -336,6 +354,17 @@ module Aws::Textract
336
354
  StartDocumentTextDetectionResponse.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, location_name: "JobId"))
337
355
  StartDocumentTextDetectionResponse.struct_class = Types::StartDocumentTextDetectionResponse
338
356
 
357
+ StartExpenseAnalysisRequest.add_member(:document_location, Shapes::ShapeRef.new(shape: DocumentLocation, required: true, location_name: "DocumentLocation"))
358
+ StartExpenseAnalysisRequest.add_member(:client_request_token, Shapes::ShapeRef.new(shape: ClientRequestToken, location_name: "ClientRequestToken"))
359
+ StartExpenseAnalysisRequest.add_member(:job_tag, Shapes::ShapeRef.new(shape: JobTag, location_name: "JobTag"))
360
+ StartExpenseAnalysisRequest.add_member(:notification_channel, Shapes::ShapeRef.new(shape: NotificationChannel, location_name: "NotificationChannel"))
361
+ StartExpenseAnalysisRequest.add_member(:output_config, Shapes::ShapeRef.new(shape: OutputConfig, location_name: "OutputConfig"))
362
+ StartExpenseAnalysisRequest.add_member(:kms_key_id, Shapes::ShapeRef.new(shape: KMSKeyId, location_name: "KMSKeyId"))
363
+ StartExpenseAnalysisRequest.struct_class = Types::StartExpenseAnalysisRequest
364
+
365
+ StartExpenseAnalysisResponse.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, location_name: "JobId"))
366
+ StartExpenseAnalysisResponse.struct_class = Types::StartExpenseAnalysisResponse
367
+
339
368
  ThrottlingException.struct_class = Types::ThrottlingException
340
369
 
341
370
  UnsupportedDocumentException.struct_class = Types::UnsupportedDocumentException
@@ -448,6 +477,22 @@ module Aws::Textract
448
477
  o.errors << Shapes::ShapeRef.new(shape: InvalidKMSKeyException)
449
478
  end)
450
479
 
480
+ api.add_operation(:get_expense_analysis, Seahorse::Model::Operation.new.tap do |o|
481
+ o.name = "GetExpenseAnalysis"
482
+ o.http_method = "POST"
483
+ o.http_request_uri = "/"
484
+ o.input = Shapes::ShapeRef.new(shape: GetExpenseAnalysisRequest)
485
+ o.output = Shapes::ShapeRef.new(shape: GetExpenseAnalysisResponse)
486
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
487
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
488
+ o.errors << Shapes::ShapeRef.new(shape: ProvisionedThroughputExceededException)
489
+ o.errors << Shapes::ShapeRef.new(shape: InvalidJobIdException)
490
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
491
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
492
+ o.errors << Shapes::ShapeRef.new(shape: InvalidS3ObjectException)
493
+ o.errors << Shapes::ShapeRef.new(shape: InvalidKMSKeyException)
494
+ end)
495
+
451
496
  api.add_operation(:start_document_analysis, Seahorse::Model::Operation.new.tap do |o|
452
497
  o.name = "StartDocumentAnalysis"
453
498
  o.http_method = "POST"
@@ -487,6 +532,26 @@ module Aws::Textract
487
532
  o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
488
533
  o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
489
534
  end)
535
+
536
+ api.add_operation(:start_expense_analysis, Seahorse::Model::Operation.new.tap do |o|
537
+ o.name = "StartExpenseAnalysis"
538
+ o.http_method = "POST"
539
+ o.http_request_uri = "/"
540
+ o.input = Shapes::ShapeRef.new(shape: StartExpenseAnalysisRequest)
541
+ o.output = Shapes::ShapeRef.new(shape: StartExpenseAnalysisResponse)
542
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
543
+ o.errors << Shapes::ShapeRef.new(shape: InvalidS3ObjectException)
544
+ o.errors << Shapes::ShapeRef.new(shape: InvalidKMSKeyException)
545
+ o.errors << Shapes::ShapeRef.new(shape: UnsupportedDocumentException)
546
+ o.errors << Shapes::ShapeRef.new(shape: DocumentTooLargeException)
547
+ o.errors << Shapes::ShapeRef.new(shape: BadDocumentException)
548
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
549
+ o.errors << Shapes::ShapeRef.new(shape: ProvisionedThroughputExceededException)
550
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
551
+ o.errors << Shapes::ShapeRef.new(shape: IdempotentParameterMismatchException)
552
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
553
+ o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
554
+ end)
490
555
  end
491
556
 
492
557
  end
@@ -322,11 +322,12 @@ module Aws::Textract
322
322
  # @!attribute [rw] page
323
323
  # The page on which a block was detected. `Page` is returned by
324
324
  # 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.
325
+ # returned for multipage documents that are in PDF or TIFF format. A
326
+ # scanned image (JPEG/PNG), even if it contains multiple document
327
+ # pages, is considered to be a single-page document. The value of
328
+ # `Page` is always 1. Synchronous operations don't return `Page`
329
+ # because every input document is considered to be a single-page
330
+ # document.
330
331
  # @return [Integer]
331
332
  #
332
333
  # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/Block AWS API Documentation
@@ -864,6 +865,93 @@ module Aws::Textract
864
865
  include Aws::Structure
865
866
  end
866
867
 
868
+ # @note When making an API call, you may pass GetExpenseAnalysisRequest
869
+ # data as a hash:
870
+ #
871
+ # {
872
+ # job_id: "JobId", # required
873
+ # max_results: 1,
874
+ # next_token: "PaginationToken",
875
+ # }
876
+ #
877
+ # @!attribute [rw] job_id
878
+ # A unique identifier for the text detection job. The `JobId` is
879
+ # returned from `StartExpenseAnalysis`. A `JobId` value is only valid
880
+ # for 7 days.
881
+ # @return [String]
882
+ #
883
+ # @!attribute [rw] max_results
884
+ # The maximum number of results to return per paginated call. The
885
+ # largest value you can specify is 20. If you specify a value greater
886
+ # than 20, a maximum of 20 results is returned. The default value is
887
+ # 20.
888
+ # @return [Integer]
889
+ #
890
+ # @!attribute [rw] next_token
891
+ # If the previous response was incomplete (because there are more
892
+ # blocks to retrieve), Amazon Textract returns a pagination token in
893
+ # the response. You can use this pagination token to retrieve the next
894
+ # set of blocks.
895
+ # @return [String]
896
+ #
897
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/GetExpenseAnalysisRequest AWS API Documentation
898
+ #
899
+ class GetExpenseAnalysisRequest < Struct.new(
900
+ :job_id,
901
+ :max_results,
902
+ :next_token)
903
+ SENSITIVE = []
904
+ include Aws::Structure
905
+ end
906
+
907
+ # @!attribute [rw] document_metadata
908
+ # Information about a document that Amazon Textract processed.
909
+ # `DocumentMetadata` is returned in every page of paginated responses
910
+ # from an Amazon Textract operation.
911
+ # @return [Types::DocumentMetadata]
912
+ #
913
+ # @!attribute [rw] job_status
914
+ # The current status of the text detection job.
915
+ # @return [String]
916
+ #
917
+ # @!attribute [rw] next_token
918
+ # If the response is truncated, Amazon Textract returns this token.
919
+ # You can use this token in the subsequent request to retrieve the
920
+ # next set of text-detection results.
921
+ # @return [String]
922
+ #
923
+ # @!attribute [rw] expense_documents
924
+ # The expenses detected by Amazon Textract.
925
+ # @return [Array<Types::ExpenseDocument>]
926
+ #
927
+ # @!attribute [rw] warnings
928
+ # A list of warnings that occurred during the text-detection operation
929
+ # for the document.
930
+ # @return [Array<Types::Warning>]
931
+ #
932
+ # @!attribute [rw] status_message
933
+ # Returns if the detection job could not be completed. Contains
934
+ # explanation for what error occured.
935
+ # @return [String]
936
+ #
937
+ # @!attribute [rw] analyze_expense_model_version
938
+ # The current model version of AnalyzeExpense.
939
+ # @return [String]
940
+ #
941
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/GetExpenseAnalysisResponse AWS API Documentation
942
+ #
943
+ class GetExpenseAnalysisResponse < Struct.new(
944
+ :document_metadata,
945
+ :job_status,
946
+ :next_token,
947
+ :expense_documents,
948
+ :warnings,
949
+ :status_message,
950
+ :analyze_expense_model_version)
951
+ SENSITIVE = []
952
+ include Aws::Structure
953
+ end
954
+
867
955
  # Shows the results of the human in the loop evaluation. If there is no
868
956
  # HumanLoopArn, the input did not trigger human review.
869
957
  #
@@ -1253,7 +1341,7 @@ module Aws::Textract
1253
1341
  # @!attribute [rw] name
1254
1342
  # The file name of the input document. Synchronous operations can use
1255
1343
  # image files that are in JPEG or PNG format. Asynchronous operations
1256
- # also support PDF format files.
1344
+ # also support PDF and TIFF format files.
1257
1345
  # @return [String]
1258
1346
  #
1259
1347
  # @!attribute [rw] version
@@ -1472,6 +1560,100 @@ module Aws::Textract
1472
1560
  include Aws::Structure
1473
1561
  end
1474
1562
 
1563
+ # @note When making an API call, you may pass StartExpenseAnalysisRequest
1564
+ # data as a hash:
1565
+ #
1566
+ # {
1567
+ # document_location: { # required
1568
+ # s3_object: {
1569
+ # bucket: "S3Bucket",
1570
+ # name: "S3ObjectName",
1571
+ # version: "S3ObjectVersion",
1572
+ # },
1573
+ # },
1574
+ # client_request_token: "ClientRequestToken",
1575
+ # job_tag: "JobTag",
1576
+ # notification_channel: {
1577
+ # sns_topic_arn: "SNSTopicArn", # required
1578
+ # role_arn: "RoleArn", # required
1579
+ # },
1580
+ # output_config: {
1581
+ # s3_bucket: "S3Bucket", # required
1582
+ # s3_prefix: "S3ObjectName",
1583
+ # },
1584
+ # kms_key_id: "KMSKeyId",
1585
+ # }
1586
+ #
1587
+ # @!attribute [rw] document_location
1588
+ # The location of the document to be processed.
1589
+ # @return [Types::DocumentLocation]
1590
+ #
1591
+ # @!attribute [rw] client_request_token
1592
+ # The idempotent token that's used to identify the start request. If
1593
+ # you use the same token with multiple `StartDocumentTextDetection`
1594
+ # requests, the same `JobId` is returned. Use `ClientRequestToken` to
1595
+ # prevent the same job from being accidentally started more than once.
1596
+ # For more information, see [Calling Amazon Textract Asynchronous
1597
+ # Operations][1]
1598
+ #
1599
+ #
1600
+ #
1601
+ # [1]: https://docs.aws.amazon.com/textract/latest/dg/api-async.html
1602
+ # @return [String]
1603
+ #
1604
+ # @!attribute [rw] job_tag
1605
+ # An identifier you specify that's included in the completion
1606
+ # notification published to the Amazon SNS topic. For example, you can
1607
+ # use `JobTag` to identify the type of document that the completion
1608
+ # notification corresponds to (such as a tax form or a receipt).
1609
+ # @return [String]
1610
+ #
1611
+ # @!attribute [rw] notification_channel
1612
+ # The Amazon SNS topic ARN that you want Amazon Textract to publish
1613
+ # the completion status of the operation to.
1614
+ # @return [Types::NotificationChannel]
1615
+ #
1616
+ # @!attribute [rw] output_config
1617
+ # Sets if the output will go to a customer defined bucket. By default,
1618
+ # Amazon Textract will save the results internally to be accessed by
1619
+ # the `GetExpenseAnalysis` operation.
1620
+ # @return [Types::OutputConfig]
1621
+ #
1622
+ # @!attribute [rw] kms_key_id
1623
+ # The KMS key used to encrypt the inference results. This can be in
1624
+ # either Key ID or Key Alias format. When a KMS key is provided, the
1625
+ # KMS key will be used for server-side encryption of the objects in
1626
+ # the customer bucket. When this parameter is not enabled, the result
1627
+ # will be encrypted server side,using SSE-S3.
1628
+ # @return [String]
1629
+ #
1630
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/StartExpenseAnalysisRequest AWS API Documentation
1631
+ #
1632
+ class StartExpenseAnalysisRequest < Struct.new(
1633
+ :document_location,
1634
+ :client_request_token,
1635
+ :job_tag,
1636
+ :notification_channel,
1637
+ :output_config,
1638
+ :kms_key_id)
1639
+ SENSITIVE = []
1640
+ include Aws::Structure
1641
+ end
1642
+
1643
+ # @!attribute [rw] job_id
1644
+ # A unique identifier for the text detection job. The `JobId` is
1645
+ # returned from `StartExpenseAnalysis`. A `JobId` value is only valid
1646
+ # for 7 days.
1647
+ # @return [String]
1648
+ #
1649
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/StartExpenseAnalysisResponse AWS API Documentation
1650
+ #
1651
+ class StartExpenseAnalysisResponse < Struct.new(
1652
+ :job_id)
1653
+ SENSITIVE = []
1654
+ include Aws::Structure
1655
+ end
1656
+
1475
1657
  # Amazon Textract is temporarily unable to process the request. Try your
1476
1658
  # call again.
1477
1659
  #
@@ -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.27.0'
51
+ GEM_VERSION = '1.31.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.27.0
4
+ version: 1.31.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-07-30 00:00:00.000000000 Z
11
+ date: 2021-11-04 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.119.0
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.119.0
32
+ version: 3.122.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: aws-sigv4
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -76,7 +76,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
76
76
  requirements:
77
77
  - - ">="
78
78
  - !ruby/object:Gem::Version
79
- version: '0'
79
+ version: '2.3'
80
80
  required_rubygems_version: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - ">="