aws-sdk-textract 1.29.0 → 1.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-textract/client.rb +243 -7
- data/lib/aws-sdk-textract/client_api.rb +65 -0
- data/lib/aws-sdk-textract/types.rb +188 -6
- data/lib/aws-sdk-textract.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d0b690ceb075951b6884a12dbc959fc4a2afc3e3b0c8b15fc7963e05ade796b
|
4
|
+
data.tar.gz: 40c09ec33575d5a86cd59b5e09b1b52030dc9e5eafc92dcd90e29b40056f05fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92c046737672802cee1e2dcccc6e80d6180cea52c238eebe05d739fda4b5e2328e630ab8c4f0591d1e2aa6ad6c659f1fca7a7242f12e17bb852bbd774fe600e2
|
7
|
+
data.tar.gz: 7a869aae95ad4de28aab94f48ada58412d8d1ea0e60c05b346c2ead09f38dec11106adb72a86f1bf2b1d5aedc2cf04a36479442fc4def931e3df3de010e982d9
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.30.0 (2021-10-27)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - This release adds support for asynchronously analyzing invoice and receipt documents through two new APIs: StartExpenseAnalysis and GetExpenseAnalysis
|
8
|
+
|
4
9
|
1.29.0 (2021-10-18)
|
5
10
|
------------------
|
6
11
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.30.0
|
@@ -922,14 +922,148 @@ module Aws::Textract
|
|
922
922
|
req.send_request(options)
|
923
923
|
end
|
924
924
|
|
925
|
+
# Gets the results for an Amazon Textract asynchronous operation that
|
926
|
+
# analyzes invoices and receipts. Amazon Textract finds contact
|
927
|
+
# information, items purchased, and vendor name, from input invoices and
|
928
|
+
# receipts.
|
929
|
+
#
|
930
|
+
# You start asynchronous invoice/receipt analysis by calling
|
931
|
+
# StartExpenseAnalysis, which returns a job identifier (`JobId`). Upon
|
932
|
+
# completion of the invoice/receipt analysis, Amazon Textract publishes
|
933
|
+
# the completion status to the Amazon Simple Notification Service
|
934
|
+
# (Amazon SNS) topic. This topic must be registered in the initial call
|
935
|
+
# to `StartExpenseAnalysis`. To get the results of the invoice/receipt
|
936
|
+
# analysis operation, first ensure that the status value published to
|
937
|
+
# the Amazon SNS topic is `SUCCEEDED`. If so, call `GetExpenseAnalysis`,
|
938
|
+
# and pass the job identifier (`JobId`) from the initial call to
|
939
|
+
# `StartExpenseAnalysis`.
|
940
|
+
#
|
941
|
+
# Use the MaxResults parameter to limit the number of blocks that are
|
942
|
+
# returned. If there are more results than specified in `MaxResults`,
|
943
|
+
# the value of `NextToken` in the operation response contains a
|
944
|
+
# pagination token for getting the next set of results. To get the next
|
945
|
+
# page of results, call `GetExpenseAnalysis`, and populate the
|
946
|
+
# `NextToken` request parameter with the token value that's returned
|
947
|
+
# from the previous call to `GetExpenseAnalysis`.
|
948
|
+
#
|
949
|
+
# For more information, see [Analyzing Invoices and Receipts][1].
|
950
|
+
#
|
951
|
+
#
|
952
|
+
#
|
953
|
+
# [1]: https://docs.aws.amazon.com/textract/latest/dg/invoices-receipts.html
|
954
|
+
#
|
955
|
+
# @option params [required, String] :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
|
+
#
|
960
|
+
# @option params [Integer] :max_results
|
961
|
+
# The maximum number of results to return per paginated call. The
|
962
|
+
# largest value you can specify is 20. If you specify a value greater
|
963
|
+
# than 20, a maximum of 20 results is returned. The default value is 20.
|
964
|
+
#
|
965
|
+
# @option params [String] :next_token
|
966
|
+
# If the previous response was incomplete (because there are more blocks
|
967
|
+
# to retrieve), Amazon Textract returns a pagination token in the
|
968
|
+
# response. You can use this pagination token to retrieve the next set
|
969
|
+
# of blocks.
|
970
|
+
#
|
971
|
+
# @return [Types::GetExpenseAnalysisResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
972
|
+
#
|
973
|
+
# * {Types::GetExpenseAnalysisResponse#document_metadata #document_metadata} => Types::DocumentMetadata
|
974
|
+
# * {Types::GetExpenseAnalysisResponse#job_status #job_status} => String
|
975
|
+
# * {Types::GetExpenseAnalysisResponse#next_token #next_token} => String
|
976
|
+
# * {Types::GetExpenseAnalysisResponse#expense_documents #expense_documents} => Array<Types::ExpenseDocument>
|
977
|
+
# * {Types::GetExpenseAnalysisResponse#warnings #warnings} => Array<Types::Warning>
|
978
|
+
# * {Types::GetExpenseAnalysisResponse#status_message #status_message} => String
|
979
|
+
# * {Types::GetExpenseAnalysisResponse#analyze_expense_model_version #analyze_expense_model_version} => String
|
980
|
+
#
|
981
|
+
# @example Request syntax with placeholder values
|
982
|
+
#
|
983
|
+
# resp = client.get_expense_analysis({
|
984
|
+
# job_id: "JobId", # required
|
985
|
+
# max_results: 1,
|
986
|
+
# next_token: "PaginationToken",
|
987
|
+
# })
|
988
|
+
#
|
989
|
+
# @example Response structure
|
990
|
+
#
|
991
|
+
# resp.document_metadata.pages #=> Integer
|
992
|
+
# resp.job_status #=> String, one of "IN_PROGRESS", "SUCCEEDED", "FAILED", "PARTIAL_SUCCESS"
|
993
|
+
# resp.next_token #=> String
|
994
|
+
# resp.expense_documents #=> Array
|
995
|
+
# resp.expense_documents[0].expense_index #=> Integer
|
996
|
+
# resp.expense_documents[0].summary_fields #=> Array
|
997
|
+
# resp.expense_documents[0].summary_fields[0].type.text #=> String
|
998
|
+
# resp.expense_documents[0].summary_fields[0].type.confidence #=> Float
|
999
|
+
# resp.expense_documents[0].summary_fields[0].label_detection.text #=> String
|
1000
|
+
# resp.expense_documents[0].summary_fields[0].label_detection.geometry.bounding_box.width #=> Float
|
1001
|
+
# resp.expense_documents[0].summary_fields[0].label_detection.geometry.bounding_box.height #=> Float
|
1002
|
+
# resp.expense_documents[0].summary_fields[0].label_detection.geometry.bounding_box.left #=> Float
|
1003
|
+
# resp.expense_documents[0].summary_fields[0].label_detection.geometry.bounding_box.top #=> Float
|
1004
|
+
# resp.expense_documents[0].summary_fields[0].label_detection.geometry.polygon #=> Array
|
1005
|
+
# resp.expense_documents[0].summary_fields[0].label_detection.geometry.polygon[0].x #=> Float
|
1006
|
+
# resp.expense_documents[0].summary_fields[0].label_detection.geometry.polygon[0].y #=> Float
|
1007
|
+
# resp.expense_documents[0].summary_fields[0].label_detection.confidence #=> Float
|
1008
|
+
# resp.expense_documents[0].summary_fields[0].value_detection.text #=> String
|
1009
|
+
# resp.expense_documents[0].summary_fields[0].value_detection.geometry.bounding_box.width #=> Float
|
1010
|
+
# resp.expense_documents[0].summary_fields[0].value_detection.geometry.bounding_box.height #=> Float
|
1011
|
+
# resp.expense_documents[0].summary_fields[0].value_detection.geometry.bounding_box.left #=> Float
|
1012
|
+
# resp.expense_documents[0].summary_fields[0].value_detection.geometry.bounding_box.top #=> Float
|
1013
|
+
# resp.expense_documents[0].summary_fields[0].value_detection.geometry.polygon #=> Array
|
1014
|
+
# resp.expense_documents[0].summary_fields[0].value_detection.geometry.polygon[0].x #=> Float
|
1015
|
+
# resp.expense_documents[0].summary_fields[0].value_detection.geometry.polygon[0].y #=> Float
|
1016
|
+
# resp.expense_documents[0].summary_fields[0].value_detection.confidence #=> Float
|
1017
|
+
# resp.expense_documents[0].summary_fields[0].page_number #=> Integer
|
1018
|
+
# resp.expense_documents[0].line_item_groups #=> Array
|
1019
|
+
# resp.expense_documents[0].line_item_groups[0].line_item_group_index #=> Integer
|
1020
|
+
# resp.expense_documents[0].line_item_groups[0].line_items #=> Array
|
1021
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields #=> Array
|
1022
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].type.text #=> String
|
1023
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].type.confidence #=> Float
|
1024
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.text #=> String
|
1025
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.geometry.bounding_box.width #=> Float
|
1026
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.geometry.bounding_box.height #=> Float
|
1027
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.geometry.bounding_box.left #=> Float
|
1028
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.geometry.bounding_box.top #=> Float
|
1029
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.geometry.polygon #=> Array
|
1030
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.geometry.polygon[0].x #=> Float
|
1031
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.geometry.polygon[0].y #=> Float
|
1032
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.confidence #=> Float
|
1033
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.text #=> String
|
1034
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.bounding_box.width #=> Float
|
1035
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.bounding_box.height #=> Float
|
1036
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.bounding_box.left #=> Float
|
1037
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.bounding_box.top #=> Float
|
1038
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.polygon #=> Array
|
1039
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.polygon[0].x #=> Float
|
1040
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.polygon[0].y #=> Float
|
1041
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.confidence #=> Float
|
1042
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].page_number #=> Integer
|
1043
|
+
# resp.warnings #=> Array
|
1044
|
+
# resp.warnings[0].error_code #=> String
|
1045
|
+
# resp.warnings[0].pages #=> Array
|
1046
|
+
# resp.warnings[0].pages[0] #=> Integer
|
1047
|
+
# resp.status_message #=> String
|
1048
|
+
# resp.analyze_expense_model_version #=> String
|
1049
|
+
#
|
1050
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/GetExpenseAnalysis AWS API Documentation
|
1051
|
+
#
|
1052
|
+
# @overload get_expense_analysis(params = {})
|
1053
|
+
# @param [Hash] params ({})
|
1054
|
+
def get_expense_analysis(params = {}, options = {})
|
1055
|
+
req = build_request(:get_expense_analysis, params)
|
1056
|
+
req.send_request(options)
|
1057
|
+
end
|
1058
|
+
|
925
1059
|
# Starts the asynchronous analysis of an input document for
|
926
1060
|
# relationships between detected items such as key-value pairs, tables,
|
927
1061
|
# and selection elements.
|
928
1062
|
#
|
929
1063
|
# `StartDocumentAnalysis` can analyze text in documents that are in
|
930
|
-
# JPEG, PNG, and PDF format. The documents are stored in an Amazon
|
931
|
-
# bucket. Use DocumentLocation to specify the bucket name and file
|
932
|
-
# of the document.
|
1064
|
+
# JPEG, PNG, TIFF, and PDF format. The documents are stored in an Amazon
|
1065
|
+
# S3 bucket. Use DocumentLocation to specify the bucket name and file
|
1066
|
+
# name of the document.
|
933
1067
|
#
|
934
1068
|
# `StartDocumentAnalysis` returns a job identifier (`JobId`) that you
|
935
1069
|
# use to get the results of the operation. When text analysis is
|
@@ -1037,9 +1171,9 @@ module Aws::Textract
|
|
1037
1171
|
# text.
|
1038
1172
|
#
|
1039
1173
|
# `StartDocumentTextDetection` can analyze text in documents that are in
|
1040
|
-
# JPEG, PNG, and PDF format. The documents are stored in an Amazon
|
1041
|
-
# bucket. Use DocumentLocation to specify the bucket name and file
|
1042
|
-
# of the document.
|
1174
|
+
# JPEG, PNG, TIFF, and PDF format. The documents are stored in an Amazon
|
1175
|
+
# S3 bucket. Use DocumentLocation to specify the bucket name and file
|
1176
|
+
# name of the document.
|
1043
1177
|
#
|
1044
1178
|
# `StartTextDetection` returns a job identifier (`JobId`) that you use
|
1045
1179
|
# to get the results of the operation. When text detection is finished,
|
@@ -1134,6 +1268,108 @@ module Aws::Textract
|
|
1134
1268
|
req.send_request(options)
|
1135
1269
|
end
|
1136
1270
|
|
1271
|
+
# Starts the asynchronous analysis of invoices or receipts for data like
|
1272
|
+
# contact information, items purchased, and vendor names.
|
1273
|
+
#
|
1274
|
+
# `StartExpenseAnalysis` can analyze text in documents that are in JPEG,
|
1275
|
+
# PNG, and PDF format. The documents must be stored in an Amazon S3
|
1276
|
+
# bucket. Use the DocumentLocation parameter to specify the name of your
|
1277
|
+
# S3 bucket and the name of the document in that bucket.
|
1278
|
+
#
|
1279
|
+
# `StartExpenseAnalysis` returns a job identifier (`JobId`) that you
|
1280
|
+
# will provide to `GetExpenseAnalysis` to retrieve the results of the
|
1281
|
+
# operation. When the analysis of the input invoices/receipts is
|
1282
|
+
# finished, Amazon Textract publishes a completion status to the Amazon
|
1283
|
+
# Simple Notification Service (Amazon SNS) topic that you provide to the
|
1284
|
+
# `NotificationChannel`. To obtain the results of the invoice and
|
1285
|
+
# receipt analysis operation, ensure that the status value published to
|
1286
|
+
# the Amazon SNS topic is `SUCCEEDED`. If so, call GetExpenseAnalysis,
|
1287
|
+
# and pass the job identifier (`JobId`) that was returned by your call
|
1288
|
+
# to `StartExpenseAnalysis`.
|
1289
|
+
#
|
1290
|
+
# For more information, see [Analyzing Invoices and Receipts][1].
|
1291
|
+
#
|
1292
|
+
#
|
1293
|
+
#
|
1294
|
+
# [1]: https://docs.aws.amazon.com/textract/latest/dg/invoice-receipts.html
|
1295
|
+
#
|
1296
|
+
# @option params [required, Types::DocumentLocation] :document_location
|
1297
|
+
# The location of the document to be processed.
|
1298
|
+
#
|
1299
|
+
# @option params [String] :client_request_token
|
1300
|
+
# The idempotent token that's used to identify the start request. If
|
1301
|
+
# you use the same token with multiple `StartDocumentTextDetection`
|
1302
|
+
# requests, the same `JobId` is returned. Use `ClientRequestToken` to
|
1303
|
+
# prevent the same job from being accidentally started more than once.
|
1304
|
+
# For more information, see [Calling Amazon Textract Asynchronous
|
1305
|
+
# Operations][1]
|
1306
|
+
#
|
1307
|
+
#
|
1308
|
+
#
|
1309
|
+
# [1]: https://docs.aws.amazon.com/textract/latest/dg/api-async.html
|
1310
|
+
#
|
1311
|
+
# @option params [String] :job_tag
|
1312
|
+
# An identifier you specify that's included in the completion
|
1313
|
+
# notification published to the Amazon SNS topic. For example, you can
|
1314
|
+
# use `JobTag` to identify the type of document that the completion
|
1315
|
+
# notification corresponds to (such as a tax form or a receipt).
|
1316
|
+
#
|
1317
|
+
# @option params [Types::NotificationChannel] :notification_channel
|
1318
|
+
# The Amazon SNS topic ARN that you want Amazon Textract to publish the
|
1319
|
+
# completion status of the operation to.
|
1320
|
+
#
|
1321
|
+
# @option params [Types::OutputConfig] :output_config
|
1322
|
+
# Sets if the output will go to a customer defined bucket. By default,
|
1323
|
+
# Amazon Textract will save the results internally to be accessed by the
|
1324
|
+
# `GetExpenseAnalysis` operation.
|
1325
|
+
#
|
1326
|
+
# @option params [String] :kms_key_id
|
1327
|
+
# The KMS key used to encrypt the inference results. This can be in
|
1328
|
+
# either Key ID or Key Alias format. When a KMS key is provided, the KMS
|
1329
|
+
# key will be used for server-side encryption of the objects in the
|
1330
|
+
# customer bucket. When this parameter is not enabled, the result will
|
1331
|
+
# be encrypted server side,using SSE-S3.
|
1332
|
+
#
|
1333
|
+
# @return [Types::StartExpenseAnalysisResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1334
|
+
#
|
1335
|
+
# * {Types::StartExpenseAnalysisResponse#job_id #job_id} => String
|
1336
|
+
#
|
1337
|
+
# @example Request syntax with placeholder values
|
1338
|
+
#
|
1339
|
+
# resp = client.start_expense_analysis({
|
1340
|
+
# document_location: { # required
|
1341
|
+
# s3_object: {
|
1342
|
+
# bucket: "S3Bucket",
|
1343
|
+
# name: "S3ObjectName",
|
1344
|
+
# version: "S3ObjectVersion",
|
1345
|
+
# },
|
1346
|
+
# },
|
1347
|
+
# client_request_token: "ClientRequestToken",
|
1348
|
+
# job_tag: "JobTag",
|
1349
|
+
# notification_channel: {
|
1350
|
+
# sns_topic_arn: "SNSTopicArn", # required
|
1351
|
+
# role_arn: "RoleArn", # required
|
1352
|
+
# },
|
1353
|
+
# output_config: {
|
1354
|
+
# s3_bucket: "S3Bucket", # required
|
1355
|
+
# s3_prefix: "S3ObjectName",
|
1356
|
+
# },
|
1357
|
+
# kms_key_id: "KMSKeyId",
|
1358
|
+
# })
|
1359
|
+
#
|
1360
|
+
# @example Response structure
|
1361
|
+
#
|
1362
|
+
# resp.job_id #=> String
|
1363
|
+
#
|
1364
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/StartExpenseAnalysis AWS API Documentation
|
1365
|
+
#
|
1366
|
+
# @overload start_expense_analysis(params = {})
|
1367
|
+
# @param [Hash] params ({})
|
1368
|
+
def start_expense_analysis(params = {}, options = {})
|
1369
|
+
req = build_request(:start_expense_analysis, params)
|
1370
|
+
req.send_request(options)
|
1371
|
+
end
|
1372
|
+
|
1137
1373
|
# @!endgroup
|
1138
1374
|
|
1139
1375
|
# @param params ({})
|
@@ -1147,7 +1383,7 @@ module Aws::Textract
|
|
1147
1383
|
params: params,
|
1148
1384
|
config: config)
|
1149
1385
|
context[:gem_name] = 'aws-sdk-textract'
|
1150
|
-
context[:gem_version] = '1.
|
1386
|
+
context[:gem_version] = '1.30.0'
|
1151
1387
|
Seahorse::Client::Request.new(handlers, context)
|
1152
1388
|
end
|
1153
1389
|
|
@@ -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
|
326
|
-
# image (JPEG/PNG), even if it contains multiple document
|
327
|
-
# considered to be a single-page document. The value of
|
328
|
-
# always 1. Synchronous operations don't return `Page`
|
329
|
-
# input document is considered to be a single-page
|
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
|
#
|
data/lib/aws-sdk-textract.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-textract
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.30.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-
|
11
|
+
date: 2021-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|