@aws-sdk/client-machine-learning 3.312.0 → 3.315.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.
@@ -9,189 +9,189 @@ const models_0_1 = require("../models/models_0");
9
9
  const se_AddTagsCommand = async (input, context) => {
10
10
  const headers = sharedHeaders("AddTags");
11
11
  let body;
12
- body = JSON.stringify(se_AddTagsInput(input, context));
12
+ body = JSON.stringify((0, smithy_client_1._json)(input));
13
13
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
14
14
  };
15
15
  exports.se_AddTagsCommand = se_AddTagsCommand;
16
16
  const se_CreateBatchPredictionCommand = async (input, context) => {
17
17
  const headers = sharedHeaders("CreateBatchPrediction");
18
18
  let body;
19
- body = JSON.stringify(se_CreateBatchPredictionInput(input, context));
19
+ body = JSON.stringify((0, smithy_client_1._json)(input));
20
20
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
21
21
  };
22
22
  exports.se_CreateBatchPredictionCommand = se_CreateBatchPredictionCommand;
23
23
  const se_CreateDataSourceFromRDSCommand = async (input, context) => {
24
24
  const headers = sharedHeaders("CreateDataSourceFromRDS");
25
25
  let body;
26
- body = JSON.stringify(se_CreateDataSourceFromRDSInput(input, context));
26
+ body = JSON.stringify((0, smithy_client_1._json)(input));
27
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
28
  };
29
29
  exports.se_CreateDataSourceFromRDSCommand = se_CreateDataSourceFromRDSCommand;
30
30
  const se_CreateDataSourceFromRedshiftCommand = async (input, context) => {
31
31
  const headers = sharedHeaders("CreateDataSourceFromRedshift");
32
32
  let body;
33
- body = JSON.stringify(se_CreateDataSourceFromRedshiftInput(input, context));
33
+ body = JSON.stringify((0, smithy_client_1._json)(input));
34
34
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
35
  };
36
36
  exports.se_CreateDataSourceFromRedshiftCommand = se_CreateDataSourceFromRedshiftCommand;
37
37
  const se_CreateDataSourceFromS3Command = async (input, context) => {
38
38
  const headers = sharedHeaders("CreateDataSourceFromS3");
39
39
  let body;
40
- body = JSON.stringify(se_CreateDataSourceFromS3Input(input, context));
40
+ body = JSON.stringify((0, smithy_client_1._json)(input));
41
41
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
42
42
  };
43
43
  exports.se_CreateDataSourceFromS3Command = se_CreateDataSourceFromS3Command;
44
44
  const se_CreateEvaluationCommand = async (input, context) => {
45
45
  const headers = sharedHeaders("CreateEvaluation");
46
46
  let body;
47
- body = JSON.stringify(se_CreateEvaluationInput(input, context));
47
+ body = JSON.stringify((0, smithy_client_1._json)(input));
48
48
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
49
  };
50
50
  exports.se_CreateEvaluationCommand = se_CreateEvaluationCommand;
51
51
  const se_CreateMLModelCommand = async (input, context) => {
52
52
  const headers = sharedHeaders("CreateMLModel");
53
53
  let body;
54
- body = JSON.stringify(se_CreateMLModelInput(input, context));
54
+ body = JSON.stringify((0, smithy_client_1._json)(input));
55
55
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
56
56
  };
57
57
  exports.se_CreateMLModelCommand = se_CreateMLModelCommand;
58
58
  const se_CreateRealtimeEndpointCommand = async (input, context) => {
59
59
  const headers = sharedHeaders("CreateRealtimeEndpoint");
60
60
  let body;
61
- body = JSON.stringify(se_CreateRealtimeEndpointInput(input, context));
61
+ body = JSON.stringify((0, smithy_client_1._json)(input));
62
62
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
63
63
  };
64
64
  exports.se_CreateRealtimeEndpointCommand = se_CreateRealtimeEndpointCommand;
65
65
  const se_DeleteBatchPredictionCommand = async (input, context) => {
66
66
  const headers = sharedHeaders("DeleteBatchPrediction");
67
67
  let body;
68
- body = JSON.stringify(se_DeleteBatchPredictionInput(input, context));
68
+ body = JSON.stringify((0, smithy_client_1._json)(input));
69
69
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
70
70
  };
71
71
  exports.se_DeleteBatchPredictionCommand = se_DeleteBatchPredictionCommand;
72
72
  const se_DeleteDataSourceCommand = async (input, context) => {
73
73
  const headers = sharedHeaders("DeleteDataSource");
74
74
  let body;
75
- body = JSON.stringify(se_DeleteDataSourceInput(input, context));
75
+ body = JSON.stringify((0, smithy_client_1._json)(input));
76
76
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
77
  };
78
78
  exports.se_DeleteDataSourceCommand = se_DeleteDataSourceCommand;
79
79
  const se_DeleteEvaluationCommand = async (input, context) => {
80
80
  const headers = sharedHeaders("DeleteEvaluation");
81
81
  let body;
82
- body = JSON.stringify(se_DeleteEvaluationInput(input, context));
82
+ body = JSON.stringify((0, smithy_client_1._json)(input));
83
83
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
84
84
  };
85
85
  exports.se_DeleteEvaluationCommand = se_DeleteEvaluationCommand;
86
86
  const se_DeleteMLModelCommand = async (input, context) => {
87
87
  const headers = sharedHeaders("DeleteMLModel");
88
88
  let body;
89
- body = JSON.stringify(se_DeleteMLModelInput(input, context));
89
+ body = JSON.stringify((0, smithy_client_1._json)(input));
90
90
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
91
91
  };
92
92
  exports.se_DeleteMLModelCommand = se_DeleteMLModelCommand;
93
93
  const se_DeleteRealtimeEndpointCommand = async (input, context) => {
94
94
  const headers = sharedHeaders("DeleteRealtimeEndpoint");
95
95
  let body;
96
- body = JSON.stringify(se_DeleteRealtimeEndpointInput(input, context));
96
+ body = JSON.stringify((0, smithy_client_1._json)(input));
97
97
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
98
98
  };
99
99
  exports.se_DeleteRealtimeEndpointCommand = se_DeleteRealtimeEndpointCommand;
100
100
  const se_DeleteTagsCommand = async (input, context) => {
101
101
  const headers = sharedHeaders("DeleteTags");
102
102
  let body;
103
- body = JSON.stringify(se_DeleteTagsInput(input, context));
103
+ body = JSON.stringify((0, smithy_client_1._json)(input));
104
104
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
105
105
  };
106
106
  exports.se_DeleteTagsCommand = se_DeleteTagsCommand;
107
107
  const se_DescribeBatchPredictionsCommand = async (input, context) => {
108
108
  const headers = sharedHeaders("DescribeBatchPredictions");
109
109
  let body;
110
- body = JSON.stringify(se_DescribeBatchPredictionsInput(input, context));
110
+ body = JSON.stringify((0, smithy_client_1._json)(input));
111
111
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
112
  };
113
113
  exports.se_DescribeBatchPredictionsCommand = se_DescribeBatchPredictionsCommand;
114
114
  const se_DescribeDataSourcesCommand = async (input, context) => {
115
115
  const headers = sharedHeaders("DescribeDataSources");
116
116
  let body;
117
- body = JSON.stringify(se_DescribeDataSourcesInput(input, context));
117
+ body = JSON.stringify((0, smithy_client_1._json)(input));
118
118
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
119
119
  };
120
120
  exports.se_DescribeDataSourcesCommand = se_DescribeDataSourcesCommand;
121
121
  const se_DescribeEvaluationsCommand = async (input, context) => {
122
122
  const headers = sharedHeaders("DescribeEvaluations");
123
123
  let body;
124
- body = JSON.stringify(se_DescribeEvaluationsInput(input, context));
124
+ body = JSON.stringify((0, smithy_client_1._json)(input));
125
125
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
126
126
  };
127
127
  exports.se_DescribeEvaluationsCommand = se_DescribeEvaluationsCommand;
128
128
  const se_DescribeMLModelsCommand = async (input, context) => {
129
129
  const headers = sharedHeaders("DescribeMLModels");
130
130
  let body;
131
- body = JSON.stringify(se_DescribeMLModelsInput(input, context));
131
+ body = JSON.stringify((0, smithy_client_1._json)(input));
132
132
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
133
133
  };
134
134
  exports.se_DescribeMLModelsCommand = se_DescribeMLModelsCommand;
135
135
  const se_DescribeTagsCommand = async (input, context) => {
136
136
  const headers = sharedHeaders("DescribeTags");
137
137
  let body;
138
- body = JSON.stringify(se_DescribeTagsInput(input, context));
138
+ body = JSON.stringify((0, smithy_client_1._json)(input));
139
139
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
140
140
  };
141
141
  exports.se_DescribeTagsCommand = se_DescribeTagsCommand;
142
142
  const se_GetBatchPredictionCommand = async (input, context) => {
143
143
  const headers = sharedHeaders("GetBatchPrediction");
144
144
  let body;
145
- body = JSON.stringify(se_GetBatchPredictionInput(input, context));
145
+ body = JSON.stringify((0, smithy_client_1._json)(input));
146
146
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
147
147
  };
148
148
  exports.se_GetBatchPredictionCommand = se_GetBatchPredictionCommand;
149
149
  const se_GetDataSourceCommand = async (input, context) => {
150
150
  const headers = sharedHeaders("GetDataSource");
151
151
  let body;
152
- body = JSON.stringify(se_GetDataSourceInput(input, context));
152
+ body = JSON.stringify((0, smithy_client_1._json)(input));
153
153
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
154
154
  };
155
155
  exports.se_GetDataSourceCommand = se_GetDataSourceCommand;
156
156
  const se_GetEvaluationCommand = async (input, context) => {
157
157
  const headers = sharedHeaders("GetEvaluation");
158
158
  let body;
159
- body = JSON.stringify(se_GetEvaluationInput(input, context));
159
+ body = JSON.stringify((0, smithy_client_1._json)(input));
160
160
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
161
161
  };
162
162
  exports.se_GetEvaluationCommand = se_GetEvaluationCommand;
163
163
  const se_GetMLModelCommand = async (input, context) => {
164
164
  const headers = sharedHeaders("GetMLModel");
165
165
  let body;
166
- body = JSON.stringify(se_GetMLModelInput(input, context));
166
+ body = JSON.stringify((0, smithy_client_1._json)(input));
167
167
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
168
168
  };
169
169
  exports.se_GetMLModelCommand = se_GetMLModelCommand;
170
170
  const se_PredictCommand = async (input, context) => {
171
171
  const headers = sharedHeaders("Predict");
172
172
  let body;
173
- body = JSON.stringify(se_PredictInput(input, context));
173
+ body = JSON.stringify((0, smithy_client_1._json)(input));
174
174
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
175
175
  };
176
176
  exports.se_PredictCommand = se_PredictCommand;
177
177
  const se_UpdateBatchPredictionCommand = async (input, context) => {
178
178
  const headers = sharedHeaders("UpdateBatchPrediction");
179
179
  let body;
180
- body = JSON.stringify(se_UpdateBatchPredictionInput(input, context));
180
+ body = JSON.stringify((0, smithy_client_1._json)(input));
181
181
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
182
182
  };
183
183
  exports.se_UpdateBatchPredictionCommand = se_UpdateBatchPredictionCommand;
184
184
  const se_UpdateDataSourceCommand = async (input, context) => {
185
185
  const headers = sharedHeaders("UpdateDataSource");
186
186
  let body;
187
- body = JSON.stringify(se_UpdateDataSourceInput(input, context));
187
+ body = JSON.stringify((0, smithy_client_1._json)(input));
188
188
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
189
189
  };
190
190
  exports.se_UpdateDataSourceCommand = se_UpdateDataSourceCommand;
191
191
  const se_UpdateEvaluationCommand = async (input, context) => {
192
192
  const headers = sharedHeaders("UpdateEvaluation");
193
193
  let body;
194
- body = JSON.stringify(se_UpdateEvaluationInput(input, context));
194
+ body = JSON.stringify((0, smithy_client_1._json)(input));
195
195
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
196
196
  };
197
197
  exports.se_UpdateEvaluationCommand = se_UpdateEvaluationCommand;
@@ -208,12 +208,12 @@ const de_AddTagsCommand = async (output, context) => {
208
208
  }
209
209
  const data = await parseBody(output.body, context);
210
210
  let contents = {};
211
- contents = de_AddTagsOutput(data, context);
211
+ contents = (0, smithy_client_1._json)(data);
212
212
  const response = {
213
213
  $metadata: deserializeMetadata(output),
214
214
  ...contents,
215
215
  };
216
- return Promise.resolve(response);
216
+ return response;
217
217
  };
218
218
  exports.de_AddTagsCommand = de_AddTagsCommand;
219
219
  const de_AddTagsCommandError = async (output, context) => {
@@ -240,10 +240,9 @@ const de_AddTagsCommandError = async (output, context) => {
240
240
  throw await de_TagLimitExceededExceptionRes(parsedOutput, context);
241
241
  default:
242
242
  const parsedBody = parsedOutput.body;
243
- (0, smithy_client_1.throwDefaultError)({
243
+ return throwDefaultError({
244
244
  output,
245
245
  parsedBody,
246
- exceptionCtor: MachineLearningServiceException_1.MachineLearningServiceException,
247
246
  errorCode,
248
247
  });
249
248
  }
@@ -254,12 +253,12 @@ const de_CreateBatchPredictionCommand = async (output, context) => {
254
253
  }
255
254
  const data = await parseBody(output.body, context);
256
255
  let contents = {};
257
- contents = de_CreateBatchPredictionOutput(data, context);
256
+ contents = (0, smithy_client_1._json)(data);
258
257
  const response = {
259
258
  $metadata: deserializeMetadata(output),
260
259
  ...contents,
261
260
  };
262
- return Promise.resolve(response);
261
+ return response;
263
262
  };
264
263
  exports.de_CreateBatchPredictionCommand = de_CreateBatchPredictionCommand;
265
264
  const de_CreateBatchPredictionCommandError = async (output, context) => {
@@ -280,10 +279,9 @@ const de_CreateBatchPredictionCommandError = async (output, context) => {
280
279
  throw await de_InvalidInputExceptionRes(parsedOutput, context);
281
280
  default:
282
281
  const parsedBody = parsedOutput.body;
283
- (0, smithy_client_1.throwDefaultError)({
282
+ return throwDefaultError({
284
283
  output,
285
284
  parsedBody,
286
- exceptionCtor: MachineLearningServiceException_1.MachineLearningServiceException,
287
285
  errorCode,
288
286
  });
289
287
  }
@@ -294,12 +292,12 @@ const de_CreateDataSourceFromRDSCommand = async (output, context) => {
294
292
  }
295
293
  const data = await parseBody(output.body, context);
296
294
  let contents = {};
297
- contents = de_CreateDataSourceFromRDSOutput(data, context);
295
+ contents = (0, smithy_client_1._json)(data);
298
296
  const response = {
299
297
  $metadata: deserializeMetadata(output),
300
298
  ...contents,
301
299
  };
302
- return Promise.resolve(response);
300
+ return response;
303
301
  };
304
302
  exports.de_CreateDataSourceFromRDSCommand = de_CreateDataSourceFromRDSCommand;
305
303
  const de_CreateDataSourceFromRDSCommandError = async (output, context) => {
@@ -320,10 +318,9 @@ const de_CreateDataSourceFromRDSCommandError = async (output, context) => {
320
318
  throw await de_InvalidInputExceptionRes(parsedOutput, context);
321
319
  default:
322
320
  const parsedBody = parsedOutput.body;
323
- (0, smithy_client_1.throwDefaultError)({
321
+ return throwDefaultError({
324
322
  output,
325
323
  parsedBody,
326
- exceptionCtor: MachineLearningServiceException_1.MachineLearningServiceException,
327
324
  errorCode,
328
325
  });
329
326
  }
@@ -334,12 +331,12 @@ const de_CreateDataSourceFromRedshiftCommand = async (output, context) => {
334
331
  }
335
332
  const data = await parseBody(output.body, context);
336
333
  let contents = {};
337
- contents = de_CreateDataSourceFromRedshiftOutput(data, context);
334
+ contents = (0, smithy_client_1._json)(data);
338
335
  const response = {
339
336
  $metadata: deserializeMetadata(output),
340
337
  ...contents,
341
338
  };
342
- return Promise.resolve(response);
339
+ return response;
343
340
  };
344
341
  exports.de_CreateDataSourceFromRedshiftCommand = de_CreateDataSourceFromRedshiftCommand;
345
342
  const de_CreateDataSourceFromRedshiftCommandError = async (output, context) => {
@@ -360,10 +357,9 @@ const de_CreateDataSourceFromRedshiftCommandError = async (output, context) => {
360
357
  throw await de_InvalidInputExceptionRes(parsedOutput, context);
361
358
  default:
362
359
  const parsedBody = parsedOutput.body;
363
- (0, smithy_client_1.throwDefaultError)({
360
+ return throwDefaultError({
364
361
  output,
365
362
  parsedBody,
366
- exceptionCtor: MachineLearningServiceException_1.MachineLearningServiceException,
367
363
  errorCode,
368
364
  });
369
365
  }
@@ -374,12 +370,12 @@ const de_CreateDataSourceFromS3Command = async (output, context) => {
374
370
  }
375
371
  const data = await parseBody(output.body, context);
376
372
  let contents = {};
377
- contents = de_CreateDataSourceFromS3Output(data, context);
373
+ contents = (0, smithy_client_1._json)(data);
378
374
  const response = {
379
375
  $metadata: deserializeMetadata(output),
380
376
  ...contents,
381
377
  };
382
- return Promise.resolve(response);
378
+ return response;
383
379
  };
384
380
  exports.de_CreateDataSourceFromS3Command = de_CreateDataSourceFromS3Command;
385
381
  const de_CreateDataSourceFromS3CommandError = async (output, context) => {
@@ -400,10 +396,9 @@ const de_CreateDataSourceFromS3CommandError = async (output, context) => {
400
396
  throw await de_InvalidInputExceptionRes(parsedOutput, context);
401
397
  default:
402
398
  const parsedBody = parsedOutput.body;
403
- (0, smithy_client_1.throwDefaultError)({
399
+ return throwDefaultError({
404
400
  output,
405
401
  parsedBody,
406
- exceptionCtor: MachineLearningServiceException_1.MachineLearningServiceException,
407
402
  errorCode,
408
403
  });
409
404
  }
@@ -414,12 +409,12 @@ const de_CreateEvaluationCommand = async (output, context) => {
414
409
  }
415
410
  const data = await parseBody(output.body, context);
416
411
  let contents = {};
417
- contents = de_CreateEvaluationOutput(data, context);
412
+ contents = (0, smithy_client_1._json)(data);
418
413
  const response = {
419
414
  $metadata: deserializeMetadata(output),
420
415
  ...contents,
421
416
  };
422
- return Promise.resolve(response);
417
+ return response;
423
418
  };
424
419
  exports.de_CreateEvaluationCommand = de_CreateEvaluationCommand;
425
420
  const de_CreateEvaluationCommandError = async (output, context) => {
@@ -440,10 +435,9 @@ const de_CreateEvaluationCommandError = async (output, context) => {
440
435
  throw await de_InvalidInputExceptionRes(parsedOutput, context);
441
436
  default:
442
437
  const parsedBody = parsedOutput.body;
443
- (0, smithy_client_1.throwDefaultError)({
438
+ return throwDefaultError({
444
439
  output,
445
440
  parsedBody,
446
- exceptionCtor: MachineLearningServiceException_1.MachineLearningServiceException,
447
441
  errorCode,
448
442
  });
449
443
  }
@@ -454,12 +448,12 @@ const de_CreateMLModelCommand = async (output, context) => {
454
448
  }
455
449
  const data = await parseBody(output.body, context);
456
450
  let contents = {};
457
- contents = de_CreateMLModelOutput(data, context);
451
+ contents = (0, smithy_client_1._json)(data);
458
452
  const response = {
459
453
  $metadata: deserializeMetadata(output),
460
454
  ...contents,
461
455
  };
462
- return Promise.resolve(response);
456
+ return response;
463
457
  };
464
458
  exports.de_CreateMLModelCommand = de_CreateMLModelCommand;
465
459
  const de_CreateMLModelCommandError = async (output, context) => {
@@ -480,10 +474,9 @@ const de_CreateMLModelCommandError = async (output, context) => {
480
474
  throw await de_InvalidInputExceptionRes(parsedOutput, context);
481
475
  default:
482
476
  const parsedBody = parsedOutput.body;
483
- (0, smithy_client_1.throwDefaultError)({
477
+ return throwDefaultError({
484
478
  output,
485
479
  parsedBody,
486
- exceptionCtor: MachineLearningServiceException_1.MachineLearningServiceException,
487
480
  errorCode,
488
481
  });
489
482
  }
@@ -499,7 +492,7 @@ const de_CreateRealtimeEndpointCommand = async (output, context) => {
499
492
  $metadata: deserializeMetadata(output),
500
493
  ...contents,
501
494
  };
502
- return Promise.resolve(response);
495
+ return response;
503
496
  };
504
497
  exports.de_CreateRealtimeEndpointCommand = de_CreateRealtimeEndpointCommand;
505
498
  const de_CreateRealtimeEndpointCommandError = async (output, context) => {
@@ -520,10 +513,9 @@ const de_CreateRealtimeEndpointCommandError = async (output, context) => {
520
513
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
521
514
  default:
522
515
  const parsedBody = parsedOutput.body;
523
- (0, smithy_client_1.throwDefaultError)({
516
+ return throwDefaultError({
524
517
  output,
525
518
  parsedBody,
526
- exceptionCtor: MachineLearningServiceException_1.MachineLearningServiceException,
527
519
  errorCode,
528
520
  });
529
521
  }
@@ -534,12 +526,12 @@ const de_DeleteBatchPredictionCommand = async (output, context) => {
534
526
  }
535
527
  const data = await parseBody(output.body, context);
536
528
  let contents = {};
537
- contents = de_DeleteBatchPredictionOutput(data, context);
529
+ contents = (0, smithy_client_1._json)(data);
538
530
  const response = {
539
531
  $metadata: deserializeMetadata(output),
540
532
  ...contents,
541
533
  };
542
- return Promise.resolve(response);
534
+ return response;
543
535
  };
544
536
  exports.de_DeleteBatchPredictionCommand = de_DeleteBatchPredictionCommand;
545
537
  const de_DeleteBatchPredictionCommandError = async (output, context) => {
@@ -560,10 +552,9 @@ const de_DeleteBatchPredictionCommandError = async (output, context) => {
560
552
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
561
553
  default:
562
554
  const parsedBody = parsedOutput.body;
563
- (0, smithy_client_1.throwDefaultError)({
555
+ return throwDefaultError({
564
556
  output,
565
557
  parsedBody,
566
- exceptionCtor: MachineLearningServiceException_1.MachineLearningServiceException,
567
558
  errorCode,
568
559
  });
569
560
  }
@@ -574,12 +565,12 @@ const de_DeleteDataSourceCommand = async (output, context) => {
574
565
  }
575
566
  const data = await parseBody(output.body, context);
576
567
  let contents = {};
577
- contents = de_DeleteDataSourceOutput(data, context);
568
+ contents = (0, smithy_client_1._json)(data);
578
569
  const response = {
579
570
  $metadata: deserializeMetadata(output),
580
571
  ...contents,
581
572
  };
582
- return Promise.resolve(response);
573
+ return response;
583
574
  };
584
575
  exports.de_DeleteDataSourceCommand = de_DeleteDataSourceCommand;
585
576
  const de_DeleteDataSourceCommandError = async (output, context) => {
@@ -600,10 +591,9 @@ const de_DeleteDataSourceCommandError = async (output, context) => {
600
591
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
601
592
  default:
602
593
  const parsedBody = parsedOutput.body;
603
- (0, smithy_client_1.throwDefaultError)({
594
+ return throwDefaultError({
604
595
  output,
605
596
  parsedBody,
606
- exceptionCtor: MachineLearningServiceException_1.MachineLearningServiceException,
607
597
  errorCode,
608
598
  });
609
599
  }
@@ -614,12 +604,12 @@ const de_DeleteEvaluationCommand = async (output, context) => {
614
604
  }
615
605
  const data = await parseBody(output.body, context);
616
606
  let contents = {};
617
- contents = de_DeleteEvaluationOutput(data, context);
607
+ contents = (0, smithy_client_1._json)(data);
618
608
  const response = {
619
609
  $metadata: deserializeMetadata(output),
620
610
  ...contents,
621
611
  };
622
- return Promise.resolve(response);
612
+ return response;
623
613
  };
624
614
  exports.de_DeleteEvaluationCommand = de_DeleteEvaluationCommand;
625
615
  const de_DeleteEvaluationCommandError = async (output, context) => {
@@ -640,10 +630,9 @@ const de_DeleteEvaluationCommandError = async (output, context) => {
640
630
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
641
631
  default:
642
632
  const parsedBody = parsedOutput.body;
643
- (0, smithy_client_1.throwDefaultError)({
633
+ return throwDefaultError({
644
634
  output,
645
635
  parsedBody,
646
- exceptionCtor: MachineLearningServiceException_1.MachineLearningServiceException,
647
636
  errorCode,
648
637
  });
649
638
  }
@@ -654,12 +643,12 @@ const de_DeleteMLModelCommand = async (output, context) => {
654
643
  }
655
644
  const data = await parseBody(output.body, context);
656
645
  let contents = {};
657
- contents = de_DeleteMLModelOutput(data, context);
646
+ contents = (0, smithy_client_1._json)(data);
658
647
  const response = {
659
648
  $metadata: deserializeMetadata(output),
660
649
  ...contents,
661
650
  };
662
- return Promise.resolve(response);
651
+ return response;
663
652
  };
664
653
  exports.de_DeleteMLModelCommand = de_DeleteMLModelCommand;
665
654
  const de_DeleteMLModelCommandError = async (output, context) => {
@@ -680,10 +669,9 @@ const de_DeleteMLModelCommandError = async (output, context) => {
680
669
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
681
670
  default:
682
671
  const parsedBody = parsedOutput.body;
683
- (0, smithy_client_1.throwDefaultError)({
672
+ return throwDefaultError({
684
673
  output,
685
674
  parsedBody,
686
- exceptionCtor: MachineLearningServiceException_1.MachineLearningServiceException,
687
675
  errorCode,
688
676
  });
689
677
  }
@@ -699,7 +687,7 @@ const de_DeleteRealtimeEndpointCommand = async (output, context) => {
699
687
  $metadata: deserializeMetadata(output),
700
688
  ...contents,
701
689
  };
702
- return Promise.resolve(response);
690
+ return response;
703
691
  };
704
692
  exports.de_DeleteRealtimeEndpointCommand = de_DeleteRealtimeEndpointCommand;
705
693
  const de_DeleteRealtimeEndpointCommandError = async (output, context) => {
@@ -720,10 +708,9 @@ const de_DeleteRealtimeEndpointCommandError = async (output, context) => {
720
708
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
721
709
  default:
722
710
  const parsedBody = parsedOutput.body;
723
- (0, smithy_client_1.throwDefaultError)({
711
+ return throwDefaultError({
724
712
  output,
725
713
  parsedBody,
726
- exceptionCtor: MachineLearningServiceException_1.MachineLearningServiceException,
727
714
  errorCode,
728
715
  });
729
716
  }
@@ -734,12 +721,12 @@ const de_DeleteTagsCommand = async (output, context) => {
734
721
  }
735
722
  const data = await parseBody(output.body, context);
736
723
  let contents = {};
737
- contents = de_DeleteTagsOutput(data, context);
724
+ contents = (0, smithy_client_1._json)(data);
738
725
  const response = {
739
726
  $metadata: deserializeMetadata(output),
740
727
  ...contents,
741
728
  };
742
- return Promise.resolve(response);
729
+ return response;
743
730
  };
744
731
  exports.de_DeleteTagsCommand = de_DeleteTagsCommand;
745
732
  const de_DeleteTagsCommandError = async (output, context) => {
@@ -763,10 +750,9 @@ const de_DeleteTagsCommandError = async (output, context) => {
763
750
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
764
751
  default:
765
752
  const parsedBody = parsedOutput.body;
766
- (0, smithy_client_1.throwDefaultError)({
753
+ return throwDefaultError({
767
754
  output,
768
755
  parsedBody,
769
- exceptionCtor: MachineLearningServiceException_1.MachineLearningServiceException,
770
756
  errorCode,
771
757
  });
772
758
  }
@@ -782,7 +768,7 @@ const de_DescribeBatchPredictionsCommand = async (output, context) => {
782
768
  $metadata: deserializeMetadata(output),
783
769
  ...contents,
784
770
  };
785
- return Promise.resolve(response);
771
+ return response;
786
772
  };
787
773
  exports.de_DescribeBatchPredictionsCommand = de_DescribeBatchPredictionsCommand;
788
774
  const de_DescribeBatchPredictionsCommandError = async (output, context) => {
@@ -800,10 +786,9 @@ const de_DescribeBatchPredictionsCommandError = async (output, context) => {
800
786
  throw await de_InvalidInputExceptionRes(parsedOutput, context);
801
787
  default:
802
788
  const parsedBody = parsedOutput.body;
803
- (0, smithy_client_1.throwDefaultError)({
789
+ return throwDefaultError({
804
790
  output,
805
791
  parsedBody,
806
- exceptionCtor: MachineLearningServiceException_1.MachineLearningServiceException,
807
792
  errorCode,
808
793
  });
809
794
  }
@@ -819,7 +804,7 @@ const de_DescribeDataSourcesCommand = async (output, context) => {
819
804
  $metadata: deserializeMetadata(output),
820
805
  ...contents,
821
806
  };
822
- return Promise.resolve(response);
807
+ return response;
823
808
  };
824
809
  exports.de_DescribeDataSourcesCommand = de_DescribeDataSourcesCommand;
825
810
  const de_DescribeDataSourcesCommandError = async (output, context) => {
@@ -837,10 +822,9 @@ const de_DescribeDataSourcesCommandError = async (output, context) => {
837
822
  throw await de_InvalidInputExceptionRes(parsedOutput, context);
838
823
  default:
839
824
  const parsedBody = parsedOutput.body;
840
- (0, smithy_client_1.throwDefaultError)({
825
+ return throwDefaultError({
841
826
  output,
842
827
  parsedBody,
843
- exceptionCtor: MachineLearningServiceException_1.MachineLearningServiceException,
844
828
  errorCode,
845
829
  });
846
830
  }
@@ -856,7 +840,7 @@ const de_DescribeEvaluationsCommand = async (output, context) => {
856
840
  $metadata: deserializeMetadata(output),
857
841
  ...contents,
858
842
  };
859
- return Promise.resolve(response);
843
+ return response;
860
844
  };
861
845
  exports.de_DescribeEvaluationsCommand = de_DescribeEvaluationsCommand;
862
846
  const de_DescribeEvaluationsCommandError = async (output, context) => {
@@ -874,10 +858,9 @@ const de_DescribeEvaluationsCommandError = async (output, context) => {
874
858
  throw await de_InvalidInputExceptionRes(parsedOutput, context);
875
859
  default:
876
860
  const parsedBody = parsedOutput.body;
877
- (0, smithy_client_1.throwDefaultError)({
861
+ return throwDefaultError({
878
862
  output,
879
863
  parsedBody,
880
- exceptionCtor: MachineLearningServiceException_1.MachineLearningServiceException,
881
864
  errorCode,
882
865
  });
883
866
  }
@@ -893,7 +876,7 @@ const de_DescribeMLModelsCommand = async (output, context) => {
893
876
  $metadata: deserializeMetadata(output),
894
877
  ...contents,
895
878
  };
896
- return Promise.resolve(response);
879
+ return response;
897
880
  };
898
881
  exports.de_DescribeMLModelsCommand = de_DescribeMLModelsCommand;
899
882
  const de_DescribeMLModelsCommandError = async (output, context) => {
@@ -911,10 +894,9 @@ const de_DescribeMLModelsCommandError = async (output, context) => {
911
894
  throw await de_InvalidInputExceptionRes(parsedOutput, context);
912
895
  default:
913
896
  const parsedBody = parsedOutput.body;
914
- (0, smithy_client_1.throwDefaultError)({
897
+ return throwDefaultError({
915
898
  output,
916
899
  parsedBody,
917
- exceptionCtor: MachineLearningServiceException_1.MachineLearningServiceException,
918
900
  errorCode,
919
901
  });
920
902
  }
@@ -925,12 +907,12 @@ const de_DescribeTagsCommand = async (output, context) => {
925
907
  }
926
908
  const data = await parseBody(output.body, context);
927
909
  let contents = {};
928
- contents = de_DescribeTagsOutput(data, context);
910
+ contents = (0, smithy_client_1._json)(data);
929
911
  const response = {
930
912
  $metadata: deserializeMetadata(output),
931
913
  ...contents,
932
914
  };
933
- return Promise.resolve(response);
915
+ return response;
934
916
  };
935
917
  exports.de_DescribeTagsCommand = de_DescribeTagsCommand;
936
918
  const de_DescribeTagsCommandError = async (output, context) => {
@@ -951,10 +933,9 @@ const de_DescribeTagsCommandError = async (output, context) => {
951
933
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
952
934
  default:
953
935
  const parsedBody = parsedOutput.body;
954
- (0, smithy_client_1.throwDefaultError)({
936
+ return throwDefaultError({
955
937
  output,
956
938
  parsedBody,
957
- exceptionCtor: MachineLearningServiceException_1.MachineLearningServiceException,
958
939
  errorCode,
959
940
  });
960
941
  }
@@ -970,7 +951,7 @@ const de_GetBatchPredictionCommand = async (output, context) => {
970
951
  $metadata: deserializeMetadata(output),
971
952
  ...contents,
972
953
  };
973
- return Promise.resolve(response);
954
+ return response;
974
955
  };
975
956
  exports.de_GetBatchPredictionCommand = de_GetBatchPredictionCommand;
976
957
  const de_GetBatchPredictionCommandError = async (output, context) => {
@@ -991,10 +972,9 @@ const de_GetBatchPredictionCommandError = async (output, context) => {
991
972
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
992
973
  default:
993
974
  const parsedBody = parsedOutput.body;
994
- (0, smithy_client_1.throwDefaultError)({
975
+ return throwDefaultError({
995
976
  output,
996
977
  parsedBody,
997
- exceptionCtor: MachineLearningServiceException_1.MachineLearningServiceException,
998
978
  errorCode,
999
979
  });
1000
980
  }
@@ -1010,7 +990,7 @@ const de_GetDataSourceCommand = async (output, context) => {
1010
990
  $metadata: deserializeMetadata(output),
1011
991
  ...contents,
1012
992
  };
1013
- return Promise.resolve(response);
993
+ return response;
1014
994
  };
1015
995
  exports.de_GetDataSourceCommand = de_GetDataSourceCommand;
1016
996
  const de_GetDataSourceCommandError = async (output, context) => {
@@ -1031,10 +1011,9 @@ const de_GetDataSourceCommandError = async (output, context) => {
1031
1011
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1032
1012
  default:
1033
1013
  const parsedBody = parsedOutput.body;
1034
- (0, smithy_client_1.throwDefaultError)({
1014
+ return throwDefaultError({
1035
1015
  output,
1036
1016
  parsedBody,
1037
- exceptionCtor: MachineLearningServiceException_1.MachineLearningServiceException,
1038
1017
  errorCode,
1039
1018
  });
1040
1019
  }
@@ -1050,7 +1029,7 @@ const de_GetEvaluationCommand = async (output, context) => {
1050
1029
  $metadata: deserializeMetadata(output),
1051
1030
  ...contents,
1052
1031
  };
1053
- return Promise.resolve(response);
1032
+ return response;
1054
1033
  };
1055
1034
  exports.de_GetEvaluationCommand = de_GetEvaluationCommand;
1056
1035
  const de_GetEvaluationCommandError = async (output, context) => {
@@ -1071,10 +1050,9 @@ const de_GetEvaluationCommandError = async (output, context) => {
1071
1050
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1072
1051
  default:
1073
1052
  const parsedBody = parsedOutput.body;
1074
- (0, smithy_client_1.throwDefaultError)({
1053
+ return throwDefaultError({
1075
1054
  output,
1076
1055
  parsedBody,
1077
- exceptionCtor: MachineLearningServiceException_1.MachineLearningServiceException,
1078
1056
  errorCode,
1079
1057
  });
1080
1058
  }
@@ -1090,7 +1068,7 @@ const de_GetMLModelCommand = async (output, context) => {
1090
1068
  $metadata: deserializeMetadata(output),
1091
1069
  ...contents,
1092
1070
  };
1093
- return Promise.resolve(response);
1071
+ return response;
1094
1072
  };
1095
1073
  exports.de_GetMLModelCommand = de_GetMLModelCommand;
1096
1074
  const de_GetMLModelCommandError = async (output, context) => {
@@ -1111,10 +1089,9 @@ const de_GetMLModelCommandError = async (output, context) => {
1111
1089
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1112
1090
  default:
1113
1091
  const parsedBody = parsedOutput.body;
1114
- (0, smithy_client_1.throwDefaultError)({
1092
+ return throwDefaultError({
1115
1093
  output,
1116
1094
  parsedBody,
1117
- exceptionCtor: MachineLearningServiceException_1.MachineLearningServiceException,
1118
1095
  errorCode,
1119
1096
  });
1120
1097
  }
@@ -1130,7 +1107,7 @@ const de_PredictCommand = async (output, context) => {
1130
1107
  $metadata: deserializeMetadata(output),
1131
1108
  ...contents,
1132
1109
  };
1133
- return Promise.resolve(response);
1110
+ return response;
1134
1111
  };
1135
1112
  exports.de_PredictCommand = de_PredictCommand;
1136
1113
  const de_PredictCommandError = async (output, context) => {
@@ -1157,10 +1134,9 @@ const de_PredictCommandError = async (output, context) => {
1157
1134
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1158
1135
  default:
1159
1136
  const parsedBody = parsedOutput.body;
1160
- (0, smithy_client_1.throwDefaultError)({
1137
+ return throwDefaultError({
1161
1138
  output,
1162
1139
  parsedBody,
1163
- exceptionCtor: MachineLearningServiceException_1.MachineLearningServiceException,
1164
1140
  errorCode,
1165
1141
  });
1166
1142
  }
@@ -1171,12 +1147,12 @@ const de_UpdateBatchPredictionCommand = async (output, context) => {
1171
1147
  }
1172
1148
  const data = await parseBody(output.body, context);
1173
1149
  let contents = {};
1174
- contents = de_UpdateBatchPredictionOutput(data, context);
1150
+ contents = (0, smithy_client_1._json)(data);
1175
1151
  const response = {
1176
1152
  $metadata: deserializeMetadata(output),
1177
1153
  ...contents,
1178
1154
  };
1179
- return Promise.resolve(response);
1155
+ return response;
1180
1156
  };
1181
1157
  exports.de_UpdateBatchPredictionCommand = de_UpdateBatchPredictionCommand;
1182
1158
  const de_UpdateBatchPredictionCommandError = async (output, context) => {
@@ -1197,10 +1173,9 @@ const de_UpdateBatchPredictionCommandError = async (output, context) => {
1197
1173
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1198
1174
  default:
1199
1175
  const parsedBody = parsedOutput.body;
1200
- (0, smithy_client_1.throwDefaultError)({
1176
+ return throwDefaultError({
1201
1177
  output,
1202
1178
  parsedBody,
1203
- exceptionCtor: MachineLearningServiceException_1.MachineLearningServiceException,
1204
1179
  errorCode,
1205
1180
  });
1206
1181
  }
@@ -1211,12 +1186,12 @@ const de_UpdateDataSourceCommand = async (output, context) => {
1211
1186
  }
1212
1187
  const data = await parseBody(output.body, context);
1213
1188
  let contents = {};
1214
- contents = de_UpdateDataSourceOutput(data, context);
1189
+ contents = (0, smithy_client_1._json)(data);
1215
1190
  const response = {
1216
1191
  $metadata: deserializeMetadata(output),
1217
1192
  ...contents,
1218
1193
  };
1219
- return Promise.resolve(response);
1194
+ return response;
1220
1195
  };
1221
1196
  exports.de_UpdateDataSourceCommand = de_UpdateDataSourceCommand;
1222
1197
  const de_UpdateDataSourceCommandError = async (output, context) => {
@@ -1237,10 +1212,9 @@ const de_UpdateDataSourceCommandError = async (output, context) => {
1237
1212
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1238
1213
  default:
1239
1214
  const parsedBody = parsedOutput.body;
1240
- (0, smithy_client_1.throwDefaultError)({
1215
+ return throwDefaultError({
1241
1216
  output,
1242
1217
  parsedBody,
1243
- exceptionCtor: MachineLearningServiceException_1.MachineLearningServiceException,
1244
1218
  errorCode,
1245
1219
  });
1246
1220
  }
@@ -1251,12 +1225,12 @@ const de_UpdateEvaluationCommand = async (output, context) => {
1251
1225
  }
1252
1226
  const data = await parseBody(output.body, context);
1253
1227
  let contents = {};
1254
- contents = de_UpdateEvaluationOutput(data, context);
1228
+ contents = (0, smithy_client_1._json)(data);
1255
1229
  const response = {
1256
1230
  $metadata: deserializeMetadata(output),
1257
1231
  ...contents,
1258
1232
  };
1259
- return Promise.resolve(response);
1233
+ return response;
1260
1234
  };
1261
1235
  exports.de_UpdateEvaluationCommand = de_UpdateEvaluationCommand;
1262
1236
  const de_UpdateEvaluationCommandError = async (output, context) => {
@@ -1277,10 +1251,9 @@ const de_UpdateEvaluationCommandError = async (output, context) => {
1277
1251
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1278
1252
  default:
1279
1253
  const parsedBody = parsedOutput.body;
1280
- (0, smithy_client_1.throwDefaultError)({
1254
+ return throwDefaultError({
1281
1255
  output,
1282
1256
  parsedBody,
1283
- exceptionCtor: MachineLearningServiceException_1.MachineLearningServiceException,
1284
1257
  errorCode,
1285
1258
  });
1286
1259
  }
@@ -1291,12 +1264,12 @@ const de_UpdateMLModelCommand = async (output, context) => {
1291
1264
  }
1292
1265
  const data = await parseBody(output.body, context);
1293
1266
  let contents = {};
1294
- contents = de_UpdateMLModelOutput(data, context);
1267
+ contents = (0, smithy_client_1._json)(data);
1295
1268
  const response = {
1296
1269
  $metadata: deserializeMetadata(output),
1297
1270
  ...contents,
1298
1271
  };
1299
- return Promise.resolve(response);
1272
+ return response;
1300
1273
  };
1301
1274
  exports.de_UpdateMLModelCommand = de_UpdateMLModelCommand;
1302
1275
  const de_UpdateMLModelCommandError = async (output, context) => {
@@ -1317,17 +1290,16 @@ const de_UpdateMLModelCommandError = async (output, context) => {
1317
1290
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1318
1291
  default:
1319
1292
  const parsedBody = parsedOutput.body;
1320
- (0, smithy_client_1.throwDefaultError)({
1293
+ return throwDefaultError({
1321
1294
  output,
1322
1295
  parsedBody,
1323
- exceptionCtor: MachineLearningServiceException_1.MachineLearningServiceException,
1324
1296
  errorCode,
1325
1297
  });
1326
1298
  }
1327
1299
  };
1328
1300
  const de_IdempotentParameterMismatchExceptionRes = async (parsedOutput, context) => {
1329
1301
  const body = parsedOutput.body;
1330
- const deserialized = de_IdempotentParameterMismatchException(body, context);
1302
+ const deserialized = (0, smithy_client_1._json)(body);
1331
1303
  const exception = new models_0_1.IdempotentParameterMismatchException({
1332
1304
  $metadata: deserializeMetadata(parsedOutput),
1333
1305
  ...deserialized,
@@ -1336,7 +1308,7 @@ const de_IdempotentParameterMismatchExceptionRes = async (parsedOutput, context)
1336
1308
  };
1337
1309
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1338
1310
  const body = parsedOutput.body;
1339
- const deserialized = de_InternalServerException(body, context);
1311
+ const deserialized = (0, smithy_client_1._json)(body);
1340
1312
  const exception = new models_0_1.InternalServerException({
1341
1313
  $metadata: deserializeMetadata(parsedOutput),
1342
1314
  ...deserialized,
@@ -1345,7 +1317,7 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1345
1317
  };
1346
1318
  const de_InvalidInputExceptionRes = async (parsedOutput, context) => {
1347
1319
  const body = parsedOutput.body;
1348
- const deserialized = de_InvalidInputException(body, context);
1320
+ const deserialized = (0, smithy_client_1._json)(body);
1349
1321
  const exception = new models_0_1.InvalidInputException({
1350
1322
  $metadata: deserializeMetadata(parsedOutput),
1351
1323
  ...deserialized,
@@ -1354,7 +1326,7 @@ const de_InvalidInputExceptionRes = async (parsedOutput, context) => {
1354
1326
  };
1355
1327
  const de_InvalidTagExceptionRes = async (parsedOutput, context) => {
1356
1328
  const body = parsedOutput.body;
1357
- const deserialized = de_InvalidTagException(body, context);
1329
+ const deserialized = (0, smithy_client_1._json)(body);
1358
1330
  const exception = new models_0_1.InvalidTagException({
1359
1331
  $metadata: deserializeMetadata(parsedOutput),
1360
1332
  ...deserialized,
@@ -1363,7 +1335,7 @@ const de_InvalidTagExceptionRes = async (parsedOutput, context) => {
1363
1335
  };
1364
1336
  const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
1365
1337
  const body = parsedOutput.body;
1366
- const deserialized = de_LimitExceededException(body, context);
1338
+ const deserialized = (0, smithy_client_1._json)(body);
1367
1339
  const exception = new models_0_1.LimitExceededException({
1368
1340
  $metadata: deserializeMetadata(parsedOutput),
1369
1341
  ...deserialized,
@@ -1372,7 +1344,7 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
1372
1344
  };
1373
1345
  const de_PredictorNotMountedExceptionRes = async (parsedOutput, context) => {
1374
1346
  const body = parsedOutput.body;
1375
- const deserialized = de_PredictorNotMountedException(body, context);
1347
+ const deserialized = (0, smithy_client_1._json)(body);
1376
1348
  const exception = new models_0_1.PredictorNotMountedException({
1377
1349
  $metadata: deserializeMetadata(parsedOutput),
1378
1350
  ...deserialized,
@@ -1381,7 +1353,7 @@ const de_PredictorNotMountedExceptionRes = async (parsedOutput, context) => {
1381
1353
  };
1382
1354
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1383
1355
  const body = parsedOutput.body;
1384
- const deserialized = de_ResourceNotFoundException(body, context);
1356
+ const deserialized = (0, smithy_client_1._json)(body);
1385
1357
  const exception = new models_0_1.ResourceNotFoundException({
1386
1358
  $metadata: deserializeMetadata(parsedOutput),
1387
1359
  ...deserialized,
@@ -1390,799 +1362,280 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1390
1362
  };
1391
1363
  const de_TagLimitExceededExceptionRes = async (parsedOutput, context) => {
1392
1364
  const body = parsedOutput.body;
1393
- const deserialized = de_TagLimitExceededException(body, context);
1365
+ const deserialized = (0, smithy_client_1._json)(body);
1394
1366
  const exception = new models_0_1.TagLimitExceededException({
1395
1367
  $metadata: deserializeMetadata(parsedOutput),
1396
1368
  ...deserialized,
1397
1369
  });
1398
1370
  return (0, smithy_client_1.decorateServiceException)(exception, body);
1399
1371
  };
1400
- const se_AddTagsInput = (input, context) => {
1401
- return {
1402
- ...(input.ResourceId != null && { ResourceId: input.ResourceId }),
1403
- ...(input.ResourceType != null && { ResourceType: input.ResourceType }),
1404
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
1405
- };
1406
- };
1407
- const se_CreateBatchPredictionInput = (input, context) => {
1408
- return {
1409
- ...(input.BatchPredictionDataSourceId != null && {
1410
- BatchPredictionDataSourceId: input.BatchPredictionDataSourceId,
1411
- }),
1412
- ...(input.BatchPredictionId != null && { BatchPredictionId: input.BatchPredictionId }),
1413
- ...(input.BatchPredictionName != null && { BatchPredictionName: input.BatchPredictionName }),
1414
- ...(input.MLModelId != null && { MLModelId: input.MLModelId }),
1415
- ...(input.OutputUri != null && { OutputUri: input.OutputUri }),
1416
- };
1417
- };
1418
- const se_CreateDataSourceFromRDSInput = (input, context) => {
1419
- return {
1420
- ...(input.ComputeStatistics != null && { ComputeStatistics: input.ComputeStatistics }),
1421
- ...(input.DataSourceId != null && { DataSourceId: input.DataSourceId }),
1422
- ...(input.DataSourceName != null && { DataSourceName: input.DataSourceName }),
1423
- ...(input.RDSData != null && { RDSData: se_RDSDataSpec(input.RDSData, context) }),
1424
- ...(input.RoleARN != null && { RoleARN: input.RoleARN }),
1425
- };
1426
- };
1427
- const se_CreateDataSourceFromRedshiftInput = (input, context) => {
1428
- return {
1429
- ...(input.ComputeStatistics != null && { ComputeStatistics: input.ComputeStatistics }),
1430
- ...(input.DataSourceId != null && { DataSourceId: input.DataSourceId }),
1431
- ...(input.DataSourceName != null && { DataSourceName: input.DataSourceName }),
1432
- ...(input.DataSpec != null && { DataSpec: se_RedshiftDataSpec(input.DataSpec, context) }),
1433
- ...(input.RoleARN != null && { RoleARN: input.RoleARN }),
1434
- };
1435
- };
1436
- const se_CreateDataSourceFromS3Input = (input, context) => {
1437
- return {
1438
- ...(input.ComputeStatistics != null && { ComputeStatistics: input.ComputeStatistics }),
1439
- ...(input.DataSourceId != null && { DataSourceId: input.DataSourceId }),
1440
- ...(input.DataSourceName != null && { DataSourceName: input.DataSourceName }),
1441
- ...(input.DataSpec != null && { DataSpec: se_S3DataSpec(input.DataSpec, context) }),
1442
- };
1443
- };
1444
- const se_CreateEvaluationInput = (input, context) => {
1445
- return {
1446
- ...(input.EvaluationDataSourceId != null && { EvaluationDataSourceId: input.EvaluationDataSourceId }),
1447
- ...(input.EvaluationId != null && { EvaluationId: input.EvaluationId }),
1448
- ...(input.EvaluationName != null && { EvaluationName: input.EvaluationName }),
1449
- ...(input.MLModelId != null && { MLModelId: input.MLModelId }),
1450
- };
1451
- };
1452
- const se_CreateMLModelInput = (input, context) => {
1453
- return {
1454
- ...(input.MLModelId != null && { MLModelId: input.MLModelId }),
1455
- ...(input.MLModelName != null && { MLModelName: input.MLModelName }),
1456
- ...(input.MLModelType != null && { MLModelType: input.MLModelType }),
1457
- ...(input.Parameters != null && { Parameters: se_TrainingParameters(input.Parameters, context) }),
1458
- ...(input.Recipe != null && { Recipe: input.Recipe }),
1459
- ...(input.RecipeUri != null && { RecipeUri: input.RecipeUri }),
1460
- ...(input.TrainingDataSourceId != null && { TrainingDataSourceId: input.TrainingDataSourceId }),
1461
- };
1462
- };
1463
- const se_CreateRealtimeEndpointInput = (input, context) => {
1464
- return {
1465
- ...(input.MLModelId != null && { MLModelId: input.MLModelId }),
1466
- };
1467
- };
1468
- const se_DeleteBatchPredictionInput = (input, context) => {
1469
- return {
1470
- ...(input.BatchPredictionId != null && { BatchPredictionId: input.BatchPredictionId }),
1471
- };
1472
- };
1473
- const se_DeleteDataSourceInput = (input, context) => {
1474
- return {
1475
- ...(input.DataSourceId != null && { DataSourceId: input.DataSourceId }),
1476
- };
1477
- };
1478
- const se_DeleteEvaluationInput = (input, context) => {
1479
- return {
1480
- ...(input.EvaluationId != null && { EvaluationId: input.EvaluationId }),
1481
- };
1482
- };
1483
- const se_DeleteMLModelInput = (input, context) => {
1484
- return {
1485
- ...(input.MLModelId != null && { MLModelId: input.MLModelId }),
1486
- };
1487
- };
1488
- const se_DeleteRealtimeEndpointInput = (input, context) => {
1489
- return {
1490
- ...(input.MLModelId != null && { MLModelId: input.MLModelId }),
1491
- };
1492
- };
1493
- const se_DeleteTagsInput = (input, context) => {
1494
- return {
1495
- ...(input.ResourceId != null && { ResourceId: input.ResourceId }),
1496
- ...(input.ResourceType != null && { ResourceType: input.ResourceType }),
1497
- ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }),
1498
- };
1499
- };
1500
- const se_DescribeBatchPredictionsInput = (input, context) => {
1501
- return {
1502
- ...(input.EQ != null && { EQ: input.EQ }),
1503
- ...(input.FilterVariable != null && { FilterVariable: input.FilterVariable }),
1504
- ...(input.GE != null && { GE: input.GE }),
1505
- ...(input.GT != null && { GT: input.GT }),
1506
- ...(input.LE != null && { LE: input.LE }),
1507
- ...(input.LT != null && { LT: input.LT }),
1508
- ...(input.Limit != null && { Limit: input.Limit }),
1509
- ...(input.NE != null && { NE: input.NE }),
1510
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1511
- ...(input.Prefix != null && { Prefix: input.Prefix }),
1512
- ...(input.SortOrder != null && { SortOrder: input.SortOrder }),
1513
- };
1514
- };
1515
- const se_DescribeDataSourcesInput = (input, context) => {
1516
- return {
1517
- ...(input.EQ != null && { EQ: input.EQ }),
1518
- ...(input.FilterVariable != null && { FilterVariable: input.FilterVariable }),
1519
- ...(input.GE != null && { GE: input.GE }),
1520
- ...(input.GT != null && { GT: input.GT }),
1521
- ...(input.LE != null && { LE: input.LE }),
1522
- ...(input.LT != null && { LT: input.LT }),
1523
- ...(input.Limit != null && { Limit: input.Limit }),
1524
- ...(input.NE != null && { NE: input.NE }),
1525
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1526
- ...(input.Prefix != null && { Prefix: input.Prefix }),
1527
- ...(input.SortOrder != null && { SortOrder: input.SortOrder }),
1528
- };
1529
- };
1530
- const se_DescribeEvaluationsInput = (input, context) => {
1531
- return {
1532
- ...(input.EQ != null && { EQ: input.EQ }),
1533
- ...(input.FilterVariable != null && { FilterVariable: input.FilterVariable }),
1534
- ...(input.GE != null && { GE: input.GE }),
1535
- ...(input.GT != null && { GT: input.GT }),
1536
- ...(input.LE != null && { LE: input.LE }),
1537
- ...(input.LT != null && { LT: input.LT }),
1538
- ...(input.Limit != null && { Limit: input.Limit }),
1539
- ...(input.NE != null && { NE: input.NE }),
1540
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1541
- ...(input.Prefix != null && { Prefix: input.Prefix }),
1542
- ...(input.SortOrder != null && { SortOrder: input.SortOrder }),
1543
- };
1544
- };
1545
- const se_DescribeMLModelsInput = (input, context) => {
1546
- return {
1547
- ...(input.EQ != null && { EQ: input.EQ }),
1548
- ...(input.FilterVariable != null && { FilterVariable: input.FilterVariable }),
1549
- ...(input.GE != null && { GE: input.GE }),
1550
- ...(input.GT != null && { GT: input.GT }),
1551
- ...(input.LE != null && { LE: input.LE }),
1552
- ...(input.LT != null && { LT: input.LT }),
1553
- ...(input.Limit != null && { Limit: input.Limit }),
1554
- ...(input.NE != null && { NE: input.NE }),
1555
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1556
- ...(input.Prefix != null && { Prefix: input.Prefix }),
1557
- ...(input.SortOrder != null && { SortOrder: input.SortOrder }),
1558
- };
1559
- };
1560
- const se_DescribeTagsInput = (input, context) => {
1561
- return {
1562
- ...(input.ResourceId != null && { ResourceId: input.ResourceId }),
1563
- ...(input.ResourceType != null && { ResourceType: input.ResourceType }),
1564
- };
1565
- };
1566
- const se_EDPSecurityGroupIds = (input, context) => {
1567
- return input
1568
- .filter((e) => e != null)
1569
- .map((entry) => {
1570
- return entry;
1571
- });
1572
- };
1573
- const se_GetBatchPredictionInput = (input, context) => {
1574
- return {
1575
- ...(input.BatchPredictionId != null && { BatchPredictionId: input.BatchPredictionId }),
1576
- };
1577
- };
1578
- const se_GetDataSourceInput = (input, context) => {
1579
- return {
1580
- ...(input.DataSourceId != null && { DataSourceId: input.DataSourceId }),
1581
- ...(input.Verbose != null && { Verbose: input.Verbose }),
1582
- };
1583
- };
1584
- const se_GetEvaluationInput = (input, context) => {
1585
- return {
1586
- ...(input.EvaluationId != null && { EvaluationId: input.EvaluationId }),
1587
- };
1588
- };
1589
- const se_GetMLModelInput = (input, context) => {
1590
- return {
1591
- ...(input.MLModelId != null && { MLModelId: input.MLModelId }),
1592
- ...(input.Verbose != null && { Verbose: input.Verbose }),
1593
- };
1594
- };
1595
- const se_PredictInput = (input, context) => {
1596
- return {
1597
- ...(input.MLModelId != null && { MLModelId: input.MLModelId }),
1598
- ...(input.PredictEndpoint != null && { PredictEndpoint: input.PredictEndpoint }),
1599
- ...(input.Record != null && { Record: se_Record(input.Record, context) }),
1600
- };
1601
- };
1602
- const se_RDSDatabase = (input, context) => {
1603
- return {
1604
- ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }),
1605
- ...(input.InstanceIdentifier != null && { InstanceIdentifier: input.InstanceIdentifier }),
1606
- };
1607
- };
1608
- const se_RDSDatabaseCredentials = (input, context) => {
1609
- return {
1610
- ...(input.Password != null && { Password: input.Password }),
1611
- ...(input.Username != null && { Username: input.Username }),
1612
- };
1613
- };
1614
- const se_RDSDataSpec = (input, context) => {
1615
- return {
1616
- ...(input.DataRearrangement != null && { DataRearrangement: input.DataRearrangement }),
1617
- ...(input.DataSchema != null && { DataSchema: input.DataSchema }),
1618
- ...(input.DataSchemaUri != null && { DataSchemaUri: input.DataSchemaUri }),
1619
- ...(input.DatabaseCredentials != null && {
1620
- DatabaseCredentials: se_RDSDatabaseCredentials(input.DatabaseCredentials, context),
1621
- }),
1622
- ...(input.DatabaseInformation != null && {
1623
- DatabaseInformation: se_RDSDatabase(input.DatabaseInformation, context),
1624
- }),
1625
- ...(input.ResourceRole != null && { ResourceRole: input.ResourceRole }),
1626
- ...(input.S3StagingLocation != null && { S3StagingLocation: input.S3StagingLocation }),
1627
- ...(input.SecurityGroupIds != null && {
1628
- SecurityGroupIds: se_EDPSecurityGroupIds(input.SecurityGroupIds, context),
1629
- }),
1630
- ...(input.SelectSqlQuery != null && { SelectSqlQuery: input.SelectSqlQuery }),
1631
- ...(input.ServiceRole != null && { ServiceRole: input.ServiceRole }),
1632
- ...(input.SubnetId != null && { SubnetId: input.SubnetId }),
1633
- };
1634
- };
1635
- const se_Record = (input, context) => {
1636
- return Object.entries(input).reduce((acc, [key, value]) => {
1637
- if (value === null) {
1638
- return acc;
1639
- }
1640
- acc[key] = value;
1641
- return acc;
1642
- }, {});
1643
- };
1644
- const se_RedshiftDatabase = (input, context) => {
1645
- return {
1646
- ...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }),
1647
- ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }),
1648
- };
1649
- };
1650
- const se_RedshiftDatabaseCredentials = (input, context) => {
1651
- return {
1652
- ...(input.Password != null && { Password: input.Password }),
1653
- ...(input.Username != null && { Username: input.Username }),
1654
- };
1655
- };
1656
- const se_RedshiftDataSpec = (input, context) => {
1657
- return {
1658
- ...(input.DataRearrangement != null && { DataRearrangement: input.DataRearrangement }),
1659
- ...(input.DataSchema != null && { DataSchema: input.DataSchema }),
1660
- ...(input.DataSchemaUri != null && { DataSchemaUri: input.DataSchemaUri }),
1661
- ...(input.DatabaseCredentials != null && {
1662
- DatabaseCredentials: se_RedshiftDatabaseCredentials(input.DatabaseCredentials, context),
1663
- }),
1664
- ...(input.DatabaseInformation != null && {
1665
- DatabaseInformation: se_RedshiftDatabase(input.DatabaseInformation, context),
1666
- }),
1667
- ...(input.S3StagingLocation != null && { S3StagingLocation: input.S3StagingLocation }),
1668
- ...(input.SelectSqlQuery != null && { SelectSqlQuery: input.SelectSqlQuery }),
1669
- };
1670
- };
1671
- const se_S3DataSpec = (input, context) => {
1672
- return {
1673
- ...(input.DataLocationS3 != null && { DataLocationS3: input.DataLocationS3 }),
1674
- ...(input.DataRearrangement != null && { DataRearrangement: input.DataRearrangement }),
1675
- ...(input.DataSchema != null && { DataSchema: input.DataSchema }),
1676
- ...(input.DataSchemaLocationS3 != null && { DataSchemaLocationS3: input.DataSchemaLocationS3 }),
1677
- };
1678
- };
1679
- const se_Tag = (input, context) => {
1680
- return {
1681
- ...(input.Key != null && { Key: input.Key }),
1682
- ...(input.Value != null && { Value: input.Value }),
1683
- };
1684
- };
1685
- const se_TagKeyList = (input, context) => {
1686
- return input
1687
- .filter((e) => e != null)
1688
- .map((entry) => {
1689
- return entry;
1690
- });
1691
- };
1692
- const se_TagList = (input, context) => {
1693
- return input
1694
- .filter((e) => e != null)
1695
- .map((entry) => {
1696
- return se_Tag(entry, context);
1697
- });
1698
- };
1699
- const se_TrainingParameters = (input, context) => {
1700
- return Object.entries(input).reduce((acc, [key, value]) => {
1701
- if (value === null) {
1702
- return acc;
1703
- }
1704
- acc[key] = value;
1705
- return acc;
1706
- }, {});
1707
- };
1708
- const se_UpdateBatchPredictionInput = (input, context) => {
1709
- return {
1710
- ...(input.BatchPredictionId != null && { BatchPredictionId: input.BatchPredictionId }),
1711
- ...(input.BatchPredictionName != null && { BatchPredictionName: input.BatchPredictionName }),
1712
- };
1713
- };
1714
- const se_UpdateDataSourceInput = (input, context) => {
1715
- return {
1716
- ...(input.DataSourceId != null && { DataSourceId: input.DataSourceId }),
1717
- ...(input.DataSourceName != null && { DataSourceName: input.DataSourceName }),
1718
- };
1719
- };
1720
- const se_UpdateEvaluationInput = (input, context) => {
1721
- return {
1722
- ...(input.EvaluationId != null && { EvaluationId: input.EvaluationId }),
1723
- ...(input.EvaluationName != null && { EvaluationName: input.EvaluationName }),
1724
- };
1725
- };
1726
1372
  const se_UpdateMLModelInput = (input, context) => {
1727
- return {
1728
- ...(input.MLModelId != null && { MLModelId: input.MLModelId }),
1729
- ...(input.MLModelName != null && { MLModelName: input.MLModelName }),
1730
- ...(input.ScoreThreshold != null && { ScoreThreshold: (0, smithy_client_1.serializeFloat)(input.ScoreThreshold) }),
1731
- };
1732
- };
1733
- const de_AddTagsOutput = (output, context) => {
1734
- return {
1735
- ResourceId: (0, smithy_client_1.expectString)(output.ResourceId),
1736
- ResourceType: (0, smithy_client_1.expectString)(output.ResourceType),
1737
- };
1373
+ return (0, smithy_client_1.take)(input, {
1374
+ MLModelId: [],
1375
+ MLModelName: [],
1376
+ ScoreThreshold: smithy_client_1.serializeFloat,
1377
+ });
1738
1378
  };
1739
1379
  const de_BatchPrediction = (output, context) => {
1740
- return {
1741
- BatchPredictionDataSourceId: (0, smithy_client_1.expectString)(output.BatchPredictionDataSourceId),
1742
- BatchPredictionId: (0, smithy_client_1.expectString)(output.BatchPredictionId),
1743
- ComputeTime: (0, smithy_client_1.expectLong)(output.ComputeTime),
1744
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
1745
- CreatedByIamUser: (0, smithy_client_1.expectString)(output.CreatedByIamUser),
1746
- FinishedAt: output.FinishedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.FinishedAt))) : undefined,
1747
- InputDataLocationS3: (0, smithy_client_1.expectString)(output.InputDataLocationS3),
1748
- InvalidRecordCount: (0, smithy_client_1.expectLong)(output.InvalidRecordCount),
1749
- LastUpdatedAt: output.LastUpdatedAt != null
1750
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedAt)))
1751
- : undefined,
1752
- MLModelId: (0, smithy_client_1.expectString)(output.MLModelId),
1753
- Message: (0, smithy_client_1.expectString)(output.Message),
1754
- Name: (0, smithy_client_1.expectString)(output.Name),
1755
- OutputUri: (0, smithy_client_1.expectString)(output.OutputUri),
1756
- StartedAt: output.StartedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartedAt))) : undefined,
1757
- Status: (0, smithy_client_1.expectString)(output.Status),
1758
- TotalRecordCount: (0, smithy_client_1.expectLong)(output.TotalRecordCount),
1759
- };
1380
+ return (0, smithy_client_1.take)(output, {
1381
+ BatchPredictionDataSourceId: smithy_client_1.expectString,
1382
+ BatchPredictionId: smithy_client_1.expectString,
1383
+ ComputeTime: smithy_client_1.expectLong,
1384
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1385
+ CreatedByIamUser: smithy_client_1.expectString,
1386
+ FinishedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1387
+ InputDataLocationS3: smithy_client_1.expectString,
1388
+ InvalidRecordCount: smithy_client_1.expectLong,
1389
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1390
+ MLModelId: smithy_client_1.expectString,
1391
+ Message: smithy_client_1.expectString,
1392
+ Name: smithy_client_1.expectString,
1393
+ OutputUri: smithy_client_1.expectString,
1394
+ StartedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1395
+ Status: smithy_client_1.expectString,
1396
+ TotalRecordCount: smithy_client_1.expectLong,
1397
+ });
1760
1398
  };
1761
1399
  const de_BatchPredictions = (output, context) => {
1762
1400
  const retVal = (output || [])
1763
1401
  .filter((e) => e != null)
1764
1402
  .map((entry) => {
1765
- if (entry === null) {
1766
- return null;
1767
- }
1768
1403
  return de_BatchPrediction(entry, context);
1769
1404
  });
1770
1405
  return retVal;
1771
1406
  };
1772
- const de_CreateBatchPredictionOutput = (output, context) => {
1773
- return {
1774
- BatchPredictionId: (0, smithy_client_1.expectString)(output.BatchPredictionId),
1775
- };
1776
- };
1777
- const de_CreateDataSourceFromRDSOutput = (output, context) => {
1778
- return {
1779
- DataSourceId: (0, smithy_client_1.expectString)(output.DataSourceId),
1780
- };
1781
- };
1782
- const de_CreateDataSourceFromRedshiftOutput = (output, context) => {
1783
- return {
1784
- DataSourceId: (0, smithy_client_1.expectString)(output.DataSourceId),
1785
- };
1786
- };
1787
- const de_CreateDataSourceFromS3Output = (output, context) => {
1788
- return {
1789
- DataSourceId: (0, smithy_client_1.expectString)(output.DataSourceId),
1790
- };
1791
- };
1792
- const de_CreateEvaluationOutput = (output, context) => {
1793
- return {
1794
- EvaluationId: (0, smithy_client_1.expectString)(output.EvaluationId),
1795
- };
1796
- };
1797
- const de_CreateMLModelOutput = (output, context) => {
1798
- return {
1799
- MLModelId: (0, smithy_client_1.expectString)(output.MLModelId),
1800
- };
1801
- };
1802
1407
  const de_CreateRealtimeEndpointOutput = (output, context) => {
1803
- return {
1804
- MLModelId: (0, smithy_client_1.expectString)(output.MLModelId),
1805
- RealtimeEndpointInfo: output.RealtimeEndpointInfo != null ? de_RealtimeEndpointInfo(output.RealtimeEndpointInfo, context) : undefined,
1806
- };
1408
+ return (0, smithy_client_1.take)(output, {
1409
+ MLModelId: smithy_client_1.expectString,
1410
+ RealtimeEndpointInfo: (_) => de_RealtimeEndpointInfo(_, context),
1411
+ });
1807
1412
  };
1808
1413
  const de_DataSource = (output, context) => {
1809
- return {
1810
- ComputeStatistics: (0, smithy_client_1.expectBoolean)(output.ComputeStatistics),
1811
- ComputeTime: (0, smithy_client_1.expectLong)(output.ComputeTime),
1812
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
1813
- CreatedByIamUser: (0, smithy_client_1.expectString)(output.CreatedByIamUser),
1814
- DataLocationS3: (0, smithy_client_1.expectString)(output.DataLocationS3),
1815
- DataRearrangement: (0, smithy_client_1.expectString)(output.DataRearrangement),
1816
- DataSizeInBytes: (0, smithy_client_1.expectLong)(output.DataSizeInBytes),
1817
- DataSourceId: (0, smithy_client_1.expectString)(output.DataSourceId),
1818
- FinishedAt: output.FinishedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.FinishedAt))) : undefined,
1819
- LastUpdatedAt: output.LastUpdatedAt != null
1820
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedAt)))
1821
- : undefined,
1822
- Message: (0, smithy_client_1.expectString)(output.Message),
1823
- Name: (0, smithy_client_1.expectString)(output.Name),
1824
- NumberOfFiles: (0, smithy_client_1.expectLong)(output.NumberOfFiles),
1825
- RDSMetadata: output.RDSMetadata != null ? de_RDSMetadata(output.RDSMetadata, context) : undefined,
1826
- RedshiftMetadata: output.RedshiftMetadata != null ? de_RedshiftMetadata(output.RedshiftMetadata, context) : undefined,
1827
- RoleARN: (0, smithy_client_1.expectString)(output.RoleARN),
1828
- StartedAt: output.StartedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartedAt))) : undefined,
1829
- Status: (0, smithy_client_1.expectString)(output.Status),
1830
- };
1414
+ return (0, smithy_client_1.take)(output, {
1415
+ ComputeStatistics: smithy_client_1.expectBoolean,
1416
+ ComputeTime: smithy_client_1.expectLong,
1417
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1418
+ CreatedByIamUser: smithy_client_1.expectString,
1419
+ DataLocationS3: smithy_client_1.expectString,
1420
+ DataRearrangement: smithy_client_1.expectString,
1421
+ DataSizeInBytes: smithy_client_1.expectLong,
1422
+ DataSourceId: smithy_client_1.expectString,
1423
+ FinishedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1424
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1425
+ Message: smithy_client_1.expectString,
1426
+ Name: smithy_client_1.expectString,
1427
+ NumberOfFiles: smithy_client_1.expectLong,
1428
+ RDSMetadata: smithy_client_1._json,
1429
+ RedshiftMetadata: smithy_client_1._json,
1430
+ RoleARN: smithy_client_1.expectString,
1431
+ StartedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1432
+ Status: smithy_client_1.expectString,
1433
+ });
1831
1434
  };
1832
1435
  const de_DataSources = (output, context) => {
1833
1436
  const retVal = (output || [])
1834
1437
  .filter((e) => e != null)
1835
1438
  .map((entry) => {
1836
- if (entry === null) {
1837
- return null;
1838
- }
1839
1439
  return de_DataSource(entry, context);
1840
1440
  });
1841
1441
  return retVal;
1842
1442
  };
1843
- const de_DeleteBatchPredictionOutput = (output, context) => {
1844
- return {
1845
- BatchPredictionId: (0, smithy_client_1.expectString)(output.BatchPredictionId),
1846
- };
1847
- };
1848
- const de_DeleteDataSourceOutput = (output, context) => {
1849
- return {
1850
- DataSourceId: (0, smithy_client_1.expectString)(output.DataSourceId),
1851
- };
1852
- };
1853
- const de_DeleteEvaluationOutput = (output, context) => {
1854
- return {
1855
- EvaluationId: (0, smithy_client_1.expectString)(output.EvaluationId),
1856
- };
1857
- };
1858
- const de_DeleteMLModelOutput = (output, context) => {
1859
- return {
1860
- MLModelId: (0, smithy_client_1.expectString)(output.MLModelId),
1861
- };
1862
- };
1863
1443
  const de_DeleteRealtimeEndpointOutput = (output, context) => {
1864
- return {
1865
- MLModelId: (0, smithy_client_1.expectString)(output.MLModelId),
1866
- RealtimeEndpointInfo: output.RealtimeEndpointInfo != null ? de_RealtimeEndpointInfo(output.RealtimeEndpointInfo, context) : undefined,
1867
- };
1868
- };
1869
- const de_DeleteTagsOutput = (output, context) => {
1870
- return {
1871
- ResourceId: (0, smithy_client_1.expectString)(output.ResourceId),
1872
- ResourceType: (0, smithy_client_1.expectString)(output.ResourceType),
1873
- };
1444
+ return (0, smithy_client_1.take)(output, {
1445
+ MLModelId: smithy_client_1.expectString,
1446
+ RealtimeEndpointInfo: (_) => de_RealtimeEndpointInfo(_, context),
1447
+ });
1874
1448
  };
1875
1449
  const de_DescribeBatchPredictionsOutput = (output, context) => {
1876
- return {
1877
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1878
- Results: output.Results != null ? de_BatchPredictions(output.Results, context) : undefined,
1879
- };
1450
+ return (0, smithy_client_1.take)(output, {
1451
+ NextToken: smithy_client_1.expectString,
1452
+ Results: (_) => de_BatchPredictions(_, context),
1453
+ });
1880
1454
  };
1881
1455
  const de_DescribeDataSourcesOutput = (output, context) => {
1882
- return {
1883
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1884
- Results: output.Results != null ? de_DataSources(output.Results, context) : undefined,
1885
- };
1456
+ return (0, smithy_client_1.take)(output, {
1457
+ NextToken: smithy_client_1.expectString,
1458
+ Results: (_) => de_DataSources(_, context),
1459
+ });
1886
1460
  };
1887
1461
  const de_DescribeEvaluationsOutput = (output, context) => {
1888
- return {
1889
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1890
- Results: output.Results != null ? de_Evaluations(output.Results, context) : undefined,
1891
- };
1462
+ return (0, smithy_client_1.take)(output, {
1463
+ NextToken: smithy_client_1.expectString,
1464
+ Results: (_) => de_Evaluations(_, context),
1465
+ });
1892
1466
  };
1893
1467
  const de_DescribeMLModelsOutput = (output, context) => {
1894
- return {
1895
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1896
- Results: output.Results != null ? de_MLModels(output.Results, context) : undefined,
1897
- };
1898
- };
1899
- const de_DescribeTagsOutput = (output, context) => {
1900
- return {
1901
- ResourceId: (0, smithy_client_1.expectString)(output.ResourceId),
1902
- ResourceType: (0, smithy_client_1.expectString)(output.ResourceType),
1903
- Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
1904
- };
1905
- };
1906
- const de_DetailsMap = (output, context) => {
1907
- return Object.entries(output).reduce((acc, [key, value]) => {
1908
- if (value === null) {
1909
- return acc;
1910
- }
1911
- acc[key] = (0, smithy_client_1.expectString)(value);
1912
- return acc;
1913
- }, {});
1468
+ return (0, smithy_client_1.take)(output, {
1469
+ NextToken: smithy_client_1.expectString,
1470
+ Results: (_) => de_MLModels(_, context),
1471
+ });
1914
1472
  };
1915
1473
  const de_Evaluation = (output, context) => {
1916
- return {
1917
- ComputeTime: (0, smithy_client_1.expectLong)(output.ComputeTime),
1918
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
1919
- CreatedByIamUser: (0, smithy_client_1.expectString)(output.CreatedByIamUser),
1920
- EvaluationDataSourceId: (0, smithy_client_1.expectString)(output.EvaluationDataSourceId),
1921
- EvaluationId: (0, smithy_client_1.expectString)(output.EvaluationId),
1922
- FinishedAt: output.FinishedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.FinishedAt))) : undefined,
1923
- InputDataLocationS3: (0, smithy_client_1.expectString)(output.InputDataLocationS3),
1924
- LastUpdatedAt: output.LastUpdatedAt != null
1925
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedAt)))
1926
- : undefined,
1927
- MLModelId: (0, smithy_client_1.expectString)(output.MLModelId),
1928
- Message: (0, smithy_client_1.expectString)(output.Message),
1929
- Name: (0, smithy_client_1.expectString)(output.Name),
1930
- PerformanceMetrics: output.PerformanceMetrics != null ? de_PerformanceMetrics(output.PerformanceMetrics, context) : undefined,
1931
- StartedAt: output.StartedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartedAt))) : undefined,
1932
- Status: (0, smithy_client_1.expectString)(output.Status),
1933
- };
1474
+ return (0, smithy_client_1.take)(output, {
1475
+ ComputeTime: smithy_client_1.expectLong,
1476
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1477
+ CreatedByIamUser: smithy_client_1.expectString,
1478
+ EvaluationDataSourceId: smithy_client_1.expectString,
1479
+ EvaluationId: smithy_client_1.expectString,
1480
+ FinishedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1481
+ InputDataLocationS3: smithy_client_1.expectString,
1482
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1483
+ MLModelId: smithy_client_1.expectString,
1484
+ Message: smithy_client_1.expectString,
1485
+ Name: smithy_client_1.expectString,
1486
+ PerformanceMetrics: smithy_client_1._json,
1487
+ StartedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1488
+ Status: smithy_client_1.expectString,
1489
+ });
1934
1490
  };
1935
1491
  const de_Evaluations = (output, context) => {
1936
1492
  const retVal = (output || [])
1937
1493
  .filter((e) => e != null)
1938
1494
  .map((entry) => {
1939
- if (entry === null) {
1940
- return null;
1941
- }
1942
1495
  return de_Evaluation(entry, context);
1943
1496
  });
1944
1497
  return retVal;
1945
1498
  };
1946
1499
  const de_GetBatchPredictionOutput = (output, context) => {
1947
- return {
1948
- BatchPredictionDataSourceId: (0, smithy_client_1.expectString)(output.BatchPredictionDataSourceId),
1949
- BatchPredictionId: (0, smithy_client_1.expectString)(output.BatchPredictionId),
1950
- ComputeTime: (0, smithy_client_1.expectLong)(output.ComputeTime),
1951
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
1952
- CreatedByIamUser: (0, smithy_client_1.expectString)(output.CreatedByIamUser),
1953
- FinishedAt: output.FinishedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.FinishedAt))) : undefined,
1954
- InputDataLocationS3: (0, smithy_client_1.expectString)(output.InputDataLocationS3),
1955
- InvalidRecordCount: (0, smithy_client_1.expectLong)(output.InvalidRecordCount),
1956
- LastUpdatedAt: output.LastUpdatedAt != null
1957
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedAt)))
1958
- : undefined,
1959
- LogUri: (0, smithy_client_1.expectString)(output.LogUri),
1960
- MLModelId: (0, smithy_client_1.expectString)(output.MLModelId),
1961
- Message: (0, smithy_client_1.expectString)(output.Message),
1962
- Name: (0, smithy_client_1.expectString)(output.Name),
1963
- OutputUri: (0, smithy_client_1.expectString)(output.OutputUri),
1964
- StartedAt: output.StartedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartedAt))) : undefined,
1965
- Status: (0, smithy_client_1.expectString)(output.Status),
1966
- TotalRecordCount: (0, smithy_client_1.expectLong)(output.TotalRecordCount),
1967
- };
1500
+ return (0, smithy_client_1.take)(output, {
1501
+ BatchPredictionDataSourceId: smithy_client_1.expectString,
1502
+ BatchPredictionId: smithy_client_1.expectString,
1503
+ ComputeTime: smithy_client_1.expectLong,
1504
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1505
+ CreatedByIamUser: smithy_client_1.expectString,
1506
+ FinishedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1507
+ InputDataLocationS3: smithy_client_1.expectString,
1508
+ InvalidRecordCount: smithy_client_1.expectLong,
1509
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1510
+ LogUri: smithy_client_1.expectString,
1511
+ MLModelId: smithy_client_1.expectString,
1512
+ Message: smithy_client_1.expectString,
1513
+ Name: smithy_client_1.expectString,
1514
+ OutputUri: smithy_client_1.expectString,
1515
+ StartedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1516
+ Status: smithy_client_1.expectString,
1517
+ TotalRecordCount: smithy_client_1.expectLong,
1518
+ });
1968
1519
  };
1969
1520
  const de_GetDataSourceOutput = (output, context) => {
1970
- return {
1971
- ComputeStatistics: (0, smithy_client_1.expectBoolean)(output.ComputeStatistics),
1972
- ComputeTime: (0, smithy_client_1.expectLong)(output.ComputeTime),
1973
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
1974
- CreatedByIamUser: (0, smithy_client_1.expectString)(output.CreatedByIamUser),
1975
- DataLocationS3: (0, smithy_client_1.expectString)(output.DataLocationS3),
1976
- DataRearrangement: (0, smithy_client_1.expectString)(output.DataRearrangement),
1977
- DataSizeInBytes: (0, smithy_client_1.expectLong)(output.DataSizeInBytes),
1978
- DataSourceId: (0, smithy_client_1.expectString)(output.DataSourceId),
1979
- DataSourceSchema: (0, smithy_client_1.expectString)(output.DataSourceSchema),
1980
- FinishedAt: output.FinishedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.FinishedAt))) : undefined,
1981
- LastUpdatedAt: output.LastUpdatedAt != null
1982
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedAt)))
1983
- : undefined,
1984
- LogUri: (0, smithy_client_1.expectString)(output.LogUri),
1985
- Message: (0, smithy_client_1.expectString)(output.Message),
1986
- Name: (0, smithy_client_1.expectString)(output.Name),
1987
- NumberOfFiles: (0, smithy_client_1.expectLong)(output.NumberOfFiles),
1988
- RDSMetadata: output.RDSMetadata != null ? de_RDSMetadata(output.RDSMetadata, context) : undefined,
1989
- RedshiftMetadata: output.RedshiftMetadata != null ? de_RedshiftMetadata(output.RedshiftMetadata, context) : undefined,
1990
- RoleARN: (0, smithy_client_1.expectString)(output.RoleARN),
1991
- StartedAt: output.StartedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartedAt))) : undefined,
1992
- Status: (0, smithy_client_1.expectString)(output.Status),
1993
- };
1521
+ return (0, smithy_client_1.take)(output, {
1522
+ ComputeStatistics: smithy_client_1.expectBoolean,
1523
+ ComputeTime: smithy_client_1.expectLong,
1524
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1525
+ CreatedByIamUser: smithy_client_1.expectString,
1526
+ DataLocationS3: smithy_client_1.expectString,
1527
+ DataRearrangement: smithy_client_1.expectString,
1528
+ DataSizeInBytes: smithy_client_1.expectLong,
1529
+ DataSourceId: smithy_client_1.expectString,
1530
+ DataSourceSchema: smithy_client_1.expectString,
1531
+ FinishedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1532
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1533
+ LogUri: smithy_client_1.expectString,
1534
+ Message: smithy_client_1.expectString,
1535
+ Name: smithy_client_1.expectString,
1536
+ NumberOfFiles: smithy_client_1.expectLong,
1537
+ RDSMetadata: smithy_client_1._json,
1538
+ RedshiftMetadata: smithy_client_1._json,
1539
+ RoleARN: smithy_client_1.expectString,
1540
+ StartedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1541
+ Status: smithy_client_1.expectString,
1542
+ });
1994
1543
  };
1995
1544
  const de_GetEvaluationOutput = (output, context) => {
1996
- return {
1997
- ComputeTime: (0, smithy_client_1.expectLong)(output.ComputeTime),
1998
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
1999
- CreatedByIamUser: (0, smithy_client_1.expectString)(output.CreatedByIamUser),
2000
- EvaluationDataSourceId: (0, smithy_client_1.expectString)(output.EvaluationDataSourceId),
2001
- EvaluationId: (0, smithy_client_1.expectString)(output.EvaluationId),
2002
- FinishedAt: output.FinishedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.FinishedAt))) : undefined,
2003
- InputDataLocationS3: (0, smithy_client_1.expectString)(output.InputDataLocationS3),
2004
- LastUpdatedAt: output.LastUpdatedAt != null
2005
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedAt)))
2006
- : undefined,
2007
- LogUri: (0, smithy_client_1.expectString)(output.LogUri),
2008
- MLModelId: (0, smithy_client_1.expectString)(output.MLModelId),
2009
- Message: (0, smithy_client_1.expectString)(output.Message),
2010
- Name: (0, smithy_client_1.expectString)(output.Name),
2011
- PerformanceMetrics: output.PerformanceMetrics != null ? de_PerformanceMetrics(output.PerformanceMetrics, context) : undefined,
2012
- StartedAt: output.StartedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartedAt))) : undefined,
2013
- Status: (0, smithy_client_1.expectString)(output.Status),
2014
- };
1545
+ return (0, smithy_client_1.take)(output, {
1546
+ ComputeTime: smithy_client_1.expectLong,
1547
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1548
+ CreatedByIamUser: smithy_client_1.expectString,
1549
+ EvaluationDataSourceId: smithy_client_1.expectString,
1550
+ EvaluationId: smithy_client_1.expectString,
1551
+ FinishedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1552
+ InputDataLocationS3: smithy_client_1.expectString,
1553
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1554
+ LogUri: smithy_client_1.expectString,
1555
+ MLModelId: smithy_client_1.expectString,
1556
+ Message: smithy_client_1.expectString,
1557
+ Name: smithy_client_1.expectString,
1558
+ PerformanceMetrics: smithy_client_1._json,
1559
+ StartedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1560
+ Status: smithy_client_1.expectString,
1561
+ });
2015
1562
  };
2016
1563
  const de_GetMLModelOutput = (output, context) => {
2017
- return {
2018
- ComputeTime: (0, smithy_client_1.expectLong)(output.ComputeTime),
2019
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
2020
- CreatedByIamUser: (0, smithy_client_1.expectString)(output.CreatedByIamUser),
2021
- EndpointInfo: output.EndpointInfo != null ? de_RealtimeEndpointInfo(output.EndpointInfo, context) : undefined,
2022
- FinishedAt: output.FinishedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.FinishedAt))) : undefined,
2023
- InputDataLocationS3: (0, smithy_client_1.expectString)(output.InputDataLocationS3),
2024
- LastUpdatedAt: output.LastUpdatedAt != null
2025
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedAt)))
2026
- : undefined,
2027
- LogUri: (0, smithy_client_1.expectString)(output.LogUri),
2028
- MLModelId: (0, smithy_client_1.expectString)(output.MLModelId),
2029
- MLModelType: (0, smithy_client_1.expectString)(output.MLModelType),
2030
- Message: (0, smithy_client_1.expectString)(output.Message),
2031
- Name: (0, smithy_client_1.expectString)(output.Name),
2032
- Recipe: (0, smithy_client_1.expectString)(output.Recipe),
2033
- Schema: (0, smithy_client_1.expectString)(output.Schema),
2034
- ScoreThreshold: (0, smithy_client_1.limitedParseFloat32)(output.ScoreThreshold),
2035
- ScoreThresholdLastUpdatedAt: output.ScoreThresholdLastUpdatedAt != null
2036
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.ScoreThresholdLastUpdatedAt)))
2037
- : undefined,
2038
- SizeInBytes: (0, smithy_client_1.expectLong)(output.SizeInBytes),
2039
- StartedAt: output.StartedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartedAt))) : undefined,
2040
- Status: (0, smithy_client_1.expectString)(output.Status),
2041
- TrainingDataSourceId: (0, smithy_client_1.expectString)(output.TrainingDataSourceId),
2042
- TrainingParameters: output.TrainingParameters != null ? de_TrainingParameters(output.TrainingParameters, context) : undefined,
2043
- };
2044
- };
2045
- const de_IdempotentParameterMismatchException = (output, context) => {
2046
- return {
2047
- code: (0, smithy_client_1.expectInt32)(output.code),
2048
- message: (0, smithy_client_1.expectString)(output.message),
2049
- };
2050
- };
2051
- const de_InternalServerException = (output, context) => {
2052
- return {
2053
- code: (0, smithy_client_1.expectInt32)(output.code),
2054
- message: (0, smithy_client_1.expectString)(output.message),
2055
- };
2056
- };
2057
- const de_InvalidInputException = (output, context) => {
2058
- return {
2059
- code: (0, smithy_client_1.expectInt32)(output.code),
2060
- message: (0, smithy_client_1.expectString)(output.message),
2061
- };
2062
- };
2063
- const de_InvalidTagException = (output, context) => {
2064
- return {
2065
- message: (0, smithy_client_1.expectString)(output.message),
2066
- };
2067
- };
2068
- const de_LimitExceededException = (output, context) => {
2069
- return {
2070
- code: (0, smithy_client_1.expectInt32)(output.code),
2071
- message: (0, smithy_client_1.expectString)(output.message),
2072
- };
1564
+ return (0, smithy_client_1.take)(output, {
1565
+ ComputeTime: smithy_client_1.expectLong,
1566
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1567
+ CreatedByIamUser: smithy_client_1.expectString,
1568
+ EndpointInfo: (_) => de_RealtimeEndpointInfo(_, context),
1569
+ FinishedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1570
+ InputDataLocationS3: smithy_client_1.expectString,
1571
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1572
+ LogUri: smithy_client_1.expectString,
1573
+ MLModelId: smithy_client_1.expectString,
1574
+ MLModelType: smithy_client_1.expectString,
1575
+ Message: smithy_client_1.expectString,
1576
+ Name: smithy_client_1.expectString,
1577
+ Recipe: smithy_client_1.expectString,
1578
+ Schema: smithy_client_1.expectString,
1579
+ ScoreThreshold: smithy_client_1.limitedParseFloat32,
1580
+ ScoreThresholdLastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1581
+ SizeInBytes: smithy_client_1.expectLong,
1582
+ StartedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1583
+ Status: smithy_client_1.expectString,
1584
+ TrainingDataSourceId: smithy_client_1.expectString,
1585
+ TrainingParameters: smithy_client_1._json,
1586
+ });
2073
1587
  };
2074
1588
  const de_MLModel = (output, context) => {
2075
- return {
2076
- Algorithm: (0, smithy_client_1.expectString)(output.Algorithm),
2077
- ComputeTime: (0, smithy_client_1.expectLong)(output.ComputeTime),
2078
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
2079
- CreatedByIamUser: (0, smithy_client_1.expectString)(output.CreatedByIamUser),
2080
- EndpointInfo: output.EndpointInfo != null ? de_RealtimeEndpointInfo(output.EndpointInfo, context) : undefined,
2081
- FinishedAt: output.FinishedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.FinishedAt))) : undefined,
2082
- InputDataLocationS3: (0, smithy_client_1.expectString)(output.InputDataLocationS3),
2083
- LastUpdatedAt: output.LastUpdatedAt != null
2084
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedAt)))
2085
- : undefined,
2086
- MLModelId: (0, smithy_client_1.expectString)(output.MLModelId),
2087
- MLModelType: (0, smithy_client_1.expectString)(output.MLModelType),
2088
- Message: (0, smithy_client_1.expectString)(output.Message),
2089
- Name: (0, smithy_client_1.expectString)(output.Name),
2090
- ScoreThreshold: (0, smithy_client_1.limitedParseFloat32)(output.ScoreThreshold),
2091
- ScoreThresholdLastUpdatedAt: output.ScoreThresholdLastUpdatedAt != null
2092
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.ScoreThresholdLastUpdatedAt)))
2093
- : undefined,
2094
- SizeInBytes: (0, smithy_client_1.expectLong)(output.SizeInBytes),
2095
- StartedAt: output.StartedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartedAt))) : undefined,
2096
- Status: (0, smithy_client_1.expectString)(output.Status),
2097
- TrainingDataSourceId: (0, smithy_client_1.expectString)(output.TrainingDataSourceId),
2098
- TrainingParameters: output.TrainingParameters != null ? de_TrainingParameters(output.TrainingParameters, context) : undefined,
2099
- };
1589
+ return (0, smithy_client_1.take)(output, {
1590
+ Algorithm: smithy_client_1.expectString,
1591
+ ComputeTime: smithy_client_1.expectLong,
1592
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1593
+ CreatedByIamUser: smithy_client_1.expectString,
1594
+ EndpointInfo: (_) => de_RealtimeEndpointInfo(_, context),
1595
+ FinishedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1596
+ InputDataLocationS3: smithy_client_1.expectString,
1597
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1598
+ MLModelId: smithy_client_1.expectString,
1599
+ MLModelType: smithy_client_1.expectString,
1600
+ Message: smithy_client_1.expectString,
1601
+ Name: smithy_client_1.expectString,
1602
+ ScoreThreshold: smithy_client_1.limitedParseFloat32,
1603
+ ScoreThresholdLastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1604
+ SizeInBytes: smithy_client_1.expectLong,
1605
+ StartedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1606
+ Status: smithy_client_1.expectString,
1607
+ TrainingDataSourceId: smithy_client_1.expectString,
1608
+ TrainingParameters: smithy_client_1._json,
1609
+ });
2100
1610
  };
2101
1611
  const de_MLModels = (output, context) => {
2102
1612
  const retVal = (output || [])
2103
1613
  .filter((e) => e != null)
2104
1614
  .map((entry) => {
2105
- if (entry === null) {
2106
- return null;
2107
- }
2108
1615
  return de_MLModel(entry, context);
2109
1616
  });
2110
1617
  return retVal;
2111
1618
  };
2112
- const de_PerformanceMetrics = (output, context) => {
2113
- return {
2114
- Properties: output.Properties != null ? de_PerformanceMetricsProperties(output.Properties, context) : undefined,
2115
- };
2116
- };
2117
- const de_PerformanceMetricsProperties = (output, context) => {
2118
- return Object.entries(output).reduce((acc, [key, value]) => {
2119
- if (value === null) {
2120
- return acc;
2121
- }
2122
- acc[key] = (0, smithy_client_1.expectString)(value);
2123
- return acc;
2124
- }, {});
2125
- };
2126
1619
  const de_Prediction = (output, context) => {
2127
- return {
2128
- details: output.details != null ? de_DetailsMap(output.details, context) : undefined,
2129
- predictedLabel: (0, smithy_client_1.expectString)(output.predictedLabel),
2130
- predictedScores: output.predictedScores != null ? de_ScoreValuePerLabelMap(output.predictedScores, context) : undefined,
2131
- predictedValue: (0, smithy_client_1.limitedParseFloat32)(output.predictedValue),
2132
- };
2133
- };
2134
- const de_PredictorNotMountedException = (output, context) => {
2135
- return {
2136
- message: (0, smithy_client_1.expectString)(output.message),
2137
- };
1620
+ return (0, smithy_client_1.take)(output, {
1621
+ details: smithy_client_1._json,
1622
+ predictedLabel: smithy_client_1.expectString,
1623
+ predictedScores: (_) => de_ScoreValuePerLabelMap(_, context),
1624
+ predictedValue: smithy_client_1.limitedParseFloat32,
1625
+ });
2138
1626
  };
2139
1627
  const de_PredictOutput = (output, context) => {
2140
- return {
2141
- Prediction: output.Prediction != null ? de_Prediction(output.Prediction, context) : undefined,
2142
- };
2143
- };
2144
- const de_RDSDatabase = (output, context) => {
2145
- return {
2146
- DatabaseName: (0, smithy_client_1.expectString)(output.DatabaseName),
2147
- InstanceIdentifier: (0, smithy_client_1.expectString)(output.InstanceIdentifier),
2148
- };
2149
- };
2150
- const de_RDSMetadata = (output, context) => {
2151
- return {
2152
- DataPipelineId: (0, smithy_client_1.expectString)(output.DataPipelineId),
2153
- Database: output.Database != null ? de_RDSDatabase(output.Database, context) : undefined,
2154
- DatabaseUserName: (0, smithy_client_1.expectString)(output.DatabaseUserName),
2155
- ResourceRole: (0, smithy_client_1.expectString)(output.ResourceRole),
2156
- SelectSqlQuery: (0, smithy_client_1.expectString)(output.SelectSqlQuery),
2157
- ServiceRole: (0, smithy_client_1.expectString)(output.ServiceRole),
2158
- };
1628
+ return (0, smithy_client_1.take)(output, {
1629
+ Prediction: (_) => de_Prediction(_, context),
1630
+ });
2159
1631
  };
2160
1632
  const de_RealtimeEndpointInfo = (output, context) => {
2161
- return {
2162
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
2163
- EndpointStatus: (0, smithy_client_1.expectString)(output.EndpointStatus),
2164
- EndpointUrl: (0, smithy_client_1.expectString)(output.EndpointUrl),
2165
- PeakRequestsPerSecond: (0, smithy_client_1.expectInt32)(output.PeakRequestsPerSecond),
2166
- };
2167
- };
2168
- const de_RedshiftDatabase = (output, context) => {
2169
- return {
2170
- ClusterIdentifier: (0, smithy_client_1.expectString)(output.ClusterIdentifier),
2171
- DatabaseName: (0, smithy_client_1.expectString)(output.DatabaseName),
2172
- };
2173
- };
2174
- const de_RedshiftMetadata = (output, context) => {
2175
- return {
2176
- DatabaseUserName: (0, smithy_client_1.expectString)(output.DatabaseUserName),
2177
- RedshiftDatabase: output.RedshiftDatabase != null ? de_RedshiftDatabase(output.RedshiftDatabase, context) : undefined,
2178
- SelectSqlQuery: (0, smithy_client_1.expectString)(output.SelectSqlQuery),
2179
- };
2180
- };
2181
- const de_ResourceNotFoundException = (output, context) => {
2182
- return {
2183
- code: (0, smithy_client_1.expectInt32)(output.code),
2184
- message: (0, smithy_client_1.expectString)(output.message),
2185
- };
1633
+ return (0, smithy_client_1.take)(output, {
1634
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1635
+ EndpointStatus: smithy_client_1.expectString,
1636
+ EndpointUrl: smithy_client_1.expectString,
1637
+ PeakRequestsPerSecond: smithy_client_1.expectInt32,
1638
+ });
2186
1639
  };
2187
1640
  const de_ScoreValuePerLabelMap = (output, context) => {
2188
1641
  return Object.entries(output).reduce((acc, [key, value]) => {
@@ -2193,57 +1646,6 @@ const de_ScoreValuePerLabelMap = (output, context) => {
2193
1646
  return acc;
2194
1647
  }, {});
2195
1648
  };
2196
- const de_Tag = (output, context) => {
2197
- return {
2198
- Key: (0, smithy_client_1.expectString)(output.Key),
2199
- Value: (0, smithy_client_1.expectString)(output.Value),
2200
- };
2201
- };
2202
- const de_TagLimitExceededException = (output, context) => {
2203
- return {
2204
- message: (0, smithy_client_1.expectString)(output.message),
2205
- };
2206
- };
2207
- const de_TagList = (output, context) => {
2208
- const retVal = (output || [])
2209
- .filter((e) => e != null)
2210
- .map((entry) => {
2211
- if (entry === null) {
2212
- return null;
2213
- }
2214
- return de_Tag(entry, context);
2215
- });
2216
- return retVal;
2217
- };
2218
- const de_TrainingParameters = (output, context) => {
2219
- return Object.entries(output).reduce((acc, [key, value]) => {
2220
- if (value === null) {
2221
- return acc;
2222
- }
2223
- acc[key] = (0, smithy_client_1.expectString)(value);
2224
- return acc;
2225
- }, {});
2226
- };
2227
- const de_UpdateBatchPredictionOutput = (output, context) => {
2228
- return {
2229
- BatchPredictionId: (0, smithy_client_1.expectString)(output.BatchPredictionId),
2230
- };
2231
- };
2232
- const de_UpdateDataSourceOutput = (output, context) => {
2233
- return {
2234
- DataSourceId: (0, smithy_client_1.expectString)(output.DataSourceId),
2235
- };
2236
- };
2237
- const de_UpdateEvaluationOutput = (output, context) => {
2238
- return {
2239
- EvaluationId: (0, smithy_client_1.expectString)(output.EvaluationId),
2240
- };
2241
- };
2242
- const de_UpdateMLModelOutput = (output, context) => {
2243
- return {
2244
- MLModelId: (0, smithy_client_1.expectString)(output.MLModelId),
2245
- };
2246
- };
2247
1649
  const deserializeMetadata = (output) => ({
2248
1650
  httpStatusCode: output.statusCode,
2249
1651
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -2257,6 +1659,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
2257
1659
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2258
1660
  };
2259
1661
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1662
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(MachineLearningServiceException_1.MachineLearningServiceException);
2260
1663
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2261
1664
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2262
1665
  const contents = {