@aws-sdk/client-translate 3.30.0 → 3.34.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.
- package/CHANGELOG.md +35 -0
- package/dist/cjs/TranslateClient.js +13 -13
- package/dist/cjs/TranslateClient.js.map +1 -1
- package/dist/cjs/commands/CreateParallelDataCommand.js +3 -3
- package/dist/cjs/commands/CreateParallelDataCommand.js.map +1 -1
- package/dist/cjs/commands/DeleteParallelDataCommand.js +3 -3
- package/dist/cjs/commands/DeleteParallelDataCommand.js.map +1 -1
- package/dist/cjs/commands/DeleteTerminologyCommand.js +3 -3
- package/dist/cjs/commands/DeleteTerminologyCommand.js.map +1 -1
- package/dist/cjs/commands/DescribeTextTranslationJobCommand.js +3 -3
- package/dist/cjs/commands/DescribeTextTranslationJobCommand.js.map +1 -1
- package/dist/cjs/commands/GetParallelDataCommand.js +3 -3
- package/dist/cjs/commands/GetParallelDataCommand.js.map +1 -1
- package/dist/cjs/commands/GetTerminologyCommand.js +3 -3
- package/dist/cjs/commands/GetTerminologyCommand.js.map +1 -1
- package/dist/cjs/commands/ImportTerminologyCommand.js +3 -3
- package/dist/cjs/commands/ImportTerminologyCommand.js.map +1 -1
- package/dist/cjs/commands/ListParallelDataCommand.js +3 -3
- package/dist/cjs/commands/ListParallelDataCommand.js.map +1 -1
- package/dist/cjs/commands/ListTerminologiesCommand.js +3 -3
- package/dist/cjs/commands/ListTerminologiesCommand.js.map +1 -1
- package/dist/cjs/commands/ListTextTranslationJobsCommand.js +3 -3
- package/dist/cjs/commands/ListTextTranslationJobsCommand.js.map +1 -1
- package/dist/cjs/commands/StartTextTranslationJobCommand.js +3 -3
- package/dist/cjs/commands/StartTextTranslationJobCommand.js.map +1 -1
- package/dist/cjs/commands/StopTextTranslationJobCommand.js +3 -3
- package/dist/cjs/commands/StopTextTranslationJobCommand.js.map +1 -1
- package/dist/cjs/commands/TranslateTextCommand.js +3 -3
- package/dist/cjs/commands/TranslateTextCommand.js.map +1 -1
- package/dist/cjs/commands/UpdateParallelDataCommand.js +3 -3
- package/dist/cjs/commands/UpdateParallelDataCommand.js.map +1 -1
- package/dist/cjs/endpoints.js +1 -1
- package/dist/cjs/endpoints.js.map +1 -1
- package/dist/cjs/index.js +21 -21
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/models/index.js +1 -1
- package/dist/cjs/models/index.js.map +1 -1
- package/dist/cjs/package.json +39 -39
- package/dist/cjs/protocols/Aws_json1_1.js +89 -87
- package/dist/cjs/protocols/Aws_json1_1.js.map +1 -1
- package/dist/cjs/runtimeConfig.browser.js +4 -4
- package/dist/cjs/runtimeConfig.browser.js.map +1 -1
- package/dist/cjs/runtimeConfig.js +8 -8
- package/dist/cjs/runtimeConfig.js.map +1 -1
- package/dist/cjs/runtimeConfig.native.js +1 -1
- package/dist/cjs/runtimeConfig.native.js.map +1 -1
- package/dist/es/Translate.js +1 -5
- package/dist/es/Translate.js.map +1 -1
- package/dist/es/TranslateClient.js +1 -10
- package/dist/es/TranslateClient.js.map +1 -1
- package/dist/es/commands/CreateParallelDataCommand.js +2 -30
- package/dist/es/commands/CreateParallelDataCommand.js.map +1 -1
- package/dist/es/commands/DeleteParallelDataCommand.js +2 -27
- package/dist/es/commands/DeleteParallelDataCommand.js.map +1 -1
- package/dist/es/commands/DeleteTerminologyCommand.js +2 -27
- package/dist/es/commands/DeleteTerminologyCommand.js.map +1 -1
- package/dist/es/commands/DescribeTextTranslationJobCommand.js +2 -28
- package/dist/es/commands/DescribeTextTranslationJobCommand.js.map +1 -1
- package/dist/es/commands/GetParallelDataCommand.js +2 -27
- package/dist/es/commands/GetParallelDataCommand.js.map +1 -1
- package/dist/es/commands/GetTerminologyCommand.js +2 -27
- package/dist/es/commands/GetTerminologyCommand.js.map +1 -1
- package/dist/es/commands/ImportTerminologyCommand.js +2 -34
- package/dist/es/commands/ImportTerminologyCommand.js.map +1 -1
- package/dist/es/commands/ListParallelDataCommand.js +2 -27
- package/dist/es/commands/ListParallelDataCommand.js.map +1 -1
- package/dist/es/commands/ListTerminologiesCommand.js +2 -27
- package/dist/es/commands/ListTerminologiesCommand.js.map +1 -1
- package/dist/es/commands/ListTextTranslationJobsCommand.js +2 -27
- package/dist/es/commands/ListTextTranslationJobsCommand.js.map +1 -1
- package/dist/es/commands/StartTextTranslationJobCommand.js +2 -34
- package/dist/es/commands/StartTextTranslationJobCommand.js.map +1 -1
- package/dist/es/commands/StopTextTranslationJobCommand.js +2 -33
- package/dist/es/commands/StopTextTranslationJobCommand.js.map +1 -1
- package/dist/es/commands/TranslateTextCommand.js +2 -28
- package/dist/es/commands/TranslateTextCommand.js.map +1 -1
- package/dist/es/commands/UpdateParallelDataCommand.js +2 -28
- package/dist/es/commands/UpdateParallelDataCommand.js.map +1 -1
- package/dist/es/endpoints.js +1 -1
- package/dist/es/endpoints.js.map +1 -1
- package/dist/es/models/models_0.js +0 -162
- package/dist/es/models/models_0.js.map +1 -1
- package/dist/es/package.json +39 -39
- package/dist/es/pagination/ListParallelDataPaginator.js +16 -28
- package/dist/es/pagination/ListParallelDataPaginator.js.map +1 -1
- package/dist/es/pagination/ListTerminologiesPaginator.js +16 -28
- package/dist/es/pagination/ListTerminologiesPaginator.js.map +1 -1
- package/dist/es/pagination/ListTextTranslationJobsPaginator.js +16 -28
- package/dist/es/pagination/ListTextTranslationJobsPaginator.js.map +1 -1
- package/dist/es/protocols/Aws_json1_1.js +376 -379
- package/dist/es/protocols/Aws_json1_1.js.map +1 -1
- package/dist/es/runtimeConfig.browser.js +0 -3
- package/dist/es/runtimeConfig.browser.js.map +1 -1
- package/dist/es/runtimeConfig.js +0 -3
- package/dist/es/runtimeConfig.js.map +1 -1
- package/dist/es/runtimeConfig.native.js +0 -3
- package/dist/es/runtimeConfig.native.js.map +1 -1
- package/dist/es/runtimeConfig.shared.js +0 -3
- package/dist/es/runtimeConfig.shared.js.map +1 -1
- package/dist/types/runtimeConfig.browser.d.ts +1 -0
- package/dist/types/runtimeConfig.d.ts +1 -0
- package/dist/types/runtimeConfig.native.d.ts +1 -0
- package/dist/types/ts3.4/runtimeConfig.browser.d.ts +1 -0
- package/dist/types/ts3.4/runtimeConfig.d.ts +1 -0
- package/dist/types/ts3.4/runtimeConfig.native.d.ts +1 -0
- package/package.json +39 -39
- package/protocols/Aws_json1_1.ts +13 -8
- package/tsconfig.es.json +0 -2
- package/tsconfig.json +3 -5
- package/tsconfig.types.json +8 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
|
-
import { expectInt32 as __expectInt32, expectLong as __expectLong, expectString as __expectString, } from "@aws-sdk/smithy-client";
|
|
3
|
+
import { expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, } from "@aws-sdk/smithy-client";
|
|
4
4
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
5
5
|
export var serializeAws_json1_1CreateParallelDataCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6
6
|
var headers, body;
|
|
@@ -10,7 +10,7 @@ export var serializeAws_json1_1CreateParallelDataCommand = function (input, cont
|
|
|
10
10
|
"x-amz-target": "AWSShineFrontendService_20170701.CreateParallelData",
|
|
11
11
|
};
|
|
12
12
|
body = JSON.stringify(serializeAws_json1_1CreateParallelDataRequest(input, context));
|
|
13
|
-
return [2
|
|
13
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
14
14
|
});
|
|
15
15
|
}); };
|
|
16
16
|
export var serializeAws_json1_1DeleteParallelDataCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -21,7 +21,7 @@ export var serializeAws_json1_1DeleteParallelDataCommand = function (input, cont
|
|
|
21
21
|
"x-amz-target": "AWSShineFrontendService_20170701.DeleteParallelData",
|
|
22
22
|
};
|
|
23
23
|
body = JSON.stringify(serializeAws_json1_1DeleteParallelDataRequest(input, context));
|
|
24
|
-
return [2
|
|
24
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
25
25
|
});
|
|
26
26
|
}); };
|
|
27
27
|
export var serializeAws_json1_1DeleteTerminologyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -32,7 +32,7 @@ export var serializeAws_json1_1DeleteTerminologyCommand = function (input, conte
|
|
|
32
32
|
"x-amz-target": "AWSShineFrontendService_20170701.DeleteTerminology",
|
|
33
33
|
};
|
|
34
34
|
body = JSON.stringify(serializeAws_json1_1DeleteTerminologyRequest(input, context));
|
|
35
|
-
return [2
|
|
35
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
36
36
|
});
|
|
37
37
|
}); };
|
|
38
38
|
export var serializeAws_json1_1DescribeTextTranslationJobCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -43,7 +43,7 @@ export var serializeAws_json1_1DescribeTextTranslationJobCommand = function (inp
|
|
|
43
43
|
"x-amz-target": "AWSShineFrontendService_20170701.DescribeTextTranslationJob",
|
|
44
44
|
};
|
|
45
45
|
body = JSON.stringify(serializeAws_json1_1DescribeTextTranslationJobRequest(input, context));
|
|
46
|
-
return [2
|
|
46
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
47
47
|
});
|
|
48
48
|
}); };
|
|
49
49
|
export var serializeAws_json1_1GetParallelDataCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -54,7 +54,7 @@ export var serializeAws_json1_1GetParallelDataCommand = function (input, context
|
|
|
54
54
|
"x-amz-target": "AWSShineFrontendService_20170701.GetParallelData",
|
|
55
55
|
};
|
|
56
56
|
body = JSON.stringify(serializeAws_json1_1GetParallelDataRequest(input, context));
|
|
57
|
-
return [2
|
|
57
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
58
58
|
});
|
|
59
59
|
}); };
|
|
60
60
|
export var serializeAws_json1_1GetTerminologyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -65,7 +65,7 @@ export var serializeAws_json1_1GetTerminologyCommand = function (input, context)
|
|
|
65
65
|
"x-amz-target": "AWSShineFrontendService_20170701.GetTerminology",
|
|
66
66
|
};
|
|
67
67
|
body = JSON.stringify(serializeAws_json1_1GetTerminologyRequest(input, context));
|
|
68
|
-
return [2
|
|
68
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
69
69
|
});
|
|
70
70
|
}); };
|
|
71
71
|
export var serializeAws_json1_1ImportTerminologyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -76,7 +76,7 @@ export var serializeAws_json1_1ImportTerminologyCommand = function (input, conte
|
|
|
76
76
|
"x-amz-target": "AWSShineFrontendService_20170701.ImportTerminology",
|
|
77
77
|
};
|
|
78
78
|
body = JSON.stringify(serializeAws_json1_1ImportTerminologyRequest(input, context));
|
|
79
|
-
return [2
|
|
79
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
80
80
|
});
|
|
81
81
|
}); };
|
|
82
82
|
export var serializeAws_json1_1ListParallelDataCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -87,7 +87,7 @@ export var serializeAws_json1_1ListParallelDataCommand = function (input, contex
|
|
|
87
87
|
"x-amz-target": "AWSShineFrontendService_20170701.ListParallelData",
|
|
88
88
|
};
|
|
89
89
|
body = JSON.stringify(serializeAws_json1_1ListParallelDataRequest(input, context));
|
|
90
|
-
return [2
|
|
90
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
91
91
|
});
|
|
92
92
|
}); };
|
|
93
93
|
export var serializeAws_json1_1ListTerminologiesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -98,7 +98,7 @@ export var serializeAws_json1_1ListTerminologiesCommand = function (input, conte
|
|
|
98
98
|
"x-amz-target": "AWSShineFrontendService_20170701.ListTerminologies",
|
|
99
99
|
};
|
|
100
100
|
body = JSON.stringify(serializeAws_json1_1ListTerminologiesRequest(input, context));
|
|
101
|
-
return [2
|
|
101
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
102
102
|
});
|
|
103
103
|
}); };
|
|
104
104
|
export var serializeAws_json1_1ListTextTranslationJobsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -109,7 +109,7 @@ export var serializeAws_json1_1ListTextTranslationJobsCommand = function (input,
|
|
|
109
109
|
"x-amz-target": "AWSShineFrontendService_20170701.ListTextTranslationJobs",
|
|
110
110
|
};
|
|
111
111
|
body = JSON.stringify(serializeAws_json1_1ListTextTranslationJobsRequest(input, context));
|
|
112
|
-
return [2
|
|
112
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
113
113
|
});
|
|
114
114
|
}); };
|
|
115
115
|
export var serializeAws_json1_1StartTextTranslationJobCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -120,7 +120,7 @@ export var serializeAws_json1_1StartTextTranslationJobCommand = function (input,
|
|
|
120
120
|
"x-amz-target": "AWSShineFrontendService_20170701.StartTextTranslationJob",
|
|
121
121
|
};
|
|
122
122
|
body = JSON.stringify(serializeAws_json1_1StartTextTranslationJobRequest(input, context));
|
|
123
|
-
return [2
|
|
123
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
124
124
|
});
|
|
125
125
|
}); };
|
|
126
126
|
export var serializeAws_json1_1StopTextTranslationJobCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -131,7 +131,7 @@ export var serializeAws_json1_1StopTextTranslationJobCommand = function (input,
|
|
|
131
131
|
"x-amz-target": "AWSShineFrontendService_20170701.StopTextTranslationJob",
|
|
132
132
|
};
|
|
133
133
|
body = JSON.stringify(serializeAws_json1_1StopTextTranslationJobRequest(input, context));
|
|
134
|
-
return [2
|
|
134
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
135
135
|
});
|
|
136
136
|
}); };
|
|
137
137
|
export var serializeAws_json1_1TranslateTextCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -142,7 +142,7 @@ export var serializeAws_json1_1TranslateTextCommand = function (input, context)
|
|
|
142
142
|
"x-amz-target": "AWSShineFrontendService_20170701.TranslateText",
|
|
143
143
|
};
|
|
144
144
|
body = JSON.stringify(serializeAws_json1_1TranslateTextRequest(input, context));
|
|
145
|
-
return [2
|
|
145
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
146
146
|
});
|
|
147
147
|
}); };
|
|
148
148
|
export var serializeAws_json1_1UpdateParallelDataCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -153,7 +153,7 @@ export var serializeAws_json1_1UpdateParallelDataCommand = function (input, cont
|
|
|
153
153
|
"x-amz-target": "AWSShineFrontendService_20170701.UpdateParallelData",
|
|
154
154
|
};
|
|
155
155
|
body = JSON.stringify(serializeAws_json1_1UpdateParallelDataRequest(input, context));
|
|
156
|
-
return [2
|
|
156
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
157
157
|
});
|
|
158
158
|
}); };
|
|
159
159
|
export var deserializeAws_json1_1CreateParallelDataCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -162,15 +162,15 @@ export var deserializeAws_json1_1CreateParallelDataCommand = function (output, c
|
|
|
162
162
|
switch (_a.label) {
|
|
163
163
|
case 0:
|
|
164
164
|
if (output.statusCode >= 300) {
|
|
165
|
-
return [2
|
|
165
|
+
return [2, deserializeAws_json1_1CreateParallelDataCommandError(output, context)];
|
|
166
166
|
}
|
|
167
|
-
return [4
|
|
167
|
+
return [4, parseBody(output.body, context)];
|
|
168
168
|
case 1:
|
|
169
169
|
data = _a.sent();
|
|
170
170
|
contents = {};
|
|
171
171
|
contents = deserializeAws_json1_1CreateParallelDataResponse(data, context);
|
|
172
172
|
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
173
|
-
return [2
|
|
173
|
+
return [2, Promise.resolve(response)];
|
|
174
174
|
}
|
|
175
175
|
});
|
|
176
176
|
}); };
|
|
@@ -182,63 +182,63 @@ var deserializeAws_json1_1CreateParallelDataCommandError = function (output, con
|
|
|
182
182
|
case 0:
|
|
183
183
|
_a = [__assign({}, output)];
|
|
184
184
|
_j = {};
|
|
185
|
-
return [4
|
|
185
|
+
return [4, parseBody(output.body, context)];
|
|
186
186
|
case 1:
|
|
187
187
|
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
188
188
|
errorCode = "UnknownError";
|
|
189
189
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
190
190
|
_b = errorCode;
|
|
191
191
|
switch (_b) {
|
|
192
|
-
case "ConflictException": return [3
|
|
193
|
-
case "com.amazonaws.translate#ConflictException": return [3
|
|
194
|
-
case "InternalServerException": return [3
|
|
195
|
-
case "com.amazonaws.translate#InternalServerException": return [3
|
|
196
|
-
case "InvalidParameterValueException": return [3
|
|
197
|
-
case "com.amazonaws.translate#InvalidParameterValueException": return [3
|
|
198
|
-
case "InvalidRequestException": return [3
|
|
199
|
-
case "com.amazonaws.translate#InvalidRequestException": return [3
|
|
200
|
-
case "LimitExceededException": return [3
|
|
201
|
-
case "com.amazonaws.translate#LimitExceededException": return [3
|
|
202
|
-
case "TooManyRequestsException": return [3
|
|
203
|
-
case "com.amazonaws.translate#TooManyRequestsException": return [3
|
|
192
|
+
case "ConflictException": return [3, 2];
|
|
193
|
+
case "com.amazonaws.translate#ConflictException": return [3, 2];
|
|
194
|
+
case "InternalServerException": return [3, 4];
|
|
195
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 4];
|
|
196
|
+
case "InvalidParameterValueException": return [3, 6];
|
|
197
|
+
case "com.amazonaws.translate#InvalidParameterValueException": return [3, 6];
|
|
198
|
+
case "InvalidRequestException": return [3, 8];
|
|
199
|
+
case "com.amazonaws.translate#InvalidRequestException": return [3, 8];
|
|
200
|
+
case "LimitExceededException": return [3, 10];
|
|
201
|
+
case "com.amazonaws.translate#LimitExceededException": return [3, 10];
|
|
202
|
+
case "TooManyRequestsException": return [3, 12];
|
|
203
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 12];
|
|
204
204
|
}
|
|
205
|
-
return [3
|
|
205
|
+
return [3, 14];
|
|
206
206
|
case 2:
|
|
207
207
|
_c = [{}];
|
|
208
|
-
return [4
|
|
208
|
+
return [4, deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context)];
|
|
209
209
|
case 3:
|
|
210
210
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
211
|
-
return [3
|
|
211
|
+
return [3, 15];
|
|
212
212
|
case 4:
|
|
213
213
|
_d = [{}];
|
|
214
|
-
return [4
|
|
214
|
+
return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
215
215
|
case 5:
|
|
216
216
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
217
|
-
return [3
|
|
217
|
+
return [3, 15];
|
|
218
218
|
case 6:
|
|
219
219
|
_e = [{}];
|
|
220
|
-
return [4
|
|
220
|
+
return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
|
|
221
221
|
case 7:
|
|
222
222
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
223
|
-
return [3
|
|
223
|
+
return [3, 15];
|
|
224
224
|
case 8:
|
|
225
225
|
_f = [{}];
|
|
226
|
-
return [4
|
|
226
|
+
return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
227
227
|
case 9:
|
|
228
228
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
229
|
-
return [3
|
|
229
|
+
return [3, 15];
|
|
230
230
|
case 10:
|
|
231
231
|
_g = [{}];
|
|
232
|
-
return [4
|
|
232
|
+
return [4, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
233
233
|
case 11:
|
|
234
234
|
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
235
|
-
return [3
|
|
235
|
+
return [3, 15];
|
|
236
236
|
case 12:
|
|
237
237
|
_h = [{}];
|
|
238
|
-
return [4
|
|
238
|
+
return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
239
239
|
case 13:
|
|
240
240
|
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
241
|
-
return [3
|
|
241
|
+
return [3, 15];
|
|
242
242
|
case 14:
|
|
243
243
|
parsedBody = parsedOutput.body;
|
|
244
244
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -248,7 +248,7 @@ var deserializeAws_json1_1CreateParallelDataCommandError = function (output, con
|
|
|
248
248
|
message = response.message || response.Message || errorCode;
|
|
249
249
|
response.message = message;
|
|
250
250
|
delete response.Message;
|
|
251
|
-
return [2
|
|
251
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
252
252
|
}
|
|
253
253
|
});
|
|
254
254
|
}); };
|
|
@@ -258,15 +258,15 @@ export var deserializeAws_json1_1DeleteParallelDataCommand = function (output, c
|
|
|
258
258
|
switch (_a.label) {
|
|
259
259
|
case 0:
|
|
260
260
|
if (output.statusCode >= 300) {
|
|
261
|
-
return [2
|
|
261
|
+
return [2, deserializeAws_json1_1DeleteParallelDataCommandError(output, context)];
|
|
262
262
|
}
|
|
263
|
-
return [4
|
|
263
|
+
return [4, parseBody(output.body, context)];
|
|
264
264
|
case 1:
|
|
265
265
|
data = _a.sent();
|
|
266
266
|
contents = {};
|
|
267
267
|
contents = deserializeAws_json1_1DeleteParallelDataResponse(data, context);
|
|
268
268
|
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
269
|
-
return [2
|
|
269
|
+
return [2, Promise.resolve(response)];
|
|
270
270
|
}
|
|
271
271
|
});
|
|
272
272
|
}); };
|
|
@@ -278,47 +278,47 @@ var deserializeAws_json1_1DeleteParallelDataCommandError = function (output, con
|
|
|
278
278
|
case 0:
|
|
279
279
|
_a = [__assign({}, output)];
|
|
280
280
|
_g = {};
|
|
281
|
-
return [4
|
|
281
|
+
return [4, parseBody(output.body, context)];
|
|
282
282
|
case 1:
|
|
283
283
|
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
284
284
|
errorCode = "UnknownError";
|
|
285
285
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
286
286
|
_b = errorCode;
|
|
287
287
|
switch (_b) {
|
|
288
|
-
case "ConcurrentModificationException": return [3
|
|
289
|
-
case "com.amazonaws.translate#ConcurrentModificationException": return [3
|
|
290
|
-
case "InternalServerException": return [3
|
|
291
|
-
case "com.amazonaws.translate#InternalServerException": return [3
|
|
292
|
-
case "ResourceNotFoundException": return [3
|
|
293
|
-
case "com.amazonaws.translate#ResourceNotFoundException": return [3
|
|
294
|
-
case "TooManyRequestsException": return [3
|
|
295
|
-
case "com.amazonaws.translate#TooManyRequestsException": return [3
|
|
288
|
+
case "ConcurrentModificationException": return [3, 2];
|
|
289
|
+
case "com.amazonaws.translate#ConcurrentModificationException": return [3, 2];
|
|
290
|
+
case "InternalServerException": return [3, 4];
|
|
291
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 4];
|
|
292
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
293
|
+
case "com.amazonaws.translate#ResourceNotFoundException": return [3, 6];
|
|
294
|
+
case "TooManyRequestsException": return [3, 8];
|
|
295
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 8];
|
|
296
296
|
}
|
|
297
|
-
return [3
|
|
297
|
+
return [3, 10];
|
|
298
298
|
case 2:
|
|
299
299
|
_c = [{}];
|
|
300
|
-
return [4
|
|
300
|
+
return [4, deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)];
|
|
301
301
|
case 3:
|
|
302
302
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
303
|
-
return [3
|
|
303
|
+
return [3, 11];
|
|
304
304
|
case 4:
|
|
305
305
|
_d = [{}];
|
|
306
|
-
return [4
|
|
306
|
+
return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
307
307
|
case 5:
|
|
308
308
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
309
|
-
return [3
|
|
309
|
+
return [3, 11];
|
|
310
310
|
case 6:
|
|
311
311
|
_e = [{}];
|
|
312
|
-
return [4
|
|
312
|
+
return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
313
313
|
case 7:
|
|
314
314
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
315
|
-
return [3
|
|
315
|
+
return [3, 11];
|
|
316
316
|
case 8:
|
|
317
317
|
_f = [{}];
|
|
318
|
-
return [4
|
|
318
|
+
return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
319
319
|
case 9:
|
|
320
320
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
321
|
-
return [3
|
|
321
|
+
return [3, 11];
|
|
322
322
|
case 10:
|
|
323
323
|
parsedBody = parsedOutput.body;
|
|
324
324
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -328,7 +328,7 @@ var deserializeAws_json1_1DeleteParallelDataCommandError = function (output, con
|
|
|
328
328
|
message = response.message || response.Message || errorCode;
|
|
329
329
|
response.message = message;
|
|
330
330
|
delete response.Message;
|
|
331
|
-
return [2
|
|
331
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
332
332
|
}
|
|
333
333
|
});
|
|
334
334
|
}); };
|
|
@@ -338,15 +338,15 @@ export var deserializeAws_json1_1DeleteTerminologyCommand = function (output, co
|
|
|
338
338
|
switch (_a.label) {
|
|
339
339
|
case 0:
|
|
340
340
|
if (output.statusCode >= 300) {
|
|
341
|
-
return [2
|
|
341
|
+
return [2, deserializeAws_json1_1DeleteTerminologyCommandError(output, context)];
|
|
342
342
|
}
|
|
343
|
-
return [4
|
|
343
|
+
return [4, collectBody(output.body, context)];
|
|
344
344
|
case 1:
|
|
345
345
|
_a.sent();
|
|
346
346
|
response = {
|
|
347
347
|
$metadata: deserializeMetadata(output),
|
|
348
348
|
};
|
|
349
|
-
return [2
|
|
349
|
+
return [2, Promise.resolve(response)];
|
|
350
350
|
}
|
|
351
351
|
});
|
|
352
352
|
}); };
|
|
@@ -358,47 +358,47 @@ var deserializeAws_json1_1DeleteTerminologyCommandError = function (output, cont
|
|
|
358
358
|
case 0:
|
|
359
359
|
_a = [__assign({}, output)];
|
|
360
360
|
_g = {};
|
|
361
|
-
return [4
|
|
361
|
+
return [4, parseBody(output.body, context)];
|
|
362
362
|
case 1:
|
|
363
363
|
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
364
364
|
errorCode = "UnknownError";
|
|
365
365
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
366
366
|
_b = errorCode;
|
|
367
367
|
switch (_b) {
|
|
368
|
-
case "InternalServerException": return [3
|
|
369
|
-
case "com.amazonaws.translate#InternalServerException": return [3
|
|
370
|
-
case "InvalidParameterValueException": return [3
|
|
371
|
-
case "com.amazonaws.translate#InvalidParameterValueException": return [3
|
|
372
|
-
case "ResourceNotFoundException": return [3
|
|
373
|
-
case "com.amazonaws.translate#ResourceNotFoundException": return [3
|
|
374
|
-
case "TooManyRequestsException": return [3
|
|
375
|
-
case "com.amazonaws.translate#TooManyRequestsException": return [3
|
|
368
|
+
case "InternalServerException": return [3, 2];
|
|
369
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 2];
|
|
370
|
+
case "InvalidParameterValueException": return [3, 4];
|
|
371
|
+
case "com.amazonaws.translate#InvalidParameterValueException": return [3, 4];
|
|
372
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
373
|
+
case "com.amazonaws.translate#ResourceNotFoundException": return [3, 6];
|
|
374
|
+
case "TooManyRequestsException": return [3, 8];
|
|
375
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 8];
|
|
376
376
|
}
|
|
377
|
-
return [3
|
|
377
|
+
return [3, 10];
|
|
378
378
|
case 2:
|
|
379
379
|
_c = [{}];
|
|
380
|
-
return [4
|
|
380
|
+
return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
381
381
|
case 3:
|
|
382
382
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
383
|
-
return [3
|
|
383
|
+
return [3, 11];
|
|
384
384
|
case 4:
|
|
385
385
|
_d = [{}];
|
|
386
|
-
return [4
|
|
386
|
+
return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
|
|
387
387
|
case 5:
|
|
388
388
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
389
|
-
return [3
|
|
389
|
+
return [3, 11];
|
|
390
390
|
case 6:
|
|
391
391
|
_e = [{}];
|
|
392
|
-
return [4
|
|
392
|
+
return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
393
393
|
case 7:
|
|
394
394
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
395
|
-
return [3
|
|
395
|
+
return [3, 11];
|
|
396
396
|
case 8:
|
|
397
397
|
_f = [{}];
|
|
398
|
-
return [4
|
|
398
|
+
return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
399
399
|
case 9:
|
|
400
400
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
401
|
-
return [3
|
|
401
|
+
return [3, 11];
|
|
402
402
|
case 10:
|
|
403
403
|
parsedBody = parsedOutput.body;
|
|
404
404
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -408,7 +408,7 @@ var deserializeAws_json1_1DeleteTerminologyCommandError = function (output, cont
|
|
|
408
408
|
message = response.message || response.Message || errorCode;
|
|
409
409
|
response.message = message;
|
|
410
410
|
delete response.Message;
|
|
411
|
-
return [2
|
|
411
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
412
412
|
}
|
|
413
413
|
});
|
|
414
414
|
}); };
|
|
@@ -418,15 +418,15 @@ export var deserializeAws_json1_1DescribeTextTranslationJobCommand = function (o
|
|
|
418
418
|
switch (_a.label) {
|
|
419
419
|
case 0:
|
|
420
420
|
if (output.statusCode >= 300) {
|
|
421
|
-
return [2
|
|
421
|
+
return [2, deserializeAws_json1_1DescribeTextTranslationJobCommandError(output, context)];
|
|
422
422
|
}
|
|
423
|
-
return [4
|
|
423
|
+
return [4, parseBody(output.body, context)];
|
|
424
424
|
case 1:
|
|
425
425
|
data = _a.sent();
|
|
426
426
|
contents = {};
|
|
427
427
|
contents = deserializeAws_json1_1DescribeTextTranslationJobResponse(data, context);
|
|
428
428
|
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
429
|
-
return [2
|
|
429
|
+
return [2, Promise.resolve(response)];
|
|
430
430
|
}
|
|
431
431
|
});
|
|
432
432
|
}); };
|
|
@@ -438,39 +438,39 @@ var deserializeAws_json1_1DescribeTextTranslationJobCommandError = function (out
|
|
|
438
438
|
case 0:
|
|
439
439
|
_a = [__assign({}, output)];
|
|
440
440
|
_f = {};
|
|
441
|
-
return [4
|
|
441
|
+
return [4, parseBody(output.body, context)];
|
|
442
442
|
case 1:
|
|
443
443
|
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
444
444
|
errorCode = "UnknownError";
|
|
445
445
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
446
446
|
_b = errorCode;
|
|
447
447
|
switch (_b) {
|
|
448
|
-
case "InternalServerException": return [3
|
|
449
|
-
case "com.amazonaws.translate#InternalServerException": return [3
|
|
450
|
-
case "ResourceNotFoundException": return [3
|
|
451
|
-
case "com.amazonaws.translate#ResourceNotFoundException": return [3
|
|
452
|
-
case "TooManyRequestsException": return [3
|
|
453
|
-
case "com.amazonaws.translate#TooManyRequestsException": return [3
|
|
448
|
+
case "InternalServerException": return [3, 2];
|
|
449
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 2];
|
|
450
|
+
case "ResourceNotFoundException": return [3, 4];
|
|
451
|
+
case "com.amazonaws.translate#ResourceNotFoundException": return [3, 4];
|
|
452
|
+
case "TooManyRequestsException": return [3, 6];
|
|
453
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 6];
|
|
454
454
|
}
|
|
455
|
-
return [3
|
|
455
|
+
return [3, 8];
|
|
456
456
|
case 2:
|
|
457
457
|
_c = [{}];
|
|
458
|
-
return [4
|
|
458
|
+
return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
459
459
|
case 3:
|
|
460
460
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
461
|
-
return [3
|
|
461
|
+
return [3, 9];
|
|
462
462
|
case 4:
|
|
463
463
|
_d = [{}];
|
|
464
|
-
return [4
|
|
464
|
+
return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
465
465
|
case 5:
|
|
466
466
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
467
|
-
return [3
|
|
467
|
+
return [3, 9];
|
|
468
468
|
case 6:
|
|
469
469
|
_e = [{}];
|
|
470
|
-
return [4
|
|
470
|
+
return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
471
471
|
case 7:
|
|
472
472
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
473
|
-
return [3
|
|
473
|
+
return [3, 9];
|
|
474
474
|
case 8:
|
|
475
475
|
parsedBody = parsedOutput.body;
|
|
476
476
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -480,7 +480,7 @@ var deserializeAws_json1_1DescribeTextTranslationJobCommandError = function (out
|
|
|
480
480
|
message = response.message || response.Message || errorCode;
|
|
481
481
|
response.message = message;
|
|
482
482
|
delete response.Message;
|
|
483
|
-
return [2
|
|
483
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
484
484
|
}
|
|
485
485
|
});
|
|
486
486
|
}); };
|
|
@@ -490,15 +490,15 @@ export var deserializeAws_json1_1GetParallelDataCommand = function (output, cont
|
|
|
490
490
|
switch (_a.label) {
|
|
491
491
|
case 0:
|
|
492
492
|
if (output.statusCode >= 300) {
|
|
493
|
-
return [2
|
|
493
|
+
return [2, deserializeAws_json1_1GetParallelDataCommandError(output, context)];
|
|
494
494
|
}
|
|
495
|
-
return [4
|
|
495
|
+
return [4, parseBody(output.body, context)];
|
|
496
496
|
case 1:
|
|
497
497
|
data = _a.sent();
|
|
498
498
|
contents = {};
|
|
499
499
|
contents = deserializeAws_json1_1GetParallelDataResponse(data, context);
|
|
500
500
|
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
501
|
-
return [2
|
|
501
|
+
return [2, Promise.resolve(response)];
|
|
502
502
|
}
|
|
503
503
|
});
|
|
504
504
|
}); };
|
|
@@ -510,47 +510,47 @@ var deserializeAws_json1_1GetParallelDataCommandError = function (output, contex
|
|
|
510
510
|
case 0:
|
|
511
511
|
_a = [__assign({}, output)];
|
|
512
512
|
_g = {};
|
|
513
|
-
return [4
|
|
513
|
+
return [4, parseBody(output.body, context)];
|
|
514
514
|
case 1:
|
|
515
515
|
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
516
516
|
errorCode = "UnknownError";
|
|
517
517
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
518
518
|
_b = errorCode;
|
|
519
519
|
switch (_b) {
|
|
520
|
-
case "InternalServerException": return [3
|
|
521
|
-
case "com.amazonaws.translate#InternalServerException": return [3
|
|
522
|
-
case "InvalidParameterValueException": return [3
|
|
523
|
-
case "com.amazonaws.translate#InvalidParameterValueException": return [3
|
|
524
|
-
case "ResourceNotFoundException": return [3
|
|
525
|
-
case "com.amazonaws.translate#ResourceNotFoundException": return [3
|
|
526
|
-
case "TooManyRequestsException": return [3
|
|
527
|
-
case "com.amazonaws.translate#TooManyRequestsException": return [3
|
|
520
|
+
case "InternalServerException": return [3, 2];
|
|
521
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 2];
|
|
522
|
+
case "InvalidParameterValueException": return [3, 4];
|
|
523
|
+
case "com.amazonaws.translate#InvalidParameterValueException": return [3, 4];
|
|
524
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
525
|
+
case "com.amazonaws.translate#ResourceNotFoundException": return [3, 6];
|
|
526
|
+
case "TooManyRequestsException": return [3, 8];
|
|
527
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 8];
|
|
528
528
|
}
|
|
529
|
-
return [3
|
|
529
|
+
return [3, 10];
|
|
530
530
|
case 2:
|
|
531
531
|
_c = [{}];
|
|
532
|
-
return [4
|
|
532
|
+
return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
533
533
|
case 3:
|
|
534
534
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
535
|
-
return [3
|
|
535
|
+
return [3, 11];
|
|
536
536
|
case 4:
|
|
537
537
|
_d = [{}];
|
|
538
|
-
return [4
|
|
538
|
+
return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
|
|
539
539
|
case 5:
|
|
540
540
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
541
|
-
return [3
|
|
541
|
+
return [3, 11];
|
|
542
542
|
case 6:
|
|
543
543
|
_e = [{}];
|
|
544
|
-
return [4
|
|
544
|
+
return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
545
545
|
case 7:
|
|
546
546
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
547
|
-
return [3
|
|
547
|
+
return [3, 11];
|
|
548
548
|
case 8:
|
|
549
549
|
_f = [{}];
|
|
550
|
-
return [4
|
|
550
|
+
return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
551
551
|
case 9:
|
|
552
552
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
553
|
-
return [3
|
|
553
|
+
return [3, 11];
|
|
554
554
|
case 10:
|
|
555
555
|
parsedBody = parsedOutput.body;
|
|
556
556
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -560,7 +560,7 @@ var deserializeAws_json1_1GetParallelDataCommandError = function (output, contex
|
|
|
560
560
|
message = response.message || response.Message || errorCode;
|
|
561
561
|
response.message = message;
|
|
562
562
|
delete response.Message;
|
|
563
|
-
return [2
|
|
563
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
564
564
|
}
|
|
565
565
|
});
|
|
566
566
|
}); };
|
|
@@ -570,15 +570,15 @@ export var deserializeAws_json1_1GetTerminologyCommand = function (output, conte
|
|
|
570
570
|
switch (_a.label) {
|
|
571
571
|
case 0:
|
|
572
572
|
if (output.statusCode >= 300) {
|
|
573
|
-
return [2
|
|
573
|
+
return [2, deserializeAws_json1_1GetTerminologyCommandError(output, context)];
|
|
574
574
|
}
|
|
575
|
-
return [4
|
|
575
|
+
return [4, parseBody(output.body, context)];
|
|
576
576
|
case 1:
|
|
577
577
|
data = _a.sent();
|
|
578
578
|
contents = {};
|
|
579
579
|
contents = deserializeAws_json1_1GetTerminologyResponse(data, context);
|
|
580
580
|
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
581
|
-
return [2
|
|
581
|
+
return [2, Promise.resolve(response)];
|
|
582
582
|
}
|
|
583
583
|
});
|
|
584
584
|
}); };
|
|
@@ -590,47 +590,47 @@ var deserializeAws_json1_1GetTerminologyCommandError = function (output, context
|
|
|
590
590
|
case 0:
|
|
591
591
|
_a = [__assign({}, output)];
|
|
592
592
|
_g = {};
|
|
593
|
-
return [4
|
|
593
|
+
return [4, parseBody(output.body, context)];
|
|
594
594
|
case 1:
|
|
595
595
|
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
596
596
|
errorCode = "UnknownError";
|
|
597
597
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
598
598
|
_b = errorCode;
|
|
599
599
|
switch (_b) {
|
|
600
|
-
case "InternalServerException": return [3
|
|
601
|
-
case "com.amazonaws.translate#InternalServerException": return [3
|
|
602
|
-
case "InvalidParameterValueException": return [3
|
|
603
|
-
case "com.amazonaws.translate#InvalidParameterValueException": return [3
|
|
604
|
-
case "ResourceNotFoundException": return [3
|
|
605
|
-
case "com.amazonaws.translate#ResourceNotFoundException": return [3
|
|
606
|
-
case "TooManyRequestsException": return [3
|
|
607
|
-
case "com.amazonaws.translate#TooManyRequestsException": return [3
|
|
600
|
+
case "InternalServerException": return [3, 2];
|
|
601
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 2];
|
|
602
|
+
case "InvalidParameterValueException": return [3, 4];
|
|
603
|
+
case "com.amazonaws.translate#InvalidParameterValueException": return [3, 4];
|
|
604
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
605
|
+
case "com.amazonaws.translate#ResourceNotFoundException": return [3, 6];
|
|
606
|
+
case "TooManyRequestsException": return [3, 8];
|
|
607
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 8];
|
|
608
608
|
}
|
|
609
|
-
return [3
|
|
609
|
+
return [3, 10];
|
|
610
610
|
case 2:
|
|
611
611
|
_c = [{}];
|
|
612
|
-
return [4
|
|
612
|
+
return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
613
613
|
case 3:
|
|
614
614
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
615
|
-
return [3
|
|
615
|
+
return [3, 11];
|
|
616
616
|
case 4:
|
|
617
617
|
_d = [{}];
|
|
618
|
-
return [4
|
|
618
|
+
return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
|
|
619
619
|
case 5:
|
|
620
620
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
621
|
-
return [3
|
|
621
|
+
return [3, 11];
|
|
622
622
|
case 6:
|
|
623
623
|
_e = [{}];
|
|
624
|
-
return [4
|
|
624
|
+
return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
625
625
|
case 7:
|
|
626
626
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
627
|
-
return [3
|
|
627
|
+
return [3, 11];
|
|
628
628
|
case 8:
|
|
629
629
|
_f = [{}];
|
|
630
|
-
return [4
|
|
630
|
+
return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
631
631
|
case 9:
|
|
632
632
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
633
|
-
return [3
|
|
633
|
+
return [3, 11];
|
|
634
634
|
case 10:
|
|
635
635
|
parsedBody = parsedOutput.body;
|
|
636
636
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -640,7 +640,7 @@ var deserializeAws_json1_1GetTerminologyCommandError = function (output, context
|
|
|
640
640
|
message = response.message || response.Message || errorCode;
|
|
641
641
|
response.message = message;
|
|
642
642
|
delete response.Message;
|
|
643
|
-
return [2
|
|
643
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
644
644
|
}
|
|
645
645
|
});
|
|
646
646
|
}); };
|
|
@@ -650,15 +650,15 @@ export var deserializeAws_json1_1ImportTerminologyCommand = function (output, co
|
|
|
650
650
|
switch (_a.label) {
|
|
651
651
|
case 0:
|
|
652
652
|
if (output.statusCode >= 300) {
|
|
653
|
-
return [2
|
|
653
|
+
return [2, deserializeAws_json1_1ImportTerminologyCommandError(output, context)];
|
|
654
654
|
}
|
|
655
|
-
return [4
|
|
655
|
+
return [4, parseBody(output.body, context)];
|
|
656
656
|
case 1:
|
|
657
657
|
data = _a.sent();
|
|
658
658
|
contents = {};
|
|
659
659
|
contents = deserializeAws_json1_1ImportTerminologyResponse(data, context);
|
|
660
660
|
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
661
|
-
return [2
|
|
661
|
+
return [2, Promise.resolve(response)];
|
|
662
662
|
}
|
|
663
663
|
});
|
|
664
664
|
}); };
|
|
@@ -670,47 +670,47 @@ var deserializeAws_json1_1ImportTerminologyCommandError = function (output, cont
|
|
|
670
670
|
case 0:
|
|
671
671
|
_a = [__assign({}, output)];
|
|
672
672
|
_g = {};
|
|
673
|
-
return [4
|
|
673
|
+
return [4, parseBody(output.body, context)];
|
|
674
674
|
case 1:
|
|
675
675
|
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
676
676
|
errorCode = "UnknownError";
|
|
677
677
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
678
678
|
_b = errorCode;
|
|
679
679
|
switch (_b) {
|
|
680
|
-
case "InternalServerException": return [3
|
|
681
|
-
case "com.amazonaws.translate#InternalServerException": return [3
|
|
682
|
-
case "InvalidParameterValueException": return [3
|
|
683
|
-
case "com.amazonaws.translate#InvalidParameterValueException": return [3
|
|
684
|
-
case "LimitExceededException": return [3
|
|
685
|
-
case "com.amazonaws.translate#LimitExceededException": return [3
|
|
686
|
-
case "TooManyRequestsException": return [3
|
|
687
|
-
case "com.amazonaws.translate#TooManyRequestsException": return [3
|
|
680
|
+
case "InternalServerException": return [3, 2];
|
|
681
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 2];
|
|
682
|
+
case "InvalidParameterValueException": return [3, 4];
|
|
683
|
+
case "com.amazonaws.translate#InvalidParameterValueException": return [3, 4];
|
|
684
|
+
case "LimitExceededException": return [3, 6];
|
|
685
|
+
case "com.amazonaws.translate#LimitExceededException": return [3, 6];
|
|
686
|
+
case "TooManyRequestsException": return [3, 8];
|
|
687
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 8];
|
|
688
688
|
}
|
|
689
|
-
return [3
|
|
689
|
+
return [3, 10];
|
|
690
690
|
case 2:
|
|
691
691
|
_c = [{}];
|
|
692
|
-
return [4
|
|
692
|
+
return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
693
693
|
case 3:
|
|
694
694
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
695
|
-
return [3
|
|
695
|
+
return [3, 11];
|
|
696
696
|
case 4:
|
|
697
697
|
_d = [{}];
|
|
698
|
-
return [4
|
|
698
|
+
return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
|
|
699
699
|
case 5:
|
|
700
700
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
701
|
-
return [3
|
|
701
|
+
return [3, 11];
|
|
702
702
|
case 6:
|
|
703
703
|
_e = [{}];
|
|
704
|
-
return [4
|
|
704
|
+
return [4, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
705
705
|
case 7:
|
|
706
706
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
707
|
-
return [3
|
|
707
|
+
return [3, 11];
|
|
708
708
|
case 8:
|
|
709
709
|
_f = [{}];
|
|
710
|
-
return [4
|
|
710
|
+
return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
711
711
|
case 9:
|
|
712
712
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
713
|
-
return [3
|
|
713
|
+
return [3, 11];
|
|
714
714
|
case 10:
|
|
715
715
|
parsedBody = parsedOutput.body;
|
|
716
716
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -720,7 +720,7 @@ var deserializeAws_json1_1ImportTerminologyCommandError = function (output, cont
|
|
|
720
720
|
message = response.message || response.Message || errorCode;
|
|
721
721
|
response.message = message;
|
|
722
722
|
delete response.Message;
|
|
723
|
-
return [2
|
|
723
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
724
724
|
}
|
|
725
725
|
});
|
|
726
726
|
}); };
|
|
@@ -730,15 +730,15 @@ export var deserializeAws_json1_1ListParallelDataCommand = function (output, con
|
|
|
730
730
|
switch (_a.label) {
|
|
731
731
|
case 0:
|
|
732
732
|
if (output.statusCode >= 300) {
|
|
733
|
-
return [2
|
|
733
|
+
return [2, deserializeAws_json1_1ListParallelDataCommandError(output, context)];
|
|
734
734
|
}
|
|
735
|
-
return [4
|
|
735
|
+
return [4, parseBody(output.body, context)];
|
|
736
736
|
case 1:
|
|
737
737
|
data = _a.sent();
|
|
738
738
|
contents = {};
|
|
739
739
|
contents = deserializeAws_json1_1ListParallelDataResponse(data, context);
|
|
740
740
|
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
741
|
-
return [2
|
|
741
|
+
return [2, Promise.resolve(response)];
|
|
742
742
|
}
|
|
743
743
|
});
|
|
744
744
|
}); };
|
|
@@ -750,39 +750,39 @@ var deserializeAws_json1_1ListParallelDataCommandError = function (output, conte
|
|
|
750
750
|
case 0:
|
|
751
751
|
_a = [__assign({}, output)];
|
|
752
752
|
_f = {};
|
|
753
|
-
return [4
|
|
753
|
+
return [4, parseBody(output.body, context)];
|
|
754
754
|
case 1:
|
|
755
755
|
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
756
756
|
errorCode = "UnknownError";
|
|
757
757
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
758
758
|
_b = errorCode;
|
|
759
759
|
switch (_b) {
|
|
760
|
-
case "InternalServerException": return [3
|
|
761
|
-
case "com.amazonaws.translate#InternalServerException": return [3
|
|
762
|
-
case "InvalidParameterValueException": return [3
|
|
763
|
-
case "com.amazonaws.translate#InvalidParameterValueException": return [3
|
|
764
|
-
case "TooManyRequestsException": return [3
|
|
765
|
-
case "com.amazonaws.translate#TooManyRequestsException": return [3
|
|
760
|
+
case "InternalServerException": return [3, 2];
|
|
761
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 2];
|
|
762
|
+
case "InvalidParameterValueException": return [3, 4];
|
|
763
|
+
case "com.amazonaws.translate#InvalidParameterValueException": return [3, 4];
|
|
764
|
+
case "TooManyRequestsException": return [3, 6];
|
|
765
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 6];
|
|
766
766
|
}
|
|
767
|
-
return [3
|
|
767
|
+
return [3, 8];
|
|
768
768
|
case 2:
|
|
769
769
|
_c = [{}];
|
|
770
|
-
return [4
|
|
770
|
+
return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
771
771
|
case 3:
|
|
772
772
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
773
|
-
return [3
|
|
773
|
+
return [3, 9];
|
|
774
774
|
case 4:
|
|
775
775
|
_d = [{}];
|
|
776
|
-
return [4
|
|
776
|
+
return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
|
|
777
777
|
case 5:
|
|
778
778
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
779
|
-
return [3
|
|
779
|
+
return [3, 9];
|
|
780
780
|
case 6:
|
|
781
781
|
_e = [{}];
|
|
782
|
-
return [4
|
|
782
|
+
return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
783
783
|
case 7:
|
|
784
784
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
785
|
-
return [3
|
|
785
|
+
return [3, 9];
|
|
786
786
|
case 8:
|
|
787
787
|
parsedBody = parsedOutput.body;
|
|
788
788
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -792,7 +792,7 @@ var deserializeAws_json1_1ListParallelDataCommandError = function (output, conte
|
|
|
792
792
|
message = response.message || response.Message || errorCode;
|
|
793
793
|
response.message = message;
|
|
794
794
|
delete response.Message;
|
|
795
|
-
return [2
|
|
795
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
796
796
|
}
|
|
797
797
|
});
|
|
798
798
|
}); };
|
|
@@ -802,15 +802,15 @@ export var deserializeAws_json1_1ListTerminologiesCommand = function (output, co
|
|
|
802
802
|
switch (_a.label) {
|
|
803
803
|
case 0:
|
|
804
804
|
if (output.statusCode >= 300) {
|
|
805
|
-
return [2
|
|
805
|
+
return [2, deserializeAws_json1_1ListTerminologiesCommandError(output, context)];
|
|
806
806
|
}
|
|
807
|
-
return [4
|
|
807
|
+
return [4, parseBody(output.body, context)];
|
|
808
808
|
case 1:
|
|
809
809
|
data = _a.sent();
|
|
810
810
|
contents = {};
|
|
811
811
|
contents = deserializeAws_json1_1ListTerminologiesResponse(data, context);
|
|
812
812
|
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
813
|
-
return [2
|
|
813
|
+
return [2, Promise.resolve(response)];
|
|
814
814
|
}
|
|
815
815
|
});
|
|
816
816
|
}); };
|
|
@@ -822,39 +822,39 @@ var deserializeAws_json1_1ListTerminologiesCommandError = function (output, cont
|
|
|
822
822
|
case 0:
|
|
823
823
|
_a = [__assign({}, output)];
|
|
824
824
|
_f = {};
|
|
825
|
-
return [4
|
|
825
|
+
return [4, parseBody(output.body, context)];
|
|
826
826
|
case 1:
|
|
827
827
|
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
828
828
|
errorCode = "UnknownError";
|
|
829
829
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
830
830
|
_b = errorCode;
|
|
831
831
|
switch (_b) {
|
|
832
|
-
case "InternalServerException": return [3
|
|
833
|
-
case "com.amazonaws.translate#InternalServerException": return [3
|
|
834
|
-
case "InvalidParameterValueException": return [3
|
|
835
|
-
case "com.amazonaws.translate#InvalidParameterValueException": return [3
|
|
836
|
-
case "TooManyRequestsException": return [3
|
|
837
|
-
case "com.amazonaws.translate#TooManyRequestsException": return [3
|
|
832
|
+
case "InternalServerException": return [3, 2];
|
|
833
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 2];
|
|
834
|
+
case "InvalidParameterValueException": return [3, 4];
|
|
835
|
+
case "com.amazonaws.translate#InvalidParameterValueException": return [3, 4];
|
|
836
|
+
case "TooManyRequestsException": return [3, 6];
|
|
837
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 6];
|
|
838
838
|
}
|
|
839
|
-
return [3
|
|
839
|
+
return [3, 8];
|
|
840
840
|
case 2:
|
|
841
841
|
_c = [{}];
|
|
842
|
-
return [4
|
|
842
|
+
return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
843
843
|
case 3:
|
|
844
844
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
845
|
-
return [3
|
|
845
|
+
return [3, 9];
|
|
846
846
|
case 4:
|
|
847
847
|
_d = [{}];
|
|
848
|
-
return [4
|
|
848
|
+
return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
|
|
849
849
|
case 5:
|
|
850
850
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
851
|
-
return [3
|
|
851
|
+
return [3, 9];
|
|
852
852
|
case 6:
|
|
853
853
|
_e = [{}];
|
|
854
|
-
return [4
|
|
854
|
+
return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
855
855
|
case 7:
|
|
856
856
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
857
|
-
return [3
|
|
857
|
+
return [3, 9];
|
|
858
858
|
case 8:
|
|
859
859
|
parsedBody = parsedOutput.body;
|
|
860
860
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -864,7 +864,7 @@ var deserializeAws_json1_1ListTerminologiesCommandError = function (output, cont
|
|
|
864
864
|
message = response.message || response.Message || errorCode;
|
|
865
865
|
response.message = message;
|
|
866
866
|
delete response.Message;
|
|
867
|
-
return [2
|
|
867
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
868
868
|
}
|
|
869
869
|
});
|
|
870
870
|
}); };
|
|
@@ -874,15 +874,15 @@ export var deserializeAws_json1_1ListTextTranslationJobsCommand = function (outp
|
|
|
874
874
|
switch (_a.label) {
|
|
875
875
|
case 0:
|
|
876
876
|
if (output.statusCode >= 300) {
|
|
877
|
-
return [2
|
|
877
|
+
return [2, deserializeAws_json1_1ListTextTranslationJobsCommandError(output, context)];
|
|
878
878
|
}
|
|
879
|
-
return [4
|
|
879
|
+
return [4, parseBody(output.body, context)];
|
|
880
880
|
case 1:
|
|
881
881
|
data = _a.sent();
|
|
882
882
|
contents = {};
|
|
883
883
|
contents = deserializeAws_json1_1ListTextTranslationJobsResponse(data, context);
|
|
884
884
|
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
885
|
-
return [2
|
|
885
|
+
return [2, Promise.resolve(response)];
|
|
886
886
|
}
|
|
887
887
|
});
|
|
888
888
|
}); };
|
|
@@ -894,47 +894,47 @@ var deserializeAws_json1_1ListTextTranslationJobsCommandError = function (output
|
|
|
894
894
|
case 0:
|
|
895
895
|
_a = [__assign({}, output)];
|
|
896
896
|
_g = {};
|
|
897
|
-
return [4
|
|
897
|
+
return [4, parseBody(output.body, context)];
|
|
898
898
|
case 1:
|
|
899
899
|
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
900
900
|
errorCode = "UnknownError";
|
|
901
901
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
902
902
|
_b = errorCode;
|
|
903
903
|
switch (_b) {
|
|
904
|
-
case "InternalServerException": return [3
|
|
905
|
-
case "com.amazonaws.translate#InternalServerException": return [3
|
|
906
|
-
case "InvalidFilterException": return [3
|
|
907
|
-
case "com.amazonaws.translate#InvalidFilterException": return [3
|
|
908
|
-
case "InvalidRequestException": return [3
|
|
909
|
-
case "com.amazonaws.translate#InvalidRequestException": return [3
|
|
910
|
-
case "TooManyRequestsException": return [3
|
|
911
|
-
case "com.amazonaws.translate#TooManyRequestsException": return [3
|
|
904
|
+
case "InternalServerException": return [3, 2];
|
|
905
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 2];
|
|
906
|
+
case "InvalidFilterException": return [3, 4];
|
|
907
|
+
case "com.amazonaws.translate#InvalidFilterException": return [3, 4];
|
|
908
|
+
case "InvalidRequestException": return [3, 6];
|
|
909
|
+
case "com.amazonaws.translate#InvalidRequestException": return [3, 6];
|
|
910
|
+
case "TooManyRequestsException": return [3, 8];
|
|
911
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 8];
|
|
912
912
|
}
|
|
913
|
-
return [3
|
|
913
|
+
return [3, 10];
|
|
914
914
|
case 2:
|
|
915
915
|
_c = [{}];
|
|
916
|
-
return [4
|
|
916
|
+
return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
917
917
|
case 3:
|
|
918
918
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
919
|
-
return [3
|
|
919
|
+
return [3, 11];
|
|
920
920
|
case 4:
|
|
921
921
|
_d = [{}];
|
|
922
|
-
return [4
|
|
922
|
+
return [4, deserializeAws_json1_1InvalidFilterExceptionResponse(parsedOutput, context)];
|
|
923
923
|
case 5:
|
|
924
924
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
925
|
-
return [3
|
|
925
|
+
return [3, 11];
|
|
926
926
|
case 6:
|
|
927
927
|
_e = [{}];
|
|
928
|
-
return [4
|
|
928
|
+
return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
929
929
|
case 7:
|
|
930
930
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
931
|
-
return [3
|
|
931
|
+
return [3, 11];
|
|
932
932
|
case 8:
|
|
933
933
|
_f = [{}];
|
|
934
|
-
return [4
|
|
934
|
+
return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
935
935
|
case 9:
|
|
936
936
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
937
|
-
return [3
|
|
937
|
+
return [3, 11];
|
|
938
938
|
case 10:
|
|
939
939
|
parsedBody = parsedOutput.body;
|
|
940
940
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -944,7 +944,7 @@ var deserializeAws_json1_1ListTextTranslationJobsCommandError = function (output
|
|
|
944
944
|
message = response.message || response.Message || errorCode;
|
|
945
945
|
response.message = message;
|
|
946
946
|
delete response.Message;
|
|
947
|
-
return [2
|
|
947
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
948
948
|
}
|
|
949
949
|
});
|
|
950
950
|
}); };
|
|
@@ -954,15 +954,15 @@ export var deserializeAws_json1_1StartTextTranslationJobCommand = function (outp
|
|
|
954
954
|
switch (_a.label) {
|
|
955
955
|
case 0:
|
|
956
956
|
if (output.statusCode >= 300) {
|
|
957
|
-
return [2
|
|
957
|
+
return [2, deserializeAws_json1_1StartTextTranslationJobCommandError(output, context)];
|
|
958
958
|
}
|
|
959
|
-
return [4
|
|
959
|
+
return [4, parseBody(output.body, context)];
|
|
960
960
|
case 1:
|
|
961
961
|
data = _a.sent();
|
|
962
962
|
contents = {};
|
|
963
963
|
contents = deserializeAws_json1_1StartTextTranslationJobResponse(data, context);
|
|
964
964
|
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
965
|
-
return [2
|
|
965
|
+
return [2, Promise.resolve(response)];
|
|
966
966
|
}
|
|
967
967
|
});
|
|
968
968
|
}); };
|
|
@@ -974,55 +974,55 @@ var deserializeAws_json1_1StartTextTranslationJobCommandError = function (output
|
|
|
974
974
|
case 0:
|
|
975
975
|
_a = [__assign({}, output)];
|
|
976
976
|
_h = {};
|
|
977
|
-
return [4
|
|
977
|
+
return [4, parseBody(output.body, context)];
|
|
978
978
|
case 1:
|
|
979
979
|
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
980
980
|
errorCode = "UnknownError";
|
|
981
981
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
982
982
|
_b = errorCode;
|
|
983
983
|
switch (_b) {
|
|
984
|
-
case "InternalServerException": return [3
|
|
985
|
-
case "com.amazonaws.translate#InternalServerException": return [3
|
|
986
|
-
case "InvalidRequestException": return [3
|
|
987
|
-
case "com.amazonaws.translate#InvalidRequestException": return [3
|
|
988
|
-
case "ResourceNotFoundException": return [3
|
|
989
|
-
case "com.amazonaws.translate#ResourceNotFoundException": return [3
|
|
990
|
-
case "TooManyRequestsException": return [3
|
|
991
|
-
case "com.amazonaws.translate#TooManyRequestsException": return [3
|
|
992
|
-
case "UnsupportedLanguagePairException": return [3
|
|
993
|
-
case "com.amazonaws.translate#UnsupportedLanguagePairException": return [3
|
|
984
|
+
case "InternalServerException": return [3, 2];
|
|
985
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 2];
|
|
986
|
+
case "InvalidRequestException": return [3, 4];
|
|
987
|
+
case "com.amazonaws.translate#InvalidRequestException": return [3, 4];
|
|
988
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
989
|
+
case "com.amazonaws.translate#ResourceNotFoundException": return [3, 6];
|
|
990
|
+
case "TooManyRequestsException": return [3, 8];
|
|
991
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 8];
|
|
992
|
+
case "UnsupportedLanguagePairException": return [3, 10];
|
|
993
|
+
case "com.amazonaws.translate#UnsupportedLanguagePairException": return [3, 10];
|
|
994
994
|
}
|
|
995
|
-
return [3
|
|
995
|
+
return [3, 12];
|
|
996
996
|
case 2:
|
|
997
997
|
_c = [{}];
|
|
998
|
-
return [4
|
|
998
|
+
return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
999
999
|
case 3:
|
|
1000
1000
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1001
|
-
return [3
|
|
1001
|
+
return [3, 13];
|
|
1002
1002
|
case 4:
|
|
1003
1003
|
_d = [{}];
|
|
1004
|
-
return [4
|
|
1004
|
+
return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
1005
1005
|
case 5:
|
|
1006
1006
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1007
|
-
return [3
|
|
1007
|
+
return [3, 13];
|
|
1008
1008
|
case 6:
|
|
1009
1009
|
_e = [{}];
|
|
1010
|
-
return [4
|
|
1010
|
+
return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1011
1011
|
case 7:
|
|
1012
1012
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1013
|
-
return [3
|
|
1013
|
+
return [3, 13];
|
|
1014
1014
|
case 8:
|
|
1015
1015
|
_f = [{}];
|
|
1016
|
-
return [4
|
|
1016
|
+
return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
1017
1017
|
case 9:
|
|
1018
1018
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1019
|
-
return [3
|
|
1019
|
+
return [3, 13];
|
|
1020
1020
|
case 10:
|
|
1021
1021
|
_g = [{}];
|
|
1022
|
-
return [4
|
|
1022
|
+
return [4, deserializeAws_json1_1UnsupportedLanguagePairExceptionResponse(parsedOutput, context)];
|
|
1023
1023
|
case 11:
|
|
1024
1024
|
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1025
|
-
return [3
|
|
1025
|
+
return [3, 13];
|
|
1026
1026
|
case 12:
|
|
1027
1027
|
parsedBody = parsedOutput.body;
|
|
1028
1028
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -1032,7 +1032,7 @@ var deserializeAws_json1_1StartTextTranslationJobCommandError = function (output
|
|
|
1032
1032
|
message = response.message || response.Message || errorCode;
|
|
1033
1033
|
response.message = message;
|
|
1034
1034
|
delete response.Message;
|
|
1035
|
-
return [2
|
|
1035
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1036
1036
|
}
|
|
1037
1037
|
});
|
|
1038
1038
|
}); };
|
|
@@ -1042,15 +1042,15 @@ export var deserializeAws_json1_1StopTextTranslationJobCommand = function (outpu
|
|
|
1042
1042
|
switch (_a.label) {
|
|
1043
1043
|
case 0:
|
|
1044
1044
|
if (output.statusCode >= 300) {
|
|
1045
|
-
return [2
|
|
1045
|
+
return [2, deserializeAws_json1_1StopTextTranslationJobCommandError(output, context)];
|
|
1046
1046
|
}
|
|
1047
|
-
return [4
|
|
1047
|
+
return [4, parseBody(output.body, context)];
|
|
1048
1048
|
case 1:
|
|
1049
1049
|
data = _a.sent();
|
|
1050
1050
|
contents = {};
|
|
1051
1051
|
contents = deserializeAws_json1_1StopTextTranslationJobResponse(data, context);
|
|
1052
1052
|
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1053
|
-
return [2
|
|
1053
|
+
return [2, Promise.resolve(response)];
|
|
1054
1054
|
}
|
|
1055
1055
|
});
|
|
1056
1056
|
}); };
|
|
@@ -1062,39 +1062,39 @@ var deserializeAws_json1_1StopTextTranslationJobCommandError = function (output,
|
|
|
1062
1062
|
case 0:
|
|
1063
1063
|
_a = [__assign({}, output)];
|
|
1064
1064
|
_f = {};
|
|
1065
|
-
return [4
|
|
1065
|
+
return [4, parseBody(output.body, context)];
|
|
1066
1066
|
case 1:
|
|
1067
1067
|
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
1068
1068
|
errorCode = "UnknownError";
|
|
1069
1069
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1070
1070
|
_b = errorCode;
|
|
1071
1071
|
switch (_b) {
|
|
1072
|
-
case "InternalServerException": return [3
|
|
1073
|
-
case "com.amazonaws.translate#InternalServerException": return [3
|
|
1074
|
-
case "ResourceNotFoundException": return [3
|
|
1075
|
-
case "com.amazonaws.translate#ResourceNotFoundException": return [3
|
|
1076
|
-
case "TooManyRequestsException": return [3
|
|
1077
|
-
case "com.amazonaws.translate#TooManyRequestsException": return [3
|
|
1072
|
+
case "InternalServerException": return [3, 2];
|
|
1073
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 2];
|
|
1074
|
+
case "ResourceNotFoundException": return [3, 4];
|
|
1075
|
+
case "com.amazonaws.translate#ResourceNotFoundException": return [3, 4];
|
|
1076
|
+
case "TooManyRequestsException": return [3, 6];
|
|
1077
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 6];
|
|
1078
1078
|
}
|
|
1079
|
-
return [3
|
|
1079
|
+
return [3, 8];
|
|
1080
1080
|
case 2:
|
|
1081
1081
|
_c = [{}];
|
|
1082
|
-
return [4
|
|
1082
|
+
return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1083
1083
|
case 3:
|
|
1084
1084
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1085
|
-
return [3
|
|
1085
|
+
return [3, 9];
|
|
1086
1086
|
case 4:
|
|
1087
1087
|
_d = [{}];
|
|
1088
|
-
return [4
|
|
1088
|
+
return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1089
1089
|
case 5:
|
|
1090
1090
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1091
|
-
return [3
|
|
1091
|
+
return [3, 9];
|
|
1092
1092
|
case 6:
|
|
1093
1093
|
_e = [{}];
|
|
1094
|
-
return [4
|
|
1094
|
+
return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
1095
1095
|
case 7:
|
|
1096
1096
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1097
|
-
return [3
|
|
1097
|
+
return [3, 9];
|
|
1098
1098
|
case 8:
|
|
1099
1099
|
parsedBody = parsedOutput.body;
|
|
1100
1100
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -1104,7 +1104,7 @@ var deserializeAws_json1_1StopTextTranslationJobCommandError = function (output,
|
|
|
1104
1104
|
message = response.message || response.Message || errorCode;
|
|
1105
1105
|
response.message = message;
|
|
1106
1106
|
delete response.Message;
|
|
1107
|
-
return [2
|
|
1107
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1108
1108
|
}
|
|
1109
1109
|
});
|
|
1110
1110
|
}); };
|
|
@@ -1114,15 +1114,15 @@ export var deserializeAws_json1_1TranslateTextCommand = function (output, contex
|
|
|
1114
1114
|
switch (_a.label) {
|
|
1115
1115
|
case 0:
|
|
1116
1116
|
if (output.statusCode >= 300) {
|
|
1117
|
-
return [2
|
|
1117
|
+
return [2, deserializeAws_json1_1TranslateTextCommandError(output, context)];
|
|
1118
1118
|
}
|
|
1119
|
-
return [4
|
|
1119
|
+
return [4, parseBody(output.body, context)];
|
|
1120
1120
|
case 1:
|
|
1121
1121
|
data = _a.sent();
|
|
1122
1122
|
contents = {};
|
|
1123
1123
|
contents = deserializeAws_json1_1TranslateTextResponse(data, context);
|
|
1124
1124
|
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1125
|
-
return [2
|
|
1125
|
+
return [2, Promise.resolve(response)];
|
|
1126
1126
|
}
|
|
1127
1127
|
});
|
|
1128
1128
|
}); };
|
|
@@ -1134,79 +1134,79 @@ var deserializeAws_json1_1TranslateTextCommandError = function (output, context)
|
|
|
1134
1134
|
case 0:
|
|
1135
1135
|
_a = [__assign({}, output)];
|
|
1136
1136
|
_l = {};
|
|
1137
|
-
return [4
|
|
1137
|
+
return [4, parseBody(output.body, context)];
|
|
1138
1138
|
case 1:
|
|
1139
1139
|
parsedOutput = __assign.apply(void 0, _a.concat([(_l.body = _m.sent(), _l)]));
|
|
1140
1140
|
errorCode = "UnknownError";
|
|
1141
1141
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1142
1142
|
_b = errorCode;
|
|
1143
1143
|
switch (_b) {
|
|
1144
|
-
case "DetectedLanguageLowConfidenceException": return [3
|
|
1145
|
-
case "com.amazonaws.translate#DetectedLanguageLowConfidenceException": return [3
|
|
1146
|
-
case "InternalServerException": return [3
|
|
1147
|
-
case "com.amazonaws.translate#InternalServerException": return [3
|
|
1148
|
-
case "InvalidRequestException": return [3
|
|
1149
|
-
case "com.amazonaws.translate#InvalidRequestException": return [3
|
|
1150
|
-
case "ResourceNotFoundException": return [3
|
|
1151
|
-
case "com.amazonaws.translate#ResourceNotFoundException": return [3
|
|
1152
|
-
case "ServiceUnavailableException": return [3
|
|
1153
|
-
case "com.amazonaws.translate#ServiceUnavailableException": return [3
|
|
1154
|
-
case "TextSizeLimitExceededException": return [3
|
|
1155
|
-
case "com.amazonaws.translate#TextSizeLimitExceededException": return [3
|
|
1156
|
-
case "TooManyRequestsException": return [3
|
|
1157
|
-
case "com.amazonaws.translate#TooManyRequestsException": return [3
|
|
1158
|
-
case "UnsupportedLanguagePairException": return [3
|
|
1159
|
-
case "com.amazonaws.translate#UnsupportedLanguagePairException": return [3
|
|
1144
|
+
case "DetectedLanguageLowConfidenceException": return [3, 2];
|
|
1145
|
+
case "com.amazonaws.translate#DetectedLanguageLowConfidenceException": return [3, 2];
|
|
1146
|
+
case "InternalServerException": return [3, 4];
|
|
1147
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 4];
|
|
1148
|
+
case "InvalidRequestException": return [3, 6];
|
|
1149
|
+
case "com.amazonaws.translate#InvalidRequestException": return [3, 6];
|
|
1150
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
1151
|
+
case "com.amazonaws.translate#ResourceNotFoundException": return [3, 8];
|
|
1152
|
+
case "ServiceUnavailableException": return [3, 10];
|
|
1153
|
+
case "com.amazonaws.translate#ServiceUnavailableException": return [3, 10];
|
|
1154
|
+
case "TextSizeLimitExceededException": return [3, 12];
|
|
1155
|
+
case "com.amazonaws.translate#TextSizeLimitExceededException": return [3, 12];
|
|
1156
|
+
case "TooManyRequestsException": return [3, 14];
|
|
1157
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 14];
|
|
1158
|
+
case "UnsupportedLanguagePairException": return [3, 16];
|
|
1159
|
+
case "com.amazonaws.translate#UnsupportedLanguagePairException": return [3, 16];
|
|
1160
1160
|
}
|
|
1161
|
-
return [3
|
|
1161
|
+
return [3, 18];
|
|
1162
1162
|
case 2:
|
|
1163
1163
|
_c = [{}];
|
|
1164
|
-
return [4
|
|
1164
|
+
return [4, deserializeAws_json1_1DetectedLanguageLowConfidenceExceptionResponse(parsedOutput, context)];
|
|
1165
1165
|
case 3:
|
|
1166
1166
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1167
|
-
return [3
|
|
1167
|
+
return [3, 19];
|
|
1168
1168
|
case 4:
|
|
1169
1169
|
_d = [{}];
|
|
1170
|
-
return [4
|
|
1170
|
+
return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1171
1171
|
case 5:
|
|
1172
1172
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1173
|
-
return [3
|
|
1173
|
+
return [3, 19];
|
|
1174
1174
|
case 6:
|
|
1175
1175
|
_e = [{}];
|
|
1176
|
-
return [4
|
|
1176
|
+
return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
1177
1177
|
case 7:
|
|
1178
1178
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1179
|
-
return [3
|
|
1179
|
+
return [3, 19];
|
|
1180
1180
|
case 8:
|
|
1181
1181
|
_f = [{}];
|
|
1182
|
-
return [4
|
|
1182
|
+
return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1183
1183
|
case 9:
|
|
1184
1184
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1185
|
-
return [3
|
|
1185
|
+
return [3, 19];
|
|
1186
1186
|
case 10:
|
|
1187
1187
|
_g = [{}];
|
|
1188
|
-
return [4
|
|
1188
|
+
return [4, deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
1189
1189
|
case 11:
|
|
1190
1190
|
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1191
|
-
return [3
|
|
1191
|
+
return [3, 19];
|
|
1192
1192
|
case 12:
|
|
1193
1193
|
_h = [{}];
|
|
1194
|
-
return [4
|
|
1194
|
+
return [4, deserializeAws_json1_1TextSizeLimitExceededExceptionResponse(parsedOutput, context)];
|
|
1195
1195
|
case 13:
|
|
1196
1196
|
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1197
|
-
return [3
|
|
1197
|
+
return [3, 19];
|
|
1198
1198
|
case 14:
|
|
1199
1199
|
_j = [{}];
|
|
1200
|
-
return [4
|
|
1200
|
+
return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
1201
1201
|
case 15:
|
|
1202
1202
|
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1203
|
-
return [3
|
|
1203
|
+
return [3, 19];
|
|
1204
1204
|
case 16:
|
|
1205
1205
|
_k = [{}];
|
|
1206
|
-
return [4
|
|
1206
|
+
return [4, deserializeAws_json1_1UnsupportedLanguagePairExceptionResponse(parsedOutput, context)];
|
|
1207
1207
|
case 17:
|
|
1208
1208
|
response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1209
|
-
return [3
|
|
1209
|
+
return [3, 19];
|
|
1210
1210
|
case 18:
|
|
1211
1211
|
parsedBody = parsedOutput.body;
|
|
1212
1212
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -1216,7 +1216,7 @@ var deserializeAws_json1_1TranslateTextCommandError = function (output, context)
|
|
|
1216
1216
|
message = response.message || response.Message || errorCode;
|
|
1217
1217
|
response.message = message;
|
|
1218
1218
|
delete response.Message;
|
|
1219
|
-
return [2
|
|
1219
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1220
1220
|
}
|
|
1221
1221
|
});
|
|
1222
1222
|
}); };
|
|
@@ -1226,15 +1226,15 @@ export var deserializeAws_json1_1UpdateParallelDataCommand = function (output, c
|
|
|
1226
1226
|
switch (_a.label) {
|
|
1227
1227
|
case 0:
|
|
1228
1228
|
if (output.statusCode >= 300) {
|
|
1229
|
-
return [2
|
|
1229
|
+
return [2, deserializeAws_json1_1UpdateParallelDataCommandError(output, context)];
|
|
1230
1230
|
}
|
|
1231
|
-
return [4
|
|
1231
|
+
return [4, parseBody(output.body, context)];
|
|
1232
1232
|
case 1:
|
|
1233
1233
|
data = _a.sent();
|
|
1234
1234
|
contents = {};
|
|
1235
1235
|
contents = deserializeAws_json1_1UpdateParallelDataResponse(data, context);
|
|
1236
1236
|
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1237
|
-
return [2
|
|
1237
|
+
return [2, Promise.resolve(response)];
|
|
1238
1238
|
}
|
|
1239
1239
|
});
|
|
1240
1240
|
}); };
|
|
@@ -1246,79 +1246,79 @@ var deserializeAws_json1_1UpdateParallelDataCommandError = function (output, con
|
|
|
1246
1246
|
case 0:
|
|
1247
1247
|
_a = [__assign({}, output)];
|
|
1248
1248
|
_l = {};
|
|
1249
|
-
return [4
|
|
1249
|
+
return [4, parseBody(output.body, context)];
|
|
1250
1250
|
case 1:
|
|
1251
1251
|
parsedOutput = __assign.apply(void 0, _a.concat([(_l.body = _m.sent(), _l)]));
|
|
1252
1252
|
errorCode = "UnknownError";
|
|
1253
1253
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1254
1254
|
_b = errorCode;
|
|
1255
1255
|
switch (_b) {
|
|
1256
|
-
case "ConcurrentModificationException": return [3
|
|
1257
|
-
case "com.amazonaws.translate#ConcurrentModificationException": return [3
|
|
1258
|
-
case "ConflictException": return [3
|
|
1259
|
-
case "com.amazonaws.translate#ConflictException": return [3
|
|
1260
|
-
case "InternalServerException": return [3
|
|
1261
|
-
case "com.amazonaws.translate#InternalServerException": return [3
|
|
1262
|
-
case "InvalidParameterValueException": return [3
|
|
1263
|
-
case "com.amazonaws.translate#InvalidParameterValueException": return [3
|
|
1264
|
-
case "InvalidRequestException": return [3
|
|
1265
|
-
case "com.amazonaws.translate#InvalidRequestException": return [3
|
|
1266
|
-
case "LimitExceededException": return [3
|
|
1267
|
-
case "com.amazonaws.translate#LimitExceededException": return [3
|
|
1268
|
-
case "ResourceNotFoundException": return [3
|
|
1269
|
-
case "com.amazonaws.translate#ResourceNotFoundException": return [3
|
|
1270
|
-
case "TooManyRequestsException": return [3
|
|
1271
|
-
case "com.amazonaws.translate#TooManyRequestsException": return [3
|
|
1256
|
+
case "ConcurrentModificationException": return [3, 2];
|
|
1257
|
+
case "com.amazonaws.translate#ConcurrentModificationException": return [3, 2];
|
|
1258
|
+
case "ConflictException": return [3, 4];
|
|
1259
|
+
case "com.amazonaws.translate#ConflictException": return [3, 4];
|
|
1260
|
+
case "InternalServerException": return [3, 6];
|
|
1261
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 6];
|
|
1262
|
+
case "InvalidParameterValueException": return [3, 8];
|
|
1263
|
+
case "com.amazonaws.translate#InvalidParameterValueException": return [3, 8];
|
|
1264
|
+
case "InvalidRequestException": return [3, 10];
|
|
1265
|
+
case "com.amazonaws.translate#InvalidRequestException": return [3, 10];
|
|
1266
|
+
case "LimitExceededException": return [3, 12];
|
|
1267
|
+
case "com.amazonaws.translate#LimitExceededException": return [3, 12];
|
|
1268
|
+
case "ResourceNotFoundException": return [3, 14];
|
|
1269
|
+
case "com.amazonaws.translate#ResourceNotFoundException": return [3, 14];
|
|
1270
|
+
case "TooManyRequestsException": return [3, 16];
|
|
1271
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 16];
|
|
1272
1272
|
}
|
|
1273
|
-
return [3
|
|
1273
|
+
return [3, 18];
|
|
1274
1274
|
case 2:
|
|
1275
1275
|
_c = [{}];
|
|
1276
|
-
return [4
|
|
1276
|
+
return [4, deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)];
|
|
1277
1277
|
case 3:
|
|
1278
1278
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1279
|
-
return [3
|
|
1279
|
+
return [3, 19];
|
|
1280
1280
|
case 4:
|
|
1281
1281
|
_d = [{}];
|
|
1282
|
-
return [4
|
|
1282
|
+
return [4, deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context)];
|
|
1283
1283
|
case 5:
|
|
1284
1284
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1285
|
-
return [3
|
|
1285
|
+
return [3, 19];
|
|
1286
1286
|
case 6:
|
|
1287
1287
|
_e = [{}];
|
|
1288
|
-
return [4
|
|
1288
|
+
return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1289
1289
|
case 7:
|
|
1290
1290
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1291
|
-
return [3
|
|
1291
|
+
return [3, 19];
|
|
1292
1292
|
case 8:
|
|
1293
1293
|
_f = [{}];
|
|
1294
|
-
return [4
|
|
1294
|
+
return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
|
|
1295
1295
|
case 9:
|
|
1296
1296
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1297
|
-
return [3
|
|
1297
|
+
return [3, 19];
|
|
1298
1298
|
case 10:
|
|
1299
1299
|
_g = [{}];
|
|
1300
|
-
return [4
|
|
1300
|
+
return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
1301
1301
|
case 11:
|
|
1302
1302
|
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1303
|
-
return [3
|
|
1303
|
+
return [3, 19];
|
|
1304
1304
|
case 12:
|
|
1305
1305
|
_h = [{}];
|
|
1306
|
-
return [4
|
|
1306
|
+
return [4, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
1307
1307
|
case 13:
|
|
1308
1308
|
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1309
|
-
return [3
|
|
1309
|
+
return [3, 19];
|
|
1310
1310
|
case 14:
|
|
1311
1311
|
_j = [{}];
|
|
1312
|
-
return [4
|
|
1312
|
+
return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1313
1313
|
case 15:
|
|
1314
1314
|
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1315
|
-
return [3
|
|
1315
|
+
return [3, 19];
|
|
1316
1316
|
case 16:
|
|
1317
1317
|
_k = [{}];
|
|
1318
|
-
return [4
|
|
1318
|
+
return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
1319
1319
|
case 17:
|
|
1320
1320
|
response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1321
|
-
return [3
|
|
1321
|
+
return [3, 19];
|
|
1322
1322
|
case 18:
|
|
1323
1323
|
parsedBody = parsedOutput.body;
|
|
1324
1324
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -1328,7 +1328,7 @@ var deserializeAws_json1_1UpdateParallelDataCommandError = function (output, con
|
|
|
1328
1328
|
message = response.message || response.Message || errorCode;
|
|
1329
1329
|
response.message = message;
|
|
1330
1330
|
delete response.Message;
|
|
1331
|
-
return [2
|
|
1331
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1332
1332
|
}
|
|
1333
1333
|
});
|
|
1334
1334
|
}); };
|
|
@@ -1338,7 +1338,7 @@ var deserializeAws_json1_1ConcurrentModificationExceptionResponse = function (pa
|
|
|
1338
1338
|
body = parsedOutput.body;
|
|
1339
1339
|
deserialized = deserializeAws_json1_1ConcurrentModificationException(body, context);
|
|
1340
1340
|
contents = __assign({ name: "ConcurrentModificationException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
|
|
1341
|
-
return [2
|
|
1341
|
+
return [2, contents];
|
|
1342
1342
|
});
|
|
1343
1343
|
}); };
|
|
1344
1344
|
var deserializeAws_json1_1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1347,7 +1347,7 @@ var deserializeAws_json1_1ConflictExceptionResponse = function (parsedOutput, co
|
|
|
1347
1347
|
body = parsedOutput.body;
|
|
1348
1348
|
deserialized = deserializeAws_json1_1ConflictException(body, context);
|
|
1349
1349
|
contents = __assign({ name: "ConflictException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
|
|
1350
|
-
return [2
|
|
1350
|
+
return [2, contents];
|
|
1351
1351
|
});
|
|
1352
1352
|
}); };
|
|
1353
1353
|
var deserializeAws_json1_1DetectedLanguageLowConfidenceExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1356,7 +1356,7 @@ var deserializeAws_json1_1DetectedLanguageLowConfidenceExceptionResponse = funct
|
|
|
1356
1356
|
body = parsedOutput.body;
|
|
1357
1357
|
deserialized = deserializeAws_json1_1DetectedLanguageLowConfidenceException(body, context);
|
|
1358
1358
|
contents = __assign({ name: "DetectedLanguageLowConfidenceException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
|
|
1359
|
-
return [2
|
|
1359
|
+
return [2, contents];
|
|
1360
1360
|
});
|
|
1361
1361
|
}); };
|
|
1362
1362
|
var deserializeAws_json1_1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1365,7 +1365,7 @@ var deserializeAws_json1_1InternalServerExceptionResponse = function (parsedOutp
|
|
|
1365
1365
|
body = parsedOutput.body;
|
|
1366
1366
|
deserialized = deserializeAws_json1_1InternalServerException(body, context);
|
|
1367
1367
|
contents = __assign({ name: "InternalServerException", $fault: "server", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
|
|
1368
|
-
return [2
|
|
1368
|
+
return [2, contents];
|
|
1369
1369
|
});
|
|
1370
1370
|
}); };
|
|
1371
1371
|
var deserializeAws_json1_1InvalidFilterExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1374,7 +1374,7 @@ var deserializeAws_json1_1InvalidFilterExceptionResponse = function (parsedOutpu
|
|
|
1374
1374
|
body = parsedOutput.body;
|
|
1375
1375
|
deserialized = deserializeAws_json1_1InvalidFilterException(body, context);
|
|
1376
1376
|
contents = __assign({ name: "InvalidFilterException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
|
|
1377
|
-
return [2
|
|
1377
|
+
return [2, contents];
|
|
1378
1378
|
});
|
|
1379
1379
|
}); };
|
|
1380
1380
|
var deserializeAws_json1_1InvalidParameterValueExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1383,7 +1383,7 @@ var deserializeAws_json1_1InvalidParameterValueExceptionResponse = function (par
|
|
|
1383
1383
|
body = parsedOutput.body;
|
|
1384
1384
|
deserialized = deserializeAws_json1_1InvalidParameterValueException(body, context);
|
|
1385
1385
|
contents = __assign({ name: "InvalidParameterValueException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
|
|
1386
|
-
return [2
|
|
1386
|
+
return [2, contents];
|
|
1387
1387
|
});
|
|
1388
1388
|
}); };
|
|
1389
1389
|
var deserializeAws_json1_1InvalidRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1392,7 +1392,7 @@ var deserializeAws_json1_1InvalidRequestExceptionResponse = function (parsedOutp
|
|
|
1392
1392
|
body = parsedOutput.body;
|
|
1393
1393
|
deserialized = deserializeAws_json1_1InvalidRequestException(body, context);
|
|
1394
1394
|
contents = __assign({ name: "InvalidRequestException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
|
|
1395
|
-
return [2
|
|
1395
|
+
return [2, contents];
|
|
1396
1396
|
});
|
|
1397
1397
|
}); };
|
|
1398
1398
|
var deserializeAws_json1_1LimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1401,7 +1401,7 @@ var deserializeAws_json1_1LimitExceededExceptionResponse = function (parsedOutpu
|
|
|
1401
1401
|
body = parsedOutput.body;
|
|
1402
1402
|
deserialized = deserializeAws_json1_1LimitExceededException(body, context);
|
|
1403
1403
|
contents = __assign({ name: "LimitExceededException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
|
|
1404
|
-
return [2
|
|
1404
|
+
return [2, contents];
|
|
1405
1405
|
});
|
|
1406
1406
|
}); };
|
|
1407
1407
|
var deserializeAws_json1_1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1410,7 +1410,7 @@ var deserializeAws_json1_1ResourceNotFoundExceptionResponse = function (parsedOu
|
|
|
1410
1410
|
body = parsedOutput.body;
|
|
1411
1411
|
deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);
|
|
1412
1412
|
contents = __assign({ name: "ResourceNotFoundException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
|
|
1413
|
-
return [2
|
|
1413
|
+
return [2, contents];
|
|
1414
1414
|
});
|
|
1415
1415
|
}); };
|
|
1416
1416
|
var deserializeAws_json1_1ServiceUnavailableExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1419,7 +1419,7 @@ var deserializeAws_json1_1ServiceUnavailableExceptionResponse = function (parsed
|
|
|
1419
1419
|
body = parsedOutput.body;
|
|
1420
1420
|
deserialized = deserializeAws_json1_1ServiceUnavailableException(body, context);
|
|
1421
1421
|
contents = __assign({ name: "ServiceUnavailableException", $fault: "server", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
|
|
1422
|
-
return [2
|
|
1422
|
+
return [2, contents];
|
|
1423
1423
|
});
|
|
1424
1424
|
}); };
|
|
1425
1425
|
var deserializeAws_json1_1TextSizeLimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1428,7 +1428,7 @@ var deserializeAws_json1_1TextSizeLimitExceededExceptionResponse = function (par
|
|
|
1428
1428
|
body = parsedOutput.body;
|
|
1429
1429
|
deserialized = deserializeAws_json1_1TextSizeLimitExceededException(body, context);
|
|
1430
1430
|
contents = __assign({ name: "TextSizeLimitExceededException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
|
|
1431
|
-
return [2
|
|
1431
|
+
return [2, contents];
|
|
1432
1432
|
});
|
|
1433
1433
|
}); };
|
|
1434
1434
|
var deserializeAws_json1_1TooManyRequestsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1437,7 +1437,7 @@ var deserializeAws_json1_1TooManyRequestsExceptionResponse = function (parsedOut
|
|
|
1437
1437
|
body = parsedOutput.body;
|
|
1438
1438
|
deserialized = deserializeAws_json1_1TooManyRequestsException(body, context);
|
|
1439
1439
|
contents = __assign({ name: "TooManyRequestsException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
|
|
1440
|
-
return [2
|
|
1440
|
+
return [2, contents];
|
|
1441
1441
|
});
|
|
1442
1442
|
}); };
|
|
1443
1443
|
var deserializeAws_json1_1UnsupportedLanguagePairExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1446,7 +1446,7 @@ var deserializeAws_json1_1UnsupportedLanguagePairExceptionResponse = function (p
|
|
|
1446
1446
|
body = parsedOutput.body;
|
|
1447
1447
|
deserialized = deserializeAws_json1_1UnsupportedLanguagePairException(body, context);
|
|
1448
1448
|
contents = __assign({ name: "UnsupportedLanguagePairException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
|
|
1449
|
-
return [2
|
|
1449
|
+
return [2, contents];
|
|
1450
1450
|
});
|
|
1451
1451
|
}); };
|
|
1452
1452
|
var serializeAws_json1_1CreateParallelDataRequest = function (input, context) {
|
|
@@ -1763,7 +1763,7 @@ var deserializeAws_json1_1ParallelDataProperties = function (output, context) {
|
|
|
1763
1763
|
return {
|
|
1764
1764
|
Arn: __expectString(output.Arn),
|
|
1765
1765
|
CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
|
|
1766
|
-
?
|
|
1766
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
|
|
1767
1767
|
: undefined,
|
|
1768
1768
|
Description: __expectString(output.Description),
|
|
1769
1769
|
EncryptionKey: output.EncryptionKey !== undefined && output.EncryptionKey !== null
|
|
@@ -1773,10 +1773,10 @@ var deserializeAws_json1_1ParallelDataProperties = function (output, context) {
|
|
|
1773
1773
|
ImportedDataSize: __expectLong(output.ImportedDataSize),
|
|
1774
1774
|
ImportedRecordCount: __expectLong(output.ImportedRecordCount),
|
|
1775
1775
|
LastUpdatedAt: output.LastUpdatedAt !== undefined && output.LastUpdatedAt !== null
|
|
1776
|
-
?
|
|
1776
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedAt)))
|
|
1777
1777
|
: undefined,
|
|
1778
1778
|
LatestUpdateAttemptAt: output.LatestUpdateAttemptAt !== undefined && output.LatestUpdateAttemptAt !== null
|
|
1779
|
-
?
|
|
1779
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LatestUpdateAttemptAt)))
|
|
1780
1780
|
: undefined,
|
|
1781
1781
|
LatestUpdateAttemptStatus: __expectString(output.LatestUpdateAttemptStatus),
|
|
1782
1782
|
Message: __expectString(output.Message),
|
|
@@ -1860,14 +1860,14 @@ var deserializeAws_json1_1TerminologyProperties = function (output, context) {
|
|
|
1860
1860
|
return {
|
|
1861
1861
|
Arn: __expectString(output.Arn),
|
|
1862
1862
|
CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
|
|
1863
|
-
?
|
|
1863
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
|
|
1864
1864
|
: undefined,
|
|
1865
1865
|
Description: __expectString(output.Description),
|
|
1866
1866
|
EncryptionKey: output.EncryptionKey !== undefined && output.EncryptionKey !== null
|
|
1867
1867
|
? deserializeAws_json1_1EncryptionKey(output.EncryptionKey, context)
|
|
1868
1868
|
: undefined,
|
|
1869
1869
|
LastUpdatedAt: output.LastUpdatedAt !== undefined && output.LastUpdatedAt !== null
|
|
1870
|
-
?
|
|
1870
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedAt)))
|
|
1871
1871
|
: undefined,
|
|
1872
1872
|
Name: __expectString(output.Name),
|
|
1873
1873
|
SizeBytes: __expectInt32(output.SizeBytes),
|
|
@@ -1906,7 +1906,9 @@ var deserializeAws_json1_1TextSizeLimitExceededException = function (output, con
|
|
|
1906
1906
|
var deserializeAws_json1_1TextTranslationJobProperties = function (output, context) {
|
|
1907
1907
|
return {
|
|
1908
1908
|
DataAccessRoleArn: __expectString(output.DataAccessRoleArn),
|
|
1909
|
-
EndTime: output.EndTime !== undefined && output.EndTime !== null
|
|
1909
|
+
EndTime: output.EndTime !== undefined && output.EndTime !== null
|
|
1910
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime)))
|
|
1911
|
+
: undefined,
|
|
1910
1912
|
InputDataConfig: output.InputDataConfig !== undefined && output.InputDataConfig !== null
|
|
1911
1913
|
? deserializeAws_json1_1InputDataConfig(output.InputDataConfig, context)
|
|
1912
1914
|
: undefined,
|
|
@@ -1925,7 +1927,7 @@ var deserializeAws_json1_1TextTranslationJobProperties = function (output, conte
|
|
|
1925
1927
|
: undefined,
|
|
1926
1928
|
SourceLanguageCode: __expectString(output.SourceLanguageCode),
|
|
1927
1929
|
SubmittedTime: output.SubmittedTime !== undefined && output.SubmittedTime !== null
|
|
1928
|
-
?
|
|
1930
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmittedTime)))
|
|
1929
1931
|
: undefined,
|
|
1930
1932
|
TargetLanguageCodes: output.TargetLanguageCodes !== undefined && output.TargetLanguageCodes !== null
|
|
1931
1933
|
? deserializeAws_json1_1TargetLanguageCodeStringList(output.TargetLanguageCodes, context)
|
|
@@ -1970,7 +1972,7 @@ var deserializeAws_json1_1UnsupportedLanguagePairException = function (output, c
|
|
|
1970
1972
|
var deserializeAws_json1_1UpdateParallelDataResponse = function (output, context) {
|
|
1971
1973
|
return {
|
|
1972
1974
|
LatestUpdateAttemptAt: output.LatestUpdateAttemptAt !== undefined && output.LatestUpdateAttemptAt !== null
|
|
1973
|
-
?
|
|
1975
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LatestUpdateAttemptAt)))
|
|
1974
1976
|
: undefined,
|
|
1975
1977
|
LatestUpdateAttemptStatus: __expectString(output.LatestUpdateAttemptStatus),
|
|
1976
1978
|
Name: __expectString(output.Name),
|
|
@@ -1986,7 +1988,6 @@ var deserializeMetadata = function (output) {
|
|
|
1986
1988
|
cfId: output.headers["x-amz-cf-id"],
|
|
1987
1989
|
});
|
|
1988
1990
|
};
|
|
1989
|
-
// Collect low-level response body stream to Uint8Array.
|
|
1990
1991
|
var collectBody = function (streamBody, context) {
|
|
1991
1992
|
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1992
1993
|
if (streamBody instanceof Uint8Array) {
|
|
@@ -1994,7 +1995,6 @@ var collectBody = function (streamBody, context) {
|
|
|
1994
1995
|
}
|
|
1995
1996
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1996
1997
|
};
|
|
1997
|
-
// Encode Uint8Array data into string with utf-8.
|
|
1998
1998
|
var collectBodyString = function (streamBody, context) {
|
|
1999
1999
|
return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
|
|
2000
2000
|
};
|
|
@@ -2002,7 +2002,7 @@ var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, bo
|
|
|
2002
2002
|
var _a, hostname, _b, protocol, port, basePath, contents;
|
|
2003
2003
|
return __generator(this, function (_c) {
|
|
2004
2004
|
switch (_c.label) {
|
|
2005
|
-
case 0: return [4
|
|
2005
|
+
case 0: return [4, context.endpoint()];
|
|
2006
2006
|
case 1:
|
|
2007
2007
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
2008
2008
|
contents = {
|
|
@@ -2019,7 +2019,7 @@ var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, bo
|
|
|
2019
2019
|
if (body !== undefined) {
|
|
2020
2020
|
contents.body = body;
|
|
2021
2021
|
}
|
|
2022
|
-
return [2
|
|
2022
|
+
return [2, new __HttpRequest(contents)];
|
|
2023
2023
|
}
|
|
2024
2024
|
});
|
|
2025
2025
|
}); };
|
|
@@ -2031,9 +2031,6 @@ var parseBody = function (streamBody, context) {
|
|
|
2031
2031
|
return {};
|
|
2032
2032
|
});
|
|
2033
2033
|
};
|
|
2034
|
-
/**
|
|
2035
|
-
* Load an error code for the aws.rest-json-1.1 protocol.
|
|
2036
|
-
*/
|
|
2037
2034
|
var loadRestJsonErrorCode = function (output, data) {
|
|
2038
2035
|
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
2039
2036
|
var sanitizeErrorCode = function (rawValue) {
|