aws-sdk-translate 1.18.0 → 1.23.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/aws-sdk-translate.rb +7 -4
- data/lib/aws-sdk-translate/client.rb +308 -49
- data/lib/aws-sdk-translate/client_api.rb +159 -0
- data/lib/aws-sdk-translate/errors.rb +47 -9
- data/lib/aws-sdk-translate/resource.rb +1 -0
- data/lib/aws-sdk-translate/types.rb +480 -8
- metadata +5 -5
@@ -14,7 +14,11 @@ module Aws::Translate
|
|
14
14
|
AppliedTerminology = Shapes::StructureShape.new(name: 'AppliedTerminology')
|
15
15
|
AppliedTerminologyList = Shapes::ListShape.new(name: 'AppliedTerminologyList')
|
16
16
|
BoundedLengthString = Shapes::StringShape.new(name: 'BoundedLengthString')
|
17
|
+
ClientTokenString = Shapes::StringShape.new(name: 'ClientTokenString')
|
18
|
+
ContentType = Shapes::StringShape.new(name: 'ContentType')
|
17
19
|
DeleteTerminologyRequest = Shapes::StructureShape.new(name: 'DeleteTerminologyRequest')
|
20
|
+
DescribeTextTranslationJobRequest = Shapes::StructureShape.new(name: 'DescribeTextTranslationJobRequest')
|
21
|
+
DescribeTextTranslationJobResponse = Shapes::StructureShape.new(name: 'DescribeTextTranslationJobResponse')
|
18
22
|
Description = Shapes::StringShape.new(name: 'Description')
|
19
23
|
DetectedLanguageLowConfidenceException = Shapes::StructureShape.new(name: 'DetectedLanguageLowConfidenceException')
|
20
24
|
EncryptionKey = Shapes::StructureShape.new(name: 'EncryptionKey')
|
@@ -22,25 +26,41 @@ module Aws::Translate
|
|
22
26
|
EncryptionKeyType = Shapes::StringShape.new(name: 'EncryptionKeyType')
|
23
27
|
GetTerminologyRequest = Shapes::StructureShape.new(name: 'GetTerminologyRequest')
|
24
28
|
GetTerminologyResponse = Shapes::StructureShape.new(name: 'GetTerminologyResponse')
|
29
|
+
IamRoleArn = Shapes::StringShape.new(name: 'IamRoleArn')
|
25
30
|
ImportTerminologyRequest = Shapes::StructureShape.new(name: 'ImportTerminologyRequest')
|
26
31
|
ImportTerminologyResponse = Shapes::StructureShape.new(name: 'ImportTerminologyResponse')
|
32
|
+
InputDataConfig = Shapes::StructureShape.new(name: 'InputDataConfig')
|
27
33
|
Integer = Shapes::IntegerShape.new(name: 'Integer')
|
28
34
|
InternalServerException = Shapes::StructureShape.new(name: 'InternalServerException')
|
35
|
+
InvalidFilterException = Shapes::StructureShape.new(name: 'InvalidFilterException')
|
29
36
|
InvalidParameterValueException = Shapes::StructureShape.new(name: 'InvalidParameterValueException')
|
30
37
|
InvalidRequestException = Shapes::StructureShape.new(name: 'InvalidRequestException')
|
38
|
+
JobDetails = Shapes::StructureShape.new(name: 'JobDetails')
|
39
|
+
JobId = Shapes::StringShape.new(name: 'JobId')
|
40
|
+
JobName = Shapes::StringShape.new(name: 'JobName')
|
41
|
+
JobStatus = Shapes::StringShape.new(name: 'JobStatus')
|
31
42
|
LanguageCodeString = Shapes::StringShape.new(name: 'LanguageCodeString')
|
32
43
|
LanguageCodeStringList = Shapes::ListShape.new(name: 'LanguageCodeStringList')
|
33
44
|
LimitExceededException = Shapes::StructureShape.new(name: 'LimitExceededException')
|
34
45
|
ListTerminologiesRequest = Shapes::StructureShape.new(name: 'ListTerminologiesRequest')
|
35
46
|
ListTerminologiesResponse = Shapes::StructureShape.new(name: 'ListTerminologiesResponse')
|
47
|
+
ListTextTranslationJobsRequest = Shapes::StructureShape.new(name: 'ListTextTranslationJobsRequest')
|
48
|
+
ListTextTranslationJobsResponse = Shapes::StructureShape.new(name: 'ListTextTranslationJobsResponse')
|
36
49
|
MaxResultsInteger = Shapes::IntegerShape.new(name: 'MaxResultsInteger')
|
37
50
|
MergeStrategy = Shapes::StringShape.new(name: 'MergeStrategy')
|
38
51
|
NextToken = Shapes::StringShape.new(name: 'NextToken')
|
52
|
+
OutputDataConfig = Shapes::StructureShape.new(name: 'OutputDataConfig')
|
39
53
|
ResourceName = Shapes::StringShape.new(name: 'ResourceName')
|
40
54
|
ResourceNameList = Shapes::ListShape.new(name: 'ResourceNameList')
|
41
55
|
ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
|
56
|
+
S3Uri = Shapes::StringShape.new(name: 'S3Uri')
|
42
57
|
ServiceUnavailableException = Shapes::StructureShape.new(name: 'ServiceUnavailableException')
|
58
|
+
StartTextTranslationJobRequest = Shapes::StructureShape.new(name: 'StartTextTranslationJobRequest')
|
59
|
+
StartTextTranslationJobResponse = Shapes::StructureShape.new(name: 'StartTextTranslationJobResponse')
|
60
|
+
StopTextTranslationJobRequest = Shapes::StructureShape.new(name: 'StopTextTranslationJobRequest')
|
61
|
+
StopTextTranslationJobResponse = Shapes::StructureShape.new(name: 'StopTextTranslationJobResponse')
|
43
62
|
String = Shapes::StringShape.new(name: 'String')
|
63
|
+
TargetLanguageCodeStringList = Shapes::ListShape.new(name: 'TargetLanguageCodeStringList')
|
44
64
|
Term = Shapes::StructureShape.new(name: 'Term')
|
45
65
|
TermList = Shapes::ListShape.new(name: 'TermList')
|
46
66
|
TerminologyArn = Shapes::StringShape.new(name: 'TerminologyArn')
|
@@ -51,10 +71,14 @@ module Aws::Translate
|
|
51
71
|
TerminologyProperties = Shapes::StructureShape.new(name: 'TerminologyProperties')
|
52
72
|
TerminologyPropertiesList = Shapes::ListShape.new(name: 'TerminologyPropertiesList')
|
53
73
|
TextSizeLimitExceededException = Shapes::StructureShape.new(name: 'TextSizeLimitExceededException')
|
74
|
+
TextTranslationJobFilter = Shapes::StructureShape.new(name: 'TextTranslationJobFilter')
|
75
|
+
TextTranslationJobProperties = Shapes::StructureShape.new(name: 'TextTranslationJobProperties')
|
76
|
+
TextTranslationJobPropertiesList = Shapes::ListShape.new(name: 'TextTranslationJobPropertiesList')
|
54
77
|
Timestamp = Shapes::TimestampShape.new(name: 'Timestamp')
|
55
78
|
TooManyRequestsException = Shapes::StructureShape.new(name: 'TooManyRequestsException')
|
56
79
|
TranslateTextRequest = Shapes::StructureShape.new(name: 'TranslateTextRequest')
|
57
80
|
TranslateTextResponse = Shapes::StructureShape.new(name: 'TranslateTextResponse')
|
81
|
+
UnboundedLengthString = Shapes::StringShape.new(name: 'UnboundedLengthString')
|
58
82
|
UnsupportedLanguagePairException = Shapes::StructureShape.new(name: 'UnsupportedLanguagePairException')
|
59
83
|
|
60
84
|
AppliedTerminology.add_member(:name, Shapes::ShapeRef.new(shape: ResourceName, location_name: "Name"))
|
@@ -66,6 +90,12 @@ module Aws::Translate
|
|
66
90
|
DeleteTerminologyRequest.add_member(:name, Shapes::ShapeRef.new(shape: ResourceName, required: true, location_name: "Name"))
|
67
91
|
DeleteTerminologyRequest.struct_class = Types::DeleteTerminologyRequest
|
68
92
|
|
93
|
+
DescribeTextTranslationJobRequest.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, required: true, location_name: "JobId"))
|
94
|
+
DescribeTextTranslationJobRequest.struct_class = Types::DescribeTextTranslationJobRequest
|
95
|
+
|
96
|
+
DescribeTextTranslationJobResponse.add_member(:text_translation_job_properties, Shapes::ShapeRef.new(shape: TextTranslationJobProperties, location_name: "TextTranslationJobProperties"))
|
97
|
+
DescribeTextTranslationJobResponse.struct_class = Types::DescribeTextTranslationJobResponse
|
98
|
+
|
69
99
|
DetectedLanguageLowConfidenceException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
70
100
|
DetectedLanguageLowConfidenceException.add_member(:detected_language_code, Shapes::ShapeRef.new(shape: LanguageCodeString, location_name: "DetectedLanguageCode"))
|
71
101
|
DetectedLanguageLowConfidenceException.struct_class = Types::DetectedLanguageLowConfidenceException
|
@@ -92,15 +122,27 @@ module Aws::Translate
|
|
92
122
|
ImportTerminologyResponse.add_member(:terminology_properties, Shapes::ShapeRef.new(shape: TerminologyProperties, location_name: "TerminologyProperties"))
|
93
123
|
ImportTerminologyResponse.struct_class = Types::ImportTerminologyResponse
|
94
124
|
|
125
|
+
InputDataConfig.add_member(:s3_uri, Shapes::ShapeRef.new(shape: S3Uri, required: true, location_name: "S3Uri"))
|
126
|
+
InputDataConfig.add_member(:content_type, Shapes::ShapeRef.new(shape: ContentType, required: true, location_name: "ContentType"))
|
127
|
+
InputDataConfig.struct_class = Types::InputDataConfig
|
128
|
+
|
95
129
|
InternalServerException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
96
130
|
InternalServerException.struct_class = Types::InternalServerException
|
97
131
|
|
132
|
+
InvalidFilterException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
133
|
+
InvalidFilterException.struct_class = Types::InvalidFilterException
|
134
|
+
|
98
135
|
InvalidParameterValueException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
99
136
|
InvalidParameterValueException.struct_class = Types::InvalidParameterValueException
|
100
137
|
|
101
138
|
InvalidRequestException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
102
139
|
InvalidRequestException.struct_class = Types::InvalidRequestException
|
103
140
|
|
141
|
+
JobDetails.add_member(:translated_documents_count, Shapes::ShapeRef.new(shape: Integer, location_name: "TranslatedDocumentsCount"))
|
142
|
+
JobDetails.add_member(:documents_with_errors_count, Shapes::ShapeRef.new(shape: Integer, location_name: "DocumentsWithErrorsCount"))
|
143
|
+
JobDetails.add_member(:input_documents_count, Shapes::ShapeRef.new(shape: Integer, location_name: "InputDocumentsCount"))
|
144
|
+
JobDetails.struct_class = Types::JobDetails
|
145
|
+
|
104
146
|
LanguageCodeStringList.member = Shapes::ShapeRef.new(shape: LanguageCodeString)
|
105
147
|
|
106
148
|
LimitExceededException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
@@ -114,6 +156,18 @@ module Aws::Translate
|
|
114
156
|
ListTerminologiesResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "NextToken"))
|
115
157
|
ListTerminologiesResponse.struct_class = Types::ListTerminologiesResponse
|
116
158
|
|
159
|
+
ListTextTranslationJobsRequest.add_member(:filter, Shapes::ShapeRef.new(shape: TextTranslationJobFilter, location_name: "Filter"))
|
160
|
+
ListTextTranslationJobsRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "NextToken"))
|
161
|
+
ListTextTranslationJobsRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResultsInteger, location_name: "MaxResults"))
|
162
|
+
ListTextTranslationJobsRequest.struct_class = Types::ListTextTranslationJobsRequest
|
163
|
+
|
164
|
+
ListTextTranslationJobsResponse.add_member(:text_translation_job_properties_list, Shapes::ShapeRef.new(shape: TextTranslationJobPropertiesList, location_name: "TextTranslationJobPropertiesList"))
|
165
|
+
ListTextTranslationJobsResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "NextToken"))
|
166
|
+
ListTextTranslationJobsResponse.struct_class = Types::ListTextTranslationJobsResponse
|
167
|
+
|
168
|
+
OutputDataConfig.add_member(:s3_uri, Shapes::ShapeRef.new(shape: S3Uri, required: true, location_name: "S3Uri"))
|
169
|
+
OutputDataConfig.struct_class = Types::OutputDataConfig
|
170
|
+
|
117
171
|
ResourceNameList.member = Shapes::ShapeRef.new(shape: ResourceName)
|
118
172
|
|
119
173
|
ResourceNotFoundException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
@@ -122,6 +176,29 @@ module Aws::Translate
|
|
122
176
|
ServiceUnavailableException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
123
177
|
ServiceUnavailableException.struct_class = Types::ServiceUnavailableException
|
124
178
|
|
179
|
+
StartTextTranslationJobRequest.add_member(:job_name, Shapes::ShapeRef.new(shape: JobName, location_name: "JobName"))
|
180
|
+
StartTextTranslationJobRequest.add_member(:input_data_config, Shapes::ShapeRef.new(shape: InputDataConfig, required: true, location_name: "InputDataConfig"))
|
181
|
+
StartTextTranslationJobRequest.add_member(:output_data_config, Shapes::ShapeRef.new(shape: OutputDataConfig, required: true, location_name: "OutputDataConfig"))
|
182
|
+
StartTextTranslationJobRequest.add_member(:data_access_role_arn, Shapes::ShapeRef.new(shape: IamRoleArn, required: true, location_name: "DataAccessRoleArn"))
|
183
|
+
StartTextTranslationJobRequest.add_member(:source_language_code, Shapes::ShapeRef.new(shape: LanguageCodeString, required: true, location_name: "SourceLanguageCode"))
|
184
|
+
StartTextTranslationJobRequest.add_member(:target_language_codes, Shapes::ShapeRef.new(shape: TargetLanguageCodeStringList, required: true, location_name: "TargetLanguageCodes"))
|
185
|
+
StartTextTranslationJobRequest.add_member(:terminology_names, Shapes::ShapeRef.new(shape: ResourceNameList, location_name: "TerminologyNames"))
|
186
|
+
StartTextTranslationJobRequest.add_member(:client_token, Shapes::ShapeRef.new(shape: ClientTokenString, required: true, location_name: "ClientToken", metadata: {"idempotencyToken"=>true}))
|
187
|
+
StartTextTranslationJobRequest.struct_class = Types::StartTextTranslationJobRequest
|
188
|
+
|
189
|
+
StartTextTranslationJobResponse.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, location_name: "JobId"))
|
190
|
+
StartTextTranslationJobResponse.add_member(:job_status, Shapes::ShapeRef.new(shape: JobStatus, location_name: "JobStatus"))
|
191
|
+
StartTextTranslationJobResponse.struct_class = Types::StartTextTranslationJobResponse
|
192
|
+
|
193
|
+
StopTextTranslationJobRequest.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, required: true, location_name: "JobId"))
|
194
|
+
StopTextTranslationJobRequest.struct_class = Types::StopTextTranslationJobRequest
|
195
|
+
|
196
|
+
StopTextTranslationJobResponse.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, location_name: "JobId"))
|
197
|
+
StopTextTranslationJobResponse.add_member(:job_status, Shapes::ShapeRef.new(shape: JobStatus, location_name: "JobStatus"))
|
198
|
+
StopTextTranslationJobResponse.struct_class = Types::StopTextTranslationJobResponse
|
199
|
+
|
200
|
+
TargetLanguageCodeStringList.member = Shapes::ShapeRef.new(shape: LanguageCodeString)
|
201
|
+
|
125
202
|
Term.add_member(:source_text, Shapes::ShapeRef.new(shape: String, location_name: "SourceText"))
|
126
203
|
Term.add_member(:target_text, Shapes::ShapeRef.new(shape: String, location_name: "TargetText"))
|
127
204
|
Term.struct_class = Types::Term
|
@@ -153,6 +230,29 @@ module Aws::Translate
|
|
153
230
|
TextSizeLimitExceededException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
154
231
|
TextSizeLimitExceededException.struct_class = Types::TextSizeLimitExceededException
|
155
232
|
|
233
|
+
TextTranslationJobFilter.add_member(:job_name, Shapes::ShapeRef.new(shape: JobName, location_name: "JobName"))
|
234
|
+
TextTranslationJobFilter.add_member(:job_status, Shapes::ShapeRef.new(shape: JobStatus, location_name: "JobStatus"))
|
235
|
+
TextTranslationJobFilter.add_member(:submitted_before_time, Shapes::ShapeRef.new(shape: Timestamp, location_name: "SubmittedBeforeTime"))
|
236
|
+
TextTranslationJobFilter.add_member(:submitted_after_time, Shapes::ShapeRef.new(shape: Timestamp, location_name: "SubmittedAfterTime"))
|
237
|
+
TextTranslationJobFilter.struct_class = Types::TextTranslationJobFilter
|
238
|
+
|
239
|
+
TextTranslationJobProperties.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, location_name: "JobId"))
|
240
|
+
TextTranslationJobProperties.add_member(:job_name, Shapes::ShapeRef.new(shape: JobName, location_name: "JobName"))
|
241
|
+
TextTranslationJobProperties.add_member(:job_status, Shapes::ShapeRef.new(shape: JobStatus, location_name: "JobStatus"))
|
242
|
+
TextTranslationJobProperties.add_member(:job_details, Shapes::ShapeRef.new(shape: JobDetails, location_name: "JobDetails"))
|
243
|
+
TextTranslationJobProperties.add_member(:source_language_code, Shapes::ShapeRef.new(shape: LanguageCodeString, location_name: "SourceLanguageCode"))
|
244
|
+
TextTranslationJobProperties.add_member(:target_language_codes, Shapes::ShapeRef.new(shape: TargetLanguageCodeStringList, location_name: "TargetLanguageCodes"))
|
245
|
+
TextTranslationJobProperties.add_member(:terminology_names, Shapes::ShapeRef.new(shape: ResourceNameList, location_name: "TerminologyNames"))
|
246
|
+
TextTranslationJobProperties.add_member(:message, Shapes::ShapeRef.new(shape: UnboundedLengthString, location_name: "Message"))
|
247
|
+
TextTranslationJobProperties.add_member(:submitted_time, Shapes::ShapeRef.new(shape: Timestamp, location_name: "SubmittedTime"))
|
248
|
+
TextTranslationJobProperties.add_member(:end_time, Shapes::ShapeRef.new(shape: Timestamp, location_name: "EndTime"))
|
249
|
+
TextTranslationJobProperties.add_member(:input_data_config, Shapes::ShapeRef.new(shape: InputDataConfig, location_name: "InputDataConfig"))
|
250
|
+
TextTranslationJobProperties.add_member(:output_data_config, Shapes::ShapeRef.new(shape: OutputDataConfig, location_name: "OutputDataConfig"))
|
251
|
+
TextTranslationJobProperties.add_member(:data_access_role_arn, Shapes::ShapeRef.new(shape: IamRoleArn, location_name: "DataAccessRoleArn"))
|
252
|
+
TextTranslationJobProperties.struct_class = Types::TextTranslationJobProperties
|
253
|
+
|
254
|
+
TextTranslationJobPropertiesList.member = Shapes::ShapeRef.new(shape: TextTranslationJobProperties)
|
255
|
+
|
156
256
|
TooManyRequestsException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
157
257
|
TooManyRequestsException.struct_class = Types::TooManyRequestsException
|
158
258
|
|
@@ -203,6 +303,17 @@ module Aws::Translate
|
|
203
303
|
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
204
304
|
end)
|
205
305
|
|
306
|
+
api.add_operation(:describe_text_translation_job, Seahorse::Model::Operation.new.tap do |o|
|
307
|
+
o.name = "DescribeTextTranslationJob"
|
308
|
+
o.http_method = "POST"
|
309
|
+
o.http_request_uri = "/"
|
310
|
+
o.input = Shapes::ShapeRef.new(shape: DescribeTextTranslationJobRequest)
|
311
|
+
o.output = Shapes::ShapeRef.new(shape: DescribeTextTranslationJobResponse)
|
312
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
313
|
+
o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
|
314
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
315
|
+
end)
|
316
|
+
|
206
317
|
api.add_operation(:get_terminology, Seahorse::Model::Operation.new.tap do |o|
|
207
318
|
o.name = "GetTerminology"
|
208
319
|
o.http_method = "POST"
|
@@ -236,6 +347,54 @@ module Aws::Translate
|
|
236
347
|
o.errors << Shapes::ShapeRef.new(shape: InvalidParameterValueException)
|
237
348
|
o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
|
238
349
|
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
350
|
+
o[:pager] = Aws::Pager.new(
|
351
|
+
limit_key: "max_results",
|
352
|
+
tokens: {
|
353
|
+
"next_token" => "next_token"
|
354
|
+
}
|
355
|
+
)
|
356
|
+
end)
|
357
|
+
|
358
|
+
api.add_operation(:list_text_translation_jobs, Seahorse::Model::Operation.new.tap do |o|
|
359
|
+
o.name = "ListTextTranslationJobs"
|
360
|
+
o.http_method = "POST"
|
361
|
+
o.http_request_uri = "/"
|
362
|
+
o.input = Shapes::ShapeRef.new(shape: ListTextTranslationJobsRequest)
|
363
|
+
o.output = Shapes::ShapeRef.new(shape: ListTextTranslationJobsResponse)
|
364
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
|
365
|
+
o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
|
366
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidFilterException)
|
367
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
368
|
+
o[:pager] = Aws::Pager.new(
|
369
|
+
limit_key: "max_results",
|
370
|
+
tokens: {
|
371
|
+
"next_token" => "next_token"
|
372
|
+
}
|
373
|
+
)
|
374
|
+
end)
|
375
|
+
|
376
|
+
api.add_operation(:start_text_translation_job, Seahorse::Model::Operation.new.tap do |o|
|
377
|
+
o.name = "StartTextTranslationJob"
|
378
|
+
o.http_method = "POST"
|
379
|
+
o.http_request_uri = "/"
|
380
|
+
o.input = Shapes::ShapeRef.new(shape: StartTextTranslationJobRequest)
|
381
|
+
o.output = Shapes::ShapeRef.new(shape: StartTextTranslationJobResponse)
|
382
|
+
o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
|
383
|
+
o.errors << Shapes::ShapeRef.new(shape: UnsupportedLanguagePairException)
|
384
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
|
385
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
386
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
387
|
+
end)
|
388
|
+
|
389
|
+
api.add_operation(:stop_text_translation_job, Seahorse::Model::Operation.new.tap do |o|
|
390
|
+
o.name = "StopTextTranslationJob"
|
391
|
+
o.http_method = "POST"
|
392
|
+
o.http_request_uri = "/"
|
393
|
+
o.input = Shapes::ShapeRef.new(shape: StopTextTranslationJobRequest)
|
394
|
+
o.output = Shapes::ShapeRef.new(shape: StopTextTranslationJobResponse)
|
395
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
396
|
+
o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
|
397
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
239
398
|
end)
|
240
399
|
|
241
400
|
api.add_operation(:translate_text, Seahorse::Model::Operation.new.tap do |o|
|
@@ -6,6 +6,39 @@
|
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
7
7
|
|
8
8
|
module Aws::Translate
|
9
|
+
|
10
|
+
# When Translate returns an error response, the Ruby SDK constructs and raises an error.
|
11
|
+
# These errors all extend Aws::Translate::Errors::ServiceError < {Aws::Errors::ServiceError}
|
12
|
+
#
|
13
|
+
# You can rescue all Translate errors using ServiceError:
|
14
|
+
#
|
15
|
+
# begin
|
16
|
+
# # do stuff
|
17
|
+
# rescue Aws::Translate::Errors::ServiceError
|
18
|
+
# # rescues all Translate API errors
|
19
|
+
# end
|
20
|
+
#
|
21
|
+
#
|
22
|
+
# ## Request Context
|
23
|
+
# ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns
|
24
|
+
# information about the request that generated the error.
|
25
|
+
# See {Seahorse::Client::RequestContext} for more information.
|
26
|
+
#
|
27
|
+
# ## Error Classes
|
28
|
+
# * {DetectedLanguageLowConfidenceException}
|
29
|
+
# * {InternalServerException}
|
30
|
+
# * {InvalidFilterException}
|
31
|
+
# * {InvalidParameterValueException}
|
32
|
+
# * {InvalidRequestException}
|
33
|
+
# * {LimitExceededException}
|
34
|
+
# * {ResourceNotFoundException}
|
35
|
+
# * {ServiceUnavailableException}
|
36
|
+
# * {TextSizeLimitExceededException}
|
37
|
+
# * {TooManyRequestsException}
|
38
|
+
# * {UnsupportedLanguagePairException}
|
39
|
+
#
|
40
|
+
# Additionally, error classes are dynamically generated for service errors based on the error code
|
41
|
+
# if they are not defined above.
|
9
42
|
module Errors
|
10
43
|
|
11
44
|
extend Aws::Errors::DynamicErrors
|
@@ -28,7 +61,6 @@ module Aws::Translate
|
|
28
61
|
def detected_language_code
|
29
62
|
@data[:detected_language_code]
|
30
63
|
end
|
31
|
-
|
32
64
|
end
|
33
65
|
|
34
66
|
class InternalServerException < ServiceError
|
@@ -44,7 +76,21 @@ module Aws::Translate
|
|
44
76
|
def message
|
45
77
|
@message || @data[:message]
|
46
78
|
end
|
79
|
+
end
|
47
80
|
|
81
|
+
class InvalidFilterException < ServiceError
|
82
|
+
|
83
|
+
# @param [Seahorse::Client::RequestContext] context
|
84
|
+
# @param [String] message
|
85
|
+
# @param [Aws::Translate::Types::InvalidFilterException] data
|
86
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
87
|
+
super(context, message, data)
|
88
|
+
end
|
89
|
+
|
90
|
+
# @return [String]
|
91
|
+
def message
|
92
|
+
@message || @data[:message]
|
93
|
+
end
|
48
94
|
end
|
49
95
|
|
50
96
|
class InvalidParameterValueException < ServiceError
|
@@ -60,7 +106,6 @@ module Aws::Translate
|
|
60
106
|
def message
|
61
107
|
@message || @data[:message]
|
62
108
|
end
|
63
|
-
|
64
109
|
end
|
65
110
|
|
66
111
|
class InvalidRequestException < ServiceError
|
@@ -76,7 +121,6 @@ module Aws::Translate
|
|
76
121
|
def message
|
77
122
|
@message || @data[:message]
|
78
123
|
end
|
79
|
-
|
80
124
|
end
|
81
125
|
|
82
126
|
class LimitExceededException < ServiceError
|
@@ -92,7 +136,6 @@ module Aws::Translate
|
|
92
136
|
def message
|
93
137
|
@message || @data[:message]
|
94
138
|
end
|
95
|
-
|
96
139
|
end
|
97
140
|
|
98
141
|
class ResourceNotFoundException < ServiceError
|
@@ -108,7 +151,6 @@ module Aws::Translate
|
|
108
151
|
def message
|
109
152
|
@message || @data[:message]
|
110
153
|
end
|
111
|
-
|
112
154
|
end
|
113
155
|
|
114
156
|
class ServiceUnavailableException < ServiceError
|
@@ -124,7 +166,6 @@ module Aws::Translate
|
|
124
166
|
def message
|
125
167
|
@message || @data[:message]
|
126
168
|
end
|
127
|
-
|
128
169
|
end
|
129
170
|
|
130
171
|
class TextSizeLimitExceededException < ServiceError
|
@@ -140,7 +181,6 @@ module Aws::Translate
|
|
140
181
|
def message
|
141
182
|
@message || @data[:message]
|
142
183
|
end
|
143
|
-
|
144
184
|
end
|
145
185
|
|
146
186
|
class TooManyRequestsException < ServiceError
|
@@ -156,7 +196,6 @@ module Aws::Translate
|
|
156
196
|
def message
|
157
197
|
@message || @data[:message]
|
158
198
|
end
|
159
|
-
|
160
199
|
end
|
161
200
|
|
162
201
|
class UnsupportedLanguagePairException < ServiceError
|
@@ -182,7 +221,6 @@ module Aws::Translate
|
|
182
221
|
def target_language_code
|
183
222
|
@data[:target_language_code]
|
184
223
|
end
|
185
|
-
|
186
224
|
end
|
187
225
|
|
188
226
|
end
|
@@ -52,6 +52,38 @@ module Aws::Translate
|
|
52
52
|
include Aws::Structure
|
53
53
|
end
|
54
54
|
|
55
|
+
# @note When making an API call, you may pass DescribeTextTranslationJobRequest
|
56
|
+
# data as a hash:
|
57
|
+
#
|
58
|
+
# {
|
59
|
+
# job_id: "JobId", # required
|
60
|
+
# }
|
61
|
+
#
|
62
|
+
# @!attribute [rw] job_id
|
63
|
+
# The identifier that Amazon Translate generated for the job. The
|
64
|
+
# StartTextTranslationJob operation returns this identifier in its
|
65
|
+
# response.
|
66
|
+
# @return [String]
|
67
|
+
#
|
68
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/DescribeTextTranslationJobRequest AWS API Documentation
|
69
|
+
#
|
70
|
+
class DescribeTextTranslationJobRequest < Struct.new(
|
71
|
+
:job_id)
|
72
|
+
include Aws::Structure
|
73
|
+
end
|
74
|
+
|
75
|
+
# @!attribute [rw] text_translation_job_properties
|
76
|
+
# An object that contains the properties associated with an
|
77
|
+
# asynchronous batch translation job.
|
78
|
+
# @return [Types::TextTranslationJobProperties]
|
79
|
+
#
|
80
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/DescribeTextTranslationJobResponse AWS API Documentation
|
81
|
+
#
|
82
|
+
class DescribeTextTranslationJobResponse < Struct.new(
|
83
|
+
:text_translation_job_properties)
|
84
|
+
include Aws::Structure
|
85
|
+
end
|
86
|
+
|
55
87
|
# The confidence that Amazon Comprehend accurately detected the source
|
56
88
|
# language is low. If a low confidence level is acceptable for your
|
57
89
|
# application, you can use the language in the exception to call Amazon
|
@@ -213,6 +245,37 @@ module Aws::Translate
|
|
213
245
|
include Aws::Structure
|
214
246
|
end
|
215
247
|
|
248
|
+
# The input configuration properties for requesting a batch translation
|
249
|
+
# job.
|
250
|
+
#
|
251
|
+
# @note When making an API call, you may pass InputDataConfig
|
252
|
+
# data as a hash:
|
253
|
+
#
|
254
|
+
# {
|
255
|
+
# s3_uri: "S3Uri", # required
|
256
|
+
# content_type: "ContentType", # required
|
257
|
+
# }
|
258
|
+
#
|
259
|
+
# @!attribute [rw] s3_uri
|
260
|
+
# The URI of the AWS S3 folder that contains the input file. The
|
261
|
+
# folder must be in the same Region as the API endpoint you are
|
262
|
+
# calling.
|
263
|
+
# @return [String]
|
264
|
+
#
|
265
|
+
# @!attribute [rw] content_type
|
266
|
+
# The multipurpose internet mail extension (MIME) type of the input
|
267
|
+
# files. Valid values are `text/plain` for plaintext files and
|
268
|
+
# `text/html` for HTML files.
|
269
|
+
# @return [String]
|
270
|
+
#
|
271
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/InputDataConfig AWS API Documentation
|
272
|
+
#
|
273
|
+
class InputDataConfig < Struct.new(
|
274
|
+
:s3_uri,
|
275
|
+
:content_type)
|
276
|
+
include Aws::Structure
|
277
|
+
end
|
278
|
+
|
216
279
|
# An internal server error occurred. Retry your request.
|
217
280
|
#
|
218
281
|
# @!attribute [rw] message
|
@@ -225,6 +288,19 @@ module Aws::Translate
|
|
225
288
|
include Aws::Structure
|
226
289
|
end
|
227
290
|
|
291
|
+
# The filter specified for the operation is invalid. Specify a different
|
292
|
+
# filter.
|
293
|
+
#
|
294
|
+
# @!attribute [rw] message
|
295
|
+
# @return [String]
|
296
|
+
#
|
297
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/InvalidFilterException AWS API Documentation
|
298
|
+
#
|
299
|
+
class InvalidFilterException < Struct.new(
|
300
|
+
:message)
|
301
|
+
include Aws::Structure
|
302
|
+
end
|
303
|
+
|
228
304
|
# The value of the parameter is invalid. Review the value of the
|
229
305
|
# parameter you are using to correct it, and then retry your operation.
|
230
306
|
#
|
@@ -251,6 +327,32 @@ module Aws::Translate
|
|
251
327
|
include Aws::Structure
|
252
328
|
end
|
253
329
|
|
330
|
+
# The number of documents successfully and unsuccessfully processed
|
331
|
+
# during a translation job.
|
332
|
+
#
|
333
|
+
# @!attribute [rw] translated_documents_count
|
334
|
+
# The number of documents successfully processed during a translation
|
335
|
+
# job.
|
336
|
+
# @return [Integer]
|
337
|
+
#
|
338
|
+
# @!attribute [rw] documents_with_errors_count
|
339
|
+
# The number of documents that could not be processed during a
|
340
|
+
# translation job.
|
341
|
+
# @return [Integer]
|
342
|
+
#
|
343
|
+
# @!attribute [rw] input_documents_count
|
344
|
+
# The number of documents used as input in a translation job.
|
345
|
+
# @return [Integer]
|
346
|
+
#
|
347
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/JobDetails AWS API Documentation
|
348
|
+
#
|
349
|
+
class JobDetails < Struct.new(
|
350
|
+
:translated_documents_count,
|
351
|
+
:documents_with_errors_count,
|
352
|
+
:input_documents_count)
|
353
|
+
include Aws::Structure
|
354
|
+
end
|
355
|
+
|
254
356
|
# The specified limit has been exceeded. Review your request and retry
|
255
357
|
# it with a quantity below the stated limit.
|
256
358
|
#
|
@@ -309,9 +411,86 @@ module Aws::Translate
|
|
309
411
|
include Aws::Structure
|
310
412
|
end
|
311
413
|
|
414
|
+
# @note When making an API call, you may pass ListTextTranslationJobsRequest
|
415
|
+
# data as a hash:
|
416
|
+
#
|
417
|
+
# {
|
418
|
+
# filter: {
|
419
|
+
# job_name: "JobName",
|
420
|
+
# job_status: "SUBMITTED", # accepts SUBMITTED, IN_PROGRESS, COMPLETED, COMPLETED_WITH_ERROR, FAILED, STOP_REQUESTED, STOPPED
|
421
|
+
# submitted_before_time: Time.now,
|
422
|
+
# submitted_after_time: Time.now,
|
423
|
+
# },
|
424
|
+
# next_token: "NextToken",
|
425
|
+
# max_results: 1,
|
426
|
+
# }
|
427
|
+
#
|
428
|
+
# @!attribute [rw] filter
|
429
|
+
# The parameters that specify which batch translation jobs to
|
430
|
+
# retrieve. Filters include job name, job status, and submission time.
|
431
|
+
# You can only set one filter at a time.
|
432
|
+
# @return [Types::TextTranslationJobFilter]
|
433
|
+
#
|
434
|
+
# @!attribute [rw] next_token
|
435
|
+
# The token to request the next page of results.
|
436
|
+
# @return [String]
|
437
|
+
#
|
438
|
+
# @!attribute [rw] max_results
|
439
|
+
# The maximum number of results to return in each page. The default
|
440
|
+
# value is 100.
|
441
|
+
# @return [Integer]
|
442
|
+
#
|
443
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ListTextTranslationJobsRequest AWS API Documentation
|
444
|
+
#
|
445
|
+
class ListTextTranslationJobsRequest < Struct.new(
|
446
|
+
:filter,
|
447
|
+
:next_token,
|
448
|
+
:max_results)
|
449
|
+
include Aws::Structure
|
450
|
+
end
|
451
|
+
|
452
|
+
# @!attribute [rw] text_translation_job_properties_list
|
453
|
+
# A list containing the properties of each job that is returned.
|
454
|
+
# @return [Array<Types::TextTranslationJobProperties>]
|
455
|
+
#
|
456
|
+
# @!attribute [rw] next_token
|
457
|
+
# The token to use to retreive the next page of results. This value is
|
458
|
+
# `null` when there are no more results to return.
|
459
|
+
# @return [String]
|
460
|
+
#
|
461
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ListTextTranslationJobsResponse AWS API Documentation
|
462
|
+
#
|
463
|
+
class ListTextTranslationJobsResponse < Struct.new(
|
464
|
+
:text_translation_job_properties_list,
|
465
|
+
:next_token)
|
466
|
+
include Aws::Structure
|
467
|
+
end
|
468
|
+
|
469
|
+
# The output configuration properties for a batch translation job.
|
470
|
+
#
|
471
|
+
# @note When making an API call, you may pass OutputDataConfig
|
472
|
+
# data as a hash:
|
473
|
+
#
|
474
|
+
# {
|
475
|
+
# s3_uri: "S3Uri", # required
|
476
|
+
# }
|
477
|
+
#
|
478
|
+
# @!attribute [rw] s3_uri
|
479
|
+
# The URI of the S3 folder that contains a translation job's output
|
480
|
+
# file. The folder must be in the same Region as the API endpoint that
|
481
|
+
# you are calling.
|
482
|
+
# @return [String]
|
483
|
+
#
|
484
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/OutputDataConfig AWS API Documentation
|
485
|
+
#
|
486
|
+
class OutputDataConfig < Struct.new(
|
487
|
+
:s3_uri)
|
488
|
+
include Aws::Structure
|
489
|
+
end
|
490
|
+
|
312
491
|
# The resource you are looking for has not been found. Review the
|
313
492
|
# resource you're looking for and see if a different resource will
|
314
|
-
# accomplish your needs before retrying the revised request.
|
493
|
+
# accomplish your needs before retrying the revised request.
|
315
494
|
#
|
316
495
|
# @!attribute [rw] message
|
317
496
|
# @return [String]
|
@@ -336,6 +515,162 @@ module Aws::Translate
|
|
336
515
|
include Aws::Structure
|
337
516
|
end
|
338
517
|
|
518
|
+
# @note When making an API call, you may pass StartTextTranslationJobRequest
|
519
|
+
# data as a hash:
|
520
|
+
#
|
521
|
+
# {
|
522
|
+
# job_name: "JobName",
|
523
|
+
# input_data_config: { # required
|
524
|
+
# s3_uri: "S3Uri", # required
|
525
|
+
# content_type: "ContentType", # required
|
526
|
+
# },
|
527
|
+
# output_data_config: { # required
|
528
|
+
# s3_uri: "S3Uri", # required
|
529
|
+
# },
|
530
|
+
# data_access_role_arn: "IamRoleArn", # required
|
531
|
+
# source_language_code: "LanguageCodeString", # required
|
532
|
+
# target_language_codes: ["LanguageCodeString"], # required
|
533
|
+
# terminology_names: ["ResourceName"],
|
534
|
+
# client_token: "ClientTokenString", # required
|
535
|
+
# }
|
536
|
+
#
|
537
|
+
# @!attribute [rw] job_name
|
538
|
+
# The name of the batch translation job to be performed.
|
539
|
+
# @return [String]
|
540
|
+
#
|
541
|
+
# @!attribute [rw] input_data_config
|
542
|
+
# Specifies the format and S3 location of the input documents for the
|
543
|
+
# translation job.
|
544
|
+
# @return [Types::InputDataConfig]
|
545
|
+
#
|
546
|
+
# @!attribute [rw] output_data_config
|
547
|
+
# Specifies the S3 folder to which your job output will be saved.
|
548
|
+
# @return [Types::OutputDataConfig]
|
549
|
+
#
|
550
|
+
# @!attribute [rw] data_access_role_arn
|
551
|
+
# The Amazon Resource Name (ARN) of an AWS Identity Access and
|
552
|
+
# Management (IAM) role that grants Amazon Translate read access to
|
553
|
+
# your input data. For more nformation, see
|
554
|
+
# identity-and-access-management.
|
555
|
+
# @return [String]
|
556
|
+
#
|
557
|
+
# @!attribute [rw] source_language_code
|
558
|
+
# The language code of the input language. For a list of language
|
559
|
+
# codes, see what-is-languages.
|
560
|
+
#
|
561
|
+
# Amazon Translate does not automatically detect a source language
|
562
|
+
# during batch translation jobs.
|
563
|
+
# @return [String]
|
564
|
+
#
|
565
|
+
# @!attribute [rw] target_language_codes
|
566
|
+
# The language code of the output language.
|
567
|
+
# @return [Array<String>]
|
568
|
+
#
|
569
|
+
# @!attribute [rw] terminology_names
|
570
|
+
# The name of the terminology to use in the batch translation job. For
|
571
|
+
# a list of available terminologies, use the ListTerminologies
|
572
|
+
# operation.
|
573
|
+
# @return [Array<String>]
|
574
|
+
#
|
575
|
+
# @!attribute [rw] client_token
|
576
|
+
# The client token of the EC2 instance calling the request. This token
|
577
|
+
# is auto-generated when using the Amazon Translate SDK. Otherwise,
|
578
|
+
# use the
|
579
|
+
# [DescribeInstances](docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html)
|
580
|
+
# EC2 operation to retreive an instance's client token. For more
|
581
|
+
# information, see [Client
|
582
|
+
# Tokens](docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html#client-tokens)
|
583
|
+
# in the EC2 User Guide.
|
584
|
+
#
|
585
|
+
# **A suitable default value is auto-generated.** You should normally
|
586
|
+
# not need to pass this option.
|
587
|
+
# @return [String]
|
588
|
+
#
|
589
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/StartTextTranslationJobRequest AWS API Documentation
|
590
|
+
#
|
591
|
+
class StartTextTranslationJobRequest < Struct.new(
|
592
|
+
:job_name,
|
593
|
+
:input_data_config,
|
594
|
+
:output_data_config,
|
595
|
+
:data_access_role_arn,
|
596
|
+
:source_language_code,
|
597
|
+
:target_language_codes,
|
598
|
+
:terminology_names,
|
599
|
+
:client_token)
|
600
|
+
include Aws::Structure
|
601
|
+
end
|
602
|
+
|
603
|
+
# @!attribute [rw] job_id
|
604
|
+
# The identifier generated for the job. To get the status of a job,
|
605
|
+
# use this ID with the DescribeTextTranslationJob operation.
|
606
|
+
# @return [String]
|
607
|
+
#
|
608
|
+
# @!attribute [rw] job_status
|
609
|
+
# The status of the job. Possible values include:
|
610
|
+
#
|
611
|
+
# * `SUBMITTED` - The job has been received and is queued for
|
612
|
+
# processing.
|
613
|
+
#
|
614
|
+
# * `IN_PROGRESS` - Amazon Translate is processing the job.
|
615
|
+
#
|
616
|
+
# * `COMPLETED` - The job was successfully completed and the output is
|
617
|
+
# available.
|
618
|
+
#
|
619
|
+
# * `COMPLETED_WITH_ERRORS` - The job was completed with errors. The
|
620
|
+
# errors can be analyzed in the job's output.
|
621
|
+
#
|
622
|
+
# * `FAILED` - The job did not complete. To get details, use the
|
623
|
+
# DescribeTextTranslationJob operation.
|
624
|
+
#
|
625
|
+
# * `STOP_REQUESTED` - The user who started the job has requested that
|
626
|
+
# it be stopped.
|
627
|
+
#
|
628
|
+
# * `STOPPED` - The job has been stopped.
|
629
|
+
# @return [String]
|
630
|
+
#
|
631
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/StartTextTranslationJobResponse AWS API Documentation
|
632
|
+
#
|
633
|
+
class StartTextTranslationJobResponse < Struct.new(
|
634
|
+
:job_id,
|
635
|
+
:job_status)
|
636
|
+
include Aws::Structure
|
637
|
+
end
|
638
|
+
|
639
|
+
# @note When making an API call, you may pass StopTextTranslationJobRequest
|
640
|
+
# data as a hash:
|
641
|
+
#
|
642
|
+
# {
|
643
|
+
# job_id: "JobId", # required
|
644
|
+
# }
|
645
|
+
#
|
646
|
+
# @!attribute [rw] job_id
|
647
|
+
# The job ID of the job to be stopped.
|
648
|
+
# @return [String]
|
649
|
+
#
|
650
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/StopTextTranslationJobRequest AWS API Documentation
|
651
|
+
#
|
652
|
+
class StopTextTranslationJobRequest < Struct.new(
|
653
|
+
:job_id)
|
654
|
+
include Aws::Structure
|
655
|
+
end
|
656
|
+
|
657
|
+
# @!attribute [rw] job_id
|
658
|
+
# The job ID of the stopped batch translation job.
|
659
|
+
# @return [String]
|
660
|
+
#
|
661
|
+
# @!attribute [rw] job_status
|
662
|
+
# The status of the designated job. Upon successful completion, the
|
663
|
+
# job's status will be `STOPPED`.
|
664
|
+
# @return [String]
|
665
|
+
#
|
666
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/StopTextTranslationJobResponse AWS API Documentation
|
667
|
+
#
|
668
|
+
class StopTextTranslationJobResponse < Struct.new(
|
669
|
+
:job_id,
|
670
|
+
:job_status)
|
671
|
+
include Aws::Structure
|
672
|
+
end
|
673
|
+
|
339
674
|
# The term being translated by the custom terminology.
|
340
675
|
#
|
341
676
|
# @!attribute [rw] source_text
|
@@ -367,7 +702,10 @@ module Aws::Translate
|
|
367
702
|
# }
|
368
703
|
#
|
369
704
|
# @!attribute [rw] file
|
370
|
-
# The file containing the custom terminology data.
|
705
|
+
# The file containing the custom terminology data. Your version of the
|
706
|
+
# AWS SDK performs a Base64-encoding on this field before sending a
|
707
|
+
# request to the AWS service. Users of the SDK should not perform
|
708
|
+
# Base64-encoding themselves.
|
371
709
|
# @return [String]
|
372
710
|
#
|
373
711
|
# @!attribute [rw] format
|
@@ -477,6 +815,134 @@ module Aws::Translate
|
|
477
815
|
include Aws::Structure
|
478
816
|
end
|
479
817
|
|
818
|
+
# Provides information for filtering a list of translation jobs. For
|
819
|
+
# more information, see ListTextTranslationJobs.
|
820
|
+
#
|
821
|
+
# @note When making an API call, you may pass TextTranslationJobFilter
|
822
|
+
# data as a hash:
|
823
|
+
#
|
824
|
+
# {
|
825
|
+
# job_name: "JobName",
|
826
|
+
# job_status: "SUBMITTED", # accepts SUBMITTED, IN_PROGRESS, COMPLETED, COMPLETED_WITH_ERROR, FAILED, STOP_REQUESTED, STOPPED
|
827
|
+
# submitted_before_time: Time.now,
|
828
|
+
# submitted_after_time: Time.now,
|
829
|
+
# }
|
830
|
+
#
|
831
|
+
# @!attribute [rw] job_name
|
832
|
+
# Filters the list of jobs by name.
|
833
|
+
# @return [String]
|
834
|
+
#
|
835
|
+
# @!attribute [rw] job_status
|
836
|
+
# Filters the list of jobs based by job status.
|
837
|
+
# @return [String]
|
838
|
+
#
|
839
|
+
# @!attribute [rw] submitted_before_time
|
840
|
+
# Filters the list of jobs based on the time that the job was
|
841
|
+
# submitted for processing and returns only the jobs submitted before
|
842
|
+
# the specified time. Jobs are returned in ascending order, oldest to
|
843
|
+
# newest.
|
844
|
+
# @return [Time]
|
845
|
+
#
|
846
|
+
# @!attribute [rw] submitted_after_time
|
847
|
+
# Filters the list of jobs based on the time that the job was
|
848
|
+
# submitted for processing and returns only the jobs submitted after
|
849
|
+
# the specified time. Jobs are returned in descending order, newest to
|
850
|
+
# oldest.
|
851
|
+
# @return [Time]
|
852
|
+
#
|
853
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/TextTranslationJobFilter AWS API Documentation
|
854
|
+
#
|
855
|
+
class TextTranslationJobFilter < Struct.new(
|
856
|
+
:job_name,
|
857
|
+
:job_status,
|
858
|
+
:submitted_before_time,
|
859
|
+
:submitted_after_time)
|
860
|
+
include Aws::Structure
|
861
|
+
end
|
862
|
+
|
863
|
+
# Provides information about a translation job.
|
864
|
+
#
|
865
|
+
# @!attribute [rw] job_id
|
866
|
+
# The ID of the translation job.
|
867
|
+
# @return [String]
|
868
|
+
#
|
869
|
+
# @!attribute [rw] job_name
|
870
|
+
# The user-defined name of the translation job.
|
871
|
+
# @return [String]
|
872
|
+
#
|
873
|
+
# @!attribute [rw] job_status
|
874
|
+
# The status of the translation job.
|
875
|
+
# @return [String]
|
876
|
+
#
|
877
|
+
# @!attribute [rw] job_details
|
878
|
+
# The number of documents successfully and unsuccessfully processed
|
879
|
+
# during the translation job.
|
880
|
+
# @return [Types::JobDetails]
|
881
|
+
#
|
882
|
+
# @!attribute [rw] source_language_code
|
883
|
+
# The language code of the language of the source text. The language
|
884
|
+
# must be a language supported by Amazon Translate.
|
885
|
+
# @return [String]
|
886
|
+
#
|
887
|
+
# @!attribute [rw] target_language_codes
|
888
|
+
# The language code of the language of the target text. The language
|
889
|
+
# must be a language supported by Amazon Translate.
|
890
|
+
# @return [Array<String>]
|
891
|
+
#
|
892
|
+
# @!attribute [rw] terminology_names
|
893
|
+
# A list containing the names of the terminologies applied to a
|
894
|
+
# translation job. Only one terminology can be applied per
|
895
|
+
# StartTextTranslationJob request at this time.
|
896
|
+
# @return [Array<String>]
|
897
|
+
#
|
898
|
+
# @!attribute [rw] message
|
899
|
+
# An explanation of any errors that may have occured during the
|
900
|
+
# translation job.
|
901
|
+
# @return [String]
|
902
|
+
#
|
903
|
+
# @!attribute [rw] submitted_time
|
904
|
+
# The time at which the translation job was submitted.
|
905
|
+
# @return [Time]
|
906
|
+
#
|
907
|
+
# @!attribute [rw] end_time
|
908
|
+
# The time at which the translation job ended.
|
909
|
+
# @return [Time]
|
910
|
+
#
|
911
|
+
# @!attribute [rw] input_data_config
|
912
|
+
# The input configuration properties that were specified when the job
|
913
|
+
# was requested.
|
914
|
+
# @return [Types::InputDataConfig]
|
915
|
+
#
|
916
|
+
# @!attribute [rw] output_data_config
|
917
|
+
# The output configuration properties that were specified when the job
|
918
|
+
# was requested.
|
919
|
+
# @return [Types::OutputDataConfig]
|
920
|
+
#
|
921
|
+
# @!attribute [rw] data_access_role_arn
|
922
|
+
# The Amazon Resource Name (ARN) of an AWS Identity Access and
|
923
|
+
# Management (IAM) role that granted Amazon Translate read access to
|
924
|
+
# the job's input data.
|
925
|
+
# @return [String]
|
926
|
+
#
|
927
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/TextTranslationJobProperties AWS API Documentation
|
928
|
+
#
|
929
|
+
class TextTranslationJobProperties < Struct.new(
|
930
|
+
:job_id,
|
931
|
+
:job_name,
|
932
|
+
:job_status,
|
933
|
+
:job_details,
|
934
|
+
:source_language_code,
|
935
|
+
:target_language_codes,
|
936
|
+
:terminology_names,
|
937
|
+
:message,
|
938
|
+
:submitted_time,
|
939
|
+
:end_time,
|
940
|
+
:input_data_config,
|
941
|
+
:output_data_config,
|
942
|
+
:data_access_role_arn)
|
943
|
+
include Aws::Structure
|
944
|
+
end
|
945
|
+
|
480
946
|
# You have made too many requests within a short period of time. Wait
|
481
947
|
# for a short time and then try your request again.
|
482
948
|
#
|
@@ -507,19 +973,25 @@ module Aws::Translate
|
|
507
973
|
# @return [String]
|
508
974
|
#
|
509
975
|
# @!attribute [rw] terminology_names
|
510
|
-
# The
|
511
|
-
# TranslateText request.
|
512
|
-
#
|
976
|
+
# The name of the terminology list file to be used in the
|
977
|
+
# TranslateText request. You can use 1 terminology list at most in a
|
978
|
+
# `TranslateText` request. Terminology lists can contain a maximum of
|
979
|
+
# 256 terms.
|
513
980
|
# @return [Array<String>]
|
514
981
|
#
|
515
982
|
# @!attribute [rw] source_language_code
|
516
983
|
# The language code for the language of the source text. The language
|
517
|
-
# must be a language supported by Amazon Translate.
|
984
|
+
# must be a language supported by Amazon Translate. For a list of
|
985
|
+
# language codes, see what-is-languages.
|
518
986
|
#
|
519
987
|
# To have Amazon Translate determine the source language of your text,
|
520
988
|
# you can specify `auto` in the `SourceLanguageCode` field. If you
|
521
|
-
# specify `auto`, Amazon Translate will call Amazon Comprehend to
|
989
|
+
# specify `auto`, Amazon Translate will call [Amazon Comprehend][1] to
|
522
990
|
# determine the source language.
|
991
|
+
#
|
992
|
+
#
|
993
|
+
#
|
994
|
+
# [1]: https://docs.aws.amazon.com/comprehend/latest/dg/comprehend-general.html
|
523
995
|
# @return [String]
|
524
996
|
#
|
525
997
|
# @!attribute [rw] target_language_code
|
@@ -538,7 +1010,7 @@ module Aws::Translate
|
|
538
1010
|
end
|
539
1011
|
|
540
1012
|
# @!attribute [rw] translated_text
|
541
|
-
# The
|
1013
|
+
# The translated text.
|
542
1014
|
# @return [String]
|
543
1015
|
#
|
544
1016
|
# @!attribute [rw] source_language_code
|