@aws-sdk/client-translate 3.42.0 → 3.47.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.
@@ -1,8 +1,8 @@
1
- import { __assign } from "tslib";
1
+ import { __assign, __awaiter, __generator } from "tslib";
2
2
  import packageInfo from "../package.json";
3
3
  import { Sha256 } from "@aws-crypto/sha256-browser";
4
4
  import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
5
- import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
5
+ import { FetchHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
6
6
  import { invalidProvider } from "@aws-sdk/invalid-dependency";
7
7
  import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
8
8
  import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
@@ -10,8 +10,17 @@ import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
10
10
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
11
11
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
12
12
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
13
+ import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
14
+ import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-browser";
13
15
  export var getRuntimeConfig = function (config) {
14
16
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
17
+ var defaultsMode = resolveDefaultsModeConfig(config);
18
+ var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
15
19
  var clientSharedValues = getSharedRuntimeConfig(config);
16
- return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new FetchHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return Promise.resolve(DEFAULT_RETRY_MODE); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
20
+ return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
21
+ switch (_a.label) {
22
+ case 0: return [4, defaultConfigProvider()];
23
+ case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
24
+ }
25
+ }); }); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
17
26
  };
@@ -1,21 +1,28 @@
1
- import { __assign } from "tslib";
1
+ import { __assign, __awaiter, __generator } from "tslib";
2
2
  import packageInfo from "../package.json";
3
3
  import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
4
4
  import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@aws-sdk/config-resolver";
5
5
  import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
6
6
  import { Hash } from "@aws-sdk/hash-node";
7
- import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
7
+ import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@aws-sdk/middleware-retry";
8
8
  import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
9
- import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
9
+ import { NodeHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/node-http-handler";
10
10
  import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
11
11
  import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
12
12
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
13
13
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node";
14
14
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
15
- import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
15
+ import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
16
+ import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
16
17
  export var getRuntimeConfig = function (config) {
17
18
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
18
- emitWarningIfUnsupportedVersion(process.version);
19
+ var defaultsMode = resolveDefaultsModeConfig(config);
20
+ var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
19
21
  var clientSharedValues = getSharedRuntimeConfig(config);
20
- return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new NodeHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Hash.bind(null, "sha256"), streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
22
+ return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(__assign(__assign({}, NODE_RETRY_MODE_CONFIG_OPTIONS), { default: function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
23
+ switch (_a.label) {
24
+ case 0: return [4, defaultConfigProvider()];
25
+ case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
26
+ }
27
+ }); }); } })), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Hash.bind(null, "sha256"), streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
21
28
  };
@@ -4,7 +4,7 @@ import { RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry
4
4
  import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-signing";
5
5
  import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
6
6
  import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
7
- import { Client as __Client, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
7
+ import { Client as __Client, DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
8
8
  import { Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
9
9
  import { CreateParallelDataCommandInput, CreateParallelDataCommandOutput } from "./commands/CreateParallelDataCommand";
10
10
  import { DeleteParallelDataCommandInput, DeleteParallelDataCommandOutput } from "./commands/DeleteParallelDataCommand";
@@ -122,6 +122,10 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
122
122
  * @internal
123
123
  */
124
124
  defaultUserAgentProvider?: Provider<__UserAgent>;
125
+ /**
126
+ * The {@link DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
127
+ */
128
+ defaultsMode?: DefaultsMode | Provider<DefaultsMode>;
125
129
  }
126
130
  declare type TranslateClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointsInputConfig & RetryInputConfig & HostHeaderInputConfig & AwsAuthInputConfig & UserAgentInputConfig;
127
131
  /**
@@ -51,12 +51,6 @@ export interface ConflictException extends __SmithyException, $MetadataBearer {
51
51
  $fault: "client";
52
52
  Message?: string;
53
53
  }
54
- export declare namespace ConflictException {
55
- /**
56
- * @internal
57
- */
58
- const filterSensitiveLog: (obj: ConflictException) => any;
59
- }
60
54
  export declare enum EncryptionKeyType {
61
55
  KMS = "KMS"
62
56
  }
@@ -65,12 +59,11 @@ export declare enum EncryptionKeyType {
65
59
  */
66
60
  export interface EncryptionKey {
67
61
  /**
68
- * <p>The type of encryption key used by Amazon Translate to encrypt custom terminologies.</p>
62
+ * <p>The type of encryption key used by Amazon Translate to encrypt this object.</p>
69
63
  */
70
64
  Type: EncryptionKeyType | string | undefined;
71
65
  /**
72
- * <p>The Amazon Resource Name (ARN) of the encryption key being used to encrypt the custom
73
- * terminology.</p>
66
+ * <p>The Amazon Resource Name (ARN) of the encryption key being used to encrypt this object.</p>
74
67
  */
75
68
  Id: string | undefined;
76
69
  }
@@ -167,12 +160,6 @@ export interface InternalServerException extends __SmithyException, $MetadataBea
167
160
  $fault: "server";
168
161
  Message?: string;
169
162
  }
170
- export declare namespace InternalServerException {
171
- /**
172
- * @internal
173
- */
174
- const filterSensitiveLog: (obj: InternalServerException) => any;
175
- }
176
163
  /**
177
164
  * <p>The value of the parameter is invalid. Review the value of the parameter you are using to
178
165
  * correct it, and then retry your operation.</p>
@@ -182,12 +169,6 @@ export interface InvalidParameterValueException extends __SmithyException, $Meta
182
169
  $fault: "client";
183
170
  Message?: string;
184
171
  }
185
- export declare namespace InvalidParameterValueException {
186
- /**
187
- * @internal
188
- */
189
- const filterSensitiveLog: (obj: InvalidParameterValueException) => any;
190
- }
191
172
  /**
192
173
  * <p> The request that you made is invalid. Check your request to determine why it's invalid
193
174
  * and then retry the request. </p>
@@ -197,12 +178,6 @@ export interface InvalidRequestException extends __SmithyException, $MetadataBea
197
178
  $fault: "client";
198
179
  Message?: string;
199
180
  }
200
- export declare namespace InvalidRequestException {
201
- /**
202
- * @internal
203
- */
204
- const filterSensitiveLog: (obj: InvalidRequestException) => any;
205
- }
206
181
  /**
207
182
  * <p>The specified limit has been exceeded. Review your request and retry it with a quantity
208
183
  * below the stated limit.</p>
@@ -212,12 +187,6 @@ export interface LimitExceededException extends __SmithyException, $MetadataBear
212
187
  $fault: "client";
213
188
  Message?: string;
214
189
  }
215
- export declare namespace LimitExceededException {
216
- /**
217
- * @internal
218
- */
219
- const filterSensitiveLog: (obj: LimitExceededException) => any;
220
- }
221
190
  /**
222
191
  * <p> You have made too many requests within a short period of time. Wait for a short time and
223
192
  * then try your request again.</p>
@@ -227,12 +196,6 @@ export interface TooManyRequestsException extends __SmithyException, $MetadataBe
227
196
  $fault: "client";
228
197
  Message?: string;
229
198
  }
230
- export declare namespace TooManyRequestsException {
231
- /**
232
- * @internal
233
- */
234
- const filterSensitiveLog: (obj: TooManyRequestsException) => any;
235
- }
236
199
  /**
237
200
  * <p>Another modification is being made. That modification must complete before you can make
238
201
  * your change.</p>
@@ -242,12 +205,6 @@ export interface ConcurrentModificationException extends __SmithyException, $Met
242
205
  $fault: "client";
243
206
  Message?: string;
244
207
  }
245
- export declare namespace ConcurrentModificationException {
246
- /**
247
- * @internal
248
- */
249
- const filterSensitiveLog: (obj: ConcurrentModificationException) => any;
250
- }
251
208
  export interface DeleteParallelDataRequest {
252
209
  /**
253
210
  * <p>The name of the parallel data resource that is being deleted.</p>
@@ -286,12 +243,6 @@ export interface ResourceNotFoundException extends __SmithyException, $MetadataB
286
243
  $fault: "client";
287
244
  Message?: string;
288
245
  }
289
- export declare namespace ResourceNotFoundException {
290
- /**
291
- * @internal
292
- */
293
- const filterSensitiveLog: (obj: ResourceNotFoundException) => any;
294
- }
295
246
  export interface DeleteTerminologyRequest {
296
247
  /**
297
248
  * <p>The name of the custom terminology being deleted. </p>
@@ -431,6 +382,31 @@ export declare namespace OutputDataConfig {
431
382
  */
432
383
  const filterSensitiveLog: (obj: OutputDataConfig) => any;
433
384
  }
385
+ export declare enum Profanity {
386
+ MASK = "MASK"
387
+ }
388
+ /**
389
+ * <p>Settings that configure the translation output.</p>
390
+ */
391
+ export interface TranslationSettings {
392
+ /**
393
+ * <p>Enable the profanity setting if you want Amazon Translate to mask profane words and
394
+ * phrases in your translation output.</p>
395
+ * <p>To mask profane words and phrases, Amazon Translate replaces them with the grawlix string
396
+ * “?$#@$“. This 5-character sequence is used for each profane word or phrase, regardless of the
397
+ * length or number of words.</p>
398
+ * <p>Amazon Translate does not detect profanity in all of its supported languages. For
399
+ * languages that support profanity detection, see <a href="https://docs.aws.amazon.com/translate/latest/dg/what-is.html#what-is-languages">Supported
400
+ * Languages and Language Codes in the Amazon Translate Developer Guide</a>.</p>
401
+ */
402
+ Profanity?: Profanity | string;
403
+ }
404
+ export declare namespace TranslationSettings {
405
+ /**
406
+ * @internal
407
+ */
408
+ const filterSensitiveLog: (obj: TranslationSettings) => any;
409
+ }
434
410
  /**
435
411
  * <p>Provides information about a translation job.</p>
436
412
  */
@@ -498,6 +474,10 @@ export interface TextTranslationJobProperties {
498
474
  * that granted Amazon Translate read access to the job's input data.</p>
499
475
  */
500
476
  DataAccessRoleArn?: string;
477
+ /**
478
+ * <p>Settings that configure the translation output.</p>
479
+ */
480
+ Settings?: TranslationSettings;
501
481
  }
502
482
  export declare namespace TextTranslationJobProperties {
503
483
  /**
@@ -544,13 +524,13 @@ export interface ParallelDataDataLocation {
544
524
  * presigned URL to that has a 30 minute expiration.</p>
545
525
  *
546
526
  * <important>
547
- * <p>Amazon Translate doesn't scan parallel data input files for the risk of CSV injection
527
+ * <p>Amazon Translate doesn't scan all input files for the risk of CSV injection
548
528
  * attacks. </p>
549
529
  * <p>CSV injection occurs when a .csv or .tsv file is altered so that a record contains
550
530
  * malicious code. The record begins with a special character, such as =, +, -, or @. When the
551
531
  * file is opened in a spreadsheet program, the program might interpret the record as a formula
552
532
  * and run the code within it.</p>
553
- * <p>Before you download a parallel data input file from Amazon S3, ensure that you recognize the file and trust its creator.</p>
533
+ * <p>Before you download an input file from Amazon S3, ensure that you recognize the file and trust its creator.</p>
554
534
  * </important>
555
535
  */
556
536
  Location: string | undefined;
@@ -658,13 +638,13 @@ export interface GetParallelDataResponse {
658
638
  * minute expiration.</p>
659
639
  *
660
640
  * <important>
661
- * <p>Amazon Translate doesn't scan parallel data input files for the risk of CSV injection
641
+ * <p>Amazon Translate doesn't scan all input files for the risk of CSV injection
662
642
  * attacks. </p>
663
643
  * <p>CSV injection occurs when a .csv or .tsv file is altered so that a record contains
664
644
  * malicious code. The record begins with a special character, such as =, +, -, or @. When the
665
645
  * file is opened in a spreadsheet program, the program might interpret the record as a formula
666
646
  * and run the code within it.</p>
667
- * <p>Before you download a parallel data input file from Amazon S3, ensure that you recognize the file and trust its creator.</p>
647
+ * <p>Before you download an input file from Amazon S3, ensure that you recognize the file and trust its creator.</p>
668
648
  * </important>
669
649
  */
670
650
  DataLocation?: ParallelDataDataLocation;
@@ -724,7 +704,19 @@ export interface TerminologyDataLocation {
724
704
  */
725
705
  RepositoryType: string | undefined;
726
706
  /**
727
- * <p>The location of the custom terminology data.</p>
707
+ * <p>The Amazon S3 location of the most recent custom terminology input file that was
708
+ * successfully imported into Amazon Translate. The location is returned as a presigned URL that
709
+ * has a 30 minute expiration.</p>
710
+ *
711
+ * <important>
712
+ * <p>Amazon Translate doesn't scan all input files for the risk of CSV injection
713
+ * attacks. </p>
714
+ * <p>CSV injection occurs when a .csv or .tsv file is altered so that a record contains
715
+ * malicious code. The record begins with a special character, such as =, +, -, or @. When the
716
+ * file is opened in a spreadsheet program, the program might interpret the record as a formula
717
+ * and run the code within it.</p>
718
+ * <p>Before you download an input file from Amazon S3, ensure that you recognize the file and trust its creator.</p>
719
+ * </important>
728
720
  */
729
721
  Location: string | undefined;
730
722
  }
@@ -826,8 +818,19 @@ export interface GetTerminologyResponse {
826
818
  */
827
819
  TerminologyProperties?: TerminologyProperties;
828
820
  /**
829
- * <p>The data location of the custom terminology being retrieved. The custom terminology file
830
- * is returned in a presigned url that has a 30 minute expiration.</p>
821
+ * <p>The Amazon S3 location of the most recent custom terminology input file that was
822
+ * successfully imported into Amazon Translate. The location is returned as a presigned URL that
823
+ * has a 30 minute expiration.</p>
824
+ *
825
+ * <important>
826
+ * <p>Amazon Translate doesn't scan all input files for the risk of CSV injection
827
+ * attacks. </p>
828
+ * <p>CSV injection occurs when a .csv or .tsv file is altered so that a record contains
829
+ * malicious code. The record begins with a special character, such as =, +, -, or @. When the
830
+ * file is opened in a spreadsheet program, the program might interpret the record as a formula
831
+ * and run the code within it.</p>
832
+ * <p>Before you download an input file from Amazon S3, ensure that you recognize the file and trust its creator.</p>
833
+ * </important>
831
834
  */
832
835
  TerminologyDataLocation?: TerminologyDataLocation;
833
836
  /**
@@ -1014,12 +1017,6 @@ export interface InvalidFilterException extends __SmithyException, $MetadataBear
1014
1017
  $fault: "client";
1015
1018
  Message?: string;
1016
1019
  }
1017
- export declare namespace InvalidFilterException {
1018
- /**
1019
- * @internal
1020
- */
1021
- const filterSensitiveLog: (obj: InvalidFilterException) => any;
1022
- }
1023
1020
  /**
1024
1021
  * <p>Provides information for filtering a list of translation jobs. For more information, see
1025
1022
  * <a>ListTextTranslationJobs</a>.</p>
@@ -1146,6 +1143,11 @@ export interface StartTextTranslationJobRequest {
1146
1143
  * SDK.</p>
1147
1144
  */
1148
1145
  ClientToken?: string;
1146
+ /**
1147
+ * <p>Settings to configure your translation output, including the option to mask profane words
1148
+ * and phrases.</p>
1149
+ */
1150
+ Settings?: TranslationSettings;
1149
1151
  }
1150
1152
  export declare namespace StartTextTranslationJobRequest {
1151
1153
  /**
@@ -1221,12 +1223,6 @@ export interface UnsupportedLanguagePairException extends __SmithyException, $Me
1221
1223
  */
1222
1224
  TargetLanguageCode?: string;
1223
1225
  }
1224
- export declare namespace UnsupportedLanguagePairException {
1225
- /**
1226
- * @internal
1227
- */
1228
- const filterSensitiveLog: (obj: UnsupportedLanguagePairException) => any;
1229
- }
1230
1226
  export interface StopTextTranslationJobRequest {
1231
1227
  /**
1232
1228
  * <p>The job ID of the job to be stopped.</p>
@@ -1271,12 +1267,6 @@ export interface DetectedLanguageLowConfidenceException extends __SmithyExceptio
1271
1267
  */
1272
1268
  DetectedLanguageCode?: string;
1273
1269
  }
1274
- export declare namespace DetectedLanguageLowConfidenceException {
1275
- /**
1276
- * @internal
1277
- */
1278
- const filterSensitiveLog: (obj: DetectedLanguageLowConfidenceException) => any;
1279
- }
1280
1270
  /**
1281
1271
  * <p>The Amazon Translate service is temporarily unavailable. Please wait a bit and then retry your
1282
1272
  * request.</p>
@@ -1286,12 +1276,6 @@ export interface ServiceUnavailableException extends __SmithyException, $Metadat
1286
1276
  $fault: "server";
1287
1277
  Message?: string;
1288
1278
  }
1289
- export declare namespace ServiceUnavailableException {
1290
- /**
1291
- * @internal
1292
- */
1293
- const filterSensitiveLog: (obj: ServiceUnavailableException) => any;
1294
- }
1295
1279
  /**
1296
1280
  * <p> The size of the text you submitted exceeds the size limit. Reduce the size of the text or
1297
1281
  * use a smaller document and then retry your request. </p>
@@ -1301,12 +1285,6 @@ export interface TextSizeLimitExceededException extends __SmithyException, $Meta
1301
1285
  $fault: "client";
1302
1286
  Message?: string;
1303
1287
  }
1304
- export declare namespace TextSizeLimitExceededException {
1305
- /**
1306
- * @internal
1307
- */
1308
- const filterSensitiveLog: (obj: TextSizeLimitExceededException) => any;
1309
- }
1310
1288
  export interface TranslateTextRequest {
1311
1289
  /**
1312
1290
  * <p>The text to translate. The text string can be a maximum of 5,000 bytes long. Depending on
@@ -1333,6 +1311,11 @@ export interface TranslateTextRequest {
1333
1311
  * language supported by Amazon Translate.</p>
1334
1312
  */
1335
1313
  TargetLanguageCode: string | undefined;
1314
+ /**
1315
+ * <p>Settings to configure your translation output, including the option to mask profane words
1316
+ * and phrases.</p>
1317
+ */
1318
+ Settings?: TranslationSettings;
1336
1319
  }
1337
1320
  export declare namespace TranslateTextRequest {
1338
1321
  /**
@@ -1358,6 +1341,10 @@ export interface TranslateTextResponse {
1358
1341
  * translated text response.</p>
1359
1342
  */
1360
1343
  AppliedTerminologies?: AppliedTerminology[];
1344
+ /**
1345
+ * <p>Settings that configure the translation output.</p>
1346
+ */
1347
+ AppliedSettings?: TranslationSettings;
1361
1348
  }
1362
1349
  export declare namespace TranslateTextResponse {
1363
1350
  /**
@@ -1,10 +1,11 @@
1
- import { FetchHttpHandler } from "@aws-sdk/fetch-http-handler";
1
+ import { FetchHttpHandler as RequestHandler } from "@aws-sdk/fetch-http-handler";
2
2
  import { TranslateClientConfig } from "./TranslateClient";
3
3
  /**
4
4
  * @internal
5
5
  */
6
6
  export declare const getRuntimeConfig: (config: TranslateClientConfig) => {
7
7
  runtime: string;
8
+ defaultsMode: import("@aws-sdk/types").Provider<import("@aws-sdk/smithy-client").ResolvedDefaultsMode>;
8
9
  base64Decoder: import("@aws-sdk/types").Decoder;
9
10
  base64Encoder: import("@aws-sdk/types").Encoder;
10
11
  bodyLengthChecker: (body: any) => number | undefined;
@@ -12,7 +13,7 @@ export declare const getRuntimeConfig: (config: TranslateClientConfig) => {
12
13
  defaultUserAgentProvider: import("@aws-sdk/types").Provider<import("@aws-sdk/types").UserAgent>;
13
14
  maxAttempts: number | import("@aws-sdk/types").Provider<number>;
14
15
  region: string | import("@aws-sdk/types").Provider<any>;
15
- requestHandler: (import("@aws-sdk/types").RequestHandler<any, any, import("@aws-sdk/types").HttpHandlerOptions> & import("@aws-sdk/protocol-http").HttpHandler) | FetchHttpHandler;
16
+ requestHandler: (import("@aws-sdk/types").RequestHandler<any, any, import("@aws-sdk/types").HttpHandlerOptions> & import("@aws-sdk/protocol-http").HttpHandler) | RequestHandler;
16
17
  retryMode: string | import("@aws-sdk/types").Provider<string>;
17
18
  sha256: import("@aws-sdk/types").HashConstructor;
18
19
  streamCollector: import("@aws-sdk/types").StreamCollector;
@@ -1,18 +1,19 @@
1
- import { NodeHttpHandler } from "@aws-sdk/node-http-handler";
1
+ import { NodeHttpHandler as RequestHandler } from "@aws-sdk/node-http-handler";
2
2
  import { TranslateClientConfig } from "./TranslateClient";
3
3
  /**
4
4
  * @internal
5
5
  */
6
6
  export declare const getRuntimeConfig: (config: TranslateClientConfig) => {
7
7
  runtime: string;
8
+ defaultsMode: import("@aws-sdk/types").Provider<import("@aws-sdk/smithy-client").ResolvedDefaultsMode>;
8
9
  base64Decoder: import("@aws-sdk/types").Decoder;
9
10
  base64Encoder: import("@aws-sdk/types").Encoder;
10
11
  bodyLengthChecker: (body: any) => number | undefined;
11
- credentialDefaultProvider: import("@aws-sdk/client-sts/dist-types/defaultStsRoleAssumers").DefaultCredentialProvider;
12
+ credentialDefaultProvider: (input: any) => import("@aws-sdk/types").Provider<import("@aws-sdk/types").Credentials>;
12
13
  defaultUserAgentProvider: import("@aws-sdk/types").Provider<import("@aws-sdk/types").UserAgent>;
13
14
  maxAttempts: number | import("@aws-sdk/types").Provider<number>;
14
15
  region: string | import("@aws-sdk/types").Provider<string>;
15
- requestHandler: (import("@aws-sdk/types").RequestHandler<any, any, import("@aws-sdk/types").HttpHandlerOptions> & import("@aws-sdk/protocol-http").HttpHandler) | NodeHttpHandler;
16
+ requestHandler: (import("@aws-sdk/types").RequestHandler<any, any, import("@aws-sdk/types").HttpHandlerOptions> & import("@aws-sdk/protocol-http").HttpHandler) | RequestHandler;
16
17
  retryMode: string | import("@aws-sdk/types").Provider<string>;
17
18
  sha256: import("@aws-sdk/types").HashConstructor;
18
19
  streamCollector: import("@aws-sdk/types").StreamCollector;
@@ -25,6 +25,7 @@ export declare const getRuntimeConfig: (config: TranslateClientConfig) => {
25
25
  credentialDefaultProvider: (input: any) => import("@aws-sdk/types").Provider<import("@aws-sdk/types").Credentials>;
26
26
  regionInfoProvider: import("@aws-sdk/types").RegionInfoProvider;
27
27
  defaultUserAgentProvider: import("@aws-sdk/types").Provider<import("@aws-sdk/types").UserAgent>;
28
+ defaultsMode: import("@aws-sdk/smithy-client").DefaultsMode | import("@aws-sdk/types").Provider<import("@aws-sdk/smithy-client").DefaultsMode> | import("@aws-sdk/types").Provider<import("@aws-sdk/smithy-client").ResolvedDefaultsMode>;
28
29
  endpoint?: string | import("@aws-sdk/types").Endpoint | import("@aws-sdk/types").Provider<import("@aws-sdk/types").Endpoint> | undefined;
29
30
  tls?: boolean | undefined;
30
31
  retryStrategy?: import("@aws-sdk/types").RetryStrategy | undefined;
@@ -4,7 +4,7 @@ import { RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry
4
4
  import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-signing";
5
5
  import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
6
6
  import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
7
- import { Client as __Client, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
7
+ import { Client as __Client, DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
8
8
  import { Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
9
9
  import { CreateParallelDataCommandInput, CreateParallelDataCommandOutput } from "./commands/CreateParallelDataCommand";
10
10
  import { DeleteParallelDataCommandInput, DeleteParallelDataCommandOutput } from "./commands/DeleteParallelDataCommand";
@@ -65,6 +65,8 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
65
65
  regionInfoProvider?: RegionInfoProvider;
66
66
 
67
67
  defaultUserAgentProvider?: Provider<__UserAgent>;
68
+
69
+ defaultsMode?: DefaultsMode | Provider<DefaultsMode>;
68
70
  }
69
71
  declare type TranslateClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointsInputConfig & RetryInputConfig & HostHeaderInputConfig & AwsAuthInputConfig & UserAgentInputConfig;
70
72