aws-sdk-textract 1.38.0 → 1.40.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: 1c0745ba62589de2b8ca471baf1dcf0d2b6c00fa02a261932fe84c60f142a809
4
- data.tar.gz: 566d64e6b216f71f6499a0a6d8fc5d3024eb55a446222201bd8f53a688e312f8
3
+ metadata.gz: 754294e61f5f0f0e9cb1c875d4cbe5a4e06712a19c4b73a52c7541884626c389
4
+ data.tar.gz: 601f69a067b54498668aa5a3abbaef3b9db593dd795e5c3bf007df884efa7025
5
5
  SHA512:
6
- metadata.gz: 47b02e10bf8525c1b58e411b321cbe87c26aaa2c06ff1541241e4c74daac1e4eba98af115a20805e3d49b84e3215ac15b4574a35eed49f406f477ebbb85360bf
7
- data.tar.gz: ba5841d57712faf447a8c7596e5bdb75fe0251a0ed4ec39f7ba73c9f0916172cfc85a0c2c0b96a6ee927dee360569f68d3d9b5b6cf1e93b4aef0861c9ac535f9
6
+ metadata.gz: 456de2e7293e98f7b235864ff26685aa482900047de89c7f16d854fe4221f358a55b6aa93fb14aa521404034ef4bdb05233aa4f8191f322c95cb2539d87da171
7
+ data.tar.gz: 00a3a8cc34f9e3235cc724715d79e4e48c84067e75cc2a721bc41efa8cadc0eed1abeb6e6687f9f9333c51c99a7e6733ddb9bf49858f41a8f36d6b7568683346
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.40.0 (2022-10-31)
5
+ ------------------
6
+
7
+ * Feature - This release introduces additional support for 30+ normalized fields such as vendor address and currency. It also includes OCR output in the response and accuracy improvements for the already supported fields in previous version
8
+
9
+ 1.39.0 (2022-10-25)
10
+ ------------------
11
+
12
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
13
+
4
14
  1.38.0 (2022-04-19)
5
15
  ------------------
6
16
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.38.0
1
+ 1.40.0
@@ -30,7 +30,7 @@ require 'aws-sdk-core/plugins/http_checksum.rb'
30
30
  require 'aws-sdk-core/plugins/checksum_algorithm.rb'
31
31
  require 'aws-sdk-core/plugins/defaults_mode.rb'
32
32
  require 'aws-sdk-core/plugins/recursion_detection.rb'
33
- require 'aws-sdk-core/plugins/signature_v4.rb'
33
+ require 'aws-sdk-core/plugins/sign.rb'
34
34
  require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
35
35
 
36
36
  Aws::Plugins::GlobalConfiguration.add_identifier(:textract)
@@ -79,8 +79,9 @@ module Aws::Textract
79
79
  add_plugin(Aws::Plugins::ChecksumAlgorithm)
80
80
  add_plugin(Aws::Plugins::DefaultsMode)
81
81
  add_plugin(Aws::Plugins::RecursionDetection)
82
- add_plugin(Aws::Plugins::SignatureV4)
82
+ add_plugin(Aws::Plugins::Sign)
83
83
  add_plugin(Aws::Plugins::Protocols::JsonRpc)
84
+ add_plugin(Aws::Textract::Plugins::Endpoints)
84
85
 
85
86
  # @overload initialize(options)
86
87
  # @param [Hash] options
@@ -297,6 +298,19 @@ module Aws::Textract
297
298
  # ** Please note ** When response stubbing is enabled, no HTTP
298
299
  # requests are made, and retries are disabled.
299
300
  #
301
+ # @option options [Aws::TokenProvider] :token_provider
302
+ # A Bearer Token Provider. This can be an instance of any one of the
303
+ # following classes:
304
+ #
305
+ # * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
306
+ # tokens.
307
+ #
308
+ # * `Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an
309
+ # access token generated from `aws login`.
310
+ #
311
+ # When `:token_provider` is not configured directly, the `Aws::TokenProviderChain`
312
+ # will be used to search for tokens configured for your profile in shared configuration files.
313
+ #
300
314
  # @option options [Boolean] :use_dualstack_endpoint
301
315
  # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
302
316
  # will be used if available.
@@ -310,6 +324,9 @@ module Aws::Textract
310
324
  # When `true`, request parameters are validated before
311
325
  # sending the request.
312
326
  #
327
+ # @option options [Aws::Textract::EndpointProvider] :endpoint_provider
328
+ # The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::Textract::EndpointParameters`
329
+ #
313
330
  # @option options [URI::HTTP,String] :http_proxy A proxy to send
314
331
  # requests through. Formatted like 'http://proxy.com:123'.
315
332
  #
@@ -380,10 +397,12 @@ module Aws::Textract
380
397
  # document are returned (including text that doesn't have a
381
398
  # relationship with the value of `FeatureTypes`).
382
399
  #
383
- # * Queries.A QUERIES\_RESULT Block object contains the answer to the
384
- # query, the alias associated and an ID that connect it to the query
385
- # asked. This Block also contains a location and attached confidence
386
- # score.
400
+ # * Query. A QUERY Block object contains the query text, alias and link
401
+ # to the associated Query results block object.
402
+ #
403
+ # * Query Result. A QUERY\_RESULT Block object contains the answer to
404
+ # the query and an ID that connects it to the query asked. This Block
405
+ # also contains a confidence score.
387
406
  #
388
407
  # Selection elements such as check boxes and option buttons (radio
389
408
  # buttons) can be detected in form data and in tables. A
@@ -518,7 +537,7 @@ module Aws::Textract
518
537
  # financially related relationships between text.
519
538
  #
520
539
  # Information is returned as `ExpenseDocuments` and seperated as
521
- # follows.
540
+ # follows:
522
541
  #
523
542
  # * `LineItemGroups`- A data set containing `LineItems` which store
524
543
  # information about the lines of text, such as an item purchased and
@@ -597,6 +616,12 @@ module Aws::Textract
597
616
  # resp.expense_documents[0].summary_fields[0].value_detection.geometry.polygon[0].y #=> Float
598
617
  # resp.expense_documents[0].summary_fields[0].value_detection.confidence #=> Float
599
618
  # resp.expense_documents[0].summary_fields[0].page_number #=> Integer
619
+ # resp.expense_documents[0].summary_fields[0].currency.code #=> String
620
+ # resp.expense_documents[0].summary_fields[0].currency.confidence #=> Float
621
+ # resp.expense_documents[0].summary_fields[0].group_properties #=> Array
622
+ # resp.expense_documents[0].summary_fields[0].group_properties[0].types #=> Array
623
+ # resp.expense_documents[0].summary_fields[0].group_properties[0].types[0] #=> String
624
+ # resp.expense_documents[0].summary_fields[0].group_properties[0].id #=> String
600
625
  # resp.expense_documents[0].line_item_groups #=> Array
601
626
  # resp.expense_documents[0].line_item_groups[0].line_item_group_index #=> Integer
602
627
  # resp.expense_documents[0].line_item_groups[0].line_items #=> Array
@@ -622,6 +647,41 @@ module Aws::Textract
622
647
  # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.polygon[0].y #=> Float
623
648
  # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.confidence #=> Float
624
649
  # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].page_number #=> Integer
650
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].currency.code #=> String
651
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].currency.confidence #=> Float
652
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].group_properties #=> Array
653
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].group_properties[0].types #=> Array
654
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].group_properties[0].types[0] #=> String
655
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].group_properties[0].id #=> String
656
+ # resp.expense_documents[0].blocks #=> Array
657
+ # resp.expense_documents[0].blocks[0].block_type #=> String, one of "KEY_VALUE_SET", "PAGE", "LINE", "WORD", "TABLE", "CELL", "SELECTION_ELEMENT", "MERGED_CELL", "TITLE", "QUERY", "QUERY_RESULT"
658
+ # resp.expense_documents[0].blocks[0].confidence #=> Float
659
+ # resp.expense_documents[0].blocks[0].text #=> String
660
+ # resp.expense_documents[0].blocks[0].text_type #=> String, one of "HANDWRITING", "PRINTED"
661
+ # resp.expense_documents[0].blocks[0].row_index #=> Integer
662
+ # resp.expense_documents[0].blocks[0].column_index #=> Integer
663
+ # resp.expense_documents[0].blocks[0].row_span #=> Integer
664
+ # resp.expense_documents[0].blocks[0].column_span #=> Integer
665
+ # resp.expense_documents[0].blocks[0].geometry.bounding_box.width #=> Float
666
+ # resp.expense_documents[0].blocks[0].geometry.bounding_box.height #=> Float
667
+ # resp.expense_documents[0].blocks[0].geometry.bounding_box.left #=> Float
668
+ # resp.expense_documents[0].blocks[0].geometry.bounding_box.top #=> Float
669
+ # resp.expense_documents[0].blocks[0].geometry.polygon #=> Array
670
+ # resp.expense_documents[0].blocks[0].geometry.polygon[0].x #=> Float
671
+ # resp.expense_documents[0].blocks[0].geometry.polygon[0].y #=> Float
672
+ # resp.expense_documents[0].blocks[0].id #=> String
673
+ # resp.expense_documents[0].blocks[0].relationships #=> Array
674
+ # resp.expense_documents[0].blocks[0].relationships[0].type #=> String, one of "VALUE", "CHILD", "COMPLEX_FEATURES", "MERGED_CELL", "TITLE", "ANSWER"
675
+ # resp.expense_documents[0].blocks[0].relationships[0].ids #=> Array
676
+ # resp.expense_documents[0].blocks[0].relationships[0].ids[0] #=> String
677
+ # resp.expense_documents[0].blocks[0].entity_types #=> Array
678
+ # resp.expense_documents[0].blocks[0].entity_types[0] #=> String, one of "KEY", "VALUE", "COLUMN_HEADER"
679
+ # resp.expense_documents[0].blocks[0].selection_status #=> String, one of "SELECTED", "NOT_SELECTED"
680
+ # resp.expense_documents[0].blocks[0].page #=> Integer
681
+ # resp.expense_documents[0].blocks[0].query.text #=> String
682
+ # resp.expense_documents[0].blocks[0].query.alias #=> String
683
+ # resp.expense_documents[0].blocks[0].query.pages #=> Array
684
+ # resp.expense_documents[0].blocks[0].query.pages[0] #=> String
625
685
  #
626
686
  # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/AnalyzeExpense AWS API Documentation
627
687
  #
@@ -689,9 +749,9 @@ module Aws::Textract
689
749
 
690
750
  # Detects text in the input document. Amazon Textract can detect lines
691
751
  # of text and the words that make up a line of text. The input document
692
- # must be an image in JPEG, PNG, PDF, or TIFF format.
693
- # `DetectDocumentText` returns the detected text in an array of Block
694
- # objects.
752
+ # must be in one of the following image formats: JPEG, PNG, PDF, or
753
+ # TIFF. `DetectDocumentText` returns the detected text in an array of
754
+ # Block objects.
695
755
  #
696
756
  # Each document page has as an associated `Block` of type PAGE. Each
697
757
  # PAGE `Block` object is the parent of LINE `Block` objects that
@@ -811,10 +871,19 @@ module Aws::Textract
811
871
  # relationship with the value of the `StartDocumentAnalysis`
812
872
  # `FeatureTypes` input parameter).
813
873
  #
814
- # * Queries. A QUERIES\_RESULT Block object contains the answer to the
815
- # query, the alias associated and an ID that connect it to the query
816
- # asked. This Block also contains a location and attached confidence
817
- # score
874
+ # * Query. A QUERY Block object contains the query text, alias and link
875
+ # to the associated Query results block object.
876
+ #
877
+ # * Query Results. A QUERY\_RESULT Block object contains the answer to
878
+ # the query and an ID that connects it to the query asked. This Block
879
+ # also contains a confidence score.
880
+ #
881
+ # <note markdown="1"> While processing a document with queries, look out for
882
+ # `INVALID_REQUEST_PARAMETERS` output. This indicates that either the
883
+ # per page query limit has been exceeded or that the operation is trying
884
+ # to query a page in the document which doesn’t exist.
885
+ #
886
+ # </note>
818
887
  #
819
888
  # Selection elements such as check boxes and option buttons (radio
820
889
  # buttons) can be detected in form data and in tables. A
@@ -1135,6 +1204,12 @@ module Aws::Textract
1135
1204
  # resp.expense_documents[0].summary_fields[0].value_detection.geometry.polygon[0].y #=> Float
1136
1205
  # resp.expense_documents[0].summary_fields[0].value_detection.confidence #=> Float
1137
1206
  # resp.expense_documents[0].summary_fields[0].page_number #=> Integer
1207
+ # resp.expense_documents[0].summary_fields[0].currency.code #=> String
1208
+ # resp.expense_documents[0].summary_fields[0].currency.confidence #=> Float
1209
+ # resp.expense_documents[0].summary_fields[0].group_properties #=> Array
1210
+ # resp.expense_documents[0].summary_fields[0].group_properties[0].types #=> Array
1211
+ # resp.expense_documents[0].summary_fields[0].group_properties[0].types[0] #=> String
1212
+ # resp.expense_documents[0].summary_fields[0].group_properties[0].id #=> String
1138
1213
  # resp.expense_documents[0].line_item_groups #=> Array
1139
1214
  # resp.expense_documents[0].line_item_groups[0].line_item_group_index #=> Integer
1140
1215
  # resp.expense_documents[0].line_item_groups[0].line_items #=> Array
@@ -1160,6 +1235,41 @@ module Aws::Textract
1160
1235
  # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.polygon[0].y #=> Float
1161
1236
  # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.confidence #=> Float
1162
1237
  # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].page_number #=> Integer
1238
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].currency.code #=> String
1239
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].currency.confidence #=> Float
1240
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].group_properties #=> Array
1241
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].group_properties[0].types #=> Array
1242
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].group_properties[0].types[0] #=> String
1243
+ # resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].group_properties[0].id #=> String
1244
+ # resp.expense_documents[0].blocks #=> Array
1245
+ # resp.expense_documents[0].blocks[0].block_type #=> String, one of "KEY_VALUE_SET", "PAGE", "LINE", "WORD", "TABLE", "CELL", "SELECTION_ELEMENT", "MERGED_CELL", "TITLE", "QUERY", "QUERY_RESULT"
1246
+ # resp.expense_documents[0].blocks[0].confidence #=> Float
1247
+ # resp.expense_documents[0].blocks[0].text #=> String
1248
+ # resp.expense_documents[0].blocks[0].text_type #=> String, one of "HANDWRITING", "PRINTED"
1249
+ # resp.expense_documents[0].blocks[0].row_index #=> Integer
1250
+ # resp.expense_documents[0].blocks[0].column_index #=> Integer
1251
+ # resp.expense_documents[0].blocks[0].row_span #=> Integer
1252
+ # resp.expense_documents[0].blocks[0].column_span #=> Integer
1253
+ # resp.expense_documents[0].blocks[0].geometry.bounding_box.width #=> Float
1254
+ # resp.expense_documents[0].blocks[0].geometry.bounding_box.height #=> Float
1255
+ # resp.expense_documents[0].blocks[0].geometry.bounding_box.left #=> Float
1256
+ # resp.expense_documents[0].blocks[0].geometry.bounding_box.top #=> Float
1257
+ # resp.expense_documents[0].blocks[0].geometry.polygon #=> Array
1258
+ # resp.expense_documents[0].blocks[0].geometry.polygon[0].x #=> Float
1259
+ # resp.expense_documents[0].blocks[0].geometry.polygon[0].y #=> Float
1260
+ # resp.expense_documents[0].blocks[0].id #=> String
1261
+ # resp.expense_documents[0].blocks[0].relationships #=> Array
1262
+ # resp.expense_documents[0].blocks[0].relationships[0].type #=> String, one of "VALUE", "CHILD", "COMPLEX_FEATURES", "MERGED_CELL", "TITLE", "ANSWER"
1263
+ # resp.expense_documents[0].blocks[0].relationships[0].ids #=> Array
1264
+ # resp.expense_documents[0].blocks[0].relationships[0].ids[0] #=> String
1265
+ # resp.expense_documents[0].blocks[0].entity_types #=> Array
1266
+ # resp.expense_documents[0].blocks[0].entity_types[0] #=> String, one of "KEY", "VALUE", "COLUMN_HEADER"
1267
+ # resp.expense_documents[0].blocks[0].selection_status #=> String, one of "SELECTED", "NOT_SELECTED"
1268
+ # resp.expense_documents[0].blocks[0].page #=> Integer
1269
+ # resp.expense_documents[0].blocks[0].query.text #=> String
1270
+ # resp.expense_documents[0].blocks[0].query.alias #=> String
1271
+ # resp.expense_documents[0].blocks[0].query.pages #=> Array
1272
+ # resp.expense_documents[0].blocks[0].query.pages[0] #=> String
1163
1273
  # resp.warnings #=> Array
1164
1274
  # resp.warnings[0].error_code #=> String
1165
1275
  # resp.warnings[0].pages #=> Array
@@ -1514,7 +1624,7 @@ module Aws::Textract
1514
1624
  params: params,
1515
1625
  config: config)
1516
1626
  context[:gem_name] = 'aws-sdk-textract'
1517
- context[:gem_version] = '1.38.0'
1627
+ context[:gem_version] = '1.40.0'
1518
1628
  Seahorse::Client::Request.new(handlers, context)
1519
1629
  end
1520
1630
 
@@ -39,11 +39,14 @@ module Aws::Textract
39
39
  EntityType = Shapes::StringShape.new(name: 'EntityType')
40
40
  EntityTypes = Shapes::ListShape.new(name: 'EntityTypes')
41
41
  ErrorCode = Shapes::StringShape.new(name: 'ErrorCode')
42
+ ExpenseCurrency = Shapes::StructureShape.new(name: 'ExpenseCurrency')
42
43
  ExpenseDetection = Shapes::StructureShape.new(name: 'ExpenseDetection')
43
44
  ExpenseDocument = Shapes::StructureShape.new(name: 'ExpenseDocument')
44
45
  ExpenseDocumentList = Shapes::ListShape.new(name: 'ExpenseDocumentList')
45
46
  ExpenseField = Shapes::StructureShape.new(name: 'ExpenseField')
46
47
  ExpenseFieldList = Shapes::ListShape.new(name: 'ExpenseFieldList')
48
+ ExpenseGroupProperty = Shapes::StructureShape.new(name: 'ExpenseGroupProperty')
49
+ ExpenseGroupPropertyList = Shapes::ListShape.new(name: 'ExpenseGroupPropertyList')
47
50
  ExpenseType = Shapes::StructureShape.new(name: 'ExpenseType')
48
51
  FeatureType = Shapes::StringShape.new(name: 'FeatureType')
49
52
  FeatureTypes = Shapes::ListShape.new(name: 'FeatureTypes')
@@ -121,6 +124,7 @@ module Aws::Textract
121
124
  StartExpenseAnalysisResponse = Shapes::StructureShape.new(name: 'StartExpenseAnalysisResponse')
122
125
  StatusMessage = Shapes::StringShape.new(name: 'StatusMessage')
123
126
  String = Shapes::StringShape.new(name: 'String')
127
+ StringList = Shapes::ListShape.new(name: 'StringList')
124
128
  TextType = Shapes::StringShape.new(name: 'TextType')
125
129
  ThrottlingException = Shapes::StructureShape.new(name: 'ThrottlingException')
126
130
  UInteger = Shapes::IntegerShape.new(name: 'UInteger')
@@ -216,6 +220,10 @@ module Aws::Textract
216
220
 
217
221
  EntityTypes.member = Shapes::ShapeRef.new(shape: EntityType)
218
222
 
223
+ ExpenseCurrency.add_member(:code, Shapes::ShapeRef.new(shape: String, location_name: "Code"))
224
+ ExpenseCurrency.add_member(:confidence, Shapes::ShapeRef.new(shape: Percent, location_name: "Confidence"))
225
+ ExpenseCurrency.struct_class = Types::ExpenseCurrency
226
+
219
227
  ExpenseDetection.add_member(:text, Shapes::ShapeRef.new(shape: String, location_name: "Text"))
220
228
  ExpenseDetection.add_member(:geometry, Shapes::ShapeRef.new(shape: Geometry, location_name: "Geometry"))
221
229
  ExpenseDetection.add_member(:confidence, Shapes::ShapeRef.new(shape: Percent, location_name: "Confidence"))
@@ -224,6 +232,7 @@ module Aws::Textract
224
232
  ExpenseDocument.add_member(:expense_index, Shapes::ShapeRef.new(shape: UInteger, location_name: "ExpenseIndex"))
225
233
  ExpenseDocument.add_member(:summary_fields, Shapes::ShapeRef.new(shape: ExpenseFieldList, location_name: "SummaryFields"))
226
234
  ExpenseDocument.add_member(:line_item_groups, Shapes::ShapeRef.new(shape: LineItemGroupList, location_name: "LineItemGroups"))
235
+ ExpenseDocument.add_member(:blocks, Shapes::ShapeRef.new(shape: BlockList, location_name: "Blocks"))
227
236
  ExpenseDocument.struct_class = Types::ExpenseDocument
228
237
 
229
238
  ExpenseDocumentList.member = Shapes::ShapeRef.new(shape: ExpenseDocument)
@@ -232,10 +241,18 @@ module Aws::Textract
232
241
  ExpenseField.add_member(:label_detection, Shapes::ShapeRef.new(shape: ExpenseDetection, location_name: "LabelDetection"))
233
242
  ExpenseField.add_member(:value_detection, Shapes::ShapeRef.new(shape: ExpenseDetection, location_name: "ValueDetection"))
234
243
  ExpenseField.add_member(:page_number, Shapes::ShapeRef.new(shape: UInteger, location_name: "PageNumber"))
244
+ ExpenseField.add_member(:currency, Shapes::ShapeRef.new(shape: ExpenseCurrency, location_name: "Currency"))
245
+ ExpenseField.add_member(:group_properties, Shapes::ShapeRef.new(shape: ExpenseGroupPropertyList, location_name: "GroupProperties"))
235
246
  ExpenseField.struct_class = Types::ExpenseField
236
247
 
237
248
  ExpenseFieldList.member = Shapes::ShapeRef.new(shape: ExpenseField)
238
249
 
250
+ ExpenseGroupProperty.add_member(:types, Shapes::ShapeRef.new(shape: StringList, location_name: "Types"))
251
+ ExpenseGroupProperty.add_member(:id, Shapes::ShapeRef.new(shape: String, location_name: "Id"))
252
+ ExpenseGroupProperty.struct_class = Types::ExpenseGroupProperty
253
+
254
+ ExpenseGroupPropertyList.member = Shapes::ShapeRef.new(shape: ExpenseGroupProperty)
255
+
239
256
  ExpenseType.add_member(:text, Shapes::ShapeRef.new(shape: String, location_name: "Text"))
240
257
  ExpenseType.add_member(:confidence, Shapes::ShapeRef.new(shape: Percent, location_name: "Confidence"))
241
258
  ExpenseType.struct_class = Types::ExpenseType
@@ -427,6 +444,8 @@ module Aws::Textract
427
444
  StartExpenseAnalysisResponse.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, location_name: "JobId"))
428
445
  StartExpenseAnalysisResponse.struct_class = Types::StartExpenseAnalysisResponse
429
446
 
447
+ StringList.member = Shapes::ShapeRef.new(shape: String)
448
+
430
449
  ThrottlingException.struct_class = Types::ThrottlingException
431
450
 
432
451
  UnsupportedDocumentException.struct_class = Types::UnsupportedDocumentException
@@ -0,0 +1,66 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ module Aws::Textract
11
+ # Endpoint parameters used to influence endpoints per request.
12
+ #
13
+ # @!attribute region
14
+ # The AWS region used to dispatch the request.
15
+ #
16
+ # @return [String]
17
+ #
18
+ # @!attribute use_dual_stack
19
+ # When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
20
+ #
21
+ # @return [Boolean]
22
+ #
23
+ # @!attribute use_fips
24
+ # When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
25
+ #
26
+ # @return [Boolean]
27
+ #
28
+ # @!attribute endpoint
29
+ # Override the endpoint used to send this request
30
+ #
31
+ # @return [String]
32
+ #
33
+ EndpointParameters = Struct.new(
34
+ :region,
35
+ :use_dual_stack,
36
+ :use_fips,
37
+ :endpoint,
38
+ ) do
39
+ include Aws::Structure
40
+
41
+ # @api private
42
+ class << self
43
+ PARAM_MAP = {
44
+ 'Region' => :region,
45
+ 'UseDualStack' => :use_dual_stack,
46
+ 'UseFIPS' => :use_fips,
47
+ 'Endpoint' => :endpoint,
48
+ }.freeze
49
+ end
50
+
51
+ def initialize(options = {})
52
+ self[:region] = options[:region]
53
+ self[:use_dual_stack] = options[:use_dual_stack]
54
+ self[:use_dual_stack] = false if self[:use_dual_stack].nil?
55
+ if self[:use_dual_stack].nil?
56
+ raise ArgumentError, "Missing required EndpointParameter: :use_dual_stack"
57
+ end
58
+ self[:use_fips] = options[:use_fips]
59
+ self[:use_fips] = false if self[:use_fips].nil?
60
+ if self[:use_fips].nil?
61
+ raise ArgumentError, "Missing required EndpointParameter: :use_fips"
62
+ end
63
+ self[:endpoint] = options[:endpoint]
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,111 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ module Aws::Textract
11
+ class EndpointProvider
12
+ def initialize(rule_set = nil)
13
+ @@rule_set ||= begin
14
+ endpoint_rules = Aws::Json.load(Base64.decode64(RULES))
15
+ Aws::Endpoints::RuleSet.new(
16
+ version: endpoint_rules['version'],
17
+ service_id: endpoint_rules['serviceId'],
18
+ parameters: endpoint_rules['parameters'],
19
+ rules: endpoint_rules['rules']
20
+ )
21
+ end
22
+ @provider = Aws::Endpoints::RulesProvider.new(rule_set || @@rule_set)
23
+ end
24
+
25
+ def resolve_endpoint(parameters)
26
+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siY29uZGl0aW9ucyI6W3si
96
+ Zm4iOiJib29sZWFuRXF1YWxzIiwiYXJndiI6W3RydWUseyJmbiI6ImdldEF0
97
+ dHIiLCJhcmd2IjpbeyJyZWYiOiJQYXJ0aXRpb25SZXN1bHQifSwic3VwcG9y
98
+ dHNEdWFsU3RhY2siXX1dfV0sInR5cGUiOiJ0cmVlIiwicnVsZXMiOlt7ImNv
99
+ bmRpdGlvbnMiOltdLCJlbmRwb2ludCI6eyJ1cmwiOiJodHRwczovL3RleHRy
100
+ YWN0LntSZWdpb259LntQYXJ0aXRpb25SZXN1bHQjZHVhbFN0YWNrRG5zU3Vm
101
+ Zml4fSIsInByb3BlcnRpZXMiOnt9LCJoZWFkZXJzIjp7fX0sInR5cGUiOiJl
102
+ bmRwb2ludCJ9XX0seyJjb25kaXRpb25zIjpbXSwiZXJyb3IiOiJEdWFsU3Rh
103
+ Y2sgaXMgZW5hYmxlZCBidXQgdGhpcyBwYXJ0aXRpb24gZG9lcyBub3Qgc3Vw
104
+ cG9ydCBEdWFsU3RhY2siLCJ0eXBlIjoiZXJyb3IifV19LHsiY29uZGl0aW9u
105
+ cyI6W10sImVuZHBvaW50Ijp7InVybCI6Imh0dHBzOi8vdGV4dHJhY3Que1Jl
106
+ Z2lvbn0ue1BhcnRpdGlvblJlc3VsdCNkbnNTdWZmaXh9IiwicHJvcGVydGll
107
+ cyI6e30sImhlYWRlcnMiOnt9fSwidHlwZSI6ImVuZHBvaW50In1dfV19
108
+
109
+ JSON
110
+ end
111
+ end
@@ -0,0 +1,155 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+
11
+ module Aws::Textract
12
+ module Endpoints
13
+
14
+ class AnalyzeDocument
15
+ def self.build(context)
16
+ unless context.config.regional_endpoint
17
+ endpoint = context.config.endpoint.to_s
18
+ end
19
+ Aws::Textract::EndpointParameters.new(
20
+ region: context.config.region,
21
+ use_dual_stack: context.config.use_dualstack_endpoint,
22
+ use_fips: context.config.use_fips_endpoint,
23
+ endpoint: endpoint,
24
+ )
25
+ end
26
+ end
27
+
28
+ class AnalyzeExpense
29
+ def self.build(context)
30
+ unless context.config.regional_endpoint
31
+ endpoint = context.config.endpoint.to_s
32
+ end
33
+ Aws::Textract::EndpointParameters.new(
34
+ region: context.config.region,
35
+ use_dual_stack: context.config.use_dualstack_endpoint,
36
+ use_fips: context.config.use_fips_endpoint,
37
+ endpoint: endpoint,
38
+ )
39
+ end
40
+ end
41
+
42
+ class AnalyzeID
43
+ def self.build(context)
44
+ unless context.config.regional_endpoint
45
+ endpoint = context.config.endpoint.to_s
46
+ end
47
+ Aws::Textract::EndpointParameters.new(
48
+ region: context.config.region,
49
+ use_dual_stack: context.config.use_dualstack_endpoint,
50
+ use_fips: context.config.use_fips_endpoint,
51
+ endpoint: endpoint,
52
+ )
53
+ end
54
+ end
55
+
56
+ class DetectDocumentText
57
+ def self.build(context)
58
+ unless context.config.regional_endpoint
59
+ endpoint = context.config.endpoint.to_s
60
+ end
61
+ Aws::Textract::EndpointParameters.new(
62
+ region: context.config.region,
63
+ use_dual_stack: context.config.use_dualstack_endpoint,
64
+ use_fips: context.config.use_fips_endpoint,
65
+ endpoint: endpoint,
66
+ )
67
+ end
68
+ end
69
+
70
+ class GetDocumentAnalysis
71
+ def self.build(context)
72
+ unless context.config.regional_endpoint
73
+ endpoint = context.config.endpoint.to_s
74
+ end
75
+ Aws::Textract::EndpointParameters.new(
76
+ region: context.config.region,
77
+ use_dual_stack: context.config.use_dualstack_endpoint,
78
+ use_fips: context.config.use_fips_endpoint,
79
+ endpoint: endpoint,
80
+ )
81
+ end
82
+ end
83
+
84
+ class GetDocumentTextDetection
85
+ def self.build(context)
86
+ unless context.config.regional_endpoint
87
+ endpoint = context.config.endpoint.to_s
88
+ end
89
+ Aws::Textract::EndpointParameters.new(
90
+ region: context.config.region,
91
+ use_dual_stack: context.config.use_dualstack_endpoint,
92
+ use_fips: context.config.use_fips_endpoint,
93
+ endpoint: endpoint,
94
+ )
95
+ end
96
+ end
97
+
98
+ class GetExpenseAnalysis
99
+ def self.build(context)
100
+ unless context.config.regional_endpoint
101
+ endpoint = context.config.endpoint.to_s
102
+ end
103
+ Aws::Textract::EndpointParameters.new(
104
+ region: context.config.region,
105
+ use_dual_stack: context.config.use_dualstack_endpoint,
106
+ use_fips: context.config.use_fips_endpoint,
107
+ endpoint: endpoint,
108
+ )
109
+ end
110
+ end
111
+
112
+ class StartDocumentAnalysis
113
+ def self.build(context)
114
+ unless context.config.regional_endpoint
115
+ endpoint = context.config.endpoint.to_s
116
+ end
117
+ Aws::Textract::EndpointParameters.new(
118
+ region: context.config.region,
119
+ use_dual_stack: context.config.use_dualstack_endpoint,
120
+ use_fips: context.config.use_fips_endpoint,
121
+ endpoint: endpoint,
122
+ )
123
+ end
124
+ end
125
+
126
+ class StartDocumentTextDetection
127
+ def self.build(context)
128
+ unless context.config.regional_endpoint
129
+ endpoint = context.config.endpoint.to_s
130
+ end
131
+ Aws::Textract::EndpointParameters.new(
132
+ region: context.config.region,
133
+ use_dual_stack: context.config.use_dualstack_endpoint,
134
+ use_fips: context.config.use_fips_endpoint,
135
+ endpoint: endpoint,
136
+ )
137
+ end
138
+ end
139
+
140
+ class StartExpenseAnalysis
141
+ def self.build(context)
142
+ unless context.config.regional_endpoint
143
+ endpoint = context.config.endpoint.to_s
144
+ end
145
+ Aws::Textract::EndpointParameters.new(
146
+ region: context.config.region,
147
+ use_dual_stack: context.config.use_dualstack_endpoint,
148
+ use_fips: context.config.use_fips_endpoint,
149
+ endpoint: endpoint,
150
+ )
151
+ end
152
+ end
153
+
154
+ end
155
+ end
@@ -0,0 +1,88 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+
11
+ module Aws::Textract
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::Textract::EndpointProvider',
17
+ docstring: 'The endpoint provider used to resolve endpoints. Any '\
18
+ 'object that responds to `#resolve_endpoint(parameters)` '\
19
+ 'where `parameters` is a Struct similar to '\
20
+ '`Aws::Textract::EndpointParameters`'
21
+ ) do |cfg|
22
+ Aws::Textract::EndpointProvider.new
23
+ end
24
+
25
+ # @api private
26
+ class Handler < Seahorse::Client::Handler
27
+ def call(context)
28
+ # If endpoint was discovered, do not resolve or apply the endpoint.
29
+ unless context[:discovered_endpoint]
30
+ params = parameters_for_operation(context)
31
+ endpoint = context.config.endpoint_provider.resolve_endpoint(params)
32
+
33
+ context.http_request.endpoint = endpoint.url
34
+ apply_endpoint_headers(context, endpoint.headers)
35
+ end
36
+
37
+ context[:endpoint_params] = params
38
+ context[:auth_scheme] =
39
+ Aws::Endpoints.resolve_auth_scheme(context, endpoint)
40
+
41
+ @handler.call(context)
42
+ end
43
+
44
+ private
45
+
46
+ def apply_endpoint_headers(context, headers)
47
+ headers.each do |key, values|
48
+ value = values
49
+ .compact
50
+ .map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
51
+ .join(',')
52
+
53
+ context.http_request.headers[key] = value
54
+ end
55
+ end
56
+
57
+ def parameters_for_operation(context)
58
+ case context.operation_name
59
+ when :analyze_document
60
+ Aws::Textract::Endpoints::AnalyzeDocument.build(context)
61
+ when :analyze_expense
62
+ Aws::Textract::Endpoints::AnalyzeExpense.build(context)
63
+ when :analyze_id
64
+ Aws::Textract::Endpoints::AnalyzeID.build(context)
65
+ when :detect_document_text
66
+ Aws::Textract::Endpoints::DetectDocumentText.build(context)
67
+ when :get_document_analysis
68
+ Aws::Textract::Endpoints::GetDocumentAnalysis.build(context)
69
+ when :get_document_text_detection
70
+ Aws::Textract::Endpoints::GetDocumentTextDetection.build(context)
71
+ when :get_expense_analysis
72
+ Aws::Textract::Endpoints::GetExpenseAnalysis.build(context)
73
+ when :start_document_analysis
74
+ Aws::Textract::Endpoints::StartDocumentAnalysis.build(context)
75
+ when :start_document_text_detection
76
+ Aws::Textract::Endpoints::StartDocumentTextDetection.build(context)
77
+ when :start_expense_analysis
78
+ Aws::Textract::Endpoints::StartExpenseAnalysis.build(context)
79
+ end
80
+ end
81
+ end
82
+
83
+ def add_handlers(handlers, _config)
84
+ handlers.add(Handler, step: :build, priority: 75)
85
+ end
86
+ end
87
+ end
88
+ end
@@ -332,7 +332,7 @@ module Aws::Textract
332
332
  # status of the selection element.
333
333
  #
334
334
  # * *QUERY* - A question asked during the call of AnalyzeDocument.
335
- # Contains an alias and an ID that attachs it to its answer.
335
+ # Contains an alias and an ID that attaches it to its answer.
336
336
  #
337
337
  # * *QUERY\_RESULT* - A response to a question asked during the call
338
338
  # of analyze document. Comes with an alias and ID for ease of
@@ -422,13 +422,14 @@ module Aws::Textract
422
422
  #
423
423
  # @!attribute [rw] page
424
424
  # The page on which a block was detected. `Page` is returned by
425
- # asynchronous operations. Page values greater than 1 are only
426
- # returned for multipage documents that are in PDF or TIFF format. A
427
- # scanned image (JPEG/PNG), even if it contains multiple document
428
- # pages, is considered to be a single-page document. The value of
429
- # `Page` is always 1. Synchronous operations don't return `Page`
430
- # because every input document is considered to be a single-page
431
- # document.
425
+ # synchronous and asynchronous operations. Page values greater than 1
426
+ # are only returned for multipage documents that are in PDF or TIFF
427
+ # format. A scanned image (JPEG/PNG) provided to an asynchronous
428
+ # operation, even if it contains multiple document pages, is
429
+ # considered a single-page document. This means that for scanned
430
+ # images the value of `Page` is always 1. Synchronous operations
431
+ # operations will also return a `Page` value of 1 because every input
432
+ # document is considered to be a single-page document.
432
433
  # @return [Integer]
433
434
  #
434
435
  # @!attribute [rw] query
@@ -670,6 +671,25 @@ module Aws::Textract
670
671
  #
671
672
  class DocumentTooLargeException < Aws::EmptyStructure; end
672
673
 
674
+ # Returns the kind of currency detected.
675
+ #
676
+ # @!attribute [rw] code
677
+ # Currency code for detected currency.
678
+ # @return [String]
679
+ #
680
+ # @!attribute [rw] confidence
681
+ # Percentage confideence in the detected currency.
682
+ # @return [Float]
683
+ #
684
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/ExpenseCurrency AWS API Documentation
685
+ #
686
+ class ExpenseCurrency < Struct.new(
687
+ :code,
688
+ :confidence)
689
+ SENSITIVE = []
690
+ include Aws::Structure
691
+ end
692
+
673
693
  # An object used to store information about the Value or Label detected
674
694
  # by Amazon Textract.
675
695
  #
@@ -713,12 +733,18 @@ module Aws::Textract
713
733
  # `LineItems`.
714
734
  # @return [Array<Types::LineItemGroup>]
715
735
  #
736
+ # @!attribute [rw] blocks
737
+ # This is a block object, the same as reported when DetectDocumentText
738
+ # is run on a document. It provides word level recognition of text.
739
+ # @return [Array<Types::Block>]
740
+ #
716
741
  # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/ExpenseDocument AWS API Documentation
717
742
  #
718
743
  class ExpenseDocument < Struct.new(
719
744
  :expense_index,
720
745
  :summary_fields,
721
- :line_item_groups)
746
+ :line_item_groups,
747
+ :blocks)
722
748
  SENSITIVE = []
723
749
  include Aws::Structure
724
750
  end
@@ -744,13 +770,48 @@ module Aws::Textract
744
770
  # The page number the value was detected on.
745
771
  # @return [Integer]
746
772
  #
773
+ # @!attribute [rw] currency
774
+ # Shows the kind of currency, both the code and confidence associated
775
+ # with any monatary value detected.
776
+ # @return [Types::ExpenseCurrency]
777
+ #
778
+ # @!attribute [rw] group_properties
779
+ # Shows which group a response object belongs to, such as whether an
780
+ # address line belongs to the vendor's address or the recipent's
781
+ # address.
782
+ # @return [Array<Types::ExpenseGroupProperty>]
783
+ #
747
784
  # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/ExpenseField AWS API Documentation
748
785
  #
749
786
  class ExpenseField < Struct.new(
750
787
  :type,
751
788
  :label_detection,
752
789
  :value_detection,
753
- :page_number)
790
+ :page_number,
791
+ :currency,
792
+ :group_properties)
793
+ SENSITIVE = []
794
+ include Aws::Structure
795
+ end
796
+
797
+ # Shows the group that a certain key belongs to. This helps
798
+ # differentiate responses like addresses that can appear similar in
799
+ # response JSON.
800
+ #
801
+ # @!attribute [rw] types
802
+ # Informs you on the kind of label associated with the group
803
+ # @return [Array<String>]
804
+ #
805
+ # @!attribute [rw] id
806
+ # Provides a group Id number, which will be the same for each in the
807
+ # group.
808
+ # @return [String]
809
+ #
810
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/ExpenseGroupProperty AWS API Documentation
811
+ #
812
+ class ExpenseGroupProperty < Struct.new(
813
+ :types,
814
+ :id)
754
815
  SENSITIVE = []
755
816
  include Aws::Structure
756
817
  end
@@ -1500,16 +1561,17 @@ module Aws::Textract
1500
1561
  # @return [String]
1501
1562
  #
1502
1563
  # @!attribute [rw] pages
1503
- # List of pages associated with the query. The following is a list of
1504
- # rules for using this parameter.
1564
+ # Pages is a parameter that the user inputs to specify which pages to
1565
+ # apply a query to. The following is a list of rules for using this
1566
+ # parameter.
1505
1567
  #
1506
1568
  # * If a page is not specified, it is set to `["1"]` by default.
1507
1569
  #
1508
1570
  # * The following characters are allowed in the parameter's string:
1509
1571
  # `0 1 2 3 4 5 6 7 8 9 - *`. No whitespace is allowed.
1510
1572
  #
1511
- # * When using `*` to indicate all pages, it must be the only element
1512
- # in the string.
1573
+ # * When using * to indicate all pages, it must be the only element
1574
+ # in the list.
1513
1575
  #
1514
1576
  # * You can use page intervals, such as `[“1-3”, “1-1”, “4-*”]`. Where
1515
1577
  # `*` indicates last page of document.
@@ -13,9 +13,13 @@ require 'aws-sigv4'
13
13
 
14
14
  require_relative 'aws-sdk-textract/types'
15
15
  require_relative 'aws-sdk-textract/client_api'
16
+ require_relative 'aws-sdk-textract/plugins/endpoints.rb'
16
17
  require_relative 'aws-sdk-textract/client'
17
18
  require_relative 'aws-sdk-textract/errors'
18
19
  require_relative 'aws-sdk-textract/resource'
20
+ require_relative 'aws-sdk-textract/endpoint_parameters'
21
+ require_relative 'aws-sdk-textract/endpoint_provider'
22
+ require_relative 'aws-sdk-textract/endpoints'
19
23
  require_relative 'aws-sdk-textract/customizations'
20
24
 
21
25
  # This module provides support for Amazon Textract. This module is available in the
@@ -48,6 +52,6 @@ require_relative 'aws-sdk-textract/customizations'
48
52
  # @!group service
49
53
  module Aws::Textract
50
54
 
51
- GEM_VERSION = '1.38.0'
55
+ GEM_VERSION = '1.40.0'
52
56
 
53
57
  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.38.0
4
+ version: 1.40.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-19 00:00:00.000000000 Z
11
+ date: 2022-10-31 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.127.0
22
+ version: 3.165.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.127.0
32
+ version: 3.165.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: aws-sigv4
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -59,7 +59,11 @@ files:
59
59
  - lib/aws-sdk-textract/client.rb
60
60
  - lib/aws-sdk-textract/client_api.rb
61
61
  - lib/aws-sdk-textract/customizations.rb
62
+ - lib/aws-sdk-textract/endpoint_parameters.rb
63
+ - lib/aws-sdk-textract/endpoint_provider.rb
64
+ - lib/aws-sdk-textract/endpoints.rb
62
65
  - lib/aws-sdk-textract/errors.rb
66
+ - lib/aws-sdk-textract/plugins/endpoints.rb
63
67
  - lib/aws-sdk-textract/resource.rb
64
68
  - lib/aws-sdk-textract/types.rb
65
69
  homepage: https://github.com/aws/aws-sdk-ruby