@aws-sdk/client-machine-learning 3.489.0 → 3.495.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist-cjs/MachineLearning.js +1 -67
  2. package/dist-cjs/MachineLearningClient.js +1 -43
  3. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +1 -0
  4. package/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
  5. package/dist-cjs/commands/AddTagsCommand.js +1 -28
  6. package/dist-cjs/commands/CreateBatchPredictionCommand.js +1 -28
  7. package/dist-cjs/commands/CreateDataSourceFromRDSCommand.js +1 -29
  8. package/dist-cjs/commands/CreateDataSourceFromRedshiftCommand.js +1 -29
  9. package/dist-cjs/commands/CreateDataSourceFromS3Command.js +1 -28
  10. package/dist-cjs/commands/CreateEvaluationCommand.js +1 -28
  11. package/dist-cjs/commands/CreateMLModelCommand.js +1 -28
  12. package/dist-cjs/commands/CreateRealtimeEndpointCommand.js +1 -28
  13. package/dist-cjs/commands/DeleteBatchPredictionCommand.js +1 -28
  14. package/dist-cjs/commands/DeleteDataSourceCommand.js +1 -28
  15. package/dist-cjs/commands/DeleteEvaluationCommand.js +1 -28
  16. package/dist-cjs/commands/DeleteMLModelCommand.js +1 -28
  17. package/dist-cjs/commands/DeleteRealtimeEndpointCommand.js +1 -28
  18. package/dist-cjs/commands/DeleteTagsCommand.js +1 -28
  19. package/dist-cjs/commands/DescribeBatchPredictionsCommand.js +1 -28
  20. package/dist-cjs/commands/DescribeDataSourcesCommand.js +1 -28
  21. package/dist-cjs/commands/DescribeEvaluationsCommand.js +1 -28
  22. package/dist-cjs/commands/DescribeMLModelsCommand.js +1 -28
  23. package/dist-cjs/commands/DescribeTagsCommand.js +1 -28
  24. package/dist-cjs/commands/GetBatchPredictionCommand.js +1 -28
  25. package/dist-cjs/commands/GetDataSourceCommand.js +1 -28
  26. package/dist-cjs/commands/GetEvaluationCommand.js +1 -28
  27. package/dist-cjs/commands/GetMLModelCommand.js +1 -28
  28. package/dist-cjs/commands/PredictCommand.js +1 -30
  29. package/dist-cjs/commands/UpdateBatchPredictionCommand.js +1 -28
  30. package/dist-cjs/commands/UpdateDataSourceCommand.js +1 -28
  31. package/dist-cjs/commands/UpdateEvaluationCommand.js +1 -28
  32. package/dist-cjs/commands/UpdateMLModelCommand.js +1 -28
  33. package/dist-cjs/commands/index.js +1 -31
  34. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  35. package/dist-cjs/extensionConfiguration.js +1 -2
  36. package/dist-cjs/index.js +2979 -12
  37. package/dist-cjs/models/MachineLearningServiceException.js +1 -12
  38. package/dist-cjs/models/index.js +1 -4
  39. package/dist-cjs/models/models_0.js +1 -223
  40. package/dist-cjs/pagination/DescribeBatchPredictionsPaginator.js +1 -7
  41. package/dist-cjs/pagination/DescribeDataSourcesPaginator.js +1 -7
  42. package/dist-cjs/pagination/DescribeEvaluationsPaginator.js +1 -7
  43. package/dist-cjs/pagination/DescribeMLModelsPaginator.js +1 -7
  44. package/dist-cjs/pagination/Interfaces.js +1 -2
  45. package/dist-cjs/pagination/index.js +1 -8
  46. package/dist-cjs/protocols/Aws_json1_1.js +1 -1720
  47. package/dist-cjs/runtimeConfig.shared.js +10 -0
  48. package/dist-cjs/runtimeExtensions.js +1 -22
  49. package/dist-cjs/waiters/index.js +1 -7
  50. package/dist-cjs/waiters/waitForBatchPredictionAvailable.js +1 -59
  51. package/dist-cjs/waiters/waitForDataSourceAvailable.js +1 -59
  52. package/dist-cjs/waiters/waitForEvaluationAvailable.js +1 -59
  53. package/dist-cjs/waiters/waitForMLModelAvailable.js +1 -59
  54. package/dist-es/MachineLearningClient.js +17 -4
  55. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  56. package/dist-es/auth/httpAuthSchemeProvider.js +41 -0
  57. package/dist-es/runtimeConfig.shared.js +10 -0
  58. package/dist-es/runtimeExtensions.js +3 -0
  59. package/dist-types/MachineLearningClient.d.ts +13 -11
  60. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  61. package/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
  62. package/dist-types/extensionConfiguration.d.ts +2 -1
  63. package/dist-types/runtimeConfig.browser.d.ts +5 -3
  64. package/dist-types/runtimeConfig.d.ts +5 -3
  65. package/dist-types/runtimeConfig.native.d.ts +6 -4
  66. package/dist-types/runtimeConfig.shared.d.ts +2 -0
  67. package/dist-types/ts3.4/MachineLearningClient.d.ts +11 -9
  68. package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  69. package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +44 -0
  70. package/dist-types/ts3.4/extensionConfiguration.d.ts +3 -1
  71. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +5 -5
  72. package/dist-types/ts3.4/runtimeConfig.d.ts +5 -5
  73. package/dist-types/ts3.4/runtimeConfig.native.d.ts +8 -8
  74. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +2 -0
  75. package/package.json +42 -42
@@ -1,1720 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_GetEvaluationCommand = exports.de_GetDataSourceCommand = exports.de_GetBatchPredictionCommand = exports.de_DescribeTagsCommand = exports.de_DescribeMLModelsCommand = exports.de_DescribeEvaluationsCommand = exports.de_DescribeDataSourcesCommand = exports.de_DescribeBatchPredictionsCommand = exports.de_DeleteTagsCommand = exports.de_DeleteRealtimeEndpointCommand = exports.de_DeleteMLModelCommand = exports.de_DeleteEvaluationCommand = exports.de_DeleteDataSourceCommand = exports.de_DeleteBatchPredictionCommand = exports.de_CreateRealtimeEndpointCommand = exports.de_CreateMLModelCommand = exports.de_CreateEvaluationCommand = exports.de_CreateDataSourceFromS3Command = exports.de_CreateDataSourceFromRedshiftCommand = exports.de_CreateDataSourceFromRDSCommand = exports.de_CreateBatchPredictionCommand = exports.de_AddTagsCommand = exports.se_UpdateMLModelCommand = exports.se_UpdateEvaluationCommand = exports.se_UpdateDataSourceCommand = exports.se_UpdateBatchPredictionCommand = exports.se_PredictCommand = exports.se_GetMLModelCommand = exports.se_GetEvaluationCommand = exports.se_GetDataSourceCommand = exports.se_GetBatchPredictionCommand = exports.se_DescribeTagsCommand = exports.se_DescribeMLModelsCommand = exports.se_DescribeEvaluationsCommand = exports.se_DescribeDataSourcesCommand = exports.se_DescribeBatchPredictionsCommand = exports.se_DeleteTagsCommand = exports.se_DeleteRealtimeEndpointCommand = exports.se_DeleteMLModelCommand = exports.se_DeleteEvaluationCommand = exports.se_DeleteDataSourceCommand = exports.se_DeleteBatchPredictionCommand = exports.se_CreateRealtimeEndpointCommand = exports.se_CreateMLModelCommand = exports.se_CreateEvaluationCommand = exports.se_CreateDataSourceFromS3Command = exports.se_CreateDataSourceFromRedshiftCommand = exports.se_CreateDataSourceFromRDSCommand = exports.se_CreateBatchPredictionCommand = exports.se_AddTagsCommand = void 0;
4
- exports.de_UpdateMLModelCommand = exports.de_UpdateEvaluationCommand = exports.de_UpdateDataSourceCommand = exports.de_UpdateBatchPredictionCommand = exports.de_PredictCommand = exports.de_GetMLModelCommand = void 0;
5
- const protocol_http_1 = require("@smithy/protocol-http");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- const MachineLearningServiceException_1 = require("../models/MachineLearningServiceException");
8
- const models_0_1 = require("../models/models_0");
9
- const se_AddTagsCommand = async (input, context) => {
10
- const headers = sharedHeaders("AddTags");
11
- let body;
12
- body = JSON.stringify((0, smithy_client_1._json)(input));
13
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
14
- };
15
- exports.se_AddTagsCommand = se_AddTagsCommand;
16
- const se_CreateBatchPredictionCommand = async (input, context) => {
17
- const headers = sharedHeaders("CreateBatchPrediction");
18
- let body;
19
- body = JSON.stringify((0, smithy_client_1._json)(input));
20
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
21
- };
22
- exports.se_CreateBatchPredictionCommand = se_CreateBatchPredictionCommand;
23
- const se_CreateDataSourceFromRDSCommand = async (input, context) => {
24
- const headers = sharedHeaders("CreateDataSourceFromRDS");
25
- let body;
26
- body = JSON.stringify((0, smithy_client_1._json)(input));
27
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
- };
29
- exports.se_CreateDataSourceFromRDSCommand = se_CreateDataSourceFromRDSCommand;
30
- const se_CreateDataSourceFromRedshiftCommand = async (input, context) => {
31
- const headers = sharedHeaders("CreateDataSourceFromRedshift");
32
- let body;
33
- body = JSON.stringify((0, smithy_client_1._json)(input));
34
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
- };
36
- exports.se_CreateDataSourceFromRedshiftCommand = se_CreateDataSourceFromRedshiftCommand;
37
- const se_CreateDataSourceFromS3Command = async (input, context) => {
38
- const headers = sharedHeaders("CreateDataSourceFromS3");
39
- let body;
40
- body = JSON.stringify((0, smithy_client_1._json)(input));
41
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
42
- };
43
- exports.se_CreateDataSourceFromS3Command = se_CreateDataSourceFromS3Command;
44
- const se_CreateEvaluationCommand = async (input, context) => {
45
- const headers = sharedHeaders("CreateEvaluation");
46
- let body;
47
- body = JSON.stringify((0, smithy_client_1._json)(input));
48
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
- };
50
- exports.se_CreateEvaluationCommand = se_CreateEvaluationCommand;
51
- const se_CreateMLModelCommand = async (input, context) => {
52
- const headers = sharedHeaders("CreateMLModel");
53
- let body;
54
- body = JSON.stringify((0, smithy_client_1._json)(input));
55
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
56
- };
57
- exports.se_CreateMLModelCommand = se_CreateMLModelCommand;
58
- const se_CreateRealtimeEndpointCommand = async (input, context) => {
59
- const headers = sharedHeaders("CreateRealtimeEndpoint");
60
- let body;
61
- body = JSON.stringify((0, smithy_client_1._json)(input));
62
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
63
- };
64
- exports.se_CreateRealtimeEndpointCommand = se_CreateRealtimeEndpointCommand;
65
- const se_DeleteBatchPredictionCommand = async (input, context) => {
66
- const headers = sharedHeaders("DeleteBatchPrediction");
67
- let body;
68
- body = JSON.stringify((0, smithy_client_1._json)(input));
69
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
70
- };
71
- exports.se_DeleteBatchPredictionCommand = se_DeleteBatchPredictionCommand;
72
- const se_DeleteDataSourceCommand = async (input, context) => {
73
- const headers = sharedHeaders("DeleteDataSource");
74
- let body;
75
- body = JSON.stringify((0, smithy_client_1._json)(input));
76
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
- };
78
- exports.se_DeleteDataSourceCommand = se_DeleteDataSourceCommand;
79
- const se_DeleteEvaluationCommand = async (input, context) => {
80
- const headers = sharedHeaders("DeleteEvaluation");
81
- let body;
82
- body = JSON.stringify((0, smithy_client_1._json)(input));
83
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
84
- };
85
- exports.se_DeleteEvaluationCommand = se_DeleteEvaluationCommand;
86
- const se_DeleteMLModelCommand = async (input, context) => {
87
- const headers = sharedHeaders("DeleteMLModel");
88
- let body;
89
- body = JSON.stringify((0, smithy_client_1._json)(input));
90
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
91
- };
92
- exports.se_DeleteMLModelCommand = se_DeleteMLModelCommand;
93
- const se_DeleteRealtimeEndpointCommand = async (input, context) => {
94
- const headers = sharedHeaders("DeleteRealtimeEndpoint");
95
- let body;
96
- body = JSON.stringify((0, smithy_client_1._json)(input));
97
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
98
- };
99
- exports.se_DeleteRealtimeEndpointCommand = se_DeleteRealtimeEndpointCommand;
100
- const se_DeleteTagsCommand = async (input, context) => {
101
- const headers = sharedHeaders("DeleteTags");
102
- let body;
103
- body = JSON.stringify((0, smithy_client_1._json)(input));
104
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
105
- };
106
- exports.se_DeleteTagsCommand = se_DeleteTagsCommand;
107
- const se_DescribeBatchPredictionsCommand = async (input, context) => {
108
- const headers = sharedHeaders("DescribeBatchPredictions");
109
- let body;
110
- body = JSON.stringify((0, smithy_client_1._json)(input));
111
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
- };
113
- exports.se_DescribeBatchPredictionsCommand = se_DescribeBatchPredictionsCommand;
114
- const se_DescribeDataSourcesCommand = async (input, context) => {
115
- const headers = sharedHeaders("DescribeDataSources");
116
- let body;
117
- body = JSON.stringify((0, smithy_client_1._json)(input));
118
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
119
- };
120
- exports.se_DescribeDataSourcesCommand = se_DescribeDataSourcesCommand;
121
- const se_DescribeEvaluationsCommand = async (input, context) => {
122
- const headers = sharedHeaders("DescribeEvaluations");
123
- let body;
124
- body = JSON.stringify((0, smithy_client_1._json)(input));
125
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
126
- };
127
- exports.se_DescribeEvaluationsCommand = se_DescribeEvaluationsCommand;
128
- const se_DescribeMLModelsCommand = async (input, context) => {
129
- const headers = sharedHeaders("DescribeMLModels");
130
- let body;
131
- body = JSON.stringify((0, smithy_client_1._json)(input));
132
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
133
- };
134
- exports.se_DescribeMLModelsCommand = se_DescribeMLModelsCommand;
135
- const se_DescribeTagsCommand = async (input, context) => {
136
- const headers = sharedHeaders("DescribeTags");
137
- let body;
138
- body = JSON.stringify((0, smithy_client_1._json)(input));
139
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
140
- };
141
- exports.se_DescribeTagsCommand = se_DescribeTagsCommand;
142
- const se_GetBatchPredictionCommand = async (input, context) => {
143
- const headers = sharedHeaders("GetBatchPrediction");
144
- let body;
145
- body = JSON.stringify((0, smithy_client_1._json)(input));
146
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
147
- };
148
- exports.se_GetBatchPredictionCommand = se_GetBatchPredictionCommand;
149
- const se_GetDataSourceCommand = async (input, context) => {
150
- const headers = sharedHeaders("GetDataSource");
151
- let body;
152
- body = JSON.stringify((0, smithy_client_1._json)(input));
153
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
154
- };
155
- exports.se_GetDataSourceCommand = se_GetDataSourceCommand;
156
- const se_GetEvaluationCommand = async (input, context) => {
157
- const headers = sharedHeaders("GetEvaluation");
158
- let body;
159
- body = JSON.stringify((0, smithy_client_1._json)(input));
160
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
161
- };
162
- exports.se_GetEvaluationCommand = se_GetEvaluationCommand;
163
- const se_GetMLModelCommand = async (input, context) => {
164
- const headers = sharedHeaders("GetMLModel");
165
- let body;
166
- body = JSON.stringify((0, smithy_client_1._json)(input));
167
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
168
- };
169
- exports.se_GetMLModelCommand = se_GetMLModelCommand;
170
- const se_PredictCommand = async (input, context) => {
171
- const headers = sharedHeaders("Predict");
172
- let body;
173
- body = JSON.stringify((0, smithy_client_1._json)(input));
174
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
175
- };
176
- exports.se_PredictCommand = se_PredictCommand;
177
- const se_UpdateBatchPredictionCommand = async (input, context) => {
178
- const headers = sharedHeaders("UpdateBatchPrediction");
179
- let body;
180
- body = JSON.stringify((0, smithy_client_1._json)(input));
181
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
182
- };
183
- exports.se_UpdateBatchPredictionCommand = se_UpdateBatchPredictionCommand;
184
- const se_UpdateDataSourceCommand = async (input, context) => {
185
- const headers = sharedHeaders("UpdateDataSource");
186
- let body;
187
- body = JSON.stringify((0, smithy_client_1._json)(input));
188
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
189
- };
190
- exports.se_UpdateDataSourceCommand = se_UpdateDataSourceCommand;
191
- const se_UpdateEvaluationCommand = async (input, context) => {
192
- const headers = sharedHeaders("UpdateEvaluation");
193
- let body;
194
- body = JSON.stringify((0, smithy_client_1._json)(input));
195
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
196
- };
197
- exports.se_UpdateEvaluationCommand = se_UpdateEvaluationCommand;
198
- const se_UpdateMLModelCommand = async (input, context) => {
199
- const headers = sharedHeaders("UpdateMLModel");
200
- let body;
201
- body = JSON.stringify(se_UpdateMLModelInput(input, context));
202
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
203
- };
204
- exports.se_UpdateMLModelCommand = se_UpdateMLModelCommand;
205
- const de_AddTagsCommand = async (output, context) => {
206
- if (output.statusCode >= 300) {
207
- return de_AddTagsCommandError(output, context);
208
- }
209
- const data = await parseBody(output.body, context);
210
- let contents = {};
211
- contents = (0, smithy_client_1._json)(data);
212
- const response = {
213
- $metadata: deserializeMetadata(output),
214
- ...contents,
215
- };
216
- return response;
217
- };
218
- exports.de_AddTagsCommand = de_AddTagsCommand;
219
- const de_AddTagsCommandError = async (output, context) => {
220
- const parsedOutput = {
221
- ...output,
222
- body: await parseErrorBody(output.body, context),
223
- };
224
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
225
- switch (errorCode) {
226
- case "InternalServerException":
227
- case "com.amazonaws.machinelearning#InternalServerException":
228
- throw await de_InternalServerExceptionRes(parsedOutput, context);
229
- case "InvalidInputException":
230
- case "com.amazonaws.machinelearning#InvalidInputException":
231
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
232
- case "InvalidTagException":
233
- case "com.amazonaws.machinelearning#InvalidTagException":
234
- throw await de_InvalidTagExceptionRes(parsedOutput, context);
235
- case "ResourceNotFoundException":
236
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
237
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
238
- case "TagLimitExceededException":
239
- case "com.amazonaws.machinelearning#TagLimitExceededException":
240
- throw await de_TagLimitExceededExceptionRes(parsedOutput, context);
241
- default:
242
- const parsedBody = parsedOutput.body;
243
- return throwDefaultError({
244
- output,
245
- parsedBody,
246
- errorCode,
247
- });
248
- }
249
- };
250
- const de_CreateBatchPredictionCommand = async (output, context) => {
251
- if (output.statusCode >= 300) {
252
- return de_CreateBatchPredictionCommandError(output, context);
253
- }
254
- const data = await parseBody(output.body, context);
255
- let contents = {};
256
- contents = (0, smithy_client_1._json)(data);
257
- const response = {
258
- $metadata: deserializeMetadata(output),
259
- ...contents,
260
- };
261
- return response;
262
- };
263
- exports.de_CreateBatchPredictionCommand = de_CreateBatchPredictionCommand;
264
- const de_CreateBatchPredictionCommandError = async (output, context) => {
265
- const parsedOutput = {
266
- ...output,
267
- body: await parseErrorBody(output.body, context),
268
- };
269
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
270
- switch (errorCode) {
271
- case "IdempotentParameterMismatchException":
272
- case "com.amazonaws.machinelearning#IdempotentParameterMismatchException":
273
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
274
- case "InternalServerException":
275
- case "com.amazonaws.machinelearning#InternalServerException":
276
- throw await de_InternalServerExceptionRes(parsedOutput, context);
277
- case "InvalidInputException":
278
- case "com.amazonaws.machinelearning#InvalidInputException":
279
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
280
- default:
281
- const parsedBody = parsedOutput.body;
282
- return throwDefaultError({
283
- output,
284
- parsedBody,
285
- errorCode,
286
- });
287
- }
288
- };
289
- const de_CreateDataSourceFromRDSCommand = async (output, context) => {
290
- if (output.statusCode >= 300) {
291
- return de_CreateDataSourceFromRDSCommandError(output, context);
292
- }
293
- const data = await parseBody(output.body, context);
294
- let contents = {};
295
- contents = (0, smithy_client_1._json)(data);
296
- const response = {
297
- $metadata: deserializeMetadata(output),
298
- ...contents,
299
- };
300
- return response;
301
- };
302
- exports.de_CreateDataSourceFromRDSCommand = de_CreateDataSourceFromRDSCommand;
303
- const de_CreateDataSourceFromRDSCommandError = async (output, context) => {
304
- const parsedOutput = {
305
- ...output,
306
- body: await parseErrorBody(output.body, context),
307
- };
308
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
309
- switch (errorCode) {
310
- case "IdempotentParameterMismatchException":
311
- case "com.amazonaws.machinelearning#IdempotentParameterMismatchException":
312
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
313
- case "InternalServerException":
314
- case "com.amazonaws.machinelearning#InternalServerException":
315
- throw await de_InternalServerExceptionRes(parsedOutput, context);
316
- case "InvalidInputException":
317
- case "com.amazonaws.machinelearning#InvalidInputException":
318
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
319
- default:
320
- const parsedBody = parsedOutput.body;
321
- return throwDefaultError({
322
- output,
323
- parsedBody,
324
- errorCode,
325
- });
326
- }
327
- };
328
- const de_CreateDataSourceFromRedshiftCommand = async (output, context) => {
329
- if (output.statusCode >= 300) {
330
- return de_CreateDataSourceFromRedshiftCommandError(output, context);
331
- }
332
- const data = await parseBody(output.body, context);
333
- let contents = {};
334
- contents = (0, smithy_client_1._json)(data);
335
- const response = {
336
- $metadata: deserializeMetadata(output),
337
- ...contents,
338
- };
339
- return response;
340
- };
341
- exports.de_CreateDataSourceFromRedshiftCommand = de_CreateDataSourceFromRedshiftCommand;
342
- const de_CreateDataSourceFromRedshiftCommandError = async (output, context) => {
343
- const parsedOutput = {
344
- ...output,
345
- body: await parseErrorBody(output.body, context),
346
- };
347
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
348
- switch (errorCode) {
349
- case "IdempotentParameterMismatchException":
350
- case "com.amazonaws.machinelearning#IdempotentParameterMismatchException":
351
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
352
- case "InternalServerException":
353
- case "com.amazonaws.machinelearning#InternalServerException":
354
- throw await de_InternalServerExceptionRes(parsedOutput, context);
355
- case "InvalidInputException":
356
- case "com.amazonaws.machinelearning#InvalidInputException":
357
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
358
- default:
359
- const parsedBody = parsedOutput.body;
360
- return throwDefaultError({
361
- output,
362
- parsedBody,
363
- errorCode,
364
- });
365
- }
366
- };
367
- const de_CreateDataSourceFromS3Command = async (output, context) => {
368
- if (output.statusCode >= 300) {
369
- return de_CreateDataSourceFromS3CommandError(output, context);
370
- }
371
- const data = await parseBody(output.body, context);
372
- let contents = {};
373
- contents = (0, smithy_client_1._json)(data);
374
- const response = {
375
- $metadata: deserializeMetadata(output),
376
- ...contents,
377
- };
378
- return response;
379
- };
380
- exports.de_CreateDataSourceFromS3Command = de_CreateDataSourceFromS3Command;
381
- const de_CreateDataSourceFromS3CommandError = async (output, context) => {
382
- const parsedOutput = {
383
- ...output,
384
- body: await parseErrorBody(output.body, context),
385
- };
386
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
387
- switch (errorCode) {
388
- case "IdempotentParameterMismatchException":
389
- case "com.amazonaws.machinelearning#IdempotentParameterMismatchException":
390
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
391
- case "InternalServerException":
392
- case "com.amazonaws.machinelearning#InternalServerException":
393
- throw await de_InternalServerExceptionRes(parsedOutput, context);
394
- case "InvalidInputException":
395
- case "com.amazonaws.machinelearning#InvalidInputException":
396
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
397
- default:
398
- const parsedBody = parsedOutput.body;
399
- return throwDefaultError({
400
- output,
401
- parsedBody,
402
- errorCode,
403
- });
404
- }
405
- };
406
- const de_CreateEvaluationCommand = async (output, context) => {
407
- if (output.statusCode >= 300) {
408
- return de_CreateEvaluationCommandError(output, context);
409
- }
410
- const data = await parseBody(output.body, context);
411
- let contents = {};
412
- contents = (0, smithy_client_1._json)(data);
413
- const response = {
414
- $metadata: deserializeMetadata(output),
415
- ...contents,
416
- };
417
- return response;
418
- };
419
- exports.de_CreateEvaluationCommand = de_CreateEvaluationCommand;
420
- const de_CreateEvaluationCommandError = async (output, context) => {
421
- const parsedOutput = {
422
- ...output,
423
- body: await parseErrorBody(output.body, context),
424
- };
425
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
426
- switch (errorCode) {
427
- case "IdempotentParameterMismatchException":
428
- case "com.amazonaws.machinelearning#IdempotentParameterMismatchException":
429
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
430
- case "InternalServerException":
431
- case "com.amazonaws.machinelearning#InternalServerException":
432
- throw await de_InternalServerExceptionRes(parsedOutput, context);
433
- case "InvalidInputException":
434
- case "com.amazonaws.machinelearning#InvalidInputException":
435
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
436
- default:
437
- const parsedBody = parsedOutput.body;
438
- return throwDefaultError({
439
- output,
440
- parsedBody,
441
- errorCode,
442
- });
443
- }
444
- };
445
- const de_CreateMLModelCommand = async (output, context) => {
446
- if (output.statusCode >= 300) {
447
- return de_CreateMLModelCommandError(output, context);
448
- }
449
- const data = await parseBody(output.body, context);
450
- let contents = {};
451
- contents = (0, smithy_client_1._json)(data);
452
- const response = {
453
- $metadata: deserializeMetadata(output),
454
- ...contents,
455
- };
456
- return response;
457
- };
458
- exports.de_CreateMLModelCommand = de_CreateMLModelCommand;
459
- const de_CreateMLModelCommandError = async (output, context) => {
460
- const parsedOutput = {
461
- ...output,
462
- body: await parseErrorBody(output.body, context),
463
- };
464
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
465
- switch (errorCode) {
466
- case "IdempotentParameterMismatchException":
467
- case "com.amazonaws.machinelearning#IdempotentParameterMismatchException":
468
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
469
- case "InternalServerException":
470
- case "com.amazonaws.machinelearning#InternalServerException":
471
- throw await de_InternalServerExceptionRes(parsedOutput, context);
472
- case "InvalidInputException":
473
- case "com.amazonaws.machinelearning#InvalidInputException":
474
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
475
- default:
476
- const parsedBody = parsedOutput.body;
477
- return throwDefaultError({
478
- output,
479
- parsedBody,
480
- errorCode,
481
- });
482
- }
483
- };
484
- const de_CreateRealtimeEndpointCommand = async (output, context) => {
485
- if (output.statusCode >= 300) {
486
- return de_CreateRealtimeEndpointCommandError(output, context);
487
- }
488
- const data = await parseBody(output.body, context);
489
- let contents = {};
490
- contents = de_CreateRealtimeEndpointOutput(data, context);
491
- const response = {
492
- $metadata: deserializeMetadata(output),
493
- ...contents,
494
- };
495
- return response;
496
- };
497
- exports.de_CreateRealtimeEndpointCommand = de_CreateRealtimeEndpointCommand;
498
- const de_CreateRealtimeEndpointCommandError = async (output, context) => {
499
- const parsedOutput = {
500
- ...output,
501
- body: await parseErrorBody(output.body, context),
502
- };
503
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
504
- switch (errorCode) {
505
- case "InternalServerException":
506
- case "com.amazonaws.machinelearning#InternalServerException":
507
- throw await de_InternalServerExceptionRes(parsedOutput, context);
508
- case "InvalidInputException":
509
- case "com.amazonaws.machinelearning#InvalidInputException":
510
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
511
- case "ResourceNotFoundException":
512
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
513
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
514
- default:
515
- const parsedBody = parsedOutput.body;
516
- return throwDefaultError({
517
- output,
518
- parsedBody,
519
- errorCode,
520
- });
521
- }
522
- };
523
- const de_DeleteBatchPredictionCommand = async (output, context) => {
524
- if (output.statusCode >= 300) {
525
- return de_DeleteBatchPredictionCommandError(output, context);
526
- }
527
- const data = await parseBody(output.body, context);
528
- let contents = {};
529
- contents = (0, smithy_client_1._json)(data);
530
- const response = {
531
- $metadata: deserializeMetadata(output),
532
- ...contents,
533
- };
534
- return response;
535
- };
536
- exports.de_DeleteBatchPredictionCommand = de_DeleteBatchPredictionCommand;
537
- const de_DeleteBatchPredictionCommandError = async (output, context) => {
538
- const parsedOutput = {
539
- ...output,
540
- body: await parseErrorBody(output.body, context),
541
- };
542
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
543
- switch (errorCode) {
544
- case "InternalServerException":
545
- case "com.amazonaws.machinelearning#InternalServerException":
546
- throw await de_InternalServerExceptionRes(parsedOutput, context);
547
- case "InvalidInputException":
548
- case "com.amazonaws.machinelearning#InvalidInputException":
549
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
550
- case "ResourceNotFoundException":
551
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
552
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
553
- default:
554
- const parsedBody = parsedOutput.body;
555
- return throwDefaultError({
556
- output,
557
- parsedBody,
558
- errorCode,
559
- });
560
- }
561
- };
562
- const de_DeleteDataSourceCommand = async (output, context) => {
563
- if (output.statusCode >= 300) {
564
- return de_DeleteDataSourceCommandError(output, context);
565
- }
566
- const data = await parseBody(output.body, context);
567
- let contents = {};
568
- contents = (0, smithy_client_1._json)(data);
569
- const response = {
570
- $metadata: deserializeMetadata(output),
571
- ...contents,
572
- };
573
- return response;
574
- };
575
- exports.de_DeleteDataSourceCommand = de_DeleteDataSourceCommand;
576
- const de_DeleteDataSourceCommandError = async (output, context) => {
577
- const parsedOutput = {
578
- ...output,
579
- body: await parseErrorBody(output.body, context),
580
- };
581
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
582
- switch (errorCode) {
583
- case "InternalServerException":
584
- case "com.amazonaws.machinelearning#InternalServerException":
585
- throw await de_InternalServerExceptionRes(parsedOutput, context);
586
- case "InvalidInputException":
587
- case "com.amazonaws.machinelearning#InvalidInputException":
588
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
589
- case "ResourceNotFoundException":
590
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
591
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
592
- default:
593
- const parsedBody = parsedOutput.body;
594
- return throwDefaultError({
595
- output,
596
- parsedBody,
597
- errorCode,
598
- });
599
- }
600
- };
601
- const de_DeleteEvaluationCommand = async (output, context) => {
602
- if (output.statusCode >= 300) {
603
- return de_DeleteEvaluationCommandError(output, context);
604
- }
605
- const data = await parseBody(output.body, context);
606
- let contents = {};
607
- contents = (0, smithy_client_1._json)(data);
608
- const response = {
609
- $metadata: deserializeMetadata(output),
610
- ...contents,
611
- };
612
- return response;
613
- };
614
- exports.de_DeleteEvaluationCommand = de_DeleteEvaluationCommand;
615
- const de_DeleteEvaluationCommandError = async (output, context) => {
616
- const parsedOutput = {
617
- ...output,
618
- body: await parseErrorBody(output.body, context),
619
- };
620
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
621
- switch (errorCode) {
622
- case "InternalServerException":
623
- case "com.amazonaws.machinelearning#InternalServerException":
624
- throw await de_InternalServerExceptionRes(parsedOutput, context);
625
- case "InvalidInputException":
626
- case "com.amazonaws.machinelearning#InvalidInputException":
627
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
628
- case "ResourceNotFoundException":
629
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
630
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
631
- default:
632
- const parsedBody = parsedOutput.body;
633
- return throwDefaultError({
634
- output,
635
- parsedBody,
636
- errorCode,
637
- });
638
- }
639
- };
640
- const de_DeleteMLModelCommand = async (output, context) => {
641
- if (output.statusCode >= 300) {
642
- return de_DeleteMLModelCommandError(output, context);
643
- }
644
- const data = await parseBody(output.body, context);
645
- let contents = {};
646
- contents = (0, smithy_client_1._json)(data);
647
- const response = {
648
- $metadata: deserializeMetadata(output),
649
- ...contents,
650
- };
651
- return response;
652
- };
653
- exports.de_DeleteMLModelCommand = de_DeleteMLModelCommand;
654
- const de_DeleteMLModelCommandError = async (output, context) => {
655
- const parsedOutput = {
656
- ...output,
657
- body: await parseErrorBody(output.body, context),
658
- };
659
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
660
- switch (errorCode) {
661
- case "InternalServerException":
662
- case "com.amazonaws.machinelearning#InternalServerException":
663
- throw await de_InternalServerExceptionRes(parsedOutput, context);
664
- case "InvalidInputException":
665
- case "com.amazonaws.machinelearning#InvalidInputException":
666
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
667
- case "ResourceNotFoundException":
668
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
669
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
670
- default:
671
- const parsedBody = parsedOutput.body;
672
- return throwDefaultError({
673
- output,
674
- parsedBody,
675
- errorCode,
676
- });
677
- }
678
- };
679
- const de_DeleteRealtimeEndpointCommand = async (output, context) => {
680
- if (output.statusCode >= 300) {
681
- return de_DeleteRealtimeEndpointCommandError(output, context);
682
- }
683
- const data = await parseBody(output.body, context);
684
- let contents = {};
685
- contents = de_DeleteRealtimeEndpointOutput(data, context);
686
- const response = {
687
- $metadata: deserializeMetadata(output),
688
- ...contents,
689
- };
690
- return response;
691
- };
692
- exports.de_DeleteRealtimeEndpointCommand = de_DeleteRealtimeEndpointCommand;
693
- const de_DeleteRealtimeEndpointCommandError = async (output, context) => {
694
- const parsedOutput = {
695
- ...output,
696
- body: await parseErrorBody(output.body, context),
697
- };
698
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
699
- switch (errorCode) {
700
- case "InternalServerException":
701
- case "com.amazonaws.machinelearning#InternalServerException":
702
- throw await de_InternalServerExceptionRes(parsedOutput, context);
703
- case "InvalidInputException":
704
- case "com.amazonaws.machinelearning#InvalidInputException":
705
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
706
- case "ResourceNotFoundException":
707
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
708
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
709
- default:
710
- const parsedBody = parsedOutput.body;
711
- return throwDefaultError({
712
- output,
713
- parsedBody,
714
- errorCode,
715
- });
716
- }
717
- };
718
- const de_DeleteTagsCommand = async (output, context) => {
719
- if (output.statusCode >= 300) {
720
- return de_DeleteTagsCommandError(output, context);
721
- }
722
- const data = await parseBody(output.body, context);
723
- let contents = {};
724
- contents = (0, smithy_client_1._json)(data);
725
- const response = {
726
- $metadata: deserializeMetadata(output),
727
- ...contents,
728
- };
729
- return response;
730
- };
731
- exports.de_DeleteTagsCommand = de_DeleteTagsCommand;
732
- const de_DeleteTagsCommandError = async (output, context) => {
733
- const parsedOutput = {
734
- ...output,
735
- body: await parseErrorBody(output.body, context),
736
- };
737
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
738
- switch (errorCode) {
739
- case "InternalServerException":
740
- case "com.amazonaws.machinelearning#InternalServerException":
741
- throw await de_InternalServerExceptionRes(parsedOutput, context);
742
- case "InvalidInputException":
743
- case "com.amazonaws.machinelearning#InvalidInputException":
744
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
745
- case "InvalidTagException":
746
- case "com.amazonaws.machinelearning#InvalidTagException":
747
- throw await de_InvalidTagExceptionRes(parsedOutput, context);
748
- case "ResourceNotFoundException":
749
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
750
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
751
- default:
752
- const parsedBody = parsedOutput.body;
753
- return throwDefaultError({
754
- output,
755
- parsedBody,
756
- errorCode,
757
- });
758
- }
759
- };
760
- const de_DescribeBatchPredictionsCommand = async (output, context) => {
761
- if (output.statusCode >= 300) {
762
- return de_DescribeBatchPredictionsCommandError(output, context);
763
- }
764
- const data = await parseBody(output.body, context);
765
- let contents = {};
766
- contents = de_DescribeBatchPredictionsOutput(data, context);
767
- const response = {
768
- $metadata: deserializeMetadata(output),
769
- ...contents,
770
- };
771
- return response;
772
- };
773
- exports.de_DescribeBatchPredictionsCommand = de_DescribeBatchPredictionsCommand;
774
- const de_DescribeBatchPredictionsCommandError = async (output, context) => {
775
- const parsedOutput = {
776
- ...output,
777
- body: await parseErrorBody(output.body, context),
778
- };
779
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
780
- switch (errorCode) {
781
- case "InternalServerException":
782
- case "com.amazonaws.machinelearning#InternalServerException":
783
- throw await de_InternalServerExceptionRes(parsedOutput, context);
784
- case "InvalidInputException":
785
- case "com.amazonaws.machinelearning#InvalidInputException":
786
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
787
- default:
788
- const parsedBody = parsedOutput.body;
789
- return throwDefaultError({
790
- output,
791
- parsedBody,
792
- errorCode,
793
- });
794
- }
795
- };
796
- const de_DescribeDataSourcesCommand = async (output, context) => {
797
- if (output.statusCode >= 300) {
798
- return de_DescribeDataSourcesCommandError(output, context);
799
- }
800
- const data = await parseBody(output.body, context);
801
- let contents = {};
802
- contents = de_DescribeDataSourcesOutput(data, context);
803
- const response = {
804
- $metadata: deserializeMetadata(output),
805
- ...contents,
806
- };
807
- return response;
808
- };
809
- exports.de_DescribeDataSourcesCommand = de_DescribeDataSourcesCommand;
810
- const de_DescribeDataSourcesCommandError = async (output, context) => {
811
- const parsedOutput = {
812
- ...output,
813
- body: await parseErrorBody(output.body, context),
814
- };
815
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
816
- switch (errorCode) {
817
- case "InternalServerException":
818
- case "com.amazonaws.machinelearning#InternalServerException":
819
- throw await de_InternalServerExceptionRes(parsedOutput, context);
820
- case "InvalidInputException":
821
- case "com.amazonaws.machinelearning#InvalidInputException":
822
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
823
- default:
824
- const parsedBody = parsedOutput.body;
825
- return throwDefaultError({
826
- output,
827
- parsedBody,
828
- errorCode,
829
- });
830
- }
831
- };
832
- const de_DescribeEvaluationsCommand = async (output, context) => {
833
- if (output.statusCode >= 300) {
834
- return de_DescribeEvaluationsCommandError(output, context);
835
- }
836
- const data = await parseBody(output.body, context);
837
- let contents = {};
838
- contents = de_DescribeEvaluationsOutput(data, context);
839
- const response = {
840
- $metadata: deserializeMetadata(output),
841
- ...contents,
842
- };
843
- return response;
844
- };
845
- exports.de_DescribeEvaluationsCommand = de_DescribeEvaluationsCommand;
846
- const de_DescribeEvaluationsCommandError = async (output, context) => {
847
- const parsedOutput = {
848
- ...output,
849
- body: await parseErrorBody(output.body, context),
850
- };
851
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
852
- switch (errorCode) {
853
- case "InternalServerException":
854
- case "com.amazonaws.machinelearning#InternalServerException":
855
- throw await de_InternalServerExceptionRes(parsedOutput, context);
856
- case "InvalidInputException":
857
- case "com.amazonaws.machinelearning#InvalidInputException":
858
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
859
- default:
860
- const parsedBody = parsedOutput.body;
861
- return throwDefaultError({
862
- output,
863
- parsedBody,
864
- errorCode,
865
- });
866
- }
867
- };
868
- const de_DescribeMLModelsCommand = async (output, context) => {
869
- if (output.statusCode >= 300) {
870
- return de_DescribeMLModelsCommandError(output, context);
871
- }
872
- const data = await parseBody(output.body, context);
873
- let contents = {};
874
- contents = de_DescribeMLModelsOutput(data, context);
875
- const response = {
876
- $metadata: deserializeMetadata(output),
877
- ...contents,
878
- };
879
- return response;
880
- };
881
- exports.de_DescribeMLModelsCommand = de_DescribeMLModelsCommand;
882
- const de_DescribeMLModelsCommandError = async (output, context) => {
883
- const parsedOutput = {
884
- ...output,
885
- body: await parseErrorBody(output.body, context),
886
- };
887
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
888
- switch (errorCode) {
889
- case "InternalServerException":
890
- case "com.amazonaws.machinelearning#InternalServerException":
891
- throw await de_InternalServerExceptionRes(parsedOutput, context);
892
- case "InvalidInputException":
893
- case "com.amazonaws.machinelearning#InvalidInputException":
894
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
895
- default:
896
- const parsedBody = parsedOutput.body;
897
- return throwDefaultError({
898
- output,
899
- parsedBody,
900
- errorCode,
901
- });
902
- }
903
- };
904
- const de_DescribeTagsCommand = async (output, context) => {
905
- if (output.statusCode >= 300) {
906
- return de_DescribeTagsCommandError(output, context);
907
- }
908
- const data = await parseBody(output.body, context);
909
- let contents = {};
910
- contents = (0, smithy_client_1._json)(data);
911
- const response = {
912
- $metadata: deserializeMetadata(output),
913
- ...contents,
914
- };
915
- return response;
916
- };
917
- exports.de_DescribeTagsCommand = de_DescribeTagsCommand;
918
- const de_DescribeTagsCommandError = async (output, context) => {
919
- const parsedOutput = {
920
- ...output,
921
- body: await parseErrorBody(output.body, context),
922
- };
923
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
924
- switch (errorCode) {
925
- case "InternalServerException":
926
- case "com.amazonaws.machinelearning#InternalServerException":
927
- throw await de_InternalServerExceptionRes(parsedOutput, context);
928
- case "InvalidInputException":
929
- case "com.amazonaws.machinelearning#InvalidInputException":
930
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
931
- case "ResourceNotFoundException":
932
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
933
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
934
- default:
935
- const parsedBody = parsedOutput.body;
936
- return throwDefaultError({
937
- output,
938
- parsedBody,
939
- errorCode,
940
- });
941
- }
942
- };
943
- const de_GetBatchPredictionCommand = async (output, context) => {
944
- if (output.statusCode >= 300) {
945
- return de_GetBatchPredictionCommandError(output, context);
946
- }
947
- const data = await parseBody(output.body, context);
948
- let contents = {};
949
- contents = de_GetBatchPredictionOutput(data, context);
950
- const response = {
951
- $metadata: deserializeMetadata(output),
952
- ...contents,
953
- };
954
- return response;
955
- };
956
- exports.de_GetBatchPredictionCommand = de_GetBatchPredictionCommand;
957
- const de_GetBatchPredictionCommandError = async (output, context) => {
958
- const parsedOutput = {
959
- ...output,
960
- body: await parseErrorBody(output.body, context),
961
- };
962
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
963
- switch (errorCode) {
964
- case "InternalServerException":
965
- case "com.amazonaws.machinelearning#InternalServerException":
966
- throw await de_InternalServerExceptionRes(parsedOutput, context);
967
- case "InvalidInputException":
968
- case "com.amazonaws.machinelearning#InvalidInputException":
969
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
970
- case "ResourceNotFoundException":
971
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
972
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
973
- default:
974
- const parsedBody = parsedOutput.body;
975
- return throwDefaultError({
976
- output,
977
- parsedBody,
978
- errorCode,
979
- });
980
- }
981
- };
982
- const de_GetDataSourceCommand = async (output, context) => {
983
- if (output.statusCode >= 300) {
984
- return de_GetDataSourceCommandError(output, context);
985
- }
986
- const data = await parseBody(output.body, context);
987
- let contents = {};
988
- contents = de_GetDataSourceOutput(data, context);
989
- const response = {
990
- $metadata: deserializeMetadata(output),
991
- ...contents,
992
- };
993
- return response;
994
- };
995
- exports.de_GetDataSourceCommand = de_GetDataSourceCommand;
996
- const de_GetDataSourceCommandError = async (output, context) => {
997
- const parsedOutput = {
998
- ...output,
999
- body: await parseErrorBody(output.body, context),
1000
- };
1001
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1002
- switch (errorCode) {
1003
- case "InternalServerException":
1004
- case "com.amazonaws.machinelearning#InternalServerException":
1005
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1006
- case "InvalidInputException":
1007
- case "com.amazonaws.machinelearning#InvalidInputException":
1008
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1009
- case "ResourceNotFoundException":
1010
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
1011
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1012
- default:
1013
- const parsedBody = parsedOutput.body;
1014
- return throwDefaultError({
1015
- output,
1016
- parsedBody,
1017
- errorCode,
1018
- });
1019
- }
1020
- };
1021
- const de_GetEvaluationCommand = async (output, context) => {
1022
- if (output.statusCode >= 300) {
1023
- return de_GetEvaluationCommandError(output, context);
1024
- }
1025
- const data = await parseBody(output.body, context);
1026
- let contents = {};
1027
- contents = de_GetEvaluationOutput(data, context);
1028
- const response = {
1029
- $metadata: deserializeMetadata(output),
1030
- ...contents,
1031
- };
1032
- return response;
1033
- };
1034
- exports.de_GetEvaluationCommand = de_GetEvaluationCommand;
1035
- const de_GetEvaluationCommandError = async (output, context) => {
1036
- const parsedOutput = {
1037
- ...output,
1038
- body: await parseErrorBody(output.body, context),
1039
- };
1040
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1041
- switch (errorCode) {
1042
- case "InternalServerException":
1043
- case "com.amazonaws.machinelearning#InternalServerException":
1044
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1045
- case "InvalidInputException":
1046
- case "com.amazonaws.machinelearning#InvalidInputException":
1047
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1048
- case "ResourceNotFoundException":
1049
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
1050
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1051
- default:
1052
- const parsedBody = parsedOutput.body;
1053
- return throwDefaultError({
1054
- output,
1055
- parsedBody,
1056
- errorCode,
1057
- });
1058
- }
1059
- };
1060
- const de_GetMLModelCommand = async (output, context) => {
1061
- if (output.statusCode >= 300) {
1062
- return de_GetMLModelCommandError(output, context);
1063
- }
1064
- const data = await parseBody(output.body, context);
1065
- let contents = {};
1066
- contents = de_GetMLModelOutput(data, context);
1067
- const response = {
1068
- $metadata: deserializeMetadata(output),
1069
- ...contents,
1070
- };
1071
- return response;
1072
- };
1073
- exports.de_GetMLModelCommand = de_GetMLModelCommand;
1074
- const de_GetMLModelCommandError = async (output, context) => {
1075
- const parsedOutput = {
1076
- ...output,
1077
- body: await parseErrorBody(output.body, context),
1078
- };
1079
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1080
- switch (errorCode) {
1081
- case "InternalServerException":
1082
- case "com.amazonaws.machinelearning#InternalServerException":
1083
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1084
- case "InvalidInputException":
1085
- case "com.amazonaws.machinelearning#InvalidInputException":
1086
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1087
- case "ResourceNotFoundException":
1088
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
1089
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1090
- default:
1091
- const parsedBody = parsedOutput.body;
1092
- return throwDefaultError({
1093
- output,
1094
- parsedBody,
1095
- errorCode,
1096
- });
1097
- }
1098
- };
1099
- const de_PredictCommand = async (output, context) => {
1100
- if (output.statusCode >= 300) {
1101
- return de_PredictCommandError(output, context);
1102
- }
1103
- const data = await parseBody(output.body, context);
1104
- let contents = {};
1105
- contents = de_PredictOutput(data, context);
1106
- const response = {
1107
- $metadata: deserializeMetadata(output),
1108
- ...contents,
1109
- };
1110
- return response;
1111
- };
1112
- exports.de_PredictCommand = de_PredictCommand;
1113
- const de_PredictCommandError = async (output, context) => {
1114
- const parsedOutput = {
1115
- ...output,
1116
- body: await parseErrorBody(output.body, context),
1117
- };
1118
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1119
- switch (errorCode) {
1120
- case "InternalServerException":
1121
- case "com.amazonaws.machinelearning#InternalServerException":
1122
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1123
- case "InvalidInputException":
1124
- case "com.amazonaws.machinelearning#InvalidInputException":
1125
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1126
- case "LimitExceededException":
1127
- case "com.amazonaws.machinelearning#LimitExceededException":
1128
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1129
- case "PredictorNotMountedException":
1130
- case "com.amazonaws.machinelearning#PredictorNotMountedException":
1131
- throw await de_PredictorNotMountedExceptionRes(parsedOutput, context);
1132
- case "ResourceNotFoundException":
1133
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
1134
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1135
- default:
1136
- const parsedBody = parsedOutput.body;
1137
- return throwDefaultError({
1138
- output,
1139
- parsedBody,
1140
- errorCode,
1141
- });
1142
- }
1143
- };
1144
- const de_UpdateBatchPredictionCommand = async (output, context) => {
1145
- if (output.statusCode >= 300) {
1146
- return de_UpdateBatchPredictionCommandError(output, context);
1147
- }
1148
- const data = await parseBody(output.body, context);
1149
- let contents = {};
1150
- contents = (0, smithy_client_1._json)(data);
1151
- const response = {
1152
- $metadata: deserializeMetadata(output),
1153
- ...contents,
1154
- };
1155
- return response;
1156
- };
1157
- exports.de_UpdateBatchPredictionCommand = de_UpdateBatchPredictionCommand;
1158
- const de_UpdateBatchPredictionCommandError = async (output, context) => {
1159
- const parsedOutput = {
1160
- ...output,
1161
- body: await parseErrorBody(output.body, context),
1162
- };
1163
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1164
- switch (errorCode) {
1165
- case "InternalServerException":
1166
- case "com.amazonaws.machinelearning#InternalServerException":
1167
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1168
- case "InvalidInputException":
1169
- case "com.amazonaws.machinelearning#InvalidInputException":
1170
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1171
- case "ResourceNotFoundException":
1172
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
1173
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1174
- default:
1175
- const parsedBody = parsedOutput.body;
1176
- return throwDefaultError({
1177
- output,
1178
- parsedBody,
1179
- errorCode,
1180
- });
1181
- }
1182
- };
1183
- const de_UpdateDataSourceCommand = async (output, context) => {
1184
- if (output.statusCode >= 300) {
1185
- return de_UpdateDataSourceCommandError(output, context);
1186
- }
1187
- const data = await parseBody(output.body, context);
1188
- let contents = {};
1189
- contents = (0, smithy_client_1._json)(data);
1190
- const response = {
1191
- $metadata: deserializeMetadata(output),
1192
- ...contents,
1193
- };
1194
- return response;
1195
- };
1196
- exports.de_UpdateDataSourceCommand = de_UpdateDataSourceCommand;
1197
- const de_UpdateDataSourceCommandError = async (output, context) => {
1198
- const parsedOutput = {
1199
- ...output,
1200
- body: await parseErrorBody(output.body, context),
1201
- };
1202
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1203
- switch (errorCode) {
1204
- case "InternalServerException":
1205
- case "com.amazonaws.machinelearning#InternalServerException":
1206
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1207
- case "InvalidInputException":
1208
- case "com.amazonaws.machinelearning#InvalidInputException":
1209
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1210
- case "ResourceNotFoundException":
1211
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
1212
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1213
- default:
1214
- const parsedBody = parsedOutput.body;
1215
- return throwDefaultError({
1216
- output,
1217
- parsedBody,
1218
- errorCode,
1219
- });
1220
- }
1221
- };
1222
- const de_UpdateEvaluationCommand = async (output, context) => {
1223
- if (output.statusCode >= 300) {
1224
- return de_UpdateEvaluationCommandError(output, context);
1225
- }
1226
- const data = await parseBody(output.body, context);
1227
- let contents = {};
1228
- contents = (0, smithy_client_1._json)(data);
1229
- const response = {
1230
- $metadata: deserializeMetadata(output),
1231
- ...contents,
1232
- };
1233
- return response;
1234
- };
1235
- exports.de_UpdateEvaluationCommand = de_UpdateEvaluationCommand;
1236
- const de_UpdateEvaluationCommandError = async (output, context) => {
1237
- const parsedOutput = {
1238
- ...output,
1239
- body: await parseErrorBody(output.body, context),
1240
- };
1241
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1242
- switch (errorCode) {
1243
- case "InternalServerException":
1244
- case "com.amazonaws.machinelearning#InternalServerException":
1245
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1246
- case "InvalidInputException":
1247
- case "com.amazonaws.machinelearning#InvalidInputException":
1248
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1249
- case "ResourceNotFoundException":
1250
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
1251
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1252
- default:
1253
- const parsedBody = parsedOutput.body;
1254
- return throwDefaultError({
1255
- output,
1256
- parsedBody,
1257
- errorCode,
1258
- });
1259
- }
1260
- };
1261
- const de_UpdateMLModelCommand = async (output, context) => {
1262
- if (output.statusCode >= 300) {
1263
- return de_UpdateMLModelCommandError(output, context);
1264
- }
1265
- const data = await parseBody(output.body, context);
1266
- let contents = {};
1267
- contents = (0, smithy_client_1._json)(data);
1268
- const response = {
1269
- $metadata: deserializeMetadata(output),
1270
- ...contents,
1271
- };
1272
- return response;
1273
- };
1274
- exports.de_UpdateMLModelCommand = de_UpdateMLModelCommand;
1275
- const de_UpdateMLModelCommandError = async (output, context) => {
1276
- const parsedOutput = {
1277
- ...output,
1278
- body: await parseErrorBody(output.body, context),
1279
- };
1280
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1281
- switch (errorCode) {
1282
- case "InternalServerException":
1283
- case "com.amazonaws.machinelearning#InternalServerException":
1284
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1285
- case "InvalidInputException":
1286
- case "com.amazonaws.machinelearning#InvalidInputException":
1287
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1288
- case "ResourceNotFoundException":
1289
- case "com.amazonaws.machinelearning#ResourceNotFoundException":
1290
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1291
- default:
1292
- const parsedBody = parsedOutput.body;
1293
- return throwDefaultError({
1294
- output,
1295
- parsedBody,
1296
- errorCode,
1297
- });
1298
- }
1299
- };
1300
- const de_IdempotentParameterMismatchExceptionRes = async (parsedOutput, context) => {
1301
- const body = parsedOutput.body;
1302
- const deserialized = (0, smithy_client_1._json)(body);
1303
- const exception = new models_0_1.IdempotentParameterMismatchException({
1304
- $metadata: deserializeMetadata(parsedOutput),
1305
- ...deserialized,
1306
- });
1307
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1308
- };
1309
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1310
- const body = parsedOutput.body;
1311
- const deserialized = (0, smithy_client_1._json)(body);
1312
- const exception = new models_0_1.InternalServerException({
1313
- $metadata: deserializeMetadata(parsedOutput),
1314
- ...deserialized,
1315
- });
1316
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1317
- };
1318
- const de_InvalidInputExceptionRes = async (parsedOutput, context) => {
1319
- const body = parsedOutput.body;
1320
- const deserialized = (0, smithy_client_1._json)(body);
1321
- const exception = new models_0_1.InvalidInputException({
1322
- $metadata: deserializeMetadata(parsedOutput),
1323
- ...deserialized,
1324
- });
1325
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1326
- };
1327
- const de_InvalidTagExceptionRes = async (parsedOutput, context) => {
1328
- const body = parsedOutput.body;
1329
- const deserialized = (0, smithy_client_1._json)(body);
1330
- const exception = new models_0_1.InvalidTagException({
1331
- $metadata: deserializeMetadata(parsedOutput),
1332
- ...deserialized,
1333
- });
1334
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1335
- };
1336
- const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
1337
- const body = parsedOutput.body;
1338
- const deserialized = (0, smithy_client_1._json)(body);
1339
- const exception = new models_0_1.LimitExceededException({
1340
- $metadata: deserializeMetadata(parsedOutput),
1341
- ...deserialized,
1342
- });
1343
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1344
- };
1345
- const de_PredictorNotMountedExceptionRes = async (parsedOutput, context) => {
1346
- const body = parsedOutput.body;
1347
- const deserialized = (0, smithy_client_1._json)(body);
1348
- const exception = new models_0_1.PredictorNotMountedException({
1349
- $metadata: deserializeMetadata(parsedOutput),
1350
- ...deserialized,
1351
- });
1352
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1353
- };
1354
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1355
- const body = parsedOutput.body;
1356
- const deserialized = (0, smithy_client_1._json)(body);
1357
- const exception = new models_0_1.ResourceNotFoundException({
1358
- $metadata: deserializeMetadata(parsedOutput),
1359
- ...deserialized,
1360
- });
1361
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1362
- };
1363
- const de_TagLimitExceededExceptionRes = async (parsedOutput, context) => {
1364
- const body = parsedOutput.body;
1365
- const deserialized = (0, smithy_client_1._json)(body);
1366
- const exception = new models_0_1.TagLimitExceededException({
1367
- $metadata: deserializeMetadata(parsedOutput),
1368
- ...deserialized,
1369
- });
1370
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1371
- };
1372
- const se_UpdateMLModelInput = (input, context) => {
1373
- return (0, smithy_client_1.take)(input, {
1374
- MLModelId: [],
1375
- MLModelName: [],
1376
- ScoreThreshold: smithy_client_1.serializeFloat,
1377
- });
1378
- };
1379
- const de_BatchPrediction = (output, context) => {
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
- });
1398
- };
1399
- const de_BatchPredictions = (output, context) => {
1400
- const retVal = (output || [])
1401
- .filter((e) => e != null)
1402
- .map((entry) => {
1403
- return de_BatchPrediction(entry, context);
1404
- });
1405
- return retVal;
1406
- };
1407
- const de_CreateRealtimeEndpointOutput = (output, context) => {
1408
- return (0, smithy_client_1.take)(output, {
1409
- MLModelId: smithy_client_1.expectString,
1410
- RealtimeEndpointInfo: (_) => de_RealtimeEndpointInfo(_, context),
1411
- });
1412
- };
1413
- const de_DataSource = (output, context) => {
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
- });
1434
- };
1435
- const de_DataSources = (output, context) => {
1436
- const retVal = (output || [])
1437
- .filter((e) => e != null)
1438
- .map((entry) => {
1439
- return de_DataSource(entry, context);
1440
- });
1441
- return retVal;
1442
- };
1443
- const de_DeleteRealtimeEndpointOutput = (output, context) => {
1444
- return (0, smithy_client_1.take)(output, {
1445
- MLModelId: smithy_client_1.expectString,
1446
- RealtimeEndpointInfo: (_) => de_RealtimeEndpointInfo(_, context),
1447
- });
1448
- };
1449
- const de_DescribeBatchPredictionsOutput = (output, context) => {
1450
- return (0, smithy_client_1.take)(output, {
1451
- NextToken: smithy_client_1.expectString,
1452
- Results: (_) => de_BatchPredictions(_, context),
1453
- });
1454
- };
1455
- const de_DescribeDataSourcesOutput = (output, context) => {
1456
- return (0, smithy_client_1.take)(output, {
1457
- NextToken: smithy_client_1.expectString,
1458
- Results: (_) => de_DataSources(_, context),
1459
- });
1460
- };
1461
- const de_DescribeEvaluationsOutput = (output, context) => {
1462
- return (0, smithy_client_1.take)(output, {
1463
- NextToken: smithy_client_1.expectString,
1464
- Results: (_) => de_Evaluations(_, context),
1465
- });
1466
- };
1467
- const de_DescribeMLModelsOutput = (output, context) => {
1468
- return (0, smithy_client_1.take)(output, {
1469
- NextToken: smithy_client_1.expectString,
1470
- Results: (_) => de_MLModels(_, context),
1471
- });
1472
- };
1473
- const de_Evaluation = (output, context) => {
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
- });
1490
- };
1491
- const de_Evaluations = (output, context) => {
1492
- const retVal = (output || [])
1493
- .filter((e) => e != null)
1494
- .map((entry) => {
1495
- return de_Evaluation(entry, context);
1496
- });
1497
- return retVal;
1498
- };
1499
- const de_GetBatchPredictionOutput = (output, context) => {
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
- });
1519
- };
1520
- const de_GetDataSourceOutput = (output, context) => {
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
- });
1543
- };
1544
- const de_GetEvaluationOutput = (output, context) => {
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
- });
1562
- };
1563
- const de_GetMLModelOutput = (output, context) => {
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
- });
1587
- };
1588
- const de_MLModel = (output, context) => {
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
- });
1610
- };
1611
- const de_MLModels = (output, context) => {
1612
- const retVal = (output || [])
1613
- .filter((e) => e != null)
1614
- .map((entry) => {
1615
- return de_MLModel(entry, context);
1616
- });
1617
- return retVal;
1618
- };
1619
- const de_Prediction = (output, context) => {
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
- });
1626
- };
1627
- const de_PredictOutput = (output, context) => {
1628
- return (0, smithy_client_1.take)(output, {
1629
- Prediction: (_) => de_Prediction(_, context),
1630
- });
1631
- };
1632
- const de_RealtimeEndpointInfo = (output, context) => {
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
- });
1639
- };
1640
- const de_ScoreValuePerLabelMap = (output, context) => {
1641
- return Object.entries(output).reduce((acc, [key, value]) => {
1642
- if (value === null) {
1643
- return acc;
1644
- }
1645
- acc[key] = (0, smithy_client_1.limitedParseFloat32)(value);
1646
- return acc;
1647
- }, {});
1648
- };
1649
- const deserializeMetadata = (output) => ({
1650
- httpStatusCode: output.statusCode,
1651
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1652
- extendedRequestId: output.headers["x-amz-id-2"],
1653
- cfId: output.headers["x-amz-cf-id"],
1654
- });
1655
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
1656
- const throwDefaultError = (0, smithy_client_1.withBaseException)(MachineLearningServiceException_1.MachineLearningServiceException);
1657
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1658
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1659
- const contents = {
1660
- protocol,
1661
- hostname,
1662
- port,
1663
- method: "POST",
1664
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1665
- headers,
1666
- };
1667
- if (resolvedHostname !== undefined) {
1668
- contents.hostname = resolvedHostname;
1669
- }
1670
- if (body !== undefined) {
1671
- contents.body = body;
1672
- }
1673
- return new protocol_http_1.HttpRequest(contents);
1674
- };
1675
- function sharedHeaders(operation) {
1676
- return {
1677
- "content-type": "application/x-amz-json-1.1",
1678
- "x-amz-target": `AmazonML_20141212.${operation}`,
1679
- };
1680
- }
1681
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1682
- if (encoded.length) {
1683
- return JSON.parse(encoded);
1684
- }
1685
- return {};
1686
- });
1687
- const parseErrorBody = async (errorBody, context) => {
1688
- const value = await parseBody(errorBody, context);
1689
- value.message = value.message ?? value.Message;
1690
- return value;
1691
- };
1692
- const loadRestJsonErrorCode = (output, data) => {
1693
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1694
- const sanitizeErrorCode = (rawValue) => {
1695
- let cleanValue = rawValue;
1696
- if (typeof cleanValue === "number") {
1697
- cleanValue = cleanValue.toString();
1698
- }
1699
- if (cleanValue.indexOf(",") >= 0) {
1700
- cleanValue = cleanValue.split(",")[0];
1701
- }
1702
- if (cleanValue.indexOf(":") >= 0) {
1703
- cleanValue = cleanValue.split(":")[0];
1704
- }
1705
- if (cleanValue.indexOf("#") >= 0) {
1706
- cleanValue = cleanValue.split("#")[1];
1707
- }
1708
- return cleanValue;
1709
- };
1710
- const headerKey = findKey(output.headers, "x-amzn-errortype");
1711
- if (headerKey !== undefined) {
1712
- return sanitizeErrorCode(output.headers[headerKey]);
1713
- }
1714
- if (data.code !== undefined) {
1715
- return sanitizeErrorCode(data.code);
1716
- }
1717
- if (data["__type"] !== undefined) {
1718
- return sanitizeErrorCode(data["__type"]);
1719
- }
1720
- };
1
+ module.exports = require("../index.js");