@aws-sdk/client-machine-learning 3.183.0 → 3.185.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist-cjs/protocols/Aws_json1_1.js +2 -2
  3. package/dist-es/MachineLearning.js +121 -114
  4. package/dist-es/MachineLearningClient.js +28 -22
  5. package/dist-es/commands/AddTagsCommand.js +28 -21
  6. package/dist-es/commands/CreateBatchPredictionCommand.js +28 -21
  7. package/dist-es/commands/CreateDataSourceFromRDSCommand.js +28 -21
  8. package/dist-es/commands/CreateDataSourceFromRedshiftCommand.js +28 -21
  9. package/dist-es/commands/CreateDataSourceFromS3Command.js +28 -21
  10. package/dist-es/commands/CreateEvaluationCommand.js +28 -21
  11. package/dist-es/commands/CreateMLModelCommand.js +28 -21
  12. package/dist-es/commands/CreateRealtimeEndpointCommand.js +28 -21
  13. package/dist-es/commands/DeleteBatchPredictionCommand.js +28 -21
  14. package/dist-es/commands/DeleteDataSourceCommand.js +28 -21
  15. package/dist-es/commands/DeleteEvaluationCommand.js +28 -21
  16. package/dist-es/commands/DeleteMLModelCommand.js +28 -21
  17. package/dist-es/commands/DeleteRealtimeEndpointCommand.js +28 -21
  18. package/dist-es/commands/DeleteTagsCommand.js +28 -21
  19. package/dist-es/commands/DescribeBatchPredictionsCommand.js +28 -21
  20. package/dist-es/commands/DescribeDataSourcesCommand.js +28 -21
  21. package/dist-es/commands/DescribeEvaluationsCommand.js +28 -21
  22. package/dist-es/commands/DescribeMLModelsCommand.js +28 -21
  23. package/dist-es/commands/DescribeTagsCommand.js +28 -21
  24. package/dist-es/commands/GetBatchPredictionCommand.js +28 -21
  25. package/dist-es/commands/GetDataSourceCommand.js +28 -21
  26. package/dist-es/commands/GetEvaluationCommand.js +28 -21
  27. package/dist-es/commands/GetMLModelCommand.js +28 -21
  28. package/dist-es/commands/PredictCommand.js +28 -21
  29. package/dist-es/commands/UpdateBatchPredictionCommand.js +28 -21
  30. package/dist-es/commands/UpdateDataSourceCommand.js +28 -21
  31. package/dist-es/commands/UpdateEvaluationCommand.js +28 -21
  32. package/dist-es/commands/UpdateMLModelCommand.js +28 -21
  33. package/dist-es/endpoints.js +8 -8
  34. package/dist-es/models/MachineLearningServiceException.js +10 -5
  35. package/dist-es/models/models_0.js +167 -312
  36. package/dist-es/pagination/DescribeBatchPredictionsPaginator.js +68 -25
  37. package/dist-es/pagination/DescribeDataSourcesPaginator.js +68 -25
  38. package/dist-es/pagination/DescribeEvaluationsPaginator.js +68 -25
  39. package/dist-es/pagination/DescribeMLModelsPaginator.js +68 -25
  40. package/dist-es/protocols/Aws_json1_1.js +2292 -1831
  41. package/dist-es/runtimeConfig.browser.js +12 -26
  42. package/dist-es/runtimeConfig.js +12 -30
  43. package/dist-es/runtimeConfig.native.js +5 -8
  44. package/dist-es/runtimeConfig.shared.js +11 -8
  45. package/dist-es/waiters/waitForBatchPredictionAvailable.js +91 -50
  46. package/dist-es/waiters/waitForDataSourceAvailable.js +91 -50
  47. package/dist-es/waiters/waitForEvaluationAvailable.js +91 -50
  48. package/dist-es/waiters/waitForMLModelAvailable.js +91 -50
  49. package/package.json +5 -5
@@ -1,1770 +1,2212 @@
1
+ import { __assign, __awaiter, __generator, __read } from "tslib";
1
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
3
  import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, throwDefaultError, } from "@aws-sdk/smithy-client";
3
4
  import { MachineLearningServiceException as __BaseException } from "../models/MachineLearningServiceException";
4
5
  import { IdempotentParameterMismatchException, InternalServerException, InvalidInputException, InvalidTagException, LimitExceededException, PredictorNotMountedException, ResourceNotFoundException, TagLimitExceededException, } from "../models/models_0";
5
- export const serializeAws_json1_1AddTagsCommand = async (input, context) => {
6
- const headers = {
7
- "content-type": "application/x-amz-json-1.1",
8
- "x-amz-target": "AmazonML_20141212.AddTags",
9
- };
10
- let body;
11
- body = JSON.stringify(serializeAws_json1_1AddTagsInput(input, context));
12
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
- };
14
- export const serializeAws_json1_1CreateBatchPredictionCommand = async (input, context) => {
15
- const headers = {
16
- "content-type": "application/x-amz-json-1.1",
17
- "x-amz-target": "AmazonML_20141212.CreateBatchPrediction",
18
- };
19
- let body;
20
- body = JSON.stringify(serializeAws_json1_1CreateBatchPredictionInput(input, context));
21
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
- };
23
- export const serializeAws_json1_1CreateDataSourceFromRDSCommand = async (input, context) => {
24
- const headers = {
25
- "content-type": "application/x-amz-json-1.1",
26
- "x-amz-target": "AmazonML_20141212.CreateDataSourceFromRDS",
27
- };
28
- let body;
29
- body = JSON.stringify(serializeAws_json1_1CreateDataSourceFromRDSInput(input, context));
30
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
31
- };
32
- export const serializeAws_json1_1CreateDataSourceFromRedshiftCommand = async (input, context) => {
33
- const headers = {
34
- "content-type": "application/x-amz-json-1.1",
35
- "x-amz-target": "AmazonML_20141212.CreateDataSourceFromRedshift",
36
- };
37
- let body;
38
- body = JSON.stringify(serializeAws_json1_1CreateDataSourceFromRedshiftInput(input, context));
39
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
- };
41
- export const serializeAws_json1_1CreateDataSourceFromS3Command = async (input, context) => {
42
- const headers = {
43
- "content-type": "application/x-amz-json-1.1",
44
- "x-amz-target": "AmazonML_20141212.CreateDataSourceFromS3",
45
- };
46
- let body;
47
- body = JSON.stringify(serializeAws_json1_1CreateDataSourceFromS3Input(input, context));
48
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
- };
50
- export const serializeAws_json1_1CreateEvaluationCommand = async (input, context) => {
51
- const headers = {
52
- "content-type": "application/x-amz-json-1.1",
53
- "x-amz-target": "AmazonML_20141212.CreateEvaluation",
54
- };
55
- let body;
56
- body = JSON.stringify(serializeAws_json1_1CreateEvaluationInput(input, context));
57
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
- };
59
- export const serializeAws_json1_1CreateMLModelCommand = async (input, context) => {
60
- const headers = {
61
- "content-type": "application/x-amz-json-1.1",
62
- "x-amz-target": "AmazonML_20141212.CreateMLModel",
63
- };
64
- let body;
65
- body = JSON.stringify(serializeAws_json1_1CreateMLModelInput(input, context));
66
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
67
- };
68
- export const serializeAws_json1_1CreateRealtimeEndpointCommand = async (input, context) => {
69
- const headers = {
70
- "content-type": "application/x-amz-json-1.1",
71
- "x-amz-target": "AmazonML_20141212.CreateRealtimeEndpoint",
72
- };
73
- let body;
74
- body = JSON.stringify(serializeAws_json1_1CreateRealtimeEndpointInput(input, context));
75
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
- };
77
- export const serializeAws_json1_1DeleteBatchPredictionCommand = async (input, context) => {
78
- const headers = {
79
- "content-type": "application/x-amz-json-1.1",
80
- "x-amz-target": "AmazonML_20141212.DeleteBatchPrediction",
81
- };
82
- let body;
83
- body = JSON.stringify(serializeAws_json1_1DeleteBatchPredictionInput(input, context));
84
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
85
- };
86
- export const serializeAws_json1_1DeleteDataSourceCommand = async (input, context) => {
87
- const headers = {
88
- "content-type": "application/x-amz-json-1.1",
89
- "x-amz-target": "AmazonML_20141212.DeleteDataSource",
90
- };
91
- let body;
92
- body = JSON.stringify(serializeAws_json1_1DeleteDataSourceInput(input, context));
93
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
94
- };
95
- export const serializeAws_json1_1DeleteEvaluationCommand = async (input, context) => {
96
- const headers = {
97
- "content-type": "application/x-amz-json-1.1",
98
- "x-amz-target": "AmazonML_20141212.DeleteEvaluation",
99
- };
100
- let body;
101
- body = JSON.stringify(serializeAws_json1_1DeleteEvaluationInput(input, context));
102
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
103
- };
104
- export const serializeAws_json1_1DeleteMLModelCommand = async (input, context) => {
105
- const headers = {
106
- "content-type": "application/x-amz-json-1.1",
107
- "x-amz-target": "AmazonML_20141212.DeleteMLModel",
108
- };
109
- let body;
110
- body = JSON.stringify(serializeAws_json1_1DeleteMLModelInput(input, context));
111
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
- };
113
- export const serializeAws_json1_1DeleteRealtimeEndpointCommand = async (input, context) => {
114
- const headers = {
115
- "content-type": "application/x-amz-json-1.1",
116
- "x-amz-target": "AmazonML_20141212.DeleteRealtimeEndpoint",
117
- };
118
- let body;
119
- body = JSON.stringify(serializeAws_json1_1DeleteRealtimeEndpointInput(input, context));
120
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
121
- };
122
- export const serializeAws_json1_1DeleteTagsCommand = async (input, context) => {
123
- const headers = {
124
- "content-type": "application/x-amz-json-1.1",
125
- "x-amz-target": "AmazonML_20141212.DeleteTags",
126
- };
127
- let body;
128
- body = JSON.stringify(serializeAws_json1_1DeleteTagsInput(input, context));
129
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
130
- };
131
- export const serializeAws_json1_1DescribeBatchPredictionsCommand = async (input, context) => {
132
- const headers = {
133
- "content-type": "application/x-amz-json-1.1",
134
- "x-amz-target": "AmazonML_20141212.DescribeBatchPredictions",
135
- };
136
- let body;
137
- body = JSON.stringify(serializeAws_json1_1DescribeBatchPredictionsInput(input, context));
138
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
139
- };
140
- export const serializeAws_json1_1DescribeDataSourcesCommand = async (input, context) => {
141
- const headers = {
142
- "content-type": "application/x-amz-json-1.1",
143
- "x-amz-target": "AmazonML_20141212.DescribeDataSources",
144
- };
145
- let body;
146
- body = JSON.stringify(serializeAws_json1_1DescribeDataSourcesInput(input, context));
147
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
148
- };
149
- export const serializeAws_json1_1DescribeEvaluationsCommand = async (input, context) => {
150
- const headers = {
151
- "content-type": "application/x-amz-json-1.1",
152
- "x-amz-target": "AmazonML_20141212.DescribeEvaluations",
153
- };
154
- let body;
155
- body = JSON.stringify(serializeAws_json1_1DescribeEvaluationsInput(input, context));
156
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
157
- };
158
- export const serializeAws_json1_1DescribeMLModelsCommand = async (input, context) => {
159
- const headers = {
160
- "content-type": "application/x-amz-json-1.1",
161
- "x-amz-target": "AmazonML_20141212.DescribeMLModels",
162
- };
163
- let body;
164
- body = JSON.stringify(serializeAws_json1_1DescribeMLModelsInput(input, context));
165
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
166
- };
167
- export const serializeAws_json1_1DescribeTagsCommand = async (input, context) => {
168
- const headers = {
169
- "content-type": "application/x-amz-json-1.1",
170
- "x-amz-target": "AmazonML_20141212.DescribeTags",
171
- };
172
- let body;
173
- body = JSON.stringify(serializeAws_json1_1DescribeTagsInput(input, context));
174
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
175
- };
176
- export const serializeAws_json1_1GetBatchPredictionCommand = async (input, context) => {
177
- const headers = {
178
- "content-type": "application/x-amz-json-1.1",
179
- "x-amz-target": "AmazonML_20141212.GetBatchPrediction",
180
- };
181
- let body;
182
- body = JSON.stringify(serializeAws_json1_1GetBatchPredictionInput(input, context));
183
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
184
- };
185
- export const serializeAws_json1_1GetDataSourceCommand = async (input, context) => {
186
- const headers = {
187
- "content-type": "application/x-amz-json-1.1",
188
- "x-amz-target": "AmazonML_20141212.GetDataSource",
189
- };
190
- let body;
191
- body = JSON.stringify(serializeAws_json1_1GetDataSourceInput(input, context));
192
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
193
- };
194
- export const serializeAws_json1_1GetEvaluationCommand = async (input, context) => {
195
- const headers = {
196
- "content-type": "application/x-amz-json-1.1",
197
- "x-amz-target": "AmazonML_20141212.GetEvaluation",
198
- };
199
- let body;
200
- body = JSON.stringify(serializeAws_json1_1GetEvaluationInput(input, context));
201
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
202
- };
203
- export const serializeAws_json1_1GetMLModelCommand = async (input, context) => {
204
- const headers = {
205
- "content-type": "application/x-amz-json-1.1",
206
- "x-amz-target": "AmazonML_20141212.GetMLModel",
207
- };
208
- let body;
209
- body = JSON.stringify(serializeAws_json1_1GetMLModelInput(input, context));
210
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
211
- };
212
- export const serializeAws_json1_1PredictCommand = async (input, context) => {
213
- const headers = {
214
- "content-type": "application/x-amz-json-1.1",
215
- "x-amz-target": "AmazonML_20141212.Predict",
216
- };
217
- let body;
218
- body = JSON.stringify(serializeAws_json1_1PredictInput(input, context));
219
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
220
- };
221
- export const serializeAws_json1_1UpdateBatchPredictionCommand = async (input, context) => {
222
- const headers = {
223
- "content-type": "application/x-amz-json-1.1",
224
- "x-amz-target": "AmazonML_20141212.UpdateBatchPrediction",
225
- };
226
- let body;
227
- body = JSON.stringify(serializeAws_json1_1UpdateBatchPredictionInput(input, context));
228
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
229
- };
230
- export const serializeAws_json1_1UpdateDataSourceCommand = async (input, context) => {
231
- const headers = {
232
- "content-type": "application/x-amz-json-1.1",
233
- "x-amz-target": "AmazonML_20141212.UpdateDataSource",
234
- };
235
- let body;
236
- body = JSON.stringify(serializeAws_json1_1UpdateDataSourceInput(input, context));
237
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
238
- };
239
- export const serializeAws_json1_1UpdateEvaluationCommand = async (input, context) => {
240
- const headers = {
241
- "content-type": "application/x-amz-json-1.1",
242
- "x-amz-target": "AmazonML_20141212.UpdateEvaluation",
243
- };
244
- let body;
245
- body = JSON.stringify(serializeAws_json1_1UpdateEvaluationInput(input, context));
246
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
247
- };
248
- export const serializeAws_json1_1UpdateMLModelCommand = async (input, context) => {
249
- const headers = {
250
- "content-type": "application/x-amz-json-1.1",
251
- "x-amz-target": "AmazonML_20141212.UpdateMLModel",
252
- };
253
- let body;
254
- body = JSON.stringify(serializeAws_json1_1UpdateMLModelInput(input, context));
255
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
256
- };
257
- export const deserializeAws_json1_1AddTagsCommand = async (output, context) => {
258
- if (output.statusCode >= 300) {
259
- return deserializeAws_json1_1AddTagsCommandError(output, context);
260
- }
261
- const data = await parseBody(output.body, context);
262
- let contents = {};
263
- contents = deserializeAws_json1_1AddTagsOutput(data, context);
264
- const response = {
265
- $metadata: deserializeMetadata(output),
266
- ...contents,
267
- };
268
- return Promise.resolve(response);
269
- };
270
- const deserializeAws_json1_1AddTagsCommandError = async (output, context) => {
271
- const parsedOutput = {
272
- ...output,
273
- body: await parseErrorBody(output.body, context),
274
- };
275
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
276
- switch (errorCode) {
277
- case "InternalServerException":
278
- case "com.amazonaws.machinelearning#InternalServerException":
279
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
280
- case "InvalidInputException":
281
- case "com.amazonaws.machinelearning#InvalidInputException":
282
- throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
283
- case "InvalidTagException":
284
- case "com.amazonaws.machinelearning#InvalidTagException":
285
- throw await deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context);
286
- case "ResourceNotFoundException":
287
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
288
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
289
- case "TagLimitExceededException":
290
- case "com.amazonaws.machinelearning#TagLimitExceededException":
291
- throw await deserializeAws_json1_1TagLimitExceededExceptionResponse(parsedOutput, context);
292
- default:
293
- const parsedBody = parsedOutput.body;
294
- throwDefaultError({
295
- output,
296
- parsedBody,
297
- exceptionCtor: __BaseException,
298
- errorCode,
299
- });
300
- }
301
- };
302
- export const deserializeAws_json1_1CreateBatchPredictionCommand = async (output, context) => {
303
- if (output.statusCode >= 300) {
304
- return deserializeAws_json1_1CreateBatchPredictionCommandError(output, context);
305
- }
306
- const data = await parseBody(output.body, context);
307
- let contents = {};
308
- contents = deserializeAws_json1_1CreateBatchPredictionOutput(data, context);
309
- const response = {
310
- $metadata: deserializeMetadata(output),
311
- ...contents,
312
- };
313
- return Promise.resolve(response);
314
- };
315
- const deserializeAws_json1_1CreateBatchPredictionCommandError = async (output, context) => {
316
- const parsedOutput = {
317
- ...output,
318
- body: await parseErrorBody(output.body, context),
319
- };
320
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
321
- switch (errorCode) {
322
- case "IdempotentParameterMismatchException":
323
- case "com.amazonaws.machinelearning#IdempotentParameterMismatchException":
324
- throw await deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse(parsedOutput, context);
325
- case "InternalServerException":
326
- case "com.amazonaws.machinelearning#InternalServerException":
327
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
328
- case "InvalidInputException":
329
- case "com.amazonaws.machinelearning#InvalidInputException":
330
- throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
331
- default:
332
- const parsedBody = parsedOutput.body;
333
- throwDefaultError({
334
- output,
335
- parsedBody,
336
- exceptionCtor: __BaseException,
337
- errorCode,
338
- });
339
- }
340
- };
341
- export const deserializeAws_json1_1CreateDataSourceFromRDSCommand = async (output, context) => {
342
- if (output.statusCode >= 300) {
343
- return deserializeAws_json1_1CreateDataSourceFromRDSCommandError(output, context);
344
- }
345
- const data = await parseBody(output.body, context);
346
- let contents = {};
347
- contents = deserializeAws_json1_1CreateDataSourceFromRDSOutput(data, context);
348
- const response = {
349
- $metadata: deserializeMetadata(output),
350
- ...contents,
351
- };
352
- return Promise.resolve(response);
353
- };
354
- const deserializeAws_json1_1CreateDataSourceFromRDSCommandError = async (output, context) => {
355
- const parsedOutput = {
356
- ...output,
357
- body: await parseErrorBody(output.body, context),
358
- };
359
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
360
- switch (errorCode) {
361
- case "IdempotentParameterMismatchException":
362
- case "com.amazonaws.machinelearning#IdempotentParameterMismatchException":
363
- throw await deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse(parsedOutput, context);
364
- case "InternalServerException":
365
- case "com.amazonaws.machinelearning#InternalServerException":
366
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
367
- case "InvalidInputException":
368
- case "com.amazonaws.machinelearning#InvalidInputException":
369
- throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
370
- default:
371
- const parsedBody = parsedOutput.body;
372
- throwDefaultError({
373
- output,
374
- parsedBody,
375
- exceptionCtor: __BaseException,
376
- errorCode,
377
- });
378
- }
379
- };
380
- export const deserializeAws_json1_1CreateDataSourceFromRedshiftCommand = async (output, context) => {
381
- if (output.statusCode >= 300) {
382
- return deserializeAws_json1_1CreateDataSourceFromRedshiftCommandError(output, context);
383
- }
384
- const data = await parseBody(output.body, context);
385
- let contents = {};
386
- contents = deserializeAws_json1_1CreateDataSourceFromRedshiftOutput(data, context);
387
- const response = {
388
- $metadata: deserializeMetadata(output),
389
- ...contents,
390
- };
391
- return Promise.resolve(response);
392
- };
393
- const deserializeAws_json1_1CreateDataSourceFromRedshiftCommandError = async (output, context) => {
394
- const parsedOutput = {
395
- ...output,
396
- body: await parseErrorBody(output.body, context),
397
- };
398
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
399
- switch (errorCode) {
400
- case "IdempotentParameterMismatchException":
401
- case "com.amazonaws.machinelearning#IdempotentParameterMismatchException":
402
- throw await deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse(parsedOutput, context);
403
- case "InternalServerException":
404
- case "com.amazonaws.machinelearning#InternalServerException":
405
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
406
- case "InvalidInputException":
407
- case "com.amazonaws.machinelearning#InvalidInputException":
408
- throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
409
- default:
410
- const parsedBody = parsedOutput.body;
411
- throwDefaultError({
412
- output,
413
- parsedBody,
414
- exceptionCtor: __BaseException,
415
- errorCode,
416
- });
417
- }
418
- };
419
- export const deserializeAws_json1_1CreateDataSourceFromS3Command = async (output, context) => {
420
- if (output.statusCode >= 300) {
421
- return deserializeAws_json1_1CreateDataSourceFromS3CommandError(output, context);
422
- }
423
- const data = await parseBody(output.body, context);
424
- let contents = {};
425
- contents = deserializeAws_json1_1CreateDataSourceFromS3Output(data, context);
426
- const response = {
427
- $metadata: deserializeMetadata(output),
428
- ...contents,
429
- };
430
- return Promise.resolve(response);
431
- };
432
- const deserializeAws_json1_1CreateDataSourceFromS3CommandError = async (output, context) => {
433
- const parsedOutput = {
434
- ...output,
435
- body: await parseErrorBody(output.body, context),
436
- };
437
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
438
- switch (errorCode) {
439
- case "IdempotentParameterMismatchException":
440
- case "com.amazonaws.machinelearning#IdempotentParameterMismatchException":
441
- throw await deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse(parsedOutput, context);
442
- case "InternalServerException":
443
- case "com.amazonaws.machinelearning#InternalServerException":
444
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
445
- case "InvalidInputException":
446
- case "com.amazonaws.machinelearning#InvalidInputException":
447
- throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
448
- default:
449
- const parsedBody = parsedOutput.body;
450
- throwDefaultError({
451
- output,
452
- parsedBody,
453
- exceptionCtor: __BaseException,
454
- errorCode,
455
- });
456
- }
457
- };
458
- export const deserializeAws_json1_1CreateEvaluationCommand = async (output, context) => {
459
- if (output.statusCode >= 300) {
460
- return deserializeAws_json1_1CreateEvaluationCommandError(output, context);
461
- }
462
- const data = await parseBody(output.body, context);
463
- let contents = {};
464
- contents = deserializeAws_json1_1CreateEvaluationOutput(data, context);
465
- const response = {
466
- $metadata: deserializeMetadata(output),
467
- ...contents,
468
- };
469
- return Promise.resolve(response);
470
- };
471
- const deserializeAws_json1_1CreateEvaluationCommandError = async (output, context) => {
472
- const parsedOutput = {
473
- ...output,
474
- body: await parseErrorBody(output.body, context),
475
- };
476
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
477
- switch (errorCode) {
478
- case "IdempotentParameterMismatchException":
479
- case "com.amazonaws.machinelearning#IdempotentParameterMismatchException":
480
- throw await deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse(parsedOutput, context);
481
- case "InternalServerException":
482
- case "com.amazonaws.machinelearning#InternalServerException":
483
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
484
- case "InvalidInputException":
485
- case "com.amazonaws.machinelearning#InvalidInputException":
486
- throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
487
- default:
488
- const parsedBody = parsedOutput.body;
489
- throwDefaultError({
490
- output,
491
- parsedBody,
492
- exceptionCtor: __BaseException,
493
- errorCode,
494
- });
495
- }
496
- };
497
- export const deserializeAws_json1_1CreateMLModelCommand = async (output, context) => {
498
- if (output.statusCode >= 300) {
499
- return deserializeAws_json1_1CreateMLModelCommandError(output, context);
500
- }
501
- const data = await parseBody(output.body, context);
502
- let contents = {};
503
- contents = deserializeAws_json1_1CreateMLModelOutput(data, context);
504
- const response = {
505
- $metadata: deserializeMetadata(output),
506
- ...contents,
507
- };
508
- return Promise.resolve(response);
509
- };
510
- const deserializeAws_json1_1CreateMLModelCommandError = async (output, context) => {
511
- const parsedOutput = {
512
- ...output,
513
- body: await parseErrorBody(output.body, context),
514
- };
515
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
516
- switch (errorCode) {
517
- case "IdempotentParameterMismatchException":
518
- case "com.amazonaws.machinelearning#IdempotentParameterMismatchException":
519
- throw await deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse(parsedOutput, context);
520
- case "InternalServerException":
521
- case "com.amazonaws.machinelearning#InternalServerException":
522
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
523
- case "InvalidInputException":
524
- case "com.amazonaws.machinelearning#InvalidInputException":
525
- throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
526
- default:
527
- const parsedBody = parsedOutput.body;
528
- throwDefaultError({
529
- output,
530
- parsedBody,
531
- exceptionCtor: __BaseException,
532
- errorCode,
533
- });
534
- }
535
- };
536
- export const deserializeAws_json1_1CreateRealtimeEndpointCommand = async (output, context) => {
537
- if (output.statusCode >= 300) {
538
- return deserializeAws_json1_1CreateRealtimeEndpointCommandError(output, context);
539
- }
540
- const data = await parseBody(output.body, context);
541
- let contents = {};
542
- contents = deserializeAws_json1_1CreateRealtimeEndpointOutput(data, context);
543
- const response = {
544
- $metadata: deserializeMetadata(output),
545
- ...contents,
546
- };
547
- return Promise.resolve(response);
548
- };
549
- const deserializeAws_json1_1CreateRealtimeEndpointCommandError = async (output, context) => {
550
- const parsedOutput = {
551
- ...output,
552
- body: await parseErrorBody(output.body, context),
553
- };
554
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
555
- switch (errorCode) {
556
- case "InternalServerException":
557
- case "com.amazonaws.machinelearning#InternalServerException":
558
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
559
- case "InvalidInputException":
560
- case "com.amazonaws.machinelearning#InvalidInputException":
561
- throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
562
- case "ResourceNotFoundException":
563
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
564
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
565
- default:
566
- const parsedBody = parsedOutput.body;
567
- throwDefaultError({
568
- output,
569
- parsedBody,
570
- exceptionCtor: __BaseException,
571
- errorCode,
572
- });
573
- }
574
- };
575
- export const deserializeAws_json1_1DeleteBatchPredictionCommand = async (output, context) => {
576
- if (output.statusCode >= 300) {
577
- return deserializeAws_json1_1DeleteBatchPredictionCommandError(output, context);
578
- }
579
- const data = await parseBody(output.body, context);
580
- let contents = {};
581
- contents = deserializeAws_json1_1DeleteBatchPredictionOutput(data, context);
582
- const response = {
583
- $metadata: deserializeMetadata(output),
584
- ...contents,
585
- };
586
- return Promise.resolve(response);
587
- };
588
- const deserializeAws_json1_1DeleteBatchPredictionCommandError = async (output, context) => {
589
- const parsedOutput = {
590
- ...output,
591
- body: await parseErrorBody(output.body, context),
592
- };
593
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
594
- switch (errorCode) {
595
- case "InternalServerException":
596
- case "com.amazonaws.machinelearning#InternalServerException":
597
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
598
- case "InvalidInputException":
599
- case "com.amazonaws.machinelearning#InvalidInputException":
600
- throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
601
- case "ResourceNotFoundException":
602
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
603
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
604
- default:
605
- const parsedBody = parsedOutput.body;
606
- throwDefaultError({
607
- output,
608
- parsedBody,
609
- exceptionCtor: __BaseException,
610
- errorCode,
611
- });
612
- }
613
- };
614
- export const deserializeAws_json1_1DeleteDataSourceCommand = async (output, context) => {
615
- if (output.statusCode >= 300) {
616
- return deserializeAws_json1_1DeleteDataSourceCommandError(output, context);
617
- }
618
- const data = await parseBody(output.body, context);
619
- let contents = {};
620
- contents = deserializeAws_json1_1DeleteDataSourceOutput(data, context);
621
- const response = {
622
- $metadata: deserializeMetadata(output),
623
- ...contents,
624
- };
625
- return Promise.resolve(response);
626
- };
627
- const deserializeAws_json1_1DeleteDataSourceCommandError = async (output, context) => {
628
- const parsedOutput = {
629
- ...output,
630
- body: await parseErrorBody(output.body, context),
631
- };
632
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
633
- switch (errorCode) {
634
- case "InternalServerException":
635
- case "com.amazonaws.machinelearning#InternalServerException":
636
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
637
- case "InvalidInputException":
638
- case "com.amazonaws.machinelearning#InvalidInputException":
639
- throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
640
- case "ResourceNotFoundException":
641
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
642
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
643
- default:
644
- const parsedBody = parsedOutput.body;
645
- throwDefaultError({
646
- output,
647
- parsedBody,
648
- exceptionCtor: __BaseException,
649
- errorCode,
650
- });
651
- }
652
- };
653
- export const deserializeAws_json1_1DeleteEvaluationCommand = async (output, context) => {
654
- if (output.statusCode >= 300) {
655
- return deserializeAws_json1_1DeleteEvaluationCommandError(output, context);
656
- }
657
- const data = await parseBody(output.body, context);
658
- let contents = {};
659
- contents = deserializeAws_json1_1DeleteEvaluationOutput(data, context);
660
- const response = {
661
- $metadata: deserializeMetadata(output),
662
- ...contents,
663
- };
664
- return Promise.resolve(response);
665
- };
666
- const deserializeAws_json1_1DeleteEvaluationCommandError = async (output, context) => {
667
- const parsedOutput = {
668
- ...output,
669
- body: await parseErrorBody(output.body, context),
670
- };
671
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
672
- switch (errorCode) {
673
- case "InternalServerException":
674
- case "com.amazonaws.machinelearning#InternalServerException":
675
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
676
- case "InvalidInputException":
677
- case "com.amazonaws.machinelearning#InvalidInputException":
678
- throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
679
- case "ResourceNotFoundException":
680
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
681
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
682
- default:
683
- const parsedBody = parsedOutput.body;
684
- throwDefaultError({
685
- output,
686
- parsedBody,
687
- exceptionCtor: __BaseException,
688
- errorCode,
689
- });
690
- }
691
- };
692
- export const deserializeAws_json1_1DeleteMLModelCommand = async (output, context) => {
693
- if (output.statusCode >= 300) {
694
- return deserializeAws_json1_1DeleteMLModelCommandError(output, context);
695
- }
696
- const data = await parseBody(output.body, context);
697
- let contents = {};
698
- contents = deserializeAws_json1_1DeleteMLModelOutput(data, context);
699
- const response = {
700
- $metadata: deserializeMetadata(output),
701
- ...contents,
702
- };
703
- return Promise.resolve(response);
704
- };
705
- const deserializeAws_json1_1DeleteMLModelCommandError = async (output, context) => {
706
- const parsedOutput = {
707
- ...output,
708
- body: await parseErrorBody(output.body, context),
709
- };
710
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
711
- switch (errorCode) {
712
- case "InternalServerException":
713
- case "com.amazonaws.machinelearning#InternalServerException":
714
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
715
- case "InvalidInputException":
716
- case "com.amazonaws.machinelearning#InvalidInputException":
717
- throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
718
- case "ResourceNotFoundException":
719
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
720
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
721
- default:
722
- const parsedBody = parsedOutput.body;
723
- throwDefaultError({
724
- output,
725
- parsedBody,
726
- exceptionCtor: __BaseException,
727
- errorCode,
728
- });
729
- }
730
- };
731
- export const deserializeAws_json1_1DeleteRealtimeEndpointCommand = async (output, context) => {
732
- if (output.statusCode >= 300) {
733
- return deserializeAws_json1_1DeleteRealtimeEndpointCommandError(output, context);
734
- }
735
- const data = await parseBody(output.body, context);
736
- let contents = {};
737
- contents = deserializeAws_json1_1DeleteRealtimeEndpointOutput(data, context);
738
- const response = {
739
- $metadata: deserializeMetadata(output),
740
- ...contents,
741
- };
742
- return Promise.resolve(response);
743
- };
744
- const deserializeAws_json1_1DeleteRealtimeEndpointCommandError = async (output, context) => {
745
- const parsedOutput = {
746
- ...output,
747
- body: await parseErrorBody(output.body, context),
748
- };
749
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
750
- switch (errorCode) {
751
- case "InternalServerException":
752
- case "com.amazonaws.machinelearning#InternalServerException":
753
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
754
- case "InvalidInputException":
755
- case "com.amazonaws.machinelearning#InvalidInputException":
756
- throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
757
- case "ResourceNotFoundException":
758
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
759
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
760
- default:
761
- const parsedBody = parsedOutput.body;
762
- throwDefaultError({
763
- output,
764
- parsedBody,
765
- exceptionCtor: __BaseException,
766
- errorCode,
767
- });
768
- }
769
- };
770
- export const deserializeAws_json1_1DeleteTagsCommand = async (output, context) => {
771
- if (output.statusCode >= 300) {
772
- return deserializeAws_json1_1DeleteTagsCommandError(output, context);
773
- }
774
- const data = await parseBody(output.body, context);
775
- let contents = {};
776
- contents = deserializeAws_json1_1DeleteTagsOutput(data, context);
777
- const response = {
778
- $metadata: deserializeMetadata(output),
779
- ...contents,
780
- };
781
- return Promise.resolve(response);
782
- };
783
- const deserializeAws_json1_1DeleteTagsCommandError = async (output, context) => {
784
- const parsedOutput = {
785
- ...output,
786
- body: await parseErrorBody(output.body, context),
787
- };
788
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
789
- switch (errorCode) {
790
- case "InternalServerException":
791
- case "com.amazonaws.machinelearning#InternalServerException":
792
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
793
- case "InvalidInputException":
794
- case "com.amazonaws.machinelearning#InvalidInputException":
795
- throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
796
- case "InvalidTagException":
797
- case "com.amazonaws.machinelearning#InvalidTagException":
798
- throw await deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context);
799
- case "ResourceNotFoundException":
800
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
801
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
802
- default:
803
- const parsedBody = parsedOutput.body;
804
- throwDefaultError({
805
- output,
806
- parsedBody,
807
- exceptionCtor: __BaseException,
808
- errorCode,
809
- });
810
- }
811
- };
812
- export const deserializeAws_json1_1DescribeBatchPredictionsCommand = async (output, context) => {
813
- if (output.statusCode >= 300) {
814
- return deserializeAws_json1_1DescribeBatchPredictionsCommandError(output, context);
815
- }
816
- const data = await parseBody(output.body, context);
817
- let contents = {};
818
- contents = deserializeAws_json1_1DescribeBatchPredictionsOutput(data, context);
819
- const response = {
820
- $metadata: deserializeMetadata(output),
821
- ...contents,
822
- };
823
- return Promise.resolve(response);
824
- };
825
- const deserializeAws_json1_1DescribeBatchPredictionsCommandError = async (output, context) => {
826
- const parsedOutput = {
827
- ...output,
828
- body: await parseErrorBody(output.body, context),
829
- };
830
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
831
- switch (errorCode) {
832
- case "InternalServerException":
833
- case "com.amazonaws.machinelearning#InternalServerException":
834
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
835
- case "InvalidInputException":
836
- case "com.amazonaws.machinelearning#InvalidInputException":
837
- throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
838
- default:
839
- const parsedBody = parsedOutput.body;
840
- throwDefaultError({
841
- output,
842
- parsedBody,
843
- exceptionCtor: __BaseException,
844
- errorCode,
845
- });
846
- }
847
- };
848
- export const deserializeAws_json1_1DescribeDataSourcesCommand = async (output, context) => {
849
- if (output.statusCode >= 300) {
850
- return deserializeAws_json1_1DescribeDataSourcesCommandError(output, context);
851
- }
852
- const data = await parseBody(output.body, context);
853
- let contents = {};
854
- contents = deserializeAws_json1_1DescribeDataSourcesOutput(data, context);
855
- const response = {
856
- $metadata: deserializeMetadata(output),
857
- ...contents,
858
- };
859
- return Promise.resolve(response);
860
- };
861
- const deserializeAws_json1_1DescribeDataSourcesCommandError = async (output, context) => {
862
- const parsedOutput = {
863
- ...output,
864
- body: await parseErrorBody(output.body, context),
865
- };
866
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
867
- switch (errorCode) {
868
- case "InternalServerException":
869
- case "com.amazonaws.machinelearning#InternalServerException":
870
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
871
- case "InvalidInputException":
872
- case "com.amazonaws.machinelearning#InvalidInputException":
873
- throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
874
- default:
875
- const parsedBody = parsedOutput.body;
876
- throwDefaultError({
877
- output,
878
- parsedBody,
879
- exceptionCtor: __BaseException,
880
- errorCode,
881
- });
882
- }
883
- };
884
- export const deserializeAws_json1_1DescribeEvaluationsCommand = async (output, context) => {
885
- if (output.statusCode >= 300) {
886
- return deserializeAws_json1_1DescribeEvaluationsCommandError(output, context);
887
- }
888
- const data = await parseBody(output.body, context);
889
- let contents = {};
890
- contents = deserializeAws_json1_1DescribeEvaluationsOutput(data, context);
891
- const response = {
892
- $metadata: deserializeMetadata(output),
893
- ...contents,
894
- };
895
- return Promise.resolve(response);
896
- };
897
- const deserializeAws_json1_1DescribeEvaluationsCommandError = async (output, context) => {
898
- const parsedOutput = {
899
- ...output,
900
- body: await parseErrorBody(output.body, context),
901
- };
902
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
903
- switch (errorCode) {
904
- case "InternalServerException":
905
- case "com.amazonaws.machinelearning#InternalServerException":
906
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
907
- case "InvalidInputException":
908
- case "com.amazonaws.machinelearning#InvalidInputException":
909
- throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
910
- default:
911
- const parsedBody = parsedOutput.body;
912
- throwDefaultError({
913
- output,
914
- parsedBody,
915
- exceptionCtor: __BaseException,
916
- errorCode,
917
- });
918
- }
919
- };
920
- export const deserializeAws_json1_1DescribeMLModelsCommand = async (output, context) => {
921
- if (output.statusCode >= 300) {
922
- return deserializeAws_json1_1DescribeMLModelsCommandError(output, context);
923
- }
924
- const data = await parseBody(output.body, context);
925
- let contents = {};
926
- contents = deserializeAws_json1_1DescribeMLModelsOutput(data, context);
927
- const response = {
928
- $metadata: deserializeMetadata(output),
929
- ...contents,
930
- };
931
- return Promise.resolve(response);
932
- };
933
- const deserializeAws_json1_1DescribeMLModelsCommandError = async (output, context) => {
934
- const parsedOutput = {
935
- ...output,
936
- body: await parseErrorBody(output.body, context),
937
- };
938
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
939
- switch (errorCode) {
940
- case "InternalServerException":
941
- case "com.amazonaws.machinelearning#InternalServerException":
942
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
943
- case "InvalidInputException":
944
- case "com.amazonaws.machinelearning#InvalidInputException":
945
- throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
946
- default:
947
- const parsedBody = parsedOutput.body;
948
- throwDefaultError({
949
- output,
950
- parsedBody,
951
- exceptionCtor: __BaseException,
952
- errorCode,
953
- });
954
- }
955
- };
956
- export const deserializeAws_json1_1DescribeTagsCommand = async (output, context) => {
957
- if (output.statusCode >= 300) {
958
- return deserializeAws_json1_1DescribeTagsCommandError(output, context);
959
- }
960
- const data = await parseBody(output.body, context);
961
- let contents = {};
962
- contents = deserializeAws_json1_1DescribeTagsOutput(data, context);
963
- const response = {
964
- $metadata: deserializeMetadata(output),
965
- ...contents,
966
- };
967
- return Promise.resolve(response);
968
- };
969
- const deserializeAws_json1_1DescribeTagsCommandError = async (output, context) => {
970
- const parsedOutput = {
971
- ...output,
972
- body: await parseErrorBody(output.body, context),
973
- };
974
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
975
- switch (errorCode) {
976
- case "InternalServerException":
977
- case "com.amazonaws.machinelearning#InternalServerException":
978
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
979
- case "InvalidInputException":
980
- case "com.amazonaws.machinelearning#InvalidInputException":
981
- throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
982
- case "ResourceNotFoundException":
983
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
984
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
985
- default:
986
- const parsedBody = parsedOutput.body;
987
- throwDefaultError({
988
- output,
989
- parsedBody,
990
- exceptionCtor: __BaseException,
991
- errorCode,
992
- });
993
- }
994
- };
995
- export const deserializeAws_json1_1GetBatchPredictionCommand = async (output, context) => {
996
- if (output.statusCode >= 300) {
997
- return deserializeAws_json1_1GetBatchPredictionCommandError(output, context);
998
- }
999
- const data = await parseBody(output.body, context);
1000
- let contents = {};
1001
- contents = deserializeAws_json1_1GetBatchPredictionOutput(data, context);
1002
- const response = {
1003
- $metadata: deserializeMetadata(output),
1004
- ...contents,
1005
- };
1006
- return Promise.resolve(response);
1007
- };
1008
- const deserializeAws_json1_1GetBatchPredictionCommandError = async (output, context) => {
1009
- const parsedOutput = {
1010
- ...output,
1011
- body: await parseErrorBody(output.body, context),
1012
- };
1013
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1014
- switch (errorCode) {
1015
- case "InternalServerException":
1016
- case "com.amazonaws.machinelearning#InternalServerException":
1017
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
1018
- case "InvalidInputException":
1019
- case "com.amazonaws.machinelearning#InvalidInputException":
1020
- throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
1021
- case "ResourceNotFoundException":
1022
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
1023
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1024
- default:
1025
- const parsedBody = parsedOutput.body;
1026
- throwDefaultError({
1027
- output,
1028
- parsedBody,
1029
- exceptionCtor: __BaseException,
1030
- errorCode,
1031
- });
1032
- }
1033
- };
1034
- export const deserializeAws_json1_1GetDataSourceCommand = async (output, context) => {
1035
- if (output.statusCode >= 300) {
1036
- return deserializeAws_json1_1GetDataSourceCommandError(output, context);
1037
- }
1038
- const data = await parseBody(output.body, context);
1039
- let contents = {};
1040
- contents = deserializeAws_json1_1GetDataSourceOutput(data, context);
1041
- const response = {
1042
- $metadata: deserializeMetadata(output),
1043
- ...contents,
1044
- };
1045
- return Promise.resolve(response);
1046
- };
1047
- const deserializeAws_json1_1GetDataSourceCommandError = async (output, context) => {
1048
- const parsedOutput = {
1049
- ...output,
1050
- body: await parseErrorBody(output.body, context),
1051
- };
1052
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1053
- switch (errorCode) {
1054
- case "InternalServerException":
1055
- case "com.amazonaws.machinelearning#InternalServerException":
1056
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
1057
- case "InvalidInputException":
1058
- case "com.amazonaws.machinelearning#InvalidInputException":
1059
- throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
1060
- case "ResourceNotFoundException":
1061
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
1062
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1063
- default:
1064
- const parsedBody = parsedOutput.body;
1065
- throwDefaultError({
1066
- output,
1067
- parsedBody,
1068
- exceptionCtor: __BaseException,
1069
- errorCode,
1070
- });
1071
- }
1072
- };
1073
- export const deserializeAws_json1_1GetEvaluationCommand = async (output, context) => {
1074
- if (output.statusCode >= 300) {
1075
- return deserializeAws_json1_1GetEvaluationCommandError(output, context);
1076
- }
1077
- const data = await parseBody(output.body, context);
1078
- let contents = {};
1079
- contents = deserializeAws_json1_1GetEvaluationOutput(data, context);
1080
- const response = {
1081
- $metadata: deserializeMetadata(output),
1082
- ...contents,
1083
- };
1084
- return Promise.resolve(response);
1085
- };
1086
- const deserializeAws_json1_1GetEvaluationCommandError = async (output, context) => {
1087
- const parsedOutput = {
1088
- ...output,
1089
- body: await parseErrorBody(output.body, context),
1090
- };
1091
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1092
- switch (errorCode) {
1093
- case "InternalServerException":
1094
- case "com.amazonaws.machinelearning#InternalServerException":
1095
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
1096
- case "InvalidInputException":
1097
- case "com.amazonaws.machinelearning#InvalidInputException":
1098
- throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
1099
- case "ResourceNotFoundException":
1100
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
1101
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1102
- default:
1103
- const parsedBody = parsedOutput.body;
1104
- throwDefaultError({
1105
- output,
1106
- parsedBody,
1107
- exceptionCtor: __BaseException,
1108
- errorCode,
1109
- });
1110
- }
1111
- };
1112
- export const deserializeAws_json1_1GetMLModelCommand = async (output, context) => {
1113
- if (output.statusCode >= 300) {
1114
- return deserializeAws_json1_1GetMLModelCommandError(output, context);
1115
- }
1116
- const data = await parseBody(output.body, context);
1117
- let contents = {};
1118
- contents = deserializeAws_json1_1GetMLModelOutput(data, context);
1119
- const response = {
1120
- $metadata: deserializeMetadata(output),
1121
- ...contents,
1122
- };
1123
- return Promise.resolve(response);
1124
- };
1125
- const deserializeAws_json1_1GetMLModelCommandError = async (output, context) => {
1126
- const parsedOutput = {
1127
- ...output,
1128
- body: await parseErrorBody(output.body, context),
1129
- };
1130
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1131
- switch (errorCode) {
1132
- case "InternalServerException":
1133
- case "com.amazonaws.machinelearning#InternalServerException":
1134
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
1135
- case "InvalidInputException":
1136
- case "com.amazonaws.machinelearning#InvalidInputException":
1137
- throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
1138
- case "ResourceNotFoundException":
1139
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
1140
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1141
- default:
1142
- const parsedBody = parsedOutput.body;
1143
- throwDefaultError({
1144
- output,
1145
- parsedBody,
1146
- exceptionCtor: __BaseException,
1147
- errorCode,
1148
- });
1149
- }
1150
- };
1151
- export const deserializeAws_json1_1PredictCommand = async (output, context) => {
1152
- if (output.statusCode >= 300) {
1153
- return deserializeAws_json1_1PredictCommandError(output, context);
1154
- }
1155
- const data = await parseBody(output.body, context);
1156
- let contents = {};
1157
- contents = deserializeAws_json1_1PredictOutput(data, context);
1158
- const response = {
1159
- $metadata: deserializeMetadata(output),
1160
- ...contents,
1161
- };
1162
- return Promise.resolve(response);
1163
- };
1164
- const deserializeAws_json1_1PredictCommandError = async (output, context) => {
1165
- const parsedOutput = {
1166
- ...output,
1167
- body: await parseErrorBody(output.body, context),
1168
- };
1169
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1170
- switch (errorCode) {
1171
- case "InternalServerException":
1172
- case "com.amazonaws.machinelearning#InternalServerException":
1173
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
1174
- case "InvalidInputException":
1175
- case "com.amazonaws.machinelearning#InvalidInputException":
1176
- throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
1177
- case "LimitExceededException":
1178
- case "com.amazonaws.machinelearning#LimitExceededException":
1179
- throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
1180
- case "PredictorNotMountedException":
1181
- case "com.amazonaws.machinelearning#PredictorNotMountedException":
1182
- throw await deserializeAws_json1_1PredictorNotMountedExceptionResponse(parsedOutput, context);
1183
- case "ResourceNotFoundException":
1184
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
1185
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1186
- default:
1187
- const parsedBody = parsedOutput.body;
1188
- throwDefaultError({
1189
- output,
1190
- parsedBody,
1191
- exceptionCtor: __BaseException,
1192
- errorCode,
1193
- });
1194
- }
1195
- };
1196
- export const deserializeAws_json1_1UpdateBatchPredictionCommand = async (output, context) => {
1197
- if (output.statusCode >= 300) {
1198
- return deserializeAws_json1_1UpdateBatchPredictionCommandError(output, context);
1199
- }
1200
- const data = await parseBody(output.body, context);
1201
- let contents = {};
1202
- contents = deserializeAws_json1_1UpdateBatchPredictionOutput(data, context);
1203
- const response = {
1204
- $metadata: deserializeMetadata(output),
1205
- ...contents,
1206
- };
1207
- return Promise.resolve(response);
1208
- };
1209
- const deserializeAws_json1_1UpdateBatchPredictionCommandError = async (output, context) => {
1210
- const parsedOutput = {
1211
- ...output,
1212
- body: await parseErrorBody(output.body, context),
1213
- };
1214
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1215
- switch (errorCode) {
1216
- case "InternalServerException":
1217
- case "com.amazonaws.machinelearning#InternalServerException":
1218
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
1219
- case "InvalidInputException":
1220
- case "com.amazonaws.machinelearning#InvalidInputException":
1221
- throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
1222
- case "ResourceNotFoundException":
1223
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
1224
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1225
- default:
1226
- const parsedBody = parsedOutput.body;
1227
- throwDefaultError({
1228
- output,
1229
- parsedBody,
1230
- exceptionCtor: __BaseException,
1231
- errorCode,
1232
- });
1233
- }
1234
- };
1235
- export const deserializeAws_json1_1UpdateDataSourceCommand = async (output, context) => {
1236
- if (output.statusCode >= 300) {
1237
- return deserializeAws_json1_1UpdateDataSourceCommandError(output, context);
1238
- }
1239
- const data = await parseBody(output.body, context);
1240
- let contents = {};
1241
- contents = deserializeAws_json1_1UpdateDataSourceOutput(data, context);
1242
- const response = {
1243
- $metadata: deserializeMetadata(output),
1244
- ...contents,
1245
- };
1246
- return Promise.resolve(response);
1247
- };
1248
- const deserializeAws_json1_1UpdateDataSourceCommandError = async (output, context) => {
1249
- const parsedOutput = {
1250
- ...output,
1251
- body: await parseErrorBody(output.body, context),
1252
- };
1253
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1254
- switch (errorCode) {
1255
- case "InternalServerException":
1256
- case "com.amazonaws.machinelearning#InternalServerException":
1257
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
1258
- case "InvalidInputException":
1259
- case "com.amazonaws.machinelearning#InvalidInputException":
1260
- throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
1261
- case "ResourceNotFoundException":
1262
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
1263
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1264
- default:
1265
- const parsedBody = parsedOutput.body;
1266
- throwDefaultError({
1267
- output,
1268
- parsedBody,
1269
- exceptionCtor: __BaseException,
1270
- errorCode,
1271
- });
1272
- }
1273
- };
1274
- export const deserializeAws_json1_1UpdateEvaluationCommand = async (output, context) => {
1275
- if (output.statusCode >= 300) {
1276
- return deserializeAws_json1_1UpdateEvaluationCommandError(output, context);
1277
- }
1278
- const data = await parseBody(output.body, context);
1279
- let contents = {};
1280
- contents = deserializeAws_json1_1UpdateEvaluationOutput(data, context);
1281
- const response = {
1282
- $metadata: deserializeMetadata(output),
1283
- ...contents,
1284
- };
1285
- return Promise.resolve(response);
1286
- };
1287
- const deserializeAws_json1_1UpdateEvaluationCommandError = async (output, context) => {
1288
- const parsedOutput = {
1289
- ...output,
1290
- body: await parseErrorBody(output.body, context),
1291
- };
1292
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1293
- switch (errorCode) {
1294
- case "InternalServerException":
1295
- case "com.amazonaws.machinelearning#InternalServerException":
1296
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
1297
- case "InvalidInputException":
1298
- case "com.amazonaws.machinelearning#InvalidInputException":
1299
- throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
1300
- case "ResourceNotFoundException":
1301
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
1302
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1303
- default:
1304
- const parsedBody = parsedOutput.body;
1305
- throwDefaultError({
1306
- output,
1307
- parsedBody,
1308
- exceptionCtor: __BaseException,
1309
- errorCode,
1310
- });
1311
- }
1312
- };
1313
- export const deserializeAws_json1_1UpdateMLModelCommand = async (output, context) => {
1314
- if (output.statusCode >= 300) {
1315
- return deserializeAws_json1_1UpdateMLModelCommandError(output, context);
1316
- }
1317
- const data = await parseBody(output.body, context);
1318
- let contents = {};
1319
- contents = deserializeAws_json1_1UpdateMLModelOutput(data, context);
1320
- const response = {
1321
- $metadata: deserializeMetadata(output),
1322
- ...contents,
1323
- };
1324
- return Promise.resolve(response);
1325
- };
1326
- const deserializeAws_json1_1UpdateMLModelCommandError = async (output, context) => {
1327
- const parsedOutput = {
1328
- ...output,
1329
- body: await parseErrorBody(output.body, context),
1330
- };
1331
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1332
- switch (errorCode) {
1333
- case "InternalServerException":
1334
- case "com.amazonaws.machinelearning#InternalServerException":
1335
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
1336
- case "InvalidInputException":
1337
- case "com.amazonaws.machinelearning#InvalidInputException":
1338
- throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
1339
- case "ResourceNotFoundException":
1340
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
1341
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1342
- default:
1343
- const parsedBody = parsedOutput.body;
1344
- throwDefaultError({
1345
- output,
1346
- parsedBody,
1347
- exceptionCtor: __BaseException,
1348
- errorCode,
1349
- });
1350
- }
1351
- };
1352
- const deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse = async (parsedOutput, context) => {
1353
- const body = parsedOutput.body;
1354
- const deserialized = deserializeAws_json1_1IdempotentParameterMismatchException(body, context);
1355
- const exception = new IdempotentParameterMismatchException({
1356
- $metadata: deserializeMetadata(parsedOutput),
1357
- ...deserialized,
1358
- });
1359
- return __decorateServiceException(exception, body);
1360
- };
1361
- const deserializeAws_json1_1InternalServerExceptionResponse = async (parsedOutput, context) => {
1362
- const body = parsedOutput.body;
1363
- const deserialized = deserializeAws_json1_1InternalServerException(body, context);
1364
- const exception = new InternalServerException({
1365
- $metadata: deserializeMetadata(parsedOutput),
1366
- ...deserialized,
1367
- });
1368
- return __decorateServiceException(exception, body);
1369
- };
1370
- const deserializeAws_json1_1InvalidInputExceptionResponse = async (parsedOutput, context) => {
1371
- const body = parsedOutput.body;
1372
- const deserialized = deserializeAws_json1_1InvalidInputException(body, context);
1373
- const exception = new InvalidInputException({
1374
- $metadata: deserializeMetadata(parsedOutput),
1375
- ...deserialized,
1376
- });
1377
- return __decorateServiceException(exception, body);
1378
- };
1379
- const deserializeAws_json1_1InvalidTagExceptionResponse = async (parsedOutput, context) => {
1380
- const body = parsedOutput.body;
1381
- const deserialized = deserializeAws_json1_1InvalidTagException(body, context);
1382
- const exception = new InvalidTagException({
1383
- $metadata: deserializeMetadata(parsedOutput),
1384
- ...deserialized,
1385
- });
1386
- return __decorateServiceException(exception, body);
1387
- };
1388
- const deserializeAws_json1_1LimitExceededExceptionResponse = async (parsedOutput, context) => {
1389
- const body = parsedOutput.body;
1390
- const deserialized = deserializeAws_json1_1LimitExceededException(body, context);
1391
- const exception = new LimitExceededException({
1392
- $metadata: deserializeMetadata(parsedOutput),
1393
- ...deserialized,
1394
- });
1395
- return __decorateServiceException(exception, body);
1396
- };
1397
- const deserializeAws_json1_1PredictorNotMountedExceptionResponse = async (parsedOutput, context) => {
1398
- const body = parsedOutput.body;
1399
- const deserialized = deserializeAws_json1_1PredictorNotMountedException(body, context);
1400
- const exception = new PredictorNotMountedException({
1401
- $metadata: deserializeMetadata(parsedOutput),
1402
- ...deserialized,
1403
- });
1404
- return __decorateServiceException(exception, body);
1405
- };
1406
- const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
1407
- const body = parsedOutput.body;
1408
- const deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);
1409
- const exception = new ResourceNotFoundException({
1410
- $metadata: deserializeMetadata(parsedOutput),
1411
- ...deserialized,
1412
- });
1413
- return __decorateServiceException(exception, body);
1414
- };
1415
- const deserializeAws_json1_1TagLimitExceededExceptionResponse = async (parsedOutput, context) => {
1416
- const body = parsedOutput.body;
1417
- const deserialized = deserializeAws_json1_1TagLimitExceededException(body, context);
1418
- const exception = new TagLimitExceededException({
1419
- $metadata: deserializeMetadata(parsedOutput),
1420
- ...deserialized,
1421
- });
1422
- return __decorateServiceException(exception, body);
1423
- };
1424
- const serializeAws_json1_1AddTagsInput = (input, context) => {
1425
- return {
1426
- ...(input.ResourceId != null && { ResourceId: input.ResourceId }),
1427
- ...(input.ResourceType != null && { ResourceType: input.ResourceType }),
1428
- ...(input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
1429
- };
6
+ export var serializeAws_json1_1AddTagsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
7
+ var headers, body;
8
+ return __generator(this, function (_a) {
9
+ headers = {
10
+ "content-type": "application/x-amz-json-1.1",
11
+ "x-amz-target": "AmazonML_20141212.AddTags",
12
+ };
13
+ body = JSON.stringify(serializeAws_json1_1AddTagsInput(input, context));
14
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
15
+ });
16
+ }); };
17
+ export var serializeAws_json1_1CreateBatchPredictionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
18
+ var headers, body;
19
+ return __generator(this, function (_a) {
20
+ headers = {
21
+ "content-type": "application/x-amz-json-1.1",
22
+ "x-amz-target": "AmazonML_20141212.CreateBatchPrediction",
23
+ };
24
+ body = JSON.stringify(serializeAws_json1_1CreateBatchPredictionInput(input, context));
25
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
26
+ });
27
+ }); };
28
+ export var serializeAws_json1_1CreateDataSourceFromRDSCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
29
+ var headers, body;
30
+ return __generator(this, function (_a) {
31
+ headers = {
32
+ "content-type": "application/x-amz-json-1.1",
33
+ "x-amz-target": "AmazonML_20141212.CreateDataSourceFromRDS",
34
+ };
35
+ body = JSON.stringify(serializeAws_json1_1CreateDataSourceFromRDSInput(input, context));
36
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
37
+ });
38
+ }); };
39
+ export var serializeAws_json1_1CreateDataSourceFromRedshiftCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
40
+ var headers, body;
41
+ return __generator(this, function (_a) {
42
+ headers = {
43
+ "content-type": "application/x-amz-json-1.1",
44
+ "x-amz-target": "AmazonML_20141212.CreateDataSourceFromRedshift",
45
+ };
46
+ body = JSON.stringify(serializeAws_json1_1CreateDataSourceFromRedshiftInput(input, context));
47
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
48
+ });
49
+ }); };
50
+ export var serializeAws_json1_1CreateDataSourceFromS3Command = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
51
+ var headers, body;
52
+ return __generator(this, function (_a) {
53
+ headers = {
54
+ "content-type": "application/x-amz-json-1.1",
55
+ "x-amz-target": "AmazonML_20141212.CreateDataSourceFromS3",
56
+ };
57
+ body = JSON.stringify(serializeAws_json1_1CreateDataSourceFromS3Input(input, context));
58
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
59
+ });
60
+ }); };
61
+ export var serializeAws_json1_1CreateEvaluationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
62
+ var headers, body;
63
+ return __generator(this, function (_a) {
64
+ headers = {
65
+ "content-type": "application/x-amz-json-1.1",
66
+ "x-amz-target": "AmazonML_20141212.CreateEvaluation",
67
+ };
68
+ body = JSON.stringify(serializeAws_json1_1CreateEvaluationInput(input, context));
69
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
70
+ });
71
+ }); };
72
+ export var serializeAws_json1_1CreateMLModelCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
73
+ var headers, body;
74
+ return __generator(this, function (_a) {
75
+ headers = {
76
+ "content-type": "application/x-amz-json-1.1",
77
+ "x-amz-target": "AmazonML_20141212.CreateMLModel",
78
+ };
79
+ body = JSON.stringify(serializeAws_json1_1CreateMLModelInput(input, context));
80
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
81
+ });
82
+ }); };
83
+ export var serializeAws_json1_1CreateRealtimeEndpointCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
84
+ var headers, body;
85
+ return __generator(this, function (_a) {
86
+ headers = {
87
+ "content-type": "application/x-amz-json-1.1",
88
+ "x-amz-target": "AmazonML_20141212.CreateRealtimeEndpoint",
89
+ };
90
+ body = JSON.stringify(serializeAws_json1_1CreateRealtimeEndpointInput(input, context));
91
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
92
+ });
93
+ }); };
94
+ export var serializeAws_json1_1DeleteBatchPredictionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
95
+ var headers, body;
96
+ return __generator(this, function (_a) {
97
+ headers = {
98
+ "content-type": "application/x-amz-json-1.1",
99
+ "x-amz-target": "AmazonML_20141212.DeleteBatchPrediction",
100
+ };
101
+ body = JSON.stringify(serializeAws_json1_1DeleteBatchPredictionInput(input, context));
102
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
103
+ });
104
+ }); };
105
+ export var serializeAws_json1_1DeleteDataSourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
106
+ var headers, body;
107
+ return __generator(this, function (_a) {
108
+ headers = {
109
+ "content-type": "application/x-amz-json-1.1",
110
+ "x-amz-target": "AmazonML_20141212.DeleteDataSource",
111
+ };
112
+ body = JSON.stringify(serializeAws_json1_1DeleteDataSourceInput(input, context));
113
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
114
+ });
115
+ }); };
116
+ export var serializeAws_json1_1DeleteEvaluationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
117
+ var headers, body;
118
+ return __generator(this, function (_a) {
119
+ headers = {
120
+ "content-type": "application/x-amz-json-1.1",
121
+ "x-amz-target": "AmazonML_20141212.DeleteEvaluation",
122
+ };
123
+ body = JSON.stringify(serializeAws_json1_1DeleteEvaluationInput(input, context));
124
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
125
+ });
126
+ }); };
127
+ export var serializeAws_json1_1DeleteMLModelCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
128
+ var headers, body;
129
+ return __generator(this, function (_a) {
130
+ headers = {
131
+ "content-type": "application/x-amz-json-1.1",
132
+ "x-amz-target": "AmazonML_20141212.DeleteMLModel",
133
+ };
134
+ body = JSON.stringify(serializeAws_json1_1DeleteMLModelInput(input, context));
135
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
136
+ });
137
+ }); };
138
+ export var serializeAws_json1_1DeleteRealtimeEndpointCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
139
+ var headers, body;
140
+ return __generator(this, function (_a) {
141
+ headers = {
142
+ "content-type": "application/x-amz-json-1.1",
143
+ "x-amz-target": "AmazonML_20141212.DeleteRealtimeEndpoint",
144
+ };
145
+ body = JSON.stringify(serializeAws_json1_1DeleteRealtimeEndpointInput(input, context));
146
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
147
+ });
148
+ }); };
149
+ export var serializeAws_json1_1DeleteTagsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
150
+ var headers, body;
151
+ return __generator(this, function (_a) {
152
+ headers = {
153
+ "content-type": "application/x-amz-json-1.1",
154
+ "x-amz-target": "AmazonML_20141212.DeleteTags",
155
+ };
156
+ body = JSON.stringify(serializeAws_json1_1DeleteTagsInput(input, context));
157
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
158
+ });
159
+ }); };
160
+ export var serializeAws_json1_1DescribeBatchPredictionsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
161
+ var headers, body;
162
+ return __generator(this, function (_a) {
163
+ headers = {
164
+ "content-type": "application/x-amz-json-1.1",
165
+ "x-amz-target": "AmazonML_20141212.DescribeBatchPredictions",
166
+ };
167
+ body = JSON.stringify(serializeAws_json1_1DescribeBatchPredictionsInput(input, context));
168
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
169
+ });
170
+ }); };
171
+ export var serializeAws_json1_1DescribeDataSourcesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
172
+ var headers, body;
173
+ return __generator(this, function (_a) {
174
+ headers = {
175
+ "content-type": "application/x-amz-json-1.1",
176
+ "x-amz-target": "AmazonML_20141212.DescribeDataSources",
177
+ };
178
+ body = JSON.stringify(serializeAws_json1_1DescribeDataSourcesInput(input, context));
179
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
180
+ });
181
+ }); };
182
+ export var serializeAws_json1_1DescribeEvaluationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
183
+ var headers, body;
184
+ return __generator(this, function (_a) {
185
+ headers = {
186
+ "content-type": "application/x-amz-json-1.1",
187
+ "x-amz-target": "AmazonML_20141212.DescribeEvaluations",
188
+ };
189
+ body = JSON.stringify(serializeAws_json1_1DescribeEvaluationsInput(input, context));
190
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
191
+ });
192
+ }); };
193
+ export var serializeAws_json1_1DescribeMLModelsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
194
+ var headers, body;
195
+ return __generator(this, function (_a) {
196
+ headers = {
197
+ "content-type": "application/x-amz-json-1.1",
198
+ "x-amz-target": "AmazonML_20141212.DescribeMLModels",
199
+ };
200
+ body = JSON.stringify(serializeAws_json1_1DescribeMLModelsInput(input, context));
201
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
202
+ });
203
+ }); };
204
+ export var serializeAws_json1_1DescribeTagsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
205
+ var headers, body;
206
+ return __generator(this, function (_a) {
207
+ headers = {
208
+ "content-type": "application/x-amz-json-1.1",
209
+ "x-amz-target": "AmazonML_20141212.DescribeTags",
210
+ };
211
+ body = JSON.stringify(serializeAws_json1_1DescribeTagsInput(input, context));
212
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
213
+ });
214
+ }); };
215
+ export var serializeAws_json1_1GetBatchPredictionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
216
+ var headers, body;
217
+ return __generator(this, function (_a) {
218
+ headers = {
219
+ "content-type": "application/x-amz-json-1.1",
220
+ "x-amz-target": "AmazonML_20141212.GetBatchPrediction",
221
+ };
222
+ body = JSON.stringify(serializeAws_json1_1GetBatchPredictionInput(input, context));
223
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
224
+ });
225
+ }); };
226
+ export var serializeAws_json1_1GetDataSourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
227
+ var headers, body;
228
+ return __generator(this, function (_a) {
229
+ headers = {
230
+ "content-type": "application/x-amz-json-1.1",
231
+ "x-amz-target": "AmazonML_20141212.GetDataSource",
232
+ };
233
+ body = JSON.stringify(serializeAws_json1_1GetDataSourceInput(input, context));
234
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
235
+ });
236
+ }); };
237
+ export var serializeAws_json1_1GetEvaluationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
238
+ var headers, body;
239
+ return __generator(this, function (_a) {
240
+ headers = {
241
+ "content-type": "application/x-amz-json-1.1",
242
+ "x-amz-target": "AmazonML_20141212.GetEvaluation",
243
+ };
244
+ body = JSON.stringify(serializeAws_json1_1GetEvaluationInput(input, context));
245
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
246
+ });
247
+ }); };
248
+ export var serializeAws_json1_1GetMLModelCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
249
+ var headers, body;
250
+ return __generator(this, function (_a) {
251
+ headers = {
252
+ "content-type": "application/x-amz-json-1.1",
253
+ "x-amz-target": "AmazonML_20141212.GetMLModel",
254
+ };
255
+ body = JSON.stringify(serializeAws_json1_1GetMLModelInput(input, context));
256
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
257
+ });
258
+ }); };
259
+ export var serializeAws_json1_1PredictCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
260
+ var headers, body;
261
+ return __generator(this, function (_a) {
262
+ headers = {
263
+ "content-type": "application/x-amz-json-1.1",
264
+ "x-amz-target": "AmazonML_20141212.Predict",
265
+ };
266
+ body = JSON.stringify(serializeAws_json1_1PredictInput(input, context));
267
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
268
+ });
269
+ }); };
270
+ export var serializeAws_json1_1UpdateBatchPredictionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
271
+ var headers, body;
272
+ return __generator(this, function (_a) {
273
+ headers = {
274
+ "content-type": "application/x-amz-json-1.1",
275
+ "x-amz-target": "AmazonML_20141212.UpdateBatchPrediction",
276
+ };
277
+ body = JSON.stringify(serializeAws_json1_1UpdateBatchPredictionInput(input, context));
278
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
279
+ });
280
+ }); };
281
+ export var serializeAws_json1_1UpdateDataSourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
282
+ var headers, body;
283
+ return __generator(this, function (_a) {
284
+ headers = {
285
+ "content-type": "application/x-amz-json-1.1",
286
+ "x-amz-target": "AmazonML_20141212.UpdateDataSource",
287
+ };
288
+ body = JSON.stringify(serializeAws_json1_1UpdateDataSourceInput(input, context));
289
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
290
+ });
291
+ }); };
292
+ export var serializeAws_json1_1UpdateEvaluationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
293
+ var headers, body;
294
+ return __generator(this, function (_a) {
295
+ headers = {
296
+ "content-type": "application/x-amz-json-1.1",
297
+ "x-amz-target": "AmazonML_20141212.UpdateEvaluation",
298
+ };
299
+ body = JSON.stringify(serializeAws_json1_1UpdateEvaluationInput(input, context));
300
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
301
+ });
302
+ }); };
303
+ export var serializeAws_json1_1UpdateMLModelCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
304
+ var headers, body;
305
+ return __generator(this, function (_a) {
306
+ headers = {
307
+ "content-type": "application/x-amz-json-1.1",
308
+ "x-amz-target": "AmazonML_20141212.UpdateMLModel",
309
+ };
310
+ body = JSON.stringify(serializeAws_json1_1UpdateMLModelInput(input, context));
311
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
312
+ });
313
+ }); };
314
+ export var deserializeAws_json1_1AddTagsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
315
+ var data, contents, response;
316
+ return __generator(this, function (_a) {
317
+ switch (_a.label) {
318
+ case 0:
319
+ if (output.statusCode >= 300) {
320
+ return [2, deserializeAws_json1_1AddTagsCommandError(output, context)];
321
+ }
322
+ return [4, parseBody(output.body, context)];
323
+ case 1:
324
+ data = _a.sent();
325
+ contents = {};
326
+ contents = deserializeAws_json1_1AddTagsOutput(data, context);
327
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
328
+ return [2, Promise.resolve(response)];
329
+ }
330
+ });
331
+ }); };
332
+ var deserializeAws_json1_1AddTagsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
333
+ var parsedOutput, _a, errorCode, _b, parsedBody;
334
+ var _c;
335
+ return __generator(this, function (_d) {
336
+ switch (_d.label) {
337
+ case 0:
338
+ _a = [__assign({}, output)];
339
+ _c = {};
340
+ return [4, parseErrorBody(output.body, context)];
341
+ case 1:
342
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
343
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
344
+ _b = errorCode;
345
+ switch (_b) {
346
+ case "InternalServerException": return [3, 2];
347
+ case "com.amazonaws.machinelearning#InternalServerException": return [3, 2];
348
+ case "InvalidInputException": return [3, 4];
349
+ case "com.amazonaws.machinelearning#InvalidInputException": return [3, 4];
350
+ case "InvalidTagException": return [3, 6];
351
+ case "com.amazonaws.machinelearning#InvalidTagException": return [3, 6];
352
+ case "ResourceNotFoundException": return [3, 8];
353
+ case "com.amazonaws.machinelearning#ResourceNotFoundException": return [3, 8];
354
+ case "TagLimitExceededException": return [3, 10];
355
+ case "com.amazonaws.machinelearning#TagLimitExceededException": return [3, 10];
356
+ }
357
+ return [3, 12];
358
+ case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
359
+ case 3: throw _d.sent();
360
+ case 4: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
361
+ case 5: throw _d.sent();
362
+ case 6: return [4, deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context)];
363
+ case 7: throw _d.sent();
364
+ case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
365
+ case 9: throw _d.sent();
366
+ case 10: return [4, deserializeAws_json1_1TagLimitExceededExceptionResponse(parsedOutput, context)];
367
+ case 11: throw _d.sent();
368
+ case 12:
369
+ parsedBody = parsedOutput.body;
370
+ throwDefaultError({
371
+ output: output,
372
+ parsedBody: parsedBody,
373
+ exceptionCtor: __BaseException,
374
+ errorCode: errorCode,
375
+ });
376
+ _d.label = 13;
377
+ case 13: return [2];
378
+ }
379
+ });
380
+ }); };
381
+ export var deserializeAws_json1_1CreateBatchPredictionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
382
+ var data, contents, response;
383
+ return __generator(this, function (_a) {
384
+ switch (_a.label) {
385
+ case 0:
386
+ if (output.statusCode >= 300) {
387
+ return [2, deserializeAws_json1_1CreateBatchPredictionCommandError(output, context)];
388
+ }
389
+ return [4, parseBody(output.body, context)];
390
+ case 1:
391
+ data = _a.sent();
392
+ contents = {};
393
+ contents = deserializeAws_json1_1CreateBatchPredictionOutput(data, context);
394
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
395
+ return [2, Promise.resolve(response)];
396
+ }
397
+ });
398
+ }); };
399
+ var deserializeAws_json1_1CreateBatchPredictionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
400
+ var parsedOutput, _a, errorCode, _b, parsedBody;
401
+ var _c;
402
+ return __generator(this, function (_d) {
403
+ switch (_d.label) {
404
+ case 0:
405
+ _a = [__assign({}, output)];
406
+ _c = {};
407
+ return [4, parseErrorBody(output.body, context)];
408
+ case 1:
409
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
410
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
411
+ _b = errorCode;
412
+ switch (_b) {
413
+ case "IdempotentParameterMismatchException": return [3, 2];
414
+ case "com.amazonaws.machinelearning#IdempotentParameterMismatchException": return [3, 2];
415
+ case "InternalServerException": return [3, 4];
416
+ case "com.amazonaws.machinelearning#InternalServerException": return [3, 4];
417
+ case "InvalidInputException": return [3, 6];
418
+ case "com.amazonaws.machinelearning#InvalidInputException": return [3, 6];
419
+ }
420
+ return [3, 8];
421
+ case 2: return [4, deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse(parsedOutput, context)];
422
+ case 3: throw _d.sent();
423
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
424
+ case 5: throw _d.sent();
425
+ case 6: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
426
+ case 7: throw _d.sent();
427
+ case 8:
428
+ parsedBody = parsedOutput.body;
429
+ throwDefaultError({
430
+ output: output,
431
+ parsedBody: parsedBody,
432
+ exceptionCtor: __BaseException,
433
+ errorCode: errorCode,
434
+ });
435
+ _d.label = 9;
436
+ case 9: return [2];
437
+ }
438
+ });
439
+ }); };
440
+ export var deserializeAws_json1_1CreateDataSourceFromRDSCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
441
+ var data, contents, response;
442
+ return __generator(this, function (_a) {
443
+ switch (_a.label) {
444
+ case 0:
445
+ if (output.statusCode >= 300) {
446
+ return [2, deserializeAws_json1_1CreateDataSourceFromRDSCommandError(output, context)];
447
+ }
448
+ return [4, parseBody(output.body, context)];
449
+ case 1:
450
+ data = _a.sent();
451
+ contents = {};
452
+ contents = deserializeAws_json1_1CreateDataSourceFromRDSOutput(data, context);
453
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
454
+ return [2, Promise.resolve(response)];
455
+ }
456
+ });
457
+ }); };
458
+ var deserializeAws_json1_1CreateDataSourceFromRDSCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
459
+ var parsedOutput, _a, errorCode, _b, parsedBody;
460
+ var _c;
461
+ return __generator(this, function (_d) {
462
+ switch (_d.label) {
463
+ case 0:
464
+ _a = [__assign({}, output)];
465
+ _c = {};
466
+ return [4, parseErrorBody(output.body, context)];
467
+ case 1:
468
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
469
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
470
+ _b = errorCode;
471
+ switch (_b) {
472
+ case "IdempotentParameterMismatchException": return [3, 2];
473
+ case "com.amazonaws.machinelearning#IdempotentParameterMismatchException": return [3, 2];
474
+ case "InternalServerException": return [3, 4];
475
+ case "com.amazonaws.machinelearning#InternalServerException": return [3, 4];
476
+ case "InvalidInputException": return [3, 6];
477
+ case "com.amazonaws.machinelearning#InvalidInputException": return [3, 6];
478
+ }
479
+ return [3, 8];
480
+ case 2: return [4, deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse(parsedOutput, context)];
481
+ case 3: throw _d.sent();
482
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
483
+ case 5: throw _d.sent();
484
+ case 6: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
485
+ case 7: throw _d.sent();
486
+ case 8:
487
+ parsedBody = parsedOutput.body;
488
+ throwDefaultError({
489
+ output: output,
490
+ parsedBody: parsedBody,
491
+ exceptionCtor: __BaseException,
492
+ errorCode: errorCode,
493
+ });
494
+ _d.label = 9;
495
+ case 9: return [2];
496
+ }
497
+ });
498
+ }); };
499
+ export var deserializeAws_json1_1CreateDataSourceFromRedshiftCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
500
+ var data, contents, response;
501
+ return __generator(this, function (_a) {
502
+ switch (_a.label) {
503
+ case 0:
504
+ if (output.statusCode >= 300) {
505
+ return [2, deserializeAws_json1_1CreateDataSourceFromRedshiftCommandError(output, context)];
506
+ }
507
+ return [4, parseBody(output.body, context)];
508
+ case 1:
509
+ data = _a.sent();
510
+ contents = {};
511
+ contents = deserializeAws_json1_1CreateDataSourceFromRedshiftOutput(data, context);
512
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
513
+ return [2, Promise.resolve(response)];
514
+ }
515
+ });
516
+ }); };
517
+ var deserializeAws_json1_1CreateDataSourceFromRedshiftCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
518
+ var parsedOutput, _a, errorCode, _b, parsedBody;
519
+ var _c;
520
+ return __generator(this, function (_d) {
521
+ switch (_d.label) {
522
+ case 0:
523
+ _a = [__assign({}, output)];
524
+ _c = {};
525
+ return [4, parseErrorBody(output.body, context)];
526
+ case 1:
527
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
528
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
529
+ _b = errorCode;
530
+ switch (_b) {
531
+ case "IdempotentParameterMismatchException": return [3, 2];
532
+ case "com.amazonaws.machinelearning#IdempotentParameterMismatchException": return [3, 2];
533
+ case "InternalServerException": return [3, 4];
534
+ case "com.amazonaws.machinelearning#InternalServerException": return [3, 4];
535
+ case "InvalidInputException": return [3, 6];
536
+ case "com.amazonaws.machinelearning#InvalidInputException": return [3, 6];
537
+ }
538
+ return [3, 8];
539
+ case 2: return [4, deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse(parsedOutput, context)];
540
+ case 3: throw _d.sent();
541
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
542
+ case 5: throw _d.sent();
543
+ case 6: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
544
+ case 7: throw _d.sent();
545
+ case 8:
546
+ parsedBody = parsedOutput.body;
547
+ throwDefaultError({
548
+ output: output,
549
+ parsedBody: parsedBody,
550
+ exceptionCtor: __BaseException,
551
+ errorCode: errorCode,
552
+ });
553
+ _d.label = 9;
554
+ case 9: return [2];
555
+ }
556
+ });
557
+ }); };
558
+ export var deserializeAws_json1_1CreateDataSourceFromS3Command = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
559
+ var data, contents, response;
560
+ return __generator(this, function (_a) {
561
+ switch (_a.label) {
562
+ case 0:
563
+ if (output.statusCode >= 300) {
564
+ return [2, deserializeAws_json1_1CreateDataSourceFromS3CommandError(output, context)];
565
+ }
566
+ return [4, parseBody(output.body, context)];
567
+ case 1:
568
+ data = _a.sent();
569
+ contents = {};
570
+ contents = deserializeAws_json1_1CreateDataSourceFromS3Output(data, context);
571
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
572
+ return [2, Promise.resolve(response)];
573
+ }
574
+ });
575
+ }); };
576
+ var deserializeAws_json1_1CreateDataSourceFromS3CommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
577
+ var parsedOutput, _a, errorCode, _b, parsedBody;
578
+ var _c;
579
+ return __generator(this, function (_d) {
580
+ switch (_d.label) {
581
+ case 0:
582
+ _a = [__assign({}, output)];
583
+ _c = {};
584
+ return [4, parseErrorBody(output.body, context)];
585
+ case 1:
586
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
587
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
588
+ _b = errorCode;
589
+ switch (_b) {
590
+ case "IdempotentParameterMismatchException": return [3, 2];
591
+ case "com.amazonaws.machinelearning#IdempotentParameterMismatchException": return [3, 2];
592
+ case "InternalServerException": return [3, 4];
593
+ case "com.amazonaws.machinelearning#InternalServerException": return [3, 4];
594
+ case "InvalidInputException": return [3, 6];
595
+ case "com.amazonaws.machinelearning#InvalidInputException": return [3, 6];
596
+ }
597
+ return [3, 8];
598
+ case 2: return [4, deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse(parsedOutput, context)];
599
+ case 3: throw _d.sent();
600
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
601
+ case 5: throw _d.sent();
602
+ case 6: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
603
+ case 7: throw _d.sent();
604
+ case 8:
605
+ parsedBody = parsedOutput.body;
606
+ throwDefaultError({
607
+ output: output,
608
+ parsedBody: parsedBody,
609
+ exceptionCtor: __BaseException,
610
+ errorCode: errorCode,
611
+ });
612
+ _d.label = 9;
613
+ case 9: return [2];
614
+ }
615
+ });
616
+ }); };
617
+ export var deserializeAws_json1_1CreateEvaluationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
618
+ var data, contents, response;
619
+ return __generator(this, function (_a) {
620
+ switch (_a.label) {
621
+ case 0:
622
+ if (output.statusCode >= 300) {
623
+ return [2, deserializeAws_json1_1CreateEvaluationCommandError(output, context)];
624
+ }
625
+ return [4, parseBody(output.body, context)];
626
+ case 1:
627
+ data = _a.sent();
628
+ contents = {};
629
+ contents = deserializeAws_json1_1CreateEvaluationOutput(data, context);
630
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
631
+ return [2, Promise.resolve(response)];
632
+ }
633
+ });
634
+ }); };
635
+ var deserializeAws_json1_1CreateEvaluationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
636
+ var parsedOutput, _a, errorCode, _b, parsedBody;
637
+ var _c;
638
+ return __generator(this, function (_d) {
639
+ switch (_d.label) {
640
+ case 0:
641
+ _a = [__assign({}, output)];
642
+ _c = {};
643
+ return [4, parseErrorBody(output.body, context)];
644
+ case 1:
645
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
646
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
647
+ _b = errorCode;
648
+ switch (_b) {
649
+ case "IdempotentParameterMismatchException": return [3, 2];
650
+ case "com.amazonaws.machinelearning#IdempotentParameterMismatchException": return [3, 2];
651
+ case "InternalServerException": return [3, 4];
652
+ case "com.amazonaws.machinelearning#InternalServerException": return [3, 4];
653
+ case "InvalidInputException": return [3, 6];
654
+ case "com.amazonaws.machinelearning#InvalidInputException": return [3, 6];
655
+ }
656
+ return [3, 8];
657
+ case 2: return [4, deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse(parsedOutput, context)];
658
+ case 3: throw _d.sent();
659
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
660
+ case 5: throw _d.sent();
661
+ case 6: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
662
+ case 7: throw _d.sent();
663
+ case 8:
664
+ parsedBody = parsedOutput.body;
665
+ throwDefaultError({
666
+ output: output,
667
+ parsedBody: parsedBody,
668
+ exceptionCtor: __BaseException,
669
+ errorCode: errorCode,
670
+ });
671
+ _d.label = 9;
672
+ case 9: return [2];
673
+ }
674
+ });
675
+ }); };
676
+ export var deserializeAws_json1_1CreateMLModelCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
677
+ var data, contents, response;
678
+ return __generator(this, function (_a) {
679
+ switch (_a.label) {
680
+ case 0:
681
+ if (output.statusCode >= 300) {
682
+ return [2, deserializeAws_json1_1CreateMLModelCommandError(output, context)];
683
+ }
684
+ return [4, parseBody(output.body, context)];
685
+ case 1:
686
+ data = _a.sent();
687
+ contents = {};
688
+ contents = deserializeAws_json1_1CreateMLModelOutput(data, context);
689
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
690
+ return [2, Promise.resolve(response)];
691
+ }
692
+ });
693
+ }); };
694
+ var deserializeAws_json1_1CreateMLModelCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
695
+ var parsedOutput, _a, errorCode, _b, parsedBody;
696
+ var _c;
697
+ return __generator(this, function (_d) {
698
+ switch (_d.label) {
699
+ case 0:
700
+ _a = [__assign({}, output)];
701
+ _c = {};
702
+ return [4, parseErrorBody(output.body, context)];
703
+ case 1:
704
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
705
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
706
+ _b = errorCode;
707
+ switch (_b) {
708
+ case "IdempotentParameterMismatchException": return [3, 2];
709
+ case "com.amazonaws.machinelearning#IdempotentParameterMismatchException": return [3, 2];
710
+ case "InternalServerException": return [3, 4];
711
+ case "com.amazonaws.machinelearning#InternalServerException": return [3, 4];
712
+ case "InvalidInputException": return [3, 6];
713
+ case "com.amazonaws.machinelearning#InvalidInputException": return [3, 6];
714
+ }
715
+ return [3, 8];
716
+ case 2: return [4, deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse(parsedOutput, context)];
717
+ case 3: throw _d.sent();
718
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
719
+ case 5: throw _d.sent();
720
+ case 6: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
721
+ case 7: throw _d.sent();
722
+ case 8:
723
+ parsedBody = parsedOutput.body;
724
+ throwDefaultError({
725
+ output: output,
726
+ parsedBody: parsedBody,
727
+ exceptionCtor: __BaseException,
728
+ errorCode: errorCode,
729
+ });
730
+ _d.label = 9;
731
+ case 9: return [2];
732
+ }
733
+ });
734
+ }); };
735
+ export var deserializeAws_json1_1CreateRealtimeEndpointCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
736
+ var data, contents, response;
737
+ return __generator(this, function (_a) {
738
+ switch (_a.label) {
739
+ case 0:
740
+ if (output.statusCode >= 300) {
741
+ return [2, deserializeAws_json1_1CreateRealtimeEndpointCommandError(output, context)];
742
+ }
743
+ return [4, parseBody(output.body, context)];
744
+ case 1:
745
+ data = _a.sent();
746
+ contents = {};
747
+ contents = deserializeAws_json1_1CreateRealtimeEndpointOutput(data, context);
748
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
749
+ return [2, Promise.resolve(response)];
750
+ }
751
+ });
752
+ }); };
753
+ var deserializeAws_json1_1CreateRealtimeEndpointCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
754
+ var parsedOutput, _a, errorCode, _b, parsedBody;
755
+ var _c;
756
+ return __generator(this, function (_d) {
757
+ switch (_d.label) {
758
+ case 0:
759
+ _a = [__assign({}, output)];
760
+ _c = {};
761
+ return [4, parseErrorBody(output.body, context)];
762
+ case 1:
763
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
764
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
765
+ _b = errorCode;
766
+ switch (_b) {
767
+ case "InternalServerException": return [3, 2];
768
+ case "com.amazonaws.machinelearning#InternalServerException": return [3, 2];
769
+ case "InvalidInputException": return [3, 4];
770
+ case "com.amazonaws.machinelearning#InvalidInputException": return [3, 4];
771
+ case "ResourceNotFoundException": return [3, 6];
772
+ case "com.amazonaws.machinelearning#ResourceNotFoundException": return [3, 6];
773
+ }
774
+ return [3, 8];
775
+ case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
776
+ case 3: throw _d.sent();
777
+ case 4: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
778
+ case 5: throw _d.sent();
779
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
780
+ case 7: throw _d.sent();
781
+ case 8:
782
+ parsedBody = parsedOutput.body;
783
+ throwDefaultError({
784
+ output: output,
785
+ parsedBody: parsedBody,
786
+ exceptionCtor: __BaseException,
787
+ errorCode: errorCode,
788
+ });
789
+ _d.label = 9;
790
+ case 9: return [2];
791
+ }
792
+ });
793
+ }); };
794
+ export var deserializeAws_json1_1DeleteBatchPredictionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
795
+ var data, contents, response;
796
+ return __generator(this, function (_a) {
797
+ switch (_a.label) {
798
+ case 0:
799
+ if (output.statusCode >= 300) {
800
+ return [2, deserializeAws_json1_1DeleteBatchPredictionCommandError(output, context)];
801
+ }
802
+ return [4, parseBody(output.body, context)];
803
+ case 1:
804
+ data = _a.sent();
805
+ contents = {};
806
+ contents = deserializeAws_json1_1DeleteBatchPredictionOutput(data, context);
807
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
808
+ return [2, Promise.resolve(response)];
809
+ }
810
+ });
811
+ }); };
812
+ var deserializeAws_json1_1DeleteBatchPredictionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
813
+ var parsedOutput, _a, errorCode, _b, parsedBody;
814
+ var _c;
815
+ return __generator(this, function (_d) {
816
+ switch (_d.label) {
817
+ case 0:
818
+ _a = [__assign({}, output)];
819
+ _c = {};
820
+ return [4, parseErrorBody(output.body, context)];
821
+ case 1:
822
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
823
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
824
+ _b = errorCode;
825
+ switch (_b) {
826
+ case "InternalServerException": return [3, 2];
827
+ case "com.amazonaws.machinelearning#InternalServerException": return [3, 2];
828
+ case "InvalidInputException": return [3, 4];
829
+ case "com.amazonaws.machinelearning#InvalidInputException": return [3, 4];
830
+ case "ResourceNotFoundException": return [3, 6];
831
+ case "com.amazonaws.machinelearning#ResourceNotFoundException": return [3, 6];
832
+ }
833
+ return [3, 8];
834
+ case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
835
+ case 3: throw _d.sent();
836
+ case 4: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
837
+ case 5: throw _d.sent();
838
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
839
+ case 7: throw _d.sent();
840
+ case 8:
841
+ parsedBody = parsedOutput.body;
842
+ throwDefaultError({
843
+ output: output,
844
+ parsedBody: parsedBody,
845
+ exceptionCtor: __BaseException,
846
+ errorCode: errorCode,
847
+ });
848
+ _d.label = 9;
849
+ case 9: return [2];
850
+ }
851
+ });
852
+ }); };
853
+ export var deserializeAws_json1_1DeleteDataSourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
854
+ var data, contents, response;
855
+ return __generator(this, function (_a) {
856
+ switch (_a.label) {
857
+ case 0:
858
+ if (output.statusCode >= 300) {
859
+ return [2, deserializeAws_json1_1DeleteDataSourceCommandError(output, context)];
860
+ }
861
+ return [4, parseBody(output.body, context)];
862
+ case 1:
863
+ data = _a.sent();
864
+ contents = {};
865
+ contents = deserializeAws_json1_1DeleteDataSourceOutput(data, context);
866
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
867
+ return [2, Promise.resolve(response)];
868
+ }
869
+ });
870
+ }); };
871
+ var deserializeAws_json1_1DeleteDataSourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
872
+ var parsedOutput, _a, errorCode, _b, parsedBody;
873
+ var _c;
874
+ return __generator(this, function (_d) {
875
+ switch (_d.label) {
876
+ case 0:
877
+ _a = [__assign({}, output)];
878
+ _c = {};
879
+ return [4, parseErrorBody(output.body, context)];
880
+ case 1:
881
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
882
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
883
+ _b = errorCode;
884
+ switch (_b) {
885
+ case "InternalServerException": return [3, 2];
886
+ case "com.amazonaws.machinelearning#InternalServerException": return [3, 2];
887
+ case "InvalidInputException": return [3, 4];
888
+ case "com.amazonaws.machinelearning#InvalidInputException": return [3, 4];
889
+ case "ResourceNotFoundException": return [3, 6];
890
+ case "com.amazonaws.machinelearning#ResourceNotFoundException": return [3, 6];
891
+ }
892
+ return [3, 8];
893
+ case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
894
+ case 3: throw _d.sent();
895
+ case 4: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
896
+ case 5: throw _d.sent();
897
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
898
+ case 7: throw _d.sent();
899
+ case 8:
900
+ parsedBody = parsedOutput.body;
901
+ throwDefaultError({
902
+ output: output,
903
+ parsedBody: parsedBody,
904
+ exceptionCtor: __BaseException,
905
+ errorCode: errorCode,
906
+ });
907
+ _d.label = 9;
908
+ case 9: return [2];
909
+ }
910
+ });
911
+ }); };
912
+ export var deserializeAws_json1_1DeleteEvaluationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
913
+ var data, contents, response;
914
+ return __generator(this, function (_a) {
915
+ switch (_a.label) {
916
+ case 0:
917
+ if (output.statusCode >= 300) {
918
+ return [2, deserializeAws_json1_1DeleteEvaluationCommandError(output, context)];
919
+ }
920
+ return [4, parseBody(output.body, context)];
921
+ case 1:
922
+ data = _a.sent();
923
+ contents = {};
924
+ contents = deserializeAws_json1_1DeleteEvaluationOutput(data, context);
925
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
926
+ return [2, Promise.resolve(response)];
927
+ }
928
+ });
929
+ }); };
930
+ var deserializeAws_json1_1DeleteEvaluationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
931
+ var parsedOutput, _a, errorCode, _b, parsedBody;
932
+ var _c;
933
+ return __generator(this, function (_d) {
934
+ switch (_d.label) {
935
+ case 0:
936
+ _a = [__assign({}, output)];
937
+ _c = {};
938
+ return [4, parseErrorBody(output.body, context)];
939
+ case 1:
940
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
941
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
942
+ _b = errorCode;
943
+ switch (_b) {
944
+ case "InternalServerException": return [3, 2];
945
+ case "com.amazonaws.machinelearning#InternalServerException": return [3, 2];
946
+ case "InvalidInputException": return [3, 4];
947
+ case "com.amazonaws.machinelearning#InvalidInputException": return [3, 4];
948
+ case "ResourceNotFoundException": return [3, 6];
949
+ case "com.amazonaws.machinelearning#ResourceNotFoundException": return [3, 6];
950
+ }
951
+ return [3, 8];
952
+ case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
953
+ case 3: throw _d.sent();
954
+ case 4: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
955
+ case 5: throw _d.sent();
956
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
957
+ case 7: throw _d.sent();
958
+ case 8:
959
+ parsedBody = parsedOutput.body;
960
+ throwDefaultError({
961
+ output: output,
962
+ parsedBody: parsedBody,
963
+ exceptionCtor: __BaseException,
964
+ errorCode: errorCode,
965
+ });
966
+ _d.label = 9;
967
+ case 9: return [2];
968
+ }
969
+ });
970
+ }); };
971
+ export var deserializeAws_json1_1DeleteMLModelCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
972
+ var data, contents, response;
973
+ return __generator(this, function (_a) {
974
+ switch (_a.label) {
975
+ case 0:
976
+ if (output.statusCode >= 300) {
977
+ return [2, deserializeAws_json1_1DeleteMLModelCommandError(output, context)];
978
+ }
979
+ return [4, parseBody(output.body, context)];
980
+ case 1:
981
+ data = _a.sent();
982
+ contents = {};
983
+ contents = deserializeAws_json1_1DeleteMLModelOutput(data, context);
984
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
985
+ return [2, Promise.resolve(response)];
986
+ }
987
+ });
988
+ }); };
989
+ var deserializeAws_json1_1DeleteMLModelCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
990
+ var parsedOutput, _a, errorCode, _b, parsedBody;
991
+ var _c;
992
+ return __generator(this, function (_d) {
993
+ switch (_d.label) {
994
+ case 0:
995
+ _a = [__assign({}, output)];
996
+ _c = {};
997
+ return [4, parseErrorBody(output.body, context)];
998
+ case 1:
999
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1000
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1001
+ _b = errorCode;
1002
+ switch (_b) {
1003
+ case "InternalServerException": return [3, 2];
1004
+ case "com.amazonaws.machinelearning#InternalServerException": return [3, 2];
1005
+ case "InvalidInputException": return [3, 4];
1006
+ case "com.amazonaws.machinelearning#InvalidInputException": return [3, 4];
1007
+ case "ResourceNotFoundException": return [3, 6];
1008
+ case "com.amazonaws.machinelearning#ResourceNotFoundException": return [3, 6];
1009
+ }
1010
+ return [3, 8];
1011
+ case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1012
+ case 3: throw _d.sent();
1013
+ case 4: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
1014
+ case 5: throw _d.sent();
1015
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1016
+ case 7: throw _d.sent();
1017
+ case 8:
1018
+ parsedBody = parsedOutput.body;
1019
+ throwDefaultError({
1020
+ output: output,
1021
+ parsedBody: parsedBody,
1022
+ exceptionCtor: __BaseException,
1023
+ errorCode: errorCode,
1024
+ });
1025
+ _d.label = 9;
1026
+ case 9: return [2];
1027
+ }
1028
+ });
1029
+ }); };
1030
+ export var deserializeAws_json1_1DeleteRealtimeEndpointCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1031
+ var data, contents, response;
1032
+ return __generator(this, function (_a) {
1033
+ switch (_a.label) {
1034
+ case 0:
1035
+ if (output.statusCode >= 300) {
1036
+ return [2, deserializeAws_json1_1DeleteRealtimeEndpointCommandError(output, context)];
1037
+ }
1038
+ return [4, parseBody(output.body, context)];
1039
+ case 1:
1040
+ data = _a.sent();
1041
+ contents = {};
1042
+ contents = deserializeAws_json1_1DeleteRealtimeEndpointOutput(data, context);
1043
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1044
+ return [2, Promise.resolve(response)];
1045
+ }
1046
+ });
1047
+ }); };
1048
+ var deserializeAws_json1_1DeleteRealtimeEndpointCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1049
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1050
+ var _c;
1051
+ return __generator(this, function (_d) {
1052
+ switch (_d.label) {
1053
+ case 0:
1054
+ _a = [__assign({}, output)];
1055
+ _c = {};
1056
+ return [4, parseErrorBody(output.body, context)];
1057
+ case 1:
1058
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1059
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1060
+ _b = errorCode;
1061
+ switch (_b) {
1062
+ case "InternalServerException": return [3, 2];
1063
+ case "com.amazonaws.machinelearning#InternalServerException": return [3, 2];
1064
+ case "InvalidInputException": return [3, 4];
1065
+ case "com.amazonaws.machinelearning#InvalidInputException": return [3, 4];
1066
+ case "ResourceNotFoundException": return [3, 6];
1067
+ case "com.amazonaws.machinelearning#ResourceNotFoundException": return [3, 6];
1068
+ }
1069
+ return [3, 8];
1070
+ case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1071
+ case 3: throw _d.sent();
1072
+ case 4: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
1073
+ case 5: throw _d.sent();
1074
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1075
+ case 7: throw _d.sent();
1076
+ case 8:
1077
+ parsedBody = parsedOutput.body;
1078
+ throwDefaultError({
1079
+ output: output,
1080
+ parsedBody: parsedBody,
1081
+ exceptionCtor: __BaseException,
1082
+ errorCode: errorCode,
1083
+ });
1084
+ _d.label = 9;
1085
+ case 9: return [2];
1086
+ }
1087
+ });
1088
+ }); };
1089
+ export var deserializeAws_json1_1DeleteTagsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1090
+ var data, contents, response;
1091
+ return __generator(this, function (_a) {
1092
+ switch (_a.label) {
1093
+ case 0:
1094
+ if (output.statusCode >= 300) {
1095
+ return [2, deserializeAws_json1_1DeleteTagsCommandError(output, context)];
1096
+ }
1097
+ return [4, parseBody(output.body, context)];
1098
+ case 1:
1099
+ data = _a.sent();
1100
+ contents = {};
1101
+ contents = deserializeAws_json1_1DeleteTagsOutput(data, context);
1102
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1103
+ return [2, Promise.resolve(response)];
1104
+ }
1105
+ });
1106
+ }); };
1107
+ var deserializeAws_json1_1DeleteTagsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1108
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1109
+ var _c;
1110
+ return __generator(this, function (_d) {
1111
+ switch (_d.label) {
1112
+ case 0:
1113
+ _a = [__assign({}, output)];
1114
+ _c = {};
1115
+ return [4, parseErrorBody(output.body, context)];
1116
+ case 1:
1117
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1118
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1119
+ _b = errorCode;
1120
+ switch (_b) {
1121
+ case "InternalServerException": return [3, 2];
1122
+ case "com.amazonaws.machinelearning#InternalServerException": return [3, 2];
1123
+ case "InvalidInputException": return [3, 4];
1124
+ case "com.amazonaws.machinelearning#InvalidInputException": return [3, 4];
1125
+ case "InvalidTagException": return [3, 6];
1126
+ case "com.amazonaws.machinelearning#InvalidTagException": return [3, 6];
1127
+ case "ResourceNotFoundException": return [3, 8];
1128
+ case "com.amazonaws.machinelearning#ResourceNotFoundException": return [3, 8];
1129
+ }
1130
+ return [3, 10];
1131
+ case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1132
+ case 3: throw _d.sent();
1133
+ case 4: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
1134
+ case 5: throw _d.sent();
1135
+ case 6: return [4, deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context)];
1136
+ case 7: throw _d.sent();
1137
+ case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1138
+ case 9: throw _d.sent();
1139
+ case 10:
1140
+ parsedBody = parsedOutput.body;
1141
+ throwDefaultError({
1142
+ output: output,
1143
+ parsedBody: parsedBody,
1144
+ exceptionCtor: __BaseException,
1145
+ errorCode: errorCode,
1146
+ });
1147
+ _d.label = 11;
1148
+ case 11: return [2];
1149
+ }
1150
+ });
1151
+ }); };
1152
+ export var deserializeAws_json1_1DescribeBatchPredictionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1153
+ var data, contents, response;
1154
+ return __generator(this, function (_a) {
1155
+ switch (_a.label) {
1156
+ case 0:
1157
+ if (output.statusCode >= 300) {
1158
+ return [2, deserializeAws_json1_1DescribeBatchPredictionsCommandError(output, context)];
1159
+ }
1160
+ return [4, parseBody(output.body, context)];
1161
+ case 1:
1162
+ data = _a.sent();
1163
+ contents = {};
1164
+ contents = deserializeAws_json1_1DescribeBatchPredictionsOutput(data, context);
1165
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1166
+ return [2, Promise.resolve(response)];
1167
+ }
1168
+ });
1169
+ }); };
1170
+ var deserializeAws_json1_1DescribeBatchPredictionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1171
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1172
+ var _c;
1173
+ return __generator(this, function (_d) {
1174
+ switch (_d.label) {
1175
+ case 0:
1176
+ _a = [__assign({}, output)];
1177
+ _c = {};
1178
+ return [4, parseErrorBody(output.body, context)];
1179
+ case 1:
1180
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1181
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1182
+ _b = errorCode;
1183
+ switch (_b) {
1184
+ case "InternalServerException": return [3, 2];
1185
+ case "com.amazonaws.machinelearning#InternalServerException": return [3, 2];
1186
+ case "InvalidInputException": return [3, 4];
1187
+ case "com.amazonaws.machinelearning#InvalidInputException": return [3, 4];
1188
+ }
1189
+ return [3, 6];
1190
+ case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1191
+ case 3: throw _d.sent();
1192
+ case 4: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
1193
+ case 5: throw _d.sent();
1194
+ case 6:
1195
+ parsedBody = parsedOutput.body;
1196
+ throwDefaultError({
1197
+ output: output,
1198
+ parsedBody: parsedBody,
1199
+ exceptionCtor: __BaseException,
1200
+ errorCode: errorCode,
1201
+ });
1202
+ _d.label = 7;
1203
+ case 7: return [2];
1204
+ }
1205
+ });
1206
+ }); };
1207
+ export var deserializeAws_json1_1DescribeDataSourcesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1208
+ var data, contents, response;
1209
+ return __generator(this, function (_a) {
1210
+ switch (_a.label) {
1211
+ case 0:
1212
+ if (output.statusCode >= 300) {
1213
+ return [2, deserializeAws_json1_1DescribeDataSourcesCommandError(output, context)];
1214
+ }
1215
+ return [4, parseBody(output.body, context)];
1216
+ case 1:
1217
+ data = _a.sent();
1218
+ contents = {};
1219
+ contents = deserializeAws_json1_1DescribeDataSourcesOutput(data, context);
1220
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1221
+ return [2, Promise.resolve(response)];
1222
+ }
1223
+ });
1224
+ }); };
1225
+ var deserializeAws_json1_1DescribeDataSourcesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1226
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1227
+ var _c;
1228
+ return __generator(this, function (_d) {
1229
+ switch (_d.label) {
1230
+ case 0:
1231
+ _a = [__assign({}, output)];
1232
+ _c = {};
1233
+ return [4, parseErrorBody(output.body, context)];
1234
+ case 1:
1235
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1236
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1237
+ _b = errorCode;
1238
+ switch (_b) {
1239
+ case "InternalServerException": return [3, 2];
1240
+ case "com.amazonaws.machinelearning#InternalServerException": return [3, 2];
1241
+ case "InvalidInputException": return [3, 4];
1242
+ case "com.amazonaws.machinelearning#InvalidInputException": return [3, 4];
1243
+ }
1244
+ return [3, 6];
1245
+ case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1246
+ case 3: throw _d.sent();
1247
+ case 4: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
1248
+ case 5: throw _d.sent();
1249
+ case 6:
1250
+ parsedBody = parsedOutput.body;
1251
+ throwDefaultError({
1252
+ output: output,
1253
+ parsedBody: parsedBody,
1254
+ exceptionCtor: __BaseException,
1255
+ errorCode: errorCode,
1256
+ });
1257
+ _d.label = 7;
1258
+ case 7: return [2];
1259
+ }
1260
+ });
1261
+ }); };
1262
+ export var deserializeAws_json1_1DescribeEvaluationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1263
+ var data, contents, response;
1264
+ return __generator(this, function (_a) {
1265
+ switch (_a.label) {
1266
+ case 0:
1267
+ if (output.statusCode >= 300) {
1268
+ return [2, deserializeAws_json1_1DescribeEvaluationsCommandError(output, context)];
1269
+ }
1270
+ return [4, parseBody(output.body, context)];
1271
+ case 1:
1272
+ data = _a.sent();
1273
+ contents = {};
1274
+ contents = deserializeAws_json1_1DescribeEvaluationsOutput(data, context);
1275
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1276
+ return [2, Promise.resolve(response)];
1277
+ }
1278
+ });
1279
+ }); };
1280
+ var deserializeAws_json1_1DescribeEvaluationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1281
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1282
+ var _c;
1283
+ return __generator(this, function (_d) {
1284
+ switch (_d.label) {
1285
+ case 0:
1286
+ _a = [__assign({}, output)];
1287
+ _c = {};
1288
+ return [4, parseErrorBody(output.body, context)];
1289
+ case 1:
1290
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1291
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1292
+ _b = errorCode;
1293
+ switch (_b) {
1294
+ case "InternalServerException": return [3, 2];
1295
+ case "com.amazonaws.machinelearning#InternalServerException": return [3, 2];
1296
+ case "InvalidInputException": return [3, 4];
1297
+ case "com.amazonaws.machinelearning#InvalidInputException": return [3, 4];
1298
+ }
1299
+ return [3, 6];
1300
+ case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1301
+ case 3: throw _d.sent();
1302
+ case 4: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
1303
+ case 5: throw _d.sent();
1304
+ case 6:
1305
+ parsedBody = parsedOutput.body;
1306
+ throwDefaultError({
1307
+ output: output,
1308
+ parsedBody: parsedBody,
1309
+ exceptionCtor: __BaseException,
1310
+ errorCode: errorCode,
1311
+ });
1312
+ _d.label = 7;
1313
+ case 7: return [2];
1314
+ }
1315
+ });
1316
+ }); };
1317
+ export var deserializeAws_json1_1DescribeMLModelsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1318
+ var data, contents, response;
1319
+ return __generator(this, function (_a) {
1320
+ switch (_a.label) {
1321
+ case 0:
1322
+ if (output.statusCode >= 300) {
1323
+ return [2, deserializeAws_json1_1DescribeMLModelsCommandError(output, context)];
1324
+ }
1325
+ return [4, parseBody(output.body, context)];
1326
+ case 1:
1327
+ data = _a.sent();
1328
+ contents = {};
1329
+ contents = deserializeAws_json1_1DescribeMLModelsOutput(data, context);
1330
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1331
+ return [2, Promise.resolve(response)];
1332
+ }
1333
+ });
1334
+ }); };
1335
+ var deserializeAws_json1_1DescribeMLModelsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1336
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1337
+ var _c;
1338
+ return __generator(this, function (_d) {
1339
+ switch (_d.label) {
1340
+ case 0:
1341
+ _a = [__assign({}, output)];
1342
+ _c = {};
1343
+ return [4, parseErrorBody(output.body, context)];
1344
+ case 1:
1345
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1346
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1347
+ _b = errorCode;
1348
+ switch (_b) {
1349
+ case "InternalServerException": return [3, 2];
1350
+ case "com.amazonaws.machinelearning#InternalServerException": return [3, 2];
1351
+ case "InvalidInputException": return [3, 4];
1352
+ case "com.amazonaws.machinelearning#InvalidInputException": return [3, 4];
1353
+ }
1354
+ return [3, 6];
1355
+ case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1356
+ case 3: throw _d.sent();
1357
+ case 4: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
1358
+ case 5: throw _d.sent();
1359
+ case 6:
1360
+ parsedBody = parsedOutput.body;
1361
+ throwDefaultError({
1362
+ output: output,
1363
+ parsedBody: parsedBody,
1364
+ exceptionCtor: __BaseException,
1365
+ errorCode: errorCode,
1366
+ });
1367
+ _d.label = 7;
1368
+ case 7: return [2];
1369
+ }
1370
+ });
1371
+ }); };
1372
+ export var deserializeAws_json1_1DescribeTagsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1373
+ var data, contents, response;
1374
+ return __generator(this, function (_a) {
1375
+ switch (_a.label) {
1376
+ case 0:
1377
+ if (output.statusCode >= 300) {
1378
+ return [2, deserializeAws_json1_1DescribeTagsCommandError(output, context)];
1379
+ }
1380
+ return [4, parseBody(output.body, context)];
1381
+ case 1:
1382
+ data = _a.sent();
1383
+ contents = {};
1384
+ contents = deserializeAws_json1_1DescribeTagsOutput(data, context);
1385
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1386
+ return [2, Promise.resolve(response)];
1387
+ }
1388
+ });
1389
+ }); };
1390
+ var deserializeAws_json1_1DescribeTagsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1391
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1392
+ var _c;
1393
+ return __generator(this, function (_d) {
1394
+ switch (_d.label) {
1395
+ case 0:
1396
+ _a = [__assign({}, output)];
1397
+ _c = {};
1398
+ return [4, parseErrorBody(output.body, context)];
1399
+ case 1:
1400
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1401
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1402
+ _b = errorCode;
1403
+ switch (_b) {
1404
+ case "InternalServerException": return [3, 2];
1405
+ case "com.amazonaws.machinelearning#InternalServerException": return [3, 2];
1406
+ case "InvalidInputException": return [3, 4];
1407
+ case "com.amazonaws.machinelearning#InvalidInputException": return [3, 4];
1408
+ case "ResourceNotFoundException": return [3, 6];
1409
+ case "com.amazonaws.machinelearning#ResourceNotFoundException": return [3, 6];
1410
+ }
1411
+ return [3, 8];
1412
+ case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1413
+ case 3: throw _d.sent();
1414
+ case 4: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
1415
+ case 5: throw _d.sent();
1416
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1417
+ case 7: throw _d.sent();
1418
+ case 8:
1419
+ parsedBody = parsedOutput.body;
1420
+ throwDefaultError({
1421
+ output: output,
1422
+ parsedBody: parsedBody,
1423
+ exceptionCtor: __BaseException,
1424
+ errorCode: errorCode,
1425
+ });
1426
+ _d.label = 9;
1427
+ case 9: return [2];
1428
+ }
1429
+ });
1430
+ }); };
1431
+ export var deserializeAws_json1_1GetBatchPredictionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1432
+ var data, contents, response;
1433
+ return __generator(this, function (_a) {
1434
+ switch (_a.label) {
1435
+ case 0:
1436
+ if (output.statusCode >= 300) {
1437
+ return [2, deserializeAws_json1_1GetBatchPredictionCommandError(output, context)];
1438
+ }
1439
+ return [4, parseBody(output.body, context)];
1440
+ case 1:
1441
+ data = _a.sent();
1442
+ contents = {};
1443
+ contents = deserializeAws_json1_1GetBatchPredictionOutput(data, context);
1444
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1445
+ return [2, Promise.resolve(response)];
1446
+ }
1447
+ });
1448
+ }); };
1449
+ var deserializeAws_json1_1GetBatchPredictionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1450
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1451
+ var _c;
1452
+ return __generator(this, function (_d) {
1453
+ switch (_d.label) {
1454
+ case 0:
1455
+ _a = [__assign({}, output)];
1456
+ _c = {};
1457
+ return [4, parseErrorBody(output.body, context)];
1458
+ case 1:
1459
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1460
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1461
+ _b = errorCode;
1462
+ switch (_b) {
1463
+ case "InternalServerException": return [3, 2];
1464
+ case "com.amazonaws.machinelearning#InternalServerException": return [3, 2];
1465
+ case "InvalidInputException": return [3, 4];
1466
+ case "com.amazonaws.machinelearning#InvalidInputException": return [3, 4];
1467
+ case "ResourceNotFoundException": return [3, 6];
1468
+ case "com.amazonaws.machinelearning#ResourceNotFoundException": return [3, 6];
1469
+ }
1470
+ return [3, 8];
1471
+ case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1472
+ case 3: throw _d.sent();
1473
+ case 4: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
1474
+ case 5: throw _d.sent();
1475
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1476
+ case 7: throw _d.sent();
1477
+ case 8:
1478
+ parsedBody = parsedOutput.body;
1479
+ throwDefaultError({
1480
+ output: output,
1481
+ parsedBody: parsedBody,
1482
+ exceptionCtor: __BaseException,
1483
+ errorCode: errorCode,
1484
+ });
1485
+ _d.label = 9;
1486
+ case 9: return [2];
1487
+ }
1488
+ });
1489
+ }); };
1490
+ export var deserializeAws_json1_1GetDataSourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1491
+ var data, contents, response;
1492
+ return __generator(this, function (_a) {
1493
+ switch (_a.label) {
1494
+ case 0:
1495
+ if (output.statusCode >= 300) {
1496
+ return [2, deserializeAws_json1_1GetDataSourceCommandError(output, context)];
1497
+ }
1498
+ return [4, parseBody(output.body, context)];
1499
+ case 1:
1500
+ data = _a.sent();
1501
+ contents = {};
1502
+ contents = deserializeAws_json1_1GetDataSourceOutput(data, context);
1503
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1504
+ return [2, Promise.resolve(response)];
1505
+ }
1506
+ });
1507
+ }); };
1508
+ var deserializeAws_json1_1GetDataSourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1509
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1510
+ var _c;
1511
+ return __generator(this, function (_d) {
1512
+ switch (_d.label) {
1513
+ case 0:
1514
+ _a = [__assign({}, output)];
1515
+ _c = {};
1516
+ return [4, parseErrorBody(output.body, context)];
1517
+ case 1:
1518
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1519
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1520
+ _b = errorCode;
1521
+ switch (_b) {
1522
+ case "InternalServerException": return [3, 2];
1523
+ case "com.amazonaws.machinelearning#InternalServerException": return [3, 2];
1524
+ case "InvalidInputException": return [3, 4];
1525
+ case "com.amazonaws.machinelearning#InvalidInputException": return [3, 4];
1526
+ case "ResourceNotFoundException": return [3, 6];
1527
+ case "com.amazonaws.machinelearning#ResourceNotFoundException": return [3, 6];
1528
+ }
1529
+ return [3, 8];
1530
+ case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1531
+ case 3: throw _d.sent();
1532
+ case 4: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
1533
+ case 5: throw _d.sent();
1534
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1535
+ case 7: throw _d.sent();
1536
+ case 8:
1537
+ parsedBody = parsedOutput.body;
1538
+ throwDefaultError({
1539
+ output: output,
1540
+ parsedBody: parsedBody,
1541
+ exceptionCtor: __BaseException,
1542
+ errorCode: errorCode,
1543
+ });
1544
+ _d.label = 9;
1545
+ case 9: return [2];
1546
+ }
1547
+ });
1548
+ }); };
1549
+ export var deserializeAws_json1_1GetEvaluationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1550
+ var data, contents, response;
1551
+ return __generator(this, function (_a) {
1552
+ switch (_a.label) {
1553
+ case 0:
1554
+ if (output.statusCode >= 300) {
1555
+ return [2, deserializeAws_json1_1GetEvaluationCommandError(output, context)];
1556
+ }
1557
+ return [4, parseBody(output.body, context)];
1558
+ case 1:
1559
+ data = _a.sent();
1560
+ contents = {};
1561
+ contents = deserializeAws_json1_1GetEvaluationOutput(data, context);
1562
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1563
+ return [2, Promise.resolve(response)];
1564
+ }
1565
+ });
1566
+ }); };
1567
+ var deserializeAws_json1_1GetEvaluationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1568
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1569
+ var _c;
1570
+ return __generator(this, function (_d) {
1571
+ switch (_d.label) {
1572
+ case 0:
1573
+ _a = [__assign({}, output)];
1574
+ _c = {};
1575
+ return [4, parseErrorBody(output.body, context)];
1576
+ case 1:
1577
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1578
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1579
+ _b = errorCode;
1580
+ switch (_b) {
1581
+ case "InternalServerException": return [3, 2];
1582
+ case "com.amazonaws.machinelearning#InternalServerException": return [3, 2];
1583
+ case "InvalidInputException": return [3, 4];
1584
+ case "com.amazonaws.machinelearning#InvalidInputException": return [3, 4];
1585
+ case "ResourceNotFoundException": return [3, 6];
1586
+ case "com.amazonaws.machinelearning#ResourceNotFoundException": return [3, 6];
1587
+ }
1588
+ return [3, 8];
1589
+ case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1590
+ case 3: throw _d.sent();
1591
+ case 4: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
1592
+ case 5: throw _d.sent();
1593
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1594
+ case 7: throw _d.sent();
1595
+ case 8:
1596
+ parsedBody = parsedOutput.body;
1597
+ throwDefaultError({
1598
+ output: output,
1599
+ parsedBody: parsedBody,
1600
+ exceptionCtor: __BaseException,
1601
+ errorCode: errorCode,
1602
+ });
1603
+ _d.label = 9;
1604
+ case 9: return [2];
1605
+ }
1606
+ });
1607
+ }); };
1608
+ export var deserializeAws_json1_1GetMLModelCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1609
+ var data, contents, response;
1610
+ return __generator(this, function (_a) {
1611
+ switch (_a.label) {
1612
+ case 0:
1613
+ if (output.statusCode >= 300) {
1614
+ return [2, deserializeAws_json1_1GetMLModelCommandError(output, context)];
1615
+ }
1616
+ return [4, parseBody(output.body, context)];
1617
+ case 1:
1618
+ data = _a.sent();
1619
+ contents = {};
1620
+ contents = deserializeAws_json1_1GetMLModelOutput(data, context);
1621
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1622
+ return [2, Promise.resolve(response)];
1623
+ }
1624
+ });
1625
+ }); };
1626
+ var deserializeAws_json1_1GetMLModelCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1627
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1628
+ var _c;
1629
+ return __generator(this, function (_d) {
1630
+ switch (_d.label) {
1631
+ case 0:
1632
+ _a = [__assign({}, output)];
1633
+ _c = {};
1634
+ return [4, parseErrorBody(output.body, context)];
1635
+ case 1:
1636
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1637
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1638
+ _b = errorCode;
1639
+ switch (_b) {
1640
+ case "InternalServerException": return [3, 2];
1641
+ case "com.amazonaws.machinelearning#InternalServerException": return [3, 2];
1642
+ case "InvalidInputException": return [3, 4];
1643
+ case "com.amazonaws.machinelearning#InvalidInputException": return [3, 4];
1644
+ case "ResourceNotFoundException": return [3, 6];
1645
+ case "com.amazonaws.machinelearning#ResourceNotFoundException": return [3, 6];
1646
+ }
1647
+ return [3, 8];
1648
+ case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1649
+ case 3: throw _d.sent();
1650
+ case 4: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
1651
+ case 5: throw _d.sent();
1652
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1653
+ case 7: throw _d.sent();
1654
+ case 8:
1655
+ parsedBody = parsedOutput.body;
1656
+ throwDefaultError({
1657
+ output: output,
1658
+ parsedBody: parsedBody,
1659
+ exceptionCtor: __BaseException,
1660
+ errorCode: errorCode,
1661
+ });
1662
+ _d.label = 9;
1663
+ case 9: return [2];
1664
+ }
1665
+ });
1666
+ }); };
1667
+ export var deserializeAws_json1_1PredictCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1668
+ var data, contents, response;
1669
+ return __generator(this, function (_a) {
1670
+ switch (_a.label) {
1671
+ case 0:
1672
+ if (output.statusCode >= 300) {
1673
+ return [2, deserializeAws_json1_1PredictCommandError(output, context)];
1674
+ }
1675
+ return [4, parseBody(output.body, context)];
1676
+ case 1:
1677
+ data = _a.sent();
1678
+ contents = {};
1679
+ contents = deserializeAws_json1_1PredictOutput(data, context);
1680
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1681
+ return [2, Promise.resolve(response)];
1682
+ }
1683
+ });
1684
+ }); };
1685
+ var deserializeAws_json1_1PredictCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1686
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1687
+ var _c;
1688
+ return __generator(this, function (_d) {
1689
+ switch (_d.label) {
1690
+ case 0:
1691
+ _a = [__assign({}, output)];
1692
+ _c = {};
1693
+ return [4, parseErrorBody(output.body, context)];
1694
+ case 1:
1695
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1696
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1697
+ _b = errorCode;
1698
+ switch (_b) {
1699
+ case "InternalServerException": return [3, 2];
1700
+ case "com.amazonaws.machinelearning#InternalServerException": return [3, 2];
1701
+ case "InvalidInputException": return [3, 4];
1702
+ case "com.amazonaws.machinelearning#InvalidInputException": return [3, 4];
1703
+ case "LimitExceededException": return [3, 6];
1704
+ case "com.amazonaws.machinelearning#LimitExceededException": return [3, 6];
1705
+ case "PredictorNotMountedException": return [3, 8];
1706
+ case "com.amazonaws.machinelearning#PredictorNotMountedException": return [3, 8];
1707
+ case "ResourceNotFoundException": return [3, 10];
1708
+ case "com.amazonaws.machinelearning#ResourceNotFoundException": return [3, 10];
1709
+ }
1710
+ return [3, 12];
1711
+ case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1712
+ case 3: throw _d.sent();
1713
+ case 4: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
1714
+ case 5: throw _d.sent();
1715
+ case 6: return [4, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];
1716
+ case 7: throw _d.sent();
1717
+ case 8: return [4, deserializeAws_json1_1PredictorNotMountedExceptionResponse(parsedOutput, context)];
1718
+ case 9: throw _d.sent();
1719
+ case 10: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1720
+ case 11: throw _d.sent();
1721
+ case 12:
1722
+ parsedBody = parsedOutput.body;
1723
+ throwDefaultError({
1724
+ output: output,
1725
+ parsedBody: parsedBody,
1726
+ exceptionCtor: __BaseException,
1727
+ errorCode: errorCode,
1728
+ });
1729
+ _d.label = 13;
1730
+ case 13: return [2];
1731
+ }
1732
+ });
1733
+ }); };
1734
+ export var deserializeAws_json1_1UpdateBatchPredictionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1735
+ var data, contents, response;
1736
+ return __generator(this, function (_a) {
1737
+ switch (_a.label) {
1738
+ case 0:
1739
+ if (output.statusCode >= 300) {
1740
+ return [2, deserializeAws_json1_1UpdateBatchPredictionCommandError(output, context)];
1741
+ }
1742
+ return [4, parseBody(output.body, context)];
1743
+ case 1:
1744
+ data = _a.sent();
1745
+ contents = {};
1746
+ contents = deserializeAws_json1_1UpdateBatchPredictionOutput(data, context);
1747
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1748
+ return [2, Promise.resolve(response)];
1749
+ }
1750
+ });
1751
+ }); };
1752
+ var deserializeAws_json1_1UpdateBatchPredictionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1753
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1754
+ var _c;
1755
+ return __generator(this, function (_d) {
1756
+ switch (_d.label) {
1757
+ case 0:
1758
+ _a = [__assign({}, output)];
1759
+ _c = {};
1760
+ return [4, parseErrorBody(output.body, context)];
1761
+ case 1:
1762
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1763
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1764
+ _b = errorCode;
1765
+ switch (_b) {
1766
+ case "InternalServerException": return [3, 2];
1767
+ case "com.amazonaws.machinelearning#InternalServerException": return [3, 2];
1768
+ case "InvalidInputException": return [3, 4];
1769
+ case "com.amazonaws.machinelearning#InvalidInputException": return [3, 4];
1770
+ case "ResourceNotFoundException": return [3, 6];
1771
+ case "com.amazonaws.machinelearning#ResourceNotFoundException": return [3, 6];
1772
+ }
1773
+ return [3, 8];
1774
+ case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1775
+ case 3: throw _d.sent();
1776
+ case 4: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
1777
+ case 5: throw _d.sent();
1778
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1779
+ case 7: throw _d.sent();
1780
+ case 8:
1781
+ parsedBody = parsedOutput.body;
1782
+ throwDefaultError({
1783
+ output: output,
1784
+ parsedBody: parsedBody,
1785
+ exceptionCtor: __BaseException,
1786
+ errorCode: errorCode,
1787
+ });
1788
+ _d.label = 9;
1789
+ case 9: return [2];
1790
+ }
1791
+ });
1792
+ }); };
1793
+ export var deserializeAws_json1_1UpdateDataSourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1794
+ var data, contents, response;
1795
+ return __generator(this, function (_a) {
1796
+ switch (_a.label) {
1797
+ case 0:
1798
+ if (output.statusCode >= 300) {
1799
+ return [2, deserializeAws_json1_1UpdateDataSourceCommandError(output, context)];
1800
+ }
1801
+ return [4, parseBody(output.body, context)];
1802
+ case 1:
1803
+ data = _a.sent();
1804
+ contents = {};
1805
+ contents = deserializeAws_json1_1UpdateDataSourceOutput(data, context);
1806
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1807
+ return [2, Promise.resolve(response)];
1808
+ }
1809
+ });
1810
+ }); };
1811
+ var deserializeAws_json1_1UpdateDataSourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1812
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1813
+ var _c;
1814
+ return __generator(this, function (_d) {
1815
+ switch (_d.label) {
1816
+ case 0:
1817
+ _a = [__assign({}, output)];
1818
+ _c = {};
1819
+ return [4, parseErrorBody(output.body, context)];
1820
+ case 1:
1821
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1822
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1823
+ _b = errorCode;
1824
+ switch (_b) {
1825
+ case "InternalServerException": return [3, 2];
1826
+ case "com.amazonaws.machinelearning#InternalServerException": return [3, 2];
1827
+ case "InvalidInputException": return [3, 4];
1828
+ case "com.amazonaws.machinelearning#InvalidInputException": return [3, 4];
1829
+ case "ResourceNotFoundException": return [3, 6];
1830
+ case "com.amazonaws.machinelearning#ResourceNotFoundException": return [3, 6];
1831
+ }
1832
+ return [3, 8];
1833
+ case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1834
+ case 3: throw _d.sent();
1835
+ case 4: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
1836
+ case 5: throw _d.sent();
1837
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1838
+ case 7: throw _d.sent();
1839
+ case 8:
1840
+ parsedBody = parsedOutput.body;
1841
+ throwDefaultError({
1842
+ output: output,
1843
+ parsedBody: parsedBody,
1844
+ exceptionCtor: __BaseException,
1845
+ errorCode: errorCode,
1846
+ });
1847
+ _d.label = 9;
1848
+ case 9: return [2];
1849
+ }
1850
+ });
1851
+ }); };
1852
+ export var deserializeAws_json1_1UpdateEvaluationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1853
+ var data, contents, response;
1854
+ return __generator(this, function (_a) {
1855
+ switch (_a.label) {
1856
+ case 0:
1857
+ if (output.statusCode >= 300) {
1858
+ return [2, deserializeAws_json1_1UpdateEvaluationCommandError(output, context)];
1859
+ }
1860
+ return [4, parseBody(output.body, context)];
1861
+ case 1:
1862
+ data = _a.sent();
1863
+ contents = {};
1864
+ contents = deserializeAws_json1_1UpdateEvaluationOutput(data, context);
1865
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1866
+ return [2, Promise.resolve(response)];
1867
+ }
1868
+ });
1869
+ }); };
1870
+ var deserializeAws_json1_1UpdateEvaluationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1871
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1872
+ var _c;
1873
+ return __generator(this, function (_d) {
1874
+ switch (_d.label) {
1875
+ case 0:
1876
+ _a = [__assign({}, output)];
1877
+ _c = {};
1878
+ return [4, parseErrorBody(output.body, context)];
1879
+ case 1:
1880
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1881
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1882
+ _b = errorCode;
1883
+ switch (_b) {
1884
+ case "InternalServerException": return [3, 2];
1885
+ case "com.amazonaws.machinelearning#InternalServerException": return [3, 2];
1886
+ case "InvalidInputException": return [3, 4];
1887
+ case "com.amazonaws.machinelearning#InvalidInputException": return [3, 4];
1888
+ case "ResourceNotFoundException": return [3, 6];
1889
+ case "com.amazonaws.machinelearning#ResourceNotFoundException": return [3, 6];
1890
+ }
1891
+ return [3, 8];
1892
+ case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1893
+ case 3: throw _d.sent();
1894
+ case 4: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
1895
+ case 5: throw _d.sent();
1896
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1897
+ case 7: throw _d.sent();
1898
+ case 8:
1899
+ parsedBody = parsedOutput.body;
1900
+ throwDefaultError({
1901
+ output: output,
1902
+ parsedBody: parsedBody,
1903
+ exceptionCtor: __BaseException,
1904
+ errorCode: errorCode,
1905
+ });
1906
+ _d.label = 9;
1907
+ case 9: return [2];
1908
+ }
1909
+ });
1910
+ }); };
1911
+ export var deserializeAws_json1_1UpdateMLModelCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1912
+ var data, contents, response;
1913
+ return __generator(this, function (_a) {
1914
+ switch (_a.label) {
1915
+ case 0:
1916
+ if (output.statusCode >= 300) {
1917
+ return [2, deserializeAws_json1_1UpdateMLModelCommandError(output, context)];
1918
+ }
1919
+ return [4, parseBody(output.body, context)];
1920
+ case 1:
1921
+ data = _a.sent();
1922
+ contents = {};
1923
+ contents = deserializeAws_json1_1UpdateMLModelOutput(data, context);
1924
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1925
+ return [2, Promise.resolve(response)];
1926
+ }
1927
+ });
1928
+ }); };
1929
+ var deserializeAws_json1_1UpdateMLModelCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1930
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1931
+ var _c;
1932
+ return __generator(this, function (_d) {
1933
+ switch (_d.label) {
1934
+ case 0:
1935
+ _a = [__assign({}, output)];
1936
+ _c = {};
1937
+ return [4, parseErrorBody(output.body, context)];
1938
+ case 1:
1939
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1940
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1941
+ _b = errorCode;
1942
+ switch (_b) {
1943
+ case "InternalServerException": return [3, 2];
1944
+ case "com.amazonaws.machinelearning#InternalServerException": return [3, 2];
1945
+ case "InvalidInputException": return [3, 4];
1946
+ case "com.amazonaws.machinelearning#InvalidInputException": return [3, 4];
1947
+ case "ResourceNotFoundException": return [3, 6];
1948
+ case "com.amazonaws.machinelearning#ResourceNotFoundException": return [3, 6];
1949
+ }
1950
+ return [3, 8];
1951
+ case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1952
+ case 3: throw _d.sent();
1953
+ case 4: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
1954
+ case 5: throw _d.sent();
1955
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1956
+ case 7: throw _d.sent();
1957
+ case 8:
1958
+ parsedBody = parsedOutput.body;
1959
+ throwDefaultError({
1960
+ output: output,
1961
+ parsedBody: parsedBody,
1962
+ exceptionCtor: __BaseException,
1963
+ errorCode: errorCode,
1964
+ });
1965
+ _d.label = 9;
1966
+ case 9: return [2];
1967
+ }
1968
+ });
1969
+ }); };
1970
+ var deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1971
+ var body, deserialized, exception;
1972
+ return __generator(this, function (_a) {
1973
+ body = parsedOutput.body;
1974
+ deserialized = deserializeAws_json1_1IdempotentParameterMismatchException(body, context);
1975
+ exception = new IdempotentParameterMismatchException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1976
+ return [2, __decorateServiceException(exception, body)];
1977
+ });
1978
+ }); };
1979
+ var deserializeAws_json1_1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1980
+ var body, deserialized, exception;
1981
+ return __generator(this, function (_a) {
1982
+ body = parsedOutput.body;
1983
+ deserialized = deserializeAws_json1_1InternalServerException(body, context);
1984
+ exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1985
+ return [2, __decorateServiceException(exception, body)];
1986
+ });
1987
+ }); };
1988
+ var deserializeAws_json1_1InvalidInputExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1989
+ var body, deserialized, exception;
1990
+ return __generator(this, function (_a) {
1991
+ body = parsedOutput.body;
1992
+ deserialized = deserializeAws_json1_1InvalidInputException(body, context);
1993
+ exception = new InvalidInputException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1994
+ return [2, __decorateServiceException(exception, body)];
1995
+ });
1996
+ }); };
1997
+ var deserializeAws_json1_1InvalidTagExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1998
+ var body, deserialized, exception;
1999
+ return __generator(this, function (_a) {
2000
+ body = parsedOutput.body;
2001
+ deserialized = deserializeAws_json1_1InvalidTagException(body, context);
2002
+ exception = new InvalidTagException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
2003
+ return [2, __decorateServiceException(exception, body)];
2004
+ });
2005
+ }); };
2006
+ var deserializeAws_json1_1LimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2007
+ var body, deserialized, exception;
2008
+ return __generator(this, function (_a) {
2009
+ body = parsedOutput.body;
2010
+ deserialized = deserializeAws_json1_1LimitExceededException(body, context);
2011
+ exception = new LimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
2012
+ return [2, __decorateServiceException(exception, body)];
2013
+ });
2014
+ }); };
2015
+ var deserializeAws_json1_1PredictorNotMountedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2016
+ var body, deserialized, exception;
2017
+ return __generator(this, function (_a) {
2018
+ body = parsedOutput.body;
2019
+ deserialized = deserializeAws_json1_1PredictorNotMountedException(body, context);
2020
+ exception = new PredictorNotMountedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
2021
+ return [2, __decorateServiceException(exception, body)];
2022
+ });
2023
+ }); };
2024
+ var deserializeAws_json1_1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2025
+ var body, deserialized, exception;
2026
+ return __generator(this, function (_a) {
2027
+ body = parsedOutput.body;
2028
+ deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);
2029
+ exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
2030
+ return [2, __decorateServiceException(exception, body)];
2031
+ });
2032
+ }); };
2033
+ var deserializeAws_json1_1TagLimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2034
+ var body, deserialized, exception;
2035
+ return __generator(this, function (_a) {
2036
+ body = parsedOutput.body;
2037
+ deserialized = deserializeAws_json1_1TagLimitExceededException(body, context);
2038
+ exception = new TagLimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
2039
+ return [2, __decorateServiceException(exception, body)];
2040
+ });
2041
+ }); };
2042
+ var serializeAws_json1_1AddTagsInput = function (input, context) {
2043
+ return __assign(__assign(__assign({}, (input.ResourceId != null && { ResourceId: input.ResourceId })), (input.ResourceType != null && { ResourceType: input.ResourceType })), (input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }));
1430
2044
  };
1431
- const serializeAws_json1_1CreateBatchPredictionInput = (input, context) => {
1432
- return {
1433
- ...(input.BatchPredictionDataSourceId != null && {
1434
- BatchPredictionDataSourceId: input.BatchPredictionDataSourceId,
1435
- }),
1436
- ...(input.BatchPredictionId != null && { BatchPredictionId: input.BatchPredictionId }),
1437
- ...(input.BatchPredictionName != null && { BatchPredictionName: input.BatchPredictionName }),
1438
- ...(input.MLModelId != null && { MLModelId: input.MLModelId }),
1439
- ...(input.OutputUri != null && { OutputUri: input.OutputUri }),
1440
- };
2045
+ var serializeAws_json1_1CreateBatchPredictionInput = function (input, context) {
2046
+ return __assign(__assign(__assign(__assign(__assign({}, (input.BatchPredictionDataSourceId != null && {
2047
+ BatchPredictionDataSourceId: input.BatchPredictionDataSourceId,
2048
+ })), (input.BatchPredictionId != null && { BatchPredictionId: input.BatchPredictionId })), (input.BatchPredictionName != null && { BatchPredictionName: input.BatchPredictionName })), (input.MLModelId != null && { MLModelId: input.MLModelId })), (input.OutputUri != null && { OutputUri: input.OutputUri }));
1441
2049
  };
1442
- const serializeAws_json1_1CreateDataSourceFromRDSInput = (input, context) => {
1443
- return {
1444
- ...(input.ComputeStatistics != null && { ComputeStatistics: input.ComputeStatistics }),
1445
- ...(input.DataSourceId != null && { DataSourceId: input.DataSourceId }),
1446
- ...(input.DataSourceName != null && { DataSourceName: input.DataSourceName }),
1447
- ...(input.RDSData != null && { RDSData: serializeAws_json1_1RDSDataSpec(input.RDSData, context) }),
1448
- ...(input.RoleARN != null && { RoleARN: input.RoleARN }),
1449
- };
2050
+ var serializeAws_json1_1CreateDataSourceFromRDSInput = function (input, context) {
2051
+ return __assign(__assign(__assign(__assign(__assign({}, (input.ComputeStatistics != null && { ComputeStatistics: input.ComputeStatistics })), (input.DataSourceId != null && { DataSourceId: input.DataSourceId })), (input.DataSourceName != null && { DataSourceName: input.DataSourceName })), (input.RDSData != null && { RDSData: serializeAws_json1_1RDSDataSpec(input.RDSData, context) })), (input.RoleARN != null && { RoleARN: input.RoleARN }));
1450
2052
  };
1451
- const serializeAws_json1_1CreateDataSourceFromRedshiftInput = (input, context) => {
1452
- return {
1453
- ...(input.ComputeStatistics != null && { ComputeStatistics: input.ComputeStatistics }),
1454
- ...(input.DataSourceId != null && { DataSourceId: input.DataSourceId }),
1455
- ...(input.DataSourceName != null && { DataSourceName: input.DataSourceName }),
1456
- ...(input.DataSpec != null && { DataSpec: serializeAws_json1_1RedshiftDataSpec(input.DataSpec, context) }),
1457
- ...(input.RoleARN != null && { RoleARN: input.RoleARN }),
1458
- };
2053
+ var serializeAws_json1_1CreateDataSourceFromRedshiftInput = function (input, context) {
2054
+ return __assign(__assign(__assign(__assign(__assign({}, (input.ComputeStatistics != null && { ComputeStatistics: input.ComputeStatistics })), (input.DataSourceId != null && { DataSourceId: input.DataSourceId })), (input.DataSourceName != null && { DataSourceName: input.DataSourceName })), (input.DataSpec != null && { DataSpec: serializeAws_json1_1RedshiftDataSpec(input.DataSpec, context) })), (input.RoleARN != null && { RoleARN: input.RoleARN }));
1459
2055
  };
1460
- const serializeAws_json1_1CreateDataSourceFromS3Input = (input, context) => {
1461
- return {
1462
- ...(input.ComputeStatistics != null && { ComputeStatistics: input.ComputeStatistics }),
1463
- ...(input.DataSourceId != null && { DataSourceId: input.DataSourceId }),
1464
- ...(input.DataSourceName != null && { DataSourceName: input.DataSourceName }),
1465
- ...(input.DataSpec != null && { DataSpec: serializeAws_json1_1S3DataSpec(input.DataSpec, context) }),
1466
- };
2056
+ var serializeAws_json1_1CreateDataSourceFromS3Input = function (input, context) {
2057
+ return __assign(__assign(__assign(__assign({}, (input.ComputeStatistics != null && { ComputeStatistics: input.ComputeStatistics })), (input.DataSourceId != null && { DataSourceId: input.DataSourceId })), (input.DataSourceName != null && { DataSourceName: input.DataSourceName })), (input.DataSpec != null && { DataSpec: serializeAws_json1_1S3DataSpec(input.DataSpec, context) }));
1467
2058
  };
1468
- const serializeAws_json1_1CreateEvaluationInput = (input, context) => {
1469
- return {
1470
- ...(input.EvaluationDataSourceId != null && { EvaluationDataSourceId: input.EvaluationDataSourceId }),
1471
- ...(input.EvaluationId != null && { EvaluationId: input.EvaluationId }),
1472
- ...(input.EvaluationName != null && { EvaluationName: input.EvaluationName }),
1473
- ...(input.MLModelId != null && { MLModelId: input.MLModelId }),
1474
- };
2059
+ var serializeAws_json1_1CreateEvaluationInput = function (input, context) {
2060
+ return __assign(__assign(__assign(__assign({}, (input.EvaluationDataSourceId != null && { EvaluationDataSourceId: input.EvaluationDataSourceId })), (input.EvaluationId != null && { EvaluationId: input.EvaluationId })), (input.EvaluationName != null && { EvaluationName: input.EvaluationName })), (input.MLModelId != null && { MLModelId: input.MLModelId }));
1475
2061
  };
1476
- const serializeAws_json1_1CreateMLModelInput = (input, context) => {
1477
- return {
1478
- ...(input.MLModelId != null && { MLModelId: input.MLModelId }),
1479
- ...(input.MLModelName != null && { MLModelName: input.MLModelName }),
1480
- ...(input.MLModelType != null && { MLModelType: input.MLModelType }),
1481
- ...(input.Parameters != null && { Parameters: serializeAws_json1_1TrainingParameters(input.Parameters, context) }),
1482
- ...(input.Recipe != null && { Recipe: input.Recipe }),
1483
- ...(input.RecipeUri != null && { RecipeUri: input.RecipeUri }),
1484
- ...(input.TrainingDataSourceId != null && { TrainingDataSourceId: input.TrainingDataSourceId }),
1485
- };
2062
+ var serializeAws_json1_1CreateMLModelInput = function (input, context) {
2063
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.MLModelId != null && { MLModelId: input.MLModelId })), (input.MLModelName != null && { MLModelName: input.MLModelName })), (input.MLModelType != null && { MLModelType: input.MLModelType })), (input.Parameters != null && { Parameters: serializeAws_json1_1TrainingParameters(input.Parameters, context) })), (input.Recipe != null && { Recipe: input.Recipe })), (input.RecipeUri != null && { RecipeUri: input.RecipeUri })), (input.TrainingDataSourceId != null && { TrainingDataSourceId: input.TrainingDataSourceId }));
1486
2064
  };
1487
- const serializeAws_json1_1CreateRealtimeEndpointInput = (input, context) => {
1488
- return {
1489
- ...(input.MLModelId != null && { MLModelId: input.MLModelId }),
1490
- };
2065
+ var serializeAws_json1_1CreateRealtimeEndpointInput = function (input, context) {
2066
+ return __assign({}, (input.MLModelId != null && { MLModelId: input.MLModelId }));
1491
2067
  };
1492
- const serializeAws_json1_1DeleteBatchPredictionInput = (input, context) => {
1493
- return {
1494
- ...(input.BatchPredictionId != null && { BatchPredictionId: input.BatchPredictionId }),
1495
- };
2068
+ var serializeAws_json1_1DeleteBatchPredictionInput = function (input, context) {
2069
+ return __assign({}, (input.BatchPredictionId != null && { BatchPredictionId: input.BatchPredictionId }));
1496
2070
  };
1497
- const serializeAws_json1_1DeleteDataSourceInput = (input, context) => {
1498
- return {
1499
- ...(input.DataSourceId != null && { DataSourceId: input.DataSourceId }),
1500
- };
2071
+ var serializeAws_json1_1DeleteDataSourceInput = function (input, context) {
2072
+ return __assign({}, (input.DataSourceId != null && { DataSourceId: input.DataSourceId }));
1501
2073
  };
1502
- const serializeAws_json1_1DeleteEvaluationInput = (input, context) => {
1503
- return {
1504
- ...(input.EvaluationId != null && { EvaluationId: input.EvaluationId }),
1505
- };
2074
+ var serializeAws_json1_1DeleteEvaluationInput = function (input, context) {
2075
+ return __assign({}, (input.EvaluationId != null && { EvaluationId: input.EvaluationId }));
1506
2076
  };
1507
- const serializeAws_json1_1DeleteMLModelInput = (input, context) => {
1508
- return {
1509
- ...(input.MLModelId != null && { MLModelId: input.MLModelId }),
1510
- };
2077
+ var serializeAws_json1_1DeleteMLModelInput = function (input, context) {
2078
+ return __assign({}, (input.MLModelId != null && { MLModelId: input.MLModelId }));
1511
2079
  };
1512
- const serializeAws_json1_1DeleteRealtimeEndpointInput = (input, context) => {
1513
- return {
1514
- ...(input.MLModelId != null && { MLModelId: input.MLModelId }),
1515
- };
2080
+ var serializeAws_json1_1DeleteRealtimeEndpointInput = function (input, context) {
2081
+ return __assign({}, (input.MLModelId != null && { MLModelId: input.MLModelId }));
1516
2082
  };
1517
- const serializeAws_json1_1DeleteTagsInput = (input, context) => {
1518
- return {
1519
- ...(input.ResourceId != null && { ResourceId: input.ResourceId }),
1520
- ...(input.ResourceType != null && { ResourceType: input.ResourceType }),
1521
- ...(input.TagKeys != null && { TagKeys: serializeAws_json1_1TagKeyList(input.TagKeys, context) }),
1522
- };
2083
+ var serializeAws_json1_1DeleteTagsInput = function (input, context) {
2084
+ return __assign(__assign(__assign({}, (input.ResourceId != null && { ResourceId: input.ResourceId })), (input.ResourceType != null && { ResourceType: input.ResourceType })), (input.TagKeys != null && { TagKeys: serializeAws_json1_1TagKeyList(input.TagKeys, context) }));
1523
2085
  };
1524
- const serializeAws_json1_1DescribeBatchPredictionsInput = (input, context) => {
1525
- return {
1526
- ...(input.EQ != null && { EQ: input.EQ }),
1527
- ...(input.FilterVariable != null && { FilterVariable: input.FilterVariable }),
1528
- ...(input.GE != null && { GE: input.GE }),
1529
- ...(input.GT != null && { GT: input.GT }),
1530
- ...(input.LE != null && { LE: input.LE }),
1531
- ...(input.LT != null && { LT: input.LT }),
1532
- ...(input.Limit != null && { Limit: input.Limit }),
1533
- ...(input.NE != null && { NE: input.NE }),
1534
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1535
- ...(input.Prefix != null && { Prefix: input.Prefix }),
1536
- ...(input.SortOrder != null && { SortOrder: input.SortOrder }),
1537
- };
2086
+ var serializeAws_json1_1DescribeBatchPredictionsInput = function (input, context) {
2087
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.EQ != null && { EQ: input.EQ })), (input.FilterVariable != null && { FilterVariable: input.FilterVariable })), (input.GE != null && { GE: input.GE })), (input.GT != null && { GT: input.GT })), (input.LE != null && { LE: input.LE })), (input.LT != null && { LT: input.LT })), (input.Limit != null && { Limit: input.Limit })), (input.NE != null && { NE: input.NE })), (input.NextToken != null && { NextToken: input.NextToken })), (input.Prefix != null && { Prefix: input.Prefix })), (input.SortOrder != null && { SortOrder: input.SortOrder }));
1538
2088
  };
1539
- const serializeAws_json1_1DescribeDataSourcesInput = (input, context) => {
1540
- return {
1541
- ...(input.EQ != null && { EQ: input.EQ }),
1542
- ...(input.FilterVariable != null && { FilterVariable: input.FilterVariable }),
1543
- ...(input.GE != null && { GE: input.GE }),
1544
- ...(input.GT != null && { GT: input.GT }),
1545
- ...(input.LE != null && { LE: input.LE }),
1546
- ...(input.LT != null && { LT: input.LT }),
1547
- ...(input.Limit != null && { Limit: input.Limit }),
1548
- ...(input.NE != null && { NE: input.NE }),
1549
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1550
- ...(input.Prefix != null && { Prefix: input.Prefix }),
1551
- ...(input.SortOrder != null && { SortOrder: input.SortOrder }),
1552
- };
2089
+ var serializeAws_json1_1DescribeDataSourcesInput = function (input, context) {
2090
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.EQ != null && { EQ: input.EQ })), (input.FilterVariable != null && { FilterVariable: input.FilterVariable })), (input.GE != null && { GE: input.GE })), (input.GT != null && { GT: input.GT })), (input.LE != null && { LE: input.LE })), (input.LT != null && { LT: input.LT })), (input.Limit != null && { Limit: input.Limit })), (input.NE != null && { NE: input.NE })), (input.NextToken != null && { NextToken: input.NextToken })), (input.Prefix != null && { Prefix: input.Prefix })), (input.SortOrder != null && { SortOrder: input.SortOrder }));
1553
2091
  };
1554
- const serializeAws_json1_1DescribeEvaluationsInput = (input, context) => {
1555
- return {
1556
- ...(input.EQ != null && { EQ: input.EQ }),
1557
- ...(input.FilterVariable != null && { FilterVariable: input.FilterVariable }),
1558
- ...(input.GE != null && { GE: input.GE }),
1559
- ...(input.GT != null && { GT: input.GT }),
1560
- ...(input.LE != null && { LE: input.LE }),
1561
- ...(input.LT != null && { LT: input.LT }),
1562
- ...(input.Limit != null && { Limit: input.Limit }),
1563
- ...(input.NE != null && { NE: input.NE }),
1564
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1565
- ...(input.Prefix != null && { Prefix: input.Prefix }),
1566
- ...(input.SortOrder != null && { SortOrder: input.SortOrder }),
1567
- };
2092
+ var serializeAws_json1_1DescribeEvaluationsInput = function (input, context) {
2093
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.EQ != null && { EQ: input.EQ })), (input.FilterVariable != null && { FilterVariable: input.FilterVariable })), (input.GE != null && { GE: input.GE })), (input.GT != null && { GT: input.GT })), (input.LE != null && { LE: input.LE })), (input.LT != null && { LT: input.LT })), (input.Limit != null && { Limit: input.Limit })), (input.NE != null && { NE: input.NE })), (input.NextToken != null && { NextToken: input.NextToken })), (input.Prefix != null && { Prefix: input.Prefix })), (input.SortOrder != null && { SortOrder: input.SortOrder }));
1568
2094
  };
1569
- const serializeAws_json1_1DescribeMLModelsInput = (input, context) => {
1570
- return {
1571
- ...(input.EQ != null && { EQ: input.EQ }),
1572
- ...(input.FilterVariable != null && { FilterVariable: input.FilterVariable }),
1573
- ...(input.GE != null && { GE: input.GE }),
1574
- ...(input.GT != null && { GT: input.GT }),
1575
- ...(input.LE != null && { LE: input.LE }),
1576
- ...(input.LT != null && { LT: input.LT }),
1577
- ...(input.Limit != null && { Limit: input.Limit }),
1578
- ...(input.NE != null && { NE: input.NE }),
1579
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1580
- ...(input.Prefix != null && { Prefix: input.Prefix }),
1581
- ...(input.SortOrder != null && { SortOrder: input.SortOrder }),
1582
- };
2095
+ var serializeAws_json1_1DescribeMLModelsInput = function (input, context) {
2096
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.EQ != null && { EQ: input.EQ })), (input.FilterVariable != null && { FilterVariable: input.FilterVariable })), (input.GE != null && { GE: input.GE })), (input.GT != null && { GT: input.GT })), (input.LE != null && { LE: input.LE })), (input.LT != null && { LT: input.LT })), (input.Limit != null && { Limit: input.Limit })), (input.NE != null && { NE: input.NE })), (input.NextToken != null && { NextToken: input.NextToken })), (input.Prefix != null && { Prefix: input.Prefix })), (input.SortOrder != null && { SortOrder: input.SortOrder }));
1583
2097
  };
1584
- const serializeAws_json1_1DescribeTagsInput = (input, context) => {
1585
- return {
1586
- ...(input.ResourceId != null && { ResourceId: input.ResourceId }),
1587
- ...(input.ResourceType != null && { ResourceType: input.ResourceType }),
1588
- };
2098
+ var serializeAws_json1_1DescribeTagsInput = function (input, context) {
2099
+ return __assign(__assign({}, (input.ResourceId != null && { ResourceId: input.ResourceId })), (input.ResourceType != null && { ResourceType: input.ResourceType }));
1589
2100
  };
1590
- const serializeAws_json1_1EDPSecurityGroupIds = (input, context) => {
2101
+ var serializeAws_json1_1EDPSecurityGroupIds = function (input, context) {
1591
2102
  return input
1592
- .filter((e) => e != null)
1593
- .map((entry) => {
2103
+ .filter(function (e) { return e != null; })
2104
+ .map(function (entry) {
1594
2105
  return entry;
1595
2106
  });
1596
2107
  };
1597
- const serializeAws_json1_1GetBatchPredictionInput = (input, context) => {
1598
- return {
1599
- ...(input.BatchPredictionId != null && { BatchPredictionId: input.BatchPredictionId }),
1600
- };
2108
+ var serializeAws_json1_1GetBatchPredictionInput = function (input, context) {
2109
+ return __assign({}, (input.BatchPredictionId != null && { BatchPredictionId: input.BatchPredictionId }));
1601
2110
  };
1602
- const serializeAws_json1_1GetDataSourceInput = (input, context) => {
1603
- return {
1604
- ...(input.DataSourceId != null && { DataSourceId: input.DataSourceId }),
1605
- ...(input.Verbose != null && { Verbose: input.Verbose }),
1606
- };
2111
+ var serializeAws_json1_1GetDataSourceInput = function (input, context) {
2112
+ return __assign(__assign({}, (input.DataSourceId != null && { DataSourceId: input.DataSourceId })), (input.Verbose != null && { Verbose: input.Verbose }));
1607
2113
  };
1608
- const serializeAws_json1_1GetEvaluationInput = (input, context) => {
1609
- return {
1610
- ...(input.EvaluationId != null && { EvaluationId: input.EvaluationId }),
1611
- };
2114
+ var serializeAws_json1_1GetEvaluationInput = function (input, context) {
2115
+ return __assign({}, (input.EvaluationId != null && { EvaluationId: input.EvaluationId }));
1612
2116
  };
1613
- const serializeAws_json1_1GetMLModelInput = (input, context) => {
1614
- return {
1615
- ...(input.MLModelId != null && { MLModelId: input.MLModelId }),
1616
- ...(input.Verbose != null && { Verbose: input.Verbose }),
1617
- };
2117
+ var serializeAws_json1_1GetMLModelInput = function (input, context) {
2118
+ return __assign(__assign({}, (input.MLModelId != null && { MLModelId: input.MLModelId })), (input.Verbose != null && { Verbose: input.Verbose }));
1618
2119
  };
1619
- const serializeAws_json1_1PredictInput = (input, context) => {
1620
- return {
1621
- ...(input.MLModelId != null && { MLModelId: input.MLModelId }),
1622
- ...(input.PredictEndpoint != null && { PredictEndpoint: input.PredictEndpoint }),
1623
- ...(input.Record != null && { Record: serializeAws_json1_1Record(input.Record, context) }),
1624
- };
2120
+ var serializeAws_json1_1PredictInput = function (input, context) {
2121
+ return __assign(__assign(__assign({}, (input.MLModelId != null && { MLModelId: input.MLModelId })), (input.PredictEndpoint != null && { PredictEndpoint: input.PredictEndpoint })), (input.Record != null && { Record: serializeAws_json1_1Record(input.Record, context) }));
1625
2122
  };
1626
- const serializeAws_json1_1RDSDatabase = (input, context) => {
1627
- return {
1628
- ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }),
1629
- ...(input.InstanceIdentifier != null && { InstanceIdentifier: input.InstanceIdentifier }),
1630
- };
2123
+ var serializeAws_json1_1RDSDatabase = function (input, context) {
2124
+ return __assign(__assign({}, (input.DatabaseName != null && { DatabaseName: input.DatabaseName })), (input.InstanceIdentifier != null && { InstanceIdentifier: input.InstanceIdentifier }));
1631
2125
  };
1632
- const serializeAws_json1_1RDSDatabaseCredentials = (input, context) => {
1633
- return {
1634
- ...(input.Password != null && { Password: input.Password }),
1635
- ...(input.Username != null && { Username: input.Username }),
1636
- };
2126
+ var serializeAws_json1_1RDSDatabaseCredentials = function (input, context) {
2127
+ return __assign(__assign({}, (input.Password != null && { Password: input.Password })), (input.Username != null && { Username: input.Username }));
1637
2128
  };
1638
- const serializeAws_json1_1RDSDataSpec = (input, context) => {
1639
- return {
1640
- ...(input.DataRearrangement != null && { DataRearrangement: input.DataRearrangement }),
1641
- ...(input.DataSchema != null && { DataSchema: input.DataSchema }),
1642
- ...(input.DataSchemaUri != null && { DataSchemaUri: input.DataSchemaUri }),
1643
- ...(input.DatabaseCredentials != null && {
1644
- DatabaseCredentials: serializeAws_json1_1RDSDatabaseCredentials(input.DatabaseCredentials, context),
1645
- }),
1646
- ...(input.DatabaseInformation != null && {
1647
- DatabaseInformation: serializeAws_json1_1RDSDatabase(input.DatabaseInformation, context),
1648
- }),
1649
- ...(input.ResourceRole != null && { ResourceRole: input.ResourceRole }),
1650
- ...(input.S3StagingLocation != null && { S3StagingLocation: input.S3StagingLocation }),
1651
- ...(input.SecurityGroupIds != null && {
1652
- SecurityGroupIds: serializeAws_json1_1EDPSecurityGroupIds(input.SecurityGroupIds, context),
1653
- }),
1654
- ...(input.SelectSqlQuery != null && { SelectSqlQuery: input.SelectSqlQuery }),
1655
- ...(input.ServiceRole != null && { ServiceRole: input.ServiceRole }),
1656
- ...(input.SubnetId != null && { SubnetId: input.SubnetId }),
1657
- };
2129
+ var serializeAws_json1_1RDSDataSpec = function (input, context) {
2130
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.DataRearrangement != null && { DataRearrangement: input.DataRearrangement })), (input.DataSchema != null && { DataSchema: input.DataSchema })), (input.DataSchemaUri != null && { DataSchemaUri: input.DataSchemaUri })), (input.DatabaseCredentials != null && {
2131
+ DatabaseCredentials: serializeAws_json1_1RDSDatabaseCredentials(input.DatabaseCredentials, context),
2132
+ })), (input.DatabaseInformation != null && {
2133
+ DatabaseInformation: serializeAws_json1_1RDSDatabase(input.DatabaseInformation, context),
2134
+ })), (input.ResourceRole != null && { ResourceRole: input.ResourceRole })), (input.S3StagingLocation != null && { S3StagingLocation: input.S3StagingLocation })), (input.SecurityGroupIds != null && {
2135
+ SecurityGroupIds: serializeAws_json1_1EDPSecurityGroupIds(input.SecurityGroupIds, context),
2136
+ })), (input.SelectSqlQuery != null && { SelectSqlQuery: input.SelectSqlQuery })), (input.ServiceRole != null && { ServiceRole: input.ServiceRole })), (input.SubnetId != null && { SubnetId: input.SubnetId }));
1658
2137
  };
1659
- const serializeAws_json1_1Record = (input, context) => {
1660
- return Object.entries(input).reduce((acc, [key, value]) => {
2138
+ var serializeAws_json1_1Record = function (input, context) {
2139
+ return Object.entries(input).reduce(function (acc, _a) {
2140
+ var _b;
2141
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
1661
2142
  if (value === null) {
1662
2143
  return acc;
1663
2144
  }
1664
- return {
1665
- ...acc,
1666
- [key]: value,
1667
- };
2145
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
1668
2146
  }, {});
1669
2147
  };
1670
- const serializeAws_json1_1RedshiftDatabase = (input, context) => {
1671
- return {
1672
- ...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }),
1673
- ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }),
1674
- };
2148
+ var serializeAws_json1_1RedshiftDatabase = function (input, context) {
2149
+ return __assign(__assign({}, (input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier })), (input.DatabaseName != null && { DatabaseName: input.DatabaseName }));
1675
2150
  };
1676
- const serializeAws_json1_1RedshiftDatabaseCredentials = (input, context) => {
1677
- return {
1678
- ...(input.Password != null && { Password: input.Password }),
1679
- ...(input.Username != null && { Username: input.Username }),
1680
- };
2151
+ var serializeAws_json1_1RedshiftDatabaseCredentials = function (input, context) {
2152
+ return __assign(__assign({}, (input.Password != null && { Password: input.Password })), (input.Username != null && { Username: input.Username }));
1681
2153
  };
1682
- const serializeAws_json1_1RedshiftDataSpec = (input, context) => {
1683
- return {
1684
- ...(input.DataRearrangement != null && { DataRearrangement: input.DataRearrangement }),
1685
- ...(input.DataSchema != null && { DataSchema: input.DataSchema }),
1686
- ...(input.DataSchemaUri != null && { DataSchemaUri: input.DataSchemaUri }),
1687
- ...(input.DatabaseCredentials != null && {
1688
- DatabaseCredentials: serializeAws_json1_1RedshiftDatabaseCredentials(input.DatabaseCredentials, context),
1689
- }),
1690
- ...(input.DatabaseInformation != null && {
1691
- DatabaseInformation: serializeAws_json1_1RedshiftDatabase(input.DatabaseInformation, context),
1692
- }),
1693
- ...(input.S3StagingLocation != null && { S3StagingLocation: input.S3StagingLocation }),
1694
- ...(input.SelectSqlQuery != null && { SelectSqlQuery: input.SelectSqlQuery }),
1695
- };
2154
+ var serializeAws_json1_1RedshiftDataSpec = function (input, context) {
2155
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.DataRearrangement != null && { DataRearrangement: input.DataRearrangement })), (input.DataSchema != null && { DataSchema: input.DataSchema })), (input.DataSchemaUri != null && { DataSchemaUri: input.DataSchemaUri })), (input.DatabaseCredentials != null && {
2156
+ DatabaseCredentials: serializeAws_json1_1RedshiftDatabaseCredentials(input.DatabaseCredentials, context),
2157
+ })), (input.DatabaseInformation != null && {
2158
+ DatabaseInformation: serializeAws_json1_1RedshiftDatabase(input.DatabaseInformation, context),
2159
+ })), (input.S3StagingLocation != null && { S3StagingLocation: input.S3StagingLocation })), (input.SelectSqlQuery != null && { SelectSqlQuery: input.SelectSqlQuery }));
1696
2160
  };
1697
- const serializeAws_json1_1S3DataSpec = (input, context) => {
1698
- return {
1699
- ...(input.DataLocationS3 != null && { DataLocationS3: input.DataLocationS3 }),
1700
- ...(input.DataRearrangement != null && { DataRearrangement: input.DataRearrangement }),
1701
- ...(input.DataSchema != null && { DataSchema: input.DataSchema }),
1702
- ...(input.DataSchemaLocationS3 != null && { DataSchemaLocationS3: input.DataSchemaLocationS3 }),
1703
- };
2161
+ var serializeAws_json1_1S3DataSpec = function (input, context) {
2162
+ return __assign(__assign(__assign(__assign({}, (input.DataLocationS3 != null && { DataLocationS3: input.DataLocationS3 })), (input.DataRearrangement != null && { DataRearrangement: input.DataRearrangement })), (input.DataSchema != null && { DataSchema: input.DataSchema })), (input.DataSchemaLocationS3 != null && { DataSchemaLocationS3: input.DataSchemaLocationS3 }));
1704
2163
  };
1705
- const serializeAws_json1_1Tag = (input, context) => {
1706
- return {
1707
- ...(input.Key != null && { Key: input.Key }),
1708
- ...(input.Value != null && { Value: input.Value }),
1709
- };
2164
+ var serializeAws_json1_1Tag = function (input, context) {
2165
+ return __assign(__assign({}, (input.Key != null && { Key: input.Key })), (input.Value != null && { Value: input.Value }));
1710
2166
  };
1711
- const serializeAws_json1_1TagKeyList = (input, context) => {
2167
+ var serializeAws_json1_1TagKeyList = function (input, context) {
1712
2168
  return input
1713
- .filter((e) => e != null)
1714
- .map((entry) => {
2169
+ .filter(function (e) { return e != null; })
2170
+ .map(function (entry) {
1715
2171
  return entry;
1716
2172
  });
1717
2173
  };
1718
- const serializeAws_json1_1TagList = (input, context) => {
2174
+ var serializeAws_json1_1TagList = function (input, context) {
1719
2175
  return input
1720
- .filter((e) => e != null)
1721
- .map((entry) => {
2176
+ .filter(function (e) { return e != null; })
2177
+ .map(function (entry) {
1722
2178
  return serializeAws_json1_1Tag(entry, context);
1723
2179
  });
1724
2180
  };
1725
- const serializeAws_json1_1TrainingParameters = (input, context) => {
1726
- return Object.entries(input).reduce((acc, [key, value]) => {
2181
+ var serializeAws_json1_1TrainingParameters = function (input, context) {
2182
+ return Object.entries(input).reduce(function (acc, _a) {
2183
+ var _b;
2184
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
1727
2185
  if (value === null) {
1728
2186
  return acc;
1729
2187
  }
1730
- return {
1731
- ...acc,
1732
- [key]: value,
1733
- };
2188
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
1734
2189
  }, {});
1735
2190
  };
1736
- const serializeAws_json1_1UpdateBatchPredictionInput = (input, context) => {
1737
- return {
1738
- ...(input.BatchPredictionId != null && { BatchPredictionId: input.BatchPredictionId }),
1739
- ...(input.BatchPredictionName != null && { BatchPredictionName: input.BatchPredictionName }),
1740
- };
2191
+ var serializeAws_json1_1UpdateBatchPredictionInput = function (input, context) {
2192
+ return __assign(__assign({}, (input.BatchPredictionId != null && { BatchPredictionId: input.BatchPredictionId })), (input.BatchPredictionName != null && { BatchPredictionName: input.BatchPredictionName }));
1741
2193
  };
1742
- const serializeAws_json1_1UpdateDataSourceInput = (input, context) => {
1743
- return {
1744
- ...(input.DataSourceId != null && { DataSourceId: input.DataSourceId }),
1745
- ...(input.DataSourceName != null && { DataSourceName: input.DataSourceName }),
1746
- };
2194
+ var serializeAws_json1_1UpdateDataSourceInput = function (input, context) {
2195
+ return __assign(__assign({}, (input.DataSourceId != null && { DataSourceId: input.DataSourceId })), (input.DataSourceName != null && { DataSourceName: input.DataSourceName }));
1747
2196
  };
1748
- const serializeAws_json1_1UpdateEvaluationInput = (input, context) => {
1749
- return {
1750
- ...(input.EvaluationId != null && { EvaluationId: input.EvaluationId }),
1751
- ...(input.EvaluationName != null && { EvaluationName: input.EvaluationName }),
1752
- };
2197
+ var serializeAws_json1_1UpdateEvaluationInput = function (input, context) {
2198
+ return __assign(__assign({}, (input.EvaluationId != null && { EvaluationId: input.EvaluationId })), (input.EvaluationName != null && { EvaluationName: input.EvaluationName }));
1753
2199
  };
1754
- const serializeAws_json1_1UpdateMLModelInput = (input, context) => {
1755
- return {
1756
- ...(input.MLModelId != null && { MLModelId: input.MLModelId }),
1757
- ...(input.MLModelName != null && { MLModelName: input.MLModelName }),
1758
- ...(input.ScoreThreshold != null && { ScoreThreshold: __serializeFloat(input.ScoreThreshold) }),
1759
- };
2200
+ var serializeAws_json1_1UpdateMLModelInput = function (input, context) {
2201
+ return __assign(__assign(__assign({}, (input.MLModelId != null && { MLModelId: input.MLModelId })), (input.MLModelName != null && { MLModelName: input.MLModelName })), (input.ScoreThreshold != null && { ScoreThreshold: __serializeFloat(input.ScoreThreshold) }));
1760
2202
  };
1761
- const deserializeAws_json1_1AddTagsOutput = (output, context) => {
2203
+ var deserializeAws_json1_1AddTagsOutput = function (output, context) {
1762
2204
  return {
1763
2205
  ResourceId: __expectString(output.ResourceId),
1764
2206
  ResourceType: __expectString(output.ResourceType),
1765
2207
  };
1766
2208
  };
1767
- const deserializeAws_json1_1BatchPrediction = (output, context) => {
2209
+ var deserializeAws_json1_1BatchPrediction = function (output, context) {
1768
2210
  return {
1769
2211
  BatchPredictionDataSourceId: __expectString(output.BatchPredictionDataSourceId),
1770
2212
  BatchPredictionId: __expectString(output.BatchPredictionId),
@@ -1786,10 +2228,10 @@ const deserializeAws_json1_1BatchPrediction = (output, context) => {
1786
2228
  TotalRecordCount: __expectLong(output.TotalRecordCount),
1787
2229
  };
1788
2230
  };
1789
- const deserializeAws_json1_1BatchPredictions = (output, context) => {
1790
- const retVal = (output || [])
1791
- .filter((e) => e != null)
1792
- .map((entry) => {
2231
+ var deserializeAws_json1_1BatchPredictions = function (output, context) {
2232
+ var retVal = (output || [])
2233
+ .filter(function (e) { return e != null; })
2234
+ .map(function (entry) {
1793
2235
  if (entry === null) {
1794
2236
  return null;
1795
2237
  }
@@ -1797,37 +2239,37 @@ const deserializeAws_json1_1BatchPredictions = (output, context) => {
1797
2239
  });
1798
2240
  return retVal;
1799
2241
  };
1800
- const deserializeAws_json1_1CreateBatchPredictionOutput = (output, context) => {
2242
+ var deserializeAws_json1_1CreateBatchPredictionOutput = function (output, context) {
1801
2243
  return {
1802
2244
  BatchPredictionId: __expectString(output.BatchPredictionId),
1803
2245
  };
1804
2246
  };
1805
- const deserializeAws_json1_1CreateDataSourceFromRDSOutput = (output, context) => {
2247
+ var deserializeAws_json1_1CreateDataSourceFromRDSOutput = function (output, context) {
1806
2248
  return {
1807
2249
  DataSourceId: __expectString(output.DataSourceId),
1808
2250
  };
1809
2251
  };
1810
- const deserializeAws_json1_1CreateDataSourceFromRedshiftOutput = (output, context) => {
2252
+ var deserializeAws_json1_1CreateDataSourceFromRedshiftOutput = function (output, context) {
1811
2253
  return {
1812
2254
  DataSourceId: __expectString(output.DataSourceId),
1813
2255
  };
1814
2256
  };
1815
- const deserializeAws_json1_1CreateDataSourceFromS3Output = (output, context) => {
2257
+ var deserializeAws_json1_1CreateDataSourceFromS3Output = function (output, context) {
1816
2258
  return {
1817
2259
  DataSourceId: __expectString(output.DataSourceId),
1818
2260
  };
1819
2261
  };
1820
- const deserializeAws_json1_1CreateEvaluationOutput = (output, context) => {
2262
+ var deserializeAws_json1_1CreateEvaluationOutput = function (output, context) {
1821
2263
  return {
1822
2264
  EvaluationId: __expectString(output.EvaluationId),
1823
2265
  };
1824
2266
  };
1825
- const deserializeAws_json1_1CreateMLModelOutput = (output, context) => {
2267
+ var deserializeAws_json1_1CreateMLModelOutput = function (output, context) {
1826
2268
  return {
1827
2269
  MLModelId: __expectString(output.MLModelId),
1828
2270
  };
1829
2271
  };
1830
- const deserializeAws_json1_1CreateRealtimeEndpointOutput = (output, context) => {
2272
+ var deserializeAws_json1_1CreateRealtimeEndpointOutput = function (output, context) {
1831
2273
  return {
1832
2274
  MLModelId: __expectString(output.MLModelId),
1833
2275
  RealtimeEndpointInfo: output.RealtimeEndpointInfo != null
@@ -1835,7 +2277,7 @@ const deserializeAws_json1_1CreateRealtimeEndpointOutput = (output, context) =>
1835
2277
  : undefined,
1836
2278
  };
1837
2279
  };
1838
- const deserializeAws_json1_1DataSource = (output, context) => {
2280
+ var deserializeAws_json1_1DataSource = function (output, context) {
1839
2281
  return {
1840
2282
  ComputeStatistics: __expectBoolean(output.ComputeStatistics),
1841
2283
  ComputeTime: __expectLong(output.ComputeTime),
@@ -1861,10 +2303,10 @@ const deserializeAws_json1_1DataSource = (output, context) => {
1861
2303
  Status: __expectString(output.Status),
1862
2304
  };
1863
2305
  };
1864
- const deserializeAws_json1_1DataSources = (output, context) => {
1865
- const retVal = (output || [])
1866
- .filter((e) => e != null)
1867
- .map((entry) => {
2306
+ var deserializeAws_json1_1DataSources = function (output, context) {
2307
+ var retVal = (output || [])
2308
+ .filter(function (e) { return e != null; })
2309
+ .map(function (entry) {
1868
2310
  if (entry === null) {
1869
2311
  return null;
1870
2312
  }
@@ -1872,27 +2314,27 @@ const deserializeAws_json1_1DataSources = (output, context) => {
1872
2314
  });
1873
2315
  return retVal;
1874
2316
  };
1875
- const deserializeAws_json1_1DeleteBatchPredictionOutput = (output, context) => {
2317
+ var deserializeAws_json1_1DeleteBatchPredictionOutput = function (output, context) {
1876
2318
  return {
1877
2319
  BatchPredictionId: __expectString(output.BatchPredictionId),
1878
2320
  };
1879
2321
  };
1880
- const deserializeAws_json1_1DeleteDataSourceOutput = (output, context) => {
2322
+ var deserializeAws_json1_1DeleteDataSourceOutput = function (output, context) {
1881
2323
  return {
1882
2324
  DataSourceId: __expectString(output.DataSourceId),
1883
2325
  };
1884
2326
  };
1885
- const deserializeAws_json1_1DeleteEvaluationOutput = (output, context) => {
2327
+ var deserializeAws_json1_1DeleteEvaluationOutput = function (output, context) {
1886
2328
  return {
1887
2329
  EvaluationId: __expectString(output.EvaluationId),
1888
2330
  };
1889
2331
  };
1890
- const deserializeAws_json1_1DeleteMLModelOutput = (output, context) => {
2332
+ var deserializeAws_json1_1DeleteMLModelOutput = function (output, context) {
1891
2333
  return {
1892
2334
  MLModelId: __expectString(output.MLModelId),
1893
2335
  };
1894
2336
  };
1895
- const deserializeAws_json1_1DeleteRealtimeEndpointOutput = (output, context) => {
2337
+ var deserializeAws_json1_1DeleteRealtimeEndpointOutput = function (output, context) {
1896
2338
  return {
1897
2339
  MLModelId: __expectString(output.MLModelId),
1898
2340
  RealtimeEndpointInfo: output.RealtimeEndpointInfo != null
@@ -1900,55 +2342,54 @@ const deserializeAws_json1_1DeleteRealtimeEndpointOutput = (output, context) =>
1900
2342
  : undefined,
1901
2343
  };
1902
2344
  };
1903
- const deserializeAws_json1_1DeleteTagsOutput = (output, context) => {
2345
+ var deserializeAws_json1_1DeleteTagsOutput = function (output, context) {
1904
2346
  return {
1905
2347
  ResourceId: __expectString(output.ResourceId),
1906
2348
  ResourceType: __expectString(output.ResourceType),
1907
2349
  };
1908
2350
  };
1909
- const deserializeAws_json1_1DescribeBatchPredictionsOutput = (output, context) => {
2351
+ var deserializeAws_json1_1DescribeBatchPredictionsOutput = function (output, context) {
1910
2352
  return {
1911
2353
  NextToken: __expectString(output.NextToken),
1912
2354
  Results: output.Results != null ? deserializeAws_json1_1BatchPredictions(output.Results, context) : undefined,
1913
2355
  };
1914
2356
  };
1915
- const deserializeAws_json1_1DescribeDataSourcesOutput = (output, context) => {
2357
+ var deserializeAws_json1_1DescribeDataSourcesOutput = function (output, context) {
1916
2358
  return {
1917
2359
  NextToken: __expectString(output.NextToken),
1918
2360
  Results: output.Results != null ? deserializeAws_json1_1DataSources(output.Results, context) : undefined,
1919
2361
  };
1920
2362
  };
1921
- const deserializeAws_json1_1DescribeEvaluationsOutput = (output, context) => {
2363
+ var deserializeAws_json1_1DescribeEvaluationsOutput = function (output, context) {
1922
2364
  return {
1923
2365
  NextToken: __expectString(output.NextToken),
1924
2366
  Results: output.Results != null ? deserializeAws_json1_1Evaluations(output.Results, context) : undefined,
1925
2367
  };
1926
2368
  };
1927
- const deserializeAws_json1_1DescribeMLModelsOutput = (output, context) => {
2369
+ var deserializeAws_json1_1DescribeMLModelsOutput = function (output, context) {
1928
2370
  return {
1929
2371
  NextToken: __expectString(output.NextToken),
1930
2372
  Results: output.Results != null ? deserializeAws_json1_1MLModels(output.Results, context) : undefined,
1931
2373
  };
1932
2374
  };
1933
- const deserializeAws_json1_1DescribeTagsOutput = (output, context) => {
2375
+ var deserializeAws_json1_1DescribeTagsOutput = function (output, context) {
1934
2376
  return {
1935
2377
  ResourceId: __expectString(output.ResourceId),
1936
2378
  ResourceType: __expectString(output.ResourceType),
1937
2379
  Tags: output.Tags != null ? deserializeAws_json1_1TagList(output.Tags, context) : undefined,
1938
2380
  };
1939
2381
  };
1940
- const deserializeAws_json1_1DetailsMap = (output, context) => {
1941
- return Object.entries(output).reduce((acc, [key, value]) => {
2382
+ var deserializeAws_json1_1DetailsMap = function (output, context) {
2383
+ return Object.entries(output).reduce(function (acc, _a) {
2384
+ var _b;
2385
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
1942
2386
  if (value === null) {
1943
2387
  return acc;
1944
2388
  }
1945
- return {
1946
- ...acc,
1947
- [key]: __expectString(value),
1948
- };
2389
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
1949
2390
  }, {});
1950
2391
  };
1951
- const deserializeAws_json1_1Evaluation = (output, context) => {
2392
+ var deserializeAws_json1_1Evaluation = function (output, context) {
1952
2393
  return {
1953
2394
  ComputeTime: __expectLong(output.ComputeTime),
1954
2395
  CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
@@ -1970,10 +2411,10 @@ const deserializeAws_json1_1Evaluation = (output, context) => {
1970
2411
  Status: __expectString(output.Status),
1971
2412
  };
1972
2413
  };
1973
- const deserializeAws_json1_1Evaluations = (output, context) => {
1974
- const retVal = (output || [])
1975
- .filter((e) => e != null)
1976
- .map((entry) => {
2414
+ var deserializeAws_json1_1Evaluations = function (output, context) {
2415
+ var retVal = (output || [])
2416
+ .filter(function (e) { return e != null; })
2417
+ .map(function (entry) {
1977
2418
  if (entry === null) {
1978
2419
  return null;
1979
2420
  }
@@ -1981,7 +2422,7 @@ const deserializeAws_json1_1Evaluations = (output, context) => {
1981
2422
  });
1982
2423
  return retVal;
1983
2424
  };
1984
- const deserializeAws_json1_1GetBatchPredictionOutput = (output, context) => {
2425
+ var deserializeAws_json1_1GetBatchPredictionOutput = function (output, context) {
1985
2426
  return {
1986
2427
  BatchPredictionDataSourceId: __expectString(output.BatchPredictionDataSourceId),
1987
2428
  BatchPredictionId: __expectString(output.BatchPredictionId),
@@ -2004,7 +2445,7 @@ const deserializeAws_json1_1GetBatchPredictionOutput = (output, context) => {
2004
2445
  TotalRecordCount: __expectLong(output.TotalRecordCount),
2005
2446
  };
2006
2447
  };
2007
- const deserializeAws_json1_1GetDataSourceOutput = (output, context) => {
2448
+ var deserializeAws_json1_1GetDataSourceOutput = function (output, context) {
2008
2449
  return {
2009
2450
  ComputeStatistics: __expectBoolean(output.ComputeStatistics),
2010
2451
  ComputeTime: __expectLong(output.ComputeTime),
@@ -2032,7 +2473,7 @@ const deserializeAws_json1_1GetDataSourceOutput = (output, context) => {
2032
2473
  Status: __expectString(output.Status),
2033
2474
  };
2034
2475
  };
2035
- const deserializeAws_json1_1GetEvaluationOutput = (output, context) => {
2476
+ var deserializeAws_json1_1GetEvaluationOutput = function (output, context) {
2036
2477
  return {
2037
2478
  ComputeTime: __expectLong(output.ComputeTime),
2038
2479
  CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
@@ -2055,7 +2496,7 @@ const deserializeAws_json1_1GetEvaluationOutput = (output, context) => {
2055
2496
  Status: __expectString(output.Status),
2056
2497
  };
2057
2498
  };
2058
- const deserializeAws_json1_1GetMLModelOutput = (output, context) => {
2499
+ var deserializeAws_json1_1GetMLModelOutput = function (output, context) {
2059
2500
  return {
2060
2501
  ComputeTime: __expectLong(output.ComputeTime),
2061
2502
  CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
@@ -2088,36 +2529,36 @@ const deserializeAws_json1_1GetMLModelOutput = (output, context) => {
2088
2529
  : undefined,
2089
2530
  };
2090
2531
  };
2091
- const deserializeAws_json1_1IdempotentParameterMismatchException = (output, context) => {
2532
+ var deserializeAws_json1_1IdempotentParameterMismatchException = function (output, context) {
2092
2533
  return {
2093
2534
  code: __expectInt32(output.code),
2094
2535
  message: __expectString(output.message),
2095
2536
  };
2096
2537
  };
2097
- const deserializeAws_json1_1InternalServerException = (output, context) => {
2538
+ var deserializeAws_json1_1InternalServerException = function (output, context) {
2098
2539
  return {
2099
2540
  code: __expectInt32(output.code),
2100
2541
  message: __expectString(output.message),
2101
2542
  };
2102
2543
  };
2103
- const deserializeAws_json1_1InvalidInputException = (output, context) => {
2544
+ var deserializeAws_json1_1InvalidInputException = function (output, context) {
2104
2545
  return {
2105
2546
  code: __expectInt32(output.code),
2106
2547
  message: __expectString(output.message),
2107
2548
  };
2108
2549
  };
2109
- const deserializeAws_json1_1InvalidTagException = (output, context) => {
2550
+ var deserializeAws_json1_1InvalidTagException = function (output, context) {
2110
2551
  return {
2111
2552
  message: __expectString(output.message),
2112
2553
  };
2113
2554
  };
2114
- const deserializeAws_json1_1LimitExceededException = (output, context) => {
2555
+ var deserializeAws_json1_1LimitExceededException = function (output, context) {
2115
2556
  return {
2116
2557
  code: __expectInt32(output.code),
2117
2558
  message: __expectString(output.message),
2118
2559
  };
2119
2560
  };
2120
- const deserializeAws_json1_1MLModel = (output, context) => {
2561
+ var deserializeAws_json1_1MLModel = function (output, context) {
2121
2562
  return {
2122
2563
  Algorithm: __expectString(output.Algorithm),
2123
2564
  ComputeTime: __expectLong(output.ComputeTime),
@@ -2148,10 +2589,10 @@ const deserializeAws_json1_1MLModel = (output, context) => {
2148
2589
  : undefined,
2149
2590
  };
2150
2591
  };
2151
- const deserializeAws_json1_1MLModels = (output, context) => {
2152
- const retVal = (output || [])
2153
- .filter((e) => e != null)
2154
- .map((entry) => {
2592
+ var deserializeAws_json1_1MLModels = function (output, context) {
2593
+ var retVal = (output || [])
2594
+ .filter(function (e) { return e != null; })
2595
+ .map(function (entry) {
2155
2596
  if (entry === null) {
2156
2597
  return null;
2157
2598
  }
@@ -2159,25 +2600,24 @@ const deserializeAws_json1_1MLModels = (output, context) => {
2159
2600
  });
2160
2601
  return retVal;
2161
2602
  };
2162
- const deserializeAws_json1_1PerformanceMetrics = (output, context) => {
2603
+ var deserializeAws_json1_1PerformanceMetrics = function (output, context) {
2163
2604
  return {
2164
2605
  Properties: output.Properties != null
2165
2606
  ? deserializeAws_json1_1PerformanceMetricsProperties(output.Properties, context)
2166
2607
  : undefined,
2167
2608
  };
2168
2609
  };
2169
- const deserializeAws_json1_1PerformanceMetricsProperties = (output, context) => {
2170
- return Object.entries(output).reduce((acc, [key, value]) => {
2610
+ var deserializeAws_json1_1PerformanceMetricsProperties = function (output, context) {
2611
+ return Object.entries(output).reduce(function (acc, _a) {
2612
+ var _b;
2613
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
2171
2614
  if (value === null) {
2172
2615
  return acc;
2173
2616
  }
2174
- return {
2175
- ...acc,
2176
- [key]: __expectString(value),
2177
- };
2617
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
2178
2618
  }, {});
2179
2619
  };
2180
- const deserializeAws_json1_1Prediction = (output, context) => {
2620
+ var deserializeAws_json1_1Prediction = function (output, context) {
2181
2621
  return {
2182
2622
  details: output.details != null ? deserializeAws_json1_1DetailsMap(output.details, context) : undefined,
2183
2623
  predictedLabel: __expectString(output.predictedLabel),
@@ -2187,23 +2627,23 @@ const deserializeAws_json1_1Prediction = (output, context) => {
2187
2627
  predictedValue: __limitedParseFloat32(output.predictedValue),
2188
2628
  };
2189
2629
  };
2190
- const deserializeAws_json1_1PredictorNotMountedException = (output, context) => {
2630
+ var deserializeAws_json1_1PredictorNotMountedException = function (output, context) {
2191
2631
  return {
2192
2632
  message: __expectString(output.message),
2193
2633
  };
2194
2634
  };
2195
- const deserializeAws_json1_1PredictOutput = (output, context) => {
2635
+ var deserializeAws_json1_1PredictOutput = function (output, context) {
2196
2636
  return {
2197
2637
  Prediction: output.Prediction != null ? deserializeAws_json1_1Prediction(output.Prediction, context) : undefined,
2198
2638
  };
2199
2639
  };
2200
- const deserializeAws_json1_1RDSDatabase = (output, context) => {
2640
+ var deserializeAws_json1_1RDSDatabase = function (output, context) {
2201
2641
  return {
2202
2642
  DatabaseName: __expectString(output.DatabaseName),
2203
2643
  InstanceIdentifier: __expectString(output.InstanceIdentifier),
2204
2644
  };
2205
2645
  };
2206
- const deserializeAws_json1_1RDSMetadata = (output, context) => {
2646
+ var deserializeAws_json1_1RDSMetadata = function (output, context) {
2207
2647
  return {
2208
2648
  DataPipelineId: __expectString(output.DataPipelineId),
2209
2649
  Database: output.Database != null ? deserializeAws_json1_1RDSDatabase(output.Database, context) : undefined,
@@ -2213,7 +2653,7 @@ const deserializeAws_json1_1RDSMetadata = (output, context) => {
2213
2653
  ServiceRole: __expectString(output.ServiceRole),
2214
2654
  };
2215
2655
  };
2216
- const deserializeAws_json1_1RealtimeEndpointInfo = (output, context) => {
2656
+ var deserializeAws_json1_1RealtimeEndpointInfo = function (output, context) {
2217
2657
  return {
2218
2658
  CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
2219
2659
  EndpointStatus: __expectString(output.EndpointStatus),
@@ -2221,13 +2661,13 @@ const deserializeAws_json1_1RealtimeEndpointInfo = (output, context) => {
2221
2661
  PeakRequestsPerSecond: __expectInt32(output.PeakRequestsPerSecond),
2222
2662
  };
2223
2663
  };
2224
- const deserializeAws_json1_1RedshiftDatabase = (output, context) => {
2664
+ var deserializeAws_json1_1RedshiftDatabase = function (output, context) {
2225
2665
  return {
2226
2666
  ClusterIdentifier: __expectString(output.ClusterIdentifier),
2227
2667
  DatabaseName: __expectString(output.DatabaseName),
2228
2668
  };
2229
2669
  };
2230
- const deserializeAws_json1_1RedshiftMetadata = (output, context) => {
2670
+ var deserializeAws_json1_1RedshiftMetadata = function (output, context) {
2231
2671
  return {
2232
2672
  DatabaseUserName: __expectString(output.DatabaseUserName),
2233
2673
  RedshiftDatabase: output.RedshiftDatabase != null
@@ -2236,38 +2676,37 @@ const deserializeAws_json1_1RedshiftMetadata = (output, context) => {
2236
2676
  SelectSqlQuery: __expectString(output.SelectSqlQuery),
2237
2677
  };
2238
2678
  };
2239
- const deserializeAws_json1_1ResourceNotFoundException = (output, context) => {
2679
+ var deserializeAws_json1_1ResourceNotFoundException = function (output, context) {
2240
2680
  return {
2241
2681
  code: __expectInt32(output.code),
2242
2682
  message: __expectString(output.message),
2243
2683
  };
2244
2684
  };
2245
- const deserializeAws_json1_1ScoreValuePerLabelMap = (output, context) => {
2246
- return Object.entries(output).reduce((acc, [key, value]) => {
2685
+ var deserializeAws_json1_1ScoreValuePerLabelMap = function (output, context) {
2686
+ return Object.entries(output).reduce(function (acc, _a) {
2687
+ var _b;
2688
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
2247
2689
  if (value === null) {
2248
2690
  return acc;
2249
2691
  }
2250
- return {
2251
- ...acc,
2252
- [key]: __limitedParseFloat32(value),
2253
- };
2692
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = __limitedParseFloat32(value), _b));
2254
2693
  }, {});
2255
2694
  };
2256
- const deserializeAws_json1_1Tag = (output, context) => {
2695
+ var deserializeAws_json1_1Tag = function (output, context) {
2257
2696
  return {
2258
2697
  Key: __expectString(output.Key),
2259
2698
  Value: __expectString(output.Value),
2260
2699
  };
2261
2700
  };
2262
- const deserializeAws_json1_1TagLimitExceededException = (output, context) => {
2701
+ var deserializeAws_json1_1TagLimitExceededException = function (output, context) {
2263
2702
  return {
2264
2703
  message: __expectString(output.message),
2265
2704
  };
2266
2705
  };
2267
- const deserializeAws_json1_1TagList = (output, context) => {
2268
- const retVal = (output || [])
2269
- .filter((e) => e != null)
2270
- .map((entry) => {
2706
+ var deserializeAws_json1_1TagList = function (output, context) {
2707
+ var retVal = (output || [])
2708
+ .filter(function (e) { return e != null; })
2709
+ .map(function (entry) {
2271
2710
  if (entry === null) {
2272
2711
  return null;
2273
2712
  }
@@ -2275,83 +2714,105 @@ const deserializeAws_json1_1TagList = (output, context) => {
2275
2714
  });
2276
2715
  return retVal;
2277
2716
  };
2278
- const deserializeAws_json1_1TrainingParameters = (output, context) => {
2279
- return Object.entries(output).reduce((acc, [key, value]) => {
2717
+ var deserializeAws_json1_1TrainingParameters = function (output, context) {
2718
+ return Object.entries(output).reduce(function (acc, _a) {
2719
+ var _b;
2720
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
2280
2721
  if (value === null) {
2281
2722
  return acc;
2282
2723
  }
2283
- return {
2284
- ...acc,
2285
- [key]: __expectString(value),
2286
- };
2724
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
2287
2725
  }, {});
2288
2726
  };
2289
- const deserializeAws_json1_1UpdateBatchPredictionOutput = (output, context) => {
2727
+ var deserializeAws_json1_1UpdateBatchPredictionOutput = function (output, context) {
2290
2728
  return {
2291
2729
  BatchPredictionId: __expectString(output.BatchPredictionId),
2292
2730
  };
2293
2731
  };
2294
- const deserializeAws_json1_1UpdateDataSourceOutput = (output, context) => {
2732
+ var deserializeAws_json1_1UpdateDataSourceOutput = function (output, context) {
2295
2733
  return {
2296
2734
  DataSourceId: __expectString(output.DataSourceId),
2297
2735
  };
2298
2736
  };
2299
- const deserializeAws_json1_1UpdateEvaluationOutput = (output, context) => {
2737
+ var deserializeAws_json1_1UpdateEvaluationOutput = function (output, context) {
2300
2738
  return {
2301
2739
  EvaluationId: __expectString(output.EvaluationId),
2302
2740
  };
2303
2741
  };
2304
- const deserializeAws_json1_1UpdateMLModelOutput = (output, context) => {
2742
+ var deserializeAws_json1_1UpdateMLModelOutput = function (output, context) {
2305
2743
  return {
2306
2744
  MLModelId: __expectString(output.MLModelId),
2307
2745
  };
2308
2746
  };
2309
- const deserializeMetadata = (output) => ({
2310
- httpStatusCode: output.statusCode,
2311
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
2312
- extendedRequestId: output.headers["x-amz-id-2"],
2313
- cfId: output.headers["x-amz-cf-id"],
2314
- });
2315
- const collectBody = (streamBody = new Uint8Array(), context) => {
2747
+ var deserializeMetadata = function (output) {
2748
+ var _a, _b;
2749
+ return ({
2750
+ httpStatusCode: output.statusCode,
2751
+ requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
2752
+ extendedRequestId: output.headers["x-amz-id-2"],
2753
+ cfId: output.headers["x-amz-cf-id"],
2754
+ });
2755
+ };
2756
+ var collectBody = function (streamBody, context) {
2757
+ if (streamBody === void 0) { streamBody = new Uint8Array(); }
2316
2758
  if (streamBody instanceof Uint8Array) {
2317
2759
  return Promise.resolve(streamBody);
2318
2760
  }
2319
2761
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2320
2762
  };
2321
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
2322
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2323
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2324
- const contents = {
2325
- protocol,
2326
- hostname,
2327
- port,
2328
- method: "POST",
2329
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2330
- headers,
2331
- };
2332
- if (resolvedHostname !== undefined) {
2333
- contents.hostname = resolvedHostname;
2334
- }
2335
- if (body !== undefined) {
2336
- contents.body = body;
2337
- }
2338
- return new __HttpRequest(contents);
2763
+ var collectBodyString = function (streamBody, context) {
2764
+ return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
2765
+ };
2766
+ var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, body) { return __awaiter(void 0, void 0, void 0, function () {
2767
+ var _a, hostname, _b, protocol, port, basePath, contents;
2768
+ return __generator(this, function (_c) {
2769
+ switch (_c.label) {
2770
+ case 0: return [4, context.endpoint()];
2771
+ case 1:
2772
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
2773
+ contents = {
2774
+ protocol: protocol,
2775
+ hostname: hostname,
2776
+ port: port,
2777
+ method: "POST",
2778
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2779
+ headers: headers,
2780
+ };
2781
+ if (resolvedHostname !== undefined) {
2782
+ contents.hostname = resolvedHostname;
2783
+ }
2784
+ if (body !== undefined) {
2785
+ contents.body = body;
2786
+ }
2787
+ return [2, new __HttpRequest(contents)];
2788
+ }
2789
+ });
2790
+ }); };
2791
+ var parseBody = function (streamBody, context) {
2792
+ return collectBodyString(streamBody, context).then(function (encoded) {
2793
+ if (encoded.length) {
2794
+ return JSON.parse(encoded);
2795
+ }
2796
+ return {};
2797
+ });
2339
2798
  };
2340
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2341
- if (encoded.length) {
2342
- return JSON.parse(encoded);
2343
- }
2344
- return {};
2345
- });
2346
- const parseErrorBody = async (errorBody, context) => {
2347
- const value = await parseBody(errorBody, context);
2348
- value.message = value.message ?? value.Message;
2349
- return value;
2350
- };
2351
- const loadRestJsonErrorCode = (output, data) => {
2352
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2353
- const sanitizeErrorCode = (rawValue) => {
2354
- let cleanValue = rawValue;
2799
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
2800
+ var value;
2801
+ var _a;
2802
+ return __generator(this, function (_b) {
2803
+ switch (_b.label) {
2804
+ case 0: return [4, parseBody(errorBody, context)];
2805
+ case 1:
2806
+ value = _b.sent();
2807
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
2808
+ return [2, value];
2809
+ }
2810
+ });
2811
+ }); };
2812
+ var loadRestJsonErrorCode = function (output, data) {
2813
+ var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
2814
+ var sanitizeErrorCode = function (rawValue) {
2815
+ var cleanValue = rawValue;
2355
2816
  if (typeof cleanValue === "number") {
2356
2817
  cleanValue = cleanValue.toString();
2357
2818
  }
@@ -2366,7 +2827,7 @@ const loadRestJsonErrorCode = (output, data) => {
2366
2827
  }
2367
2828
  return cleanValue;
2368
2829
  };
2369
- const headerKey = findKey(output.headers, "x-amzn-errortype");
2830
+ var headerKey = findKey(output.headers, "x-amzn-errortype");
2370
2831
  if (headerKey !== undefined) {
2371
2832
  return sanitizeErrorCode(output.headers[headerKey]);
2372
2833
  }