aws-sdk-translate 1.7.0 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws-sdk-translate.rb +1 -1
- data/lib/aws-sdk-translate/client.rb +247 -10
- data/lib/aws-sdk-translate/client_api.rb +153 -0
- data/lib/aws-sdk-translate/types.rb +375 -11
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ddec145bb475b4a91f5c394e6721b2eb4171f22f
|
4
|
+
data.tar.gz: fc3061fd3c291afa6933b92fb9c72f634bb95dab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1141cdb40e2eecba10f9a6bab15e3cd0b5cdf88f985715a505142108f98c27c78eb2e99499d5780fd80c76f619e7cb4fb07f6c70e6aafbbad04f95055f0a356e
|
7
|
+
data.tar.gz: 6e6d7bb4efa36708a42d46a9ce1dbf266f984b2d968f58a8cdba5d12337ade8714c52172b6db520c20db9511ce4033e85f63f53eae339ec62b2c40f919d992a0
|
data/lib/aws-sdk-translate.rb
CHANGED
@@ -215,34 +215,265 @@ module Aws::Translate
|
|
215
215
|
|
216
216
|
# @!group API Operations
|
217
217
|
|
218
|
+
# A synchronous action that deletes a custom terminology.
|
219
|
+
#
|
220
|
+
# @option params [required, String] :name
|
221
|
+
# The name of the custom terminology being deleted.
|
222
|
+
#
|
223
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
224
|
+
#
|
225
|
+
# @example Request syntax with placeholder values
|
226
|
+
#
|
227
|
+
# resp = client.delete_terminology({
|
228
|
+
# name: "ResourceName", # required
|
229
|
+
# })
|
230
|
+
#
|
231
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/DeleteTerminology AWS API Documentation
|
232
|
+
#
|
233
|
+
# @overload delete_terminology(params = {})
|
234
|
+
# @param [Hash] params ({})
|
235
|
+
def delete_terminology(params = {}, options = {})
|
236
|
+
req = build_request(:delete_terminology, params)
|
237
|
+
req.send_request(options)
|
238
|
+
end
|
239
|
+
|
240
|
+
# Retrieves a custom terminology.
|
241
|
+
#
|
242
|
+
# @option params [required, String] :name
|
243
|
+
# The name of the custom terminology being retrieved.
|
244
|
+
#
|
245
|
+
# @option params [required, String] :terminology_data_format
|
246
|
+
# The data format of the custom terminology being retrieved, either CSV
|
247
|
+
# or TMX.
|
248
|
+
#
|
249
|
+
# @return [Types::GetTerminologyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
250
|
+
#
|
251
|
+
# * {Types::GetTerminologyResponse#terminology_properties #terminology_properties} => Types::TerminologyProperties
|
252
|
+
# * {Types::GetTerminologyResponse#terminology_data_location #terminology_data_location} => Types::TerminologyDataLocation
|
253
|
+
#
|
254
|
+
# @example Request syntax with placeholder values
|
255
|
+
#
|
256
|
+
# resp = client.get_terminology({
|
257
|
+
# name: "ResourceName", # required
|
258
|
+
# terminology_data_format: "CSV", # required, accepts CSV, TMX
|
259
|
+
# })
|
260
|
+
#
|
261
|
+
# @example Response structure
|
262
|
+
#
|
263
|
+
# resp.terminology_properties.name #=> String
|
264
|
+
# resp.terminology_properties.description #=> String
|
265
|
+
# resp.terminology_properties.arn #=> String
|
266
|
+
# resp.terminology_properties.source_language_code #=> String
|
267
|
+
# resp.terminology_properties.target_language_codes #=> Array
|
268
|
+
# resp.terminology_properties.target_language_codes[0] #=> String
|
269
|
+
# resp.terminology_properties.encryption_key.type #=> String, one of "KMS"
|
270
|
+
# resp.terminology_properties.encryption_key.id #=> String
|
271
|
+
# resp.terminology_properties.size_bytes #=> Integer
|
272
|
+
# resp.terminology_properties.term_count #=> Integer
|
273
|
+
# resp.terminology_properties.created_at #=> Time
|
274
|
+
# resp.terminology_properties.last_updated_at #=> Time
|
275
|
+
# resp.terminology_data_location.repository_type #=> String
|
276
|
+
# resp.terminology_data_location.location #=> String
|
277
|
+
#
|
278
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/GetTerminology AWS API Documentation
|
279
|
+
#
|
280
|
+
# @overload get_terminology(params = {})
|
281
|
+
# @param [Hash] params ({})
|
282
|
+
def get_terminology(params = {}, options = {})
|
283
|
+
req = build_request(:get_terminology, params)
|
284
|
+
req.send_request(options)
|
285
|
+
end
|
286
|
+
|
287
|
+
# Creates or updates a custom terminology, depending on whether or not
|
288
|
+
# one already exists for the given terminology name. Importing a
|
289
|
+
# terminology with the same name as an existing one will merge the
|
290
|
+
# terminologies based on the chosen merge strategy. Currently, the only
|
291
|
+
# supported merge strategy is OVERWRITE, and so the imported terminology
|
292
|
+
# will overwrite an existing terminology of the same name.
|
293
|
+
#
|
294
|
+
# If you import a terminology that overwrites an existing one, the new
|
295
|
+
# terminology take up to 10 minutes to fully propagate and be available
|
296
|
+
# for use in a translation due to cache policies with the DataPlane
|
297
|
+
# service that performs the translations.
|
298
|
+
#
|
299
|
+
# @option params [required, String] :name
|
300
|
+
# The name of the custom terminology being imported.
|
301
|
+
#
|
302
|
+
# @option params [required, String] :merge_strategy
|
303
|
+
# The merge strategy of the custom terminology being imported.
|
304
|
+
# Currently, only the OVERWRITE merge strategy is supported. In this
|
305
|
+
# case, the imported terminology will overwrite an existing terminology
|
306
|
+
# of the same name.
|
307
|
+
#
|
308
|
+
# @option params [String] :description
|
309
|
+
# The description of the custom terminology being imported.
|
310
|
+
#
|
311
|
+
# @option params [required, Types::TerminologyData] :terminology_data
|
312
|
+
# The terminology data for the custom terminology being imported.
|
313
|
+
#
|
314
|
+
# @option params [Types::EncryptionKey] :encryption_key
|
315
|
+
# The encryption key for the custom terminology being imported.
|
316
|
+
#
|
317
|
+
# @return [Types::ImportTerminologyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
318
|
+
#
|
319
|
+
# * {Types::ImportTerminologyResponse#terminology_properties #terminology_properties} => Types::TerminologyProperties
|
320
|
+
#
|
321
|
+
# @example Request syntax with placeholder values
|
322
|
+
#
|
323
|
+
# resp = client.import_terminology({
|
324
|
+
# name: "ResourceName", # required
|
325
|
+
# merge_strategy: "OVERWRITE", # required, accepts OVERWRITE
|
326
|
+
# description: "Description",
|
327
|
+
# terminology_data: { # required
|
328
|
+
# file: "data", # required
|
329
|
+
# format: "CSV", # required, accepts CSV, TMX
|
330
|
+
# },
|
331
|
+
# encryption_key: {
|
332
|
+
# type: "KMS", # required, accepts KMS
|
333
|
+
# id: "EncryptionKeyID", # required
|
334
|
+
# },
|
335
|
+
# })
|
336
|
+
#
|
337
|
+
# @example Response structure
|
338
|
+
#
|
339
|
+
# resp.terminology_properties.name #=> String
|
340
|
+
# resp.terminology_properties.description #=> String
|
341
|
+
# resp.terminology_properties.arn #=> String
|
342
|
+
# resp.terminology_properties.source_language_code #=> String
|
343
|
+
# resp.terminology_properties.target_language_codes #=> Array
|
344
|
+
# resp.terminology_properties.target_language_codes[0] #=> String
|
345
|
+
# resp.terminology_properties.encryption_key.type #=> String, one of "KMS"
|
346
|
+
# resp.terminology_properties.encryption_key.id #=> String
|
347
|
+
# resp.terminology_properties.size_bytes #=> Integer
|
348
|
+
# resp.terminology_properties.term_count #=> Integer
|
349
|
+
# resp.terminology_properties.created_at #=> Time
|
350
|
+
# resp.terminology_properties.last_updated_at #=> Time
|
351
|
+
#
|
352
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ImportTerminology AWS API Documentation
|
353
|
+
#
|
354
|
+
# @overload import_terminology(params = {})
|
355
|
+
# @param [Hash] params ({})
|
356
|
+
def import_terminology(params = {}, options = {})
|
357
|
+
req = build_request(:import_terminology, params)
|
358
|
+
req.send_request(options)
|
359
|
+
end
|
360
|
+
|
361
|
+
# Provides a list of custom terminologies associated with your account.
|
362
|
+
#
|
363
|
+
# @option params [String] :next_token
|
364
|
+
# If the result of the request to ListTerminologies was truncated,
|
365
|
+
# include the NextToken to fetch the next group of custom terminologies.
|
366
|
+
#
|
367
|
+
# @option params [Integer] :max_results
|
368
|
+
# The maximum number of custom terminologies returned per list request.
|
369
|
+
#
|
370
|
+
# @return [Types::ListTerminologiesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
371
|
+
#
|
372
|
+
# * {Types::ListTerminologiesResponse#terminology_properties_list #terminology_properties_list} => Array<Types::TerminologyProperties>
|
373
|
+
# * {Types::ListTerminologiesResponse#next_token #next_token} => String
|
374
|
+
#
|
375
|
+
# @example Request syntax with placeholder values
|
376
|
+
#
|
377
|
+
# resp = client.list_terminologies({
|
378
|
+
# next_token: "NextToken",
|
379
|
+
# max_results: 1,
|
380
|
+
# })
|
381
|
+
#
|
382
|
+
# @example Response structure
|
383
|
+
#
|
384
|
+
# resp.terminology_properties_list #=> Array
|
385
|
+
# resp.terminology_properties_list[0].name #=> String
|
386
|
+
# resp.terminology_properties_list[0].description #=> String
|
387
|
+
# resp.terminology_properties_list[0].arn #=> String
|
388
|
+
# resp.terminology_properties_list[0].source_language_code #=> String
|
389
|
+
# resp.terminology_properties_list[0].target_language_codes #=> Array
|
390
|
+
# resp.terminology_properties_list[0].target_language_codes[0] #=> String
|
391
|
+
# resp.terminology_properties_list[0].encryption_key.type #=> String, one of "KMS"
|
392
|
+
# resp.terminology_properties_list[0].encryption_key.id #=> String
|
393
|
+
# resp.terminology_properties_list[0].size_bytes #=> Integer
|
394
|
+
# resp.terminology_properties_list[0].term_count #=> Integer
|
395
|
+
# resp.terminology_properties_list[0].created_at #=> Time
|
396
|
+
# resp.terminology_properties_list[0].last_updated_at #=> Time
|
397
|
+
# resp.next_token #=> String
|
398
|
+
#
|
399
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ListTerminologies AWS API Documentation
|
400
|
+
#
|
401
|
+
# @overload list_terminologies(params = {})
|
402
|
+
# @param [Hash] params ({})
|
403
|
+
def list_terminologies(params = {}, options = {})
|
404
|
+
req = build_request(:list_terminologies, params)
|
405
|
+
req.send_request(options)
|
406
|
+
end
|
407
|
+
|
218
408
|
# Translates input text from the source language to the target language.
|
219
|
-
#
|
220
|
-
#
|
409
|
+
# It is not necessary to use English (en) as either the source or the
|
410
|
+
# target language but not all language combinations are supported by
|
411
|
+
# Amazon Translate. For more information, see [Supported Language
|
412
|
+
# Pairs][1].
|
221
413
|
#
|
222
414
|
# * Arabic (ar)
|
223
415
|
#
|
224
416
|
# * Chinese (Simplified) (zh)
|
225
417
|
#
|
418
|
+
# * Chinese (Traditional) (zh-TW)
|
419
|
+
#
|
420
|
+
# * Czech (cs)
|
421
|
+
#
|
422
|
+
# * Danish (da)
|
423
|
+
#
|
424
|
+
# * Dutch (nl)
|
425
|
+
#
|
426
|
+
# * English (en)
|
427
|
+
#
|
428
|
+
# * Finnish (fi)
|
429
|
+
#
|
226
430
|
# * French (fr)
|
227
431
|
#
|
228
432
|
# * German (de)
|
229
433
|
#
|
434
|
+
# * Hebrew (he)
|
435
|
+
#
|
436
|
+
# * Indonesian (id)
|
437
|
+
#
|
438
|
+
# * Italian (it)
|
439
|
+
#
|
440
|
+
# * Japanese (ja)
|
441
|
+
#
|
442
|
+
# * Korean (ko)
|
443
|
+
#
|
444
|
+
# * Polish (pl)
|
445
|
+
#
|
230
446
|
# * Portuguese (pt)
|
231
447
|
#
|
448
|
+
# * Russian (ru)
|
449
|
+
#
|
232
450
|
# * Spanish (es)
|
233
451
|
#
|
452
|
+
# * Swedish (sv)
|
453
|
+
#
|
454
|
+
# * Turkish (tr)
|
455
|
+
#
|
234
456
|
# To have Amazon Translate determine the source language of your text,
|
235
457
|
# you can specify `auto` in the `SourceLanguageCode` field. If you
|
236
458
|
# specify `auto`, Amazon Translate will call Amazon Comprehend to
|
237
459
|
# determine the source language.
|
238
460
|
#
|
461
|
+
#
|
462
|
+
#
|
463
|
+
# [1]: http://docs.aws.amazon.com/translate/latest/dg/pairs.html
|
464
|
+
#
|
239
465
|
# @option params [required, String] :text
|
240
|
-
# The text to translate.
|
466
|
+
# The text to translate. The text string can be a maximum of 5,000 bytes
|
467
|
+
# long. Depending on your character set, this may be fewer than 5,000
|
468
|
+
# characters.
|
469
|
+
#
|
470
|
+
# @option params [Array<String>] :terminology_names
|
471
|
+
# The TerminologyNames list that is taken as input to the TranslateText
|
472
|
+
# request. This has a minimum length of 0 and a maximum length of 1.
|
241
473
|
#
|
242
474
|
# @option params [required, String] :source_language_code
|
243
|
-
#
|
244
|
-
#
|
245
|
-
# "en".
|
475
|
+
# The language code for the language of the source text. The language
|
476
|
+
# must be a language supported by Amazon Translate.
|
246
477
|
#
|
247
478
|
# To have Amazon Translate determine the source language of your text,
|
248
479
|
# you can specify `auto` in the `SourceLanguageCode` field. If you
|
@@ -250,20 +481,21 @@ module Aws::Translate
|
|
250
481
|
# determine the source language.
|
251
482
|
#
|
252
483
|
# @option params [required, String] :target_language_code
|
253
|
-
#
|
254
|
-
#
|
255
|
-
# "en".
|
484
|
+
# The language code requested for the language of the target text. The
|
485
|
+
# language must be a language supported by Amazon Translate.
|
256
486
|
#
|
257
487
|
# @return [Types::TranslateTextResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
258
488
|
#
|
259
489
|
# * {Types::TranslateTextResponse#translated_text #translated_text} => String
|
260
490
|
# * {Types::TranslateTextResponse#source_language_code #source_language_code} => String
|
261
491
|
# * {Types::TranslateTextResponse#target_language_code #target_language_code} => String
|
492
|
+
# * {Types::TranslateTextResponse#applied_terminologies #applied_terminologies} => Array<Types::AppliedTerminology>
|
262
493
|
#
|
263
494
|
# @example Request syntax with placeholder values
|
264
495
|
#
|
265
496
|
# resp = client.translate_text({
|
266
497
|
# text: "BoundedLengthString", # required
|
498
|
+
# terminology_names: ["ResourceName"],
|
267
499
|
# source_language_code: "LanguageCodeString", # required
|
268
500
|
# target_language_code: "LanguageCodeString", # required
|
269
501
|
# })
|
@@ -273,6 +505,11 @@ module Aws::Translate
|
|
273
505
|
# resp.translated_text #=> String
|
274
506
|
# resp.source_language_code #=> String
|
275
507
|
# resp.target_language_code #=> String
|
508
|
+
# resp.applied_terminologies #=> Array
|
509
|
+
# resp.applied_terminologies[0].name #=> String
|
510
|
+
# resp.applied_terminologies[0].terms #=> Array
|
511
|
+
# resp.applied_terminologies[0].terms[0].source_text #=> String
|
512
|
+
# resp.applied_terminologies[0].terms[0].target_text #=> String
|
276
513
|
#
|
277
514
|
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/TranslateText AWS API Documentation
|
278
515
|
#
|
@@ -296,7 +533,7 @@ module Aws::Translate
|
|
296
533
|
params: params,
|
297
534
|
config: config)
|
298
535
|
context[:gem_name] = 'aws-sdk-translate'
|
299
|
-
context[:gem_version] = '1.
|
536
|
+
context[:gem_version] = '1.8.0'
|
300
537
|
Seahorse::Client::Request.new(handlers, context)
|
301
538
|
end
|
302
539
|
|
@@ -11,20 +11,125 @@ module Aws::Translate
|
|
11
11
|
|
12
12
|
include Seahorse::Model
|
13
13
|
|
14
|
+
AppliedTerminology = Shapes::StructureShape.new(name: 'AppliedTerminology')
|
15
|
+
AppliedTerminologyList = Shapes::ListShape.new(name: 'AppliedTerminologyList')
|
14
16
|
BoundedLengthString = Shapes::StringShape.new(name: 'BoundedLengthString')
|
17
|
+
DeleteTerminologyRequest = Shapes::StructureShape.new(name: 'DeleteTerminologyRequest')
|
18
|
+
Description = Shapes::StringShape.new(name: 'Description')
|
15
19
|
DetectedLanguageLowConfidenceException = Shapes::StructureShape.new(name: 'DetectedLanguageLowConfidenceException')
|
20
|
+
EncryptionKey = Shapes::StructureShape.new(name: 'EncryptionKey')
|
21
|
+
EncryptionKeyID = Shapes::StringShape.new(name: 'EncryptionKeyID')
|
22
|
+
EncryptionKeyType = Shapes::StringShape.new(name: 'EncryptionKeyType')
|
23
|
+
GetTerminologyRequest = Shapes::StructureShape.new(name: 'GetTerminologyRequest')
|
24
|
+
GetTerminologyResponse = Shapes::StructureShape.new(name: 'GetTerminologyResponse')
|
25
|
+
ImportTerminologyRequest = Shapes::StructureShape.new(name: 'ImportTerminologyRequest')
|
26
|
+
ImportTerminologyResponse = Shapes::StructureShape.new(name: 'ImportTerminologyResponse')
|
27
|
+
Integer = Shapes::IntegerShape.new(name: 'Integer')
|
16
28
|
InternalServerException = Shapes::StructureShape.new(name: 'InternalServerException')
|
29
|
+
InvalidParameterValueException = Shapes::StructureShape.new(name: 'InvalidParameterValueException')
|
17
30
|
InvalidRequestException = Shapes::StructureShape.new(name: 'InvalidRequestException')
|
18
31
|
LanguageCodeString = Shapes::StringShape.new(name: 'LanguageCodeString')
|
32
|
+
LanguageCodeStringList = Shapes::ListShape.new(name: 'LanguageCodeStringList')
|
33
|
+
LimitExceededException = Shapes::StructureShape.new(name: 'LimitExceededException')
|
34
|
+
ListTerminologiesRequest = Shapes::StructureShape.new(name: 'ListTerminologiesRequest')
|
35
|
+
ListTerminologiesResponse = Shapes::StructureShape.new(name: 'ListTerminologiesResponse')
|
36
|
+
MaxResultsInteger = Shapes::IntegerShape.new(name: 'MaxResultsInteger')
|
37
|
+
MergeStrategy = Shapes::StringShape.new(name: 'MergeStrategy')
|
38
|
+
NextToken = Shapes::StringShape.new(name: 'NextToken')
|
39
|
+
ResourceName = Shapes::StringShape.new(name: 'ResourceName')
|
40
|
+
ResourceNameList = Shapes::ListShape.new(name: 'ResourceNameList')
|
41
|
+
ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
|
19
42
|
ServiceUnavailableException = Shapes::StructureShape.new(name: 'ServiceUnavailableException')
|
20
43
|
String = Shapes::StringShape.new(name: 'String')
|
44
|
+
Term = Shapes::StructureShape.new(name: 'Term')
|
45
|
+
TermList = Shapes::ListShape.new(name: 'TermList')
|
46
|
+
TerminologyArn = Shapes::StringShape.new(name: 'TerminologyArn')
|
47
|
+
TerminologyData = Shapes::StructureShape.new(name: 'TerminologyData')
|
48
|
+
TerminologyDataFormat = Shapes::StringShape.new(name: 'TerminologyDataFormat')
|
49
|
+
TerminologyDataLocation = Shapes::StructureShape.new(name: 'TerminologyDataLocation')
|
50
|
+
TerminologyFile = Shapes::BlobShape.new(name: 'TerminologyFile')
|
51
|
+
TerminologyProperties = Shapes::StructureShape.new(name: 'TerminologyProperties')
|
52
|
+
TerminologyPropertiesList = Shapes::ListShape.new(name: 'TerminologyPropertiesList')
|
21
53
|
TextSizeLimitExceededException = Shapes::StructureShape.new(name: 'TextSizeLimitExceededException')
|
54
|
+
Timestamp = Shapes::TimestampShape.new(name: 'Timestamp')
|
22
55
|
TooManyRequestsException = Shapes::StructureShape.new(name: 'TooManyRequestsException')
|
23
56
|
TranslateTextRequest = Shapes::StructureShape.new(name: 'TranslateTextRequest')
|
24
57
|
TranslateTextResponse = Shapes::StructureShape.new(name: 'TranslateTextResponse')
|
25
58
|
UnsupportedLanguagePairException = Shapes::StructureShape.new(name: 'UnsupportedLanguagePairException')
|
26
59
|
|
60
|
+
AppliedTerminology.add_member(:name, Shapes::ShapeRef.new(shape: ResourceName, location_name: "Name"))
|
61
|
+
AppliedTerminology.add_member(:terms, Shapes::ShapeRef.new(shape: TermList, location_name: "Terms"))
|
62
|
+
AppliedTerminology.struct_class = Types::AppliedTerminology
|
63
|
+
|
64
|
+
AppliedTerminologyList.member = Shapes::ShapeRef.new(shape: AppliedTerminology)
|
65
|
+
|
66
|
+
DeleteTerminologyRequest.add_member(:name, Shapes::ShapeRef.new(shape: ResourceName, required: true, location_name: "Name"))
|
67
|
+
DeleteTerminologyRequest.struct_class = Types::DeleteTerminologyRequest
|
68
|
+
|
69
|
+
EncryptionKey.add_member(:type, Shapes::ShapeRef.new(shape: EncryptionKeyType, required: true, location_name: "Type"))
|
70
|
+
EncryptionKey.add_member(:id, Shapes::ShapeRef.new(shape: EncryptionKeyID, required: true, location_name: "Id"))
|
71
|
+
EncryptionKey.struct_class = Types::EncryptionKey
|
72
|
+
|
73
|
+
GetTerminologyRequest.add_member(:name, Shapes::ShapeRef.new(shape: ResourceName, required: true, location_name: "Name"))
|
74
|
+
GetTerminologyRequest.add_member(:terminology_data_format, Shapes::ShapeRef.new(shape: TerminologyDataFormat, required: true, location_name: "TerminologyDataFormat"))
|
75
|
+
GetTerminologyRequest.struct_class = Types::GetTerminologyRequest
|
76
|
+
|
77
|
+
GetTerminologyResponse.add_member(:terminology_properties, Shapes::ShapeRef.new(shape: TerminologyProperties, location_name: "TerminologyProperties"))
|
78
|
+
GetTerminologyResponse.add_member(:terminology_data_location, Shapes::ShapeRef.new(shape: TerminologyDataLocation, location_name: "TerminologyDataLocation"))
|
79
|
+
GetTerminologyResponse.struct_class = Types::GetTerminologyResponse
|
80
|
+
|
81
|
+
ImportTerminologyRequest.add_member(:name, Shapes::ShapeRef.new(shape: ResourceName, required: true, location_name: "Name"))
|
82
|
+
ImportTerminologyRequest.add_member(:merge_strategy, Shapes::ShapeRef.new(shape: MergeStrategy, required: true, location_name: "MergeStrategy"))
|
83
|
+
ImportTerminologyRequest.add_member(:description, Shapes::ShapeRef.new(shape: Description, location_name: "Description"))
|
84
|
+
ImportTerminologyRequest.add_member(:terminology_data, Shapes::ShapeRef.new(shape: TerminologyData, required: true, location_name: "TerminologyData"))
|
85
|
+
ImportTerminologyRequest.add_member(:encryption_key, Shapes::ShapeRef.new(shape: EncryptionKey, location_name: "EncryptionKey"))
|
86
|
+
ImportTerminologyRequest.struct_class = Types::ImportTerminologyRequest
|
87
|
+
|
88
|
+
ImportTerminologyResponse.add_member(:terminology_properties, Shapes::ShapeRef.new(shape: TerminologyProperties, location_name: "TerminologyProperties"))
|
89
|
+
ImportTerminologyResponse.struct_class = Types::ImportTerminologyResponse
|
90
|
+
|
91
|
+
LanguageCodeStringList.member = Shapes::ShapeRef.new(shape: LanguageCodeString)
|
92
|
+
|
93
|
+
ListTerminologiesRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "NextToken"))
|
94
|
+
ListTerminologiesRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResultsInteger, location_name: "MaxResults"))
|
95
|
+
ListTerminologiesRequest.struct_class = Types::ListTerminologiesRequest
|
96
|
+
|
97
|
+
ListTerminologiesResponse.add_member(:terminology_properties_list, Shapes::ShapeRef.new(shape: TerminologyPropertiesList, location_name: "TerminologyPropertiesList"))
|
98
|
+
ListTerminologiesResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "NextToken"))
|
99
|
+
ListTerminologiesResponse.struct_class = Types::ListTerminologiesResponse
|
100
|
+
|
101
|
+
ResourceNameList.member = Shapes::ShapeRef.new(shape: ResourceName)
|
102
|
+
|
103
|
+
Term.add_member(:source_text, Shapes::ShapeRef.new(shape: String, location_name: "SourceText"))
|
104
|
+
Term.add_member(:target_text, Shapes::ShapeRef.new(shape: String, location_name: "TargetText"))
|
105
|
+
Term.struct_class = Types::Term
|
106
|
+
|
107
|
+
TermList.member = Shapes::ShapeRef.new(shape: Term)
|
108
|
+
|
109
|
+
TerminologyData.add_member(:file, Shapes::ShapeRef.new(shape: TerminologyFile, required: true, location_name: "File"))
|
110
|
+
TerminologyData.add_member(:format, Shapes::ShapeRef.new(shape: TerminologyDataFormat, required: true, location_name: "Format"))
|
111
|
+
TerminologyData.struct_class = Types::TerminologyData
|
112
|
+
|
113
|
+
TerminologyDataLocation.add_member(:repository_type, Shapes::ShapeRef.new(shape: String, required: true, location_name: "RepositoryType"))
|
114
|
+
TerminologyDataLocation.add_member(:location, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Location"))
|
115
|
+
TerminologyDataLocation.struct_class = Types::TerminologyDataLocation
|
116
|
+
|
117
|
+
TerminologyProperties.add_member(:name, Shapes::ShapeRef.new(shape: ResourceName, location_name: "Name"))
|
118
|
+
TerminologyProperties.add_member(:description, Shapes::ShapeRef.new(shape: Description, location_name: "Description"))
|
119
|
+
TerminologyProperties.add_member(:arn, Shapes::ShapeRef.new(shape: TerminologyArn, location_name: "Arn"))
|
120
|
+
TerminologyProperties.add_member(:source_language_code, Shapes::ShapeRef.new(shape: LanguageCodeString, location_name: "SourceLanguageCode"))
|
121
|
+
TerminologyProperties.add_member(:target_language_codes, Shapes::ShapeRef.new(shape: LanguageCodeStringList, location_name: "TargetLanguageCodes"))
|
122
|
+
TerminologyProperties.add_member(:encryption_key, Shapes::ShapeRef.new(shape: EncryptionKey, location_name: "EncryptionKey"))
|
123
|
+
TerminologyProperties.add_member(:size_bytes, Shapes::ShapeRef.new(shape: Integer, location_name: "SizeBytes"))
|
124
|
+
TerminologyProperties.add_member(:term_count, Shapes::ShapeRef.new(shape: Integer, location_name: "TermCount"))
|
125
|
+
TerminologyProperties.add_member(:created_at, Shapes::ShapeRef.new(shape: Timestamp, location_name: "CreatedAt"))
|
126
|
+
TerminologyProperties.add_member(:last_updated_at, Shapes::ShapeRef.new(shape: Timestamp, location_name: "LastUpdatedAt"))
|
127
|
+
TerminologyProperties.struct_class = Types::TerminologyProperties
|
128
|
+
|
129
|
+
TerminologyPropertiesList.member = Shapes::ShapeRef.new(shape: TerminologyProperties)
|
130
|
+
|
27
131
|
TranslateTextRequest.add_member(:text, Shapes::ShapeRef.new(shape: BoundedLengthString, required: true, location_name: "Text"))
|
132
|
+
TranslateTextRequest.add_member(:terminology_names, Shapes::ShapeRef.new(shape: ResourceNameList, location_name: "TerminologyNames"))
|
28
133
|
TranslateTextRequest.add_member(:source_language_code, Shapes::ShapeRef.new(shape: LanguageCodeString, required: true, location_name: "SourceLanguageCode"))
|
29
134
|
TranslateTextRequest.add_member(:target_language_code, Shapes::ShapeRef.new(shape: LanguageCodeString, required: true, location_name: "TargetLanguageCode"))
|
30
135
|
TranslateTextRequest.struct_class = Types::TranslateTextRequest
|
@@ -32,6 +137,7 @@ module Aws::Translate
|
|
32
137
|
TranslateTextResponse.add_member(:translated_text, Shapes::ShapeRef.new(shape: String, required: true, location_name: "TranslatedText"))
|
33
138
|
TranslateTextResponse.add_member(:source_language_code, Shapes::ShapeRef.new(shape: LanguageCodeString, required: true, location_name: "SourceLanguageCode"))
|
34
139
|
TranslateTextResponse.add_member(:target_language_code, Shapes::ShapeRef.new(shape: LanguageCodeString, required: true, location_name: "TargetLanguageCode"))
|
140
|
+
TranslateTextResponse.add_member(:applied_terminologies, Shapes::ShapeRef.new(shape: AppliedTerminologyList, location_name: "AppliedTerminologies"))
|
35
141
|
TranslateTextResponse.struct_class = Types::TranslateTextResponse
|
36
142
|
|
37
143
|
|
@@ -53,6 +159,52 @@ module Aws::Translate
|
|
53
159
|
"uid" => "translate-2017-07-01",
|
54
160
|
}
|
55
161
|
|
162
|
+
api.add_operation(:delete_terminology, Seahorse::Model::Operation.new.tap do |o|
|
163
|
+
o.name = "DeleteTerminology"
|
164
|
+
o.http_method = "POST"
|
165
|
+
o.http_request_uri = "/"
|
166
|
+
o.input = Shapes::ShapeRef.new(shape: DeleteTerminologyRequest)
|
167
|
+
o.output = Shapes::ShapeRef.new(shape: Shapes::StructureShape.new(struct_class: Aws::EmptyStructure))
|
168
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
169
|
+
o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
|
170
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
171
|
+
end)
|
172
|
+
|
173
|
+
api.add_operation(:get_terminology, Seahorse::Model::Operation.new.tap do |o|
|
174
|
+
o.name = "GetTerminology"
|
175
|
+
o.http_method = "POST"
|
176
|
+
o.http_request_uri = "/"
|
177
|
+
o.input = Shapes::ShapeRef.new(shape: GetTerminologyRequest)
|
178
|
+
o.output = Shapes::ShapeRef.new(shape: GetTerminologyResponse)
|
179
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
180
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidParameterValueException)
|
181
|
+
o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
|
182
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
183
|
+
end)
|
184
|
+
|
185
|
+
api.add_operation(:import_terminology, Seahorse::Model::Operation.new.tap do |o|
|
186
|
+
o.name = "ImportTerminology"
|
187
|
+
o.http_method = "POST"
|
188
|
+
o.http_request_uri = "/"
|
189
|
+
o.input = Shapes::ShapeRef.new(shape: ImportTerminologyRequest)
|
190
|
+
o.output = Shapes::ShapeRef.new(shape: ImportTerminologyResponse)
|
191
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidParameterValueException)
|
192
|
+
o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
|
193
|
+
o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
|
194
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
195
|
+
end)
|
196
|
+
|
197
|
+
api.add_operation(:list_terminologies, Seahorse::Model::Operation.new.tap do |o|
|
198
|
+
o.name = "ListTerminologies"
|
199
|
+
o.http_method = "POST"
|
200
|
+
o.http_request_uri = "/"
|
201
|
+
o.input = Shapes::ShapeRef.new(shape: ListTerminologiesRequest)
|
202
|
+
o.output = Shapes::ShapeRef.new(shape: ListTerminologiesResponse)
|
203
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidParameterValueException)
|
204
|
+
o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
|
205
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
206
|
+
end)
|
207
|
+
|
56
208
|
api.add_operation(:translate_text, Seahorse::Model::Operation.new.tap do |o|
|
57
209
|
o.name = "TranslateText"
|
58
210
|
o.http_method = "POST"
|
@@ -64,6 +216,7 @@ module Aws::Translate
|
|
64
216
|
o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
|
65
217
|
o.errors << Shapes::ShapeRef.new(shape: UnsupportedLanguagePairException)
|
66
218
|
o.errors << Shapes::ShapeRef.new(shape: DetectedLanguageLowConfidenceException)
|
219
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
67
220
|
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
68
221
|
o.errors << Shapes::ShapeRef.new(shape: ServiceUnavailableException)
|
69
222
|
end)
|
@@ -8,23 +8,381 @@
|
|
8
8
|
module Aws::Translate
|
9
9
|
module Types
|
10
10
|
|
11
|
+
# The custom terminology applied to the input text by Amazon Translate
|
12
|
+
# for the translated text response. This is optional in the response and
|
13
|
+
# will only be present if you specified terminology input in the
|
14
|
+
# request. Currently, only one terminology can be applied per
|
15
|
+
# TranslateText request.
|
16
|
+
#
|
17
|
+
# @!attribute [rw] name
|
18
|
+
# The name of the custom terminology applied to the input text by
|
19
|
+
# Amazon Translate for the translated text response.
|
20
|
+
# @return [String]
|
21
|
+
#
|
22
|
+
# @!attribute [rw] terms
|
23
|
+
# The specific terms of the custom terminology applied to the input
|
24
|
+
# text by Amazon Translate for the translated text response. A maximum
|
25
|
+
# of 250 terms will be returned, and the specific terms applied will
|
26
|
+
# be the first 250 terms in the source text.
|
27
|
+
# @return [Array<Types::Term>]
|
28
|
+
#
|
29
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/AppliedTerminology AWS API Documentation
|
30
|
+
#
|
31
|
+
class AppliedTerminology < Struct.new(
|
32
|
+
:name,
|
33
|
+
:terms)
|
34
|
+
include Aws::Structure
|
35
|
+
end
|
36
|
+
|
37
|
+
# @note When making an API call, you may pass DeleteTerminologyRequest
|
38
|
+
# data as a hash:
|
39
|
+
#
|
40
|
+
# {
|
41
|
+
# name: "ResourceName", # required
|
42
|
+
# }
|
43
|
+
#
|
44
|
+
# @!attribute [rw] name
|
45
|
+
# The name of the custom terminology being deleted.
|
46
|
+
# @return [String]
|
47
|
+
#
|
48
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/DeleteTerminologyRequest AWS API Documentation
|
49
|
+
#
|
50
|
+
class DeleteTerminologyRequest < Struct.new(
|
51
|
+
:name)
|
52
|
+
include Aws::Structure
|
53
|
+
end
|
54
|
+
|
55
|
+
# The encryption key used to encrypt the custom terminologies used by
|
56
|
+
# Amazon Translate.
|
57
|
+
#
|
58
|
+
# @note When making an API call, you may pass EncryptionKey
|
59
|
+
# data as a hash:
|
60
|
+
#
|
61
|
+
# {
|
62
|
+
# type: "KMS", # required, accepts KMS
|
63
|
+
# id: "EncryptionKeyID", # required
|
64
|
+
# }
|
65
|
+
#
|
66
|
+
# @!attribute [rw] type
|
67
|
+
# The type of encryption key used by Amazon Translate to encrypt
|
68
|
+
# custom terminologies.
|
69
|
+
# @return [String]
|
70
|
+
#
|
71
|
+
# @!attribute [rw] id
|
72
|
+
# The Amazon Resource Name (ARN) of the encryption key being used to
|
73
|
+
# encrypt the custom terminology.
|
74
|
+
# @return [String]
|
75
|
+
#
|
76
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/EncryptionKey AWS API Documentation
|
77
|
+
#
|
78
|
+
class EncryptionKey < Struct.new(
|
79
|
+
:type,
|
80
|
+
:id)
|
81
|
+
include Aws::Structure
|
82
|
+
end
|
83
|
+
|
84
|
+
# @note When making an API call, you may pass GetTerminologyRequest
|
85
|
+
# data as a hash:
|
86
|
+
#
|
87
|
+
# {
|
88
|
+
# name: "ResourceName", # required
|
89
|
+
# terminology_data_format: "CSV", # required, accepts CSV, TMX
|
90
|
+
# }
|
91
|
+
#
|
92
|
+
# @!attribute [rw] name
|
93
|
+
# The name of the custom terminology being retrieved.
|
94
|
+
# @return [String]
|
95
|
+
#
|
96
|
+
# @!attribute [rw] terminology_data_format
|
97
|
+
# The data format of the custom terminology being retrieved, either
|
98
|
+
# CSV or TMX.
|
99
|
+
# @return [String]
|
100
|
+
#
|
101
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/GetTerminologyRequest AWS API Documentation
|
102
|
+
#
|
103
|
+
class GetTerminologyRequest < Struct.new(
|
104
|
+
:name,
|
105
|
+
:terminology_data_format)
|
106
|
+
include Aws::Structure
|
107
|
+
end
|
108
|
+
|
109
|
+
# @!attribute [rw] terminology_properties
|
110
|
+
# The properties of the custom terminology being retrieved.
|
111
|
+
# @return [Types::TerminologyProperties]
|
112
|
+
#
|
113
|
+
# @!attribute [rw] terminology_data_location
|
114
|
+
# The data location of the custom terminology being retrieved. The
|
115
|
+
# custom terminology file is returned in a presigned url that has a 30
|
116
|
+
# minute expiration.
|
117
|
+
# @return [Types::TerminologyDataLocation]
|
118
|
+
#
|
119
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/GetTerminologyResponse AWS API Documentation
|
120
|
+
#
|
121
|
+
class GetTerminologyResponse < Struct.new(
|
122
|
+
:terminology_properties,
|
123
|
+
:terminology_data_location)
|
124
|
+
include Aws::Structure
|
125
|
+
end
|
126
|
+
|
127
|
+
# @note When making an API call, you may pass ImportTerminologyRequest
|
128
|
+
# data as a hash:
|
129
|
+
#
|
130
|
+
# {
|
131
|
+
# name: "ResourceName", # required
|
132
|
+
# merge_strategy: "OVERWRITE", # required, accepts OVERWRITE
|
133
|
+
# description: "Description",
|
134
|
+
# terminology_data: { # required
|
135
|
+
# file: "data", # required
|
136
|
+
# format: "CSV", # required, accepts CSV, TMX
|
137
|
+
# },
|
138
|
+
# encryption_key: {
|
139
|
+
# type: "KMS", # required, accepts KMS
|
140
|
+
# id: "EncryptionKeyID", # required
|
141
|
+
# },
|
142
|
+
# }
|
143
|
+
#
|
144
|
+
# @!attribute [rw] name
|
145
|
+
# The name of the custom terminology being imported.
|
146
|
+
# @return [String]
|
147
|
+
#
|
148
|
+
# @!attribute [rw] merge_strategy
|
149
|
+
# The merge strategy of the custom terminology being imported.
|
150
|
+
# Currently, only the OVERWRITE merge strategy is supported. In this
|
151
|
+
# case, the imported terminology will overwrite an existing
|
152
|
+
# terminology of the same name.
|
153
|
+
# @return [String]
|
154
|
+
#
|
155
|
+
# @!attribute [rw] description
|
156
|
+
# The description of the custom terminology being imported.
|
157
|
+
# @return [String]
|
158
|
+
#
|
159
|
+
# @!attribute [rw] terminology_data
|
160
|
+
# The terminology data for the custom terminology being imported.
|
161
|
+
# @return [Types::TerminologyData]
|
162
|
+
#
|
163
|
+
# @!attribute [rw] encryption_key
|
164
|
+
# The encryption key for the custom terminology being imported.
|
165
|
+
# @return [Types::EncryptionKey]
|
166
|
+
#
|
167
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ImportTerminologyRequest AWS API Documentation
|
168
|
+
#
|
169
|
+
class ImportTerminologyRequest < Struct.new(
|
170
|
+
:name,
|
171
|
+
:merge_strategy,
|
172
|
+
:description,
|
173
|
+
:terminology_data,
|
174
|
+
:encryption_key)
|
175
|
+
include Aws::Structure
|
176
|
+
end
|
177
|
+
|
178
|
+
# @!attribute [rw] terminology_properties
|
179
|
+
# The properties of the custom terminology being imported.
|
180
|
+
# @return [Types::TerminologyProperties]
|
181
|
+
#
|
182
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ImportTerminologyResponse AWS API Documentation
|
183
|
+
#
|
184
|
+
class ImportTerminologyResponse < Struct.new(
|
185
|
+
:terminology_properties)
|
186
|
+
include Aws::Structure
|
187
|
+
end
|
188
|
+
|
189
|
+
# @note When making an API call, you may pass ListTerminologiesRequest
|
190
|
+
# data as a hash:
|
191
|
+
#
|
192
|
+
# {
|
193
|
+
# next_token: "NextToken",
|
194
|
+
# max_results: 1,
|
195
|
+
# }
|
196
|
+
#
|
197
|
+
# @!attribute [rw] next_token
|
198
|
+
# If the result of the request to ListTerminologies was truncated,
|
199
|
+
# include the NextToken to fetch the next group of custom
|
200
|
+
# terminologies.
|
201
|
+
# @return [String]
|
202
|
+
#
|
203
|
+
# @!attribute [rw] max_results
|
204
|
+
# The maximum number of custom terminologies returned per list
|
205
|
+
# request.
|
206
|
+
# @return [Integer]
|
207
|
+
#
|
208
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ListTerminologiesRequest AWS API Documentation
|
209
|
+
#
|
210
|
+
class ListTerminologiesRequest < Struct.new(
|
211
|
+
:next_token,
|
212
|
+
:max_results)
|
213
|
+
include Aws::Structure
|
214
|
+
end
|
215
|
+
|
216
|
+
# @!attribute [rw] terminology_properties_list
|
217
|
+
# The properties list of the custom terminologies returned on the list
|
218
|
+
# request.
|
219
|
+
# @return [Array<Types::TerminologyProperties>]
|
220
|
+
#
|
221
|
+
# @!attribute [rw] next_token
|
222
|
+
# If the response to the ListTerminologies was truncated, the
|
223
|
+
# NextToken fetches the next group of custom terminologies.
|
224
|
+
# @return [String]
|
225
|
+
#
|
226
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ListTerminologiesResponse AWS API Documentation
|
227
|
+
#
|
228
|
+
class ListTerminologiesResponse < Struct.new(
|
229
|
+
:terminology_properties_list,
|
230
|
+
:next_token)
|
231
|
+
include Aws::Structure
|
232
|
+
end
|
233
|
+
|
234
|
+
# The term being translated by the custom terminology.
|
235
|
+
#
|
236
|
+
# @!attribute [rw] source_text
|
237
|
+
# The source text of the term being translated by the custom
|
238
|
+
# terminology.
|
239
|
+
# @return [String]
|
240
|
+
#
|
241
|
+
# @!attribute [rw] target_text
|
242
|
+
# The target text of the term being translated by the custom
|
243
|
+
# terminology.
|
244
|
+
# @return [String]
|
245
|
+
#
|
246
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/Term AWS API Documentation
|
247
|
+
#
|
248
|
+
class Term < Struct.new(
|
249
|
+
:source_text,
|
250
|
+
:target_text)
|
251
|
+
include Aws::Structure
|
252
|
+
end
|
253
|
+
|
254
|
+
# The data associated with the custom terminology.
|
255
|
+
#
|
256
|
+
# @note When making an API call, you may pass TerminologyData
|
257
|
+
# data as a hash:
|
258
|
+
#
|
259
|
+
# {
|
260
|
+
# file: "data", # required
|
261
|
+
# format: "CSV", # required, accepts CSV, TMX
|
262
|
+
# }
|
263
|
+
#
|
264
|
+
# @!attribute [rw] file
|
265
|
+
# The file containing the custom terminology data.
|
266
|
+
# @return [String]
|
267
|
+
#
|
268
|
+
# @!attribute [rw] format
|
269
|
+
# The data format of the custom terminology. Either CSV or TMX.
|
270
|
+
# @return [String]
|
271
|
+
#
|
272
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/TerminologyData AWS API Documentation
|
273
|
+
#
|
274
|
+
class TerminologyData < Struct.new(
|
275
|
+
:file,
|
276
|
+
:format)
|
277
|
+
include Aws::Structure
|
278
|
+
end
|
279
|
+
|
280
|
+
# The location of the custom terminology data.
|
281
|
+
#
|
282
|
+
# @!attribute [rw] repository_type
|
283
|
+
# The repository type for the custom terminology data.
|
284
|
+
# @return [String]
|
285
|
+
#
|
286
|
+
# @!attribute [rw] location
|
287
|
+
# The location of the custom terminology data.
|
288
|
+
# @return [String]
|
289
|
+
#
|
290
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/TerminologyDataLocation AWS API Documentation
|
291
|
+
#
|
292
|
+
class TerminologyDataLocation < Struct.new(
|
293
|
+
:repository_type,
|
294
|
+
:location)
|
295
|
+
include Aws::Structure
|
296
|
+
end
|
297
|
+
|
298
|
+
# The properties of the custom terminology.
|
299
|
+
#
|
300
|
+
# @!attribute [rw] name
|
301
|
+
# The name of the custom terminology.
|
302
|
+
# @return [String]
|
303
|
+
#
|
304
|
+
# @!attribute [rw] description
|
305
|
+
# The description of the custom terminology properties.
|
306
|
+
# @return [String]
|
307
|
+
#
|
308
|
+
# @!attribute [rw] arn
|
309
|
+
# The Amazon Resource Name (ARN) of the custom terminology.
|
310
|
+
# @return [String]
|
311
|
+
#
|
312
|
+
# @!attribute [rw] source_language_code
|
313
|
+
# The language code for the source text of the translation request for
|
314
|
+
# which the custom terminology is being used.
|
315
|
+
# @return [String]
|
316
|
+
#
|
317
|
+
# @!attribute [rw] target_language_codes
|
318
|
+
# The language codes for the target languages available with the
|
319
|
+
# custom terminology file. All possible target languages are returned
|
320
|
+
# in array.
|
321
|
+
# @return [Array<String>]
|
322
|
+
#
|
323
|
+
# @!attribute [rw] encryption_key
|
324
|
+
# The encryption key for the custom terminology.
|
325
|
+
# @return [Types::EncryptionKey]
|
326
|
+
#
|
327
|
+
# @!attribute [rw] size_bytes
|
328
|
+
# The size of the file used when importing a custom terminology.
|
329
|
+
# @return [Integer]
|
330
|
+
#
|
331
|
+
# @!attribute [rw] term_count
|
332
|
+
# The number of terms included in the custom terminology.
|
333
|
+
# @return [Integer]
|
334
|
+
#
|
335
|
+
# @!attribute [rw] created_at
|
336
|
+
# The time at which the custom terminology was created, based on the
|
337
|
+
# timestamp.
|
338
|
+
# @return [Time]
|
339
|
+
#
|
340
|
+
# @!attribute [rw] last_updated_at
|
341
|
+
# The time at which the custom terminology was last update, based on
|
342
|
+
# the timestamp.
|
343
|
+
# @return [Time]
|
344
|
+
#
|
345
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/TerminologyProperties AWS API Documentation
|
346
|
+
#
|
347
|
+
class TerminologyProperties < Struct.new(
|
348
|
+
:name,
|
349
|
+
:description,
|
350
|
+
:arn,
|
351
|
+
:source_language_code,
|
352
|
+
:target_language_codes,
|
353
|
+
:encryption_key,
|
354
|
+
:size_bytes,
|
355
|
+
:term_count,
|
356
|
+
:created_at,
|
357
|
+
:last_updated_at)
|
358
|
+
include Aws::Structure
|
359
|
+
end
|
360
|
+
|
11
361
|
# @note When making an API call, you may pass TranslateTextRequest
|
12
362
|
# data as a hash:
|
13
363
|
#
|
14
364
|
# {
|
15
365
|
# text: "BoundedLengthString", # required
|
366
|
+
# terminology_names: ["ResourceName"],
|
16
367
|
# source_language_code: "LanguageCodeString", # required
|
17
368
|
# target_language_code: "LanguageCodeString", # required
|
18
369
|
# }
|
19
370
|
#
|
20
371
|
# @!attribute [rw] text
|
21
|
-
# The text to translate.
|
372
|
+
# The text to translate. The text string can be a maximum of 5,000
|
373
|
+
# bytes long. Depending on your character set, this may be fewer than
|
374
|
+
# 5,000 characters.
|
22
375
|
# @return [String]
|
23
376
|
#
|
377
|
+
# @!attribute [rw] terminology_names
|
378
|
+
# The TerminologyNames list that is taken as input to the
|
379
|
+
# TranslateText request. This has a minimum length of 0 and a maximum
|
380
|
+
# length of 1.
|
381
|
+
# @return [Array<String>]
|
382
|
+
#
|
24
383
|
# @!attribute [rw] source_language_code
|
25
|
-
#
|
26
|
-
#
|
27
|
-
# "en".
|
384
|
+
# The language code for the language of the source text. The language
|
385
|
+
# must be a language supported by Amazon Translate.
|
28
386
|
#
|
29
387
|
# To have Amazon Translate determine the source language of your text,
|
30
388
|
# you can specify `auto` in the `SourceLanguageCode` field. If you
|
@@ -33,38 +391,44 @@ module Aws::Translate
|
|
33
391
|
# @return [String]
|
34
392
|
#
|
35
393
|
# @!attribute [rw] target_language_code
|
36
|
-
#
|
37
|
-
#
|
38
|
-
# "en".
|
394
|
+
# The language code requested for the language of the target text. The
|
395
|
+
# language must be a language supported by Amazon Translate.
|
39
396
|
# @return [String]
|
40
397
|
#
|
41
398
|
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/TranslateTextRequest AWS API Documentation
|
42
399
|
#
|
43
400
|
class TranslateTextRequest < Struct.new(
|
44
401
|
:text,
|
402
|
+
:terminology_names,
|
45
403
|
:source_language_code,
|
46
404
|
:target_language_code)
|
47
405
|
include Aws::Structure
|
48
406
|
end
|
49
407
|
|
50
408
|
# @!attribute [rw] translated_text
|
51
|
-
# The
|
409
|
+
# The the translated text. The maximum length of this text is 5kb.
|
52
410
|
# @return [String]
|
53
411
|
#
|
54
412
|
# @!attribute [rw] source_language_code
|
55
|
-
# The language code for the language of the
|
413
|
+
# The language code for the language of the source text.
|
56
414
|
# @return [String]
|
57
415
|
#
|
58
416
|
# @!attribute [rw] target_language_code
|
59
|
-
# The language code for the language of the
|
417
|
+
# The language code for the language of the target text.
|
60
418
|
# @return [String]
|
61
419
|
#
|
420
|
+
# @!attribute [rw] applied_terminologies
|
421
|
+
# The names of the custom terminologies applied to the input text by
|
422
|
+
# Amazon Translate for the translated text response.
|
423
|
+
# @return [Array<Types::AppliedTerminology>]
|
424
|
+
#
|
62
425
|
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/TranslateTextResponse AWS API Documentation
|
63
426
|
#
|
64
427
|
class TranslateTextResponse < Struct.new(
|
65
428
|
:translated_text,
|
66
429
|
:source_language_code,
|
67
|
-
:target_language_code
|
430
|
+
:target_language_code,
|
431
|
+
:applied_terminologies)
|
68
432
|
include Aws::Structure
|
69
433
|
end
|
70
434
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-translate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|