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