@aws-sdk/client-databrew 3.490.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 (66) hide show
  1. package/dist-cjs/DataBrew.js +1 -99
  2. package/dist-cjs/DataBrewClient.js +1 -44
  3. package/dist-cjs/commands/BatchDeleteRecipeVersionCommand.js +1 -28
  4. package/dist-cjs/commands/CreateDatasetCommand.js +1 -28
  5. package/dist-cjs/commands/CreateProfileJobCommand.js +1 -28
  6. package/dist-cjs/commands/CreateProjectCommand.js +1 -28
  7. package/dist-cjs/commands/CreateRecipeCommand.js +1 -28
  8. package/dist-cjs/commands/CreateRecipeJobCommand.js +1 -28
  9. package/dist-cjs/commands/CreateRulesetCommand.js +1 -28
  10. package/dist-cjs/commands/CreateScheduleCommand.js +1 -28
  11. package/dist-cjs/commands/DeleteDatasetCommand.js +1 -28
  12. package/dist-cjs/commands/DeleteJobCommand.js +1 -28
  13. package/dist-cjs/commands/DeleteProjectCommand.js +1 -28
  14. package/dist-cjs/commands/DeleteRecipeVersionCommand.js +1 -28
  15. package/dist-cjs/commands/DeleteRulesetCommand.js +1 -28
  16. package/dist-cjs/commands/DeleteScheduleCommand.js +1 -28
  17. package/dist-cjs/commands/DescribeDatasetCommand.js +1 -28
  18. package/dist-cjs/commands/DescribeJobCommand.js +1 -28
  19. package/dist-cjs/commands/DescribeJobRunCommand.js +1 -28
  20. package/dist-cjs/commands/DescribeProjectCommand.js +1 -28
  21. package/dist-cjs/commands/DescribeRecipeCommand.js +1 -28
  22. package/dist-cjs/commands/DescribeRulesetCommand.js +1 -28
  23. package/dist-cjs/commands/DescribeScheduleCommand.js +1 -28
  24. package/dist-cjs/commands/ListDatasetsCommand.js +1 -28
  25. package/dist-cjs/commands/ListJobRunsCommand.js +1 -28
  26. package/dist-cjs/commands/ListJobsCommand.js +1 -28
  27. package/dist-cjs/commands/ListProjectsCommand.js +1 -28
  28. package/dist-cjs/commands/ListRecipeVersionsCommand.js +1 -28
  29. package/dist-cjs/commands/ListRecipesCommand.js +1 -28
  30. package/dist-cjs/commands/ListRulesetsCommand.js +1 -28
  31. package/dist-cjs/commands/ListSchedulesCommand.js +1 -28
  32. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
  33. package/dist-cjs/commands/PublishRecipeCommand.js +1 -28
  34. package/dist-cjs/commands/SendProjectSessionActionCommand.js +1 -29
  35. package/dist-cjs/commands/StartJobRunCommand.js +1 -28
  36. package/dist-cjs/commands/StartProjectSessionCommand.js +1 -29
  37. package/dist-cjs/commands/StopJobRunCommand.js +1 -28
  38. package/dist-cjs/commands/TagResourceCommand.js +1 -28
  39. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  40. package/dist-cjs/commands/UpdateDatasetCommand.js +1 -28
  41. package/dist-cjs/commands/UpdateProfileJobCommand.js +1 -28
  42. package/dist-cjs/commands/UpdateProjectCommand.js +1 -28
  43. package/dist-cjs/commands/UpdateRecipeCommand.js +1 -28
  44. package/dist-cjs/commands/UpdateRecipeJobCommand.js +1 -28
  45. package/dist-cjs/commands/UpdateRulesetCommand.js +1 -28
  46. package/dist-cjs/commands/UpdateScheduleCommand.js +1 -28
  47. package/dist-cjs/commands/index.js +1 -47
  48. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  49. package/dist-cjs/extensionConfiguration.js +1 -2
  50. package/dist-cjs/index.js +4132 -11
  51. package/dist-cjs/models/DataBrewServiceException.js +1 -12
  52. package/dist-cjs/models/index.js +1 -4
  53. package/dist-cjs/models/models_0.js +1 -206
  54. package/dist-cjs/pagination/Interfaces.js +1 -2
  55. package/dist-cjs/pagination/ListDatasetsPaginator.js +1 -7
  56. package/dist-cjs/pagination/ListJobRunsPaginator.js +1 -7
  57. package/dist-cjs/pagination/ListJobsPaginator.js +1 -7
  58. package/dist-cjs/pagination/ListProjectsPaginator.js +1 -7
  59. package/dist-cjs/pagination/ListRecipeVersionsPaginator.js +1 -7
  60. package/dist-cjs/pagination/ListRecipesPaginator.js +1 -7
  61. package/dist-cjs/pagination/ListRulesetsPaginator.js +1 -7
  62. package/dist-cjs/pagination/ListSchedulesPaginator.js +1 -7
  63. package/dist-cjs/pagination/index.js +1 -12
  64. package/dist-cjs/protocols/Aws_restJson1.js +1 -2847
  65. package/dist-cjs/runtimeExtensions.js +1 -22
  66. package/package.json +40 -40
@@ -1,2847 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_CreateRecipeJobCommand = exports.de_CreateRecipeCommand = exports.de_CreateProjectCommand = exports.de_CreateProfileJobCommand = exports.de_CreateDatasetCommand = exports.de_BatchDeleteRecipeVersionCommand = exports.se_UpdateScheduleCommand = exports.se_UpdateRulesetCommand = exports.se_UpdateRecipeJobCommand = exports.se_UpdateRecipeCommand = exports.se_UpdateProjectCommand = exports.se_UpdateProfileJobCommand = exports.se_UpdateDatasetCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopJobRunCommand = exports.se_StartProjectSessionCommand = exports.se_StartJobRunCommand = exports.se_SendProjectSessionActionCommand = exports.se_PublishRecipeCommand = exports.se_ListTagsForResourceCommand = exports.se_ListSchedulesCommand = exports.se_ListRulesetsCommand = exports.se_ListRecipeVersionsCommand = exports.se_ListRecipesCommand = exports.se_ListProjectsCommand = exports.se_ListJobsCommand = exports.se_ListJobRunsCommand = exports.se_ListDatasetsCommand = exports.se_DescribeScheduleCommand = exports.se_DescribeRulesetCommand = exports.se_DescribeRecipeCommand = exports.se_DescribeProjectCommand = exports.se_DescribeJobRunCommand = exports.se_DescribeJobCommand = exports.se_DescribeDatasetCommand = exports.se_DeleteScheduleCommand = exports.se_DeleteRulesetCommand = exports.se_DeleteRecipeVersionCommand = exports.se_DeleteProjectCommand = exports.se_DeleteJobCommand = exports.se_DeleteDatasetCommand = exports.se_CreateScheduleCommand = exports.se_CreateRulesetCommand = exports.se_CreateRecipeJobCommand = exports.se_CreateRecipeCommand = exports.se_CreateProjectCommand = exports.se_CreateProfileJobCommand = exports.se_CreateDatasetCommand = exports.se_BatchDeleteRecipeVersionCommand = void 0;
4
- exports.de_UpdateScheduleCommand = exports.de_UpdateRulesetCommand = exports.de_UpdateRecipeJobCommand = exports.de_UpdateRecipeCommand = exports.de_UpdateProjectCommand = exports.de_UpdateProfileJobCommand = exports.de_UpdateDatasetCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopJobRunCommand = exports.de_StartProjectSessionCommand = exports.de_StartJobRunCommand = exports.de_SendProjectSessionActionCommand = exports.de_PublishRecipeCommand = exports.de_ListTagsForResourceCommand = exports.de_ListSchedulesCommand = exports.de_ListRulesetsCommand = exports.de_ListRecipeVersionsCommand = exports.de_ListRecipesCommand = exports.de_ListProjectsCommand = exports.de_ListJobsCommand = exports.de_ListJobRunsCommand = exports.de_ListDatasetsCommand = exports.de_DescribeScheduleCommand = exports.de_DescribeRulesetCommand = exports.de_DescribeRecipeCommand = exports.de_DescribeProjectCommand = exports.de_DescribeJobRunCommand = exports.de_DescribeJobCommand = exports.de_DescribeDatasetCommand = exports.de_DeleteScheduleCommand = exports.de_DeleteRulesetCommand = exports.de_DeleteRecipeVersionCommand = exports.de_DeleteProjectCommand = exports.de_DeleteJobCommand = exports.de_DeleteDatasetCommand = exports.de_CreateScheduleCommand = exports.de_CreateRulesetCommand = void 0;
5
- const core_1 = require("@smithy/core");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- const DataBrewServiceException_1 = require("../models/DataBrewServiceException");
8
- const models_0_1 = require("../models/models_0");
9
- const se_BatchDeleteRecipeVersionCommand = async (input, context) => {
10
- const b = (0, core_1.requestBuilder)(input, context);
11
- const headers = {
12
- "content-type": "application/json",
13
- };
14
- b.bp("/recipes/{Name}/batchDeleteRecipeVersion");
15
- b.p("Name", () => input.Name, "{Name}", false);
16
- let body;
17
- body = JSON.stringify((0, smithy_client_1.take)(input, {
18
- RecipeVersions: (_) => (0, smithy_client_1._json)(_),
19
- }));
20
- b.m("POST").h(headers).b(body);
21
- return b.build();
22
- };
23
- exports.se_BatchDeleteRecipeVersionCommand = se_BatchDeleteRecipeVersionCommand;
24
- const se_CreateDatasetCommand = async (input, context) => {
25
- const b = (0, core_1.requestBuilder)(input, context);
26
- const headers = {
27
- "content-type": "application/json",
28
- };
29
- b.bp("/datasets");
30
- let body;
31
- body = JSON.stringify((0, smithy_client_1.take)(input, {
32
- Format: [],
33
- FormatOptions: (_) => (0, smithy_client_1._json)(_),
34
- Input: (_) => (0, smithy_client_1._json)(_),
35
- Name: [],
36
- PathOptions: (_) => (0, smithy_client_1._json)(_),
37
- Tags: (_) => (0, smithy_client_1._json)(_),
38
- }));
39
- b.m("POST").h(headers).b(body);
40
- return b.build();
41
- };
42
- exports.se_CreateDatasetCommand = se_CreateDatasetCommand;
43
- const se_CreateProfileJobCommand = async (input, context) => {
44
- const b = (0, core_1.requestBuilder)(input, context);
45
- const headers = {
46
- "content-type": "application/json",
47
- };
48
- b.bp("/profileJobs");
49
- let body;
50
- body = JSON.stringify((0, smithy_client_1.take)(input, {
51
- Configuration: (_) => (0, smithy_client_1._json)(_),
52
- DatasetName: [],
53
- EncryptionKeyArn: [],
54
- EncryptionMode: [],
55
- JobSample: (_) => (0, smithy_client_1._json)(_),
56
- LogSubscription: [],
57
- MaxCapacity: [],
58
- MaxRetries: [],
59
- Name: [],
60
- OutputLocation: (_) => (0, smithy_client_1._json)(_),
61
- RoleArn: [],
62
- Tags: (_) => (0, smithy_client_1._json)(_),
63
- Timeout: [],
64
- ValidationConfigurations: (_) => (0, smithy_client_1._json)(_),
65
- }));
66
- b.m("POST").h(headers).b(body);
67
- return b.build();
68
- };
69
- exports.se_CreateProfileJobCommand = se_CreateProfileJobCommand;
70
- const se_CreateProjectCommand = async (input, context) => {
71
- const b = (0, core_1.requestBuilder)(input, context);
72
- const headers = {
73
- "content-type": "application/json",
74
- };
75
- b.bp("/projects");
76
- let body;
77
- body = JSON.stringify((0, smithy_client_1.take)(input, {
78
- DatasetName: [],
79
- Name: [],
80
- RecipeName: [],
81
- RoleArn: [],
82
- Sample: (_) => (0, smithy_client_1._json)(_),
83
- Tags: (_) => (0, smithy_client_1._json)(_),
84
- }));
85
- b.m("POST").h(headers).b(body);
86
- return b.build();
87
- };
88
- exports.se_CreateProjectCommand = se_CreateProjectCommand;
89
- const se_CreateRecipeCommand = async (input, context) => {
90
- const b = (0, core_1.requestBuilder)(input, context);
91
- const headers = {
92
- "content-type": "application/json",
93
- };
94
- b.bp("/recipes");
95
- let body;
96
- body = JSON.stringify((0, smithy_client_1.take)(input, {
97
- Description: [],
98
- Name: [],
99
- Steps: (_) => (0, smithy_client_1._json)(_),
100
- Tags: (_) => (0, smithy_client_1._json)(_),
101
- }));
102
- b.m("POST").h(headers).b(body);
103
- return b.build();
104
- };
105
- exports.se_CreateRecipeCommand = se_CreateRecipeCommand;
106
- const se_CreateRecipeJobCommand = async (input, context) => {
107
- const b = (0, core_1.requestBuilder)(input, context);
108
- const headers = {
109
- "content-type": "application/json",
110
- };
111
- b.bp("/recipeJobs");
112
- let body;
113
- body = JSON.stringify((0, smithy_client_1.take)(input, {
114
- DataCatalogOutputs: (_) => (0, smithy_client_1._json)(_),
115
- DatabaseOutputs: (_) => (0, smithy_client_1._json)(_),
116
- DatasetName: [],
117
- EncryptionKeyArn: [],
118
- EncryptionMode: [],
119
- LogSubscription: [],
120
- MaxCapacity: [],
121
- MaxRetries: [],
122
- Name: [],
123
- Outputs: (_) => (0, smithy_client_1._json)(_),
124
- ProjectName: [],
125
- RecipeReference: (_) => (0, smithy_client_1._json)(_),
126
- RoleArn: [],
127
- Tags: (_) => (0, smithy_client_1._json)(_),
128
- Timeout: [],
129
- }));
130
- b.m("POST").h(headers).b(body);
131
- return b.build();
132
- };
133
- exports.se_CreateRecipeJobCommand = se_CreateRecipeJobCommand;
134
- const se_CreateRulesetCommand = async (input, context) => {
135
- const b = (0, core_1.requestBuilder)(input, context);
136
- const headers = {
137
- "content-type": "application/json",
138
- };
139
- b.bp("/rulesets");
140
- let body;
141
- body = JSON.stringify((0, smithy_client_1.take)(input, {
142
- Description: [],
143
- Name: [],
144
- Rules: (_) => se_RuleList(_, context),
145
- Tags: (_) => (0, smithy_client_1._json)(_),
146
- TargetArn: [],
147
- }));
148
- b.m("POST").h(headers).b(body);
149
- return b.build();
150
- };
151
- exports.se_CreateRulesetCommand = se_CreateRulesetCommand;
152
- const se_CreateScheduleCommand = async (input, context) => {
153
- const b = (0, core_1.requestBuilder)(input, context);
154
- const headers = {
155
- "content-type": "application/json",
156
- };
157
- b.bp("/schedules");
158
- let body;
159
- body = JSON.stringify((0, smithy_client_1.take)(input, {
160
- CronExpression: [],
161
- JobNames: (_) => (0, smithy_client_1._json)(_),
162
- Name: [],
163
- Tags: (_) => (0, smithy_client_1._json)(_),
164
- }));
165
- b.m("POST").h(headers).b(body);
166
- return b.build();
167
- };
168
- exports.se_CreateScheduleCommand = se_CreateScheduleCommand;
169
- const se_DeleteDatasetCommand = async (input, context) => {
170
- const b = (0, core_1.requestBuilder)(input, context);
171
- const headers = {};
172
- b.bp("/datasets/{Name}");
173
- b.p("Name", () => input.Name, "{Name}", false);
174
- let body;
175
- b.m("DELETE").h(headers).b(body);
176
- return b.build();
177
- };
178
- exports.se_DeleteDatasetCommand = se_DeleteDatasetCommand;
179
- const se_DeleteJobCommand = async (input, context) => {
180
- const b = (0, core_1.requestBuilder)(input, context);
181
- const headers = {};
182
- b.bp("/jobs/{Name}");
183
- b.p("Name", () => input.Name, "{Name}", false);
184
- let body;
185
- b.m("DELETE").h(headers).b(body);
186
- return b.build();
187
- };
188
- exports.se_DeleteJobCommand = se_DeleteJobCommand;
189
- const se_DeleteProjectCommand = async (input, context) => {
190
- const b = (0, core_1.requestBuilder)(input, context);
191
- const headers = {};
192
- b.bp("/projects/{Name}");
193
- b.p("Name", () => input.Name, "{Name}", false);
194
- let body;
195
- b.m("DELETE").h(headers).b(body);
196
- return b.build();
197
- };
198
- exports.se_DeleteProjectCommand = se_DeleteProjectCommand;
199
- const se_DeleteRecipeVersionCommand = async (input, context) => {
200
- const b = (0, core_1.requestBuilder)(input, context);
201
- const headers = {};
202
- b.bp("/recipes/{Name}/recipeVersion/{RecipeVersion}");
203
- b.p("Name", () => input.Name, "{Name}", false);
204
- b.p("RecipeVersion", () => input.RecipeVersion, "{RecipeVersion}", false);
205
- let body;
206
- b.m("DELETE").h(headers).b(body);
207
- return b.build();
208
- };
209
- exports.se_DeleteRecipeVersionCommand = se_DeleteRecipeVersionCommand;
210
- const se_DeleteRulesetCommand = async (input, context) => {
211
- const b = (0, core_1.requestBuilder)(input, context);
212
- const headers = {};
213
- b.bp("/rulesets/{Name}");
214
- b.p("Name", () => input.Name, "{Name}", false);
215
- let body;
216
- b.m("DELETE").h(headers).b(body);
217
- return b.build();
218
- };
219
- exports.se_DeleteRulesetCommand = se_DeleteRulesetCommand;
220
- const se_DeleteScheduleCommand = async (input, context) => {
221
- const b = (0, core_1.requestBuilder)(input, context);
222
- const headers = {};
223
- b.bp("/schedules/{Name}");
224
- b.p("Name", () => input.Name, "{Name}", false);
225
- let body;
226
- b.m("DELETE").h(headers).b(body);
227
- return b.build();
228
- };
229
- exports.se_DeleteScheduleCommand = se_DeleteScheduleCommand;
230
- const se_DescribeDatasetCommand = async (input, context) => {
231
- const b = (0, core_1.requestBuilder)(input, context);
232
- const headers = {};
233
- b.bp("/datasets/{Name}");
234
- b.p("Name", () => input.Name, "{Name}", false);
235
- let body;
236
- b.m("GET").h(headers).b(body);
237
- return b.build();
238
- };
239
- exports.se_DescribeDatasetCommand = se_DescribeDatasetCommand;
240
- const se_DescribeJobCommand = async (input, context) => {
241
- const b = (0, core_1.requestBuilder)(input, context);
242
- const headers = {};
243
- b.bp("/jobs/{Name}");
244
- b.p("Name", () => input.Name, "{Name}", false);
245
- let body;
246
- b.m("GET").h(headers).b(body);
247
- return b.build();
248
- };
249
- exports.se_DescribeJobCommand = se_DescribeJobCommand;
250
- const se_DescribeJobRunCommand = async (input, context) => {
251
- const b = (0, core_1.requestBuilder)(input, context);
252
- const headers = {};
253
- b.bp("/jobs/{Name}/jobRun/{RunId}");
254
- b.p("Name", () => input.Name, "{Name}", false);
255
- b.p("RunId", () => input.RunId, "{RunId}", false);
256
- let body;
257
- b.m("GET").h(headers).b(body);
258
- return b.build();
259
- };
260
- exports.se_DescribeJobRunCommand = se_DescribeJobRunCommand;
261
- const se_DescribeProjectCommand = async (input, context) => {
262
- const b = (0, core_1.requestBuilder)(input, context);
263
- const headers = {};
264
- b.bp("/projects/{Name}");
265
- b.p("Name", () => input.Name, "{Name}", false);
266
- let body;
267
- b.m("GET").h(headers).b(body);
268
- return b.build();
269
- };
270
- exports.se_DescribeProjectCommand = se_DescribeProjectCommand;
271
- const se_DescribeRecipeCommand = async (input, context) => {
272
- const b = (0, core_1.requestBuilder)(input, context);
273
- const headers = {};
274
- b.bp("/recipes/{Name}");
275
- b.p("Name", () => input.Name, "{Name}", false);
276
- const query = (0, smithy_client_1.map)({
277
- [_rV]: [, input[_RV]],
278
- });
279
- let body;
280
- b.m("GET").h(headers).q(query).b(body);
281
- return b.build();
282
- };
283
- exports.se_DescribeRecipeCommand = se_DescribeRecipeCommand;
284
- const se_DescribeRulesetCommand = async (input, context) => {
285
- const b = (0, core_1.requestBuilder)(input, context);
286
- const headers = {};
287
- b.bp("/rulesets/{Name}");
288
- b.p("Name", () => input.Name, "{Name}", false);
289
- let body;
290
- b.m("GET").h(headers).b(body);
291
- return b.build();
292
- };
293
- exports.se_DescribeRulesetCommand = se_DescribeRulesetCommand;
294
- const se_DescribeScheduleCommand = async (input, context) => {
295
- const b = (0, core_1.requestBuilder)(input, context);
296
- const headers = {};
297
- b.bp("/schedules/{Name}");
298
- b.p("Name", () => input.Name, "{Name}", false);
299
- let body;
300
- b.m("GET").h(headers).b(body);
301
- return b.build();
302
- };
303
- exports.se_DescribeScheduleCommand = se_DescribeScheduleCommand;
304
- const se_ListDatasetsCommand = async (input, context) => {
305
- const b = (0, core_1.requestBuilder)(input, context);
306
- const headers = {};
307
- b.bp("/datasets");
308
- const query = (0, smithy_client_1.map)({
309
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
310
- [_nT]: [, input[_NT]],
311
- });
312
- let body;
313
- b.m("GET").h(headers).q(query).b(body);
314
- return b.build();
315
- };
316
- exports.se_ListDatasetsCommand = se_ListDatasetsCommand;
317
- const se_ListJobRunsCommand = async (input, context) => {
318
- const b = (0, core_1.requestBuilder)(input, context);
319
- const headers = {};
320
- b.bp("/jobs/{Name}/jobRuns");
321
- b.p("Name", () => input.Name, "{Name}", false);
322
- const query = (0, smithy_client_1.map)({
323
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
324
- [_nT]: [, input[_NT]],
325
- });
326
- let body;
327
- b.m("GET").h(headers).q(query).b(body);
328
- return b.build();
329
- };
330
- exports.se_ListJobRunsCommand = se_ListJobRunsCommand;
331
- const se_ListJobsCommand = async (input, context) => {
332
- const b = (0, core_1.requestBuilder)(input, context);
333
- const headers = {};
334
- b.bp("/jobs");
335
- const query = (0, smithy_client_1.map)({
336
- [_dN]: [, input[_DN]],
337
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
338
- [_nT]: [, input[_NT]],
339
- [_pN]: [, input[_PN]],
340
- });
341
- let body;
342
- b.m("GET").h(headers).q(query).b(body);
343
- return b.build();
344
- };
345
- exports.se_ListJobsCommand = se_ListJobsCommand;
346
- const se_ListProjectsCommand = async (input, context) => {
347
- const b = (0, core_1.requestBuilder)(input, context);
348
- const headers = {};
349
- b.bp("/projects");
350
- const query = (0, smithy_client_1.map)({
351
- [_nT]: [, input[_NT]],
352
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
353
- });
354
- let body;
355
- b.m("GET").h(headers).q(query).b(body);
356
- return b.build();
357
- };
358
- exports.se_ListProjectsCommand = se_ListProjectsCommand;
359
- const se_ListRecipesCommand = async (input, context) => {
360
- const b = (0, core_1.requestBuilder)(input, context);
361
- const headers = {};
362
- b.bp("/recipes");
363
- const query = (0, smithy_client_1.map)({
364
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
365
- [_nT]: [, input[_NT]],
366
- [_rV]: [, input[_RV]],
367
- });
368
- let body;
369
- b.m("GET").h(headers).q(query).b(body);
370
- return b.build();
371
- };
372
- exports.se_ListRecipesCommand = se_ListRecipesCommand;
373
- const se_ListRecipeVersionsCommand = async (input, context) => {
374
- const b = (0, core_1.requestBuilder)(input, context);
375
- const headers = {};
376
- b.bp("/recipeVersions");
377
- const query = (0, smithy_client_1.map)({
378
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
379
- [_nT]: [, input[_NT]],
380
- [_n]: [, (0, smithy_client_1.expectNonNull)(input[_N], `Name`)],
381
- });
382
- let body;
383
- b.m("GET").h(headers).q(query).b(body);
384
- return b.build();
385
- };
386
- exports.se_ListRecipeVersionsCommand = se_ListRecipeVersionsCommand;
387
- const se_ListRulesetsCommand = async (input, context) => {
388
- const b = (0, core_1.requestBuilder)(input, context);
389
- const headers = {};
390
- b.bp("/rulesets");
391
- const query = (0, smithy_client_1.map)({
392
- [_tA]: [, input[_TA]],
393
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
394
- [_nT]: [, input[_NT]],
395
- });
396
- let body;
397
- b.m("GET").h(headers).q(query).b(body);
398
- return b.build();
399
- };
400
- exports.se_ListRulesetsCommand = se_ListRulesetsCommand;
401
- const se_ListSchedulesCommand = async (input, context) => {
402
- const b = (0, core_1.requestBuilder)(input, context);
403
- const headers = {};
404
- b.bp("/schedules");
405
- const query = (0, smithy_client_1.map)({
406
- [_jN]: [, input[_JN]],
407
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
408
- [_nT]: [, input[_NT]],
409
- });
410
- let body;
411
- b.m("GET").h(headers).q(query).b(body);
412
- return b.build();
413
- };
414
- exports.se_ListSchedulesCommand = se_ListSchedulesCommand;
415
- const se_ListTagsForResourceCommand = async (input, context) => {
416
- const b = (0, core_1.requestBuilder)(input, context);
417
- const headers = {};
418
- b.bp("/tags/{ResourceArn}");
419
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
420
- let body;
421
- b.m("GET").h(headers).b(body);
422
- return b.build();
423
- };
424
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
425
- const se_PublishRecipeCommand = async (input, context) => {
426
- const b = (0, core_1.requestBuilder)(input, context);
427
- const headers = {
428
- "content-type": "application/json",
429
- };
430
- b.bp("/recipes/{Name}/publishRecipe");
431
- b.p("Name", () => input.Name, "{Name}", false);
432
- let body;
433
- body = JSON.stringify((0, smithy_client_1.take)(input, {
434
- Description: [],
435
- }));
436
- b.m("POST").h(headers).b(body);
437
- return b.build();
438
- };
439
- exports.se_PublishRecipeCommand = se_PublishRecipeCommand;
440
- const se_SendProjectSessionActionCommand = async (input, context) => {
441
- const b = (0, core_1.requestBuilder)(input, context);
442
- const headers = {
443
- "content-type": "application/json",
444
- };
445
- b.bp("/projects/{Name}/sendProjectSessionAction");
446
- b.p("Name", () => input.Name, "{Name}", false);
447
- let body;
448
- body = JSON.stringify((0, smithy_client_1.take)(input, {
449
- ClientSessionId: [],
450
- Preview: [],
451
- RecipeStep: (_) => (0, smithy_client_1._json)(_),
452
- StepIndex: [],
453
- ViewFrame: (_) => (0, smithy_client_1._json)(_),
454
- }));
455
- b.m("PUT").h(headers).b(body);
456
- return b.build();
457
- };
458
- exports.se_SendProjectSessionActionCommand = se_SendProjectSessionActionCommand;
459
- const se_StartJobRunCommand = async (input, context) => {
460
- const b = (0, core_1.requestBuilder)(input, context);
461
- const headers = {};
462
- b.bp("/jobs/{Name}/startJobRun");
463
- b.p("Name", () => input.Name, "{Name}", false);
464
- let body;
465
- b.m("POST").h(headers).b(body);
466
- return b.build();
467
- };
468
- exports.se_StartJobRunCommand = se_StartJobRunCommand;
469
- const se_StartProjectSessionCommand = async (input, context) => {
470
- const b = (0, core_1.requestBuilder)(input, context);
471
- const headers = {
472
- "content-type": "application/json",
473
- };
474
- b.bp("/projects/{Name}/startProjectSession");
475
- b.p("Name", () => input.Name, "{Name}", false);
476
- let body;
477
- body = JSON.stringify((0, smithy_client_1.take)(input, {
478
- AssumeControl: [],
479
- }));
480
- b.m("PUT").h(headers).b(body);
481
- return b.build();
482
- };
483
- exports.se_StartProjectSessionCommand = se_StartProjectSessionCommand;
484
- const se_StopJobRunCommand = async (input, context) => {
485
- const b = (0, core_1.requestBuilder)(input, context);
486
- const headers = {};
487
- b.bp("/jobs/{Name}/jobRun/{RunId}/stopJobRun");
488
- b.p("Name", () => input.Name, "{Name}", false);
489
- b.p("RunId", () => input.RunId, "{RunId}", false);
490
- let body;
491
- b.m("POST").h(headers).b(body);
492
- return b.build();
493
- };
494
- exports.se_StopJobRunCommand = se_StopJobRunCommand;
495
- const se_TagResourceCommand = async (input, context) => {
496
- const b = (0, core_1.requestBuilder)(input, context);
497
- const headers = {
498
- "content-type": "application/json",
499
- };
500
- b.bp("/tags/{ResourceArn}");
501
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
502
- let body;
503
- body = JSON.stringify((0, smithy_client_1.take)(input, {
504
- Tags: (_) => (0, smithy_client_1._json)(_),
505
- }));
506
- b.m("POST").h(headers).b(body);
507
- return b.build();
508
- };
509
- exports.se_TagResourceCommand = se_TagResourceCommand;
510
- const se_UntagResourceCommand = async (input, context) => {
511
- const b = (0, core_1.requestBuilder)(input, context);
512
- const headers = {};
513
- b.bp("/tags/{ResourceArn}");
514
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
515
- const query = (0, smithy_client_1.map)({
516
- [_tK]: [
517
- (0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
518
- () => (input[_TK] || []).map((_entry) => _entry),
519
- ],
520
- });
521
- let body;
522
- b.m("DELETE").h(headers).q(query).b(body);
523
- return b.build();
524
- };
525
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
526
- const se_UpdateDatasetCommand = async (input, context) => {
527
- const b = (0, core_1.requestBuilder)(input, context);
528
- const headers = {
529
- "content-type": "application/json",
530
- };
531
- b.bp("/datasets/{Name}");
532
- b.p("Name", () => input.Name, "{Name}", false);
533
- let body;
534
- body = JSON.stringify((0, smithy_client_1.take)(input, {
535
- Format: [],
536
- FormatOptions: (_) => (0, smithy_client_1._json)(_),
537
- Input: (_) => (0, smithy_client_1._json)(_),
538
- PathOptions: (_) => (0, smithy_client_1._json)(_),
539
- }));
540
- b.m("PUT").h(headers).b(body);
541
- return b.build();
542
- };
543
- exports.se_UpdateDatasetCommand = se_UpdateDatasetCommand;
544
- const se_UpdateProfileJobCommand = async (input, context) => {
545
- const b = (0, core_1.requestBuilder)(input, context);
546
- const headers = {
547
- "content-type": "application/json",
548
- };
549
- b.bp("/profileJobs/{Name}");
550
- b.p("Name", () => input.Name, "{Name}", false);
551
- let body;
552
- body = JSON.stringify((0, smithy_client_1.take)(input, {
553
- Configuration: (_) => (0, smithy_client_1._json)(_),
554
- EncryptionKeyArn: [],
555
- EncryptionMode: [],
556
- JobSample: (_) => (0, smithy_client_1._json)(_),
557
- LogSubscription: [],
558
- MaxCapacity: [],
559
- MaxRetries: [],
560
- OutputLocation: (_) => (0, smithy_client_1._json)(_),
561
- RoleArn: [],
562
- Timeout: [],
563
- ValidationConfigurations: (_) => (0, smithy_client_1._json)(_),
564
- }));
565
- b.m("PUT").h(headers).b(body);
566
- return b.build();
567
- };
568
- exports.se_UpdateProfileJobCommand = se_UpdateProfileJobCommand;
569
- const se_UpdateProjectCommand = async (input, context) => {
570
- const b = (0, core_1.requestBuilder)(input, context);
571
- const headers = {
572
- "content-type": "application/json",
573
- };
574
- b.bp("/projects/{Name}");
575
- b.p("Name", () => input.Name, "{Name}", false);
576
- let body;
577
- body = JSON.stringify((0, smithy_client_1.take)(input, {
578
- RoleArn: [],
579
- Sample: (_) => (0, smithy_client_1._json)(_),
580
- }));
581
- b.m("PUT").h(headers).b(body);
582
- return b.build();
583
- };
584
- exports.se_UpdateProjectCommand = se_UpdateProjectCommand;
585
- const se_UpdateRecipeCommand = async (input, context) => {
586
- const b = (0, core_1.requestBuilder)(input, context);
587
- const headers = {
588
- "content-type": "application/json",
589
- };
590
- b.bp("/recipes/{Name}");
591
- b.p("Name", () => input.Name, "{Name}", false);
592
- let body;
593
- body = JSON.stringify((0, smithy_client_1.take)(input, {
594
- Description: [],
595
- Steps: (_) => (0, smithy_client_1._json)(_),
596
- }));
597
- b.m("PUT").h(headers).b(body);
598
- return b.build();
599
- };
600
- exports.se_UpdateRecipeCommand = se_UpdateRecipeCommand;
601
- const se_UpdateRecipeJobCommand = async (input, context) => {
602
- const b = (0, core_1.requestBuilder)(input, context);
603
- const headers = {
604
- "content-type": "application/json",
605
- };
606
- b.bp("/recipeJobs/{Name}");
607
- b.p("Name", () => input.Name, "{Name}", false);
608
- let body;
609
- body = JSON.stringify((0, smithy_client_1.take)(input, {
610
- DataCatalogOutputs: (_) => (0, smithy_client_1._json)(_),
611
- DatabaseOutputs: (_) => (0, smithy_client_1._json)(_),
612
- EncryptionKeyArn: [],
613
- EncryptionMode: [],
614
- LogSubscription: [],
615
- MaxCapacity: [],
616
- MaxRetries: [],
617
- Outputs: (_) => (0, smithy_client_1._json)(_),
618
- RoleArn: [],
619
- Timeout: [],
620
- }));
621
- b.m("PUT").h(headers).b(body);
622
- return b.build();
623
- };
624
- exports.se_UpdateRecipeJobCommand = se_UpdateRecipeJobCommand;
625
- const se_UpdateRulesetCommand = async (input, context) => {
626
- const b = (0, core_1.requestBuilder)(input, context);
627
- const headers = {
628
- "content-type": "application/json",
629
- };
630
- b.bp("/rulesets/{Name}");
631
- b.p("Name", () => input.Name, "{Name}", false);
632
- let body;
633
- body = JSON.stringify((0, smithy_client_1.take)(input, {
634
- Description: [],
635
- Rules: (_) => se_RuleList(_, context),
636
- }));
637
- b.m("PUT").h(headers).b(body);
638
- return b.build();
639
- };
640
- exports.se_UpdateRulesetCommand = se_UpdateRulesetCommand;
641
- const se_UpdateScheduleCommand = async (input, context) => {
642
- const b = (0, core_1.requestBuilder)(input, context);
643
- const headers = {
644
- "content-type": "application/json",
645
- };
646
- b.bp("/schedules/{Name}");
647
- b.p("Name", () => input.Name, "{Name}", false);
648
- let body;
649
- body = JSON.stringify((0, smithy_client_1.take)(input, {
650
- CronExpression: [],
651
- JobNames: (_) => (0, smithy_client_1._json)(_),
652
- }));
653
- b.m("PUT").h(headers).b(body);
654
- return b.build();
655
- };
656
- exports.se_UpdateScheduleCommand = se_UpdateScheduleCommand;
657
- const de_BatchDeleteRecipeVersionCommand = async (output, context) => {
658
- if (output.statusCode !== 200 && output.statusCode >= 300) {
659
- return de_BatchDeleteRecipeVersionCommandError(output, context);
660
- }
661
- const contents = (0, smithy_client_1.map)({
662
- $metadata: deserializeMetadata(output),
663
- });
664
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
665
- const doc = (0, smithy_client_1.take)(data, {
666
- Errors: smithy_client_1._json,
667
- Name: smithy_client_1.expectString,
668
- });
669
- Object.assign(contents, doc);
670
- return contents;
671
- };
672
- exports.de_BatchDeleteRecipeVersionCommand = de_BatchDeleteRecipeVersionCommand;
673
- const de_BatchDeleteRecipeVersionCommandError = async (output, context) => {
674
- const parsedOutput = {
675
- ...output,
676
- body: await parseErrorBody(output.body, context),
677
- };
678
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
679
- switch (errorCode) {
680
- case "ConflictException":
681
- case "com.amazonaws.databrew#ConflictException":
682
- throw await de_ConflictExceptionRes(parsedOutput, context);
683
- case "ResourceNotFoundException":
684
- case "com.amazonaws.databrew#ResourceNotFoundException":
685
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
686
- case "ValidationException":
687
- case "com.amazonaws.databrew#ValidationException":
688
- throw await de_ValidationExceptionRes(parsedOutput, context);
689
- default:
690
- const parsedBody = parsedOutput.body;
691
- return throwDefaultError({
692
- output,
693
- parsedBody,
694
- errorCode,
695
- });
696
- }
697
- };
698
- const de_CreateDatasetCommand = async (output, context) => {
699
- if (output.statusCode !== 200 && output.statusCode >= 300) {
700
- return de_CreateDatasetCommandError(output, context);
701
- }
702
- const contents = (0, smithy_client_1.map)({
703
- $metadata: deserializeMetadata(output),
704
- });
705
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
706
- const doc = (0, smithy_client_1.take)(data, {
707
- Name: smithy_client_1.expectString,
708
- });
709
- Object.assign(contents, doc);
710
- return contents;
711
- };
712
- exports.de_CreateDatasetCommand = de_CreateDatasetCommand;
713
- const de_CreateDatasetCommandError = async (output, context) => {
714
- const parsedOutput = {
715
- ...output,
716
- body: await parseErrorBody(output.body, context),
717
- };
718
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
719
- switch (errorCode) {
720
- case "AccessDeniedException":
721
- case "com.amazonaws.databrew#AccessDeniedException":
722
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
723
- case "ConflictException":
724
- case "com.amazonaws.databrew#ConflictException":
725
- throw await de_ConflictExceptionRes(parsedOutput, context);
726
- case "ServiceQuotaExceededException":
727
- case "com.amazonaws.databrew#ServiceQuotaExceededException":
728
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
729
- case "ValidationException":
730
- case "com.amazonaws.databrew#ValidationException":
731
- throw await de_ValidationExceptionRes(parsedOutput, context);
732
- default:
733
- const parsedBody = parsedOutput.body;
734
- return throwDefaultError({
735
- output,
736
- parsedBody,
737
- errorCode,
738
- });
739
- }
740
- };
741
- const de_CreateProfileJobCommand = async (output, context) => {
742
- if (output.statusCode !== 200 && output.statusCode >= 300) {
743
- return de_CreateProfileJobCommandError(output, context);
744
- }
745
- const contents = (0, smithy_client_1.map)({
746
- $metadata: deserializeMetadata(output),
747
- });
748
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
749
- const doc = (0, smithy_client_1.take)(data, {
750
- Name: smithy_client_1.expectString,
751
- });
752
- Object.assign(contents, doc);
753
- return contents;
754
- };
755
- exports.de_CreateProfileJobCommand = de_CreateProfileJobCommand;
756
- const de_CreateProfileJobCommandError = async (output, context) => {
757
- const parsedOutput = {
758
- ...output,
759
- body: await parseErrorBody(output.body, context),
760
- };
761
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
762
- switch (errorCode) {
763
- case "AccessDeniedException":
764
- case "com.amazonaws.databrew#AccessDeniedException":
765
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
766
- case "ConflictException":
767
- case "com.amazonaws.databrew#ConflictException":
768
- throw await de_ConflictExceptionRes(parsedOutput, context);
769
- case "ResourceNotFoundException":
770
- case "com.amazonaws.databrew#ResourceNotFoundException":
771
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
772
- case "ServiceQuotaExceededException":
773
- case "com.amazonaws.databrew#ServiceQuotaExceededException":
774
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
775
- case "ValidationException":
776
- case "com.amazonaws.databrew#ValidationException":
777
- throw await de_ValidationExceptionRes(parsedOutput, context);
778
- default:
779
- const parsedBody = parsedOutput.body;
780
- return throwDefaultError({
781
- output,
782
- parsedBody,
783
- errorCode,
784
- });
785
- }
786
- };
787
- const de_CreateProjectCommand = async (output, context) => {
788
- if (output.statusCode !== 200 && output.statusCode >= 300) {
789
- return de_CreateProjectCommandError(output, context);
790
- }
791
- const contents = (0, smithy_client_1.map)({
792
- $metadata: deserializeMetadata(output),
793
- });
794
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
795
- const doc = (0, smithy_client_1.take)(data, {
796
- Name: smithy_client_1.expectString,
797
- });
798
- Object.assign(contents, doc);
799
- return contents;
800
- };
801
- exports.de_CreateProjectCommand = de_CreateProjectCommand;
802
- const de_CreateProjectCommandError = async (output, context) => {
803
- const parsedOutput = {
804
- ...output,
805
- body: await parseErrorBody(output.body, context),
806
- };
807
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
808
- switch (errorCode) {
809
- case "ConflictException":
810
- case "com.amazonaws.databrew#ConflictException":
811
- throw await de_ConflictExceptionRes(parsedOutput, context);
812
- case "InternalServerException":
813
- case "com.amazonaws.databrew#InternalServerException":
814
- throw await de_InternalServerExceptionRes(parsedOutput, context);
815
- case "ServiceQuotaExceededException":
816
- case "com.amazonaws.databrew#ServiceQuotaExceededException":
817
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
818
- case "ValidationException":
819
- case "com.amazonaws.databrew#ValidationException":
820
- throw await de_ValidationExceptionRes(parsedOutput, context);
821
- default:
822
- const parsedBody = parsedOutput.body;
823
- return throwDefaultError({
824
- output,
825
- parsedBody,
826
- errorCode,
827
- });
828
- }
829
- };
830
- const de_CreateRecipeCommand = async (output, context) => {
831
- if (output.statusCode !== 200 && output.statusCode >= 300) {
832
- return de_CreateRecipeCommandError(output, context);
833
- }
834
- const contents = (0, smithy_client_1.map)({
835
- $metadata: deserializeMetadata(output),
836
- });
837
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
838
- const doc = (0, smithy_client_1.take)(data, {
839
- Name: smithy_client_1.expectString,
840
- });
841
- Object.assign(contents, doc);
842
- return contents;
843
- };
844
- exports.de_CreateRecipeCommand = de_CreateRecipeCommand;
845
- const de_CreateRecipeCommandError = async (output, context) => {
846
- const parsedOutput = {
847
- ...output,
848
- body: await parseErrorBody(output.body, context),
849
- };
850
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
851
- switch (errorCode) {
852
- case "ConflictException":
853
- case "com.amazonaws.databrew#ConflictException":
854
- throw await de_ConflictExceptionRes(parsedOutput, context);
855
- case "ServiceQuotaExceededException":
856
- case "com.amazonaws.databrew#ServiceQuotaExceededException":
857
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
858
- case "ValidationException":
859
- case "com.amazonaws.databrew#ValidationException":
860
- throw await de_ValidationExceptionRes(parsedOutput, context);
861
- default:
862
- const parsedBody = parsedOutput.body;
863
- return throwDefaultError({
864
- output,
865
- parsedBody,
866
- errorCode,
867
- });
868
- }
869
- };
870
- const de_CreateRecipeJobCommand = async (output, context) => {
871
- if (output.statusCode !== 200 && output.statusCode >= 300) {
872
- return de_CreateRecipeJobCommandError(output, context);
873
- }
874
- const contents = (0, smithy_client_1.map)({
875
- $metadata: deserializeMetadata(output),
876
- });
877
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
878
- const doc = (0, smithy_client_1.take)(data, {
879
- Name: smithy_client_1.expectString,
880
- });
881
- Object.assign(contents, doc);
882
- return contents;
883
- };
884
- exports.de_CreateRecipeJobCommand = de_CreateRecipeJobCommand;
885
- const de_CreateRecipeJobCommandError = async (output, context) => {
886
- const parsedOutput = {
887
- ...output,
888
- body: await parseErrorBody(output.body, context),
889
- };
890
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
891
- switch (errorCode) {
892
- case "AccessDeniedException":
893
- case "com.amazonaws.databrew#AccessDeniedException":
894
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
895
- case "ConflictException":
896
- case "com.amazonaws.databrew#ConflictException":
897
- throw await de_ConflictExceptionRes(parsedOutput, context);
898
- case "ResourceNotFoundException":
899
- case "com.amazonaws.databrew#ResourceNotFoundException":
900
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
901
- case "ServiceQuotaExceededException":
902
- case "com.amazonaws.databrew#ServiceQuotaExceededException":
903
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
904
- case "ValidationException":
905
- case "com.amazonaws.databrew#ValidationException":
906
- throw await de_ValidationExceptionRes(parsedOutput, context);
907
- default:
908
- const parsedBody = parsedOutput.body;
909
- return throwDefaultError({
910
- output,
911
- parsedBody,
912
- errorCode,
913
- });
914
- }
915
- };
916
- const de_CreateRulesetCommand = async (output, context) => {
917
- if (output.statusCode !== 200 && output.statusCode >= 300) {
918
- return de_CreateRulesetCommandError(output, context);
919
- }
920
- const contents = (0, smithy_client_1.map)({
921
- $metadata: deserializeMetadata(output),
922
- });
923
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
924
- const doc = (0, smithy_client_1.take)(data, {
925
- Name: smithy_client_1.expectString,
926
- });
927
- Object.assign(contents, doc);
928
- return contents;
929
- };
930
- exports.de_CreateRulesetCommand = de_CreateRulesetCommand;
931
- const de_CreateRulesetCommandError = async (output, context) => {
932
- const parsedOutput = {
933
- ...output,
934
- body: await parseErrorBody(output.body, context),
935
- };
936
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
937
- switch (errorCode) {
938
- case "ConflictException":
939
- case "com.amazonaws.databrew#ConflictException":
940
- throw await de_ConflictExceptionRes(parsedOutput, context);
941
- case "ServiceQuotaExceededException":
942
- case "com.amazonaws.databrew#ServiceQuotaExceededException":
943
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
944
- case "ValidationException":
945
- case "com.amazonaws.databrew#ValidationException":
946
- throw await de_ValidationExceptionRes(parsedOutput, context);
947
- default:
948
- const parsedBody = parsedOutput.body;
949
- return throwDefaultError({
950
- output,
951
- parsedBody,
952
- errorCode,
953
- });
954
- }
955
- };
956
- const de_CreateScheduleCommand = async (output, context) => {
957
- if (output.statusCode !== 200 && output.statusCode >= 300) {
958
- return de_CreateScheduleCommandError(output, context);
959
- }
960
- const contents = (0, smithy_client_1.map)({
961
- $metadata: deserializeMetadata(output),
962
- });
963
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
964
- const doc = (0, smithy_client_1.take)(data, {
965
- Name: smithy_client_1.expectString,
966
- });
967
- Object.assign(contents, doc);
968
- return contents;
969
- };
970
- exports.de_CreateScheduleCommand = de_CreateScheduleCommand;
971
- const de_CreateScheduleCommandError = async (output, context) => {
972
- const parsedOutput = {
973
- ...output,
974
- body: await parseErrorBody(output.body, context),
975
- };
976
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
977
- switch (errorCode) {
978
- case "ConflictException":
979
- case "com.amazonaws.databrew#ConflictException":
980
- throw await de_ConflictExceptionRes(parsedOutput, context);
981
- case "ServiceQuotaExceededException":
982
- case "com.amazonaws.databrew#ServiceQuotaExceededException":
983
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
984
- case "ValidationException":
985
- case "com.amazonaws.databrew#ValidationException":
986
- throw await de_ValidationExceptionRes(parsedOutput, context);
987
- default:
988
- const parsedBody = parsedOutput.body;
989
- return throwDefaultError({
990
- output,
991
- parsedBody,
992
- errorCode,
993
- });
994
- }
995
- };
996
- const de_DeleteDatasetCommand = async (output, context) => {
997
- if (output.statusCode !== 200 && output.statusCode >= 300) {
998
- return de_DeleteDatasetCommandError(output, context);
999
- }
1000
- const contents = (0, smithy_client_1.map)({
1001
- $metadata: deserializeMetadata(output),
1002
- });
1003
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1004
- const doc = (0, smithy_client_1.take)(data, {
1005
- Name: smithy_client_1.expectString,
1006
- });
1007
- Object.assign(contents, doc);
1008
- return contents;
1009
- };
1010
- exports.de_DeleteDatasetCommand = de_DeleteDatasetCommand;
1011
- const de_DeleteDatasetCommandError = async (output, context) => {
1012
- const parsedOutput = {
1013
- ...output,
1014
- body: await parseErrorBody(output.body, context),
1015
- };
1016
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1017
- switch (errorCode) {
1018
- case "ConflictException":
1019
- case "com.amazonaws.databrew#ConflictException":
1020
- throw await de_ConflictExceptionRes(parsedOutput, context);
1021
- case "ResourceNotFoundException":
1022
- case "com.amazonaws.databrew#ResourceNotFoundException":
1023
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1024
- case "ValidationException":
1025
- case "com.amazonaws.databrew#ValidationException":
1026
- throw await de_ValidationExceptionRes(parsedOutput, context);
1027
- default:
1028
- const parsedBody = parsedOutput.body;
1029
- return throwDefaultError({
1030
- output,
1031
- parsedBody,
1032
- errorCode,
1033
- });
1034
- }
1035
- };
1036
- const de_DeleteJobCommand = async (output, context) => {
1037
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1038
- return de_DeleteJobCommandError(output, context);
1039
- }
1040
- const contents = (0, smithy_client_1.map)({
1041
- $metadata: deserializeMetadata(output),
1042
- });
1043
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1044
- const doc = (0, smithy_client_1.take)(data, {
1045
- Name: smithy_client_1.expectString,
1046
- });
1047
- Object.assign(contents, doc);
1048
- return contents;
1049
- };
1050
- exports.de_DeleteJobCommand = de_DeleteJobCommand;
1051
- const de_DeleteJobCommandError = async (output, context) => {
1052
- const parsedOutput = {
1053
- ...output,
1054
- body: await parseErrorBody(output.body, context),
1055
- };
1056
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1057
- switch (errorCode) {
1058
- case "ConflictException":
1059
- case "com.amazonaws.databrew#ConflictException":
1060
- throw await de_ConflictExceptionRes(parsedOutput, context);
1061
- case "ResourceNotFoundException":
1062
- case "com.amazonaws.databrew#ResourceNotFoundException":
1063
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1064
- case "ValidationException":
1065
- case "com.amazonaws.databrew#ValidationException":
1066
- throw await de_ValidationExceptionRes(parsedOutput, context);
1067
- default:
1068
- const parsedBody = parsedOutput.body;
1069
- return throwDefaultError({
1070
- output,
1071
- parsedBody,
1072
- errorCode,
1073
- });
1074
- }
1075
- };
1076
- const de_DeleteProjectCommand = async (output, context) => {
1077
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1078
- return de_DeleteProjectCommandError(output, context);
1079
- }
1080
- const contents = (0, smithy_client_1.map)({
1081
- $metadata: deserializeMetadata(output),
1082
- });
1083
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1084
- const doc = (0, smithy_client_1.take)(data, {
1085
- Name: smithy_client_1.expectString,
1086
- });
1087
- Object.assign(contents, doc);
1088
- return contents;
1089
- };
1090
- exports.de_DeleteProjectCommand = de_DeleteProjectCommand;
1091
- const de_DeleteProjectCommandError = async (output, context) => {
1092
- const parsedOutput = {
1093
- ...output,
1094
- body: await parseErrorBody(output.body, context),
1095
- };
1096
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1097
- switch (errorCode) {
1098
- case "ConflictException":
1099
- case "com.amazonaws.databrew#ConflictException":
1100
- throw await de_ConflictExceptionRes(parsedOutput, context);
1101
- case "ResourceNotFoundException":
1102
- case "com.amazonaws.databrew#ResourceNotFoundException":
1103
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1104
- case "ValidationException":
1105
- case "com.amazonaws.databrew#ValidationException":
1106
- throw await de_ValidationExceptionRes(parsedOutput, context);
1107
- default:
1108
- const parsedBody = parsedOutput.body;
1109
- return throwDefaultError({
1110
- output,
1111
- parsedBody,
1112
- errorCode,
1113
- });
1114
- }
1115
- };
1116
- const de_DeleteRecipeVersionCommand = async (output, context) => {
1117
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1118
- return de_DeleteRecipeVersionCommandError(output, context);
1119
- }
1120
- const contents = (0, smithy_client_1.map)({
1121
- $metadata: deserializeMetadata(output),
1122
- });
1123
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1124
- const doc = (0, smithy_client_1.take)(data, {
1125
- Name: smithy_client_1.expectString,
1126
- RecipeVersion: smithy_client_1.expectString,
1127
- });
1128
- Object.assign(contents, doc);
1129
- return contents;
1130
- };
1131
- exports.de_DeleteRecipeVersionCommand = de_DeleteRecipeVersionCommand;
1132
- const de_DeleteRecipeVersionCommandError = async (output, context) => {
1133
- const parsedOutput = {
1134
- ...output,
1135
- body: await parseErrorBody(output.body, context),
1136
- };
1137
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1138
- switch (errorCode) {
1139
- case "ConflictException":
1140
- case "com.amazonaws.databrew#ConflictException":
1141
- throw await de_ConflictExceptionRes(parsedOutput, context);
1142
- case "ResourceNotFoundException":
1143
- case "com.amazonaws.databrew#ResourceNotFoundException":
1144
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1145
- case "ValidationException":
1146
- case "com.amazonaws.databrew#ValidationException":
1147
- throw await de_ValidationExceptionRes(parsedOutput, context);
1148
- default:
1149
- const parsedBody = parsedOutput.body;
1150
- return throwDefaultError({
1151
- output,
1152
- parsedBody,
1153
- errorCode,
1154
- });
1155
- }
1156
- };
1157
- const de_DeleteRulesetCommand = async (output, context) => {
1158
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1159
- return de_DeleteRulesetCommandError(output, context);
1160
- }
1161
- const contents = (0, smithy_client_1.map)({
1162
- $metadata: deserializeMetadata(output),
1163
- });
1164
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1165
- const doc = (0, smithy_client_1.take)(data, {
1166
- Name: smithy_client_1.expectString,
1167
- });
1168
- Object.assign(contents, doc);
1169
- return contents;
1170
- };
1171
- exports.de_DeleteRulesetCommand = de_DeleteRulesetCommand;
1172
- const de_DeleteRulesetCommandError = async (output, context) => {
1173
- const parsedOutput = {
1174
- ...output,
1175
- body: await parseErrorBody(output.body, context),
1176
- };
1177
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1178
- switch (errorCode) {
1179
- case "ConflictException":
1180
- case "com.amazonaws.databrew#ConflictException":
1181
- throw await de_ConflictExceptionRes(parsedOutput, context);
1182
- case "ResourceNotFoundException":
1183
- case "com.amazonaws.databrew#ResourceNotFoundException":
1184
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1185
- case "ValidationException":
1186
- case "com.amazonaws.databrew#ValidationException":
1187
- throw await de_ValidationExceptionRes(parsedOutput, context);
1188
- default:
1189
- const parsedBody = parsedOutput.body;
1190
- return throwDefaultError({
1191
- output,
1192
- parsedBody,
1193
- errorCode,
1194
- });
1195
- }
1196
- };
1197
- const de_DeleteScheduleCommand = async (output, context) => {
1198
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1199
- return de_DeleteScheduleCommandError(output, context);
1200
- }
1201
- const contents = (0, smithy_client_1.map)({
1202
- $metadata: deserializeMetadata(output),
1203
- });
1204
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1205
- const doc = (0, smithy_client_1.take)(data, {
1206
- Name: smithy_client_1.expectString,
1207
- });
1208
- Object.assign(contents, doc);
1209
- return contents;
1210
- };
1211
- exports.de_DeleteScheduleCommand = de_DeleteScheduleCommand;
1212
- const de_DeleteScheduleCommandError = async (output, context) => {
1213
- const parsedOutput = {
1214
- ...output,
1215
- body: await parseErrorBody(output.body, context),
1216
- };
1217
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1218
- switch (errorCode) {
1219
- case "ResourceNotFoundException":
1220
- case "com.amazonaws.databrew#ResourceNotFoundException":
1221
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1222
- case "ValidationException":
1223
- case "com.amazonaws.databrew#ValidationException":
1224
- throw await de_ValidationExceptionRes(parsedOutput, context);
1225
- default:
1226
- const parsedBody = parsedOutput.body;
1227
- return throwDefaultError({
1228
- output,
1229
- parsedBody,
1230
- errorCode,
1231
- });
1232
- }
1233
- };
1234
- const de_DescribeDatasetCommand = async (output, context) => {
1235
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1236
- return de_DescribeDatasetCommandError(output, context);
1237
- }
1238
- const contents = (0, smithy_client_1.map)({
1239
- $metadata: deserializeMetadata(output),
1240
- });
1241
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1242
- const doc = (0, smithy_client_1.take)(data, {
1243
- CreateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1244
- CreatedBy: smithy_client_1.expectString,
1245
- Format: smithy_client_1.expectString,
1246
- FormatOptions: smithy_client_1._json,
1247
- Input: smithy_client_1._json,
1248
- LastModifiedBy: smithy_client_1.expectString,
1249
- LastModifiedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1250
- Name: smithy_client_1.expectString,
1251
- PathOptions: smithy_client_1._json,
1252
- ResourceArn: smithy_client_1.expectString,
1253
- Source: smithy_client_1.expectString,
1254
- Tags: smithy_client_1._json,
1255
- });
1256
- Object.assign(contents, doc);
1257
- return contents;
1258
- };
1259
- exports.de_DescribeDatasetCommand = de_DescribeDatasetCommand;
1260
- const de_DescribeDatasetCommandError = async (output, context) => {
1261
- const parsedOutput = {
1262
- ...output,
1263
- body: await parseErrorBody(output.body, context),
1264
- };
1265
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1266
- switch (errorCode) {
1267
- case "ResourceNotFoundException":
1268
- case "com.amazonaws.databrew#ResourceNotFoundException":
1269
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1270
- case "ValidationException":
1271
- case "com.amazonaws.databrew#ValidationException":
1272
- throw await de_ValidationExceptionRes(parsedOutput, context);
1273
- default:
1274
- const parsedBody = parsedOutput.body;
1275
- return throwDefaultError({
1276
- output,
1277
- parsedBody,
1278
- errorCode,
1279
- });
1280
- }
1281
- };
1282
- const de_DescribeJobCommand = async (output, context) => {
1283
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1284
- return de_DescribeJobCommandError(output, context);
1285
- }
1286
- const contents = (0, smithy_client_1.map)({
1287
- $metadata: deserializeMetadata(output),
1288
- });
1289
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1290
- const doc = (0, smithy_client_1.take)(data, {
1291
- CreateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1292
- CreatedBy: smithy_client_1.expectString,
1293
- DataCatalogOutputs: smithy_client_1._json,
1294
- DatabaseOutputs: smithy_client_1._json,
1295
- DatasetName: smithy_client_1.expectString,
1296
- EncryptionKeyArn: smithy_client_1.expectString,
1297
- EncryptionMode: smithy_client_1.expectString,
1298
- JobSample: smithy_client_1._json,
1299
- LastModifiedBy: smithy_client_1.expectString,
1300
- LastModifiedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1301
- LogSubscription: smithy_client_1.expectString,
1302
- MaxCapacity: smithy_client_1.expectInt32,
1303
- MaxRetries: smithy_client_1.expectInt32,
1304
- Name: smithy_client_1.expectString,
1305
- Outputs: smithy_client_1._json,
1306
- ProfileConfiguration: smithy_client_1._json,
1307
- ProjectName: smithy_client_1.expectString,
1308
- RecipeReference: smithy_client_1._json,
1309
- ResourceArn: smithy_client_1.expectString,
1310
- RoleArn: smithy_client_1.expectString,
1311
- Tags: smithy_client_1._json,
1312
- Timeout: smithy_client_1.expectInt32,
1313
- Type: smithy_client_1.expectString,
1314
- ValidationConfigurations: smithy_client_1._json,
1315
- });
1316
- Object.assign(contents, doc);
1317
- return contents;
1318
- };
1319
- exports.de_DescribeJobCommand = de_DescribeJobCommand;
1320
- const de_DescribeJobCommandError = async (output, context) => {
1321
- const parsedOutput = {
1322
- ...output,
1323
- body: await parseErrorBody(output.body, context),
1324
- };
1325
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1326
- switch (errorCode) {
1327
- case "ResourceNotFoundException":
1328
- case "com.amazonaws.databrew#ResourceNotFoundException":
1329
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1330
- case "ValidationException":
1331
- case "com.amazonaws.databrew#ValidationException":
1332
- throw await de_ValidationExceptionRes(parsedOutput, context);
1333
- default:
1334
- const parsedBody = parsedOutput.body;
1335
- return throwDefaultError({
1336
- output,
1337
- parsedBody,
1338
- errorCode,
1339
- });
1340
- }
1341
- };
1342
- const de_DescribeJobRunCommand = async (output, context) => {
1343
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1344
- return de_DescribeJobRunCommandError(output, context);
1345
- }
1346
- const contents = (0, smithy_client_1.map)({
1347
- $metadata: deserializeMetadata(output),
1348
- });
1349
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1350
- const doc = (0, smithy_client_1.take)(data, {
1351
- Attempt: smithy_client_1.expectInt32,
1352
- CompletedOn: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1353
- DataCatalogOutputs: smithy_client_1._json,
1354
- DatabaseOutputs: smithy_client_1._json,
1355
- DatasetName: smithy_client_1.expectString,
1356
- ErrorMessage: smithy_client_1.expectString,
1357
- ExecutionTime: smithy_client_1.expectInt32,
1358
- JobName: smithy_client_1.expectString,
1359
- JobSample: smithy_client_1._json,
1360
- LogGroupName: smithy_client_1.expectString,
1361
- LogSubscription: smithy_client_1.expectString,
1362
- Outputs: smithy_client_1._json,
1363
- ProfileConfiguration: smithy_client_1._json,
1364
- RecipeReference: smithy_client_1._json,
1365
- RunId: smithy_client_1.expectString,
1366
- StartedBy: smithy_client_1.expectString,
1367
- StartedOn: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1368
- State: smithy_client_1.expectString,
1369
- ValidationConfigurations: smithy_client_1._json,
1370
- });
1371
- Object.assign(contents, doc);
1372
- return contents;
1373
- };
1374
- exports.de_DescribeJobRunCommand = de_DescribeJobRunCommand;
1375
- const de_DescribeJobRunCommandError = async (output, context) => {
1376
- const parsedOutput = {
1377
- ...output,
1378
- body: await parseErrorBody(output.body, context),
1379
- };
1380
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1381
- switch (errorCode) {
1382
- case "ResourceNotFoundException":
1383
- case "com.amazonaws.databrew#ResourceNotFoundException":
1384
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1385
- case "ValidationException":
1386
- case "com.amazonaws.databrew#ValidationException":
1387
- throw await de_ValidationExceptionRes(parsedOutput, context);
1388
- default:
1389
- const parsedBody = parsedOutput.body;
1390
- return throwDefaultError({
1391
- output,
1392
- parsedBody,
1393
- errorCode,
1394
- });
1395
- }
1396
- };
1397
- const de_DescribeProjectCommand = async (output, context) => {
1398
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1399
- return de_DescribeProjectCommandError(output, context);
1400
- }
1401
- const contents = (0, smithy_client_1.map)({
1402
- $metadata: deserializeMetadata(output),
1403
- });
1404
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1405
- const doc = (0, smithy_client_1.take)(data, {
1406
- CreateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1407
- CreatedBy: smithy_client_1.expectString,
1408
- DatasetName: smithy_client_1.expectString,
1409
- LastModifiedBy: smithy_client_1.expectString,
1410
- LastModifiedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1411
- Name: smithy_client_1.expectString,
1412
- OpenDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1413
- OpenedBy: smithy_client_1.expectString,
1414
- RecipeName: smithy_client_1.expectString,
1415
- ResourceArn: smithy_client_1.expectString,
1416
- RoleArn: smithy_client_1.expectString,
1417
- Sample: smithy_client_1._json,
1418
- SessionStatus: smithy_client_1.expectString,
1419
- Tags: smithy_client_1._json,
1420
- });
1421
- Object.assign(contents, doc);
1422
- return contents;
1423
- };
1424
- exports.de_DescribeProjectCommand = de_DescribeProjectCommand;
1425
- const de_DescribeProjectCommandError = async (output, context) => {
1426
- const parsedOutput = {
1427
- ...output,
1428
- body: await parseErrorBody(output.body, context),
1429
- };
1430
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1431
- switch (errorCode) {
1432
- case "ResourceNotFoundException":
1433
- case "com.amazonaws.databrew#ResourceNotFoundException":
1434
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1435
- case "ValidationException":
1436
- case "com.amazonaws.databrew#ValidationException":
1437
- throw await de_ValidationExceptionRes(parsedOutput, context);
1438
- default:
1439
- const parsedBody = parsedOutput.body;
1440
- return throwDefaultError({
1441
- output,
1442
- parsedBody,
1443
- errorCode,
1444
- });
1445
- }
1446
- };
1447
- const de_DescribeRecipeCommand = async (output, context) => {
1448
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1449
- return de_DescribeRecipeCommandError(output, context);
1450
- }
1451
- const contents = (0, smithy_client_1.map)({
1452
- $metadata: deserializeMetadata(output),
1453
- });
1454
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1455
- const doc = (0, smithy_client_1.take)(data, {
1456
- CreateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1457
- CreatedBy: smithy_client_1.expectString,
1458
- Description: smithy_client_1.expectString,
1459
- LastModifiedBy: smithy_client_1.expectString,
1460
- LastModifiedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1461
- Name: smithy_client_1.expectString,
1462
- ProjectName: smithy_client_1.expectString,
1463
- PublishedBy: smithy_client_1.expectString,
1464
- PublishedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1465
- RecipeVersion: smithy_client_1.expectString,
1466
- ResourceArn: smithy_client_1.expectString,
1467
- Steps: smithy_client_1._json,
1468
- Tags: smithy_client_1._json,
1469
- });
1470
- Object.assign(contents, doc);
1471
- return contents;
1472
- };
1473
- exports.de_DescribeRecipeCommand = de_DescribeRecipeCommand;
1474
- const de_DescribeRecipeCommandError = async (output, context) => {
1475
- const parsedOutput = {
1476
- ...output,
1477
- body: await parseErrorBody(output.body, context),
1478
- };
1479
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1480
- switch (errorCode) {
1481
- case "ResourceNotFoundException":
1482
- case "com.amazonaws.databrew#ResourceNotFoundException":
1483
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1484
- case "ValidationException":
1485
- case "com.amazonaws.databrew#ValidationException":
1486
- throw await de_ValidationExceptionRes(parsedOutput, context);
1487
- default:
1488
- const parsedBody = parsedOutput.body;
1489
- return throwDefaultError({
1490
- output,
1491
- parsedBody,
1492
- errorCode,
1493
- });
1494
- }
1495
- };
1496
- const de_DescribeRulesetCommand = async (output, context) => {
1497
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1498
- return de_DescribeRulesetCommandError(output, context);
1499
- }
1500
- const contents = (0, smithy_client_1.map)({
1501
- $metadata: deserializeMetadata(output),
1502
- });
1503
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1504
- const doc = (0, smithy_client_1.take)(data, {
1505
- CreateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1506
- CreatedBy: smithy_client_1.expectString,
1507
- Description: smithy_client_1.expectString,
1508
- LastModifiedBy: smithy_client_1.expectString,
1509
- LastModifiedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1510
- Name: smithy_client_1.expectString,
1511
- ResourceArn: smithy_client_1.expectString,
1512
- Rules: (_) => de_RuleList(_, context),
1513
- Tags: smithy_client_1._json,
1514
- TargetArn: smithy_client_1.expectString,
1515
- });
1516
- Object.assign(contents, doc);
1517
- return contents;
1518
- };
1519
- exports.de_DescribeRulesetCommand = de_DescribeRulesetCommand;
1520
- const de_DescribeRulesetCommandError = async (output, context) => {
1521
- const parsedOutput = {
1522
- ...output,
1523
- body: await parseErrorBody(output.body, context),
1524
- };
1525
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1526
- switch (errorCode) {
1527
- case "ResourceNotFoundException":
1528
- case "com.amazonaws.databrew#ResourceNotFoundException":
1529
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1530
- case "ValidationException":
1531
- case "com.amazonaws.databrew#ValidationException":
1532
- throw await de_ValidationExceptionRes(parsedOutput, context);
1533
- default:
1534
- const parsedBody = parsedOutput.body;
1535
- return throwDefaultError({
1536
- output,
1537
- parsedBody,
1538
- errorCode,
1539
- });
1540
- }
1541
- };
1542
- const de_DescribeScheduleCommand = async (output, context) => {
1543
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1544
- return de_DescribeScheduleCommandError(output, context);
1545
- }
1546
- const contents = (0, smithy_client_1.map)({
1547
- $metadata: deserializeMetadata(output),
1548
- });
1549
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1550
- const doc = (0, smithy_client_1.take)(data, {
1551
- CreateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1552
- CreatedBy: smithy_client_1.expectString,
1553
- CronExpression: smithy_client_1.expectString,
1554
- JobNames: smithy_client_1._json,
1555
- LastModifiedBy: smithy_client_1.expectString,
1556
- LastModifiedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1557
- Name: smithy_client_1.expectString,
1558
- ResourceArn: smithy_client_1.expectString,
1559
- Tags: smithy_client_1._json,
1560
- });
1561
- Object.assign(contents, doc);
1562
- return contents;
1563
- };
1564
- exports.de_DescribeScheduleCommand = de_DescribeScheduleCommand;
1565
- const de_DescribeScheduleCommandError = async (output, context) => {
1566
- const parsedOutput = {
1567
- ...output,
1568
- body: await parseErrorBody(output.body, context),
1569
- };
1570
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1571
- switch (errorCode) {
1572
- case "ResourceNotFoundException":
1573
- case "com.amazonaws.databrew#ResourceNotFoundException":
1574
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1575
- case "ValidationException":
1576
- case "com.amazonaws.databrew#ValidationException":
1577
- throw await de_ValidationExceptionRes(parsedOutput, context);
1578
- default:
1579
- const parsedBody = parsedOutput.body;
1580
- return throwDefaultError({
1581
- output,
1582
- parsedBody,
1583
- errorCode,
1584
- });
1585
- }
1586
- };
1587
- const de_ListDatasetsCommand = async (output, context) => {
1588
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1589
- return de_ListDatasetsCommandError(output, context);
1590
- }
1591
- const contents = (0, smithy_client_1.map)({
1592
- $metadata: deserializeMetadata(output),
1593
- });
1594
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1595
- const doc = (0, smithy_client_1.take)(data, {
1596
- Datasets: (_) => de_DatasetList(_, context),
1597
- NextToken: smithy_client_1.expectString,
1598
- });
1599
- Object.assign(contents, doc);
1600
- return contents;
1601
- };
1602
- exports.de_ListDatasetsCommand = de_ListDatasetsCommand;
1603
- const de_ListDatasetsCommandError = async (output, context) => {
1604
- const parsedOutput = {
1605
- ...output,
1606
- body: await parseErrorBody(output.body, context),
1607
- };
1608
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1609
- switch (errorCode) {
1610
- case "ValidationException":
1611
- case "com.amazonaws.databrew#ValidationException":
1612
- throw await de_ValidationExceptionRes(parsedOutput, context);
1613
- default:
1614
- const parsedBody = parsedOutput.body;
1615
- return throwDefaultError({
1616
- output,
1617
- parsedBody,
1618
- errorCode,
1619
- });
1620
- }
1621
- };
1622
- const de_ListJobRunsCommand = async (output, context) => {
1623
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1624
- return de_ListJobRunsCommandError(output, context);
1625
- }
1626
- const contents = (0, smithy_client_1.map)({
1627
- $metadata: deserializeMetadata(output),
1628
- });
1629
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1630
- const doc = (0, smithy_client_1.take)(data, {
1631
- JobRuns: (_) => de_JobRunList(_, context),
1632
- NextToken: smithy_client_1.expectString,
1633
- });
1634
- Object.assign(contents, doc);
1635
- return contents;
1636
- };
1637
- exports.de_ListJobRunsCommand = de_ListJobRunsCommand;
1638
- const de_ListJobRunsCommandError = async (output, context) => {
1639
- const parsedOutput = {
1640
- ...output,
1641
- body: await parseErrorBody(output.body, context),
1642
- };
1643
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1644
- switch (errorCode) {
1645
- case "ResourceNotFoundException":
1646
- case "com.amazonaws.databrew#ResourceNotFoundException":
1647
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1648
- case "ValidationException":
1649
- case "com.amazonaws.databrew#ValidationException":
1650
- throw await de_ValidationExceptionRes(parsedOutput, context);
1651
- default:
1652
- const parsedBody = parsedOutput.body;
1653
- return throwDefaultError({
1654
- output,
1655
- parsedBody,
1656
- errorCode,
1657
- });
1658
- }
1659
- };
1660
- const de_ListJobsCommand = async (output, context) => {
1661
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1662
- return de_ListJobsCommandError(output, context);
1663
- }
1664
- const contents = (0, smithy_client_1.map)({
1665
- $metadata: deserializeMetadata(output),
1666
- });
1667
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1668
- const doc = (0, smithy_client_1.take)(data, {
1669
- Jobs: (_) => de_JobList(_, context),
1670
- NextToken: smithy_client_1.expectString,
1671
- });
1672
- Object.assign(contents, doc);
1673
- return contents;
1674
- };
1675
- exports.de_ListJobsCommand = de_ListJobsCommand;
1676
- const de_ListJobsCommandError = async (output, context) => {
1677
- const parsedOutput = {
1678
- ...output,
1679
- body: await parseErrorBody(output.body, context),
1680
- };
1681
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1682
- switch (errorCode) {
1683
- case "ValidationException":
1684
- case "com.amazonaws.databrew#ValidationException":
1685
- throw await de_ValidationExceptionRes(parsedOutput, context);
1686
- default:
1687
- const parsedBody = parsedOutput.body;
1688
- return throwDefaultError({
1689
- output,
1690
- parsedBody,
1691
- errorCode,
1692
- });
1693
- }
1694
- };
1695
- const de_ListProjectsCommand = async (output, context) => {
1696
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1697
- return de_ListProjectsCommandError(output, context);
1698
- }
1699
- const contents = (0, smithy_client_1.map)({
1700
- $metadata: deserializeMetadata(output),
1701
- });
1702
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1703
- const doc = (0, smithy_client_1.take)(data, {
1704
- NextToken: smithy_client_1.expectString,
1705
- Projects: (_) => de_ProjectList(_, context),
1706
- });
1707
- Object.assign(contents, doc);
1708
- return contents;
1709
- };
1710
- exports.de_ListProjectsCommand = de_ListProjectsCommand;
1711
- const de_ListProjectsCommandError = async (output, context) => {
1712
- const parsedOutput = {
1713
- ...output,
1714
- body: await parseErrorBody(output.body, context),
1715
- };
1716
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1717
- switch (errorCode) {
1718
- case "ValidationException":
1719
- case "com.amazonaws.databrew#ValidationException":
1720
- throw await de_ValidationExceptionRes(parsedOutput, context);
1721
- default:
1722
- const parsedBody = parsedOutput.body;
1723
- return throwDefaultError({
1724
- output,
1725
- parsedBody,
1726
- errorCode,
1727
- });
1728
- }
1729
- };
1730
- const de_ListRecipesCommand = async (output, context) => {
1731
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1732
- return de_ListRecipesCommandError(output, context);
1733
- }
1734
- const contents = (0, smithy_client_1.map)({
1735
- $metadata: deserializeMetadata(output),
1736
- });
1737
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1738
- const doc = (0, smithy_client_1.take)(data, {
1739
- NextToken: smithy_client_1.expectString,
1740
- Recipes: (_) => de_RecipeList(_, context),
1741
- });
1742
- Object.assign(contents, doc);
1743
- return contents;
1744
- };
1745
- exports.de_ListRecipesCommand = de_ListRecipesCommand;
1746
- const de_ListRecipesCommandError = async (output, context) => {
1747
- const parsedOutput = {
1748
- ...output,
1749
- body: await parseErrorBody(output.body, context),
1750
- };
1751
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1752
- switch (errorCode) {
1753
- case "ValidationException":
1754
- case "com.amazonaws.databrew#ValidationException":
1755
- throw await de_ValidationExceptionRes(parsedOutput, context);
1756
- default:
1757
- const parsedBody = parsedOutput.body;
1758
- return throwDefaultError({
1759
- output,
1760
- parsedBody,
1761
- errorCode,
1762
- });
1763
- }
1764
- };
1765
- const de_ListRecipeVersionsCommand = async (output, context) => {
1766
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1767
- return de_ListRecipeVersionsCommandError(output, context);
1768
- }
1769
- const contents = (0, smithy_client_1.map)({
1770
- $metadata: deserializeMetadata(output),
1771
- });
1772
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1773
- const doc = (0, smithy_client_1.take)(data, {
1774
- NextToken: smithy_client_1.expectString,
1775
- Recipes: (_) => de_RecipeList(_, context),
1776
- });
1777
- Object.assign(contents, doc);
1778
- return contents;
1779
- };
1780
- exports.de_ListRecipeVersionsCommand = de_ListRecipeVersionsCommand;
1781
- const de_ListRecipeVersionsCommandError = async (output, context) => {
1782
- const parsedOutput = {
1783
- ...output,
1784
- body: await parseErrorBody(output.body, context),
1785
- };
1786
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1787
- switch (errorCode) {
1788
- case "ValidationException":
1789
- case "com.amazonaws.databrew#ValidationException":
1790
- throw await de_ValidationExceptionRes(parsedOutput, context);
1791
- default:
1792
- const parsedBody = parsedOutput.body;
1793
- return throwDefaultError({
1794
- output,
1795
- parsedBody,
1796
- errorCode,
1797
- });
1798
- }
1799
- };
1800
- const de_ListRulesetsCommand = async (output, context) => {
1801
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1802
- return de_ListRulesetsCommandError(output, context);
1803
- }
1804
- const contents = (0, smithy_client_1.map)({
1805
- $metadata: deserializeMetadata(output),
1806
- });
1807
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1808
- const doc = (0, smithy_client_1.take)(data, {
1809
- NextToken: smithy_client_1.expectString,
1810
- Rulesets: (_) => de_RulesetItemList(_, context),
1811
- });
1812
- Object.assign(contents, doc);
1813
- return contents;
1814
- };
1815
- exports.de_ListRulesetsCommand = de_ListRulesetsCommand;
1816
- const de_ListRulesetsCommandError = async (output, context) => {
1817
- const parsedOutput = {
1818
- ...output,
1819
- body: await parseErrorBody(output.body, context),
1820
- };
1821
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1822
- switch (errorCode) {
1823
- case "ResourceNotFoundException":
1824
- case "com.amazonaws.databrew#ResourceNotFoundException":
1825
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1826
- case "ValidationException":
1827
- case "com.amazonaws.databrew#ValidationException":
1828
- throw await de_ValidationExceptionRes(parsedOutput, context);
1829
- default:
1830
- const parsedBody = parsedOutput.body;
1831
- return throwDefaultError({
1832
- output,
1833
- parsedBody,
1834
- errorCode,
1835
- });
1836
- }
1837
- };
1838
- const de_ListSchedulesCommand = async (output, context) => {
1839
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1840
- return de_ListSchedulesCommandError(output, context);
1841
- }
1842
- const contents = (0, smithy_client_1.map)({
1843
- $metadata: deserializeMetadata(output),
1844
- });
1845
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1846
- const doc = (0, smithy_client_1.take)(data, {
1847
- NextToken: smithy_client_1.expectString,
1848
- Schedules: (_) => de_ScheduleList(_, context),
1849
- });
1850
- Object.assign(contents, doc);
1851
- return contents;
1852
- };
1853
- exports.de_ListSchedulesCommand = de_ListSchedulesCommand;
1854
- const de_ListSchedulesCommandError = async (output, context) => {
1855
- const parsedOutput = {
1856
- ...output,
1857
- body: await parseErrorBody(output.body, context),
1858
- };
1859
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1860
- switch (errorCode) {
1861
- case "ValidationException":
1862
- case "com.amazonaws.databrew#ValidationException":
1863
- throw await de_ValidationExceptionRes(parsedOutput, context);
1864
- default:
1865
- const parsedBody = parsedOutput.body;
1866
- return throwDefaultError({
1867
- output,
1868
- parsedBody,
1869
- errorCode,
1870
- });
1871
- }
1872
- };
1873
- const de_ListTagsForResourceCommand = async (output, context) => {
1874
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1875
- return de_ListTagsForResourceCommandError(output, context);
1876
- }
1877
- const contents = (0, smithy_client_1.map)({
1878
- $metadata: deserializeMetadata(output),
1879
- });
1880
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1881
- const doc = (0, smithy_client_1.take)(data, {
1882
- Tags: smithy_client_1._json,
1883
- });
1884
- Object.assign(contents, doc);
1885
- return contents;
1886
- };
1887
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
1888
- const de_ListTagsForResourceCommandError = async (output, context) => {
1889
- const parsedOutput = {
1890
- ...output,
1891
- body: await parseErrorBody(output.body, context),
1892
- };
1893
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1894
- switch (errorCode) {
1895
- case "InternalServerException":
1896
- case "com.amazonaws.databrew#InternalServerException":
1897
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1898
- case "ResourceNotFoundException":
1899
- case "com.amazonaws.databrew#ResourceNotFoundException":
1900
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1901
- case "ValidationException":
1902
- case "com.amazonaws.databrew#ValidationException":
1903
- throw await de_ValidationExceptionRes(parsedOutput, context);
1904
- default:
1905
- const parsedBody = parsedOutput.body;
1906
- return throwDefaultError({
1907
- output,
1908
- parsedBody,
1909
- errorCode,
1910
- });
1911
- }
1912
- };
1913
- const de_PublishRecipeCommand = async (output, context) => {
1914
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1915
- return de_PublishRecipeCommandError(output, context);
1916
- }
1917
- const contents = (0, smithy_client_1.map)({
1918
- $metadata: deserializeMetadata(output),
1919
- });
1920
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1921
- const doc = (0, smithy_client_1.take)(data, {
1922
- Name: smithy_client_1.expectString,
1923
- });
1924
- Object.assign(contents, doc);
1925
- return contents;
1926
- };
1927
- exports.de_PublishRecipeCommand = de_PublishRecipeCommand;
1928
- const de_PublishRecipeCommandError = async (output, context) => {
1929
- const parsedOutput = {
1930
- ...output,
1931
- body: await parseErrorBody(output.body, context),
1932
- };
1933
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1934
- switch (errorCode) {
1935
- case "ResourceNotFoundException":
1936
- case "com.amazonaws.databrew#ResourceNotFoundException":
1937
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1938
- case "ServiceQuotaExceededException":
1939
- case "com.amazonaws.databrew#ServiceQuotaExceededException":
1940
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1941
- case "ValidationException":
1942
- case "com.amazonaws.databrew#ValidationException":
1943
- throw await de_ValidationExceptionRes(parsedOutput, context);
1944
- default:
1945
- const parsedBody = parsedOutput.body;
1946
- return throwDefaultError({
1947
- output,
1948
- parsedBody,
1949
- errorCode,
1950
- });
1951
- }
1952
- };
1953
- const de_SendProjectSessionActionCommand = async (output, context) => {
1954
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1955
- return de_SendProjectSessionActionCommandError(output, context);
1956
- }
1957
- const contents = (0, smithy_client_1.map)({
1958
- $metadata: deserializeMetadata(output),
1959
- });
1960
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1961
- const doc = (0, smithy_client_1.take)(data, {
1962
- ActionId: smithy_client_1.expectInt32,
1963
- Name: smithy_client_1.expectString,
1964
- Result: smithy_client_1.expectString,
1965
- });
1966
- Object.assign(contents, doc);
1967
- return contents;
1968
- };
1969
- exports.de_SendProjectSessionActionCommand = de_SendProjectSessionActionCommand;
1970
- const de_SendProjectSessionActionCommandError = async (output, context) => {
1971
- const parsedOutput = {
1972
- ...output,
1973
- body: await parseErrorBody(output.body, context),
1974
- };
1975
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1976
- switch (errorCode) {
1977
- case "ConflictException":
1978
- case "com.amazonaws.databrew#ConflictException":
1979
- throw await de_ConflictExceptionRes(parsedOutput, context);
1980
- case "ResourceNotFoundException":
1981
- case "com.amazonaws.databrew#ResourceNotFoundException":
1982
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1983
- case "ValidationException":
1984
- case "com.amazonaws.databrew#ValidationException":
1985
- throw await de_ValidationExceptionRes(parsedOutput, context);
1986
- default:
1987
- const parsedBody = parsedOutput.body;
1988
- return throwDefaultError({
1989
- output,
1990
- parsedBody,
1991
- errorCode,
1992
- });
1993
- }
1994
- };
1995
- const de_StartJobRunCommand = async (output, context) => {
1996
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1997
- return de_StartJobRunCommandError(output, context);
1998
- }
1999
- const contents = (0, smithy_client_1.map)({
2000
- $metadata: deserializeMetadata(output),
2001
- });
2002
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2003
- const doc = (0, smithy_client_1.take)(data, {
2004
- RunId: smithy_client_1.expectString,
2005
- });
2006
- Object.assign(contents, doc);
2007
- return contents;
2008
- };
2009
- exports.de_StartJobRunCommand = de_StartJobRunCommand;
2010
- const de_StartJobRunCommandError = async (output, context) => {
2011
- const parsedOutput = {
2012
- ...output,
2013
- body: await parseErrorBody(output.body, context),
2014
- };
2015
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2016
- switch (errorCode) {
2017
- case "ConflictException":
2018
- case "com.amazonaws.databrew#ConflictException":
2019
- throw await de_ConflictExceptionRes(parsedOutput, context);
2020
- case "ResourceNotFoundException":
2021
- case "com.amazonaws.databrew#ResourceNotFoundException":
2022
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2023
- case "ServiceQuotaExceededException":
2024
- case "com.amazonaws.databrew#ServiceQuotaExceededException":
2025
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2026
- case "ValidationException":
2027
- case "com.amazonaws.databrew#ValidationException":
2028
- throw await de_ValidationExceptionRes(parsedOutput, context);
2029
- default:
2030
- const parsedBody = parsedOutput.body;
2031
- return throwDefaultError({
2032
- output,
2033
- parsedBody,
2034
- errorCode,
2035
- });
2036
- }
2037
- };
2038
- const de_StartProjectSessionCommand = async (output, context) => {
2039
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2040
- return de_StartProjectSessionCommandError(output, context);
2041
- }
2042
- const contents = (0, smithy_client_1.map)({
2043
- $metadata: deserializeMetadata(output),
2044
- });
2045
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2046
- const doc = (0, smithy_client_1.take)(data, {
2047
- ClientSessionId: smithy_client_1.expectString,
2048
- Name: smithy_client_1.expectString,
2049
- });
2050
- Object.assign(contents, doc);
2051
- return contents;
2052
- };
2053
- exports.de_StartProjectSessionCommand = de_StartProjectSessionCommand;
2054
- const de_StartProjectSessionCommandError = async (output, context) => {
2055
- const parsedOutput = {
2056
- ...output,
2057
- body: await parseErrorBody(output.body, context),
2058
- };
2059
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2060
- switch (errorCode) {
2061
- case "ConflictException":
2062
- case "com.amazonaws.databrew#ConflictException":
2063
- throw await de_ConflictExceptionRes(parsedOutput, context);
2064
- case "ResourceNotFoundException":
2065
- case "com.amazonaws.databrew#ResourceNotFoundException":
2066
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2067
- case "ServiceQuotaExceededException":
2068
- case "com.amazonaws.databrew#ServiceQuotaExceededException":
2069
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2070
- case "ValidationException":
2071
- case "com.amazonaws.databrew#ValidationException":
2072
- throw await de_ValidationExceptionRes(parsedOutput, context);
2073
- default:
2074
- const parsedBody = parsedOutput.body;
2075
- return throwDefaultError({
2076
- output,
2077
- parsedBody,
2078
- errorCode,
2079
- });
2080
- }
2081
- };
2082
- const de_StopJobRunCommand = async (output, context) => {
2083
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2084
- return de_StopJobRunCommandError(output, context);
2085
- }
2086
- const contents = (0, smithy_client_1.map)({
2087
- $metadata: deserializeMetadata(output),
2088
- });
2089
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2090
- const doc = (0, smithy_client_1.take)(data, {
2091
- RunId: smithy_client_1.expectString,
2092
- });
2093
- Object.assign(contents, doc);
2094
- return contents;
2095
- };
2096
- exports.de_StopJobRunCommand = de_StopJobRunCommand;
2097
- const de_StopJobRunCommandError = async (output, context) => {
2098
- const parsedOutput = {
2099
- ...output,
2100
- body: await parseErrorBody(output.body, context),
2101
- };
2102
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2103
- switch (errorCode) {
2104
- case "ResourceNotFoundException":
2105
- case "com.amazonaws.databrew#ResourceNotFoundException":
2106
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2107
- case "ValidationException":
2108
- case "com.amazonaws.databrew#ValidationException":
2109
- throw await de_ValidationExceptionRes(parsedOutput, context);
2110
- default:
2111
- const parsedBody = parsedOutput.body;
2112
- return throwDefaultError({
2113
- output,
2114
- parsedBody,
2115
- errorCode,
2116
- });
2117
- }
2118
- };
2119
- const de_TagResourceCommand = async (output, context) => {
2120
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2121
- return de_TagResourceCommandError(output, context);
2122
- }
2123
- const contents = (0, smithy_client_1.map)({
2124
- $metadata: deserializeMetadata(output),
2125
- });
2126
- await (0, smithy_client_1.collectBody)(output.body, context);
2127
- return contents;
2128
- };
2129
- exports.de_TagResourceCommand = de_TagResourceCommand;
2130
- const de_TagResourceCommandError = async (output, context) => {
2131
- const parsedOutput = {
2132
- ...output,
2133
- body: await parseErrorBody(output.body, context),
2134
- };
2135
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2136
- switch (errorCode) {
2137
- case "InternalServerException":
2138
- case "com.amazonaws.databrew#InternalServerException":
2139
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2140
- case "ResourceNotFoundException":
2141
- case "com.amazonaws.databrew#ResourceNotFoundException":
2142
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2143
- case "ValidationException":
2144
- case "com.amazonaws.databrew#ValidationException":
2145
- throw await de_ValidationExceptionRes(parsedOutput, context);
2146
- default:
2147
- const parsedBody = parsedOutput.body;
2148
- return throwDefaultError({
2149
- output,
2150
- parsedBody,
2151
- errorCode,
2152
- });
2153
- }
2154
- };
2155
- const de_UntagResourceCommand = async (output, context) => {
2156
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2157
- return de_UntagResourceCommandError(output, context);
2158
- }
2159
- const contents = (0, smithy_client_1.map)({
2160
- $metadata: deserializeMetadata(output),
2161
- });
2162
- await (0, smithy_client_1.collectBody)(output.body, context);
2163
- return contents;
2164
- };
2165
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
2166
- const de_UntagResourceCommandError = async (output, context) => {
2167
- const parsedOutput = {
2168
- ...output,
2169
- body: await parseErrorBody(output.body, context),
2170
- };
2171
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2172
- switch (errorCode) {
2173
- case "InternalServerException":
2174
- case "com.amazonaws.databrew#InternalServerException":
2175
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2176
- case "ResourceNotFoundException":
2177
- case "com.amazonaws.databrew#ResourceNotFoundException":
2178
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2179
- case "ValidationException":
2180
- case "com.amazonaws.databrew#ValidationException":
2181
- throw await de_ValidationExceptionRes(parsedOutput, context);
2182
- default:
2183
- const parsedBody = parsedOutput.body;
2184
- return throwDefaultError({
2185
- output,
2186
- parsedBody,
2187
- errorCode,
2188
- });
2189
- }
2190
- };
2191
- const de_UpdateDatasetCommand = async (output, context) => {
2192
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2193
- return de_UpdateDatasetCommandError(output, context);
2194
- }
2195
- const contents = (0, smithy_client_1.map)({
2196
- $metadata: deserializeMetadata(output),
2197
- });
2198
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2199
- const doc = (0, smithy_client_1.take)(data, {
2200
- Name: smithy_client_1.expectString,
2201
- });
2202
- Object.assign(contents, doc);
2203
- return contents;
2204
- };
2205
- exports.de_UpdateDatasetCommand = de_UpdateDatasetCommand;
2206
- const de_UpdateDatasetCommandError = async (output, context) => {
2207
- const parsedOutput = {
2208
- ...output,
2209
- body: await parseErrorBody(output.body, context),
2210
- };
2211
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2212
- switch (errorCode) {
2213
- case "AccessDeniedException":
2214
- case "com.amazonaws.databrew#AccessDeniedException":
2215
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2216
- case "ResourceNotFoundException":
2217
- case "com.amazonaws.databrew#ResourceNotFoundException":
2218
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2219
- case "ValidationException":
2220
- case "com.amazonaws.databrew#ValidationException":
2221
- throw await de_ValidationExceptionRes(parsedOutput, context);
2222
- default:
2223
- const parsedBody = parsedOutput.body;
2224
- return throwDefaultError({
2225
- output,
2226
- parsedBody,
2227
- errorCode,
2228
- });
2229
- }
2230
- };
2231
- const de_UpdateProfileJobCommand = async (output, context) => {
2232
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2233
- return de_UpdateProfileJobCommandError(output, context);
2234
- }
2235
- const contents = (0, smithy_client_1.map)({
2236
- $metadata: deserializeMetadata(output),
2237
- });
2238
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2239
- const doc = (0, smithy_client_1.take)(data, {
2240
- Name: smithy_client_1.expectString,
2241
- });
2242
- Object.assign(contents, doc);
2243
- return contents;
2244
- };
2245
- exports.de_UpdateProfileJobCommand = de_UpdateProfileJobCommand;
2246
- const de_UpdateProfileJobCommandError = async (output, context) => {
2247
- const parsedOutput = {
2248
- ...output,
2249
- body: await parseErrorBody(output.body, context),
2250
- };
2251
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2252
- switch (errorCode) {
2253
- case "AccessDeniedException":
2254
- case "com.amazonaws.databrew#AccessDeniedException":
2255
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2256
- case "ResourceNotFoundException":
2257
- case "com.amazonaws.databrew#ResourceNotFoundException":
2258
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2259
- case "ValidationException":
2260
- case "com.amazonaws.databrew#ValidationException":
2261
- throw await de_ValidationExceptionRes(parsedOutput, context);
2262
- default:
2263
- const parsedBody = parsedOutput.body;
2264
- return throwDefaultError({
2265
- output,
2266
- parsedBody,
2267
- errorCode,
2268
- });
2269
- }
2270
- };
2271
- const de_UpdateProjectCommand = async (output, context) => {
2272
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2273
- return de_UpdateProjectCommandError(output, context);
2274
- }
2275
- const contents = (0, smithy_client_1.map)({
2276
- $metadata: deserializeMetadata(output),
2277
- });
2278
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2279
- const doc = (0, smithy_client_1.take)(data, {
2280
- LastModifiedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2281
- Name: smithy_client_1.expectString,
2282
- });
2283
- Object.assign(contents, doc);
2284
- return contents;
2285
- };
2286
- exports.de_UpdateProjectCommand = de_UpdateProjectCommand;
2287
- const de_UpdateProjectCommandError = async (output, context) => {
2288
- const parsedOutput = {
2289
- ...output,
2290
- body: await parseErrorBody(output.body, context),
2291
- };
2292
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2293
- switch (errorCode) {
2294
- case "ResourceNotFoundException":
2295
- case "com.amazonaws.databrew#ResourceNotFoundException":
2296
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2297
- case "ValidationException":
2298
- case "com.amazonaws.databrew#ValidationException":
2299
- throw await de_ValidationExceptionRes(parsedOutput, context);
2300
- default:
2301
- const parsedBody = parsedOutput.body;
2302
- return throwDefaultError({
2303
- output,
2304
- parsedBody,
2305
- errorCode,
2306
- });
2307
- }
2308
- };
2309
- const de_UpdateRecipeCommand = async (output, context) => {
2310
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2311
- return de_UpdateRecipeCommandError(output, context);
2312
- }
2313
- const contents = (0, smithy_client_1.map)({
2314
- $metadata: deserializeMetadata(output),
2315
- });
2316
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2317
- const doc = (0, smithy_client_1.take)(data, {
2318
- Name: smithy_client_1.expectString,
2319
- });
2320
- Object.assign(contents, doc);
2321
- return contents;
2322
- };
2323
- exports.de_UpdateRecipeCommand = de_UpdateRecipeCommand;
2324
- const de_UpdateRecipeCommandError = async (output, context) => {
2325
- const parsedOutput = {
2326
- ...output,
2327
- body: await parseErrorBody(output.body, context),
2328
- };
2329
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2330
- switch (errorCode) {
2331
- case "ResourceNotFoundException":
2332
- case "com.amazonaws.databrew#ResourceNotFoundException":
2333
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2334
- case "ValidationException":
2335
- case "com.amazonaws.databrew#ValidationException":
2336
- throw await de_ValidationExceptionRes(parsedOutput, context);
2337
- default:
2338
- const parsedBody = parsedOutput.body;
2339
- return throwDefaultError({
2340
- output,
2341
- parsedBody,
2342
- errorCode,
2343
- });
2344
- }
2345
- };
2346
- const de_UpdateRecipeJobCommand = async (output, context) => {
2347
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2348
- return de_UpdateRecipeJobCommandError(output, context);
2349
- }
2350
- const contents = (0, smithy_client_1.map)({
2351
- $metadata: deserializeMetadata(output),
2352
- });
2353
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2354
- const doc = (0, smithy_client_1.take)(data, {
2355
- Name: smithy_client_1.expectString,
2356
- });
2357
- Object.assign(contents, doc);
2358
- return contents;
2359
- };
2360
- exports.de_UpdateRecipeJobCommand = de_UpdateRecipeJobCommand;
2361
- const de_UpdateRecipeJobCommandError = async (output, context) => {
2362
- const parsedOutput = {
2363
- ...output,
2364
- body: await parseErrorBody(output.body, context),
2365
- };
2366
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2367
- switch (errorCode) {
2368
- case "AccessDeniedException":
2369
- case "com.amazonaws.databrew#AccessDeniedException":
2370
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2371
- case "ResourceNotFoundException":
2372
- case "com.amazonaws.databrew#ResourceNotFoundException":
2373
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2374
- case "ValidationException":
2375
- case "com.amazonaws.databrew#ValidationException":
2376
- throw await de_ValidationExceptionRes(parsedOutput, context);
2377
- default:
2378
- const parsedBody = parsedOutput.body;
2379
- return throwDefaultError({
2380
- output,
2381
- parsedBody,
2382
- errorCode,
2383
- });
2384
- }
2385
- };
2386
- const de_UpdateRulesetCommand = async (output, context) => {
2387
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2388
- return de_UpdateRulesetCommandError(output, context);
2389
- }
2390
- const contents = (0, smithy_client_1.map)({
2391
- $metadata: deserializeMetadata(output),
2392
- });
2393
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2394
- const doc = (0, smithy_client_1.take)(data, {
2395
- Name: smithy_client_1.expectString,
2396
- });
2397
- Object.assign(contents, doc);
2398
- return contents;
2399
- };
2400
- exports.de_UpdateRulesetCommand = de_UpdateRulesetCommand;
2401
- const de_UpdateRulesetCommandError = async (output, context) => {
2402
- const parsedOutput = {
2403
- ...output,
2404
- body: await parseErrorBody(output.body, context),
2405
- };
2406
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2407
- switch (errorCode) {
2408
- case "ResourceNotFoundException":
2409
- case "com.amazonaws.databrew#ResourceNotFoundException":
2410
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2411
- case "ValidationException":
2412
- case "com.amazonaws.databrew#ValidationException":
2413
- throw await de_ValidationExceptionRes(parsedOutput, context);
2414
- default:
2415
- const parsedBody = parsedOutput.body;
2416
- return throwDefaultError({
2417
- output,
2418
- parsedBody,
2419
- errorCode,
2420
- });
2421
- }
2422
- };
2423
- const de_UpdateScheduleCommand = async (output, context) => {
2424
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2425
- return de_UpdateScheduleCommandError(output, context);
2426
- }
2427
- const contents = (0, smithy_client_1.map)({
2428
- $metadata: deserializeMetadata(output),
2429
- });
2430
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2431
- const doc = (0, smithy_client_1.take)(data, {
2432
- Name: smithy_client_1.expectString,
2433
- });
2434
- Object.assign(contents, doc);
2435
- return contents;
2436
- };
2437
- exports.de_UpdateScheduleCommand = de_UpdateScheduleCommand;
2438
- const de_UpdateScheduleCommandError = async (output, context) => {
2439
- const parsedOutput = {
2440
- ...output,
2441
- body: await parseErrorBody(output.body, context),
2442
- };
2443
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2444
- switch (errorCode) {
2445
- case "ResourceNotFoundException":
2446
- case "com.amazonaws.databrew#ResourceNotFoundException":
2447
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2448
- case "ServiceQuotaExceededException":
2449
- case "com.amazonaws.databrew#ServiceQuotaExceededException":
2450
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2451
- case "ValidationException":
2452
- case "com.amazonaws.databrew#ValidationException":
2453
- throw await de_ValidationExceptionRes(parsedOutput, context);
2454
- default:
2455
- const parsedBody = parsedOutput.body;
2456
- return throwDefaultError({
2457
- output,
2458
- parsedBody,
2459
- errorCode,
2460
- });
2461
- }
2462
- };
2463
- const throwDefaultError = (0, smithy_client_1.withBaseException)(DataBrewServiceException_1.DataBrewServiceException);
2464
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2465
- const contents = (0, smithy_client_1.map)({});
2466
- const data = parsedOutput.body;
2467
- const doc = (0, smithy_client_1.take)(data, {
2468
- Message: smithy_client_1.expectString,
2469
- });
2470
- Object.assign(contents, doc);
2471
- const exception = new models_0_1.AccessDeniedException({
2472
- $metadata: deserializeMetadata(parsedOutput),
2473
- ...contents,
2474
- });
2475
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2476
- };
2477
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
2478
- const contents = (0, smithy_client_1.map)({});
2479
- const data = parsedOutput.body;
2480
- const doc = (0, smithy_client_1.take)(data, {
2481
- Message: smithy_client_1.expectString,
2482
- });
2483
- Object.assign(contents, doc);
2484
- const exception = new models_0_1.ConflictException({
2485
- $metadata: deserializeMetadata(parsedOutput),
2486
- ...contents,
2487
- });
2488
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2489
- };
2490
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2491
- const contents = (0, smithy_client_1.map)({});
2492
- const data = parsedOutput.body;
2493
- const doc = (0, smithy_client_1.take)(data, {
2494
- Message: smithy_client_1.expectString,
2495
- });
2496
- Object.assign(contents, doc);
2497
- const exception = new models_0_1.InternalServerException({
2498
- $metadata: deserializeMetadata(parsedOutput),
2499
- ...contents,
2500
- });
2501
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2502
- };
2503
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2504
- const contents = (0, smithy_client_1.map)({});
2505
- const data = parsedOutput.body;
2506
- const doc = (0, smithy_client_1.take)(data, {
2507
- Message: smithy_client_1.expectString,
2508
- });
2509
- Object.assign(contents, doc);
2510
- const exception = new models_0_1.ResourceNotFoundException({
2511
- $metadata: deserializeMetadata(parsedOutput),
2512
- ...contents,
2513
- });
2514
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2515
- };
2516
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
2517
- const contents = (0, smithy_client_1.map)({});
2518
- const data = parsedOutput.body;
2519
- const doc = (0, smithy_client_1.take)(data, {
2520
- Message: smithy_client_1.expectString,
2521
- });
2522
- Object.assign(contents, doc);
2523
- const exception = new models_0_1.ServiceQuotaExceededException({
2524
- $metadata: deserializeMetadata(parsedOutput),
2525
- ...contents,
2526
- });
2527
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2528
- };
2529
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
2530
- const contents = (0, smithy_client_1.map)({});
2531
- const data = parsedOutput.body;
2532
- const doc = (0, smithy_client_1.take)(data, {
2533
- Message: smithy_client_1.expectString,
2534
- });
2535
- Object.assign(contents, doc);
2536
- const exception = new models_0_1.ValidationException({
2537
- $metadata: deserializeMetadata(parsedOutput),
2538
- ...contents,
2539
- });
2540
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2541
- };
2542
- const se_Rule = (input, context) => {
2543
- return (0, smithy_client_1.take)(input, {
2544
- CheckExpression: [],
2545
- ColumnSelectors: smithy_client_1._json,
2546
- Disabled: [],
2547
- Name: [],
2548
- SubstitutionMap: smithy_client_1._json,
2549
- Threshold: (_) => se_Threshold(_, context),
2550
- });
2551
- };
2552
- const se_RuleList = (input, context) => {
2553
- return input
2554
- .filter((e) => e != null)
2555
- .map((entry) => {
2556
- return se_Rule(entry, context);
2557
- });
2558
- };
2559
- const se_Threshold = (input, context) => {
2560
- return (0, smithy_client_1.take)(input, {
2561
- Type: [],
2562
- Unit: [],
2563
- Value: smithy_client_1.serializeFloat,
2564
- });
2565
- };
2566
- const de_Dataset = (output, context) => {
2567
- return (0, smithy_client_1.take)(output, {
2568
- AccountId: smithy_client_1.expectString,
2569
- CreateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2570
- CreatedBy: smithy_client_1.expectString,
2571
- Format: smithy_client_1.expectString,
2572
- FormatOptions: smithy_client_1._json,
2573
- Input: smithy_client_1._json,
2574
- LastModifiedBy: smithy_client_1.expectString,
2575
- LastModifiedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2576
- Name: smithy_client_1.expectString,
2577
- PathOptions: smithy_client_1._json,
2578
- ResourceArn: smithy_client_1.expectString,
2579
- Source: smithy_client_1.expectString,
2580
- Tags: smithy_client_1._json,
2581
- });
2582
- };
2583
- const de_DatasetList = (output, context) => {
2584
- const retVal = (output || [])
2585
- .filter((e) => e != null)
2586
- .map((entry) => {
2587
- return de_Dataset(entry, context);
2588
- });
2589
- return retVal;
2590
- };
2591
- const de_Job = (output, context) => {
2592
- return (0, smithy_client_1.take)(output, {
2593
- AccountId: smithy_client_1.expectString,
2594
- CreateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2595
- CreatedBy: smithy_client_1.expectString,
2596
- DataCatalogOutputs: smithy_client_1._json,
2597
- DatabaseOutputs: smithy_client_1._json,
2598
- DatasetName: smithy_client_1.expectString,
2599
- EncryptionKeyArn: smithy_client_1.expectString,
2600
- EncryptionMode: smithy_client_1.expectString,
2601
- JobSample: smithy_client_1._json,
2602
- LastModifiedBy: smithy_client_1.expectString,
2603
- LastModifiedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2604
- LogSubscription: smithy_client_1.expectString,
2605
- MaxCapacity: smithy_client_1.expectInt32,
2606
- MaxRetries: smithy_client_1.expectInt32,
2607
- Name: smithy_client_1.expectString,
2608
- Outputs: smithy_client_1._json,
2609
- ProjectName: smithy_client_1.expectString,
2610
- RecipeReference: smithy_client_1._json,
2611
- ResourceArn: smithy_client_1.expectString,
2612
- RoleArn: smithy_client_1.expectString,
2613
- Tags: smithy_client_1._json,
2614
- Timeout: smithy_client_1.expectInt32,
2615
- Type: smithy_client_1.expectString,
2616
- ValidationConfigurations: smithy_client_1._json,
2617
- });
2618
- };
2619
- const de_JobList = (output, context) => {
2620
- const retVal = (output || [])
2621
- .filter((e) => e != null)
2622
- .map((entry) => {
2623
- return de_Job(entry, context);
2624
- });
2625
- return retVal;
2626
- };
2627
- const de_JobRun = (output, context) => {
2628
- return (0, smithy_client_1.take)(output, {
2629
- Attempt: smithy_client_1.expectInt32,
2630
- CompletedOn: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2631
- DataCatalogOutputs: smithy_client_1._json,
2632
- DatabaseOutputs: smithy_client_1._json,
2633
- DatasetName: smithy_client_1.expectString,
2634
- ErrorMessage: smithy_client_1.expectString,
2635
- ExecutionTime: smithy_client_1.expectInt32,
2636
- JobName: smithy_client_1.expectString,
2637
- JobSample: smithy_client_1._json,
2638
- LogGroupName: smithy_client_1.expectString,
2639
- LogSubscription: smithy_client_1.expectString,
2640
- Outputs: smithy_client_1._json,
2641
- RecipeReference: smithy_client_1._json,
2642
- RunId: smithy_client_1.expectString,
2643
- StartedBy: smithy_client_1.expectString,
2644
- StartedOn: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2645
- State: smithy_client_1.expectString,
2646
- ValidationConfigurations: smithy_client_1._json,
2647
- });
2648
- };
2649
- const de_JobRunList = (output, context) => {
2650
- const retVal = (output || [])
2651
- .filter((e) => e != null)
2652
- .map((entry) => {
2653
- return de_JobRun(entry, context);
2654
- });
2655
- return retVal;
2656
- };
2657
- const de_Project = (output, context) => {
2658
- return (0, smithy_client_1.take)(output, {
2659
- AccountId: smithy_client_1.expectString,
2660
- CreateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2661
- CreatedBy: smithy_client_1.expectString,
2662
- DatasetName: smithy_client_1.expectString,
2663
- LastModifiedBy: smithy_client_1.expectString,
2664
- LastModifiedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2665
- Name: smithy_client_1.expectString,
2666
- OpenDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2667
- OpenedBy: smithy_client_1.expectString,
2668
- RecipeName: smithy_client_1.expectString,
2669
- ResourceArn: smithy_client_1.expectString,
2670
- RoleArn: smithy_client_1.expectString,
2671
- Sample: smithy_client_1._json,
2672
- Tags: smithy_client_1._json,
2673
- });
2674
- };
2675
- const de_ProjectList = (output, context) => {
2676
- const retVal = (output || [])
2677
- .filter((e) => e != null)
2678
- .map((entry) => {
2679
- return de_Project(entry, context);
2680
- });
2681
- return retVal;
2682
- };
2683
- const de_Recipe = (output, context) => {
2684
- return (0, smithy_client_1.take)(output, {
2685
- CreateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2686
- CreatedBy: smithy_client_1.expectString,
2687
- Description: smithy_client_1.expectString,
2688
- LastModifiedBy: smithy_client_1.expectString,
2689
- LastModifiedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2690
- Name: smithy_client_1.expectString,
2691
- ProjectName: smithy_client_1.expectString,
2692
- PublishedBy: smithy_client_1.expectString,
2693
- PublishedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2694
- RecipeVersion: smithy_client_1.expectString,
2695
- ResourceArn: smithy_client_1.expectString,
2696
- Steps: smithy_client_1._json,
2697
- Tags: smithy_client_1._json,
2698
- });
2699
- };
2700
- const de_RecipeList = (output, context) => {
2701
- const retVal = (output || [])
2702
- .filter((e) => e != null)
2703
- .map((entry) => {
2704
- return de_Recipe(entry, context);
2705
- });
2706
- return retVal;
2707
- };
2708
- const de_Rule = (output, context) => {
2709
- return (0, smithy_client_1.take)(output, {
2710
- CheckExpression: smithy_client_1.expectString,
2711
- ColumnSelectors: smithy_client_1._json,
2712
- Disabled: smithy_client_1.expectBoolean,
2713
- Name: smithy_client_1.expectString,
2714
- SubstitutionMap: smithy_client_1._json,
2715
- Threshold: (_) => de_Threshold(_, context),
2716
- });
2717
- };
2718
- const de_RuleList = (output, context) => {
2719
- const retVal = (output || [])
2720
- .filter((e) => e != null)
2721
- .map((entry) => {
2722
- return de_Rule(entry, context);
2723
- });
2724
- return retVal;
2725
- };
2726
- const de_RulesetItem = (output, context) => {
2727
- return (0, smithy_client_1.take)(output, {
2728
- AccountId: smithy_client_1.expectString,
2729
- CreateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2730
- CreatedBy: smithy_client_1.expectString,
2731
- Description: smithy_client_1.expectString,
2732
- LastModifiedBy: smithy_client_1.expectString,
2733
- LastModifiedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2734
- Name: smithy_client_1.expectString,
2735
- ResourceArn: smithy_client_1.expectString,
2736
- RuleCount: smithy_client_1.expectInt32,
2737
- Tags: smithy_client_1._json,
2738
- TargetArn: smithy_client_1.expectString,
2739
- });
2740
- };
2741
- const de_RulesetItemList = (output, context) => {
2742
- const retVal = (output || [])
2743
- .filter((e) => e != null)
2744
- .map((entry) => {
2745
- return de_RulesetItem(entry, context);
2746
- });
2747
- return retVal;
2748
- };
2749
- const de_Schedule = (output, context) => {
2750
- return (0, smithy_client_1.take)(output, {
2751
- AccountId: smithy_client_1.expectString,
2752
- CreateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2753
- CreatedBy: smithy_client_1.expectString,
2754
- CronExpression: smithy_client_1.expectString,
2755
- JobNames: smithy_client_1._json,
2756
- LastModifiedBy: smithy_client_1.expectString,
2757
- LastModifiedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2758
- Name: smithy_client_1.expectString,
2759
- ResourceArn: smithy_client_1.expectString,
2760
- Tags: smithy_client_1._json,
2761
- });
2762
- };
2763
- const de_ScheduleList = (output, context) => {
2764
- const retVal = (output || [])
2765
- .filter((e) => e != null)
2766
- .map((entry) => {
2767
- return de_Schedule(entry, context);
2768
- });
2769
- return retVal;
2770
- };
2771
- const de_Threshold = (output, context) => {
2772
- return (0, smithy_client_1.take)(output, {
2773
- Type: smithy_client_1.expectString,
2774
- Unit: smithy_client_1.expectString,
2775
- Value: smithy_client_1.limitedParseDouble,
2776
- });
2777
- };
2778
- const deserializeMetadata = (output) => ({
2779
- httpStatusCode: output.statusCode,
2780
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
2781
- extendedRequestId: output.headers["x-amz-id-2"],
2782
- cfId: output.headers["x-amz-cf-id"],
2783
- });
2784
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
2785
- const isSerializableHeaderValue = (value) => value !== undefined &&
2786
- value !== null &&
2787
- value !== "" &&
2788
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2789
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2790
- const _DN = "DatasetName";
2791
- const _JN = "JobName";
2792
- const _MR = "MaxResults";
2793
- const _N = "Name";
2794
- const _NT = "NextToken";
2795
- const _PN = "ProjectName";
2796
- const _RV = "RecipeVersion";
2797
- const _TA = "TargetArn";
2798
- const _TK = "TagKeys";
2799
- const _dN = "datasetName";
2800
- const _jN = "jobName";
2801
- const _mR = "maxResults";
2802
- const _n = "name";
2803
- const _nT = "nextToken";
2804
- const _pN = "projectName";
2805
- const _rV = "recipeVersion";
2806
- const _tA = "targetArn";
2807
- const _tK = "tagKeys";
2808
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2809
- if (encoded.length) {
2810
- return JSON.parse(encoded);
2811
- }
2812
- return {};
2813
- });
2814
- const parseErrorBody = async (errorBody, context) => {
2815
- const value = await parseBody(errorBody, context);
2816
- value.message = value.message ?? value.Message;
2817
- return value;
2818
- };
2819
- const loadRestJsonErrorCode = (output, data) => {
2820
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2821
- const sanitizeErrorCode = (rawValue) => {
2822
- let cleanValue = rawValue;
2823
- if (typeof cleanValue === "number") {
2824
- cleanValue = cleanValue.toString();
2825
- }
2826
- if (cleanValue.indexOf(",") >= 0) {
2827
- cleanValue = cleanValue.split(",")[0];
2828
- }
2829
- if (cleanValue.indexOf(":") >= 0) {
2830
- cleanValue = cleanValue.split(":")[0];
2831
- }
2832
- if (cleanValue.indexOf("#") >= 0) {
2833
- cleanValue = cleanValue.split("#")[1];
2834
- }
2835
- return cleanValue;
2836
- };
2837
- const headerKey = findKey(output.headers, "x-amzn-errortype");
2838
- if (headerKey !== undefined) {
2839
- return sanitizeErrorCode(output.headers[headerKey]);
2840
- }
2841
- if (data.code !== undefined) {
2842
- return sanitizeErrorCode(data.code);
2843
- }
2844
- if (data["__type"] !== undefined) {
2845
- return sanitizeErrorCode(data["__type"]);
2846
- }
2847
- };
1
+ module.exports = require("../index.js");