aws-sdk-textract 1.0.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.
@@ -0,0 +1,332 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws::Textract
9
+ # @api private
10
+ module ClientApi
11
+
12
+ include Seahorse::Model
13
+
14
+ AccessDeniedException = Shapes::StructureShape.new(name: 'AccessDeniedException')
15
+ AnalyzeDocumentRequest = Shapes::StructureShape.new(name: 'AnalyzeDocumentRequest')
16
+ AnalyzeDocumentResponse = Shapes::StructureShape.new(name: 'AnalyzeDocumentResponse')
17
+ BadDocumentException = Shapes::StructureShape.new(name: 'BadDocumentException')
18
+ Block = Shapes::StructureShape.new(name: 'Block')
19
+ BlockList = Shapes::ListShape.new(name: 'BlockList')
20
+ BlockType = Shapes::StringShape.new(name: 'BlockType')
21
+ BoundingBox = Shapes::StructureShape.new(name: 'BoundingBox')
22
+ ClientRequestToken = Shapes::StringShape.new(name: 'ClientRequestToken')
23
+ DetectDocumentTextRequest = Shapes::StructureShape.new(name: 'DetectDocumentTextRequest')
24
+ DetectDocumentTextResponse = Shapes::StructureShape.new(name: 'DetectDocumentTextResponse')
25
+ Document = Shapes::StructureShape.new(name: 'Document')
26
+ DocumentLocation = Shapes::StructureShape.new(name: 'DocumentLocation')
27
+ DocumentMetadata = Shapes::StructureShape.new(name: 'DocumentMetadata')
28
+ DocumentTooLargeException = Shapes::StructureShape.new(name: 'DocumentTooLargeException')
29
+ EntityType = Shapes::StringShape.new(name: 'EntityType')
30
+ EntityTypes = Shapes::ListShape.new(name: 'EntityTypes')
31
+ ErrorCode = Shapes::StringShape.new(name: 'ErrorCode')
32
+ FeatureType = Shapes::StringShape.new(name: 'FeatureType')
33
+ FeatureTypes = Shapes::ListShape.new(name: 'FeatureTypes')
34
+ Float = Shapes::FloatShape.new(name: 'Float')
35
+ Geometry = Shapes::StructureShape.new(name: 'Geometry')
36
+ GetDocumentAnalysisRequest = Shapes::StructureShape.new(name: 'GetDocumentAnalysisRequest')
37
+ GetDocumentAnalysisResponse = Shapes::StructureShape.new(name: 'GetDocumentAnalysisResponse')
38
+ GetDocumentTextDetectionRequest = Shapes::StructureShape.new(name: 'GetDocumentTextDetectionRequest')
39
+ GetDocumentTextDetectionResponse = Shapes::StructureShape.new(name: 'GetDocumentTextDetectionResponse')
40
+ IdList = Shapes::ListShape.new(name: 'IdList')
41
+ IdempotentParameterMismatchException = Shapes::StructureShape.new(name: 'IdempotentParameterMismatchException')
42
+ ImageBlob = Shapes::BlobShape.new(name: 'ImageBlob')
43
+ InternalServerError = Shapes::StructureShape.new(name: 'InternalServerError')
44
+ InvalidJobIdException = Shapes::StructureShape.new(name: 'InvalidJobIdException')
45
+ InvalidParameterException = Shapes::StructureShape.new(name: 'InvalidParameterException')
46
+ InvalidS3ObjectException = Shapes::StructureShape.new(name: 'InvalidS3ObjectException')
47
+ JobId = Shapes::StringShape.new(name: 'JobId')
48
+ JobStatus = Shapes::StringShape.new(name: 'JobStatus')
49
+ JobTag = Shapes::StringShape.new(name: 'JobTag')
50
+ LimitExceededException = Shapes::StructureShape.new(name: 'LimitExceededException')
51
+ MaxResults = Shapes::IntegerShape.new(name: 'MaxResults')
52
+ NonEmptyString = Shapes::StringShape.new(name: 'NonEmptyString')
53
+ NotificationChannel = Shapes::StructureShape.new(name: 'NotificationChannel')
54
+ Pages = Shapes::ListShape.new(name: 'Pages')
55
+ PaginationToken = Shapes::StringShape.new(name: 'PaginationToken')
56
+ Percent = Shapes::FloatShape.new(name: 'Percent')
57
+ Point = Shapes::StructureShape.new(name: 'Point')
58
+ Polygon = Shapes::ListShape.new(name: 'Polygon')
59
+ ProvisionedThroughputExceededException = Shapes::StructureShape.new(name: 'ProvisionedThroughputExceededException')
60
+ Relationship = Shapes::StructureShape.new(name: 'Relationship')
61
+ RelationshipList = Shapes::ListShape.new(name: 'RelationshipList')
62
+ RelationshipType = Shapes::StringShape.new(name: 'RelationshipType')
63
+ RoleArn = Shapes::StringShape.new(name: 'RoleArn')
64
+ S3Bucket = Shapes::StringShape.new(name: 'S3Bucket')
65
+ S3Object = Shapes::StructureShape.new(name: 'S3Object')
66
+ S3ObjectName = Shapes::StringShape.new(name: 'S3ObjectName')
67
+ S3ObjectVersion = Shapes::StringShape.new(name: 'S3ObjectVersion')
68
+ SNSTopicArn = Shapes::StringShape.new(name: 'SNSTopicArn')
69
+ StartDocumentAnalysisRequest = Shapes::StructureShape.new(name: 'StartDocumentAnalysisRequest')
70
+ StartDocumentAnalysisResponse = Shapes::StructureShape.new(name: 'StartDocumentAnalysisResponse')
71
+ StartDocumentTextDetectionRequest = Shapes::StructureShape.new(name: 'StartDocumentTextDetectionRequest')
72
+ StartDocumentTextDetectionResponse = Shapes::StructureShape.new(name: 'StartDocumentTextDetectionResponse')
73
+ StatusMessage = Shapes::StringShape.new(name: 'StatusMessage')
74
+ String = Shapes::StringShape.new(name: 'String')
75
+ ThrottlingException = Shapes::StructureShape.new(name: 'ThrottlingException')
76
+ UInteger = Shapes::IntegerShape.new(name: 'UInteger')
77
+ UnsupportedDocumentException = Shapes::StructureShape.new(name: 'UnsupportedDocumentException')
78
+ Warning = Shapes::StructureShape.new(name: 'Warning')
79
+ Warnings = Shapes::ListShape.new(name: 'Warnings')
80
+
81
+ AnalyzeDocumentRequest.add_member(:document, Shapes::ShapeRef.new(shape: Document, required: true, location_name: "Document"))
82
+ AnalyzeDocumentRequest.add_member(:feature_types, Shapes::ShapeRef.new(shape: FeatureTypes, required: true, location_name: "FeatureTypes"))
83
+ AnalyzeDocumentRequest.struct_class = Types::AnalyzeDocumentRequest
84
+
85
+ AnalyzeDocumentResponse.add_member(:document_metadata, Shapes::ShapeRef.new(shape: DocumentMetadata, location_name: "DocumentMetadata"))
86
+ AnalyzeDocumentResponse.add_member(:blocks, Shapes::ShapeRef.new(shape: BlockList, location_name: "Blocks"))
87
+ AnalyzeDocumentResponse.struct_class = Types::AnalyzeDocumentResponse
88
+
89
+ Block.add_member(:block_type, Shapes::ShapeRef.new(shape: BlockType, location_name: "BlockType"))
90
+ Block.add_member(:confidence, Shapes::ShapeRef.new(shape: Percent, location_name: "Confidence"))
91
+ Block.add_member(:text, Shapes::ShapeRef.new(shape: String, location_name: "Text"))
92
+ Block.add_member(:row_index, Shapes::ShapeRef.new(shape: UInteger, location_name: "RowIndex"))
93
+ Block.add_member(:column_index, Shapes::ShapeRef.new(shape: UInteger, location_name: "ColumnIndex"))
94
+ Block.add_member(:row_span, Shapes::ShapeRef.new(shape: UInteger, location_name: "RowSpan"))
95
+ Block.add_member(:column_span, Shapes::ShapeRef.new(shape: UInteger, location_name: "ColumnSpan"))
96
+ Block.add_member(:geometry, Shapes::ShapeRef.new(shape: Geometry, location_name: "Geometry"))
97
+ Block.add_member(:id, Shapes::ShapeRef.new(shape: NonEmptyString, location_name: "Id"))
98
+ Block.add_member(:relationships, Shapes::ShapeRef.new(shape: RelationshipList, location_name: "Relationships"))
99
+ Block.add_member(:entity_types, Shapes::ShapeRef.new(shape: EntityTypes, location_name: "EntityTypes"))
100
+ Block.add_member(:page, Shapes::ShapeRef.new(shape: UInteger, location_name: "Page"))
101
+ Block.struct_class = Types::Block
102
+
103
+ BlockList.member = Shapes::ShapeRef.new(shape: Block)
104
+
105
+ BoundingBox.add_member(:width, Shapes::ShapeRef.new(shape: Float, location_name: "Width"))
106
+ BoundingBox.add_member(:height, Shapes::ShapeRef.new(shape: Float, location_name: "Height"))
107
+ BoundingBox.add_member(:left, Shapes::ShapeRef.new(shape: Float, location_name: "Left"))
108
+ BoundingBox.add_member(:top, Shapes::ShapeRef.new(shape: Float, location_name: "Top"))
109
+ BoundingBox.struct_class = Types::BoundingBox
110
+
111
+ DetectDocumentTextRequest.add_member(:document, Shapes::ShapeRef.new(shape: Document, required: true, location_name: "Document"))
112
+ DetectDocumentTextRequest.struct_class = Types::DetectDocumentTextRequest
113
+
114
+ DetectDocumentTextResponse.add_member(:document_metadata, Shapes::ShapeRef.new(shape: DocumentMetadata, location_name: "DocumentMetadata"))
115
+ DetectDocumentTextResponse.add_member(:blocks, Shapes::ShapeRef.new(shape: BlockList, location_name: "Blocks"))
116
+ DetectDocumentTextResponse.struct_class = Types::DetectDocumentTextResponse
117
+
118
+ Document.add_member(:bytes, Shapes::ShapeRef.new(shape: ImageBlob, location_name: "Bytes"))
119
+ Document.add_member(:s3_object, Shapes::ShapeRef.new(shape: S3Object, location_name: "S3Object"))
120
+ Document.struct_class = Types::Document
121
+
122
+ DocumentLocation.add_member(:s3_object, Shapes::ShapeRef.new(shape: S3Object, location_name: "S3Object"))
123
+ DocumentLocation.struct_class = Types::DocumentLocation
124
+
125
+ DocumentMetadata.add_member(:pages, Shapes::ShapeRef.new(shape: UInteger, location_name: "Pages"))
126
+ DocumentMetadata.struct_class = Types::DocumentMetadata
127
+
128
+ EntityTypes.member = Shapes::ShapeRef.new(shape: EntityType)
129
+
130
+ FeatureTypes.member = Shapes::ShapeRef.new(shape: FeatureType)
131
+
132
+ Geometry.add_member(:bounding_box, Shapes::ShapeRef.new(shape: BoundingBox, location_name: "BoundingBox"))
133
+ Geometry.add_member(:polygon, Shapes::ShapeRef.new(shape: Polygon, location_name: "Polygon"))
134
+ Geometry.struct_class = Types::Geometry
135
+
136
+ GetDocumentAnalysisRequest.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, required: true, location_name: "JobId"))
137
+ GetDocumentAnalysisRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResults, location_name: "MaxResults"))
138
+ GetDocumentAnalysisRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: PaginationToken, location_name: "NextToken"))
139
+ GetDocumentAnalysisRequest.struct_class = Types::GetDocumentAnalysisRequest
140
+
141
+ GetDocumentAnalysisResponse.add_member(:document_metadata, Shapes::ShapeRef.new(shape: DocumentMetadata, location_name: "DocumentMetadata"))
142
+ GetDocumentAnalysisResponse.add_member(:job_status, Shapes::ShapeRef.new(shape: JobStatus, location_name: "JobStatus"))
143
+ GetDocumentAnalysisResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: PaginationToken, location_name: "NextToken"))
144
+ GetDocumentAnalysisResponse.add_member(:blocks, Shapes::ShapeRef.new(shape: BlockList, location_name: "Blocks"))
145
+ GetDocumentAnalysisResponse.add_member(:warnings, Shapes::ShapeRef.new(shape: Warnings, location_name: "Warnings"))
146
+ GetDocumentAnalysisResponse.add_member(:status_message, Shapes::ShapeRef.new(shape: StatusMessage, location_name: "StatusMessage"))
147
+ GetDocumentAnalysisResponse.struct_class = Types::GetDocumentAnalysisResponse
148
+
149
+ GetDocumentTextDetectionRequest.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, required: true, location_name: "JobId"))
150
+ GetDocumentTextDetectionRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResults, location_name: "MaxResults"))
151
+ GetDocumentTextDetectionRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: PaginationToken, location_name: "NextToken"))
152
+ GetDocumentTextDetectionRequest.struct_class = Types::GetDocumentTextDetectionRequest
153
+
154
+ GetDocumentTextDetectionResponse.add_member(:document_metadata, Shapes::ShapeRef.new(shape: DocumentMetadata, location_name: "DocumentMetadata"))
155
+ GetDocumentTextDetectionResponse.add_member(:job_status, Shapes::ShapeRef.new(shape: JobStatus, location_name: "JobStatus"))
156
+ GetDocumentTextDetectionResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: PaginationToken, location_name: "NextToken"))
157
+ GetDocumentTextDetectionResponse.add_member(:blocks, Shapes::ShapeRef.new(shape: BlockList, location_name: "Blocks"))
158
+ GetDocumentTextDetectionResponse.add_member(:warnings, Shapes::ShapeRef.new(shape: Warnings, location_name: "Warnings"))
159
+ GetDocumentTextDetectionResponse.add_member(:status_message, Shapes::ShapeRef.new(shape: StatusMessage, location_name: "StatusMessage"))
160
+ GetDocumentTextDetectionResponse.struct_class = Types::GetDocumentTextDetectionResponse
161
+
162
+ IdList.member = Shapes::ShapeRef.new(shape: NonEmptyString)
163
+
164
+ NotificationChannel.add_member(:sns_topic_arn, Shapes::ShapeRef.new(shape: SNSTopicArn, required: true, location_name: "SNSTopicArn"))
165
+ NotificationChannel.add_member(:role_arn, Shapes::ShapeRef.new(shape: RoleArn, required: true, location_name: "RoleArn"))
166
+ NotificationChannel.struct_class = Types::NotificationChannel
167
+
168
+ Pages.member = Shapes::ShapeRef.new(shape: UInteger)
169
+
170
+ Point.add_member(:x, Shapes::ShapeRef.new(shape: Float, location_name: "X"))
171
+ Point.add_member(:y, Shapes::ShapeRef.new(shape: Float, location_name: "Y"))
172
+ Point.struct_class = Types::Point
173
+
174
+ Polygon.member = Shapes::ShapeRef.new(shape: Point)
175
+
176
+ Relationship.add_member(:type, Shapes::ShapeRef.new(shape: RelationshipType, location_name: "Type"))
177
+ Relationship.add_member(:ids, Shapes::ShapeRef.new(shape: IdList, location_name: "Ids"))
178
+ Relationship.struct_class = Types::Relationship
179
+
180
+ RelationshipList.member = Shapes::ShapeRef.new(shape: Relationship)
181
+
182
+ S3Object.add_member(:bucket, Shapes::ShapeRef.new(shape: S3Bucket, location_name: "Bucket"))
183
+ S3Object.add_member(:name, Shapes::ShapeRef.new(shape: S3ObjectName, location_name: "Name"))
184
+ S3Object.add_member(:version, Shapes::ShapeRef.new(shape: S3ObjectVersion, location_name: "Version"))
185
+ S3Object.struct_class = Types::S3Object
186
+
187
+ StartDocumentAnalysisRequest.add_member(:document_location, Shapes::ShapeRef.new(shape: DocumentLocation, required: true, location_name: "DocumentLocation"))
188
+ StartDocumentAnalysisRequest.add_member(:feature_types, Shapes::ShapeRef.new(shape: FeatureTypes, required: true, location_name: "FeatureTypes"))
189
+ StartDocumentAnalysisRequest.add_member(:client_request_token, Shapes::ShapeRef.new(shape: ClientRequestToken, location_name: "ClientRequestToken"))
190
+ StartDocumentAnalysisRequest.add_member(:job_tag, Shapes::ShapeRef.new(shape: JobTag, location_name: "JobTag"))
191
+ StartDocumentAnalysisRequest.add_member(:notification_channel, Shapes::ShapeRef.new(shape: NotificationChannel, location_name: "NotificationChannel"))
192
+ StartDocumentAnalysisRequest.struct_class = Types::StartDocumentAnalysisRequest
193
+
194
+ StartDocumentAnalysisResponse.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, location_name: "JobId"))
195
+ StartDocumentAnalysisResponse.struct_class = Types::StartDocumentAnalysisResponse
196
+
197
+ StartDocumentTextDetectionRequest.add_member(:document_location, Shapes::ShapeRef.new(shape: DocumentLocation, required: true, location_name: "DocumentLocation"))
198
+ StartDocumentTextDetectionRequest.add_member(:client_request_token, Shapes::ShapeRef.new(shape: ClientRequestToken, location_name: "ClientRequestToken"))
199
+ StartDocumentTextDetectionRequest.add_member(:job_tag, Shapes::ShapeRef.new(shape: JobTag, location_name: "JobTag"))
200
+ StartDocumentTextDetectionRequest.add_member(:notification_channel, Shapes::ShapeRef.new(shape: NotificationChannel, location_name: "NotificationChannel"))
201
+ StartDocumentTextDetectionRequest.struct_class = Types::StartDocumentTextDetectionRequest
202
+
203
+ StartDocumentTextDetectionResponse.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, location_name: "JobId"))
204
+ StartDocumentTextDetectionResponse.struct_class = Types::StartDocumentTextDetectionResponse
205
+
206
+ Warning.add_member(:error_code, Shapes::ShapeRef.new(shape: ErrorCode, location_name: "ErrorCode"))
207
+ Warning.add_member(:pages, Shapes::ShapeRef.new(shape: Pages, location_name: "Pages"))
208
+ Warning.struct_class = Types::Warning
209
+
210
+ Warnings.member = Shapes::ShapeRef.new(shape: Warning)
211
+
212
+
213
+ # @api private
214
+ API = Seahorse::Model::Api.new.tap do |api|
215
+
216
+ api.version = "2018-06-27"
217
+
218
+ api.metadata = {
219
+ "apiVersion" => "2018-06-27",
220
+ "endpointPrefix" => "textract",
221
+ "jsonVersion" => "1.1",
222
+ "protocol" => "json",
223
+ "serviceFullName" => "Amazon Textract",
224
+ "serviceId" => "Textract",
225
+ "signatureVersion" => "v4",
226
+ "targetPrefix" => "Textract",
227
+ "uid" => "textract-2018-06-27",
228
+ }
229
+
230
+ api.add_operation(:analyze_document, Seahorse::Model::Operation.new.tap do |o|
231
+ o.name = "AnalyzeDocument"
232
+ o.http_method = "POST"
233
+ o.http_request_uri = "/"
234
+ o.input = Shapes::ShapeRef.new(shape: AnalyzeDocumentRequest)
235
+ o.output = Shapes::ShapeRef.new(shape: AnalyzeDocumentResponse)
236
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
237
+ o.errors << Shapes::ShapeRef.new(shape: InvalidS3ObjectException)
238
+ o.errors << Shapes::ShapeRef.new(shape: UnsupportedDocumentException)
239
+ o.errors << Shapes::ShapeRef.new(shape: DocumentTooLargeException)
240
+ o.errors << Shapes::ShapeRef.new(shape: BadDocumentException)
241
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
242
+ o.errors << Shapes::ShapeRef.new(shape: ProvisionedThroughputExceededException)
243
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
244
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
245
+ end)
246
+
247
+ api.add_operation(:detect_document_text, Seahorse::Model::Operation.new.tap do |o|
248
+ o.name = "DetectDocumentText"
249
+ o.http_method = "POST"
250
+ o.http_request_uri = "/"
251
+ o.input = Shapes::ShapeRef.new(shape: DetectDocumentTextRequest)
252
+ o.output = Shapes::ShapeRef.new(shape: DetectDocumentTextResponse)
253
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
254
+ o.errors << Shapes::ShapeRef.new(shape: InvalidS3ObjectException)
255
+ o.errors << Shapes::ShapeRef.new(shape: UnsupportedDocumentException)
256
+ o.errors << Shapes::ShapeRef.new(shape: DocumentTooLargeException)
257
+ o.errors << Shapes::ShapeRef.new(shape: BadDocumentException)
258
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
259
+ o.errors << Shapes::ShapeRef.new(shape: ProvisionedThroughputExceededException)
260
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
261
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
262
+ end)
263
+
264
+ api.add_operation(:get_document_analysis, Seahorse::Model::Operation.new.tap do |o|
265
+ o.name = "GetDocumentAnalysis"
266
+ o.http_method = "POST"
267
+ o.http_request_uri = "/"
268
+ o.input = Shapes::ShapeRef.new(shape: GetDocumentAnalysisRequest)
269
+ o.output = Shapes::ShapeRef.new(shape: GetDocumentAnalysisResponse)
270
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
271
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
272
+ o.errors << Shapes::ShapeRef.new(shape: ProvisionedThroughputExceededException)
273
+ o.errors << Shapes::ShapeRef.new(shape: InvalidJobIdException)
274
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
275
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
276
+ end)
277
+
278
+ api.add_operation(:get_document_text_detection, Seahorse::Model::Operation.new.tap do |o|
279
+ o.name = "GetDocumentTextDetection"
280
+ o.http_method = "POST"
281
+ o.http_request_uri = "/"
282
+ o.input = Shapes::ShapeRef.new(shape: GetDocumentTextDetectionRequest)
283
+ o.output = Shapes::ShapeRef.new(shape: GetDocumentTextDetectionResponse)
284
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
285
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
286
+ o.errors << Shapes::ShapeRef.new(shape: ProvisionedThroughputExceededException)
287
+ o.errors << Shapes::ShapeRef.new(shape: InvalidJobIdException)
288
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
289
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
290
+ end)
291
+
292
+ api.add_operation(:start_document_analysis, Seahorse::Model::Operation.new.tap do |o|
293
+ o.name = "StartDocumentAnalysis"
294
+ o.http_method = "POST"
295
+ o.http_request_uri = "/"
296
+ o.input = Shapes::ShapeRef.new(shape: StartDocumentAnalysisRequest)
297
+ o.output = Shapes::ShapeRef.new(shape: StartDocumentAnalysisResponse)
298
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
299
+ o.errors << Shapes::ShapeRef.new(shape: InvalidS3ObjectException)
300
+ o.errors << Shapes::ShapeRef.new(shape: UnsupportedDocumentException)
301
+ o.errors << Shapes::ShapeRef.new(shape: DocumentTooLargeException)
302
+ o.errors << Shapes::ShapeRef.new(shape: BadDocumentException)
303
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
304
+ o.errors << Shapes::ShapeRef.new(shape: ProvisionedThroughputExceededException)
305
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
306
+ o.errors << Shapes::ShapeRef.new(shape: IdempotentParameterMismatchException)
307
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
308
+ o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
309
+ end)
310
+
311
+ api.add_operation(:start_document_text_detection, Seahorse::Model::Operation.new.tap do |o|
312
+ o.name = "StartDocumentTextDetection"
313
+ o.http_method = "POST"
314
+ o.http_request_uri = "/"
315
+ o.input = Shapes::ShapeRef.new(shape: StartDocumentTextDetectionRequest)
316
+ o.output = Shapes::ShapeRef.new(shape: StartDocumentTextDetectionResponse)
317
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
318
+ o.errors << Shapes::ShapeRef.new(shape: InvalidS3ObjectException)
319
+ o.errors << Shapes::ShapeRef.new(shape: UnsupportedDocumentException)
320
+ o.errors << Shapes::ShapeRef.new(shape: DocumentTooLargeException)
321
+ o.errors << Shapes::ShapeRef.new(shape: BadDocumentException)
322
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
323
+ o.errors << Shapes::ShapeRef.new(shape: ProvisionedThroughputExceededException)
324
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
325
+ o.errors << Shapes::ShapeRef.new(shape: IdempotentParameterMismatchException)
326
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
327
+ o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
328
+ end)
329
+ end
330
+
331
+ end
332
+ end
File without changes
@@ -0,0 +1,14 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws::Textract
9
+ module Errors
10
+
11
+ extend Aws::Errors::DynamicErrors
12
+
13
+ end
14
+ end
@@ -0,0 +1,23 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws::Textract
9
+ class Resource
10
+
11
+ # @param options ({})
12
+ # @option options [Client] :client
13
+ def initialize(options = {})
14
+ @client = options[:client] || Client.new(options)
15
+ end
16
+
17
+ # @return [Client]
18
+ def client
19
+ @client
20
+ end
21
+
22
+ end
23
+ end
@@ -0,0 +1,845 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws::Textract
9
+ module Types
10
+
11
+ # @note When making an API call, you may pass AnalyzeDocumentRequest
12
+ # data as a hash:
13
+ #
14
+ # {
15
+ # document: { # required
16
+ # bytes: "data",
17
+ # s3_object: {
18
+ # bucket: "S3Bucket",
19
+ # name: "S3ObjectName",
20
+ # version: "S3ObjectVersion",
21
+ # },
22
+ # },
23
+ # feature_types: ["TABLES"], # required, accepts TABLES, FORMS
24
+ # }
25
+ #
26
+ # @!attribute [rw] document
27
+ # The input document as base64-encoded bytes or an Amazon S3 object.
28
+ # If you use the AWS CLI to call Amazon Textract operations, you
29
+ # can't pass image bytes. The document must be an image in JPG or PNG
30
+ # format.
31
+ # @return [Types::Document]
32
+ #
33
+ # @!attribute [rw] feature_types
34
+ # A list of the types of analysis to perform. Add TABLES to the list
35
+ # to return information about the tables detected in the input
36
+ # document. Add FORMS to return detected fields and the associated
37
+ # text. To perform both types of analysis, add TABLES and FORMS to
38
+ # `FeatureTypes`.
39
+ # @return [Array<String>]
40
+ #
41
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/AnalyzeDocumentRequest AWS API Documentation
42
+ #
43
+ class AnalyzeDocumentRequest < Struct.new(
44
+ :document,
45
+ :feature_types)
46
+ include Aws::Structure
47
+ end
48
+
49
+ # @!attribute [rw] document_metadata
50
+ # Metadata about the analyzed document. An example is the number of
51
+ # pages.
52
+ # @return [Types::DocumentMetadata]
53
+ #
54
+ # @!attribute [rw] blocks
55
+ # The text that's detected and analyzed by `AnalyzeDocument`.
56
+ # @return [Array<Types::Block>]
57
+ #
58
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/AnalyzeDocumentResponse AWS API Documentation
59
+ #
60
+ class AnalyzeDocumentResponse < Struct.new(
61
+ :document_metadata,
62
+ :blocks)
63
+ include Aws::Structure
64
+ end
65
+
66
+ # A `Block` represents text that's recognized in a document within a
67
+ # group of pixels close to each other. The information returned in a
68
+ # `Block` depends on the type of operation. In document-text detection
69
+ # (for example DetectDocumentText), you get information about the
70
+ # detected words and lines of text. In text analysis (for example
71
+ # AnalyzeDocument), you can get information about the fields and tables
72
+ # that are detected in the document.
73
+ #
74
+ # An array of `Block` objects is returned by both synchronous and
75
+ # asynchronous operations. In synchronous operations, such as
76
+ # DetectDocumentText, the array of `Block` objects is the entire set of
77
+ # results. In asynchronous operations, such as GetDocumentAnalysis, the
78
+ # array is returned over one or more responses.
79
+ #
80
+ # @!attribute [rw] block_type
81
+ # The type of text that's recognized in a block. In text-detection
82
+ # operations, the following types are returned:
83
+ #
84
+ # * *PAGE* - Contains a list of the LINE Block objects that are
85
+ # detected on a specific page.
86
+ #
87
+ # * *WORD* - One or more ISO basic Latin script characters that
88
+ # aren't separated by spaces.
89
+ #
90
+ # * *LINE* - A string of equally spaced words.
91
+ #
92
+ # In text analysis operations, the following types are returned:
93
+ #
94
+ # * *PAGE* - Contains a list of child Block objects that are detected
95
+ # on a specific page.
96
+ #
97
+ # * *KEY\_VALUE\_SET* - Stores the KEY and VALUE Block objects for a
98
+ # field that's detected in a document. Use the `EntityType` field
99
+ # to determine if a KEY\_VALUE\_SET object is a KEY Block object or
100
+ # a VALUE Block object.
101
+ #
102
+ # * *WORD* - One or more ISO basic Latin script characters that
103
+ # aren't separated by spaces.
104
+ #
105
+ # * *LINE* - A string of tab-delimited, contiguous words.
106
+ #
107
+ # * *TABLE* - A table that's detected in the document.
108
+ #
109
+ # * *CELL* - A cell within a detected table. The cell is the parent of
110
+ # the block that contains the text in the cell.
111
+ # @return [String]
112
+ #
113
+ # @!attribute [rw] confidence
114
+ # The confidence that Amazon Textract has in the accuracy of the
115
+ # recognized text and the accuracy of the geometry points around the
116
+ # recognized text.
117
+ # @return [Float]
118
+ #
119
+ # @!attribute [rw] text
120
+ # The word or line of text that's recognized by Amazon Textract.
121
+ # @return [String]
122
+ #
123
+ # @!attribute [rw] row_index
124
+ # The row in which a table cell is located. The first row position is
125
+ # 1. `RowIndex` isn't returned by `DetectDocumentText` and
126
+ # `GetDocumentTextDetection`.
127
+ # @return [Integer]
128
+ #
129
+ # @!attribute [rw] column_index
130
+ # The column in which a table cell appears. The first column position
131
+ # is 1. `ColumnIndex` isn't returned by `DetectDocumentText` and
132
+ # `GetDocumentTextDetection`.
133
+ # @return [Integer]
134
+ #
135
+ # @!attribute [rw] row_span
136
+ # The number of rows that a table spans. `RowSpan` isn't returned by
137
+ # `DetectDocumentText` and `GetDocumentTextDetection`.
138
+ # @return [Integer]
139
+ #
140
+ # @!attribute [rw] column_span
141
+ # The number of columns that a table cell spans. `ColumnSpan` isn't
142
+ # returned by `DetectDocumentText` and `GetDocumentTextDetection`.
143
+ # @return [Integer]
144
+ #
145
+ # @!attribute [rw] geometry
146
+ # The location of the recognized text on the image. It includes an
147
+ # axis-aligned, coarse bounding box that surrounds the text, and a
148
+ # finer-grain polygon for more accurate spatial information.
149
+ # @return [Types::Geometry]
150
+ #
151
+ # @!attribute [rw] id
152
+ # The identifier for the recognized text. The identifier is only
153
+ # unique for a single operation.
154
+ # @return [String]
155
+ #
156
+ # @!attribute [rw] relationships
157
+ # A list of child blocks of the current block. For example a LINE
158
+ # object has child blocks for each WORD block that's part of the line
159
+ # of text. There aren't Relationship objects in the list for
160
+ # relationships that don't exist, such as when the current block has
161
+ # no child blocks. The list size can be the following:
162
+ #
163
+ # * 0 - The block has no child blocks.
164
+ #
165
+ # * 1 - The block has child blocks.
166
+ # @return [Array<Types::Relationship>]
167
+ #
168
+ # @!attribute [rw] entity_types
169
+ # The type of entity. The following can be returned:
170
+ #
171
+ # * *KEY* - An identifier for a field on the document.
172
+ #
173
+ # * *VALUE* - The field text.
174
+ #
175
+ # `EntityTypes` isn't returned by `DetectDocumentText` and
176
+ # `GetDocumentTextDetection`.
177
+ # @return [Array<String>]
178
+ #
179
+ # @!attribute [rw] page
180
+ # The page in which a block was detected.
181
+ # @return [Integer]
182
+ #
183
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/Block AWS API Documentation
184
+ #
185
+ class Block < Struct.new(
186
+ :block_type,
187
+ :confidence,
188
+ :text,
189
+ :row_index,
190
+ :column_index,
191
+ :row_span,
192
+ :column_span,
193
+ :geometry,
194
+ :id,
195
+ :relationships,
196
+ :entity_types,
197
+ :page)
198
+ include Aws::Structure
199
+ end
200
+
201
+ # The bounding box around the recognized text, key, value, table or
202
+ # table cell on a document page. The `left` (x-coordinate) and `top`
203
+ # (y-coordinate) are coordinates that represent the top and left sides
204
+ # of the bounding box. Note that the upper-left corner of the image is
205
+ # the origin (0,0).
206
+ #
207
+ # The `top` and `left` values returned are ratios of the overall
208
+ # document page size. For example, if the input image is 700 x 200
209
+ # pixels, and the top-left coordinate of the bounding box is 350 x 50
210
+ # pixels, the API returns a `left` value of 0.5 (350/700) and a `top`
211
+ # value of 0.25 (50/200).
212
+ #
213
+ # The `width` and `height` values represent the dimensions of the
214
+ # bounding box as a ratio of the overall document page dimension. For
215
+ # example, if the document page size is 700 x 200 pixels, and the
216
+ # bounding box width is 70 pixels, the width returned is 0.1.
217
+ #
218
+ # @!attribute [rw] width
219
+ # The width of the bounding box as a ratio of the overall document
220
+ # page width.
221
+ # @return [Float]
222
+ #
223
+ # @!attribute [rw] height
224
+ # The height of the bounding box as a ratio of the overall document
225
+ # page height.
226
+ # @return [Float]
227
+ #
228
+ # @!attribute [rw] left
229
+ # The left coordinate of the bounding box as a ratio of overall
230
+ # document page width.
231
+ # @return [Float]
232
+ #
233
+ # @!attribute [rw] top
234
+ # The top coordinate of the bounding box as a ratio of overall
235
+ # document page height.
236
+ # @return [Float]
237
+ #
238
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/BoundingBox AWS API Documentation
239
+ #
240
+ class BoundingBox < Struct.new(
241
+ :width,
242
+ :height,
243
+ :left,
244
+ :top)
245
+ include Aws::Structure
246
+ end
247
+
248
+ # @note When making an API call, you may pass DetectDocumentTextRequest
249
+ # data as a hash:
250
+ #
251
+ # {
252
+ # document: { # required
253
+ # bytes: "data",
254
+ # s3_object: {
255
+ # bucket: "S3Bucket",
256
+ # name: "S3ObjectName",
257
+ # version: "S3ObjectVersion",
258
+ # },
259
+ # },
260
+ # }
261
+ #
262
+ # @!attribute [rw] document
263
+ # The input document as base64-encoded bytes or an Amazon S3 object.
264
+ # If you use the AWS CLI to call Amazon Textract operations, you
265
+ # can't pass image bytes. The document must be an image in JPG or PNG
266
+ # format.
267
+ # @return [Types::Document]
268
+ #
269
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/DetectDocumentTextRequest AWS API Documentation
270
+ #
271
+ class DetectDocumentTextRequest < Struct.new(
272
+ :document)
273
+ include Aws::Structure
274
+ end
275
+
276
+ # @!attribute [rw] document_metadata
277
+ # Metadata about the document. Contains the number of pages that are
278
+ # detected in the document.
279
+ # @return [Types::DocumentMetadata]
280
+ #
281
+ # @!attribute [rw] blocks
282
+ # An array of Block objects containing the text detected in the
283
+ # document.
284
+ # @return [Array<Types::Block>]
285
+ #
286
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/DetectDocumentTextResponse AWS API Documentation
287
+ #
288
+ class DetectDocumentTextResponse < Struct.new(
289
+ :document_metadata,
290
+ :blocks)
291
+ include Aws::Structure
292
+ end
293
+
294
+ # The input document, either as bytes or as an S3 object.
295
+ #
296
+ # You pass image bytes to an Amazon Textract API operation by using the
297
+ # `Bytes` property. For example, you would use the `Bytes` property to
298
+ # pass a document loaded from a local file system. Image bytes passed by
299
+ # using the `Bytes` property must be base64 encoded. Your code might not
300
+ # need to encode document file bytes if you're using an AWS SDK to call
301
+ # Amazon Textract API operations.
302
+ #
303
+ # You pass images stored in an S3 bucket to an Amazon Textract API
304
+ # operation by using the `S3Object` property. Documents stored in an S3
305
+ # bucket don't need to be base64 encoded.
306
+ #
307
+ # The AWS Region for the S3 bucket that contains the S3 object must
308
+ # match the Region that you use for Amazon Textract operations.
309
+ #
310
+ # If you use the AWS CLI to call Amazon Textract operations, passing
311
+ # image bytes using the Bytes property isn't supported. You must first
312
+ # upload the document to an Amazon S3 bucket, and then call the
313
+ # operation using the S3Object property.
314
+ #
315
+ # For Amazon Textract to process an S3 object, the user must have
316
+ # permission to access the S3 object.
317
+ #
318
+ # @note When making an API call, you may pass Document
319
+ # data as a hash:
320
+ #
321
+ # {
322
+ # bytes: "data",
323
+ # s3_object: {
324
+ # bucket: "S3Bucket",
325
+ # name: "S3ObjectName",
326
+ # version: "S3ObjectVersion",
327
+ # },
328
+ # }
329
+ #
330
+ # @!attribute [rw] bytes
331
+ # A blob of documents bytes. The maximum size of a document that's
332
+ # provided in a blob of bytes is 5 MB.
333
+ # @return [String]
334
+ #
335
+ # @!attribute [rw] s3_object
336
+ # Identifies an S3 object as the document source. The maximum size of
337
+ # a document stored in an S3 bucket is 5 MB.
338
+ # @return [Types::S3Object]
339
+ #
340
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/Document AWS API Documentation
341
+ #
342
+ class Document < Struct.new(
343
+ :bytes,
344
+ :s3_object)
345
+ include Aws::Structure
346
+ end
347
+
348
+ # The Amazon S3 bucket that contains the document to be processed. It's
349
+ # used by asynchronous operations such as StartDocumentTextDetection.
350
+ #
351
+ # The input document can be an image file in JPG or PNG format. It can
352
+ # also be a file in PDF format.
353
+ #
354
+ # @note When making an API call, you may pass DocumentLocation
355
+ # data as a hash:
356
+ #
357
+ # {
358
+ # s3_object: {
359
+ # bucket: "S3Bucket",
360
+ # name: "S3ObjectName",
361
+ # version: "S3ObjectVersion",
362
+ # },
363
+ # }
364
+ #
365
+ # @!attribute [rw] s3_object
366
+ # The Amazon S3 bucket that contains the input document.
367
+ # @return [Types::S3Object]
368
+ #
369
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/DocumentLocation AWS API Documentation
370
+ #
371
+ class DocumentLocation < Struct.new(
372
+ :s3_object)
373
+ include Aws::Structure
374
+ end
375
+
376
+ # Information about the input document.
377
+ #
378
+ # @!attribute [rw] pages
379
+ # The number of pages detected in the document.
380
+ # @return [Integer]
381
+ #
382
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/DocumentMetadata AWS API Documentation
383
+ #
384
+ class DocumentMetadata < Struct.new(
385
+ :pages)
386
+ include Aws::Structure
387
+ end
388
+
389
+ # Information about where a recognized text, key, value, table, or table
390
+ # cell is located on a document page.
391
+ #
392
+ # @!attribute [rw] bounding_box
393
+ # An axis-aligned coarse representation of the location of the
394
+ # recognized text on the document page.
395
+ # @return [Types::BoundingBox]
396
+ #
397
+ # @!attribute [rw] polygon
398
+ # Within the bounding box, a fine-grained polygon around the
399
+ # recognized text.
400
+ # @return [Array<Types::Point>]
401
+ #
402
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/Geometry AWS API Documentation
403
+ #
404
+ class Geometry < Struct.new(
405
+ :bounding_box,
406
+ :polygon)
407
+ include Aws::Structure
408
+ end
409
+
410
+ # @note When making an API call, you may pass GetDocumentAnalysisRequest
411
+ # data as a hash:
412
+ #
413
+ # {
414
+ # job_id: "JobId", # required
415
+ # max_results: 1,
416
+ # next_token: "PaginationToken",
417
+ # }
418
+ #
419
+ # @!attribute [rw] job_id
420
+ # A unique identifier for the text-detection job. The `JobId` is
421
+ # returned from `StartDocumentAnalysis`.
422
+ # @return [String]
423
+ #
424
+ # @!attribute [rw] max_results
425
+ # The maximum number of results to return per paginated call. The
426
+ # largest value that you can specify is 1,000. If you specify a value
427
+ # greater than 1,000, a maximum of 1,000 results is returned. The
428
+ # default value is 1,000.
429
+ # @return [Integer]
430
+ #
431
+ # @!attribute [rw] next_token
432
+ # If the previous response was incomplete (because there are more
433
+ # blocks to retrieve), Amazon Textract returns a pagination token in
434
+ # the response. You can use this pagination token to retrieve the next
435
+ # set of blocks.
436
+ # @return [String]
437
+ #
438
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/GetDocumentAnalysisRequest AWS API Documentation
439
+ #
440
+ class GetDocumentAnalysisRequest < Struct.new(
441
+ :job_id,
442
+ :max_results,
443
+ :next_token)
444
+ include Aws::Structure
445
+ end
446
+
447
+ # @!attribute [rw] document_metadata
448
+ # Information about a document that Amazon Textract processed.
449
+ # `DocumentMetadata` is returned in every page of paginated responses
450
+ # from an Amazon Textract video operation.
451
+ # @return [Types::DocumentMetadata]
452
+ #
453
+ # @!attribute [rw] job_status
454
+ # The current status of the text detection job.
455
+ # @return [String]
456
+ #
457
+ # @!attribute [rw] next_token
458
+ # If the response is truncated, Amazon Textract returns this token.
459
+ # You can use this token in the subsequent request to retrieve the
460
+ # next set of text detection results.
461
+ # @return [String]
462
+ #
463
+ # @!attribute [rw] blocks
464
+ # The results of the text analysis operation.
465
+ # @return [Array<Types::Block>]
466
+ #
467
+ # @!attribute [rw] warnings
468
+ # A list of warnings that occurred during the document analysis
469
+ # operation.
470
+ # @return [Array<Types::Warning>]
471
+ #
472
+ # @!attribute [rw] status_message
473
+ # The current status of an asynchronous document analysis operation.
474
+ # @return [String]
475
+ #
476
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/GetDocumentAnalysisResponse AWS API Documentation
477
+ #
478
+ class GetDocumentAnalysisResponse < Struct.new(
479
+ :document_metadata,
480
+ :job_status,
481
+ :next_token,
482
+ :blocks,
483
+ :warnings,
484
+ :status_message)
485
+ include Aws::Structure
486
+ end
487
+
488
+ # @note When making an API call, you may pass GetDocumentTextDetectionRequest
489
+ # data as a hash:
490
+ #
491
+ # {
492
+ # job_id: "JobId", # required
493
+ # max_results: 1,
494
+ # next_token: "PaginationToken",
495
+ # }
496
+ #
497
+ # @!attribute [rw] job_id
498
+ # A unique identifier for the text detection job. The `JobId` is
499
+ # returned from `StartDocumentTextDetection`.
500
+ # @return [String]
501
+ #
502
+ # @!attribute [rw] max_results
503
+ # The maximum number of results to return per paginated call. The
504
+ # largest value you can specify is 1,000. If you specify a value
505
+ # greater than 1,000, a maximum of 1,000 results is returned. The
506
+ # default value is 1,000.
507
+ # @return [Integer]
508
+ #
509
+ # @!attribute [rw] next_token
510
+ # If the previous response was incomplete (because there are more
511
+ # blocks to retrieve), Amazon Textract returns a pagination token in
512
+ # the response. You can use this pagination token to retrieve the next
513
+ # set of blocks.
514
+ # @return [String]
515
+ #
516
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/GetDocumentTextDetectionRequest AWS API Documentation
517
+ #
518
+ class GetDocumentTextDetectionRequest < Struct.new(
519
+ :job_id,
520
+ :max_results,
521
+ :next_token)
522
+ include Aws::Structure
523
+ end
524
+
525
+ # @!attribute [rw] document_metadata
526
+ # Information about a document that Amazon Textract processed.
527
+ # `DocumentMetadata` is returned in every page of paginated responses
528
+ # from an Amazon Textract video operation.
529
+ # @return [Types::DocumentMetadata]
530
+ #
531
+ # @!attribute [rw] job_status
532
+ # The current status of the text detection job.
533
+ # @return [String]
534
+ #
535
+ # @!attribute [rw] next_token
536
+ # If the response is truncated, Amazon Textract returns this token.
537
+ # You can use this token in the subsequent request to retrieve the
538
+ # next set of text-detection results.
539
+ # @return [String]
540
+ #
541
+ # @!attribute [rw] blocks
542
+ # The results of the text-detection operation.
543
+ # @return [Array<Types::Block>]
544
+ #
545
+ # @!attribute [rw] warnings
546
+ # A list of warnings that occurred during the document text-detection
547
+ # operation.
548
+ # @return [Array<Types::Warning>]
549
+ #
550
+ # @!attribute [rw] status_message
551
+ # The current status of an asynchronous document text-detection
552
+ # operation.
553
+ # @return [String]
554
+ #
555
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/GetDocumentTextDetectionResponse AWS API Documentation
556
+ #
557
+ class GetDocumentTextDetectionResponse < Struct.new(
558
+ :document_metadata,
559
+ :job_status,
560
+ :next_token,
561
+ :blocks,
562
+ :warnings,
563
+ :status_message)
564
+ include Aws::Structure
565
+ end
566
+
567
+ # The Amazon Simple Notification Service (Amazon SNS) topic to which
568
+ # Amazon Textract publishes the completion status of an asynchronous
569
+ # document operation, such as StartDocumentTextDetection.
570
+ #
571
+ # @note When making an API call, you may pass NotificationChannel
572
+ # data as a hash:
573
+ #
574
+ # {
575
+ # sns_topic_arn: "SNSTopicArn", # required
576
+ # role_arn: "RoleArn", # required
577
+ # }
578
+ #
579
+ # @!attribute [rw] sns_topic_arn
580
+ # The Amazon SNS topic that Amazon Textract posts the completion
581
+ # status to.
582
+ # @return [String]
583
+ #
584
+ # @!attribute [rw] role_arn
585
+ # The Amazon Resource Name (ARN) of an IAM role that gives Amazon
586
+ # Textract publishing permissions to the Amazon SNS topic.
587
+ # @return [String]
588
+ #
589
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/NotificationChannel AWS API Documentation
590
+ #
591
+ class NotificationChannel < Struct.new(
592
+ :sns_topic_arn,
593
+ :role_arn)
594
+ include Aws::Structure
595
+ end
596
+
597
+ # The X and Y coordinates of a point on a document page. The X and Y
598
+ # values returned are ratios of the overall document page size. For
599
+ # example, if the input document is 700 x 200 and the operation returns
600
+ # X=0.5 and Y=0.25, then the point is at the (350,50) pixel coordinate
601
+ # on the document page.
602
+ #
603
+ # An array of `Point` objects, `Polygon`, is returned by
604
+ # DetectDocumentText. `Polygon` represents a fine-grained polygon around
605
+ # detected text. For more information, see Geometry in the Amazon
606
+ # Textract Developer Guide.
607
+ #
608
+ # @!attribute [rw] x
609
+ # The value of the X coordinate for a point on a `Polygon`.
610
+ # @return [Float]
611
+ #
612
+ # @!attribute [rw] y
613
+ # The value of the Y coordinate for a point on a `Polygon`.
614
+ # @return [Float]
615
+ #
616
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/Point AWS API Documentation
617
+ #
618
+ class Point < Struct.new(
619
+ :x,
620
+ :y)
621
+ include Aws::Structure
622
+ end
623
+
624
+ # Information about how blocks are related to each other. A `Block`
625
+ # object contains 0 or more `Relation` objects in a list,
626
+ # `Relationships`. For more information, see Block.
627
+ #
628
+ # The `Type` element provides the type of the relationship for all
629
+ # blocks in the `IDs` array.
630
+ #
631
+ # @!attribute [rw] type
632
+ # The type of relationship that the blocks in the IDs array have with
633
+ # the current block. The relationship can be `VALUE` or `CHILD`.
634
+ # @return [String]
635
+ #
636
+ # @!attribute [rw] ids
637
+ # An array of IDs for related blocks. You can get the type of the
638
+ # relationship from the `Type` element.
639
+ # @return [Array<String>]
640
+ #
641
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/Relationship AWS API Documentation
642
+ #
643
+ class Relationship < Struct.new(
644
+ :type,
645
+ :ids)
646
+ include Aws::Structure
647
+ end
648
+
649
+ # The S3 bucket name and file name that identifies the document.
650
+ #
651
+ # The AWS Region for the S3 bucket that contains the document must match
652
+ # the Region that you use for Amazon Textract operations.
653
+ #
654
+ # For Amazon Textract to process a file in an S3 bucket, the user must
655
+ # have permission to access the S3 bucket and file.
656
+ #
657
+ # @note When making an API call, you may pass S3Object
658
+ # data as a hash:
659
+ #
660
+ # {
661
+ # bucket: "S3Bucket",
662
+ # name: "S3ObjectName",
663
+ # version: "S3ObjectVersion",
664
+ # }
665
+ #
666
+ # @!attribute [rw] bucket
667
+ # The name of the S3 bucket.
668
+ # @return [String]
669
+ #
670
+ # @!attribute [rw] name
671
+ # The file name of the input document. It must be an image file (.JPG
672
+ # or .PNG format). Asynchronous operations also support PDF files.
673
+ # @return [String]
674
+ #
675
+ # @!attribute [rw] version
676
+ # If the bucket has versioning enabled, you can specify the object
677
+ # version.
678
+ # @return [String]
679
+ #
680
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/S3Object AWS API Documentation
681
+ #
682
+ class S3Object < Struct.new(
683
+ :bucket,
684
+ :name,
685
+ :version)
686
+ include Aws::Structure
687
+ end
688
+
689
+ # @note When making an API call, you may pass StartDocumentAnalysisRequest
690
+ # data as a hash:
691
+ #
692
+ # {
693
+ # document_location: { # required
694
+ # s3_object: {
695
+ # bucket: "S3Bucket",
696
+ # name: "S3ObjectName",
697
+ # version: "S3ObjectVersion",
698
+ # },
699
+ # },
700
+ # feature_types: ["TABLES"], # required, accepts TABLES, FORMS
701
+ # client_request_token: "ClientRequestToken",
702
+ # job_tag: "JobTag",
703
+ # notification_channel: {
704
+ # sns_topic_arn: "SNSTopicArn", # required
705
+ # role_arn: "RoleArn", # required
706
+ # },
707
+ # }
708
+ #
709
+ # @!attribute [rw] document_location
710
+ # The location of the document to be processed.
711
+ # @return [Types::DocumentLocation]
712
+ #
713
+ # @!attribute [rw] feature_types
714
+ # A list of the types of analysis to perform. Add TABLES to the list
715
+ # to return information about the tables that are detected in the
716
+ # input document. Add FORMS to return detected fields and the
717
+ # associated text. To perform both types of analysis, add TABLES and
718
+ # FORMS to `FeatureTypes`.
719
+ # @return [Array<String>]
720
+ #
721
+ # @!attribute [rw] client_request_token
722
+ # The idempotent token that you use to identify the start request. If
723
+ # you use the same token with multiple `StartDocumentAnalysis`
724
+ # requests, the same `JobId` is returned. Use `ClientRequestToken` to
725
+ # prevent the same job from being accidentally started more than once.
726
+ # @return [String]
727
+ #
728
+ # @!attribute [rw] job_tag
729
+ # The unique identifier you specify to identify the job in the
730
+ # completion status that's published to the Amazon SNS topic.
731
+ # @return [String]
732
+ #
733
+ # @!attribute [rw] notification_channel
734
+ # The Amazon SNS topic ARN that you want Amazon Textract to publish
735
+ # the completion status of the operation to.
736
+ # @return [Types::NotificationChannel]
737
+ #
738
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/StartDocumentAnalysisRequest AWS API Documentation
739
+ #
740
+ class StartDocumentAnalysisRequest < Struct.new(
741
+ :document_location,
742
+ :feature_types,
743
+ :client_request_token,
744
+ :job_tag,
745
+ :notification_channel)
746
+ include Aws::Structure
747
+ end
748
+
749
+ # @!attribute [rw] job_id
750
+ # The identifier for the document text-detection job. Use `JobId` to
751
+ # identify the job in a subsequent call to `GetDocumentAnalysis`.
752
+ # @return [String]
753
+ #
754
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/StartDocumentAnalysisResponse AWS API Documentation
755
+ #
756
+ class StartDocumentAnalysisResponse < Struct.new(
757
+ :job_id)
758
+ include Aws::Structure
759
+ end
760
+
761
+ # @note When making an API call, you may pass StartDocumentTextDetectionRequest
762
+ # data as a hash:
763
+ #
764
+ # {
765
+ # document_location: { # required
766
+ # s3_object: {
767
+ # bucket: "S3Bucket",
768
+ # name: "S3ObjectName",
769
+ # version: "S3ObjectVersion",
770
+ # },
771
+ # },
772
+ # client_request_token: "ClientRequestToken",
773
+ # job_tag: "JobTag",
774
+ # notification_channel: {
775
+ # sns_topic_arn: "SNSTopicArn", # required
776
+ # role_arn: "RoleArn", # required
777
+ # },
778
+ # }
779
+ #
780
+ # @!attribute [rw] document_location
781
+ # The location of the document to be processed.
782
+ # @return [Types::DocumentLocation]
783
+ #
784
+ # @!attribute [rw] client_request_token
785
+ # The idempotent token that's used to identify the start request. If
786
+ # you use the same token with multiple `StartDocumentTextDetection`
787
+ # requests, the same `JobId` is returned. Use `ClientRequestToken` to
788
+ # prevent the same job from being accidentally started more than once.
789
+ # @return [String]
790
+ #
791
+ # @!attribute [rw] job_tag
792
+ # A unique identifier you specify to identify the job in the
793
+ # completion status that's published to the Amazon Simple
794
+ # Notification Service (Amazon SNS) topic.
795
+ # @return [String]
796
+ #
797
+ # @!attribute [rw] notification_channel
798
+ # The Amazon SNS topic ARN that you want Amazon Textract to publish
799
+ # the completion status of the operation to.
800
+ # @return [Types::NotificationChannel]
801
+ #
802
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/StartDocumentTextDetectionRequest AWS API Documentation
803
+ #
804
+ class StartDocumentTextDetectionRequest < Struct.new(
805
+ :document_location,
806
+ :client_request_token,
807
+ :job_tag,
808
+ :notification_channel)
809
+ include Aws::Structure
810
+ end
811
+
812
+ # @!attribute [rw] job_id
813
+ # The identifier for the document text-detection job. Use `JobId` to
814
+ # identify the job in a subsequent call to `GetDocumentTextDetection`.
815
+ # @return [String]
816
+ #
817
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/StartDocumentTextDetectionResponse AWS API Documentation
818
+ #
819
+ class StartDocumentTextDetectionResponse < Struct.new(
820
+ :job_id)
821
+ include Aws::Structure
822
+ end
823
+
824
+ # A warning about an issue that occurred during asynchronous text
825
+ # analysis (StartDocumentAnalysis) or asynchronous document-text
826
+ # detection (StartDocumentTextDetection).
827
+ #
828
+ # @!attribute [rw] error_code
829
+ # The error code for the warning.
830
+ # @return [String]
831
+ #
832
+ # @!attribute [rw] pages
833
+ # A list of the pages that the warning applies to.
834
+ # @return [Array<Integer>]
835
+ #
836
+ # @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/Warning AWS API Documentation
837
+ #
838
+ class Warning < Struct.new(
839
+ :error_code,
840
+ :pages)
841
+ include Aws::Structure
842
+ end
843
+
844
+ end
845
+ end