aws-sdk-translate 1.42.0 → 1.45.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dbccaa5325a7a60643eccd5b4eabf0891c06df99218dcc7191e3fbe97187d676
4
- data.tar.gz: 6dc19563254ffc0d8a21aa57b7e60cd8281e94b8e017c7f6a17eabd8f73c3dfc
3
+ metadata.gz: abd066b6c5b9dac4d629ffbbc189078b1ad429a8feca5970634bfa4df1aea81e
4
+ data.tar.gz: 0dc26a80eb1dd895d3bf5c4e1720818cf1b7cf0849527f5d41ac0572c16ff23a
5
5
  SHA512:
6
- metadata.gz: b88054715b10c07e9cc7fa8f4eecc056ca64310b8eee914f00c8b135f2a2f5fe97742cf18466ff09da7bd5e87d9213a420e202f4a89c845b60ff4233ed0fbf60
7
- data.tar.gz: a8ac4364655e9945b2a62484442050959fd6728dc2766ecb3f6da751573b9e00d0122c274fc79de1985a68557df96271b37725f2cf33f22cd7c84435d18804dd
6
+ metadata.gz: 84d26f6c04e0c0193f23517a6bd6161ab896df0f9a150ed7b27157f5d2184deee3df26c9a4274a4fecfb355ee38fffbe6f9c8188ec21548baf2206e7b03bef1c
7
+ data.tar.gz: a5c833133ca4feb63679f1ee0edf21aba3967daf1af88e421ec75157190e6092c530dc5666f1e53ac2ab27e783da1b99a2f986bc37a46a74d1c763a11ab348b8
data/CHANGELOG.md CHANGED
@@ -1,6 +1,21 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.45.0 (2022-06-29)
5
+ ------------------
6
+
7
+ * Feature - Added ListLanguages API which can be used to list the languages supported by Translate.
8
+
9
+ 1.44.0 (2022-02-24)
10
+ ------------------
11
+
12
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
13
+
14
+ 1.43.0 (2022-02-22)
15
+ ------------------
16
+
17
+ * Feature - This release enables customers to use translation settings for formality customization in their synchronous translation output.
18
+
4
19
  1.42.0 (2022-02-03)
5
20
  ------------------
6
21
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.42.0
1
+ 1.45.0
@@ -27,6 +27,7 @@ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
27
27
  require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
28
28
  require 'aws-sdk-core/plugins/transfer_encoding.rb'
29
29
  require 'aws-sdk-core/plugins/http_checksum.rb'
30
+ require 'aws-sdk-core/plugins/checksum_algorithm.rb'
30
31
  require 'aws-sdk-core/plugins/defaults_mode.rb'
31
32
  require 'aws-sdk-core/plugins/recursion_detection.rb'
32
33
  require 'aws-sdk-core/plugins/signature_v4.rb'
@@ -75,6 +76,7 @@ module Aws::Translate
75
76
  add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
76
77
  add_plugin(Aws::Plugins::TransferEncoding)
77
78
  add_plugin(Aws::Plugins::HttpChecksum)
79
+ add_plugin(Aws::Plugins::ChecksumAlgorithm)
78
80
  add_plugin(Aws::Plugins::DefaultsMode)
79
81
  add_plugin(Aws::Plugins::RecursionDetection)
80
82
  add_plugin(Aws::Plugins::SignatureV4)
@@ -516,6 +518,7 @@ module Aws::Translate
516
518
  # resp.text_translation_job_properties.output_data_config.encryption_key.type #=> String, one of "KMS"
517
519
  # resp.text_translation_job_properties.output_data_config.encryption_key.id #=> String
518
520
  # resp.text_translation_job_properties.data_access_role_arn #=> String
521
+ # resp.text_translation_job_properties.settings.formality #=> String, one of "FORMAL", "INFORMAL"
519
522
  # resp.text_translation_job_properties.settings.profanity #=> String, one of "MASK"
520
523
  #
521
524
  # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/DescribeTextTranslationJob AWS API Documentation
@@ -592,12 +595,12 @@ module Aws::Translate
592
595
  # The data format of the custom terminology being retrieved.
593
596
  #
594
597
  # If you don't specify this parameter, Amazon Translate returns a file
595
- # that has the same format as the file that was imported to create the
598
+ # with the same format as the file that was imported to create the
596
599
  # terminology.
597
600
  #
598
601
  # If you specify this parameter when you retrieve a multi-directional
599
- # terminology resource, you must specify the same format as that of the
600
- # input file that was imported to create it. Otherwise, Amazon Translate
602
+ # terminology resource, you must specify the same format as the input
603
+ # file that was imported to create it. Otherwise, Amazon Translate
601
604
  # throws an error.
602
605
  #
603
606
  # @return [Types::GetTerminologyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
@@ -645,17 +648,16 @@ module Aws::Translate
645
648
  req.send_request(options)
646
649
  end
647
650
 
648
- # Creates or updates a custom terminology, depending on whether or not
649
- # one already exists for the given terminology name. Importing a
650
- # terminology with the same name as an existing one will merge the
651
- # terminologies based on the chosen merge strategy. Currently, the only
652
- # supported merge strategy is OVERWRITE, and so the imported terminology
653
- # will overwrite an existing terminology of the same name.
651
+ # Creates or updates a custom terminology, depending on whether one
652
+ # already exists for the given terminology name. Importing a terminology
653
+ # with the same name as an existing one will merge the terminologies
654
+ # based on the chosen merge strategy. The only supported merge strategy
655
+ # is OVERWRITE, where the imported terminology overwrites the existing
656
+ # terminology of the same name.
654
657
  #
655
658
  # If you import a terminology that overwrites an existing one, the new
656
- # terminology take up to 10 minutes to fully propagate and be available
657
- # for use in a translation due to cache policies with the DataPlane
658
- # service that performs the translations.
659
+ # terminology takes up to 10 minutes to fully propagate. After that,
660
+ # translations have access to the new terminology.
659
661
  #
660
662
  # @option params [required, String] :name
661
663
  # The name of the custom terminology being imported.
@@ -727,6 +729,53 @@ module Aws::Translate
727
729
  req.send_request(options)
728
730
  end
729
731
 
732
+ # Provides a list of languages (RFC-5646 codes and names) that Amazon
733
+ # Translate supports.
734
+ #
735
+ # @option params [String] :display_language_code
736
+ # The language code for the language to use to display the language
737
+ # names in the response. The language code is `en` by default.
738
+ #
739
+ # @option params [String] :next_token
740
+ # Include the NextToken value to fetch the next group of supported
741
+ # languages.
742
+ #
743
+ # @option params [Integer] :max_results
744
+ # The maximum number of results to return in each response.
745
+ #
746
+ # @return [Types::ListLanguagesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
747
+ #
748
+ # * {Types::ListLanguagesResponse#languages #languages} => Array<Types::Language>
749
+ # * {Types::ListLanguagesResponse#display_language_code #display_language_code} => String
750
+ # * {Types::ListLanguagesResponse#next_token #next_token} => String
751
+ #
752
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
753
+ #
754
+ # @example Request syntax with placeholder values
755
+ #
756
+ # resp = client.list_languages({
757
+ # display_language_code: "de", # accepts de, en, es, fr, it, ja, ko, pt, zh, zh-TW
758
+ # next_token: "NextToken",
759
+ # max_results: 1,
760
+ # })
761
+ #
762
+ # @example Response structure
763
+ #
764
+ # resp.languages #=> Array
765
+ # resp.languages[0].language_name #=> String
766
+ # resp.languages[0].language_code #=> String
767
+ # resp.display_language_code #=> String, one of "de", "en", "es", "fr", "it", "ja", "ko", "pt", "zh", "zh-TW"
768
+ # resp.next_token #=> String
769
+ #
770
+ # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ListLanguages AWS API Documentation
771
+ #
772
+ # @overload list_languages(params = {})
773
+ # @param [Hash] params ({})
774
+ def list_languages(params = {}, options = {})
775
+ req = build_request(:list_languages, params)
776
+ req.send_request(options)
777
+ end
778
+
730
779
  # Provides a list of your parallel data resources in Amazon Translate.
731
780
  #
732
781
  # @option params [String] :next_token
@@ -897,6 +946,7 @@ module Aws::Translate
897
946
  # resp.text_translation_job_properties_list[0].output_data_config.encryption_key.type #=> String, one of "KMS"
898
947
  # resp.text_translation_job_properties_list[0].output_data_config.encryption_key.id #=> String
899
948
  # resp.text_translation_job_properties_list[0].data_access_role_arn #=> String
949
+ # resp.text_translation_job_properties_list[0].settings.formality #=> String, one of "FORMAL", "INFORMAL"
900
950
  # resp.text_translation_job_properties_list[0].settings.profanity #=> String, one of "MASK"
901
951
  # resp.next_token #=> String
902
952
  #
@@ -927,7 +977,7 @@ module Aws::Translate
927
977
  # The name of the batch translation job to be performed.
928
978
  #
929
979
  # @option params [required, Types::InputDataConfig] :input_data_config
930
- # Specifies the format and S3 location of the input documents for the
980
+ # Specifies the format and location of the input documents for the
931
981
  # translation job.
932
982
  #
933
983
  # @option params [required, Types::OutputDataConfig] :output_data_config
@@ -984,15 +1034,16 @@ module Aws::Translate
984
1034
  # [1]: http://aws.amazon.com/translate/pricing/
985
1035
  #
986
1036
  # @option params [required, String] :client_token
987
- # A unique identifier for the request. This token is auto-generated when
988
- # using the Amazon Translate SDK.
1037
+ # A unique identifier for the request. This token is generated for you
1038
+ # when using the Amazon Translate SDK.
989
1039
  #
990
1040
  # **A suitable default value is auto-generated.** You should normally
991
1041
  # not need to pass this option.**
992
1042
  #
993
1043
  # @option params [Types::TranslationSettings] :settings
994
1044
  # Settings to configure your translation output, including the option to
995
- # mask profane words and phrases.
1045
+ # mask profane words and phrases. `StartTextTranslationJob` does not
1046
+ # support the formality setting.
996
1047
  #
997
1048
  # @return [Types::StartTextTranslationJobResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
998
1049
  #
@@ -1021,6 +1072,7 @@ module Aws::Translate
1021
1072
  # parallel_data_names: ["ResourceName"],
1022
1073
  # client_token: "ClientTokenString", # required
1023
1074
  # settings: {
1075
+ # formality: "FORMAL", # accepts FORMAL, INFORMAL
1024
1076
  # profanity: "MASK", # accepts MASK
1025
1077
  # },
1026
1078
  # })
@@ -1103,6 +1155,12 @@ module Aws::Translate
1103
1155
  # specify `auto`, Amazon Translate will call [Amazon Comprehend][1] to
1104
1156
  # determine the source language.
1105
1157
  #
1158
+ # <note markdown="1"> If you specify `auto`, you must send the `TranslateText` request in a
1159
+ # region that supports Amazon Comprehend. Otherwise, the request returns
1160
+ # an error indicating that autodetect is not supported.
1161
+ #
1162
+ # </note>
1163
+ #
1106
1164
  #
1107
1165
  #
1108
1166
  # [1]: https://docs.aws.amazon.com/comprehend/latest/dg/comprehend-general.html
@@ -1113,7 +1171,8 @@ module Aws::Translate
1113
1171
  #
1114
1172
  # @option params [Types::TranslationSettings] :settings
1115
1173
  # Settings to configure your translation output, including the option to
1116
- # mask profane words and phrases.
1174
+ # set the formality level of the output text and the option to mask
1175
+ # profane words and phrases.
1117
1176
  #
1118
1177
  # @return [Types::TranslateTextResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1119
1178
  #
@@ -1131,6 +1190,7 @@ module Aws::Translate
1131
1190
  # source_language_code: "LanguageCodeString", # required
1132
1191
  # target_language_code: "LanguageCodeString", # required
1133
1192
  # settings: {
1193
+ # formality: "FORMAL", # accepts FORMAL, INFORMAL
1134
1194
  # profanity: "MASK", # accepts MASK
1135
1195
  # },
1136
1196
  # })
@@ -1145,6 +1205,7 @@ module Aws::Translate
1145
1205
  # resp.applied_terminologies[0].terms #=> Array
1146
1206
  # resp.applied_terminologies[0].terms[0].source_text #=> String
1147
1207
  # resp.applied_terminologies[0].terms[0].target_text #=> String
1208
+ # resp.applied_settings.formality #=> String, one of "FORMAL", "INFORMAL"
1148
1209
  # resp.applied_settings.profanity #=> String, one of "MASK"
1149
1210
  #
1150
1211
  # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/TranslateText AWS API Documentation
@@ -1224,7 +1285,7 @@ module Aws::Translate
1224
1285
  params: params,
1225
1286
  config: config)
1226
1287
  context[:gem_name] = 'aws-sdk-translate'
1227
- context[:gem_version] = '1.42.0'
1288
+ context[:gem_version] = '1.45.0'
1228
1289
  Seahorse::Client::Request.new(handlers, context)
1229
1290
  end
1230
1291
 
@@ -30,9 +30,11 @@ module Aws::Translate
30
30
  Description = Shapes::StringShape.new(name: 'Description')
31
31
  DetectedLanguageLowConfidenceException = Shapes::StructureShape.new(name: 'DetectedLanguageLowConfidenceException')
32
32
  Directionality = Shapes::StringShape.new(name: 'Directionality')
33
+ DisplayLanguageCode = Shapes::StringShape.new(name: 'DisplayLanguageCode')
33
34
  EncryptionKey = Shapes::StructureShape.new(name: 'EncryptionKey')
34
35
  EncryptionKeyID = Shapes::StringShape.new(name: 'EncryptionKeyID')
35
36
  EncryptionKeyType = Shapes::StringShape.new(name: 'EncryptionKeyType')
37
+ Formality = Shapes::StringShape.new(name: 'Formality')
36
38
  GetParallelDataRequest = Shapes::StructureShape.new(name: 'GetParallelDataRequest')
37
39
  GetParallelDataResponse = Shapes::StructureShape.new(name: 'GetParallelDataResponse')
38
40
  GetTerminologyRequest = Shapes::StructureShape.new(name: 'GetTerminologyRequest')
@@ -50,15 +52,20 @@ module Aws::Translate
50
52
  JobId = Shapes::StringShape.new(name: 'JobId')
51
53
  JobName = Shapes::StringShape.new(name: 'JobName')
52
54
  JobStatus = Shapes::StringShape.new(name: 'JobStatus')
55
+ Language = Shapes::StructureShape.new(name: 'Language')
53
56
  LanguageCodeString = Shapes::StringShape.new(name: 'LanguageCodeString')
54
57
  LanguageCodeStringList = Shapes::ListShape.new(name: 'LanguageCodeStringList')
58
+ LanguagesList = Shapes::ListShape.new(name: 'LanguagesList')
55
59
  LimitExceededException = Shapes::StructureShape.new(name: 'LimitExceededException')
60
+ ListLanguagesRequest = Shapes::StructureShape.new(name: 'ListLanguagesRequest')
61
+ ListLanguagesResponse = Shapes::StructureShape.new(name: 'ListLanguagesResponse')
56
62
  ListParallelDataRequest = Shapes::StructureShape.new(name: 'ListParallelDataRequest')
57
63
  ListParallelDataResponse = Shapes::StructureShape.new(name: 'ListParallelDataResponse')
58
64
  ListTerminologiesRequest = Shapes::StructureShape.new(name: 'ListTerminologiesRequest')
59
65
  ListTerminologiesResponse = Shapes::StructureShape.new(name: 'ListTerminologiesResponse')
60
66
  ListTextTranslationJobsRequest = Shapes::StructureShape.new(name: 'ListTextTranslationJobsRequest')
61
67
  ListTextTranslationJobsResponse = Shapes::StructureShape.new(name: 'ListTextTranslationJobsResponse')
68
+ LocalizedNameString = Shapes::StringShape.new(name: 'LocalizedNameString')
62
69
  Long = Shapes::IntegerShape.new(name: 'Long')
63
70
  MaxResultsInteger = Shapes::IntegerShape.new(name: 'MaxResultsInteger')
64
71
  MergeStrategy = Shapes::StringShape.new(name: 'MergeStrategy')
@@ -102,6 +109,7 @@ module Aws::Translate
102
109
  TranslateTextResponse = Shapes::StructureShape.new(name: 'TranslateTextResponse')
103
110
  TranslationSettings = Shapes::StructureShape.new(name: 'TranslationSettings')
104
111
  UnboundedLengthString = Shapes::StringShape.new(name: 'UnboundedLengthString')
112
+ UnsupportedDisplayLanguageCodeException = Shapes::StructureShape.new(name: 'UnsupportedDisplayLanguageCodeException')
105
113
  UnsupportedLanguagePairException = Shapes::StructureShape.new(name: 'UnsupportedLanguagePairException')
106
114
  UpdateParallelDataRequest = Shapes::StructureShape.new(name: 'UpdateParallelDataRequest')
107
115
  UpdateParallelDataResponse = Shapes::StructureShape.new(name: 'UpdateParallelDataResponse')
@@ -203,11 +211,27 @@ module Aws::Translate
203
211
  JobDetails.add_member(:input_documents_count, Shapes::ShapeRef.new(shape: Integer, location_name: "InputDocumentsCount"))
204
212
  JobDetails.struct_class = Types::JobDetails
205
213
 
214
+ Language.add_member(:language_name, Shapes::ShapeRef.new(shape: LocalizedNameString, required: true, location_name: "LanguageName"))
215
+ Language.add_member(:language_code, Shapes::ShapeRef.new(shape: LanguageCodeString, required: true, location_name: "LanguageCode"))
216
+ Language.struct_class = Types::Language
217
+
206
218
  LanguageCodeStringList.member = Shapes::ShapeRef.new(shape: LanguageCodeString)
207
219
 
220
+ LanguagesList.member = Shapes::ShapeRef.new(shape: Language)
221
+
208
222
  LimitExceededException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
209
223
  LimitExceededException.struct_class = Types::LimitExceededException
210
224
 
225
+ ListLanguagesRequest.add_member(:display_language_code, Shapes::ShapeRef.new(shape: DisplayLanguageCode, location_name: "DisplayLanguageCode"))
226
+ ListLanguagesRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "NextToken"))
227
+ ListLanguagesRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResultsInteger, location_name: "MaxResults"))
228
+ ListLanguagesRequest.struct_class = Types::ListLanguagesRequest
229
+
230
+ ListLanguagesResponse.add_member(:languages, Shapes::ShapeRef.new(shape: LanguagesList, location_name: "Languages"))
231
+ ListLanguagesResponse.add_member(:display_language_code, Shapes::ShapeRef.new(shape: DisplayLanguageCode, location_name: "DisplayLanguageCode"))
232
+ ListLanguagesResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "NextToken"))
233
+ ListLanguagesResponse.struct_class = Types::ListLanguagesResponse
234
+
211
235
  ListParallelDataRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "NextToken"))
212
236
  ListParallelDataRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResultsInteger, location_name: "MaxResults"))
213
237
  ListParallelDataRequest.struct_class = Types::ListParallelDataRequest
@@ -377,9 +401,14 @@ module Aws::Translate
377
401
  TranslateTextResponse.add_member(:applied_settings, Shapes::ShapeRef.new(shape: TranslationSettings, location_name: "AppliedSettings"))
378
402
  TranslateTextResponse.struct_class = Types::TranslateTextResponse
379
403
 
404
+ TranslationSettings.add_member(:formality, Shapes::ShapeRef.new(shape: Formality, location_name: "Formality"))
380
405
  TranslationSettings.add_member(:profanity, Shapes::ShapeRef.new(shape: Profanity, location_name: "Profanity"))
381
406
  TranslationSettings.struct_class = Types::TranslationSettings
382
407
 
408
+ UnsupportedDisplayLanguageCodeException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
409
+ UnsupportedDisplayLanguageCodeException.add_member(:display_language_code, Shapes::ShapeRef.new(shape: LanguageCodeString, location_name: "DisplayLanguageCode"))
410
+ UnsupportedDisplayLanguageCodeException.struct_class = Types::UnsupportedDisplayLanguageCodeException
411
+
383
412
  UnsupportedLanguagePairException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
384
413
  UnsupportedLanguagePairException.add_member(:source_language_code, Shapes::ShapeRef.new(shape: LanguageCodeString, location_name: "SourceLanguageCode"))
385
414
  UnsupportedLanguagePairException.add_member(:target_language_code, Shapes::ShapeRef.new(shape: LanguageCodeString, location_name: "TargetLanguageCode"))
@@ -501,6 +530,24 @@ module Aws::Translate
501
530
  o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
502
531
  end)
503
532
 
533
+ api.add_operation(:list_languages, Seahorse::Model::Operation.new.tap do |o|
534
+ o.name = "ListLanguages"
535
+ o.http_method = "POST"
536
+ o.http_request_uri = "/"
537
+ o.input = Shapes::ShapeRef.new(shape: ListLanguagesRequest)
538
+ o.output = Shapes::ShapeRef.new(shape: ListLanguagesResponse)
539
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterValueException)
540
+ o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
541
+ o.errors << Shapes::ShapeRef.new(shape: UnsupportedDisplayLanguageCodeException)
542
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
543
+ o[:pager] = Aws::Pager.new(
544
+ limit_key: "max_results",
545
+ tokens: {
546
+ "next_token" => "next_token"
547
+ }
548
+ )
549
+ end)
550
+
504
551
  api.add_operation(:list_parallel_data, Seahorse::Model::Operation.new.tap do |o|
505
552
  o.name = "ListParallelData"
506
553
  o.http_method = "POST"
@@ -39,6 +39,7 @@ module Aws::Translate
39
39
  # * {ServiceUnavailableException}
40
40
  # * {TextSizeLimitExceededException}
41
41
  # * {TooManyRequestsException}
42
+ # * {UnsupportedDisplayLanguageCodeException}
42
43
  # * {UnsupportedLanguagePairException}
43
44
  #
44
45
  # Additionally, error classes are dynamically generated for service errors based on the error code
@@ -232,6 +233,26 @@ module Aws::Translate
232
233
  end
233
234
  end
234
235
 
236
+ class UnsupportedDisplayLanguageCodeException < ServiceError
237
+
238
+ # @param [Seahorse::Client::RequestContext] context
239
+ # @param [String] message
240
+ # @param [Aws::Translate::Types::UnsupportedDisplayLanguageCodeException] data
241
+ def initialize(context, message, data = Aws::EmptyStructure.new)
242
+ super(context, message, data)
243
+ end
244
+
245
+ # @return [String]
246
+ def message
247
+ @message || @data[:message]
248
+ end
249
+
250
+ # @return [String]
251
+ def display_language_code
252
+ @data[:display_language_code]
253
+ end
254
+ end
255
+
235
256
  class UnsupportedLanguagePairException < ServiceError
236
257
 
237
258
  # @param [Seahorse::Client::RequestContext] context
@@ -311,7 +311,7 @@ module Aws::Translate
311
311
  # @!attribute [rw] data_location
312
312
  # The Amazon S3 location of the most recent parallel data input file
313
313
  # that was successfully imported into Amazon Translate. The location
314
- # is returned as a presigned URL that has a 30 minute expiration.
314
+ # is returned as a presigned URL that has a 30-minute expiration.
315
315
  #
316
316
  # Amazon Translate doesn't scan all input files for the risk of CSV
317
317
  # injection attacks.
@@ -331,7 +331,7 @@ module Aws::Translate
331
331
  # warnings that were produced by your input file. This file was
332
332
  # created when Amazon Translate attempted to create a parallel data
333
333
  # resource. The location is returned as a presigned URL to that has a
334
- # 30 minute expiration.
334
+ # 30-minute expiration.
335
335
  # @return [Types::ParallelDataDataLocation]
336
336
  #
337
337
  # @!attribute [rw] latest_update_attempt_auxiliary_data_location
@@ -339,7 +339,7 @@ module Aws::Translate
339
339
  # warnings that were produced by your input file. This file was
340
340
  # created when Amazon Translate attempted to update a parallel data
341
341
  # resource. The location is returned as a presigned URL to that has a
342
- # 30 minute expiration.
342
+ # 30-minute expiration.
343
343
  # @return [Types::ParallelDataDataLocation]
344
344
  #
345
345
  # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/GetParallelDataResponse AWS API Documentation
@@ -369,13 +369,13 @@ module Aws::Translate
369
369
  # The data format of the custom terminology being retrieved.
370
370
  #
371
371
  # If you don't specify this parameter, Amazon Translate returns a
372
- # file that has the same format as the file that was imported to
373
- # create the terminology.
372
+ # file with the same format as the file that was imported to create
373
+ # the terminology.
374
374
  #
375
375
  # If you specify this parameter when you retrieve a multi-directional
376
- # terminology resource, you must specify the same format as that of
377
- # the input file that was imported to create it. Otherwise, Amazon
378
- # Translate throws an error.
376
+ # terminology resource, you must specify the same format as the input
377
+ # file that was imported to create it. Otherwise, Amazon Translate
378
+ # throws an error.
379
379
  # @return [String]
380
380
  #
381
381
  # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/GetTerminologyRequest AWS API Documentation
@@ -394,7 +394,7 @@ module Aws::Translate
394
394
  # @!attribute [rw] terminology_data_location
395
395
  # The Amazon S3 location of the most recent custom terminology input
396
396
  # file that was successfully imported into Amazon Translate. The
397
- # location is returned as a presigned URL that has a 30 minute
397
+ # location is returned as a presigned URL that has a 30-minute
398
398
  # expiration.
399
399
  #
400
400
  # Amazon Translate doesn't scan all input files for the risk of CSV
@@ -415,7 +415,7 @@ module Aws::Translate
415
415
  # warnings that were produced by your input file. This file was
416
416
  # created when Amazon Translate attempted to create a terminology
417
417
  # resource. The location is returned as a presigned URL to that has a
418
- # 30 minute expiration.
418
+ # 30-minute expiration.
419
419
  # @return [Types::TerminologyDataLocation]
420
420
  #
421
421
  # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/GetTerminologyResponse AWS API Documentation
@@ -514,9 +514,18 @@ module Aws::Translate
514
514
  # }
515
515
  #
516
516
  # @!attribute [rw] s3_uri
517
- # The URI of the AWS S3 folder that contains the input file. The
518
- # folder must be in the same Region as the API endpoint you are
519
- # calling.
517
+ # The URI of the AWS S3 folder that contains the input files. Amazon
518
+ # Translate translates all the files in the folder. The folder must be
519
+ # in the same Region as the API endpoint you are calling.
520
+ #
521
+ # <note markdown="1"> The URI can also point to a single input document, or it can provide
522
+ # the prefix for a collection of input documents. For example. if you
523
+ # use the URI `S3://bucketName/prefix` and the prefix is a single
524
+ # file, Amazon Translate uses that files as input. If more than one
525
+ # file begins with the prefix, Amazon Translate uses all of them as
526
+ # input.
527
+ #
528
+ # </note>
520
529
  # @return [String]
521
530
  #
522
531
  # @!attribute [rw] content_type
@@ -576,8 +585,8 @@ module Aws::Translate
576
585
  include Aws::Structure
577
586
  end
578
587
 
579
- # The filter specified for the operation is invalid. Specify a different
580
- # filter.
588
+ # The filter specified for the operation is not valid. Specify a
589
+ # different filter.
581
590
  #
582
591
  # @!attribute [rw] message
583
592
  # @return [String]
@@ -590,7 +599,7 @@ module Aws::Translate
590
599
  include Aws::Structure
591
600
  end
592
601
 
593
- # The value of the parameter is invalid. Review the value of the
602
+ # The value of the parameter is not valid. Review the value of the
594
603
  # parameter you are using to correct it, and then retry your operation.
595
604
  #
596
605
  # @!attribute [rw] message
@@ -604,8 +613,8 @@ module Aws::Translate
604
613
  include Aws::Structure
605
614
  end
606
615
 
607
- # The request that you made is invalid. Check your request to determine
608
- # why it's invalid and then retry the request.
616
+ # The request that you made is not valid. Check your request to
617
+ # determine why it's not valid and then retry the request.
609
618
  #
610
619
  # @!attribute [rw] message
611
620
  # @return [String]
@@ -645,6 +654,25 @@ module Aws::Translate
645
654
  include Aws::Structure
646
655
  end
647
656
 
657
+ # A supported language.
658
+ #
659
+ # @!attribute [rw] language_name
660
+ # Language name of the supported language.
661
+ # @return [String]
662
+ #
663
+ # @!attribute [rw] language_code
664
+ # Language code for the supported language.
665
+ # @return [String]
666
+ #
667
+ # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/Language AWS API Documentation
668
+ #
669
+ class Language < Struct.new(
670
+ :language_name,
671
+ :language_code)
672
+ SENSITIVE = []
673
+ include Aws::Structure
674
+ end
675
+
648
676
  # The specified limit has been exceeded. Review your request and retry
649
677
  # it with a quantity below the stated limit.
650
678
  #
@@ -659,6 +687,63 @@ module Aws::Translate
659
687
  include Aws::Structure
660
688
  end
661
689
 
690
+ # @note When making an API call, you may pass ListLanguagesRequest
691
+ # data as a hash:
692
+ #
693
+ # {
694
+ # display_language_code: "de", # accepts de, en, es, fr, it, ja, ko, pt, zh, zh-TW
695
+ # next_token: "NextToken",
696
+ # max_results: 1,
697
+ # }
698
+ #
699
+ # @!attribute [rw] display_language_code
700
+ # The language code for the language to use to display the language
701
+ # names in the response. The language code is `en` by default.
702
+ # @return [String]
703
+ #
704
+ # @!attribute [rw] next_token
705
+ # Include the NextToken value to fetch the next group of supported
706
+ # languages.
707
+ # @return [String]
708
+ #
709
+ # @!attribute [rw] max_results
710
+ # The maximum number of results to return in each response.
711
+ # @return [Integer]
712
+ #
713
+ # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ListLanguagesRequest AWS API Documentation
714
+ #
715
+ class ListLanguagesRequest < Struct.new(
716
+ :display_language_code,
717
+ :next_token,
718
+ :max_results)
719
+ SENSITIVE = []
720
+ include Aws::Structure
721
+ end
722
+
723
+ # @!attribute [rw] languages
724
+ # The list of supported languages.
725
+ # @return [Array<Types::Language>]
726
+ #
727
+ # @!attribute [rw] display_language_code
728
+ # The language code passed in with the request.
729
+ # @return [String]
730
+ #
731
+ # @!attribute [rw] next_token
732
+ # If the response does not include all remaining results, use the
733
+ # NextToken in the next request to fetch the next group of supported
734
+ # languages.
735
+ # @return [String]
736
+ #
737
+ # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ListLanguagesResponse AWS API Documentation
738
+ #
739
+ class ListLanguagesResponse < Struct.new(
740
+ :languages,
741
+ :display_language_code,
742
+ :next_token)
743
+ SENSITIVE = []
744
+ include Aws::Structure
745
+ end
746
+
662
747
  # @note When making an API call, you may pass ListParallelDataRequest
663
748
  # data as a hash:
664
749
  #
@@ -880,7 +965,7 @@ module Aws::Translate
880
965
  #
881
966
  # @!attribute [rw] location
882
967
  # The Amazon S3 location of the parallel data input file. The location
883
- # is returned as a presigned URL to that has a 30 minute expiration.
968
+ # is returned as a presigned URL to that has a 30-minute expiration.
884
969
  #
885
970
  # Amazon Translate doesn't scan all input files for the risk of CSV
886
971
  # injection attacks.
@@ -1029,8 +1114,8 @@ module Aws::Translate
1029
1114
  include Aws::Structure
1030
1115
  end
1031
1116
 
1032
- # The Amazon Translate service is temporarily unavailable. Please wait a
1033
- # bit and then retry your request.
1117
+ # The Amazon Translate service is temporarily unavailable. Wait a bit
1118
+ # and then retry your request.
1034
1119
  #
1035
1120
  # @!attribute [rw] message
1036
1121
  # @return [String]
@@ -1066,6 +1151,7 @@ module Aws::Translate
1066
1151
  # parallel_data_names: ["ResourceName"],
1067
1152
  # client_token: "ClientTokenString", # required
1068
1153
  # settings: {
1154
+ # formality: "FORMAL", # accepts FORMAL, INFORMAL
1069
1155
  # profanity: "MASK", # accepts MASK
1070
1156
  # },
1071
1157
  # }
@@ -1075,7 +1161,7 @@ module Aws::Translate
1075
1161
  # @return [String]
1076
1162
  #
1077
1163
  # @!attribute [rw] input_data_config
1078
- # Specifies the format and S3 location of the input documents for the
1164
+ # Specifies the format and location of the input documents for the
1079
1165
  # translation job.
1080
1166
  # @return [Types::InputDataConfig]
1081
1167
  #
@@ -1140,7 +1226,7 @@ module Aws::Translate
1140
1226
  # @return [Array<String>]
1141
1227
  #
1142
1228
  # @!attribute [rw] client_token
1143
- # A unique identifier for the request. This token is auto-generated
1229
+ # A unique identifier for the request. This token is generated for you
1144
1230
  # when using the Amazon Translate SDK.
1145
1231
  #
1146
1232
  # **A suitable default value is auto-generated.** You should normally
@@ -1149,7 +1235,8 @@ module Aws::Translate
1149
1235
  #
1150
1236
  # @!attribute [rw] settings
1151
1237
  # Settings to configure your translation output, including the option
1152
- # to mask profane words and phrases.
1238
+ # to mask profane words and phrases. `StartTextTranslationJob` does
1239
+ # not support the formality setting.
1153
1240
  # @return [Types::TranslationSettings]
1154
1241
  #
1155
1242
  # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/StartTextTranslationJobRequest AWS API Documentation
@@ -1264,7 +1351,12 @@ module Aws::Translate
1264
1351
  include Aws::Structure
1265
1352
  end
1266
1353
 
1267
- # The data associated with the custom terminology.
1354
+ # The data associated with the custom terminology. For information about
1355
+ # the custom terminology file, see [ Creating a Custom Terminology][1].
1356
+ #
1357
+ #
1358
+ #
1359
+ # [1]: https://docs.aws.amazon.com/translate/latest/dg/creating-custom-terminology.html
1268
1360
  #
1269
1361
  # @note When making an API call, you may pass TerminologyData
1270
1362
  # data as a hash:
@@ -1302,9 +1394,9 @@ module Aws::Translate
1302
1394
  # : Any language in the terminology resource can be the source
1303
1395
  # language or a target language. A single multi-directional
1304
1396
  # terminology resource can be used for jobs that translate different
1305
- # language pairs. For example, if the terminology contains terms in
1306
- # English and Spanish, then it can be used for jobs that translate
1307
- # English to Spanish and jobs that translate Spanish to English.
1397
+ # language pairs. For example, if the terminology contains English
1398
+ # and Spanish terms, it can be used for jobs that translate English
1399
+ # to Spanish and Spanish to English.
1308
1400
  #
1309
1401
  # When you create a custom terminology resource without specifying the
1310
1402
  # directionality, it behaves as uni-directional terminology, although
@@ -1330,8 +1422,8 @@ module Aws::Translate
1330
1422
  # @!attribute [rw] location
1331
1423
  # The Amazon S3 location of the most recent custom terminology input
1332
1424
  # file that was successfully imported into Amazon Translate. The
1333
- # location is returned as a presigned URL that has a 30 minute
1334
- # expiration.
1425
+ # location is returned as a presigned URL that has a 30-minute
1426
+ # expiration .
1335
1427
  #
1336
1428
  # Amazon Translate doesn't scan all input files for the risk of CSV
1337
1429
  # injection attacks.
@@ -1633,6 +1725,7 @@ module Aws::Translate
1633
1725
  # source_language_code: "LanguageCodeString", # required
1634
1726
  # target_language_code: "LanguageCodeString", # required
1635
1727
  # settings: {
1728
+ # formality: "FORMAL", # accepts FORMAL, INFORMAL
1636
1729
  # profanity: "MASK", # accepts MASK
1637
1730
  # },
1638
1731
  # }
@@ -1660,6 +1753,12 @@ module Aws::Translate
1660
1753
  # specify `auto`, Amazon Translate will call [Amazon Comprehend][1] to
1661
1754
  # determine the source language.
1662
1755
  #
1756
+ # <note markdown="1"> If you specify `auto`, you must send the `TranslateText` request in
1757
+ # a region that supports Amazon Comprehend. Otherwise, the request
1758
+ # returns an error indicating that autodetect is not supported.
1759
+ #
1760
+ # </note>
1761
+ #
1663
1762
  #
1664
1763
  #
1665
1764
  # [1]: https://docs.aws.amazon.com/comprehend/latest/dg/comprehend-general.html
@@ -1672,7 +1771,8 @@ module Aws::Translate
1672
1771
  #
1673
1772
  # @!attribute [rw] settings
1674
1773
  # Settings to configure your translation output, including the option
1675
- # to mask profane words and phrases.
1774
+ # to set the formality level of the output text and the option to mask
1775
+ # profane words and phrases.
1676
1776
  # @return [Types::TranslationSettings]
1677
1777
  #
1678
1778
  # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/TranslateTextRequest AWS API Documentation
@@ -1726,9 +1826,33 @@ module Aws::Translate
1726
1826
  # data as a hash:
1727
1827
  #
1728
1828
  # {
1829
+ # formality: "FORMAL", # accepts FORMAL, INFORMAL
1729
1830
  # profanity: "MASK", # accepts MASK
1730
1831
  # }
1731
1832
  #
1833
+ # @!attribute [rw] formality
1834
+ # You can optionally specify the desired level of formality for
1835
+ # real-time translations to supported target languages. The formality
1836
+ # setting controls the level of formal language usage (also known as
1837
+ # [register][1]) in the translation output. You can set the value to
1838
+ # informal or formal. If you don't specify a value for formality, or
1839
+ # if the target language doesn't support formality, the translation
1840
+ # will ignore the formality setting.
1841
+ #
1842
+ # Note that asynchronous translation jobs don't support formality. If
1843
+ # you provide a value for formality, the `StartTextTranslationJob` API
1844
+ # throws an exception (InvalidRequestException).
1845
+ #
1846
+ # For target languages that support formality, see [Supported
1847
+ # Languages and Language Codes in the Amazon Translate Developer
1848
+ # Guide][2].
1849
+ #
1850
+ #
1851
+ #
1852
+ # [1]: https://en.wikipedia.org/wiki/Register_(sociolinguistics)
1853
+ # [2]: https://docs.aws.amazon.com/translate/latest/dg/what-is.html
1854
+ # @return [String]
1855
+ #
1732
1856
  # @!attribute [rw] profanity
1733
1857
  # Enable the profanity setting if you want Amazon Translate to mask
1734
1858
  # profane words and phrases in your translation output.
@@ -1738,24 +1862,43 @@ module Aws::Translate
1738
1862
  # for each profane word or phrase, regardless of the length or number
1739
1863
  # of words.
1740
1864
  #
1741
- # Amazon Translate does not detect profanity in all of its supported
1865
+ # Amazon Translate doesn't detect profanity in all of its supported
1742
1866
  # languages. For languages that support profanity detection, see
1743
1867
  # [Supported Languages and Language Codes in the Amazon Translate
1744
1868
  # Developer Guide][1].
1745
1869
  #
1746
1870
  #
1747
1871
  #
1748
- # [1]: https://docs.aws.amazon.com/translate/latest/dg/what-is.html#what-is-languages
1872
+ # [1]: https://docs.aws.amazon.com/translate/latest/dg/what-is.html
1749
1873
  # @return [String]
1750
1874
  #
1751
1875
  # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/TranslationSettings AWS API Documentation
1752
1876
  #
1753
1877
  class TranslationSettings < Struct.new(
1878
+ :formality,
1754
1879
  :profanity)
1755
1880
  SENSITIVE = []
1756
1881
  include Aws::Structure
1757
1882
  end
1758
1883
 
1884
+ # Requested display language code is not supported.
1885
+ #
1886
+ # @!attribute [rw] message
1887
+ # @return [String]
1888
+ #
1889
+ # @!attribute [rw] display_language_code
1890
+ # Language code passed in with the request.
1891
+ # @return [String]
1892
+ #
1893
+ # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/UnsupportedDisplayLanguageCodeException AWS API Documentation
1894
+ #
1895
+ class UnsupportedDisplayLanguageCodeException < Struct.new(
1896
+ :message,
1897
+ :display_language_code)
1898
+ SENSITIVE = []
1899
+ include Aws::Structure
1900
+ end
1901
+
1759
1902
  # Amazon Translate does not support translation from the language of the
1760
1903
  # source text into the requested target language. For more information,
1761
1904
  # see how-to-error-msg.
@@ -48,6 +48,6 @@ require_relative 'aws-sdk-translate/customizations'
48
48
  # @!group service
49
49
  module Aws::Translate
50
50
 
51
- GEM_VERSION = '1.42.0'
51
+ GEM_VERSION = '1.45.0'
52
52
 
53
53
  end
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.42.0
4
+ version: 1.45.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-03 00:00:00.000000000 Z
11
+ date: 2022-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '3'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 3.126.0
22
+ version: 3.127.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '3'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 3.126.0
32
+ version: 3.127.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: aws-sigv4
35
35
  requirement: !ruby/object:Gem::Requirement