@aws-sdk/client-translate 3.899.0 → 3.906.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist-cjs/index.js +1587 -1800
  2. package/package.json +38 -38
package/dist-cjs/index.js CHANGED
@@ -1,1866 +1,1653 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/index.ts
22
- var index_exports = {};
23
- __export(index_exports, {
24
- Brevity: () => Brevity,
25
- ConcurrentModificationException: () => ConcurrentModificationException,
26
- ConflictException: () => ConflictException,
27
- CreateParallelDataCommand: () => CreateParallelDataCommand,
28
- DeleteParallelDataCommand: () => DeleteParallelDataCommand,
29
- DeleteTerminologyCommand: () => DeleteTerminologyCommand,
30
- DescribeTextTranslationJobCommand: () => DescribeTextTranslationJobCommand,
31
- DetectedLanguageLowConfidenceException: () => DetectedLanguageLowConfidenceException,
32
- Directionality: () => Directionality,
33
- DisplayLanguageCode: () => DisplayLanguageCode,
34
- DocumentFilterSensitiveLog: () => DocumentFilterSensitiveLog,
35
- EncryptionKeyType: () => EncryptionKeyType,
36
- Formality: () => Formality,
37
- GetParallelDataCommand: () => GetParallelDataCommand,
38
- GetTerminologyCommand: () => GetTerminologyCommand,
39
- ImportTerminologyCommand: () => ImportTerminologyCommand,
40
- ImportTerminologyRequestFilterSensitiveLog: () => ImportTerminologyRequestFilterSensitiveLog,
41
- InternalServerException: () => InternalServerException,
42
- InvalidFilterException: () => InvalidFilterException,
43
- InvalidParameterValueException: () => InvalidParameterValueException,
44
- InvalidRequestException: () => InvalidRequestException,
45
- JobStatus: () => JobStatus,
46
- LimitExceededException: () => LimitExceededException,
47
- ListLanguagesCommand: () => ListLanguagesCommand,
48
- ListParallelDataCommand: () => ListParallelDataCommand,
49
- ListTagsForResourceCommand: () => ListTagsForResourceCommand,
50
- ListTerminologiesCommand: () => ListTerminologiesCommand,
51
- ListTextTranslationJobsCommand: () => ListTextTranslationJobsCommand,
52
- MergeStrategy: () => MergeStrategy,
53
- ParallelDataFormat: () => ParallelDataFormat,
54
- ParallelDataStatus: () => ParallelDataStatus,
55
- Profanity: () => Profanity,
56
- ResourceNotFoundException: () => ResourceNotFoundException,
57
- ServiceUnavailableException: () => ServiceUnavailableException,
58
- StartTextTranslationJobCommand: () => StartTextTranslationJobCommand,
59
- StopTextTranslationJobCommand: () => StopTextTranslationJobCommand,
60
- TagResourceCommand: () => TagResourceCommand,
61
- TerminologyDataFilterSensitiveLog: () => TerminologyDataFilterSensitiveLog,
62
- TerminologyDataFormat: () => TerminologyDataFormat,
63
- TextSizeLimitExceededException: () => TextSizeLimitExceededException,
64
- TooManyRequestsException: () => TooManyRequestsException,
65
- TooManyTagsException: () => TooManyTagsException,
66
- Translate: () => Translate,
67
- TranslateClient: () => TranslateClient,
68
- TranslateDocumentCommand: () => TranslateDocumentCommand,
69
- TranslateDocumentRequestFilterSensitiveLog: () => TranslateDocumentRequestFilterSensitiveLog,
70
- TranslateDocumentResponseFilterSensitiveLog: () => TranslateDocumentResponseFilterSensitiveLog,
71
- TranslateServiceException: () => TranslateServiceException,
72
- TranslateTextCommand: () => TranslateTextCommand,
73
- TranslatedDocumentFilterSensitiveLog: () => TranslatedDocumentFilterSensitiveLog,
74
- UnsupportedDisplayLanguageCodeException: () => UnsupportedDisplayLanguageCodeException,
75
- UnsupportedLanguagePairException: () => UnsupportedLanguagePairException,
76
- UntagResourceCommand: () => UntagResourceCommand,
77
- UpdateParallelDataCommand: () => UpdateParallelDataCommand,
78
- __Client: () => import_smithy_client.Client,
79
- paginateListLanguages: () => paginateListLanguages,
80
- paginateListParallelData: () => paginateListParallelData,
81
- paginateListTerminologies: () => paginateListTerminologies,
82
- paginateListTextTranslationJobs: () => paginateListTextTranslationJobs
83
- });
84
- module.exports = __toCommonJS(index_exports);
85
-
86
- // src/TranslateClient.ts
87
- var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
88
- var import_middleware_logger = require("@aws-sdk/middleware-logger");
89
- var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
90
- var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
91
- var import_config_resolver = require("@smithy/config-resolver");
92
- var import_core = require("@smithy/core");
93
- var import_middleware_content_length = require("@smithy/middleware-content-length");
94
- var import_middleware_endpoint = require("@smithy/middleware-endpoint");
95
- var import_middleware_retry = require("@smithy/middleware-retry");
96
-
97
- var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
98
-
99
- // src/endpoint/EndpointParameters.ts
100
- var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
101
- return Object.assign(options, {
102
- useDualstackEndpoint: options.useDualstackEndpoint ?? false,
103
- useFipsEndpoint: options.useFipsEndpoint ?? false,
104
- defaultSigningName: "translate"
105
- });
106
- }, "resolveClientEndpointParameters");
107
- var commonParams = {
108
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
109
- Endpoint: { type: "builtInParams", name: "endpoint" },
110
- Region: { type: "builtInParams", name: "region" },
111
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
1
+ 'use strict';
2
+
3
+ var middlewareHostHeader = require('@aws-sdk/middleware-host-header');
4
+ var middlewareLogger = require('@aws-sdk/middleware-logger');
5
+ var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');
6
+ var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
7
+ var configResolver = require('@smithy/config-resolver');
8
+ var core = require('@smithy/core');
9
+ var middlewareContentLength = require('@smithy/middleware-content-length');
10
+ var middlewareEndpoint = require('@smithy/middleware-endpoint');
11
+ var middlewareRetry = require('@smithy/middleware-retry');
12
+ var smithyClient = require('@smithy/smithy-client');
13
+ var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
14
+ var runtimeConfig = require('./runtimeConfig');
15
+ var regionConfigResolver = require('@aws-sdk/region-config-resolver');
16
+ var protocolHttp = require('@smithy/protocol-http');
17
+ var middlewareSerde = require('@smithy/middleware-serde');
18
+ var core$1 = require('@aws-sdk/core');
19
+ var uuid = require('@smithy/uuid');
20
+
21
+ const resolveClientEndpointParameters = (options) => {
22
+ return Object.assign(options, {
23
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
24
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
25
+ defaultSigningName: "translate",
26
+ });
27
+ };
28
+ const commonParams = {
29
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
30
+ Endpoint: { type: "builtInParams", name: "endpoint" },
31
+ Region: { type: "builtInParams", name: "region" },
32
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
112
33
  };
113
34
 
114
- // src/TranslateClient.ts
115
- var import_runtimeConfig = require("././runtimeConfig");
35
+ const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
36
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
37
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
38
+ let _credentials = runtimeConfig.credentials;
39
+ return {
40
+ setHttpAuthScheme(httpAuthScheme) {
41
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
42
+ if (index === -1) {
43
+ _httpAuthSchemes.push(httpAuthScheme);
44
+ }
45
+ else {
46
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
47
+ }
48
+ },
49
+ httpAuthSchemes() {
50
+ return _httpAuthSchemes;
51
+ },
52
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
53
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
54
+ },
55
+ httpAuthSchemeProvider() {
56
+ return _httpAuthSchemeProvider;
57
+ },
58
+ setCredentials(credentials) {
59
+ _credentials = credentials;
60
+ },
61
+ credentials() {
62
+ return _credentials;
63
+ },
64
+ };
65
+ };
66
+ const resolveHttpAuthRuntimeConfig = (config) => {
67
+ return {
68
+ httpAuthSchemes: config.httpAuthSchemes(),
69
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
70
+ credentials: config.credentials(),
71
+ };
72
+ };
116
73
 
117
- // src/runtimeExtensions.ts
118
- var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
119
- var import_protocol_http = require("@smithy/protocol-http");
120
- var import_smithy_client = require("@smithy/smithy-client");
74
+ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
75
+ const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
76
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
77
+ return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
78
+ };
121
79
 
122
- // src/auth/httpAuthExtensionConfiguration.ts
123
- var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
124
- const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
125
- let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
126
- let _credentials = runtimeConfig.credentials;
127
- return {
128
- setHttpAuthScheme(httpAuthScheme) {
129
- const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
130
- if (index === -1) {
131
- _httpAuthSchemes.push(httpAuthScheme);
132
- } else {
133
- _httpAuthSchemes.splice(index, 1, httpAuthScheme);
134
- }
135
- },
136
- httpAuthSchemes() {
137
- return _httpAuthSchemes;
138
- },
139
- setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
140
- _httpAuthSchemeProvider = httpAuthSchemeProvider;
141
- },
142
- httpAuthSchemeProvider() {
143
- return _httpAuthSchemeProvider;
144
- },
145
- setCredentials(credentials) {
146
- _credentials = credentials;
147
- },
148
- credentials() {
149
- return _credentials;
80
+ class TranslateClient extends smithyClient.Client {
81
+ config;
82
+ constructor(...[configuration]) {
83
+ const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
84
+ super(_config_0);
85
+ this.initConfig = _config_0;
86
+ const _config_1 = resolveClientEndpointParameters(_config_0);
87
+ const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
88
+ const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
89
+ const _config_4 = configResolver.resolveRegionConfig(_config_3);
90
+ const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
91
+ const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
92
+ const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
93
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
94
+ this.config = _config_8;
95
+ this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
96
+ this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
97
+ this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
98
+ this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
99
+ this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
100
+ this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
101
+ this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
102
+ httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultTranslateHttpAuthSchemeParametersProvider,
103
+ identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
104
+ "aws.auth#sigv4": config.credentials,
105
+ }),
106
+ }));
107
+ this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
108
+ }
109
+ destroy() {
110
+ super.destroy();
150
111
  }
151
- };
152
- }, "getHttpAuthExtensionConfiguration");
153
- var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
154
- return {
155
- httpAuthSchemes: config.httpAuthSchemes(),
156
- httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
157
- credentials: config.credentials()
158
- };
159
- }, "resolveHttpAuthRuntimeConfig");
112
+ }
160
113
 
161
- // src/runtimeExtensions.ts
162
- var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
163
- const extensionConfiguration = Object.assign(
164
- (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
165
- (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
166
- (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
167
- getHttpAuthExtensionConfiguration(runtimeConfig)
168
- );
169
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
170
- return Object.assign(
171
- runtimeConfig,
172
- (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
173
- (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
174
- (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
175
- resolveHttpAuthRuntimeConfig(extensionConfiguration)
176
- );
177
- }, "resolveRuntimeExtensions");
114
+ class TranslateServiceException extends smithyClient.ServiceException {
115
+ constructor(options) {
116
+ super(options);
117
+ Object.setPrototypeOf(this, TranslateServiceException.prototype);
118
+ }
119
+ }
178
120
 
179
- // src/TranslateClient.ts
180
- var TranslateClient = class extends import_smithy_client.Client {
181
- static {
182
- __name(this, "TranslateClient");
183
- }
184
- /**
185
- * The resolved configuration of TranslateClient class. This is resolved and normalized from the {@link TranslateClientConfig | constructor configuration interface}.
186
- */
187
- config;
188
- constructor(...[configuration]) {
189
- const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
190
- super(_config_0);
191
- this.initConfig = _config_0;
192
- const _config_1 = resolveClientEndpointParameters(_config_0);
193
- const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
194
- const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
195
- const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
196
- const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
197
- const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
198
- const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
199
- const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
200
- this.config = _config_8;
201
- this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
202
- this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
203
- this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
204
- this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
205
- this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
206
- this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
207
- this.middlewareStack.use(
208
- (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
209
- httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultTranslateHttpAuthSchemeParametersProvider,
210
- identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
211
- "aws.auth#sigv4": config.credentials
212
- }), "identityProviderConfigProvider")
213
- })
214
- );
215
- this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
216
- }
217
- /**
218
- * Destroy underlying resources, like sockets. It's usually not necessary to do this.
219
- * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
220
- * Otherwise, sockets might stay open for quite a long time before the server terminates them.
221
- */
222
- destroy() {
223
- super.destroy();
224
- }
121
+ class ConcurrentModificationException extends TranslateServiceException {
122
+ name = "ConcurrentModificationException";
123
+ $fault = "client";
124
+ Message;
125
+ constructor(opts) {
126
+ super({
127
+ name: "ConcurrentModificationException",
128
+ $fault: "client",
129
+ ...opts,
130
+ });
131
+ Object.setPrototypeOf(this, ConcurrentModificationException.prototype);
132
+ this.Message = opts.Message;
133
+ }
134
+ }
135
+ class ConflictException extends TranslateServiceException {
136
+ name = "ConflictException";
137
+ $fault = "client";
138
+ Message;
139
+ constructor(opts) {
140
+ super({
141
+ name: "ConflictException",
142
+ $fault: "client",
143
+ ...opts,
144
+ });
145
+ Object.setPrototypeOf(this, ConflictException.prototype);
146
+ this.Message = opts.Message;
147
+ }
148
+ }
149
+ const EncryptionKeyType = {
150
+ KMS: "KMS",
225
151
  };
226
-
227
- // src/Translate.ts
228
-
229
-
230
- // src/commands/CreateParallelDataCommand.ts
231
-
232
- var import_middleware_serde = require("@smithy/middleware-serde");
233
-
234
-
235
- // src/protocols/Aws_json1_1.ts
236
- var import_core2 = require("@aws-sdk/core");
237
-
238
-
239
- var import_uuid = require("@smithy/uuid");
240
-
241
- // src/models/models_0.ts
242
-
243
-
244
- // src/models/TranslateServiceException.ts
245
-
246
- var TranslateServiceException = class _TranslateServiceException extends import_smithy_client.ServiceException {
247
- static {
248
- __name(this, "TranslateServiceException");
249
- }
250
- /**
251
- * @internal
252
- */
253
- constructor(options) {
254
- super(options);
255
- Object.setPrototypeOf(this, _TranslateServiceException.prototype);
256
- }
152
+ const ParallelDataFormat = {
153
+ CSV: "CSV",
154
+ TMX: "TMX",
155
+ TSV: "TSV",
156
+ };
157
+ const ParallelDataStatus = {
158
+ ACTIVE: "ACTIVE",
159
+ CREATING: "CREATING",
160
+ DELETING: "DELETING",
161
+ FAILED: "FAILED",
162
+ UPDATING: "UPDATING",
257
163
  };
164
+ class InternalServerException extends TranslateServiceException {
165
+ name = "InternalServerException";
166
+ $fault = "server";
167
+ Message;
168
+ constructor(opts) {
169
+ super({
170
+ name: "InternalServerException",
171
+ $fault: "server",
172
+ ...opts,
173
+ });
174
+ Object.setPrototypeOf(this, InternalServerException.prototype);
175
+ this.Message = opts.Message;
176
+ }
177
+ }
178
+ class InvalidParameterValueException extends TranslateServiceException {
179
+ name = "InvalidParameterValueException";
180
+ $fault = "client";
181
+ Message;
182
+ constructor(opts) {
183
+ super({
184
+ name: "InvalidParameterValueException",
185
+ $fault: "client",
186
+ ...opts,
187
+ });
188
+ Object.setPrototypeOf(this, InvalidParameterValueException.prototype);
189
+ this.Message = opts.Message;
190
+ }
191
+ }
192
+ class InvalidRequestException extends TranslateServiceException {
193
+ name = "InvalidRequestException";
194
+ $fault = "client";
195
+ Message;
196
+ constructor(opts) {
197
+ super({
198
+ name: "InvalidRequestException",
199
+ $fault: "client",
200
+ ...opts,
201
+ });
202
+ Object.setPrototypeOf(this, InvalidRequestException.prototype);
203
+ this.Message = opts.Message;
204
+ }
205
+ }
206
+ class LimitExceededException extends TranslateServiceException {
207
+ name = "LimitExceededException";
208
+ $fault = "client";
209
+ Message;
210
+ constructor(opts) {
211
+ super({
212
+ name: "LimitExceededException",
213
+ $fault: "client",
214
+ ...opts,
215
+ });
216
+ Object.setPrototypeOf(this, LimitExceededException.prototype);
217
+ this.Message = opts.Message;
218
+ }
219
+ }
220
+ class TooManyRequestsException extends TranslateServiceException {
221
+ name = "TooManyRequestsException";
222
+ $fault = "client";
223
+ Message;
224
+ constructor(opts) {
225
+ super({
226
+ name: "TooManyRequestsException",
227
+ $fault: "client",
228
+ ...opts,
229
+ });
230
+ Object.setPrototypeOf(this, TooManyRequestsException.prototype);
231
+ this.Message = opts.Message;
232
+ }
233
+ }
234
+ class TooManyTagsException extends TranslateServiceException {
235
+ name = "TooManyTagsException";
236
+ $fault = "client";
237
+ ResourceArn;
238
+ constructor(opts) {
239
+ super({
240
+ name: "TooManyTagsException",
241
+ $fault: "client",
242
+ ...opts,
243
+ });
244
+ Object.setPrototypeOf(this, TooManyTagsException.prototype);
245
+ this.ResourceArn = opts.ResourceArn;
246
+ }
247
+ }
248
+ class ResourceNotFoundException extends TranslateServiceException {
249
+ name = "ResourceNotFoundException";
250
+ $fault = "client";
251
+ Message;
252
+ constructor(opts) {
253
+ super({
254
+ name: "ResourceNotFoundException",
255
+ $fault: "client",
256
+ ...opts,
257
+ });
258
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
259
+ this.Message = opts.Message;
260
+ }
261
+ }
262
+ const JobStatus = {
263
+ COMPLETED: "COMPLETED",
264
+ COMPLETED_WITH_ERROR: "COMPLETED_WITH_ERROR",
265
+ FAILED: "FAILED",
266
+ IN_PROGRESS: "IN_PROGRESS",
267
+ STOPPED: "STOPPED",
268
+ STOP_REQUESTED: "STOP_REQUESTED",
269
+ SUBMITTED: "SUBMITTED",
270
+ };
271
+ const Brevity = {
272
+ ON: "ON",
273
+ };
274
+ const Formality = {
275
+ FORMAL: "FORMAL",
276
+ INFORMAL: "INFORMAL",
277
+ };
278
+ const Profanity = {
279
+ MASK: "MASK",
280
+ };
281
+ const TerminologyDataFormat = {
282
+ CSV: "CSV",
283
+ TMX: "TMX",
284
+ TSV: "TSV",
285
+ };
286
+ const Directionality = {
287
+ MULTI: "MULTI",
288
+ UNI: "UNI",
289
+ };
290
+ const MergeStrategy = {
291
+ OVERWRITE: "OVERWRITE",
292
+ };
293
+ const DisplayLanguageCode = {
294
+ DE: "de",
295
+ EN: "en",
296
+ ES: "es",
297
+ FR: "fr",
298
+ IT: "it",
299
+ JA: "ja",
300
+ KO: "ko",
301
+ PT: "pt",
302
+ ZH: "zh",
303
+ ZH_TW: "zh-TW",
304
+ };
305
+ class UnsupportedDisplayLanguageCodeException extends TranslateServiceException {
306
+ name = "UnsupportedDisplayLanguageCodeException";
307
+ $fault = "client";
308
+ Message;
309
+ DisplayLanguageCode;
310
+ constructor(opts) {
311
+ super({
312
+ name: "UnsupportedDisplayLanguageCodeException",
313
+ $fault: "client",
314
+ ...opts,
315
+ });
316
+ Object.setPrototypeOf(this, UnsupportedDisplayLanguageCodeException.prototype);
317
+ this.Message = opts.Message;
318
+ this.DisplayLanguageCode = opts.DisplayLanguageCode;
319
+ }
320
+ }
321
+ class InvalidFilterException extends TranslateServiceException {
322
+ name = "InvalidFilterException";
323
+ $fault = "client";
324
+ Message;
325
+ constructor(opts) {
326
+ super({
327
+ name: "InvalidFilterException",
328
+ $fault: "client",
329
+ ...opts,
330
+ });
331
+ Object.setPrototypeOf(this, InvalidFilterException.prototype);
332
+ this.Message = opts.Message;
333
+ }
334
+ }
335
+ class UnsupportedLanguagePairException extends TranslateServiceException {
336
+ name = "UnsupportedLanguagePairException";
337
+ $fault = "client";
338
+ Message;
339
+ SourceLanguageCode;
340
+ TargetLanguageCode;
341
+ constructor(opts) {
342
+ super({
343
+ name: "UnsupportedLanguagePairException",
344
+ $fault: "client",
345
+ ...opts,
346
+ });
347
+ Object.setPrototypeOf(this, UnsupportedLanguagePairException.prototype);
348
+ this.Message = opts.Message;
349
+ this.SourceLanguageCode = opts.SourceLanguageCode;
350
+ this.TargetLanguageCode = opts.TargetLanguageCode;
351
+ }
352
+ }
353
+ class ServiceUnavailableException extends TranslateServiceException {
354
+ name = "ServiceUnavailableException";
355
+ $fault = "server";
356
+ Message;
357
+ constructor(opts) {
358
+ super({
359
+ name: "ServiceUnavailableException",
360
+ $fault: "server",
361
+ ...opts,
362
+ });
363
+ Object.setPrototypeOf(this, ServiceUnavailableException.prototype);
364
+ this.Message = opts.Message;
365
+ }
366
+ }
367
+ class DetectedLanguageLowConfidenceException extends TranslateServiceException {
368
+ name = "DetectedLanguageLowConfidenceException";
369
+ $fault = "client";
370
+ Message;
371
+ DetectedLanguageCode;
372
+ constructor(opts) {
373
+ super({
374
+ name: "DetectedLanguageLowConfidenceException",
375
+ $fault: "client",
376
+ ...opts,
377
+ });
378
+ Object.setPrototypeOf(this, DetectedLanguageLowConfidenceException.prototype);
379
+ this.Message = opts.Message;
380
+ this.DetectedLanguageCode = opts.DetectedLanguageCode;
381
+ }
382
+ }
383
+ class TextSizeLimitExceededException extends TranslateServiceException {
384
+ name = "TextSizeLimitExceededException";
385
+ $fault = "client";
386
+ Message;
387
+ constructor(opts) {
388
+ super({
389
+ name: "TextSizeLimitExceededException",
390
+ $fault: "client",
391
+ ...opts,
392
+ });
393
+ Object.setPrototypeOf(this, TextSizeLimitExceededException.prototype);
394
+ this.Message = opts.Message;
395
+ }
396
+ }
397
+ const TerminologyDataFilterSensitiveLog = (obj) => ({
398
+ ...obj,
399
+ ...(obj.File && { File: smithyClient.SENSITIVE_STRING }),
400
+ });
401
+ const ImportTerminologyRequestFilterSensitiveLog = (obj) => ({
402
+ ...obj,
403
+ ...(obj.TerminologyData && { TerminologyData: TerminologyDataFilterSensitiveLog(obj.TerminologyData) }),
404
+ });
405
+ const DocumentFilterSensitiveLog = (obj) => ({
406
+ ...obj,
407
+ ...(obj.Content && { Content: smithyClient.SENSITIVE_STRING }),
408
+ });
409
+ const TranslateDocumentRequestFilterSensitiveLog = (obj) => ({
410
+ ...obj,
411
+ ...(obj.Document && { Document: DocumentFilterSensitiveLog(obj.Document) }),
412
+ });
413
+ const TranslatedDocumentFilterSensitiveLog = (obj) => ({
414
+ ...obj,
415
+ ...(obj.Content && { Content: smithyClient.SENSITIVE_STRING }),
416
+ });
417
+ const TranslateDocumentResponseFilterSensitiveLog = (obj) => ({
418
+ ...obj,
419
+ ...(obj.TranslatedDocument && { TranslatedDocument: TranslatedDocumentFilterSensitiveLog(obj.TranslatedDocument) }),
420
+ });
258
421
 
259
- // src/models/models_0.ts
260
- var ConcurrentModificationException = class _ConcurrentModificationException extends TranslateServiceException {
261
- static {
262
- __name(this, "ConcurrentModificationException");
263
- }
264
- name = "ConcurrentModificationException";
265
- $fault = "client";
266
- Message;
267
- /**
268
- * @internal
269
- */
270
- constructor(opts) {
271
- super({
272
- name: "ConcurrentModificationException",
273
- $fault: "client",
274
- ...opts
422
+ const se_CreateParallelDataCommand = async (input, context) => {
423
+ const headers = sharedHeaders("CreateParallelData");
424
+ let body;
425
+ body = JSON.stringify(se_CreateParallelDataRequest(input));
426
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
427
+ };
428
+ const se_DeleteParallelDataCommand = async (input, context) => {
429
+ const headers = sharedHeaders("DeleteParallelData");
430
+ let body;
431
+ body = JSON.stringify(smithyClient._json(input));
432
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
433
+ };
434
+ const se_DeleteTerminologyCommand = async (input, context) => {
435
+ const headers = sharedHeaders("DeleteTerminology");
436
+ let body;
437
+ body = JSON.stringify(smithyClient._json(input));
438
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
439
+ };
440
+ const se_DescribeTextTranslationJobCommand = async (input, context) => {
441
+ const headers = sharedHeaders("DescribeTextTranslationJob");
442
+ let body;
443
+ body = JSON.stringify(smithyClient._json(input));
444
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
445
+ };
446
+ const se_GetParallelDataCommand = async (input, context) => {
447
+ const headers = sharedHeaders("GetParallelData");
448
+ let body;
449
+ body = JSON.stringify(smithyClient._json(input));
450
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
451
+ };
452
+ const se_GetTerminologyCommand = async (input, context) => {
453
+ const headers = sharedHeaders("GetTerminology");
454
+ let body;
455
+ body = JSON.stringify(smithyClient._json(input));
456
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
457
+ };
458
+ const se_ImportTerminologyCommand = async (input, context) => {
459
+ const headers = sharedHeaders("ImportTerminology");
460
+ let body;
461
+ body = JSON.stringify(se_ImportTerminologyRequest(input, context));
462
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
463
+ };
464
+ const se_ListLanguagesCommand = async (input, context) => {
465
+ const headers = sharedHeaders("ListLanguages");
466
+ let body;
467
+ body = JSON.stringify(smithyClient._json(input));
468
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
469
+ };
470
+ const se_ListParallelDataCommand = async (input, context) => {
471
+ const headers = sharedHeaders("ListParallelData");
472
+ let body;
473
+ body = JSON.stringify(smithyClient._json(input));
474
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
475
+ };
476
+ const se_ListTagsForResourceCommand = async (input, context) => {
477
+ const headers = sharedHeaders("ListTagsForResource");
478
+ let body;
479
+ body = JSON.stringify(smithyClient._json(input));
480
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
481
+ };
482
+ const se_ListTerminologiesCommand = async (input, context) => {
483
+ const headers = sharedHeaders("ListTerminologies");
484
+ let body;
485
+ body = JSON.stringify(smithyClient._json(input));
486
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
487
+ };
488
+ const se_ListTextTranslationJobsCommand = async (input, context) => {
489
+ const headers = sharedHeaders("ListTextTranslationJobs");
490
+ let body;
491
+ body = JSON.stringify(se_ListTextTranslationJobsRequest(input));
492
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
493
+ };
494
+ const se_StartTextTranslationJobCommand = async (input, context) => {
495
+ const headers = sharedHeaders("StartTextTranslationJob");
496
+ let body;
497
+ body = JSON.stringify(se_StartTextTranslationJobRequest(input));
498
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
499
+ };
500
+ const se_StopTextTranslationJobCommand = async (input, context) => {
501
+ const headers = sharedHeaders("StopTextTranslationJob");
502
+ let body;
503
+ body = JSON.stringify(smithyClient._json(input));
504
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
505
+ };
506
+ const se_TagResourceCommand = async (input, context) => {
507
+ const headers = sharedHeaders("TagResource");
508
+ let body;
509
+ body = JSON.stringify(smithyClient._json(input));
510
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
511
+ };
512
+ const se_TranslateDocumentCommand = async (input, context) => {
513
+ const headers = sharedHeaders("TranslateDocument");
514
+ let body;
515
+ body = JSON.stringify(se_TranslateDocumentRequest(input, context));
516
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
517
+ };
518
+ const se_TranslateTextCommand = async (input, context) => {
519
+ const headers = sharedHeaders("TranslateText");
520
+ let body;
521
+ body = JSON.stringify(smithyClient._json(input));
522
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
523
+ };
524
+ const se_UntagResourceCommand = async (input, context) => {
525
+ const headers = sharedHeaders("UntagResource");
526
+ let body;
527
+ body = JSON.stringify(smithyClient._json(input));
528
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
529
+ };
530
+ const se_UpdateParallelDataCommand = async (input, context) => {
531
+ const headers = sharedHeaders("UpdateParallelData");
532
+ let body;
533
+ body = JSON.stringify(se_UpdateParallelDataRequest(input));
534
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
535
+ };
536
+ const de_CreateParallelDataCommand = async (output, context) => {
537
+ if (output.statusCode >= 300) {
538
+ return de_CommandError(output, context);
539
+ }
540
+ const data = await core$1.parseJsonBody(output.body, context);
541
+ let contents = {};
542
+ contents = smithyClient._json(data);
543
+ const response = {
544
+ $metadata: deserializeMetadata(output),
545
+ ...contents,
546
+ };
547
+ return response;
548
+ };
549
+ const de_DeleteParallelDataCommand = async (output, context) => {
550
+ if (output.statusCode >= 300) {
551
+ return de_CommandError(output, context);
552
+ }
553
+ const data = await core$1.parseJsonBody(output.body, context);
554
+ let contents = {};
555
+ contents = smithyClient._json(data);
556
+ const response = {
557
+ $metadata: deserializeMetadata(output),
558
+ ...contents,
559
+ };
560
+ return response;
561
+ };
562
+ const de_DeleteTerminologyCommand = async (output, context) => {
563
+ if (output.statusCode >= 300) {
564
+ return de_CommandError(output, context);
565
+ }
566
+ await smithyClient.collectBody(output.body, context);
567
+ const response = {
568
+ $metadata: deserializeMetadata(output),
569
+ };
570
+ return response;
571
+ };
572
+ const de_DescribeTextTranslationJobCommand = async (output, context) => {
573
+ if (output.statusCode >= 300) {
574
+ return de_CommandError(output, context);
575
+ }
576
+ const data = await core$1.parseJsonBody(output.body, context);
577
+ let contents = {};
578
+ contents = de_DescribeTextTranslationJobResponse(data);
579
+ const response = {
580
+ $metadata: deserializeMetadata(output),
581
+ ...contents,
582
+ };
583
+ return response;
584
+ };
585
+ const de_GetParallelDataCommand = async (output, context) => {
586
+ if (output.statusCode >= 300) {
587
+ return de_CommandError(output, context);
588
+ }
589
+ const data = await core$1.parseJsonBody(output.body, context);
590
+ let contents = {};
591
+ contents = de_GetParallelDataResponse(data);
592
+ const response = {
593
+ $metadata: deserializeMetadata(output),
594
+ ...contents,
595
+ };
596
+ return response;
597
+ };
598
+ const de_GetTerminologyCommand = async (output, context) => {
599
+ if (output.statusCode >= 300) {
600
+ return de_CommandError(output, context);
601
+ }
602
+ const data = await core$1.parseJsonBody(output.body, context);
603
+ let contents = {};
604
+ contents = de_GetTerminologyResponse(data);
605
+ const response = {
606
+ $metadata: deserializeMetadata(output),
607
+ ...contents,
608
+ };
609
+ return response;
610
+ };
611
+ const de_ImportTerminologyCommand = async (output, context) => {
612
+ if (output.statusCode >= 300) {
613
+ return de_CommandError(output, context);
614
+ }
615
+ const data = await core$1.parseJsonBody(output.body, context);
616
+ let contents = {};
617
+ contents = de_ImportTerminologyResponse(data);
618
+ const response = {
619
+ $metadata: deserializeMetadata(output),
620
+ ...contents,
621
+ };
622
+ return response;
623
+ };
624
+ const de_ListLanguagesCommand = async (output, context) => {
625
+ if (output.statusCode >= 300) {
626
+ return de_CommandError(output, context);
627
+ }
628
+ const data = await core$1.parseJsonBody(output.body, context);
629
+ let contents = {};
630
+ contents = smithyClient._json(data);
631
+ const response = {
632
+ $metadata: deserializeMetadata(output),
633
+ ...contents,
634
+ };
635
+ return response;
636
+ };
637
+ const de_ListParallelDataCommand = async (output, context) => {
638
+ if (output.statusCode >= 300) {
639
+ return de_CommandError(output, context);
640
+ }
641
+ const data = await core$1.parseJsonBody(output.body, context);
642
+ let contents = {};
643
+ contents = de_ListParallelDataResponse(data);
644
+ const response = {
645
+ $metadata: deserializeMetadata(output),
646
+ ...contents,
647
+ };
648
+ return response;
649
+ };
650
+ const de_ListTagsForResourceCommand = async (output, context) => {
651
+ if (output.statusCode >= 300) {
652
+ return de_CommandError(output, context);
653
+ }
654
+ const data = await core$1.parseJsonBody(output.body, context);
655
+ let contents = {};
656
+ contents = smithyClient._json(data);
657
+ const response = {
658
+ $metadata: deserializeMetadata(output),
659
+ ...contents,
660
+ };
661
+ return response;
662
+ };
663
+ const de_ListTerminologiesCommand = async (output, context) => {
664
+ if (output.statusCode >= 300) {
665
+ return de_CommandError(output, context);
666
+ }
667
+ const data = await core$1.parseJsonBody(output.body, context);
668
+ let contents = {};
669
+ contents = de_ListTerminologiesResponse(data);
670
+ const response = {
671
+ $metadata: deserializeMetadata(output),
672
+ ...contents,
673
+ };
674
+ return response;
675
+ };
676
+ const de_ListTextTranslationJobsCommand = async (output, context) => {
677
+ if (output.statusCode >= 300) {
678
+ return de_CommandError(output, context);
679
+ }
680
+ const data = await core$1.parseJsonBody(output.body, context);
681
+ let contents = {};
682
+ contents = de_ListTextTranslationJobsResponse(data);
683
+ const response = {
684
+ $metadata: deserializeMetadata(output),
685
+ ...contents,
686
+ };
687
+ return response;
688
+ };
689
+ const de_StartTextTranslationJobCommand = async (output, context) => {
690
+ if (output.statusCode >= 300) {
691
+ return de_CommandError(output, context);
692
+ }
693
+ const data = await core$1.parseJsonBody(output.body, context);
694
+ let contents = {};
695
+ contents = smithyClient._json(data);
696
+ const response = {
697
+ $metadata: deserializeMetadata(output),
698
+ ...contents,
699
+ };
700
+ return response;
701
+ };
702
+ const de_StopTextTranslationJobCommand = async (output, context) => {
703
+ if (output.statusCode >= 300) {
704
+ return de_CommandError(output, context);
705
+ }
706
+ const data = await core$1.parseJsonBody(output.body, context);
707
+ let contents = {};
708
+ contents = smithyClient._json(data);
709
+ const response = {
710
+ $metadata: deserializeMetadata(output),
711
+ ...contents,
712
+ };
713
+ return response;
714
+ };
715
+ const de_TagResourceCommand = async (output, context) => {
716
+ if (output.statusCode >= 300) {
717
+ return de_CommandError(output, context);
718
+ }
719
+ const data = await core$1.parseJsonBody(output.body, context);
720
+ let contents = {};
721
+ contents = smithyClient._json(data);
722
+ const response = {
723
+ $metadata: deserializeMetadata(output),
724
+ ...contents,
725
+ };
726
+ return response;
727
+ };
728
+ const de_TranslateDocumentCommand = async (output, context) => {
729
+ if (output.statusCode >= 300) {
730
+ return de_CommandError(output, context);
731
+ }
732
+ const data = await core$1.parseJsonBody(output.body, context);
733
+ let contents = {};
734
+ contents = de_TranslateDocumentResponse(data, context);
735
+ const response = {
736
+ $metadata: deserializeMetadata(output),
737
+ ...contents,
738
+ };
739
+ return response;
740
+ };
741
+ const de_TranslateTextCommand = async (output, context) => {
742
+ if (output.statusCode >= 300) {
743
+ return de_CommandError(output, context);
744
+ }
745
+ const data = await core$1.parseJsonBody(output.body, context);
746
+ let contents = {};
747
+ contents = smithyClient._json(data);
748
+ const response = {
749
+ $metadata: deserializeMetadata(output),
750
+ ...contents,
751
+ };
752
+ return response;
753
+ };
754
+ const de_UntagResourceCommand = async (output, context) => {
755
+ if (output.statusCode >= 300) {
756
+ return de_CommandError(output, context);
757
+ }
758
+ const data = await core$1.parseJsonBody(output.body, context);
759
+ let contents = {};
760
+ contents = smithyClient._json(data);
761
+ const response = {
762
+ $metadata: deserializeMetadata(output),
763
+ ...contents,
764
+ };
765
+ return response;
766
+ };
767
+ const de_UpdateParallelDataCommand = async (output, context) => {
768
+ if (output.statusCode >= 300) {
769
+ return de_CommandError(output, context);
770
+ }
771
+ const data = await core$1.parseJsonBody(output.body, context);
772
+ let contents = {};
773
+ contents = de_UpdateParallelDataResponse(data);
774
+ const response = {
775
+ $metadata: deserializeMetadata(output),
776
+ ...contents,
777
+ };
778
+ return response;
779
+ };
780
+ const de_CommandError = async (output, context) => {
781
+ const parsedOutput = {
782
+ ...output,
783
+ body: await core$1.parseJsonErrorBody(output.body, context),
784
+ };
785
+ const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
786
+ switch (errorCode) {
787
+ case "ConcurrentModificationException":
788
+ case "com.amazonaws.translate#ConcurrentModificationException":
789
+ throw await de_ConcurrentModificationExceptionRes(parsedOutput);
790
+ case "ConflictException":
791
+ case "com.amazonaws.translate#ConflictException":
792
+ throw await de_ConflictExceptionRes(parsedOutput);
793
+ case "InternalServerException":
794
+ case "com.amazonaws.translate#InternalServerException":
795
+ throw await de_InternalServerExceptionRes(parsedOutput);
796
+ case "InvalidParameterValueException":
797
+ case "com.amazonaws.translate#InvalidParameterValueException":
798
+ throw await de_InvalidParameterValueExceptionRes(parsedOutput);
799
+ case "InvalidRequestException":
800
+ case "com.amazonaws.translate#InvalidRequestException":
801
+ throw await de_InvalidRequestExceptionRes(parsedOutput);
802
+ case "LimitExceededException":
803
+ case "com.amazonaws.translate#LimitExceededException":
804
+ throw await de_LimitExceededExceptionRes(parsedOutput);
805
+ case "TooManyRequestsException":
806
+ case "com.amazonaws.translate#TooManyRequestsException":
807
+ throw await de_TooManyRequestsExceptionRes(parsedOutput);
808
+ case "TooManyTagsException":
809
+ case "com.amazonaws.translate#TooManyTagsException":
810
+ throw await de_TooManyTagsExceptionRes(parsedOutput);
811
+ case "ResourceNotFoundException":
812
+ case "com.amazonaws.translate#ResourceNotFoundException":
813
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput);
814
+ case "UnsupportedDisplayLanguageCodeException":
815
+ case "com.amazonaws.translate#UnsupportedDisplayLanguageCodeException":
816
+ throw await de_UnsupportedDisplayLanguageCodeExceptionRes(parsedOutput);
817
+ case "InvalidFilterException":
818
+ case "com.amazonaws.translate#InvalidFilterException":
819
+ throw await de_InvalidFilterExceptionRes(parsedOutput);
820
+ case "UnsupportedLanguagePairException":
821
+ case "com.amazonaws.translate#UnsupportedLanguagePairException":
822
+ throw await de_UnsupportedLanguagePairExceptionRes(parsedOutput);
823
+ case "ServiceUnavailableException":
824
+ case "com.amazonaws.translate#ServiceUnavailableException":
825
+ throw await de_ServiceUnavailableExceptionRes(parsedOutput);
826
+ case "DetectedLanguageLowConfidenceException":
827
+ case "com.amazonaws.translate#DetectedLanguageLowConfidenceException":
828
+ throw await de_DetectedLanguageLowConfidenceExceptionRes(parsedOutput);
829
+ case "TextSizeLimitExceededException":
830
+ case "com.amazonaws.translate#TextSizeLimitExceededException":
831
+ throw await de_TextSizeLimitExceededExceptionRes(parsedOutput);
832
+ default:
833
+ const parsedBody = parsedOutput.body;
834
+ return throwDefaultError({
835
+ output,
836
+ parsedBody,
837
+ errorCode,
838
+ });
839
+ }
840
+ };
841
+ const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
842
+ const body = parsedOutput.body;
843
+ const deserialized = smithyClient._json(body);
844
+ const exception = new ConcurrentModificationException({
845
+ $metadata: deserializeMetadata(parsedOutput),
846
+ ...deserialized,
275
847
  });
276
- Object.setPrototypeOf(this, _ConcurrentModificationException.prototype);
277
- this.Message = opts.Message;
278
- }
279
- };
280
- var ConflictException = class _ConflictException extends TranslateServiceException {
281
- static {
282
- __name(this, "ConflictException");
283
- }
284
- name = "ConflictException";
285
- $fault = "client";
286
- Message;
287
- /**
288
- * @internal
289
- */
290
- constructor(opts) {
291
- super({
292
- name: "ConflictException",
293
- $fault: "client",
294
- ...opts
848
+ return smithyClient.decorateServiceException(exception, body);
849
+ };
850
+ const de_ConflictExceptionRes = async (parsedOutput, context) => {
851
+ const body = parsedOutput.body;
852
+ const deserialized = smithyClient._json(body);
853
+ const exception = new ConflictException({
854
+ $metadata: deserializeMetadata(parsedOutput),
855
+ ...deserialized,
295
856
  });
296
- Object.setPrototypeOf(this, _ConflictException.prototype);
297
- this.Message = opts.Message;
298
- }
299
- };
300
- var EncryptionKeyType = {
301
- KMS: "KMS"
302
- };
303
- var ParallelDataFormat = {
304
- CSV: "CSV",
305
- TMX: "TMX",
306
- TSV: "TSV"
307
- };
308
- var ParallelDataStatus = {
309
- ACTIVE: "ACTIVE",
310
- CREATING: "CREATING",
311
- DELETING: "DELETING",
312
- FAILED: "FAILED",
313
- UPDATING: "UPDATING"
314
- };
315
- var InternalServerException = class _InternalServerException extends TranslateServiceException {
316
- static {
317
- __name(this, "InternalServerException");
318
- }
319
- name = "InternalServerException";
320
- $fault = "server";
321
- Message;
322
- /**
323
- * @internal
324
- */
325
- constructor(opts) {
326
- super({
327
- name: "InternalServerException",
328
- $fault: "server",
329
- ...opts
857
+ return smithyClient.decorateServiceException(exception, body);
858
+ };
859
+ const de_DetectedLanguageLowConfidenceExceptionRes = async (parsedOutput, context) => {
860
+ const body = parsedOutput.body;
861
+ const deserialized = smithyClient._json(body);
862
+ const exception = new DetectedLanguageLowConfidenceException({
863
+ $metadata: deserializeMetadata(parsedOutput),
864
+ ...deserialized,
330
865
  });
331
- Object.setPrototypeOf(this, _InternalServerException.prototype);
332
- this.Message = opts.Message;
333
- }
334
- };
335
- var InvalidParameterValueException = class _InvalidParameterValueException extends TranslateServiceException {
336
- static {
337
- __name(this, "InvalidParameterValueException");
338
- }
339
- name = "InvalidParameterValueException";
340
- $fault = "client";
341
- Message;
342
- /**
343
- * @internal
344
- */
345
- constructor(opts) {
346
- super({
347
- name: "InvalidParameterValueException",
348
- $fault: "client",
349
- ...opts
866
+ return smithyClient.decorateServiceException(exception, body);
867
+ };
868
+ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
869
+ const body = parsedOutput.body;
870
+ const deserialized = smithyClient._json(body);
871
+ const exception = new InternalServerException({
872
+ $metadata: deserializeMetadata(parsedOutput),
873
+ ...deserialized,
350
874
  });
351
- Object.setPrototypeOf(this, _InvalidParameterValueException.prototype);
352
- this.Message = opts.Message;
353
- }
354
- };
355
- var InvalidRequestException = class _InvalidRequestException extends TranslateServiceException {
356
- static {
357
- __name(this, "InvalidRequestException");
358
- }
359
- name = "InvalidRequestException";
360
- $fault = "client";
361
- Message;
362
- /**
363
- * @internal
364
- */
365
- constructor(opts) {
366
- super({
367
- name: "InvalidRequestException",
368
- $fault: "client",
369
- ...opts
875
+ return smithyClient.decorateServiceException(exception, body);
876
+ };
877
+ const de_InvalidFilterExceptionRes = async (parsedOutput, context) => {
878
+ const body = parsedOutput.body;
879
+ const deserialized = smithyClient._json(body);
880
+ const exception = new InvalidFilterException({
881
+ $metadata: deserializeMetadata(parsedOutput),
882
+ ...deserialized,
370
883
  });
371
- Object.setPrototypeOf(this, _InvalidRequestException.prototype);
372
- this.Message = opts.Message;
373
- }
374
- };
375
- var LimitExceededException = class _LimitExceededException extends TranslateServiceException {
376
- static {
377
- __name(this, "LimitExceededException");
378
- }
379
- name = "LimitExceededException";
380
- $fault = "client";
381
- Message;
382
- /**
383
- * @internal
384
- */
385
- constructor(opts) {
386
- super({
387
- name: "LimitExceededException",
388
- $fault: "client",
389
- ...opts
884
+ return smithyClient.decorateServiceException(exception, body);
885
+ };
886
+ const de_InvalidParameterValueExceptionRes = async (parsedOutput, context) => {
887
+ const body = parsedOutput.body;
888
+ const deserialized = smithyClient._json(body);
889
+ const exception = new InvalidParameterValueException({
890
+ $metadata: deserializeMetadata(parsedOutput),
891
+ ...deserialized,
390
892
  });
391
- Object.setPrototypeOf(this, _LimitExceededException.prototype);
392
- this.Message = opts.Message;
393
- }
394
- };
395
- var TooManyRequestsException = class _TooManyRequestsException extends TranslateServiceException {
396
- static {
397
- __name(this, "TooManyRequestsException");
398
- }
399
- name = "TooManyRequestsException";
400
- $fault = "client";
401
- Message;
402
- /**
403
- * @internal
404
- */
405
- constructor(opts) {
406
- super({
407
- name: "TooManyRequestsException",
408
- $fault: "client",
409
- ...opts
893
+ return smithyClient.decorateServiceException(exception, body);
894
+ };
895
+ const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
896
+ const body = parsedOutput.body;
897
+ const deserialized = smithyClient._json(body);
898
+ const exception = new InvalidRequestException({
899
+ $metadata: deserializeMetadata(parsedOutput),
900
+ ...deserialized,
410
901
  });
411
- Object.setPrototypeOf(this, _TooManyRequestsException.prototype);
412
- this.Message = opts.Message;
413
- }
414
- };
415
- var TooManyTagsException = class _TooManyTagsException extends TranslateServiceException {
416
- static {
417
- __name(this, "TooManyTagsException");
418
- }
419
- name = "TooManyTagsException";
420
- $fault = "client";
421
- ResourceArn;
422
- /**
423
- * @internal
424
- */
425
- constructor(opts) {
426
- super({
427
- name: "TooManyTagsException",
428
- $fault: "client",
429
- ...opts
902
+ return smithyClient.decorateServiceException(exception, body);
903
+ };
904
+ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
905
+ const body = parsedOutput.body;
906
+ const deserialized = smithyClient._json(body);
907
+ const exception = new LimitExceededException({
908
+ $metadata: deserializeMetadata(parsedOutput),
909
+ ...deserialized,
430
910
  });
431
- Object.setPrototypeOf(this, _TooManyTagsException.prototype);
432
- this.ResourceArn = opts.ResourceArn;
433
- }
434
- };
435
- var ResourceNotFoundException = class _ResourceNotFoundException extends TranslateServiceException {
436
- static {
437
- __name(this, "ResourceNotFoundException");
438
- }
439
- name = "ResourceNotFoundException";
440
- $fault = "client";
441
- Message;
442
- /**
443
- * @internal
444
- */
445
- constructor(opts) {
446
- super({
447
- name: "ResourceNotFoundException",
448
- $fault: "client",
449
- ...opts
911
+ return smithyClient.decorateServiceException(exception, body);
912
+ };
913
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
914
+ const body = parsedOutput.body;
915
+ const deserialized = smithyClient._json(body);
916
+ const exception = new ResourceNotFoundException({
917
+ $metadata: deserializeMetadata(parsedOutput),
918
+ ...deserialized,
450
919
  });
451
- Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
452
- this.Message = opts.Message;
453
- }
454
- };
455
- var JobStatus = {
456
- COMPLETED: "COMPLETED",
457
- COMPLETED_WITH_ERROR: "COMPLETED_WITH_ERROR",
458
- FAILED: "FAILED",
459
- IN_PROGRESS: "IN_PROGRESS",
460
- STOPPED: "STOPPED",
461
- STOP_REQUESTED: "STOP_REQUESTED",
462
- SUBMITTED: "SUBMITTED"
463
- };
464
- var Brevity = {
465
- ON: "ON"
466
- };
467
- var Formality = {
468
- FORMAL: "FORMAL",
469
- INFORMAL: "INFORMAL"
470
- };
471
- var Profanity = {
472
- MASK: "MASK"
473
- };
474
- var TerminologyDataFormat = {
475
- CSV: "CSV",
476
- TMX: "TMX",
477
- TSV: "TSV"
478
- };
479
- var Directionality = {
480
- MULTI: "MULTI",
481
- UNI: "UNI"
482
- };
483
- var MergeStrategy = {
484
- OVERWRITE: "OVERWRITE"
485
- };
486
- var DisplayLanguageCode = {
487
- DE: "de",
488
- EN: "en",
489
- ES: "es",
490
- FR: "fr",
491
- IT: "it",
492
- JA: "ja",
493
- KO: "ko",
494
- PT: "pt",
495
- ZH: "zh",
496
- ZH_TW: "zh-TW"
497
- };
498
- var UnsupportedDisplayLanguageCodeException = class _UnsupportedDisplayLanguageCodeException extends TranslateServiceException {
499
- static {
500
- __name(this, "UnsupportedDisplayLanguageCodeException");
501
- }
502
- name = "UnsupportedDisplayLanguageCodeException";
503
- $fault = "client";
504
- Message;
505
- /**
506
- * <p>Language code passed in with the request.</p>
507
- * @public
508
- */
509
- DisplayLanguageCode;
510
- /**
511
- * @internal
512
- */
513
- constructor(opts) {
514
- super({
515
- name: "UnsupportedDisplayLanguageCodeException",
516
- $fault: "client",
517
- ...opts
920
+ return smithyClient.decorateServiceException(exception, body);
921
+ };
922
+ const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
923
+ const body = parsedOutput.body;
924
+ const deserialized = smithyClient._json(body);
925
+ const exception = new ServiceUnavailableException({
926
+ $metadata: deserializeMetadata(parsedOutput),
927
+ ...deserialized,
518
928
  });
519
- Object.setPrototypeOf(this, _UnsupportedDisplayLanguageCodeException.prototype);
520
- this.Message = opts.Message;
521
- this.DisplayLanguageCode = opts.DisplayLanguageCode;
522
- }
523
- };
524
- var InvalidFilterException = class _InvalidFilterException extends TranslateServiceException {
525
- static {
526
- __name(this, "InvalidFilterException");
527
- }
528
- name = "InvalidFilterException";
529
- $fault = "client";
530
- Message;
531
- /**
532
- * @internal
533
- */
534
- constructor(opts) {
535
- super({
536
- name: "InvalidFilterException",
537
- $fault: "client",
538
- ...opts
929
+ return smithyClient.decorateServiceException(exception, body);
930
+ };
931
+ const de_TextSizeLimitExceededExceptionRes = async (parsedOutput, context) => {
932
+ const body = parsedOutput.body;
933
+ const deserialized = smithyClient._json(body);
934
+ const exception = new TextSizeLimitExceededException({
935
+ $metadata: deserializeMetadata(parsedOutput),
936
+ ...deserialized,
539
937
  });
540
- Object.setPrototypeOf(this, _InvalidFilterException.prototype);
541
- this.Message = opts.Message;
542
- }
543
- };
544
- var UnsupportedLanguagePairException = class _UnsupportedLanguagePairException extends TranslateServiceException {
545
- static {
546
- __name(this, "UnsupportedLanguagePairException");
547
- }
548
- name = "UnsupportedLanguagePairException";
549
- $fault = "client";
550
- Message;
551
- /**
552
- * <p>The language code for the language of the input text. </p>
553
- * @public
554
- */
555
- SourceLanguageCode;
556
- /**
557
- * <p>The language code for the language of the translated text. </p>
558
- * @public
559
- */
560
- TargetLanguageCode;
561
- /**
562
- * @internal
563
- */
564
- constructor(opts) {
565
- super({
566
- name: "UnsupportedLanguagePairException",
567
- $fault: "client",
568
- ...opts
938
+ return smithyClient.decorateServiceException(exception, body);
939
+ };
940
+ const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
941
+ const body = parsedOutput.body;
942
+ const deserialized = smithyClient._json(body);
943
+ const exception = new TooManyRequestsException({
944
+ $metadata: deserializeMetadata(parsedOutput),
945
+ ...deserialized,
569
946
  });
570
- Object.setPrototypeOf(this, _UnsupportedLanguagePairException.prototype);
571
- this.Message = opts.Message;
572
- this.SourceLanguageCode = opts.SourceLanguageCode;
573
- this.TargetLanguageCode = opts.TargetLanguageCode;
574
- }
575
- };
576
- var ServiceUnavailableException = class _ServiceUnavailableException extends TranslateServiceException {
577
- static {
578
- __name(this, "ServiceUnavailableException");
579
- }
580
- name = "ServiceUnavailableException";
581
- $fault = "server";
582
- Message;
583
- /**
584
- * @internal
585
- */
586
- constructor(opts) {
587
- super({
588
- name: "ServiceUnavailableException",
589
- $fault: "server",
590
- ...opts
947
+ return smithyClient.decorateServiceException(exception, body);
948
+ };
949
+ const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
950
+ const body = parsedOutput.body;
951
+ const deserialized = smithyClient._json(body);
952
+ const exception = new TooManyTagsException({
953
+ $metadata: deserializeMetadata(parsedOutput),
954
+ ...deserialized,
591
955
  });
592
- Object.setPrototypeOf(this, _ServiceUnavailableException.prototype);
593
- this.Message = opts.Message;
594
- }
595
- };
596
- var DetectedLanguageLowConfidenceException = class _DetectedLanguageLowConfidenceException extends TranslateServiceException {
597
- static {
598
- __name(this, "DetectedLanguageLowConfidenceException");
599
- }
600
- name = "DetectedLanguageLowConfidenceException";
601
- $fault = "client";
602
- Message;
603
- /**
604
- * <p>The language code of the auto-detected language from Amazon Comprehend.</p>
605
- * @public
606
- */
607
- DetectedLanguageCode;
608
- /**
609
- * @internal
610
- */
611
- constructor(opts) {
612
- super({
613
- name: "DetectedLanguageLowConfidenceException",
614
- $fault: "client",
615
- ...opts
956
+ return smithyClient.decorateServiceException(exception, body);
957
+ };
958
+ const de_UnsupportedDisplayLanguageCodeExceptionRes = async (parsedOutput, context) => {
959
+ const body = parsedOutput.body;
960
+ const deserialized = smithyClient._json(body);
961
+ const exception = new UnsupportedDisplayLanguageCodeException({
962
+ $metadata: deserializeMetadata(parsedOutput),
963
+ ...deserialized,
616
964
  });
617
- Object.setPrototypeOf(this, _DetectedLanguageLowConfidenceException.prototype);
618
- this.Message = opts.Message;
619
- this.DetectedLanguageCode = opts.DetectedLanguageCode;
620
- }
621
- };
622
- var TextSizeLimitExceededException = class _TextSizeLimitExceededException extends TranslateServiceException {
623
- static {
624
- __name(this, "TextSizeLimitExceededException");
625
- }
626
- name = "TextSizeLimitExceededException";
627
- $fault = "client";
628
- Message;
629
- /**
630
- * @internal
631
- */
632
- constructor(opts) {
633
- super({
634
- name: "TextSizeLimitExceededException",
635
- $fault: "client",
636
- ...opts
965
+ return smithyClient.decorateServiceException(exception, body);
966
+ };
967
+ const de_UnsupportedLanguagePairExceptionRes = async (parsedOutput, context) => {
968
+ const body = parsedOutput.body;
969
+ const deserialized = smithyClient._json(body);
970
+ const exception = new UnsupportedLanguagePairException({
971
+ $metadata: deserializeMetadata(parsedOutput),
972
+ ...deserialized,
637
973
  });
638
- Object.setPrototypeOf(this, _TextSizeLimitExceededException.prototype);
639
- this.Message = opts.Message;
640
- }
641
- };
642
- var TerminologyDataFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
643
- ...obj,
644
- ...obj.File && { File: import_smithy_client.SENSITIVE_STRING }
645
- }), "TerminologyDataFilterSensitiveLog");
646
- var ImportTerminologyRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
647
- ...obj,
648
- ...obj.TerminologyData && { TerminologyData: TerminologyDataFilterSensitiveLog(obj.TerminologyData) }
649
- }), "ImportTerminologyRequestFilterSensitiveLog");
650
- var DocumentFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
651
- ...obj,
652
- ...obj.Content && { Content: import_smithy_client.SENSITIVE_STRING }
653
- }), "DocumentFilterSensitiveLog");
654
- var TranslateDocumentRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
655
- ...obj,
656
- ...obj.Document && { Document: DocumentFilterSensitiveLog(obj.Document) }
657
- }), "TranslateDocumentRequestFilterSensitiveLog");
658
- var TranslatedDocumentFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
659
- ...obj,
660
- ...obj.Content && { Content: import_smithy_client.SENSITIVE_STRING }
661
- }), "TranslatedDocumentFilterSensitiveLog");
662
- var TranslateDocumentResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
663
- ...obj,
664
- ...obj.TranslatedDocument && { TranslatedDocument: TranslatedDocumentFilterSensitiveLog(obj.TranslatedDocument) }
665
- }), "TranslateDocumentResponseFilterSensitiveLog");
666
-
667
- // src/protocols/Aws_json1_1.ts
668
- var se_CreateParallelDataCommand = /* @__PURE__ */ __name(async (input, context) => {
669
- const headers = sharedHeaders("CreateParallelData");
670
- let body;
671
- body = JSON.stringify(se_CreateParallelDataRequest(input, context));
672
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
673
- }, "se_CreateParallelDataCommand");
674
- var se_DeleteParallelDataCommand = /* @__PURE__ */ __name(async (input, context) => {
675
- const headers = sharedHeaders("DeleteParallelData");
676
- let body;
677
- body = JSON.stringify((0, import_smithy_client._json)(input));
678
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
679
- }, "se_DeleteParallelDataCommand");
680
- var se_DeleteTerminologyCommand = /* @__PURE__ */ __name(async (input, context) => {
681
- const headers = sharedHeaders("DeleteTerminology");
682
- let body;
683
- body = JSON.stringify((0, import_smithy_client._json)(input));
684
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
685
- }, "se_DeleteTerminologyCommand");
686
- var se_DescribeTextTranslationJobCommand = /* @__PURE__ */ __name(async (input, context) => {
687
- const headers = sharedHeaders("DescribeTextTranslationJob");
688
- let body;
689
- body = JSON.stringify((0, import_smithy_client._json)(input));
690
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
691
- }, "se_DescribeTextTranslationJobCommand");
692
- var se_GetParallelDataCommand = /* @__PURE__ */ __name(async (input, context) => {
693
- const headers = sharedHeaders("GetParallelData");
694
- let body;
695
- body = JSON.stringify((0, import_smithy_client._json)(input));
696
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
697
- }, "se_GetParallelDataCommand");
698
- var se_GetTerminologyCommand = /* @__PURE__ */ __name(async (input, context) => {
699
- const headers = sharedHeaders("GetTerminology");
700
- let body;
701
- body = JSON.stringify((0, import_smithy_client._json)(input));
702
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
703
- }, "se_GetTerminologyCommand");
704
- var se_ImportTerminologyCommand = /* @__PURE__ */ __name(async (input, context) => {
705
- const headers = sharedHeaders("ImportTerminology");
706
- let body;
707
- body = JSON.stringify(se_ImportTerminologyRequest(input, context));
708
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
709
- }, "se_ImportTerminologyCommand");
710
- var se_ListLanguagesCommand = /* @__PURE__ */ __name(async (input, context) => {
711
- const headers = sharedHeaders("ListLanguages");
712
- let body;
713
- body = JSON.stringify((0, import_smithy_client._json)(input));
714
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
715
- }, "se_ListLanguagesCommand");
716
- var se_ListParallelDataCommand = /* @__PURE__ */ __name(async (input, context) => {
717
- const headers = sharedHeaders("ListParallelData");
718
- let body;
719
- body = JSON.stringify((0, import_smithy_client._json)(input));
720
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
721
- }, "se_ListParallelDataCommand");
722
- var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
723
- const headers = sharedHeaders("ListTagsForResource");
724
- let body;
725
- body = JSON.stringify((0, import_smithy_client._json)(input));
726
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
727
- }, "se_ListTagsForResourceCommand");
728
- var se_ListTerminologiesCommand = /* @__PURE__ */ __name(async (input, context) => {
729
- const headers = sharedHeaders("ListTerminologies");
730
- let body;
731
- body = JSON.stringify((0, import_smithy_client._json)(input));
732
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
733
- }, "se_ListTerminologiesCommand");
734
- var se_ListTextTranslationJobsCommand = /* @__PURE__ */ __name(async (input, context) => {
735
- const headers = sharedHeaders("ListTextTranslationJobs");
736
- let body;
737
- body = JSON.stringify(se_ListTextTranslationJobsRequest(input, context));
738
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
739
- }, "se_ListTextTranslationJobsCommand");
740
- var se_StartTextTranslationJobCommand = /* @__PURE__ */ __name(async (input, context) => {
741
- const headers = sharedHeaders("StartTextTranslationJob");
742
- let body;
743
- body = JSON.stringify(se_StartTextTranslationJobRequest(input, context));
744
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
745
- }, "se_StartTextTranslationJobCommand");
746
- var se_StopTextTranslationJobCommand = /* @__PURE__ */ __name(async (input, context) => {
747
- const headers = sharedHeaders("StopTextTranslationJob");
748
- let body;
749
- body = JSON.stringify((0, import_smithy_client._json)(input));
750
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
751
- }, "se_StopTextTranslationJobCommand");
752
- var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
753
- const headers = sharedHeaders("TagResource");
754
- let body;
755
- body = JSON.stringify((0, import_smithy_client._json)(input));
756
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
757
- }, "se_TagResourceCommand");
758
- var se_TranslateDocumentCommand = /* @__PURE__ */ __name(async (input, context) => {
759
- const headers = sharedHeaders("TranslateDocument");
760
- let body;
761
- body = JSON.stringify(se_TranslateDocumentRequest(input, context));
762
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
763
- }, "se_TranslateDocumentCommand");
764
- var se_TranslateTextCommand = /* @__PURE__ */ __name(async (input, context) => {
765
- const headers = sharedHeaders("TranslateText");
766
- let body;
767
- body = JSON.stringify((0, import_smithy_client._json)(input));
768
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
769
- }, "se_TranslateTextCommand");
770
- var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
771
- const headers = sharedHeaders("UntagResource");
772
- let body;
773
- body = JSON.stringify((0, import_smithy_client._json)(input));
774
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
775
- }, "se_UntagResourceCommand");
776
- var se_UpdateParallelDataCommand = /* @__PURE__ */ __name(async (input, context) => {
777
- const headers = sharedHeaders("UpdateParallelData");
778
- let body;
779
- body = JSON.stringify(se_UpdateParallelDataRequest(input, context));
780
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
781
- }, "se_UpdateParallelDataCommand");
782
- var de_CreateParallelDataCommand = /* @__PURE__ */ __name(async (output, context) => {
783
- if (output.statusCode >= 300) {
784
- return de_CommandError(output, context);
785
- }
786
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
787
- let contents = {};
788
- contents = (0, import_smithy_client._json)(data);
789
- const response = {
790
- $metadata: deserializeMetadata(output),
791
- ...contents
792
- };
793
- return response;
794
- }, "de_CreateParallelDataCommand");
795
- var de_DeleteParallelDataCommand = /* @__PURE__ */ __name(async (output, context) => {
796
- if (output.statusCode >= 300) {
797
- return de_CommandError(output, context);
798
- }
799
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
800
- let contents = {};
801
- contents = (0, import_smithy_client._json)(data);
802
- const response = {
803
- $metadata: deserializeMetadata(output),
804
- ...contents
805
- };
806
- return response;
807
- }, "de_DeleteParallelDataCommand");
808
- var de_DeleteTerminologyCommand = /* @__PURE__ */ __name(async (output, context) => {
809
- if (output.statusCode >= 300) {
810
- return de_CommandError(output, context);
811
- }
812
- await (0, import_smithy_client.collectBody)(output.body, context);
813
- const response = {
814
- $metadata: deserializeMetadata(output)
815
- };
816
- return response;
817
- }, "de_DeleteTerminologyCommand");
818
- var de_DescribeTextTranslationJobCommand = /* @__PURE__ */ __name(async (output, context) => {
819
- if (output.statusCode >= 300) {
820
- return de_CommandError(output, context);
821
- }
822
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
823
- let contents = {};
824
- contents = de_DescribeTextTranslationJobResponse(data, context);
825
- const response = {
826
- $metadata: deserializeMetadata(output),
827
- ...contents
828
- };
829
- return response;
830
- }, "de_DescribeTextTranslationJobCommand");
831
- var de_GetParallelDataCommand = /* @__PURE__ */ __name(async (output, context) => {
832
- if (output.statusCode >= 300) {
833
- return de_CommandError(output, context);
834
- }
835
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
836
- let contents = {};
837
- contents = de_GetParallelDataResponse(data, context);
838
- const response = {
839
- $metadata: deserializeMetadata(output),
840
- ...contents
841
- };
842
- return response;
843
- }, "de_GetParallelDataCommand");
844
- var de_GetTerminologyCommand = /* @__PURE__ */ __name(async (output, context) => {
845
- if (output.statusCode >= 300) {
846
- return de_CommandError(output, context);
847
- }
848
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
849
- let contents = {};
850
- contents = de_GetTerminologyResponse(data, context);
851
- const response = {
852
- $metadata: deserializeMetadata(output),
853
- ...contents
854
- };
855
- return response;
856
- }, "de_GetTerminologyCommand");
857
- var de_ImportTerminologyCommand = /* @__PURE__ */ __name(async (output, context) => {
858
- if (output.statusCode >= 300) {
859
- return de_CommandError(output, context);
860
- }
861
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
862
- let contents = {};
863
- contents = de_ImportTerminologyResponse(data, context);
864
- const response = {
865
- $metadata: deserializeMetadata(output),
866
- ...contents
867
- };
868
- return response;
869
- }, "de_ImportTerminologyCommand");
870
- var de_ListLanguagesCommand = /* @__PURE__ */ __name(async (output, context) => {
871
- if (output.statusCode >= 300) {
872
- return de_CommandError(output, context);
873
- }
874
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
875
- let contents = {};
876
- contents = (0, import_smithy_client._json)(data);
877
- const response = {
878
- $metadata: deserializeMetadata(output),
879
- ...contents
880
- };
881
- return response;
882
- }, "de_ListLanguagesCommand");
883
- var de_ListParallelDataCommand = /* @__PURE__ */ __name(async (output, context) => {
884
- if (output.statusCode >= 300) {
885
- return de_CommandError(output, context);
886
- }
887
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
888
- let contents = {};
889
- contents = de_ListParallelDataResponse(data, context);
890
- const response = {
891
- $metadata: deserializeMetadata(output),
892
- ...contents
893
- };
894
- return response;
895
- }, "de_ListParallelDataCommand");
896
- var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
897
- if (output.statusCode >= 300) {
898
- return de_CommandError(output, context);
899
- }
900
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
901
- let contents = {};
902
- contents = (0, import_smithy_client._json)(data);
903
- const response = {
904
- $metadata: deserializeMetadata(output),
905
- ...contents
906
- };
907
- return response;
908
- }, "de_ListTagsForResourceCommand");
909
- var de_ListTerminologiesCommand = /* @__PURE__ */ __name(async (output, context) => {
910
- if (output.statusCode >= 300) {
911
- return de_CommandError(output, context);
912
- }
913
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
914
- let contents = {};
915
- contents = de_ListTerminologiesResponse(data, context);
916
- const response = {
917
- $metadata: deserializeMetadata(output),
918
- ...contents
919
- };
920
- return response;
921
- }, "de_ListTerminologiesCommand");
922
- var de_ListTextTranslationJobsCommand = /* @__PURE__ */ __name(async (output, context) => {
923
- if (output.statusCode >= 300) {
924
- return de_CommandError(output, context);
925
- }
926
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
927
- let contents = {};
928
- contents = de_ListTextTranslationJobsResponse(data, context);
929
- const response = {
930
- $metadata: deserializeMetadata(output),
931
- ...contents
932
- };
933
- return response;
934
- }, "de_ListTextTranslationJobsCommand");
935
- var de_StartTextTranslationJobCommand = /* @__PURE__ */ __name(async (output, context) => {
936
- if (output.statusCode >= 300) {
937
- return de_CommandError(output, context);
938
- }
939
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
940
- let contents = {};
941
- contents = (0, import_smithy_client._json)(data);
942
- const response = {
943
- $metadata: deserializeMetadata(output),
944
- ...contents
945
- };
946
- return response;
947
- }, "de_StartTextTranslationJobCommand");
948
- var de_StopTextTranslationJobCommand = /* @__PURE__ */ __name(async (output, context) => {
949
- if (output.statusCode >= 300) {
950
- return de_CommandError(output, context);
951
- }
952
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
953
- let contents = {};
954
- contents = (0, import_smithy_client._json)(data);
955
- const response = {
956
- $metadata: deserializeMetadata(output),
957
- ...contents
958
- };
959
- return response;
960
- }, "de_StopTextTranslationJobCommand");
961
- var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
962
- if (output.statusCode >= 300) {
963
- return de_CommandError(output, context);
964
- }
965
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
966
- let contents = {};
967
- contents = (0, import_smithy_client._json)(data);
968
- const response = {
969
- $metadata: deserializeMetadata(output),
970
- ...contents
971
- };
972
- return response;
973
- }, "de_TagResourceCommand");
974
- var de_TranslateDocumentCommand = /* @__PURE__ */ __name(async (output, context) => {
975
- if (output.statusCode >= 300) {
976
- return de_CommandError(output, context);
977
- }
978
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
979
- let contents = {};
980
- contents = de_TranslateDocumentResponse(data, context);
981
- const response = {
982
- $metadata: deserializeMetadata(output),
983
- ...contents
984
- };
985
- return response;
986
- }, "de_TranslateDocumentCommand");
987
- var de_TranslateTextCommand = /* @__PURE__ */ __name(async (output, context) => {
988
- if (output.statusCode >= 300) {
989
- return de_CommandError(output, context);
990
- }
991
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
992
- let contents = {};
993
- contents = (0, import_smithy_client._json)(data);
994
- const response = {
995
- $metadata: deserializeMetadata(output),
996
- ...contents
997
- };
998
- return response;
999
- }, "de_TranslateTextCommand");
1000
- var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
1001
- if (output.statusCode >= 300) {
1002
- return de_CommandError(output, context);
1003
- }
1004
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
1005
- let contents = {};
1006
- contents = (0, import_smithy_client._json)(data);
1007
- const response = {
1008
- $metadata: deserializeMetadata(output),
1009
- ...contents
1010
- };
1011
- return response;
1012
- }, "de_UntagResourceCommand");
1013
- var de_UpdateParallelDataCommand = /* @__PURE__ */ __name(async (output, context) => {
1014
- if (output.statusCode >= 300) {
1015
- return de_CommandError(output, context);
1016
- }
1017
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
1018
- let contents = {};
1019
- contents = de_UpdateParallelDataResponse(data, context);
1020
- const response = {
1021
- $metadata: deserializeMetadata(output),
1022
- ...contents
1023
- };
1024
- return response;
1025
- }, "de_UpdateParallelDataCommand");
1026
- var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
1027
- const parsedOutput = {
1028
- ...output,
1029
- body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
1030
- };
1031
- const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
1032
- switch (errorCode) {
1033
- case "ConcurrentModificationException":
1034
- case "com.amazonaws.translate#ConcurrentModificationException":
1035
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1036
- case "ConflictException":
1037
- case "com.amazonaws.translate#ConflictException":
1038
- throw await de_ConflictExceptionRes(parsedOutput, context);
1039
- case "InternalServerException":
1040
- case "com.amazonaws.translate#InternalServerException":
1041
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1042
- case "InvalidParameterValueException":
1043
- case "com.amazonaws.translate#InvalidParameterValueException":
1044
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1045
- case "InvalidRequestException":
1046
- case "com.amazonaws.translate#InvalidRequestException":
1047
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1048
- case "LimitExceededException":
1049
- case "com.amazonaws.translate#LimitExceededException":
1050
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1051
- case "TooManyRequestsException":
1052
- case "com.amazonaws.translate#TooManyRequestsException":
1053
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1054
- case "TooManyTagsException":
1055
- case "com.amazonaws.translate#TooManyTagsException":
1056
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1057
- case "ResourceNotFoundException":
1058
- case "com.amazonaws.translate#ResourceNotFoundException":
1059
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1060
- case "UnsupportedDisplayLanguageCodeException":
1061
- case "com.amazonaws.translate#UnsupportedDisplayLanguageCodeException":
1062
- throw await de_UnsupportedDisplayLanguageCodeExceptionRes(parsedOutput, context);
1063
- case "InvalidFilterException":
1064
- case "com.amazonaws.translate#InvalidFilterException":
1065
- throw await de_InvalidFilterExceptionRes(parsedOutput, context);
1066
- case "UnsupportedLanguagePairException":
1067
- case "com.amazonaws.translate#UnsupportedLanguagePairException":
1068
- throw await de_UnsupportedLanguagePairExceptionRes(parsedOutput, context);
1069
- case "ServiceUnavailableException":
1070
- case "com.amazonaws.translate#ServiceUnavailableException":
1071
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1072
- case "DetectedLanguageLowConfidenceException":
1073
- case "com.amazonaws.translate#DetectedLanguageLowConfidenceException":
1074
- throw await de_DetectedLanguageLowConfidenceExceptionRes(parsedOutput, context);
1075
- case "TextSizeLimitExceededException":
1076
- case "com.amazonaws.translate#TextSizeLimitExceededException":
1077
- throw await de_TextSizeLimitExceededExceptionRes(parsedOutput, context);
1078
- default:
1079
- const parsedBody = parsedOutput.body;
1080
- return throwDefaultError({
1081
- output,
1082
- parsedBody,
1083
- errorCode
1084
- });
1085
- }
1086
- }, "de_CommandError");
1087
- var de_ConcurrentModificationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1088
- const body = parsedOutput.body;
1089
- const deserialized = (0, import_smithy_client._json)(body);
1090
- const exception = new ConcurrentModificationException({
1091
- $metadata: deserializeMetadata(parsedOutput),
1092
- ...deserialized
1093
- });
1094
- return (0, import_smithy_client.decorateServiceException)(exception, body);
1095
- }, "de_ConcurrentModificationExceptionRes");
1096
- var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1097
- const body = parsedOutput.body;
1098
- const deserialized = (0, import_smithy_client._json)(body);
1099
- const exception = new ConflictException({
1100
- $metadata: deserializeMetadata(parsedOutput),
1101
- ...deserialized
1102
- });
1103
- return (0, import_smithy_client.decorateServiceException)(exception, body);
1104
- }, "de_ConflictExceptionRes");
1105
- var de_DetectedLanguageLowConfidenceExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1106
- const body = parsedOutput.body;
1107
- const deserialized = (0, import_smithy_client._json)(body);
1108
- const exception = new DetectedLanguageLowConfidenceException({
1109
- $metadata: deserializeMetadata(parsedOutput),
1110
- ...deserialized
1111
- });
1112
- return (0, import_smithy_client.decorateServiceException)(exception, body);
1113
- }, "de_DetectedLanguageLowConfidenceExceptionRes");
1114
- var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1115
- const body = parsedOutput.body;
1116
- const deserialized = (0, import_smithy_client._json)(body);
1117
- const exception = new InternalServerException({
1118
- $metadata: deserializeMetadata(parsedOutput),
1119
- ...deserialized
1120
- });
1121
- return (0, import_smithy_client.decorateServiceException)(exception, body);
1122
- }, "de_InternalServerExceptionRes");
1123
- var de_InvalidFilterExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1124
- const body = parsedOutput.body;
1125
- const deserialized = (0, import_smithy_client._json)(body);
1126
- const exception = new InvalidFilterException({
1127
- $metadata: deserializeMetadata(parsedOutput),
1128
- ...deserialized
1129
- });
1130
- return (0, import_smithy_client.decorateServiceException)(exception, body);
1131
- }, "de_InvalidFilterExceptionRes");
1132
- var de_InvalidParameterValueExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1133
- const body = parsedOutput.body;
1134
- const deserialized = (0, import_smithy_client._json)(body);
1135
- const exception = new InvalidParameterValueException({
1136
- $metadata: deserializeMetadata(parsedOutput),
1137
- ...deserialized
1138
- });
1139
- return (0, import_smithy_client.decorateServiceException)(exception, body);
1140
- }, "de_InvalidParameterValueExceptionRes");
1141
- var de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1142
- const body = parsedOutput.body;
1143
- const deserialized = (0, import_smithy_client._json)(body);
1144
- const exception = new InvalidRequestException({
1145
- $metadata: deserializeMetadata(parsedOutput),
1146
- ...deserialized
1147
- });
1148
- return (0, import_smithy_client.decorateServiceException)(exception, body);
1149
- }, "de_InvalidRequestExceptionRes");
1150
- var de_LimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1151
- const body = parsedOutput.body;
1152
- const deserialized = (0, import_smithy_client._json)(body);
1153
- const exception = new LimitExceededException({
1154
- $metadata: deserializeMetadata(parsedOutput),
1155
- ...deserialized
1156
- });
1157
- return (0, import_smithy_client.decorateServiceException)(exception, body);
1158
- }, "de_LimitExceededExceptionRes");
1159
- var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1160
- const body = parsedOutput.body;
1161
- const deserialized = (0, import_smithy_client._json)(body);
1162
- const exception = new ResourceNotFoundException({
1163
- $metadata: deserializeMetadata(parsedOutput),
1164
- ...deserialized
1165
- });
1166
- return (0, import_smithy_client.decorateServiceException)(exception, body);
1167
- }, "de_ResourceNotFoundExceptionRes");
1168
- var de_ServiceUnavailableExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1169
- const body = parsedOutput.body;
1170
- const deserialized = (0, import_smithy_client._json)(body);
1171
- const exception = new ServiceUnavailableException({
1172
- $metadata: deserializeMetadata(parsedOutput),
1173
- ...deserialized
1174
- });
1175
- return (0, import_smithy_client.decorateServiceException)(exception, body);
1176
- }, "de_ServiceUnavailableExceptionRes");
1177
- var de_TextSizeLimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1178
- const body = parsedOutput.body;
1179
- const deserialized = (0, import_smithy_client._json)(body);
1180
- const exception = new TextSizeLimitExceededException({
1181
- $metadata: deserializeMetadata(parsedOutput),
1182
- ...deserialized
1183
- });
1184
- return (0, import_smithy_client.decorateServiceException)(exception, body);
1185
- }, "de_TextSizeLimitExceededExceptionRes");
1186
- var de_TooManyRequestsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1187
- const body = parsedOutput.body;
1188
- const deserialized = (0, import_smithy_client._json)(body);
1189
- const exception = new TooManyRequestsException({
1190
- $metadata: deserializeMetadata(parsedOutput),
1191
- ...deserialized
1192
- });
1193
- return (0, import_smithy_client.decorateServiceException)(exception, body);
1194
- }, "de_TooManyRequestsExceptionRes");
1195
- var de_TooManyTagsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1196
- const body = parsedOutput.body;
1197
- const deserialized = (0, import_smithy_client._json)(body);
1198
- const exception = new TooManyTagsException({
1199
- $metadata: deserializeMetadata(parsedOutput),
1200
- ...deserialized
1201
- });
1202
- return (0, import_smithy_client.decorateServiceException)(exception, body);
1203
- }, "de_TooManyTagsExceptionRes");
1204
- var de_UnsupportedDisplayLanguageCodeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1205
- const body = parsedOutput.body;
1206
- const deserialized = (0, import_smithy_client._json)(body);
1207
- const exception = new UnsupportedDisplayLanguageCodeException({
1208
- $metadata: deserializeMetadata(parsedOutput),
1209
- ...deserialized
1210
- });
1211
- return (0, import_smithy_client.decorateServiceException)(exception, body);
1212
- }, "de_UnsupportedDisplayLanguageCodeExceptionRes");
1213
- var de_UnsupportedLanguagePairExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1214
- const body = parsedOutput.body;
1215
- const deserialized = (0, import_smithy_client._json)(body);
1216
- const exception = new UnsupportedLanguagePairException({
1217
- $metadata: deserializeMetadata(parsedOutput),
1218
- ...deserialized
1219
- });
1220
- return (0, import_smithy_client.decorateServiceException)(exception, body);
1221
- }, "de_UnsupportedLanguagePairExceptionRes");
1222
- var se_CreateParallelDataRequest = /* @__PURE__ */ __name((input, context) => {
1223
- return (0, import_smithy_client.take)(input, {
1224
- ClientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
1225
- Description: [],
1226
- EncryptionKey: import_smithy_client._json,
1227
- Name: [],
1228
- ParallelDataConfig: import_smithy_client._json,
1229
- Tags: import_smithy_client._json
1230
- });
1231
- }, "se_CreateParallelDataRequest");
1232
- var se_Document = /* @__PURE__ */ __name((input, context) => {
1233
- return (0, import_smithy_client.take)(input, {
1234
- Content: context.base64Encoder,
1235
- ContentType: []
1236
- });
1237
- }, "se_Document");
1238
- var se_ImportTerminologyRequest = /* @__PURE__ */ __name((input, context) => {
1239
- return (0, import_smithy_client.take)(input, {
1240
- Description: [],
1241
- EncryptionKey: import_smithy_client._json,
1242
- MergeStrategy: [],
1243
- Name: [],
1244
- Tags: import_smithy_client._json,
1245
- TerminologyData: /* @__PURE__ */ __name((_) => se_TerminologyData(_, context), "TerminologyData")
1246
- });
1247
- }, "se_ImportTerminologyRequest");
1248
- var se_ListTextTranslationJobsRequest = /* @__PURE__ */ __name((input, context) => {
1249
- return (0, import_smithy_client.take)(input, {
1250
- Filter: /* @__PURE__ */ __name((_) => se_TextTranslationJobFilter(_, context), "Filter"),
1251
- MaxResults: [],
1252
- NextToken: []
1253
- });
1254
- }, "se_ListTextTranslationJobsRequest");
1255
- var se_StartTextTranslationJobRequest = /* @__PURE__ */ __name((input, context) => {
1256
- return (0, import_smithy_client.take)(input, {
1257
- ClientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
1258
- DataAccessRoleArn: [],
1259
- InputDataConfig: import_smithy_client._json,
1260
- JobName: [],
1261
- OutputDataConfig: import_smithy_client._json,
1262
- ParallelDataNames: import_smithy_client._json,
1263
- Settings: import_smithy_client._json,
1264
- SourceLanguageCode: [],
1265
- TargetLanguageCodes: import_smithy_client._json,
1266
- TerminologyNames: import_smithy_client._json
1267
- });
1268
- }, "se_StartTextTranslationJobRequest");
1269
- var se_TerminologyData = /* @__PURE__ */ __name((input, context) => {
1270
- return (0, import_smithy_client.take)(input, {
1271
- Directionality: [],
1272
- File: context.base64Encoder,
1273
- Format: []
1274
- });
1275
- }, "se_TerminologyData");
1276
- var se_TextTranslationJobFilter = /* @__PURE__ */ __name((input, context) => {
1277
- return (0, import_smithy_client.take)(input, {
1278
- JobName: [],
1279
- JobStatus: [],
1280
- SubmittedAfterTime: /* @__PURE__ */ __name((_) => _.getTime() / 1e3, "SubmittedAfterTime"),
1281
- SubmittedBeforeTime: /* @__PURE__ */ __name((_) => _.getTime() / 1e3, "SubmittedBeforeTime")
1282
- });
1283
- }, "se_TextTranslationJobFilter");
1284
- var se_TranslateDocumentRequest = /* @__PURE__ */ __name((input, context) => {
1285
- return (0, import_smithy_client.take)(input, {
1286
- Document: /* @__PURE__ */ __name((_) => se_Document(_, context), "Document"),
1287
- Settings: import_smithy_client._json,
1288
- SourceLanguageCode: [],
1289
- TargetLanguageCode: [],
1290
- TerminologyNames: import_smithy_client._json
1291
- });
1292
- }, "se_TranslateDocumentRequest");
1293
- var se_UpdateParallelDataRequest = /* @__PURE__ */ __name((input, context) => {
1294
- return (0, import_smithy_client.take)(input, {
1295
- ClientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
1296
- Description: [],
1297
- Name: [],
1298
- ParallelDataConfig: import_smithy_client._json
1299
- });
1300
- }, "se_UpdateParallelDataRequest");
1301
- var de_DescribeTextTranslationJobResponse = /* @__PURE__ */ __name((output, context) => {
1302
- return (0, import_smithy_client.take)(output, {
1303
- TextTranslationJobProperties: /* @__PURE__ */ __name((_) => de_TextTranslationJobProperties(_, context), "TextTranslationJobProperties")
1304
- });
1305
- }, "de_DescribeTextTranslationJobResponse");
1306
- var de_GetParallelDataResponse = /* @__PURE__ */ __name((output, context) => {
1307
- return (0, import_smithy_client.take)(output, {
1308
- AuxiliaryDataLocation: import_smithy_client._json,
1309
- DataLocation: import_smithy_client._json,
1310
- LatestUpdateAttemptAuxiliaryDataLocation: import_smithy_client._json,
1311
- ParallelDataProperties: /* @__PURE__ */ __name((_) => de_ParallelDataProperties(_, context), "ParallelDataProperties")
1312
- });
1313
- }, "de_GetParallelDataResponse");
1314
- var de_GetTerminologyResponse = /* @__PURE__ */ __name((output, context) => {
1315
- return (0, import_smithy_client.take)(output, {
1316
- AuxiliaryDataLocation: import_smithy_client._json,
1317
- TerminologyDataLocation: import_smithy_client._json,
1318
- TerminologyProperties: /* @__PURE__ */ __name((_) => de_TerminologyProperties(_, context), "TerminologyProperties")
1319
- });
1320
- }, "de_GetTerminologyResponse");
1321
- var de_ImportTerminologyResponse = /* @__PURE__ */ __name((output, context) => {
1322
- return (0, import_smithy_client.take)(output, {
1323
- AuxiliaryDataLocation: import_smithy_client._json,
1324
- TerminologyProperties: /* @__PURE__ */ __name((_) => de_TerminologyProperties(_, context), "TerminologyProperties")
1325
- });
1326
- }, "de_ImportTerminologyResponse");
1327
- var de_ListParallelDataResponse = /* @__PURE__ */ __name((output, context) => {
1328
- return (0, import_smithy_client.take)(output, {
1329
- NextToken: import_smithy_client.expectString,
1330
- ParallelDataPropertiesList: /* @__PURE__ */ __name((_) => de_ParallelDataPropertiesList(_, context), "ParallelDataPropertiesList")
1331
- });
1332
- }, "de_ListParallelDataResponse");
1333
- var de_ListTerminologiesResponse = /* @__PURE__ */ __name((output, context) => {
1334
- return (0, import_smithy_client.take)(output, {
1335
- NextToken: import_smithy_client.expectString,
1336
- TerminologyPropertiesList: /* @__PURE__ */ __name((_) => de_TerminologyPropertiesList(_, context), "TerminologyPropertiesList")
1337
- });
1338
- }, "de_ListTerminologiesResponse");
1339
- var de_ListTextTranslationJobsResponse = /* @__PURE__ */ __name((output, context) => {
1340
- return (0, import_smithy_client.take)(output, {
1341
- NextToken: import_smithy_client.expectString,
1342
- TextTranslationJobPropertiesList: /* @__PURE__ */ __name((_) => de_TextTranslationJobPropertiesList(_, context), "TextTranslationJobPropertiesList")
1343
- });
1344
- }, "de_ListTextTranslationJobsResponse");
1345
- var de_ParallelDataProperties = /* @__PURE__ */ __name((output, context) => {
1346
- return (0, import_smithy_client.take)(output, {
1347
- Arn: import_smithy_client.expectString,
1348
- CreatedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "CreatedAt"),
1349
- Description: import_smithy_client.expectString,
1350
- EncryptionKey: import_smithy_client._json,
1351
- FailedRecordCount: import_smithy_client.expectLong,
1352
- ImportedDataSize: import_smithy_client.expectLong,
1353
- ImportedRecordCount: import_smithy_client.expectLong,
1354
- LastUpdatedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "LastUpdatedAt"),
1355
- LatestUpdateAttemptAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "LatestUpdateAttemptAt"),
1356
- LatestUpdateAttemptStatus: import_smithy_client.expectString,
1357
- Message: import_smithy_client.expectString,
1358
- Name: import_smithy_client.expectString,
1359
- ParallelDataConfig: import_smithy_client._json,
1360
- SkippedRecordCount: import_smithy_client.expectLong,
1361
- SourceLanguageCode: import_smithy_client.expectString,
1362
- Status: import_smithy_client.expectString,
1363
- TargetLanguageCodes: import_smithy_client._json
1364
- });
1365
- }, "de_ParallelDataProperties");
1366
- var de_ParallelDataPropertiesList = /* @__PURE__ */ __name((output, context) => {
1367
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
1368
- return de_ParallelDataProperties(entry, context);
1369
- });
1370
- return retVal;
1371
- }, "de_ParallelDataPropertiesList");
1372
- var de_TerminologyProperties = /* @__PURE__ */ __name((output, context) => {
1373
- return (0, import_smithy_client.take)(output, {
1374
- Arn: import_smithy_client.expectString,
1375
- CreatedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "CreatedAt"),
1376
- Description: import_smithy_client.expectString,
1377
- Directionality: import_smithy_client.expectString,
1378
- EncryptionKey: import_smithy_client._json,
1379
- Format: import_smithy_client.expectString,
1380
- LastUpdatedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "LastUpdatedAt"),
1381
- Message: import_smithy_client.expectString,
1382
- Name: import_smithy_client.expectString,
1383
- SizeBytes: import_smithy_client.expectInt32,
1384
- SkippedTermCount: import_smithy_client.expectInt32,
1385
- SourceLanguageCode: import_smithy_client.expectString,
1386
- TargetLanguageCodes: import_smithy_client._json,
1387
- TermCount: import_smithy_client.expectInt32
1388
- });
1389
- }, "de_TerminologyProperties");
1390
- var de_TerminologyPropertiesList = /* @__PURE__ */ __name((output, context) => {
1391
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
1392
- return de_TerminologyProperties(entry, context);
1393
- });
1394
- return retVal;
1395
- }, "de_TerminologyPropertiesList");
1396
- var de_TextTranslationJobProperties = /* @__PURE__ */ __name((output, context) => {
1397
- return (0, import_smithy_client.take)(output, {
1398
- DataAccessRoleArn: import_smithy_client.expectString,
1399
- EndTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "EndTime"),
1400
- InputDataConfig: import_smithy_client._json,
1401
- JobDetails: import_smithy_client._json,
1402
- JobId: import_smithy_client.expectString,
1403
- JobName: import_smithy_client.expectString,
1404
- JobStatus: import_smithy_client.expectString,
1405
- Message: import_smithy_client.expectString,
1406
- OutputDataConfig: import_smithy_client._json,
1407
- ParallelDataNames: import_smithy_client._json,
1408
- Settings: import_smithy_client._json,
1409
- SourceLanguageCode: import_smithy_client.expectString,
1410
- SubmittedTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "SubmittedTime"),
1411
- TargetLanguageCodes: import_smithy_client._json,
1412
- TerminologyNames: import_smithy_client._json
1413
- });
1414
- }, "de_TextTranslationJobProperties");
1415
- var de_TextTranslationJobPropertiesList = /* @__PURE__ */ __name((output, context) => {
1416
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
1417
- return de_TextTranslationJobProperties(entry, context);
1418
- });
1419
- return retVal;
1420
- }, "de_TextTranslationJobPropertiesList");
1421
- var de_TranslatedDocument = /* @__PURE__ */ __name((output, context) => {
1422
- return (0, import_smithy_client.take)(output, {
1423
- Content: context.base64Decoder
1424
- });
1425
- }, "de_TranslatedDocument");
1426
- var de_TranslateDocumentResponse = /* @__PURE__ */ __name((output, context) => {
1427
- return (0, import_smithy_client.take)(output, {
1428
- AppliedSettings: import_smithy_client._json,
1429
- AppliedTerminologies: import_smithy_client._json,
1430
- SourceLanguageCode: import_smithy_client.expectString,
1431
- TargetLanguageCode: import_smithy_client.expectString,
1432
- TranslatedDocument: /* @__PURE__ */ __name((_) => de_TranslatedDocument(_, context), "TranslatedDocument")
1433
- });
1434
- }, "de_TranslateDocumentResponse");
1435
- var de_UpdateParallelDataResponse = /* @__PURE__ */ __name((output, context) => {
1436
- return (0, import_smithy_client.take)(output, {
1437
- LatestUpdateAttemptAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "LatestUpdateAttemptAt"),
1438
- LatestUpdateAttemptStatus: import_smithy_client.expectString,
1439
- Name: import_smithy_client.expectString,
1440
- Status: import_smithy_client.expectString
1441
- });
1442
- }, "de_UpdateParallelDataResponse");
1443
- var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
1444
- httpStatusCode: output.statusCode,
1445
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1446
- extendedRequestId: output.headers["x-amz-id-2"],
1447
- cfId: output.headers["x-amz-cf-id"]
1448
- }), "deserializeMetadata");
1449
- var throwDefaultError = (0, import_smithy_client.withBaseException)(TranslateServiceException);
1450
- var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
1451
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1452
- const contents = {
1453
- protocol,
1454
- hostname,
1455
- port,
1456
- method: "POST",
1457
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1458
- headers
1459
- };
1460
- if (resolvedHostname !== void 0) {
1461
- contents.hostname = resolvedHostname;
1462
- }
1463
- if (body !== void 0) {
1464
- contents.body = body;
1465
- }
1466
- return new import_protocol_http.HttpRequest(contents);
1467
- }, "buildHttpRpcRequest");
1468
- function sharedHeaders(operation) {
1469
- return {
1470
- "content-type": "application/x-amz-json-1.1",
1471
- "x-amz-target": `AWSShineFrontendService_20170701.${operation}`
1472
- };
1473
- }
1474
- __name(sharedHeaders, "sharedHeaders");
1475
-
1476
- // src/commands/CreateParallelDataCommand.ts
1477
- var CreateParallelDataCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1478
- return [
1479
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1480
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1481
- ];
1482
- }).s("AWSShineFrontendService_20170701", "CreateParallelData", {}).n("TranslateClient", "CreateParallelDataCommand").f(void 0, void 0).ser(se_CreateParallelDataCommand).de(de_CreateParallelDataCommand).build() {
1483
- static {
1484
- __name(this, "CreateParallelDataCommand");
1485
- }
974
+ return smithyClient.decorateServiceException(exception, body);
1486
975
  };
1487
-
1488
- // src/commands/DeleteParallelDataCommand.ts
1489
-
1490
-
1491
-
1492
- var DeleteParallelDataCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1493
- return [
1494
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1495
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1496
- ];
1497
- }).s("AWSShineFrontendService_20170701", "DeleteParallelData", {}).n("TranslateClient", "DeleteParallelDataCommand").f(void 0, void 0).ser(se_DeleteParallelDataCommand).de(de_DeleteParallelDataCommand).build() {
1498
- static {
1499
- __name(this, "DeleteParallelDataCommand");
1500
- }
976
+ const se_CreateParallelDataRequest = (input, context) => {
977
+ return smithyClient.take(input, {
978
+ ClientToken: [true, (_) => _ ?? uuid.v4()],
979
+ Description: [],
980
+ EncryptionKey: smithyClient._json,
981
+ Name: [],
982
+ ParallelDataConfig: smithyClient._json,
983
+ Tags: smithyClient._json,
984
+ });
1501
985
  };
1502
-
1503
- // src/commands/DeleteTerminologyCommand.ts
1504
-
1505
-
1506
-
1507
- var DeleteTerminologyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1508
- return [
1509
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1510
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1511
- ];
1512
- }).s("AWSShineFrontendService_20170701", "DeleteTerminology", {}).n("TranslateClient", "DeleteTerminologyCommand").f(void 0, void 0).ser(se_DeleteTerminologyCommand).de(de_DeleteTerminologyCommand).build() {
1513
- static {
1514
- __name(this, "DeleteTerminologyCommand");
1515
- }
986
+ const se_Document = (input, context) => {
987
+ return smithyClient.take(input, {
988
+ Content: context.base64Encoder,
989
+ ContentType: [],
990
+ });
1516
991
  };
1517
-
1518
- // src/commands/DescribeTextTranslationJobCommand.ts
1519
-
1520
-
1521
-
1522
- var DescribeTextTranslationJobCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1523
- return [
1524
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1525
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1526
- ];
1527
- }).s("AWSShineFrontendService_20170701", "DescribeTextTranslationJob", {}).n("TranslateClient", "DescribeTextTranslationJobCommand").f(void 0, void 0).ser(se_DescribeTextTranslationJobCommand).de(de_DescribeTextTranslationJobCommand).build() {
1528
- static {
1529
- __name(this, "DescribeTextTranslationJobCommand");
1530
- }
992
+ const se_ImportTerminologyRequest = (input, context) => {
993
+ return smithyClient.take(input, {
994
+ Description: [],
995
+ EncryptionKey: smithyClient._json,
996
+ MergeStrategy: [],
997
+ Name: [],
998
+ Tags: smithyClient._json,
999
+ TerminologyData: (_) => se_TerminologyData(_, context),
1000
+ });
1531
1001
  };
1532
-
1533
- // src/commands/GetParallelDataCommand.ts
1534
-
1535
-
1536
-
1537
- var GetParallelDataCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1538
- return [
1539
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1540
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1541
- ];
1542
- }).s("AWSShineFrontendService_20170701", "GetParallelData", {}).n("TranslateClient", "GetParallelDataCommand").f(void 0, void 0).ser(se_GetParallelDataCommand).de(de_GetParallelDataCommand).build() {
1543
- static {
1544
- __name(this, "GetParallelDataCommand");
1545
- }
1002
+ const se_ListTextTranslationJobsRequest = (input, context) => {
1003
+ return smithyClient.take(input, {
1004
+ Filter: (_) => se_TextTranslationJobFilter(_),
1005
+ MaxResults: [],
1006
+ NextToken: [],
1007
+ });
1546
1008
  };
1547
-
1548
- // src/commands/GetTerminologyCommand.ts
1549
-
1550
-
1551
-
1552
- var GetTerminologyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1553
- return [
1554
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1555
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1556
- ];
1557
- }).s("AWSShineFrontendService_20170701", "GetTerminology", {}).n("TranslateClient", "GetTerminologyCommand").f(void 0, void 0).ser(se_GetTerminologyCommand).de(de_GetTerminologyCommand).build() {
1558
- static {
1559
- __name(this, "GetTerminologyCommand");
1560
- }
1009
+ const se_StartTextTranslationJobRequest = (input, context) => {
1010
+ return smithyClient.take(input, {
1011
+ ClientToken: [true, (_) => _ ?? uuid.v4()],
1012
+ DataAccessRoleArn: [],
1013
+ InputDataConfig: smithyClient._json,
1014
+ JobName: [],
1015
+ OutputDataConfig: smithyClient._json,
1016
+ ParallelDataNames: smithyClient._json,
1017
+ Settings: smithyClient._json,
1018
+ SourceLanguageCode: [],
1019
+ TargetLanguageCodes: smithyClient._json,
1020
+ TerminologyNames: smithyClient._json,
1021
+ });
1561
1022
  };
1562
-
1563
- // src/commands/ImportTerminologyCommand.ts
1564
-
1565
-
1566
-
1567
- var ImportTerminologyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1568
- return [
1569
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1570
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1571
- ];
1572
- }).s("AWSShineFrontendService_20170701", "ImportTerminology", {}).n("TranslateClient", "ImportTerminologyCommand").f(ImportTerminologyRequestFilterSensitiveLog, void 0).ser(se_ImportTerminologyCommand).de(de_ImportTerminologyCommand).build() {
1573
- static {
1574
- __name(this, "ImportTerminologyCommand");
1575
- }
1023
+ const se_TerminologyData = (input, context) => {
1024
+ return smithyClient.take(input, {
1025
+ Directionality: [],
1026
+ File: context.base64Encoder,
1027
+ Format: [],
1028
+ });
1576
1029
  };
1577
-
1578
- // src/commands/ListLanguagesCommand.ts
1579
-
1580
-
1581
-
1582
- var ListLanguagesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1583
- return [
1584
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1585
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1586
- ];
1587
- }).s("AWSShineFrontendService_20170701", "ListLanguages", {}).n("TranslateClient", "ListLanguagesCommand").f(void 0, void 0).ser(se_ListLanguagesCommand).de(de_ListLanguagesCommand).build() {
1588
- static {
1589
- __name(this, "ListLanguagesCommand");
1590
- }
1030
+ const se_TextTranslationJobFilter = (input, context) => {
1031
+ return smithyClient.take(input, {
1032
+ JobName: [],
1033
+ JobStatus: [],
1034
+ SubmittedAfterTime: (_) => _.getTime() / 1_000,
1035
+ SubmittedBeforeTime: (_) => _.getTime() / 1_000,
1036
+ });
1591
1037
  };
1592
-
1593
- // src/commands/ListParallelDataCommand.ts
1594
-
1595
-
1596
-
1597
- var ListParallelDataCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1598
- return [
1599
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1600
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1601
- ];
1602
- }).s("AWSShineFrontendService_20170701", "ListParallelData", {}).n("TranslateClient", "ListParallelDataCommand").f(void 0, void 0).ser(se_ListParallelDataCommand).de(de_ListParallelDataCommand).build() {
1603
- static {
1604
- __name(this, "ListParallelDataCommand");
1605
- }
1038
+ const se_TranslateDocumentRequest = (input, context) => {
1039
+ return smithyClient.take(input, {
1040
+ Document: (_) => se_Document(_, context),
1041
+ Settings: smithyClient._json,
1042
+ SourceLanguageCode: [],
1043
+ TargetLanguageCode: [],
1044
+ TerminologyNames: smithyClient._json,
1045
+ });
1606
1046
  };
1607
-
1608
- // src/commands/ListTagsForResourceCommand.ts
1609
-
1610
-
1611
-
1612
- var ListTagsForResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1613
- return [
1614
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1615
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1616
- ];
1617
- }).s("AWSShineFrontendService_20170701", "ListTagsForResource", {}).n("TranslateClient", "ListTagsForResourceCommand").f(void 0, void 0).ser(se_ListTagsForResourceCommand).de(de_ListTagsForResourceCommand).build() {
1618
- static {
1619
- __name(this, "ListTagsForResourceCommand");
1620
- }
1047
+ const se_UpdateParallelDataRequest = (input, context) => {
1048
+ return smithyClient.take(input, {
1049
+ ClientToken: [true, (_) => _ ?? uuid.v4()],
1050
+ Description: [],
1051
+ Name: [],
1052
+ ParallelDataConfig: smithyClient._json,
1053
+ });
1621
1054
  };
1622
-
1623
- // src/commands/ListTerminologiesCommand.ts
1624
-
1625
-
1626
-
1627
- var ListTerminologiesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1628
- return [
1629
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1630
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1631
- ];
1632
- }).s("AWSShineFrontendService_20170701", "ListTerminologies", {}).n("TranslateClient", "ListTerminologiesCommand").f(void 0, void 0).ser(se_ListTerminologiesCommand).de(de_ListTerminologiesCommand).build() {
1633
- static {
1634
- __name(this, "ListTerminologiesCommand");
1635
- }
1055
+ const de_DescribeTextTranslationJobResponse = (output, context) => {
1056
+ return smithyClient.take(output, {
1057
+ TextTranslationJobProperties: (_) => de_TextTranslationJobProperties(_),
1058
+ });
1636
1059
  };
1637
-
1638
- // src/commands/ListTextTranslationJobsCommand.ts
1639
-
1640
-
1641
-
1642
- var ListTextTranslationJobsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1643
- return [
1644
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1645
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1646
- ];
1647
- }).s("AWSShineFrontendService_20170701", "ListTextTranslationJobs", {}).n("TranslateClient", "ListTextTranslationJobsCommand").f(void 0, void 0).ser(se_ListTextTranslationJobsCommand).de(de_ListTextTranslationJobsCommand).build() {
1648
- static {
1649
- __name(this, "ListTextTranslationJobsCommand");
1650
- }
1060
+ const de_GetParallelDataResponse = (output, context) => {
1061
+ return smithyClient.take(output, {
1062
+ AuxiliaryDataLocation: smithyClient._json,
1063
+ DataLocation: smithyClient._json,
1064
+ LatestUpdateAttemptAuxiliaryDataLocation: smithyClient._json,
1065
+ ParallelDataProperties: (_) => de_ParallelDataProperties(_),
1066
+ });
1651
1067
  };
1652
-
1653
- // src/commands/StartTextTranslationJobCommand.ts
1654
-
1655
-
1656
-
1657
- var StartTextTranslationJobCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1658
- return [
1659
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1660
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1661
- ];
1662
- }).s("AWSShineFrontendService_20170701", "StartTextTranslationJob", {}).n("TranslateClient", "StartTextTranslationJobCommand").f(void 0, void 0).ser(se_StartTextTranslationJobCommand).de(de_StartTextTranslationJobCommand).build() {
1663
- static {
1664
- __name(this, "StartTextTranslationJobCommand");
1665
- }
1068
+ const de_GetTerminologyResponse = (output, context) => {
1069
+ return smithyClient.take(output, {
1070
+ AuxiliaryDataLocation: smithyClient._json,
1071
+ TerminologyDataLocation: smithyClient._json,
1072
+ TerminologyProperties: (_) => de_TerminologyProperties(_),
1073
+ });
1666
1074
  };
1667
-
1668
- // src/commands/StopTextTranslationJobCommand.ts
1669
-
1670
-
1671
-
1672
- var StopTextTranslationJobCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1673
- return [
1674
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1675
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1676
- ];
1677
- }).s("AWSShineFrontendService_20170701", "StopTextTranslationJob", {}).n("TranslateClient", "StopTextTranslationJobCommand").f(void 0, void 0).ser(se_StopTextTranslationJobCommand).de(de_StopTextTranslationJobCommand).build() {
1678
- static {
1679
- __name(this, "StopTextTranslationJobCommand");
1680
- }
1075
+ const de_ImportTerminologyResponse = (output, context) => {
1076
+ return smithyClient.take(output, {
1077
+ AuxiliaryDataLocation: smithyClient._json,
1078
+ TerminologyProperties: (_) => de_TerminologyProperties(_),
1079
+ });
1681
1080
  };
1682
-
1683
- // src/commands/TagResourceCommand.ts
1684
-
1685
-
1686
-
1687
- var TagResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1688
- return [
1689
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1690
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1691
- ];
1692
- }).s("AWSShineFrontendService_20170701", "TagResource", {}).n("TranslateClient", "TagResourceCommand").f(void 0, void 0).ser(se_TagResourceCommand).de(de_TagResourceCommand).build() {
1693
- static {
1694
- __name(this, "TagResourceCommand");
1695
- }
1081
+ const de_ListParallelDataResponse = (output, context) => {
1082
+ return smithyClient.take(output, {
1083
+ NextToken: smithyClient.expectString,
1084
+ ParallelDataPropertiesList: (_) => de_ParallelDataPropertiesList(_),
1085
+ });
1696
1086
  };
1087
+ const de_ListTerminologiesResponse = (output, context) => {
1088
+ return smithyClient.take(output, {
1089
+ NextToken: smithyClient.expectString,
1090
+ TerminologyPropertiesList: (_) => de_TerminologyPropertiesList(_),
1091
+ });
1092
+ };
1093
+ const de_ListTextTranslationJobsResponse = (output, context) => {
1094
+ return smithyClient.take(output, {
1095
+ NextToken: smithyClient.expectString,
1096
+ TextTranslationJobPropertiesList: (_) => de_TextTranslationJobPropertiesList(_),
1097
+ });
1098
+ };
1099
+ const de_ParallelDataProperties = (output, context) => {
1100
+ return smithyClient.take(output, {
1101
+ Arn: smithyClient.expectString,
1102
+ CreatedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
1103
+ Description: smithyClient.expectString,
1104
+ EncryptionKey: smithyClient._json,
1105
+ FailedRecordCount: smithyClient.expectLong,
1106
+ ImportedDataSize: smithyClient.expectLong,
1107
+ ImportedRecordCount: smithyClient.expectLong,
1108
+ LastUpdatedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
1109
+ LatestUpdateAttemptAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
1110
+ LatestUpdateAttemptStatus: smithyClient.expectString,
1111
+ Message: smithyClient.expectString,
1112
+ Name: smithyClient.expectString,
1113
+ ParallelDataConfig: smithyClient._json,
1114
+ SkippedRecordCount: smithyClient.expectLong,
1115
+ SourceLanguageCode: smithyClient.expectString,
1116
+ Status: smithyClient.expectString,
1117
+ TargetLanguageCodes: smithyClient._json,
1118
+ });
1119
+ };
1120
+ const de_ParallelDataPropertiesList = (output, context) => {
1121
+ const retVal = (output || [])
1122
+ .filter((e) => e != null)
1123
+ .map((entry) => {
1124
+ return de_ParallelDataProperties(entry);
1125
+ });
1126
+ return retVal;
1127
+ };
1128
+ const de_TerminologyProperties = (output, context) => {
1129
+ return smithyClient.take(output, {
1130
+ Arn: smithyClient.expectString,
1131
+ CreatedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
1132
+ Description: smithyClient.expectString,
1133
+ Directionality: smithyClient.expectString,
1134
+ EncryptionKey: smithyClient._json,
1135
+ Format: smithyClient.expectString,
1136
+ LastUpdatedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
1137
+ Message: smithyClient.expectString,
1138
+ Name: smithyClient.expectString,
1139
+ SizeBytes: smithyClient.expectInt32,
1140
+ SkippedTermCount: smithyClient.expectInt32,
1141
+ SourceLanguageCode: smithyClient.expectString,
1142
+ TargetLanguageCodes: smithyClient._json,
1143
+ TermCount: smithyClient.expectInt32,
1144
+ });
1145
+ };
1146
+ const de_TerminologyPropertiesList = (output, context) => {
1147
+ const retVal = (output || [])
1148
+ .filter((e) => e != null)
1149
+ .map((entry) => {
1150
+ return de_TerminologyProperties(entry);
1151
+ });
1152
+ return retVal;
1153
+ };
1154
+ const de_TextTranslationJobProperties = (output, context) => {
1155
+ return smithyClient.take(output, {
1156
+ DataAccessRoleArn: smithyClient.expectString,
1157
+ EndTime: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
1158
+ InputDataConfig: smithyClient._json,
1159
+ JobDetails: smithyClient._json,
1160
+ JobId: smithyClient.expectString,
1161
+ JobName: smithyClient.expectString,
1162
+ JobStatus: smithyClient.expectString,
1163
+ Message: smithyClient.expectString,
1164
+ OutputDataConfig: smithyClient._json,
1165
+ ParallelDataNames: smithyClient._json,
1166
+ Settings: smithyClient._json,
1167
+ SourceLanguageCode: smithyClient.expectString,
1168
+ SubmittedTime: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
1169
+ TargetLanguageCodes: smithyClient._json,
1170
+ TerminologyNames: smithyClient._json,
1171
+ });
1172
+ };
1173
+ const de_TextTranslationJobPropertiesList = (output, context) => {
1174
+ const retVal = (output || [])
1175
+ .filter((e) => e != null)
1176
+ .map((entry) => {
1177
+ return de_TextTranslationJobProperties(entry);
1178
+ });
1179
+ return retVal;
1180
+ };
1181
+ const de_TranslatedDocument = (output, context) => {
1182
+ return smithyClient.take(output, {
1183
+ Content: context.base64Decoder,
1184
+ });
1185
+ };
1186
+ const de_TranslateDocumentResponse = (output, context) => {
1187
+ return smithyClient.take(output, {
1188
+ AppliedSettings: smithyClient._json,
1189
+ AppliedTerminologies: smithyClient._json,
1190
+ SourceLanguageCode: smithyClient.expectString,
1191
+ TargetLanguageCode: smithyClient.expectString,
1192
+ TranslatedDocument: (_) => de_TranslatedDocument(_, context),
1193
+ });
1194
+ };
1195
+ const de_UpdateParallelDataResponse = (output, context) => {
1196
+ return smithyClient.take(output, {
1197
+ LatestUpdateAttemptAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
1198
+ LatestUpdateAttemptStatus: smithyClient.expectString,
1199
+ Name: smithyClient.expectString,
1200
+ Status: smithyClient.expectString,
1201
+ });
1202
+ };
1203
+ const deserializeMetadata = (output) => ({
1204
+ httpStatusCode: output.statusCode,
1205
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1206
+ extendedRequestId: output.headers["x-amz-id-2"],
1207
+ cfId: output.headers["x-amz-cf-id"],
1208
+ });
1209
+ const throwDefaultError = smithyClient.withBaseException(TranslateServiceException);
1210
+ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1211
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1212
+ const contents = {
1213
+ protocol,
1214
+ hostname,
1215
+ port,
1216
+ method: "POST",
1217
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1218
+ headers,
1219
+ };
1220
+ if (body !== undefined) {
1221
+ contents.body = body;
1222
+ }
1223
+ return new protocolHttp.HttpRequest(contents);
1224
+ };
1225
+ function sharedHeaders(operation) {
1226
+ return {
1227
+ "content-type": "application/x-amz-json-1.1",
1228
+ "x-amz-target": `AWSShineFrontendService_20170701.${operation}`,
1229
+ };
1230
+ }
1697
1231
 
1698
- // src/commands/TranslateDocumentCommand.ts
1699
-
1232
+ class CreateParallelDataCommand extends smithyClient.Command
1233
+ .classBuilder()
1234
+ .ep(commonParams)
1235
+ .m(function (Command, cs, config, o) {
1236
+ return [
1237
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1238
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1239
+ ];
1240
+ })
1241
+ .s("AWSShineFrontendService_20170701", "CreateParallelData", {})
1242
+ .n("TranslateClient", "CreateParallelDataCommand")
1243
+ .f(void 0, void 0)
1244
+ .ser(se_CreateParallelDataCommand)
1245
+ .de(de_CreateParallelDataCommand)
1246
+ .build() {
1247
+ }
1700
1248
 
1249
+ class DeleteParallelDataCommand extends smithyClient.Command
1250
+ .classBuilder()
1251
+ .ep(commonParams)
1252
+ .m(function (Command, cs, config, o) {
1253
+ return [
1254
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1255
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1256
+ ];
1257
+ })
1258
+ .s("AWSShineFrontendService_20170701", "DeleteParallelData", {})
1259
+ .n("TranslateClient", "DeleteParallelDataCommand")
1260
+ .f(void 0, void 0)
1261
+ .ser(se_DeleteParallelDataCommand)
1262
+ .de(de_DeleteParallelDataCommand)
1263
+ .build() {
1264
+ }
1701
1265
 
1702
- var TranslateDocumentCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1703
- return [
1704
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1705
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1706
- ];
1707
- }).s("AWSShineFrontendService_20170701", "TranslateDocument", {}).n("TranslateClient", "TranslateDocumentCommand").f(TranslateDocumentRequestFilterSensitiveLog, TranslateDocumentResponseFilterSensitiveLog).ser(se_TranslateDocumentCommand).de(de_TranslateDocumentCommand).build() {
1708
- static {
1709
- __name(this, "TranslateDocumentCommand");
1710
- }
1711
- };
1266
+ class DeleteTerminologyCommand extends smithyClient.Command
1267
+ .classBuilder()
1268
+ .ep(commonParams)
1269
+ .m(function (Command, cs, config, o) {
1270
+ return [
1271
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1272
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1273
+ ];
1274
+ })
1275
+ .s("AWSShineFrontendService_20170701", "DeleteTerminology", {})
1276
+ .n("TranslateClient", "DeleteTerminologyCommand")
1277
+ .f(void 0, void 0)
1278
+ .ser(se_DeleteTerminologyCommand)
1279
+ .de(de_DeleteTerminologyCommand)
1280
+ .build() {
1281
+ }
1712
1282
 
1713
- // src/commands/TranslateTextCommand.ts
1283
+ class DescribeTextTranslationJobCommand extends smithyClient.Command
1284
+ .classBuilder()
1285
+ .ep(commonParams)
1286
+ .m(function (Command, cs, config, o) {
1287
+ return [
1288
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1289
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1290
+ ];
1291
+ })
1292
+ .s("AWSShineFrontendService_20170701", "DescribeTextTranslationJob", {})
1293
+ .n("TranslateClient", "DescribeTextTranslationJobCommand")
1294
+ .f(void 0, void 0)
1295
+ .ser(se_DescribeTextTranslationJobCommand)
1296
+ .de(de_DescribeTextTranslationJobCommand)
1297
+ .build() {
1298
+ }
1714
1299
 
1300
+ class GetParallelDataCommand extends smithyClient.Command
1301
+ .classBuilder()
1302
+ .ep(commonParams)
1303
+ .m(function (Command, cs, config, o) {
1304
+ return [
1305
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1306
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1307
+ ];
1308
+ })
1309
+ .s("AWSShineFrontendService_20170701", "GetParallelData", {})
1310
+ .n("TranslateClient", "GetParallelDataCommand")
1311
+ .f(void 0, void 0)
1312
+ .ser(se_GetParallelDataCommand)
1313
+ .de(de_GetParallelDataCommand)
1314
+ .build() {
1315
+ }
1715
1316
 
1317
+ class GetTerminologyCommand extends smithyClient.Command
1318
+ .classBuilder()
1319
+ .ep(commonParams)
1320
+ .m(function (Command, cs, config, o) {
1321
+ return [
1322
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1323
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1324
+ ];
1325
+ })
1326
+ .s("AWSShineFrontendService_20170701", "GetTerminology", {})
1327
+ .n("TranslateClient", "GetTerminologyCommand")
1328
+ .f(void 0, void 0)
1329
+ .ser(se_GetTerminologyCommand)
1330
+ .de(de_GetTerminologyCommand)
1331
+ .build() {
1332
+ }
1716
1333
 
1717
- var TranslateTextCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1718
- return [
1719
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1720
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1721
- ];
1722
- }).s("AWSShineFrontendService_20170701", "TranslateText", {}).n("TranslateClient", "TranslateTextCommand").f(void 0, void 0).ser(se_TranslateTextCommand).de(de_TranslateTextCommand).build() {
1723
- static {
1724
- __name(this, "TranslateTextCommand");
1725
- }
1726
- };
1334
+ class ImportTerminologyCommand extends smithyClient.Command
1335
+ .classBuilder()
1336
+ .ep(commonParams)
1337
+ .m(function (Command, cs, config, o) {
1338
+ return [
1339
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1340
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1341
+ ];
1342
+ })
1343
+ .s("AWSShineFrontendService_20170701", "ImportTerminology", {})
1344
+ .n("TranslateClient", "ImportTerminologyCommand")
1345
+ .f(ImportTerminologyRequestFilterSensitiveLog, void 0)
1346
+ .ser(se_ImportTerminologyCommand)
1347
+ .de(de_ImportTerminologyCommand)
1348
+ .build() {
1349
+ }
1727
1350
 
1728
- // src/commands/UntagResourceCommand.ts
1351
+ class ListLanguagesCommand extends smithyClient.Command
1352
+ .classBuilder()
1353
+ .ep(commonParams)
1354
+ .m(function (Command, cs, config, o) {
1355
+ return [
1356
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1357
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1358
+ ];
1359
+ })
1360
+ .s("AWSShineFrontendService_20170701", "ListLanguages", {})
1361
+ .n("TranslateClient", "ListLanguagesCommand")
1362
+ .f(void 0, void 0)
1363
+ .ser(se_ListLanguagesCommand)
1364
+ .de(de_ListLanguagesCommand)
1365
+ .build() {
1366
+ }
1729
1367
 
1368
+ class ListParallelDataCommand extends smithyClient.Command
1369
+ .classBuilder()
1370
+ .ep(commonParams)
1371
+ .m(function (Command, cs, config, o) {
1372
+ return [
1373
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1374
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1375
+ ];
1376
+ })
1377
+ .s("AWSShineFrontendService_20170701", "ListParallelData", {})
1378
+ .n("TranslateClient", "ListParallelDataCommand")
1379
+ .f(void 0, void 0)
1380
+ .ser(se_ListParallelDataCommand)
1381
+ .de(de_ListParallelDataCommand)
1382
+ .build() {
1383
+ }
1730
1384
 
1385
+ class ListTagsForResourceCommand extends smithyClient.Command
1386
+ .classBuilder()
1387
+ .ep(commonParams)
1388
+ .m(function (Command, cs, config, o) {
1389
+ return [
1390
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1391
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1392
+ ];
1393
+ })
1394
+ .s("AWSShineFrontendService_20170701", "ListTagsForResource", {})
1395
+ .n("TranslateClient", "ListTagsForResourceCommand")
1396
+ .f(void 0, void 0)
1397
+ .ser(se_ListTagsForResourceCommand)
1398
+ .de(de_ListTagsForResourceCommand)
1399
+ .build() {
1400
+ }
1731
1401
 
1732
- var UntagResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1733
- return [
1734
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1735
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1736
- ];
1737
- }).s("AWSShineFrontendService_20170701", "UntagResource", {}).n("TranslateClient", "UntagResourceCommand").f(void 0, void 0).ser(se_UntagResourceCommand).de(de_UntagResourceCommand).build() {
1738
- static {
1739
- __name(this, "UntagResourceCommand");
1740
- }
1741
- };
1402
+ class ListTerminologiesCommand extends smithyClient.Command
1403
+ .classBuilder()
1404
+ .ep(commonParams)
1405
+ .m(function (Command, cs, config, o) {
1406
+ return [
1407
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1408
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1409
+ ];
1410
+ })
1411
+ .s("AWSShineFrontendService_20170701", "ListTerminologies", {})
1412
+ .n("TranslateClient", "ListTerminologiesCommand")
1413
+ .f(void 0, void 0)
1414
+ .ser(se_ListTerminologiesCommand)
1415
+ .de(de_ListTerminologiesCommand)
1416
+ .build() {
1417
+ }
1742
1418
 
1743
- // src/commands/UpdateParallelDataCommand.ts
1419
+ class ListTextTranslationJobsCommand extends smithyClient.Command
1420
+ .classBuilder()
1421
+ .ep(commonParams)
1422
+ .m(function (Command, cs, config, o) {
1423
+ return [
1424
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1425
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1426
+ ];
1427
+ })
1428
+ .s("AWSShineFrontendService_20170701", "ListTextTranslationJobs", {})
1429
+ .n("TranslateClient", "ListTextTranslationJobsCommand")
1430
+ .f(void 0, void 0)
1431
+ .ser(se_ListTextTranslationJobsCommand)
1432
+ .de(de_ListTextTranslationJobsCommand)
1433
+ .build() {
1434
+ }
1744
1435
 
1436
+ class StartTextTranslationJobCommand extends smithyClient.Command
1437
+ .classBuilder()
1438
+ .ep(commonParams)
1439
+ .m(function (Command, cs, config, o) {
1440
+ return [
1441
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1442
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1443
+ ];
1444
+ })
1445
+ .s("AWSShineFrontendService_20170701", "StartTextTranslationJob", {})
1446
+ .n("TranslateClient", "StartTextTranslationJobCommand")
1447
+ .f(void 0, void 0)
1448
+ .ser(se_StartTextTranslationJobCommand)
1449
+ .de(de_StartTextTranslationJobCommand)
1450
+ .build() {
1451
+ }
1745
1452
 
1453
+ class StopTextTranslationJobCommand extends smithyClient.Command
1454
+ .classBuilder()
1455
+ .ep(commonParams)
1456
+ .m(function (Command, cs, config, o) {
1457
+ return [
1458
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1459
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1460
+ ];
1461
+ })
1462
+ .s("AWSShineFrontendService_20170701", "StopTextTranslationJob", {})
1463
+ .n("TranslateClient", "StopTextTranslationJobCommand")
1464
+ .f(void 0, void 0)
1465
+ .ser(se_StopTextTranslationJobCommand)
1466
+ .de(de_StopTextTranslationJobCommand)
1467
+ .build() {
1468
+ }
1746
1469
 
1747
- var UpdateParallelDataCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1748
- return [
1749
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1750
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1751
- ];
1752
- }).s("AWSShineFrontendService_20170701", "UpdateParallelData", {}).n("TranslateClient", "UpdateParallelDataCommand").f(void 0, void 0).ser(se_UpdateParallelDataCommand).de(de_UpdateParallelDataCommand).build() {
1753
- static {
1754
- __name(this, "UpdateParallelDataCommand");
1755
- }
1756
- };
1470
+ class TagResourceCommand extends smithyClient.Command
1471
+ .classBuilder()
1472
+ .ep(commonParams)
1473
+ .m(function (Command, cs, config, o) {
1474
+ return [
1475
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1476
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1477
+ ];
1478
+ })
1479
+ .s("AWSShineFrontendService_20170701", "TagResource", {})
1480
+ .n("TranslateClient", "TagResourceCommand")
1481
+ .f(void 0, void 0)
1482
+ .ser(se_TagResourceCommand)
1483
+ .de(de_TagResourceCommand)
1484
+ .build() {
1485
+ }
1757
1486
 
1758
- // src/Translate.ts
1759
- var commands = {
1760
- CreateParallelDataCommand,
1761
- DeleteParallelDataCommand,
1762
- DeleteTerminologyCommand,
1763
- DescribeTextTranslationJobCommand,
1764
- GetParallelDataCommand,
1765
- GetTerminologyCommand,
1766
- ImportTerminologyCommand,
1767
- ListLanguagesCommand,
1768
- ListParallelDataCommand,
1769
- ListTagsForResourceCommand,
1770
- ListTerminologiesCommand,
1771
- ListTextTranslationJobsCommand,
1772
- StartTextTranslationJobCommand,
1773
- StopTextTranslationJobCommand,
1774
- TagResourceCommand,
1775
- TranslateDocumentCommand,
1776
- TranslateTextCommand,
1777
- UntagResourceCommand,
1778
- UpdateParallelDataCommand
1779
- };
1780
- var Translate = class extends TranslateClient {
1781
- static {
1782
- __name(this, "Translate");
1783
- }
1784
- };
1785
- (0, import_smithy_client.createAggregatedClient)(commands, Translate);
1487
+ class TranslateDocumentCommand extends smithyClient.Command
1488
+ .classBuilder()
1489
+ .ep(commonParams)
1490
+ .m(function (Command, cs, config, o) {
1491
+ return [
1492
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1493
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1494
+ ];
1495
+ })
1496
+ .s("AWSShineFrontendService_20170701", "TranslateDocument", {})
1497
+ .n("TranslateClient", "TranslateDocumentCommand")
1498
+ .f(TranslateDocumentRequestFilterSensitiveLog, TranslateDocumentResponseFilterSensitiveLog)
1499
+ .ser(se_TranslateDocumentCommand)
1500
+ .de(de_TranslateDocumentCommand)
1501
+ .build() {
1502
+ }
1786
1503
 
1787
- // src/pagination/ListLanguagesPaginator.ts
1504
+ class TranslateTextCommand extends smithyClient.Command
1505
+ .classBuilder()
1506
+ .ep(commonParams)
1507
+ .m(function (Command, cs, config, o) {
1508
+ return [
1509
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1510
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1511
+ ];
1512
+ })
1513
+ .s("AWSShineFrontendService_20170701", "TranslateText", {})
1514
+ .n("TranslateClient", "TranslateTextCommand")
1515
+ .f(void 0, void 0)
1516
+ .ser(se_TranslateTextCommand)
1517
+ .de(de_TranslateTextCommand)
1518
+ .build() {
1519
+ }
1788
1520
 
1789
- var paginateListLanguages = (0, import_core.createPaginator)(TranslateClient, ListLanguagesCommand, "NextToken", "NextToken", "MaxResults");
1521
+ class UntagResourceCommand extends smithyClient.Command
1522
+ .classBuilder()
1523
+ .ep(commonParams)
1524
+ .m(function (Command, cs, config, o) {
1525
+ return [
1526
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1527
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1528
+ ];
1529
+ })
1530
+ .s("AWSShineFrontendService_20170701", "UntagResource", {})
1531
+ .n("TranslateClient", "UntagResourceCommand")
1532
+ .f(void 0, void 0)
1533
+ .ser(se_UntagResourceCommand)
1534
+ .de(de_UntagResourceCommand)
1535
+ .build() {
1536
+ }
1790
1537
 
1791
- // src/pagination/ListParallelDataPaginator.ts
1538
+ class UpdateParallelDataCommand extends smithyClient.Command
1539
+ .classBuilder()
1540
+ .ep(commonParams)
1541
+ .m(function (Command, cs, config, o) {
1542
+ return [
1543
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1544
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1545
+ ];
1546
+ })
1547
+ .s("AWSShineFrontendService_20170701", "UpdateParallelData", {})
1548
+ .n("TranslateClient", "UpdateParallelDataCommand")
1549
+ .f(void 0, void 0)
1550
+ .ser(se_UpdateParallelDataCommand)
1551
+ .de(de_UpdateParallelDataCommand)
1552
+ .build() {
1553
+ }
1792
1554
 
1793
- var paginateListParallelData = (0, import_core.createPaginator)(TranslateClient, ListParallelDataCommand, "NextToken", "NextToken", "MaxResults");
1555
+ const commands = {
1556
+ CreateParallelDataCommand,
1557
+ DeleteParallelDataCommand,
1558
+ DeleteTerminologyCommand,
1559
+ DescribeTextTranslationJobCommand,
1560
+ GetParallelDataCommand,
1561
+ GetTerminologyCommand,
1562
+ ImportTerminologyCommand,
1563
+ ListLanguagesCommand,
1564
+ ListParallelDataCommand,
1565
+ ListTagsForResourceCommand,
1566
+ ListTerminologiesCommand,
1567
+ ListTextTranslationJobsCommand,
1568
+ StartTextTranslationJobCommand,
1569
+ StopTextTranslationJobCommand,
1570
+ TagResourceCommand,
1571
+ TranslateDocumentCommand,
1572
+ TranslateTextCommand,
1573
+ UntagResourceCommand,
1574
+ UpdateParallelDataCommand,
1575
+ };
1576
+ class Translate extends TranslateClient {
1577
+ }
1578
+ smithyClient.createAggregatedClient(commands, Translate);
1794
1579
 
1795
- // src/pagination/ListTerminologiesPaginator.ts
1580
+ const paginateListLanguages = core.createPaginator(TranslateClient, ListLanguagesCommand, "NextToken", "NextToken", "MaxResults");
1796
1581
 
1797
- var paginateListTerminologies = (0, import_core.createPaginator)(TranslateClient, ListTerminologiesCommand, "NextToken", "NextToken", "MaxResults");
1582
+ const paginateListParallelData = core.createPaginator(TranslateClient, ListParallelDataCommand, "NextToken", "NextToken", "MaxResults");
1798
1583
 
1799
- // src/pagination/ListTextTranslationJobsPaginator.ts
1584
+ const paginateListTerminologies = core.createPaginator(TranslateClient, ListTerminologiesCommand, "NextToken", "NextToken", "MaxResults");
1800
1585
 
1801
- var paginateListTextTranslationJobs = (0, import_core.createPaginator)(TranslateClient, ListTextTranslationJobsCommand, "NextToken", "NextToken", "MaxResults");
1802
- // Annotate the CommonJS export names for ESM import in node:
1586
+ const paginateListTextTranslationJobs = core.createPaginator(TranslateClient, ListTextTranslationJobsCommand, "NextToken", "NextToken", "MaxResults");
1803
1587
 
1804
- 0 && (module.exports = {
1805
- TranslateServiceException,
1806
- __Client,
1807
- TranslateClient,
1808
- Translate,
1809
- $Command,
1810
- CreateParallelDataCommand,
1811
- DeleteParallelDataCommand,
1812
- DeleteTerminologyCommand,
1813
- DescribeTextTranslationJobCommand,
1814
- GetParallelDataCommand,
1815
- GetTerminologyCommand,
1816
- ImportTerminologyCommand,
1817
- ListLanguagesCommand,
1818
- ListParallelDataCommand,
1819
- ListTagsForResourceCommand,
1820
- ListTerminologiesCommand,
1821
- ListTextTranslationJobsCommand,
1822
- StartTextTranslationJobCommand,
1823
- StopTextTranslationJobCommand,
1824
- TagResourceCommand,
1825
- TranslateDocumentCommand,
1826
- TranslateTextCommand,
1827
- UntagResourceCommand,
1828
- UpdateParallelDataCommand,
1829
- paginateListLanguages,
1830
- paginateListParallelData,
1831
- paginateListTerminologies,
1832
- paginateListTextTranslationJobs,
1833
- ConcurrentModificationException,
1834
- ConflictException,
1835
- EncryptionKeyType,
1836
- ParallelDataFormat,
1837
- ParallelDataStatus,
1838
- InternalServerException,
1839
- InvalidParameterValueException,
1840
- InvalidRequestException,
1841
- LimitExceededException,
1842
- TooManyRequestsException,
1843
- TooManyTagsException,
1844
- ResourceNotFoundException,
1845
- JobStatus,
1846
- Brevity,
1847
- Formality,
1848
- Profanity,
1849
- TerminologyDataFormat,
1850
- Directionality,
1851
- MergeStrategy,
1852
- DisplayLanguageCode,
1853
- UnsupportedDisplayLanguageCodeException,
1854
- InvalidFilterException,
1855
- UnsupportedLanguagePairException,
1856
- ServiceUnavailableException,
1857
- DetectedLanguageLowConfidenceException,
1858
- TextSizeLimitExceededException,
1859
- TerminologyDataFilterSensitiveLog,
1860
- ImportTerminologyRequestFilterSensitiveLog,
1861
- DocumentFilterSensitiveLog,
1862
- TranslateDocumentRequestFilterSensitiveLog,
1863
- TranslatedDocumentFilterSensitiveLog,
1864
- TranslateDocumentResponseFilterSensitiveLog
1588
+ Object.defineProperty(exports, "$Command", {
1589
+ enumerable: true,
1590
+ get: function () { return smithyClient.Command; }
1865
1591
  });
1866
-
1592
+ Object.defineProperty(exports, "__Client", {
1593
+ enumerable: true,
1594
+ get: function () { return smithyClient.Client; }
1595
+ });
1596
+ exports.Brevity = Brevity;
1597
+ exports.ConcurrentModificationException = ConcurrentModificationException;
1598
+ exports.ConflictException = ConflictException;
1599
+ exports.CreateParallelDataCommand = CreateParallelDataCommand;
1600
+ exports.DeleteParallelDataCommand = DeleteParallelDataCommand;
1601
+ exports.DeleteTerminologyCommand = DeleteTerminologyCommand;
1602
+ exports.DescribeTextTranslationJobCommand = DescribeTextTranslationJobCommand;
1603
+ exports.DetectedLanguageLowConfidenceException = DetectedLanguageLowConfidenceException;
1604
+ exports.Directionality = Directionality;
1605
+ exports.DisplayLanguageCode = DisplayLanguageCode;
1606
+ exports.DocumentFilterSensitiveLog = DocumentFilterSensitiveLog;
1607
+ exports.EncryptionKeyType = EncryptionKeyType;
1608
+ exports.Formality = Formality;
1609
+ exports.GetParallelDataCommand = GetParallelDataCommand;
1610
+ exports.GetTerminologyCommand = GetTerminologyCommand;
1611
+ exports.ImportTerminologyCommand = ImportTerminologyCommand;
1612
+ exports.ImportTerminologyRequestFilterSensitiveLog = ImportTerminologyRequestFilterSensitiveLog;
1613
+ exports.InternalServerException = InternalServerException;
1614
+ exports.InvalidFilterException = InvalidFilterException;
1615
+ exports.InvalidParameterValueException = InvalidParameterValueException;
1616
+ exports.InvalidRequestException = InvalidRequestException;
1617
+ exports.JobStatus = JobStatus;
1618
+ exports.LimitExceededException = LimitExceededException;
1619
+ exports.ListLanguagesCommand = ListLanguagesCommand;
1620
+ exports.ListParallelDataCommand = ListParallelDataCommand;
1621
+ exports.ListTagsForResourceCommand = ListTagsForResourceCommand;
1622
+ exports.ListTerminologiesCommand = ListTerminologiesCommand;
1623
+ exports.ListTextTranslationJobsCommand = ListTextTranslationJobsCommand;
1624
+ exports.MergeStrategy = MergeStrategy;
1625
+ exports.ParallelDataFormat = ParallelDataFormat;
1626
+ exports.ParallelDataStatus = ParallelDataStatus;
1627
+ exports.Profanity = Profanity;
1628
+ exports.ResourceNotFoundException = ResourceNotFoundException;
1629
+ exports.ServiceUnavailableException = ServiceUnavailableException;
1630
+ exports.StartTextTranslationJobCommand = StartTextTranslationJobCommand;
1631
+ exports.StopTextTranslationJobCommand = StopTextTranslationJobCommand;
1632
+ exports.TagResourceCommand = TagResourceCommand;
1633
+ exports.TerminologyDataFilterSensitiveLog = TerminologyDataFilterSensitiveLog;
1634
+ exports.TerminologyDataFormat = TerminologyDataFormat;
1635
+ exports.TextSizeLimitExceededException = TextSizeLimitExceededException;
1636
+ exports.TooManyRequestsException = TooManyRequestsException;
1637
+ exports.TooManyTagsException = TooManyTagsException;
1638
+ exports.Translate = Translate;
1639
+ exports.TranslateClient = TranslateClient;
1640
+ exports.TranslateDocumentCommand = TranslateDocumentCommand;
1641
+ exports.TranslateDocumentRequestFilterSensitiveLog = TranslateDocumentRequestFilterSensitiveLog;
1642
+ exports.TranslateDocumentResponseFilterSensitiveLog = TranslateDocumentResponseFilterSensitiveLog;
1643
+ exports.TranslateServiceException = TranslateServiceException;
1644
+ exports.TranslateTextCommand = TranslateTextCommand;
1645
+ exports.TranslatedDocumentFilterSensitiveLog = TranslatedDocumentFilterSensitiveLog;
1646
+ exports.UnsupportedDisplayLanguageCodeException = UnsupportedDisplayLanguageCodeException;
1647
+ exports.UnsupportedLanguagePairException = UnsupportedLanguagePairException;
1648
+ exports.UntagResourceCommand = UntagResourceCommand;
1649
+ exports.UpdateParallelDataCommand = UpdateParallelDataCommand;
1650
+ exports.paginateListLanguages = paginateListLanguages;
1651
+ exports.paginateListParallelData = paginateListParallelData;
1652
+ exports.paginateListTerminologies = paginateListTerminologies;
1653
+ exports.paginateListTextTranslationJobs = paginateListTextTranslationJobs;