@aws-sdk/client-migrationhuborchestrator 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 (49) hide show
  1. package/dist-cjs/MigrationHubOrchestrator.js +1 -67
  2. package/dist-cjs/MigrationHubOrchestratorClient.js +1 -43
  3. package/dist-cjs/commands/CreateWorkflowCommand.js +1 -29
  4. package/dist-cjs/commands/CreateWorkflowStepCommand.js +1 -28
  5. package/dist-cjs/commands/CreateWorkflowStepGroupCommand.js +1 -28
  6. package/dist-cjs/commands/DeleteWorkflowCommand.js +1 -28
  7. package/dist-cjs/commands/DeleteWorkflowStepCommand.js +1 -28
  8. package/dist-cjs/commands/DeleteWorkflowStepGroupCommand.js +1 -28
  9. package/dist-cjs/commands/GetTemplateCommand.js +1 -28
  10. package/dist-cjs/commands/GetTemplateStepCommand.js +1 -28
  11. package/dist-cjs/commands/GetTemplateStepGroupCommand.js +1 -28
  12. package/dist-cjs/commands/GetWorkflowCommand.js +1 -29
  13. package/dist-cjs/commands/GetWorkflowStepCommand.js +1 -28
  14. package/dist-cjs/commands/GetWorkflowStepGroupCommand.js +1 -28
  15. package/dist-cjs/commands/ListPluginsCommand.js +1 -28
  16. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
  17. package/dist-cjs/commands/ListTemplateStepGroupsCommand.js +1 -28
  18. package/dist-cjs/commands/ListTemplateStepsCommand.js +1 -28
  19. package/dist-cjs/commands/ListTemplatesCommand.js +1 -28
  20. package/dist-cjs/commands/ListWorkflowStepGroupsCommand.js +1 -28
  21. package/dist-cjs/commands/ListWorkflowStepsCommand.js +1 -28
  22. package/dist-cjs/commands/ListWorkflowsCommand.js +1 -28
  23. package/dist-cjs/commands/RetryWorkflowStepCommand.js +1 -28
  24. package/dist-cjs/commands/StartWorkflowCommand.js +1 -28
  25. package/dist-cjs/commands/StopWorkflowCommand.js +1 -28
  26. package/dist-cjs/commands/TagResourceCommand.js +1 -28
  27. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  28. package/dist-cjs/commands/UpdateWorkflowCommand.js +1 -29
  29. package/dist-cjs/commands/UpdateWorkflowStepCommand.js +1 -28
  30. package/dist-cjs/commands/UpdateWorkflowStepGroupCommand.js +1 -28
  31. package/dist-cjs/commands/index.js +1 -31
  32. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  33. package/dist-cjs/extensionConfiguration.js +1 -2
  34. package/dist-cjs/index.js +2857 -11
  35. package/dist-cjs/models/MigrationHubOrchestratorServiceException.js +1 -12
  36. package/dist-cjs/models/index.js +1 -4
  37. package/dist-cjs/models/models_0.js +1 -188
  38. package/dist-cjs/pagination/Interfaces.js +1 -2
  39. package/dist-cjs/pagination/ListPluginsPaginator.js +1 -7
  40. package/dist-cjs/pagination/ListTemplateStepGroupsPaginator.js +1 -7
  41. package/dist-cjs/pagination/ListTemplateStepsPaginator.js +1 -7
  42. package/dist-cjs/pagination/ListTemplatesPaginator.js +1 -7
  43. package/dist-cjs/pagination/ListWorkflowStepGroupsPaginator.js +1 -7
  44. package/dist-cjs/pagination/ListWorkflowStepsPaginator.js +1 -7
  45. package/dist-cjs/pagination/ListWorkflowsPaginator.js +1 -7
  46. package/dist-cjs/pagination/index.js +1 -11
  47. package/dist-cjs/protocols/Aws_restJson1.js +1 -1910
  48. package/dist-cjs/runtimeExtensions.js +1 -22
  49. package/package.json +40 -40
@@ -1,1910 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_StartWorkflowCommand = exports.de_RetryWorkflowStepCommand = exports.de_ListWorkflowStepsCommand = exports.de_ListWorkflowStepGroupsCommand = exports.de_ListWorkflowsCommand = exports.de_ListTemplateStepsCommand = exports.de_ListTemplateStepGroupsCommand = exports.de_ListTemplatesCommand = exports.de_ListTagsForResourceCommand = exports.de_ListPluginsCommand = exports.de_GetWorkflowStepGroupCommand = exports.de_GetWorkflowStepCommand = exports.de_GetWorkflowCommand = exports.de_GetTemplateStepGroupCommand = exports.de_GetTemplateStepCommand = exports.de_GetTemplateCommand = exports.de_DeleteWorkflowStepGroupCommand = exports.de_DeleteWorkflowStepCommand = exports.de_DeleteWorkflowCommand = exports.de_CreateWorkflowStepGroupCommand = exports.de_CreateWorkflowStepCommand = exports.de_CreateWorkflowCommand = exports.se_UpdateWorkflowStepGroupCommand = exports.se_UpdateWorkflowStepCommand = exports.se_UpdateWorkflowCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopWorkflowCommand = exports.se_StartWorkflowCommand = exports.se_RetryWorkflowStepCommand = exports.se_ListWorkflowStepsCommand = exports.se_ListWorkflowStepGroupsCommand = exports.se_ListWorkflowsCommand = exports.se_ListTemplateStepsCommand = exports.se_ListTemplateStepGroupsCommand = exports.se_ListTemplatesCommand = exports.se_ListTagsForResourceCommand = exports.se_ListPluginsCommand = exports.se_GetWorkflowStepGroupCommand = exports.se_GetWorkflowStepCommand = exports.se_GetWorkflowCommand = exports.se_GetTemplateStepGroupCommand = exports.se_GetTemplateStepCommand = exports.se_GetTemplateCommand = exports.se_DeleteWorkflowStepGroupCommand = exports.se_DeleteWorkflowStepCommand = exports.se_DeleteWorkflowCommand = exports.se_CreateWorkflowStepGroupCommand = exports.se_CreateWorkflowStepCommand = exports.se_CreateWorkflowCommand = void 0;
4
- exports.de_UpdateWorkflowStepGroupCommand = exports.de_UpdateWorkflowStepCommand = exports.de_UpdateWorkflowCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopWorkflowCommand = void 0;
5
- const core_1 = require("@smithy/core");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- const MigrationHubOrchestratorServiceException_1 = require("../models/MigrationHubOrchestratorServiceException");
8
- const models_0_1 = require("../models/models_0");
9
- const se_CreateWorkflowCommand = async (input, context) => {
10
- const b = (0, core_1.requestBuilder)(input, context);
11
- const headers = {
12
- "content-type": "application/json",
13
- };
14
- b.bp("/migrationworkflow");
15
- let body;
16
- body = JSON.stringify((0, smithy_client_1.take)(input, {
17
- applicationConfigurationId: [],
18
- description: [],
19
- inputParameters: (_) => (0, smithy_client_1._json)(_),
20
- name: [],
21
- stepTargets: (_) => (0, smithy_client_1._json)(_),
22
- tags: (_) => (0, smithy_client_1._json)(_),
23
- templateId: [],
24
- }));
25
- b.m("POST").h(headers).b(body);
26
- return b.build();
27
- };
28
- exports.se_CreateWorkflowCommand = se_CreateWorkflowCommand;
29
- const se_CreateWorkflowStepCommand = async (input, context) => {
30
- const b = (0, core_1.requestBuilder)(input, context);
31
- const headers = {
32
- "content-type": "application/json",
33
- };
34
- b.bp("/workflowstep");
35
- let body;
36
- body = JSON.stringify((0, smithy_client_1.take)(input, {
37
- description: [],
38
- name: [],
39
- next: (_) => (0, smithy_client_1._json)(_),
40
- outputs: (_) => (0, smithy_client_1._json)(_),
41
- previous: (_) => (0, smithy_client_1._json)(_),
42
- stepActionType: [],
43
- stepGroupId: [],
44
- stepTarget: (_) => (0, smithy_client_1._json)(_),
45
- workflowId: [],
46
- workflowStepAutomationConfiguration: (_) => (0, smithy_client_1._json)(_),
47
- }));
48
- b.m("POST").h(headers).b(body);
49
- return b.build();
50
- };
51
- exports.se_CreateWorkflowStepCommand = se_CreateWorkflowStepCommand;
52
- const se_CreateWorkflowStepGroupCommand = async (input, context) => {
53
- const b = (0, core_1.requestBuilder)(input, context);
54
- const headers = {
55
- "content-type": "application/json",
56
- };
57
- b.bp("/workflowstepgroups");
58
- let body;
59
- body = JSON.stringify((0, smithy_client_1.take)(input, {
60
- description: [],
61
- name: [],
62
- next: (_) => (0, smithy_client_1._json)(_),
63
- previous: (_) => (0, smithy_client_1._json)(_),
64
- workflowId: [],
65
- }));
66
- b.m("POST").h(headers).b(body);
67
- return b.build();
68
- };
69
- exports.se_CreateWorkflowStepGroupCommand = se_CreateWorkflowStepGroupCommand;
70
- const se_DeleteWorkflowCommand = async (input, context) => {
71
- const b = (0, core_1.requestBuilder)(input, context);
72
- const headers = {};
73
- b.bp("/migrationworkflow/{id}");
74
- b.p("id", () => input.id, "{id}", false);
75
- let body;
76
- b.m("DELETE").h(headers).b(body);
77
- return b.build();
78
- };
79
- exports.se_DeleteWorkflowCommand = se_DeleteWorkflowCommand;
80
- const se_DeleteWorkflowStepCommand = async (input, context) => {
81
- const b = (0, core_1.requestBuilder)(input, context);
82
- const headers = {};
83
- b.bp("/workflowstep/{id}");
84
- b.p("id", () => input.id, "{id}", false);
85
- const query = (0, smithy_client_1.map)({
86
- [_sGI]: [, (0, smithy_client_1.expectNonNull)(input[_sGI], `stepGroupId`)],
87
- [_wI]: [, (0, smithy_client_1.expectNonNull)(input[_wI], `workflowId`)],
88
- });
89
- let body;
90
- b.m("DELETE").h(headers).q(query).b(body);
91
- return b.build();
92
- };
93
- exports.se_DeleteWorkflowStepCommand = se_DeleteWorkflowStepCommand;
94
- const se_DeleteWorkflowStepGroupCommand = async (input, context) => {
95
- const b = (0, core_1.requestBuilder)(input, context);
96
- const headers = {};
97
- b.bp("/workflowstepgroup/{id}");
98
- b.p("id", () => input.id, "{id}", false);
99
- const query = (0, smithy_client_1.map)({
100
- [_wI]: [, (0, smithy_client_1.expectNonNull)(input[_wI], `workflowId`)],
101
- });
102
- let body;
103
- b.m("DELETE").h(headers).q(query).b(body);
104
- return b.build();
105
- };
106
- exports.se_DeleteWorkflowStepGroupCommand = se_DeleteWorkflowStepGroupCommand;
107
- const se_GetTemplateCommand = async (input, context) => {
108
- const b = (0, core_1.requestBuilder)(input, context);
109
- const headers = {};
110
- b.bp("/migrationworkflowtemplate/{id}");
111
- b.p("id", () => input.id, "{id}", false);
112
- let body;
113
- b.m("GET").h(headers).b(body);
114
- return b.build();
115
- };
116
- exports.se_GetTemplateCommand = se_GetTemplateCommand;
117
- const se_GetTemplateStepCommand = async (input, context) => {
118
- const b = (0, core_1.requestBuilder)(input, context);
119
- const headers = {};
120
- b.bp("/templatestep/{id}");
121
- b.p("id", () => input.id, "{id}", false);
122
- const query = (0, smithy_client_1.map)({
123
- [_tI]: [, (0, smithy_client_1.expectNonNull)(input[_tI], `templateId`)],
124
- [_sGI]: [, (0, smithy_client_1.expectNonNull)(input[_sGI], `stepGroupId`)],
125
- });
126
- let body;
127
- b.m("GET").h(headers).q(query).b(body);
128
- return b.build();
129
- };
130
- exports.se_GetTemplateStepCommand = se_GetTemplateStepCommand;
131
- const se_GetTemplateStepGroupCommand = async (input, context) => {
132
- const b = (0, core_1.requestBuilder)(input, context);
133
- const headers = {};
134
- b.bp("/templates/{templateId}/stepgroups/{id}");
135
- b.p("templateId", () => input.templateId, "{templateId}", false);
136
- b.p("id", () => input.id, "{id}", false);
137
- let body;
138
- b.m("GET").h(headers).b(body);
139
- return b.build();
140
- };
141
- exports.se_GetTemplateStepGroupCommand = se_GetTemplateStepGroupCommand;
142
- const se_GetWorkflowCommand = async (input, context) => {
143
- const b = (0, core_1.requestBuilder)(input, context);
144
- const headers = {};
145
- b.bp("/migrationworkflow/{id}");
146
- b.p("id", () => input.id, "{id}", false);
147
- let body;
148
- b.m("GET").h(headers).b(body);
149
- return b.build();
150
- };
151
- exports.se_GetWorkflowCommand = se_GetWorkflowCommand;
152
- const se_GetWorkflowStepCommand = async (input, context) => {
153
- const b = (0, core_1.requestBuilder)(input, context);
154
- const headers = {};
155
- b.bp("/workflowstep/{id}");
156
- b.p("id", () => input.id, "{id}", false);
157
- const query = (0, smithy_client_1.map)({
158
- [_wI]: [, (0, smithy_client_1.expectNonNull)(input[_wI], `workflowId`)],
159
- [_sGI]: [, (0, smithy_client_1.expectNonNull)(input[_sGI], `stepGroupId`)],
160
- });
161
- let body;
162
- b.m("GET").h(headers).q(query).b(body);
163
- return b.build();
164
- };
165
- exports.se_GetWorkflowStepCommand = se_GetWorkflowStepCommand;
166
- const se_GetWorkflowStepGroupCommand = async (input, context) => {
167
- const b = (0, core_1.requestBuilder)(input, context);
168
- const headers = {};
169
- b.bp("/workflowstepgroup/{id}");
170
- b.p("id", () => input.id, "{id}", false);
171
- const query = (0, smithy_client_1.map)({
172
- [_wI]: [, (0, smithy_client_1.expectNonNull)(input[_wI], `workflowId`)],
173
- });
174
- let body;
175
- b.m("GET").h(headers).q(query).b(body);
176
- return b.build();
177
- };
178
- exports.se_GetWorkflowStepGroupCommand = se_GetWorkflowStepGroupCommand;
179
- const se_ListPluginsCommand = async (input, context) => {
180
- const b = (0, core_1.requestBuilder)(input, context);
181
- const headers = {};
182
- b.bp("/plugins");
183
- const query = (0, smithy_client_1.map)({
184
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
185
- [_nT]: [, input[_nT]],
186
- });
187
- let body;
188
- b.m("GET").h(headers).q(query).b(body);
189
- return b.build();
190
- };
191
- exports.se_ListPluginsCommand = se_ListPluginsCommand;
192
- const se_ListTagsForResourceCommand = async (input, context) => {
193
- const b = (0, core_1.requestBuilder)(input, context);
194
- const headers = {};
195
- b.bp("/tags/{resourceArn}");
196
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
197
- let body;
198
- b.m("GET").h(headers).b(body);
199
- return b.build();
200
- };
201
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
202
- const se_ListTemplatesCommand = async (input, context) => {
203
- const b = (0, core_1.requestBuilder)(input, context);
204
- const headers = {};
205
- b.bp("/migrationworkflowtemplates");
206
- const query = (0, smithy_client_1.map)({
207
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
208
- [_nT]: [, input[_nT]],
209
- [_n]: [, input[_n]],
210
- });
211
- let body;
212
- b.m("GET").h(headers).q(query).b(body);
213
- return b.build();
214
- };
215
- exports.se_ListTemplatesCommand = se_ListTemplatesCommand;
216
- const se_ListTemplateStepGroupsCommand = async (input, context) => {
217
- const b = (0, core_1.requestBuilder)(input, context);
218
- const headers = {};
219
- b.bp("/templatestepgroups/{templateId}");
220
- b.p("templateId", () => input.templateId, "{templateId}", false);
221
- const query = (0, smithy_client_1.map)({
222
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
223
- [_nT]: [, input[_nT]],
224
- });
225
- let body;
226
- b.m("GET").h(headers).q(query).b(body);
227
- return b.build();
228
- };
229
- exports.se_ListTemplateStepGroupsCommand = se_ListTemplateStepGroupsCommand;
230
- const se_ListTemplateStepsCommand = async (input, context) => {
231
- const b = (0, core_1.requestBuilder)(input, context);
232
- const headers = {};
233
- b.bp("/templatesteps");
234
- const query = (0, smithy_client_1.map)({
235
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
236
- [_nT]: [, input[_nT]],
237
- [_tI]: [, (0, smithy_client_1.expectNonNull)(input[_tI], `templateId`)],
238
- [_sGI]: [, (0, smithy_client_1.expectNonNull)(input[_sGI], `stepGroupId`)],
239
- });
240
- let body;
241
- b.m("GET").h(headers).q(query).b(body);
242
- return b.build();
243
- };
244
- exports.se_ListTemplateStepsCommand = se_ListTemplateStepsCommand;
245
- const se_ListWorkflowsCommand = async (input, context) => {
246
- const b = (0, core_1.requestBuilder)(input, context);
247
- const headers = {};
248
- b.bp("/migrationworkflows");
249
- const query = (0, smithy_client_1.map)({
250
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
251
- [_nT]: [, input[_nT]],
252
- [_tI]: [, input[_tI]],
253
- [_aACN]: [, input[_aACN]],
254
- [_s]: [, input[_s]],
255
- [_n]: [, input[_n]],
256
- });
257
- let body;
258
- b.m("GET").h(headers).q(query).b(body);
259
- return b.build();
260
- };
261
- exports.se_ListWorkflowsCommand = se_ListWorkflowsCommand;
262
- const se_ListWorkflowStepGroupsCommand = async (input, context) => {
263
- const b = (0, core_1.requestBuilder)(input, context);
264
- const headers = {};
265
- b.bp("/workflowstepgroups");
266
- const query = (0, smithy_client_1.map)({
267
- [_nT]: [, input[_nT]],
268
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
269
- [_wI]: [, (0, smithy_client_1.expectNonNull)(input[_wI], `workflowId`)],
270
- });
271
- let body;
272
- b.m("GET").h(headers).q(query).b(body);
273
- return b.build();
274
- };
275
- exports.se_ListWorkflowStepGroupsCommand = se_ListWorkflowStepGroupsCommand;
276
- const se_ListWorkflowStepsCommand = async (input, context) => {
277
- const b = (0, core_1.requestBuilder)(input, context);
278
- const headers = {};
279
- b.bp("/workflow/{workflowId}/workflowstepgroups/{stepGroupId}/workflowsteps");
280
- b.p("workflowId", () => input.workflowId, "{workflowId}", false);
281
- b.p("stepGroupId", () => input.stepGroupId, "{stepGroupId}", false);
282
- const query = (0, smithy_client_1.map)({
283
- [_nT]: [, input[_nT]],
284
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
285
- });
286
- let body;
287
- b.m("GET").h(headers).q(query).b(body);
288
- return b.build();
289
- };
290
- exports.se_ListWorkflowStepsCommand = se_ListWorkflowStepsCommand;
291
- const se_RetryWorkflowStepCommand = async (input, context) => {
292
- const b = (0, core_1.requestBuilder)(input, context);
293
- const headers = {};
294
- b.bp("/retryworkflowstep/{id}");
295
- b.p("id", () => input.id, "{id}", false);
296
- const query = (0, smithy_client_1.map)({
297
- [_wI]: [, (0, smithy_client_1.expectNonNull)(input[_wI], `workflowId`)],
298
- [_sGI]: [, (0, smithy_client_1.expectNonNull)(input[_sGI], `stepGroupId`)],
299
- });
300
- let body;
301
- b.m("POST").h(headers).q(query).b(body);
302
- return b.build();
303
- };
304
- exports.se_RetryWorkflowStepCommand = se_RetryWorkflowStepCommand;
305
- const se_StartWorkflowCommand = async (input, context) => {
306
- const b = (0, core_1.requestBuilder)(input, context);
307
- const headers = {};
308
- b.bp("/migrationworkflow/{id}/start");
309
- b.p("id", () => input.id, "{id}", false);
310
- let body;
311
- b.m("POST").h(headers).b(body);
312
- return b.build();
313
- };
314
- exports.se_StartWorkflowCommand = se_StartWorkflowCommand;
315
- const se_StopWorkflowCommand = async (input, context) => {
316
- const b = (0, core_1.requestBuilder)(input, context);
317
- const headers = {};
318
- b.bp("/migrationworkflow/{id}/stop");
319
- b.p("id", () => input.id, "{id}", false);
320
- let body;
321
- b.m("POST").h(headers).b(body);
322
- return b.build();
323
- };
324
- exports.se_StopWorkflowCommand = se_StopWorkflowCommand;
325
- const se_TagResourceCommand = async (input, context) => {
326
- const b = (0, core_1.requestBuilder)(input, context);
327
- const headers = {
328
- "content-type": "application/json",
329
- };
330
- b.bp("/tags/{resourceArn}");
331
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
332
- let body;
333
- body = JSON.stringify((0, smithy_client_1.take)(input, {
334
- tags: (_) => (0, smithy_client_1._json)(_),
335
- }));
336
- b.m("POST").h(headers).b(body);
337
- return b.build();
338
- };
339
- exports.se_TagResourceCommand = se_TagResourceCommand;
340
- const se_UntagResourceCommand = async (input, context) => {
341
- const b = (0, core_1.requestBuilder)(input, context);
342
- const headers = {};
343
- b.bp("/tags/{resourceArn}");
344
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
345
- const query = (0, smithy_client_1.map)({
346
- [_tK]: [
347
- (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
348
- () => (input[_tK] || []).map((_entry) => _entry),
349
- ],
350
- });
351
- let body;
352
- b.m("DELETE").h(headers).q(query).b(body);
353
- return b.build();
354
- };
355
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
356
- const se_UpdateWorkflowCommand = async (input, context) => {
357
- const b = (0, core_1.requestBuilder)(input, context);
358
- const headers = {
359
- "content-type": "application/json",
360
- };
361
- b.bp("/migrationworkflow/{id}");
362
- b.p("id", () => input.id, "{id}", false);
363
- let body;
364
- body = JSON.stringify((0, smithy_client_1.take)(input, {
365
- description: [],
366
- inputParameters: (_) => (0, smithy_client_1._json)(_),
367
- name: [],
368
- stepTargets: (_) => (0, smithy_client_1._json)(_),
369
- }));
370
- b.m("POST").h(headers).b(body);
371
- return b.build();
372
- };
373
- exports.se_UpdateWorkflowCommand = se_UpdateWorkflowCommand;
374
- const se_UpdateWorkflowStepCommand = async (input, context) => {
375
- const b = (0, core_1.requestBuilder)(input, context);
376
- const headers = {
377
- "content-type": "application/json",
378
- };
379
- b.bp("/workflowstep/{id}");
380
- b.p("id", () => input.id, "{id}", false);
381
- let body;
382
- body = JSON.stringify((0, smithy_client_1.take)(input, {
383
- description: [],
384
- name: [],
385
- next: (_) => (0, smithy_client_1._json)(_),
386
- outputs: (_) => (0, smithy_client_1._json)(_),
387
- previous: (_) => (0, smithy_client_1._json)(_),
388
- status: [],
389
- stepActionType: [],
390
- stepGroupId: [],
391
- stepTarget: (_) => (0, smithy_client_1._json)(_),
392
- workflowId: [],
393
- workflowStepAutomationConfiguration: (_) => (0, smithy_client_1._json)(_),
394
- }));
395
- b.m("POST").h(headers).b(body);
396
- return b.build();
397
- };
398
- exports.se_UpdateWorkflowStepCommand = se_UpdateWorkflowStepCommand;
399
- const se_UpdateWorkflowStepGroupCommand = async (input, context) => {
400
- const b = (0, core_1.requestBuilder)(input, context);
401
- const headers = {
402
- "content-type": "application/json",
403
- };
404
- b.bp("/workflowstepgroup/{id}");
405
- b.p("id", () => input.id, "{id}", false);
406
- const query = (0, smithy_client_1.map)({
407
- [_wI]: [, (0, smithy_client_1.expectNonNull)(input[_wI], `workflowId`)],
408
- });
409
- let body;
410
- body = JSON.stringify((0, smithy_client_1.take)(input, {
411
- description: [],
412
- name: [],
413
- next: (_) => (0, smithy_client_1._json)(_),
414
- previous: (_) => (0, smithy_client_1._json)(_),
415
- }));
416
- b.m("POST").h(headers).q(query).b(body);
417
- return b.build();
418
- };
419
- exports.se_UpdateWorkflowStepGroupCommand = se_UpdateWorkflowStepGroupCommand;
420
- const de_CreateWorkflowCommand = async (output, context) => {
421
- if (output.statusCode !== 200 && output.statusCode >= 300) {
422
- return de_CreateWorkflowCommandError(output, context);
423
- }
424
- const contents = (0, smithy_client_1.map)({
425
- $metadata: deserializeMetadata(output),
426
- });
427
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
428
- const doc = (0, smithy_client_1.take)(data, {
429
- adsApplicationConfigurationId: smithy_client_1.expectString,
430
- arn: smithy_client_1.expectString,
431
- creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
432
- description: smithy_client_1.expectString,
433
- id: smithy_client_1.expectString,
434
- name: smithy_client_1.expectString,
435
- status: smithy_client_1.expectString,
436
- stepTargets: smithy_client_1._json,
437
- tags: smithy_client_1._json,
438
- templateId: smithy_client_1.expectString,
439
- workflowInputs: smithy_client_1._json,
440
- });
441
- Object.assign(contents, doc);
442
- return contents;
443
- };
444
- exports.de_CreateWorkflowCommand = de_CreateWorkflowCommand;
445
- const de_CreateWorkflowCommandError = async (output, context) => {
446
- const parsedOutput = {
447
- ...output,
448
- body: await parseErrorBody(output.body, context),
449
- };
450
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
451
- switch (errorCode) {
452
- case "AccessDeniedException":
453
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
454
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
455
- case "InternalServerException":
456
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
457
- throw await de_InternalServerExceptionRes(parsedOutput, context);
458
- case "ThrottlingException":
459
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
460
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
461
- case "ValidationException":
462
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
463
- throw await de_ValidationExceptionRes(parsedOutput, context);
464
- default:
465
- const parsedBody = parsedOutput.body;
466
- return throwDefaultError({
467
- output,
468
- parsedBody,
469
- errorCode,
470
- });
471
- }
472
- };
473
- const de_CreateWorkflowStepCommand = async (output, context) => {
474
- if (output.statusCode !== 200 && output.statusCode >= 300) {
475
- return de_CreateWorkflowStepCommandError(output, context);
476
- }
477
- const contents = (0, smithy_client_1.map)({
478
- $metadata: deserializeMetadata(output),
479
- });
480
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
481
- const doc = (0, smithy_client_1.take)(data, {
482
- id: smithy_client_1.expectString,
483
- name: smithy_client_1.expectString,
484
- stepGroupId: smithy_client_1.expectString,
485
- workflowId: smithy_client_1.expectString,
486
- });
487
- Object.assign(contents, doc);
488
- return contents;
489
- };
490
- exports.de_CreateWorkflowStepCommand = de_CreateWorkflowStepCommand;
491
- const de_CreateWorkflowStepCommandError = async (output, context) => {
492
- const parsedOutput = {
493
- ...output,
494
- body: await parseErrorBody(output.body, context),
495
- };
496
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
497
- switch (errorCode) {
498
- case "AccessDeniedException":
499
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
500
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
501
- case "InternalServerException":
502
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
503
- throw await de_InternalServerExceptionRes(parsedOutput, context);
504
- case "ThrottlingException":
505
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
506
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
507
- case "ValidationException":
508
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
509
- throw await de_ValidationExceptionRes(parsedOutput, context);
510
- default:
511
- const parsedBody = parsedOutput.body;
512
- return throwDefaultError({
513
- output,
514
- parsedBody,
515
- errorCode,
516
- });
517
- }
518
- };
519
- const de_CreateWorkflowStepGroupCommand = async (output, context) => {
520
- if (output.statusCode !== 200 && output.statusCode >= 300) {
521
- return de_CreateWorkflowStepGroupCommandError(output, context);
522
- }
523
- const contents = (0, smithy_client_1.map)({
524
- $metadata: deserializeMetadata(output),
525
- });
526
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
527
- const doc = (0, smithy_client_1.take)(data, {
528
- creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
529
- description: smithy_client_1.expectString,
530
- id: smithy_client_1.expectString,
531
- name: smithy_client_1.expectString,
532
- next: smithy_client_1._json,
533
- previous: smithy_client_1._json,
534
- tools: smithy_client_1._json,
535
- workflowId: smithy_client_1.expectString,
536
- });
537
- Object.assign(contents, doc);
538
- return contents;
539
- };
540
- exports.de_CreateWorkflowStepGroupCommand = de_CreateWorkflowStepGroupCommand;
541
- const de_CreateWorkflowStepGroupCommandError = async (output, context) => {
542
- const parsedOutput = {
543
- ...output,
544
- body: await parseErrorBody(output.body, context),
545
- };
546
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
547
- switch (errorCode) {
548
- case "AccessDeniedException":
549
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
550
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
551
- case "InternalServerException":
552
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
553
- throw await de_InternalServerExceptionRes(parsedOutput, context);
554
- case "ThrottlingException":
555
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
556
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
557
- case "ValidationException":
558
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
559
- throw await de_ValidationExceptionRes(parsedOutput, context);
560
- default:
561
- const parsedBody = parsedOutput.body;
562
- return throwDefaultError({
563
- output,
564
- parsedBody,
565
- errorCode,
566
- });
567
- }
568
- };
569
- const de_DeleteWorkflowCommand = async (output, context) => {
570
- if (output.statusCode !== 202 && output.statusCode >= 300) {
571
- return de_DeleteWorkflowCommandError(output, context);
572
- }
573
- const contents = (0, smithy_client_1.map)({
574
- $metadata: deserializeMetadata(output),
575
- });
576
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
577
- const doc = (0, smithy_client_1.take)(data, {
578
- arn: smithy_client_1.expectString,
579
- id: smithy_client_1.expectString,
580
- status: smithy_client_1.expectString,
581
- });
582
- Object.assign(contents, doc);
583
- return contents;
584
- };
585
- exports.de_DeleteWorkflowCommand = de_DeleteWorkflowCommand;
586
- const de_DeleteWorkflowCommandError = async (output, context) => {
587
- const parsedOutput = {
588
- ...output,
589
- body: await parseErrorBody(output.body, context),
590
- };
591
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
592
- switch (errorCode) {
593
- case "AccessDeniedException":
594
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
595
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
596
- case "InternalServerException":
597
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
598
- throw await de_InternalServerExceptionRes(parsedOutput, context);
599
- case "ResourceNotFoundException":
600
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
601
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
602
- case "ThrottlingException":
603
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
604
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
605
- case "ValidationException":
606
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
607
- throw await de_ValidationExceptionRes(parsedOutput, context);
608
- default:
609
- const parsedBody = parsedOutput.body;
610
- return throwDefaultError({
611
- output,
612
- parsedBody,
613
- errorCode,
614
- });
615
- }
616
- };
617
- const de_DeleteWorkflowStepCommand = async (output, context) => {
618
- if (output.statusCode !== 200 && output.statusCode >= 300) {
619
- return de_DeleteWorkflowStepCommandError(output, context);
620
- }
621
- const contents = (0, smithy_client_1.map)({
622
- $metadata: deserializeMetadata(output),
623
- });
624
- await (0, smithy_client_1.collectBody)(output.body, context);
625
- return contents;
626
- };
627
- exports.de_DeleteWorkflowStepCommand = de_DeleteWorkflowStepCommand;
628
- const de_DeleteWorkflowStepCommandError = async (output, context) => {
629
- const parsedOutput = {
630
- ...output,
631
- body: await parseErrorBody(output.body, context),
632
- };
633
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
634
- switch (errorCode) {
635
- case "AccessDeniedException":
636
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
637
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
638
- case "InternalServerException":
639
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
640
- throw await de_InternalServerExceptionRes(parsedOutput, context);
641
- case "ResourceNotFoundException":
642
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
643
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
644
- case "ThrottlingException":
645
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
646
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
647
- case "ValidationException":
648
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
649
- throw await de_ValidationExceptionRes(parsedOutput, context);
650
- default:
651
- const parsedBody = parsedOutput.body;
652
- return throwDefaultError({
653
- output,
654
- parsedBody,
655
- errorCode,
656
- });
657
- }
658
- };
659
- const de_DeleteWorkflowStepGroupCommand = async (output, context) => {
660
- if (output.statusCode !== 202 && output.statusCode >= 300) {
661
- return de_DeleteWorkflowStepGroupCommandError(output, context);
662
- }
663
- const contents = (0, smithy_client_1.map)({
664
- $metadata: deserializeMetadata(output),
665
- });
666
- await (0, smithy_client_1.collectBody)(output.body, context);
667
- return contents;
668
- };
669
- exports.de_DeleteWorkflowStepGroupCommand = de_DeleteWorkflowStepGroupCommand;
670
- const de_DeleteWorkflowStepGroupCommandError = async (output, context) => {
671
- const parsedOutput = {
672
- ...output,
673
- body: await parseErrorBody(output.body, context),
674
- };
675
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
676
- switch (errorCode) {
677
- case "AccessDeniedException":
678
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
679
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
680
- case "InternalServerException":
681
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
682
- throw await de_InternalServerExceptionRes(parsedOutput, context);
683
- case "ResourceNotFoundException":
684
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
685
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
686
- case "ThrottlingException":
687
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
688
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
689
- case "ValidationException":
690
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
691
- throw await de_ValidationExceptionRes(parsedOutput, context);
692
- default:
693
- const parsedBody = parsedOutput.body;
694
- return throwDefaultError({
695
- output,
696
- parsedBody,
697
- errorCode,
698
- });
699
- }
700
- };
701
- const de_GetTemplateCommand = async (output, context) => {
702
- if (output.statusCode !== 200 && output.statusCode >= 300) {
703
- return de_GetTemplateCommandError(output, context);
704
- }
705
- const contents = (0, smithy_client_1.map)({
706
- $metadata: deserializeMetadata(output),
707
- });
708
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
709
- const doc = (0, smithy_client_1.take)(data, {
710
- creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
711
- description: smithy_client_1.expectString,
712
- id: smithy_client_1.expectString,
713
- inputs: smithy_client_1._json,
714
- name: smithy_client_1.expectString,
715
- status: smithy_client_1.expectString,
716
- tools: smithy_client_1._json,
717
- });
718
- Object.assign(contents, doc);
719
- return contents;
720
- };
721
- exports.de_GetTemplateCommand = de_GetTemplateCommand;
722
- const de_GetTemplateCommandError = async (output, context) => {
723
- const parsedOutput = {
724
- ...output,
725
- body: await parseErrorBody(output.body, context),
726
- };
727
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
728
- switch (errorCode) {
729
- case "AccessDeniedException":
730
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
731
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
732
- case "InternalServerException":
733
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
734
- throw await de_InternalServerExceptionRes(parsedOutput, context);
735
- case "ResourceNotFoundException":
736
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
737
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
738
- case "ThrottlingException":
739
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
740
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
741
- default:
742
- const parsedBody = parsedOutput.body;
743
- return throwDefaultError({
744
- output,
745
- parsedBody,
746
- errorCode,
747
- });
748
- }
749
- };
750
- const de_GetTemplateStepCommand = async (output, context) => {
751
- if (output.statusCode !== 200 && output.statusCode >= 300) {
752
- return de_GetTemplateStepCommandError(output, context);
753
- }
754
- const contents = (0, smithy_client_1.map)({
755
- $metadata: deserializeMetadata(output),
756
- });
757
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
758
- const doc = (0, smithy_client_1.take)(data, {
759
- creationTime: smithy_client_1.expectString,
760
- description: smithy_client_1.expectString,
761
- id: smithy_client_1.expectString,
762
- name: smithy_client_1.expectString,
763
- next: smithy_client_1._json,
764
- outputs: smithy_client_1._json,
765
- previous: smithy_client_1._json,
766
- stepActionType: smithy_client_1.expectString,
767
- stepAutomationConfiguration: smithy_client_1._json,
768
- stepGroupId: smithy_client_1.expectString,
769
- templateId: smithy_client_1.expectString,
770
- });
771
- Object.assign(contents, doc);
772
- return contents;
773
- };
774
- exports.de_GetTemplateStepCommand = de_GetTemplateStepCommand;
775
- const de_GetTemplateStepCommandError = async (output, context) => {
776
- const parsedOutput = {
777
- ...output,
778
- body: await parseErrorBody(output.body, context),
779
- };
780
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
781
- switch (errorCode) {
782
- case "AccessDeniedException":
783
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
784
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
785
- case "InternalServerException":
786
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
787
- throw await de_InternalServerExceptionRes(parsedOutput, context);
788
- case "ResourceNotFoundException":
789
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
790
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
791
- case "ThrottlingException":
792
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
793
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
794
- case "ValidationException":
795
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
796
- throw await de_ValidationExceptionRes(parsedOutput, context);
797
- default:
798
- const parsedBody = parsedOutput.body;
799
- return throwDefaultError({
800
- output,
801
- parsedBody,
802
- errorCode,
803
- });
804
- }
805
- };
806
- const de_GetTemplateStepGroupCommand = async (output, context) => {
807
- if (output.statusCode !== 200 && output.statusCode >= 300) {
808
- return de_GetTemplateStepGroupCommandError(output, context);
809
- }
810
- const contents = (0, smithy_client_1.map)({
811
- $metadata: deserializeMetadata(output),
812
- });
813
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
814
- const doc = (0, smithy_client_1.take)(data, {
815
- creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
816
- description: smithy_client_1.expectString,
817
- id: smithy_client_1.expectString,
818
- lastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
819
- name: smithy_client_1.expectString,
820
- next: smithy_client_1._json,
821
- previous: smithy_client_1._json,
822
- status: smithy_client_1.expectString,
823
- templateId: smithy_client_1.expectString,
824
- tools: smithy_client_1._json,
825
- });
826
- Object.assign(contents, doc);
827
- return contents;
828
- };
829
- exports.de_GetTemplateStepGroupCommand = de_GetTemplateStepGroupCommand;
830
- const de_GetTemplateStepGroupCommandError = async (output, context) => {
831
- const parsedOutput = {
832
- ...output,
833
- body: await parseErrorBody(output.body, context),
834
- };
835
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
836
- switch (errorCode) {
837
- case "AccessDeniedException":
838
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
839
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
840
- case "InternalServerException":
841
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
842
- throw await de_InternalServerExceptionRes(parsedOutput, context);
843
- case "ResourceNotFoundException":
844
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
845
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
846
- case "ThrottlingException":
847
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
848
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
849
- case "ValidationException":
850
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
851
- throw await de_ValidationExceptionRes(parsedOutput, context);
852
- default:
853
- const parsedBody = parsedOutput.body;
854
- return throwDefaultError({
855
- output,
856
- parsedBody,
857
- errorCode,
858
- });
859
- }
860
- };
861
- const de_GetWorkflowCommand = async (output, context) => {
862
- if (output.statusCode !== 200 && output.statusCode >= 300) {
863
- return de_GetWorkflowCommandError(output, context);
864
- }
865
- const contents = (0, smithy_client_1.map)({
866
- $metadata: deserializeMetadata(output),
867
- });
868
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
869
- const doc = (0, smithy_client_1.take)(data, {
870
- adsApplicationConfigurationId: smithy_client_1.expectString,
871
- adsApplicationName: smithy_client_1.expectString,
872
- arn: smithy_client_1.expectString,
873
- completedSteps: smithy_client_1.expectInt32,
874
- creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
875
- description: smithy_client_1.expectString,
876
- endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
877
- id: smithy_client_1.expectString,
878
- lastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
879
- lastStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
880
- lastStopTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
881
- name: smithy_client_1.expectString,
882
- status: smithy_client_1.expectString,
883
- statusMessage: smithy_client_1.expectString,
884
- tags: smithy_client_1._json,
885
- templateId: smithy_client_1.expectString,
886
- tools: smithy_client_1._json,
887
- totalSteps: smithy_client_1.expectInt32,
888
- workflowBucket: smithy_client_1.expectString,
889
- workflowInputs: smithy_client_1._json,
890
- });
891
- Object.assign(contents, doc);
892
- return contents;
893
- };
894
- exports.de_GetWorkflowCommand = de_GetWorkflowCommand;
895
- const de_GetWorkflowCommandError = async (output, context) => {
896
- const parsedOutput = {
897
- ...output,
898
- body: await parseErrorBody(output.body, context),
899
- };
900
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
901
- switch (errorCode) {
902
- case "AccessDeniedException":
903
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
904
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
905
- case "InternalServerException":
906
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
907
- throw await de_InternalServerExceptionRes(parsedOutput, context);
908
- case "ResourceNotFoundException":
909
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
910
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
911
- case "ThrottlingException":
912
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
913
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
914
- case "ValidationException":
915
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
916
- throw await de_ValidationExceptionRes(parsedOutput, context);
917
- default:
918
- const parsedBody = parsedOutput.body;
919
- return throwDefaultError({
920
- output,
921
- parsedBody,
922
- errorCode,
923
- });
924
- }
925
- };
926
- const de_GetWorkflowStepCommand = async (output, context) => {
927
- if (output.statusCode !== 200 && output.statusCode >= 300) {
928
- return de_GetWorkflowStepCommandError(output, context);
929
- }
930
- const contents = (0, smithy_client_1.map)({
931
- $metadata: deserializeMetadata(output),
932
- });
933
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
934
- const doc = (0, smithy_client_1.take)(data, {
935
- creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
936
- description: smithy_client_1.expectString,
937
- endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
938
- lastStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
939
- name: smithy_client_1.expectString,
940
- next: smithy_client_1._json,
941
- noOfSrvCompleted: smithy_client_1.expectInt32,
942
- noOfSrvFailed: smithy_client_1.expectInt32,
943
- outputs: smithy_client_1._json,
944
- owner: smithy_client_1.expectString,
945
- previous: smithy_client_1._json,
946
- scriptOutputLocation: smithy_client_1.expectString,
947
- status: smithy_client_1.expectString,
948
- statusMessage: smithy_client_1.expectString,
949
- stepActionType: smithy_client_1.expectString,
950
- stepGroupId: smithy_client_1.expectString,
951
- stepId: smithy_client_1.expectString,
952
- stepTarget: smithy_client_1._json,
953
- totalNoOfSrv: smithy_client_1.expectInt32,
954
- workflowId: smithy_client_1.expectString,
955
- workflowStepAutomationConfiguration: smithy_client_1._json,
956
- });
957
- Object.assign(contents, doc);
958
- return contents;
959
- };
960
- exports.de_GetWorkflowStepCommand = de_GetWorkflowStepCommand;
961
- const de_GetWorkflowStepCommandError = async (output, context) => {
962
- const parsedOutput = {
963
- ...output,
964
- body: await parseErrorBody(output.body, context),
965
- };
966
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
967
- switch (errorCode) {
968
- case "AccessDeniedException":
969
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
970
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
971
- case "InternalServerException":
972
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
973
- throw await de_InternalServerExceptionRes(parsedOutput, context);
974
- case "ResourceNotFoundException":
975
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
976
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
977
- case "ThrottlingException":
978
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
979
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
980
- default:
981
- const parsedBody = parsedOutput.body;
982
- return throwDefaultError({
983
- output,
984
- parsedBody,
985
- errorCode,
986
- });
987
- }
988
- };
989
- const de_GetWorkflowStepGroupCommand = async (output, context) => {
990
- if (output.statusCode !== 200 && output.statusCode >= 300) {
991
- return de_GetWorkflowStepGroupCommandError(output, context);
992
- }
993
- const contents = (0, smithy_client_1.map)({
994
- $metadata: deserializeMetadata(output),
995
- });
996
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
997
- const doc = (0, smithy_client_1.take)(data, {
998
- creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
999
- description: smithy_client_1.expectString,
1000
- endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1001
- id: smithy_client_1.expectString,
1002
- lastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1003
- name: smithy_client_1.expectString,
1004
- next: smithy_client_1._json,
1005
- owner: smithy_client_1.expectString,
1006
- previous: smithy_client_1._json,
1007
- status: smithy_client_1.expectString,
1008
- tools: smithy_client_1._json,
1009
- workflowId: smithy_client_1.expectString,
1010
- });
1011
- Object.assign(contents, doc);
1012
- return contents;
1013
- };
1014
- exports.de_GetWorkflowStepGroupCommand = de_GetWorkflowStepGroupCommand;
1015
- const de_GetWorkflowStepGroupCommandError = async (output, context) => {
1016
- const parsedOutput = {
1017
- ...output,
1018
- body: await parseErrorBody(output.body, context),
1019
- };
1020
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1021
- switch (errorCode) {
1022
- case "AccessDeniedException":
1023
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1024
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1025
- case "InternalServerException":
1026
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1027
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1028
- case "ResourceNotFoundException":
1029
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1030
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1031
- case "ThrottlingException":
1032
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1033
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1034
- case "ValidationException":
1035
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
1036
- throw await de_ValidationExceptionRes(parsedOutput, context);
1037
- default:
1038
- const parsedBody = parsedOutput.body;
1039
- return throwDefaultError({
1040
- output,
1041
- parsedBody,
1042
- errorCode,
1043
- });
1044
- }
1045
- };
1046
- const de_ListPluginsCommand = async (output, context) => {
1047
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1048
- return de_ListPluginsCommandError(output, context);
1049
- }
1050
- const contents = (0, smithy_client_1.map)({
1051
- $metadata: deserializeMetadata(output),
1052
- });
1053
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1054
- const doc = (0, smithy_client_1.take)(data, {
1055
- nextToken: smithy_client_1.expectString,
1056
- plugins: smithy_client_1._json,
1057
- });
1058
- Object.assign(contents, doc);
1059
- return contents;
1060
- };
1061
- exports.de_ListPluginsCommand = de_ListPluginsCommand;
1062
- const de_ListPluginsCommandError = async (output, context) => {
1063
- const parsedOutput = {
1064
- ...output,
1065
- body: await parseErrorBody(output.body, context),
1066
- };
1067
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1068
- switch (errorCode) {
1069
- case "AccessDeniedException":
1070
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1071
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1072
- case "InternalServerException":
1073
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1074
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1075
- case "ValidationException":
1076
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
1077
- throw await de_ValidationExceptionRes(parsedOutput, context);
1078
- default:
1079
- const parsedBody = parsedOutput.body;
1080
- return throwDefaultError({
1081
- output,
1082
- parsedBody,
1083
- errorCode,
1084
- });
1085
- }
1086
- };
1087
- const de_ListTagsForResourceCommand = async (output, context) => {
1088
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1089
- return de_ListTagsForResourceCommandError(output, context);
1090
- }
1091
- const contents = (0, smithy_client_1.map)({
1092
- $metadata: deserializeMetadata(output),
1093
- });
1094
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1095
- const doc = (0, smithy_client_1.take)(data, {
1096
- tags: smithy_client_1._json,
1097
- });
1098
- Object.assign(contents, doc);
1099
- return contents;
1100
- };
1101
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
1102
- const de_ListTagsForResourceCommandError = async (output, context) => {
1103
- const parsedOutput = {
1104
- ...output,
1105
- body: await parseErrorBody(output.body, context),
1106
- };
1107
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1108
- switch (errorCode) {
1109
- case "ResourceNotFoundException":
1110
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1111
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1112
- case "ValidationException":
1113
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
1114
- throw await de_ValidationExceptionRes(parsedOutput, context);
1115
- default:
1116
- const parsedBody = parsedOutput.body;
1117
- return throwDefaultError({
1118
- output,
1119
- parsedBody,
1120
- errorCode,
1121
- });
1122
- }
1123
- };
1124
- const de_ListTemplatesCommand = async (output, context) => {
1125
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1126
- return de_ListTemplatesCommandError(output, context);
1127
- }
1128
- const contents = (0, smithy_client_1.map)({
1129
- $metadata: deserializeMetadata(output),
1130
- });
1131
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1132
- const doc = (0, smithy_client_1.take)(data, {
1133
- nextToken: smithy_client_1.expectString,
1134
- templateSummary: smithy_client_1._json,
1135
- });
1136
- Object.assign(contents, doc);
1137
- return contents;
1138
- };
1139
- exports.de_ListTemplatesCommand = de_ListTemplatesCommand;
1140
- const de_ListTemplatesCommandError = async (output, context) => {
1141
- const parsedOutput = {
1142
- ...output,
1143
- body: await parseErrorBody(output.body, context),
1144
- };
1145
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1146
- switch (errorCode) {
1147
- case "AccessDeniedException":
1148
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1149
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1150
- case "InternalServerException":
1151
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1152
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1153
- case "ThrottlingException":
1154
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1155
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1156
- default:
1157
- const parsedBody = parsedOutput.body;
1158
- return throwDefaultError({
1159
- output,
1160
- parsedBody,
1161
- errorCode,
1162
- });
1163
- }
1164
- };
1165
- const de_ListTemplateStepGroupsCommand = async (output, context) => {
1166
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1167
- return de_ListTemplateStepGroupsCommandError(output, context);
1168
- }
1169
- const contents = (0, smithy_client_1.map)({
1170
- $metadata: deserializeMetadata(output),
1171
- });
1172
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1173
- const doc = (0, smithy_client_1.take)(data, {
1174
- nextToken: smithy_client_1.expectString,
1175
- templateStepGroupSummary: smithy_client_1._json,
1176
- });
1177
- Object.assign(contents, doc);
1178
- return contents;
1179
- };
1180
- exports.de_ListTemplateStepGroupsCommand = de_ListTemplateStepGroupsCommand;
1181
- const de_ListTemplateStepGroupsCommandError = async (output, context) => {
1182
- const parsedOutput = {
1183
- ...output,
1184
- body: await parseErrorBody(output.body, context),
1185
- };
1186
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1187
- switch (errorCode) {
1188
- case "AccessDeniedException":
1189
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1190
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1191
- case "InternalServerException":
1192
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1193
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1194
- case "ResourceNotFoundException":
1195
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1196
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1197
- case "ThrottlingException":
1198
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1199
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1200
- default:
1201
- const parsedBody = parsedOutput.body;
1202
- return throwDefaultError({
1203
- output,
1204
- parsedBody,
1205
- errorCode,
1206
- });
1207
- }
1208
- };
1209
- const de_ListTemplateStepsCommand = async (output, context) => {
1210
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1211
- return de_ListTemplateStepsCommandError(output, context);
1212
- }
1213
- const contents = (0, smithy_client_1.map)({
1214
- $metadata: deserializeMetadata(output),
1215
- });
1216
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1217
- const doc = (0, smithy_client_1.take)(data, {
1218
- nextToken: smithy_client_1.expectString,
1219
- templateStepSummaryList: smithy_client_1._json,
1220
- });
1221
- Object.assign(contents, doc);
1222
- return contents;
1223
- };
1224
- exports.de_ListTemplateStepsCommand = de_ListTemplateStepsCommand;
1225
- const de_ListTemplateStepsCommandError = async (output, context) => {
1226
- const parsedOutput = {
1227
- ...output,
1228
- body: await parseErrorBody(output.body, context),
1229
- };
1230
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1231
- switch (errorCode) {
1232
- case "AccessDeniedException":
1233
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1234
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1235
- case "InternalServerException":
1236
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1237
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1238
- case "ResourceNotFoundException":
1239
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1240
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1241
- case "ThrottlingException":
1242
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1243
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1244
- case "ValidationException":
1245
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
1246
- throw await de_ValidationExceptionRes(parsedOutput, context);
1247
- default:
1248
- const parsedBody = parsedOutput.body;
1249
- return throwDefaultError({
1250
- output,
1251
- parsedBody,
1252
- errorCode,
1253
- });
1254
- }
1255
- };
1256
- const de_ListWorkflowsCommand = async (output, context) => {
1257
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1258
- return de_ListWorkflowsCommandError(output, context);
1259
- }
1260
- const contents = (0, smithy_client_1.map)({
1261
- $metadata: deserializeMetadata(output),
1262
- });
1263
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1264
- const doc = (0, smithy_client_1.take)(data, {
1265
- migrationWorkflowSummary: (_) => de_MigrationWorkflowSummaryList(_, context),
1266
- nextToken: smithy_client_1.expectString,
1267
- });
1268
- Object.assign(contents, doc);
1269
- return contents;
1270
- };
1271
- exports.de_ListWorkflowsCommand = de_ListWorkflowsCommand;
1272
- const de_ListWorkflowsCommandError = async (output, context) => {
1273
- const parsedOutput = {
1274
- ...output,
1275
- body: await parseErrorBody(output.body, context),
1276
- };
1277
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1278
- switch (errorCode) {
1279
- case "AccessDeniedException":
1280
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1281
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1282
- case "InternalServerException":
1283
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1284
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1285
- case "ResourceNotFoundException":
1286
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1287
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1288
- case "ThrottlingException":
1289
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1290
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1291
- case "ValidationException":
1292
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
1293
- throw await de_ValidationExceptionRes(parsedOutput, context);
1294
- default:
1295
- const parsedBody = parsedOutput.body;
1296
- return throwDefaultError({
1297
- output,
1298
- parsedBody,
1299
- errorCode,
1300
- });
1301
- }
1302
- };
1303
- const de_ListWorkflowStepGroupsCommand = async (output, context) => {
1304
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1305
- return de_ListWorkflowStepGroupsCommandError(output, context);
1306
- }
1307
- const contents = (0, smithy_client_1.map)({
1308
- $metadata: deserializeMetadata(output),
1309
- });
1310
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1311
- const doc = (0, smithy_client_1.take)(data, {
1312
- nextToken: smithy_client_1.expectString,
1313
- workflowStepGroupsSummary: smithy_client_1._json,
1314
- });
1315
- Object.assign(contents, doc);
1316
- return contents;
1317
- };
1318
- exports.de_ListWorkflowStepGroupsCommand = de_ListWorkflowStepGroupsCommand;
1319
- const de_ListWorkflowStepGroupsCommandError = async (output, context) => {
1320
- const parsedOutput = {
1321
- ...output,
1322
- body: await parseErrorBody(output.body, context),
1323
- };
1324
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1325
- switch (errorCode) {
1326
- case "AccessDeniedException":
1327
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1328
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1329
- case "InternalServerException":
1330
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1331
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1332
- case "ResourceNotFoundException":
1333
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1334
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1335
- case "ThrottlingException":
1336
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1337
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1338
- case "ValidationException":
1339
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
1340
- throw await de_ValidationExceptionRes(parsedOutput, context);
1341
- default:
1342
- const parsedBody = parsedOutput.body;
1343
- return throwDefaultError({
1344
- output,
1345
- parsedBody,
1346
- errorCode,
1347
- });
1348
- }
1349
- };
1350
- const de_ListWorkflowStepsCommand = async (output, context) => {
1351
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1352
- return de_ListWorkflowStepsCommandError(output, context);
1353
- }
1354
- const contents = (0, smithy_client_1.map)({
1355
- $metadata: deserializeMetadata(output),
1356
- });
1357
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1358
- const doc = (0, smithy_client_1.take)(data, {
1359
- nextToken: smithy_client_1.expectString,
1360
- workflowStepsSummary: smithy_client_1._json,
1361
- });
1362
- Object.assign(contents, doc);
1363
- return contents;
1364
- };
1365
- exports.de_ListWorkflowStepsCommand = de_ListWorkflowStepsCommand;
1366
- const de_ListWorkflowStepsCommandError = async (output, context) => {
1367
- const parsedOutput = {
1368
- ...output,
1369
- body: await parseErrorBody(output.body, context),
1370
- };
1371
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1372
- switch (errorCode) {
1373
- case "AccessDeniedException":
1374
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1375
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1376
- case "InternalServerException":
1377
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1378
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1379
- case "ThrottlingException":
1380
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1381
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1382
- case "ValidationException":
1383
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
1384
- throw await de_ValidationExceptionRes(parsedOutput, context);
1385
- default:
1386
- const parsedBody = parsedOutput.body;
1387
- return throwDefaultError({
1388
- output,
1389
- parsedBody,
1390
- errorCode,
1391
- });
1392
- }
1393
- };
1394
- const de_RetryWorkflowStepCommand = async (output, context) => {
1395
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1396
- return de_RetryWorkflowStepCommandError(output, context);
1397
- }
1398
- const contents = (0, smithy_client_1.map)({
1399
- $metadata: deserializeMetadata(output),
1400
- });
1401
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1402
- const doc = (0, smithy_client_1.take)(data, {
1403
- id: smithy_client_1.expectString,
1404
- status: smithy_client_1.expectString,
1405
- stepGroupId: smithy_client_1.expectString,
1406
- workflowId: smithy_client_1.expectString,
1407
- });
1408
- Object.assign(contents, doc);
1409
- return contents;
1410
- };
1411
- exports.de_RetryWorkflowStepCommand = de_RetryWorkflowStepCommand;
1412
- const de_RetryWorkflowStepCommandError = async (output, context) => {
1413
- const parsedOutput = {
1414
- ...output,
1415
- body: await parseErrorBody(output.body, context),
1416
- };
1417
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1418
- switch (errorCode) {
1419
- case "AccessDeniedException":
1420
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1421
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1422
- case "InternalServerException":
1423
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1424
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1425
- case "ResourceNotFoundException":
1426
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1427
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1428
- case "ThrottlingException":
1429
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1430
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1431
- default:
1432
- const parsedBody = parsedOutput.body;
1433
- return throwDefaultError({
1434
- output,
1435
- parsedBody,
1436
- errorCode,
1437
- });
1438
- }
1439
- };
1440
- const de_StartWorkflowCommand = async (output, context) => {
1441
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1442
- return de_StartWorkflowCommandError(output, context);
1443
- }
1444
- const contents = (0, smithy_client_1.map)({
1445
- $metadata: deserializeMetadata(output),
1446
- });
1447
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1448
- const doc = (0, smithy_client_1.take)(data, {
1449
- arn: smithy_client_1.expectString,
1450
- id: smithy_client_1.expectString,
1451
- lastStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1452
- status: smithy_client_1.expectString,
1453
- statusMessage: smithy_client_1.expectString,
1454
- });
1455
- Object.assign(contents, doc);
1456
- return contents;
1457
- };
1458
- exports.de_StartWorkflowCommand = de_StartWorkflowCommand;
1459
- const de_StartWorkflowCommandError = async (output, context) => {
1460
- const parsedOutput = {
1461
- ...output,
1462
- body: await parseErrorBody(output.body, context),
1463
- };
1464
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1465
- switch (errorCode) {
1466
- case "AccessDeniedException":
1467
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1468
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1469
- case "InternalServerException":
1470
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1471
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1472
- case "ResourceNotFoundException":
1473
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1474
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1475
- case "ThrottlingException":
1476
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1477
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1478
- case "ValidationException":
1479
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
1480
- throw await de_ValidationExceptionRes(parsedOutput, context);
1481
- default:
1482
- const parsedBody = parsedOutput.body;
1483
- return throwDefaultError({
1484
- output,
1485
- parsedBody,
1486
- errorCode,
1487
- });
1488
- }
1489
- };
1490
- const de_StopWorkflowCommand = async (output, context) => {
1491
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1492
- return de_StopWorkflowCommandError(output, context);
1493
- }
1494
- const contents = (0, smithy_client_1.map)({
1495
- $metadata: deserializeMetadata(output),
1496
- });
1497
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1498
- const doc = (0, smithy_client_1.take)(data, {
1499
- arn: smithy_client_1.expectString,
1500
- id: smithy_client_1.expectString,
1501
- lastStopTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1502
- status: smithy_client_1.expectString,
1503
- statusMessage: smithy_client_1.expectString,
1504
- });
1505
- Object.assign(contents, doc);
1506
- return contents;
1507
- };
1508
- exports.de_StopWorkflowCommand = de_StopWorkflowCommand;
1509
- const de_StopWorkflowCommandError = async (output, context) => {
1510
- const parsedOutput = {
1511
- ...output,
1512
- body: await parseErrorBody(output.body, context),
1513
- };
1514
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1515
- switch (errorCode) {
1516
- case "AccessDeniedException":
1517
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1518
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1519
- case "InternalServerException":
1520
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1521
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1522
- case "ResourceNotFoundException":
1523
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1524
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1525
- case "ThrottlingException":
1526
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1527
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1528
- case "ValidationException":
1529
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
1530
- throw await de_ValidationExceptionRes(parsedOutput, context);
1531
- default:
1532
- const parsedBody = parsedOutput.body;
1533
- return throwDefaultError({
1534
- output,
1535
- parsedBody,
1536
- errorCode,
1537
- });
1538
- }
1539
- };
1540
- const de_TagResourceCommand = async (output, context) => {
1541
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1542
- return de_TagResourceCommandError(output, context);
1543
- }
1544
- const contents = (0, smithy_client_1.map)({
1545
- $metadata: deserializeMetadata(output),
1546
- });
1547
- await (0, smithy_client_1.collectBody)(output.body, context);
1548
- return contents;
1549
- };
1550
- exports.de_TagResourceCommand = de_TagResourceCommand;
1551
- const de_TagResourceCommandError = async (output, context) => {
1552
- const parsedOutput = {
1553
- ...output,
1554
- body: await parseErrorBody(output.body, context),
1555
- };
1556
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1557
- switch (errorCode) {
1558
- case "ResourceNotFoundException":
1559
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1560
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1561
- case "ValidationException":
1562
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
1563
- throw await de_ValidationExceptionRes(parsedOutput, context);
1564
- default:
1565
- const parsedBody = parsedOutput.body;
1566
- return throwDefaultError({
1567
- output,
1568
- parsedBody,
1569
- errorCode,
1570
- });
1571
- }
1572
- };
1573
- const de_UntagResourceCommand = async (output, context) => {
1574
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1575
- return de_UntagResourceCommandError(output, context);
1576
- }
1577
- const contents = (0, smithy_client_1.map)({
1578
- $metadata: deserializeMetadata(output),
1579
- });
1580
- await (0, smithy_client_1.collectBody)(output.body, context);
1581
- return contents;
1582
- };
1583
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
1584
- const de_UntagResourceCommandError = async (output, context) => {
1585
- const parsedOutput = {
1586
- ...output,
1587
- body: await parseErrorBody(output.body, context),
1588
- };
1589
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1590
- switch (errorCode) {
1591
- case "ResourceNotFoundException":
1592
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1593
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1594
- case "ValidationException":
1595
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
1596
- throw await de_ValidationExceptionRes(parsedOutput, context);
1597
- default:
1598
- const parsedBody = parsedOutput.body;
1599
- return throwDefaultError({
1600
- output,
1601
- parsedBody,
1602
- errorCode,
1603
- });
1604
- }
1605
- };
1606
- const de_UpdateWorkflowCommand = async (output, context) => {
1607
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1608
- return de_UpdateWorkflowCommandError(output, context);
1609
- }
1610
- const contents = (0, smithy_client_1.map)({
1611
- $metadata: deserializeMetadata(output),
1612
- });
1613
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1614
- const doc = (0, smithy_client_1.take)(data, {
1615
- adsApplicationConfigurationId: smithy_client_1.expectString,
1616
- arn: smithy_client_1.expectString,
1617
- creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1618
- description: smithy_client_1.expectString,
1619
- id: smithy_client_1.expectString,
1620
- lastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1621
- name: smithy_client_1.expectString,
1622
- status: smithy_client_1.expectString,
1623
- stepTargets: smithy_client_1._json,
1624
- tags: smithy_client_1._json,
1625
- templateId: smithy_client_1.expectString,
1626
- workflowInputs: smithy_client_1._json,
1627
- });
1628
- Object.assign(contents, doc);
1629
- return contents;
1630
- };
1631
- exports.de_UpdateWorkflowCommand = de_UpdateWorkflowCommand;
1632
- const de_UpdateWorkflowCommandError = async (output, context) => {
1633
- const parsedOutput = {
1634
- ...output,
1635
- body: await parseErrorBody(output.body, context),
1636
- };
1637
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1638
- switch (errorCode) {
1639
- case "AccessDeniedException":
1640
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1641
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1642
- case "InternalServerException":
1643
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1644
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1645
- case "ResourceNotFoundException":
1646
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1647
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1648
- case "ThrottlingException":
1649
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1650
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1651
- case "ValidationException":
1652
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
1653
- throw await de_ValidationExceptionRes(parsedOutput, context);
1654
- default:
1655
- const parsedBody = parsedOutput.body;
1656
- return throwDefaultError({
1657
- output,
1658
- parsedBody,
1659
- errorCode,
1660
- });
1661
- }
1662
- };
1663
- const de_UpdateWorkflowStepCommand = async (output, context) => {
1664
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1665
- return de_UpdateWorkflowStepCommandError(output, context);
1666
- }
1667
- const contents = (0, smithy_client_1.map)({
1668
- $metadata: deserializeMetadata(output),
1669
- });
1670
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1671
- const doc = (0, smithy_client_1.take)(data, {
1672
- id: smithy_client_1.expectString,
1673
- name: smithy_client_1.expectString,
1674
- stepGroupId: smithy_client_1.expectString,
1675
- workflowId: smithy_client_1.expectString,
1676
- });
1677
- Object.assign(contents, doc);
1678
- return contents;
1679
- };
1680
- exports.de_UpdateWorkflowStepCommand = de_UpdateWorkflowStepCommand;
1681
- const de_UpdateWorkflowStepCommandError = async (output, context) => {
1682
- const parsedOutput = {
1683
- ...output,
1684
- body: await parseErrorBody(output.body, context),
1685
- };
1686
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1687
- switch (errorCode) {
1688
- case "AccessDeniedException":
1689
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1690
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1691
- case "InternalServerException":
1692
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1693
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1694
- case "ThrottlingException":
1695
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1696
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1697
- case "ValidationException":
1698
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
1699
- throw await de_ValidationExceptionRes(parsedOutput, context);
1700
- default:
1701
- const parsedBody = parsedOutput.body;
1702
- return throwDefaultError({
1703
- output,
1704
- parsedBody,
1705
- errorCode,
1706
- });
1707
- }
1708
- };
1709
- const de_UpdateWorkflowStepGroupCommand = async (output, context) => {
1710
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1711
- return de_UpdateWorkflowStepGroupCommandError(output, context);
1712
- }
1713
- const contents = (0, smithy_client_1.map)({
1714
- $metadata: deserializeMetadata(output),
1715
- });
1716
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1717
- const doc = (0, smithy_client_1.take)(data, {
1718
- description: smithy_client_1.expectString,
1719
- id: smithy_client_1.expectString,
1720
- lastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1721
- name: smithy_client_1.expectString,
1722
- next: smithy_client_1._json,
1723
- previous: smithy_client_1._json,
1724
- tools: smithy_client_1._json,
1725
- workflowId: smithy_client_1.expectString,
1726
- });
1727
- Object.assign(contents, doc);
1728
- return contents;
1729
- };
1730
- exports.de_UpdateWorkflowStepGroupCommand = de_UpdateWorkflowStepGroupCommand;
1731
- const de_UpdateWorkflowStepGroupCommandError = async (output, context) => {
1732
- const parsedOutput = {
1733
- ...output,
1734
- body: await parseErrorBody(output.body, context),
1735
- };
1736
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1737
- switch (errorCode) {
1738
- case "AccessDeniedException":
1739
- case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1740
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1741
- case "InternalServerException":
1742
- case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1743
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1744
- case "ResourceNotFoundException":
1745
- case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1746
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1747
- case "ThrottlingException":
1748
- case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1749
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1750
- case "ValidationException":
1751
- case "com.amazonaws.migrationhuborchestrator#ValidationException":
1752
- throw await de_ValidationExceptionRes(parsedOutput, context);
1753
- default:
1754
- const parsedBody = parsedOutput.body;
1755
- return throwDefaultError({
1756
- output,
1757
- parsedBody,
1758
- errorCode,
1759
- });
1760
- }
1761
- };
1762
- const throwDefaultError = (0, smithy_client_1.withBaseException)(MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException);
1763
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1764
- const contents = (0, smithy_client_1.map)({});
1765
- const data = parsedOutput.body;
1766
- const doc = (0, smithy_client_1.take)(data, {
1767
- message: smithy_client_1.expectString,
1768
- });
1769
- Object.assign(contents, doc);
1770
- const exception = new models_0_1.AccessDeniedException({
1771
- $metadata: deserializeMetadata(parsedOutput),
1772
- ...contents,
1773
- });
1774
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1775
- };
1776
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1777
- const contents = (0, smithy_client_1.map)({});
1778
- const data = parsedOutput.body;
1779
- const doc = (0, smithy_client_1.take)(data, {
1780
- message: smithy_client_1.expectString,
1781
- });
1782
- Object.assign(contents, doc);
1783
- const exception = new models_0_1.InternalServerException({
1784
- $metadata: deserializeMetadata(parsedOutput),
1785
- ...contents,
1786
- });
1787
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1788
- };
1789
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1790
- const contents = (0, smithy_client_1.map)({});
1791
- const data = parsedOutput.body;
1792
- const doc = (0, smithy_client_1.take)(data, {
1793
- message: smithy_client_1.expectString,
1794
- });
1795
- Object.assign(contents, doc);
1796
- const exception = new models_0_1.ResourceNotFoundException({
1797
- $metadata: deserializeMetadata(parsedOutput),
1798
- ...contents,
1799
- });
1800
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1801
- };
1802
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1803
- const contents = (0, smithy_client_1.map)({});
1804
- const data = parsedOutput.body;
1805
- const doc = (0, smithy_client_1.take)(data, {
1806
- message: smithy_client_1.expectString,
1807
- });
1808
- Object.assign(contents, doc);
1809
- const exception = new models_0_1.ThrottlingException({
1810
- $metadata: deserializeMetadata(parsedOutput),
1811
- ...contents,
1812
- });
1813
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1814
- };
1815
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
1816
- const contents = (0, smithy_client_1.map)({});
1817
- const data = parsedOutput.body;
1818
- const doc = (0, smithy_client_1.take)(data, {
1819
- message: smithy_client_1.expectString,
1820
- });
1821
- Object.assign(contents, doc);
1822
- const exception = new models_0_1.ValidationException({
1823
- $metadata: deserializeMetadata(parsedOutput),
1824
- ...contents,
1825
- });
1826
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1827
- };
1828
- const de_MigrationWorkflowSummary = (output, context) => {
1829
- return (0, smithy_client_1.take)(output, {
1830
- adsApplicationConfigurationName: smithy_client_1.expectString,
1831
- completedSteps: smithy_client_1.expectInt32,
1832
- creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1833
- endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1834
- id: smithy_client_1.expectString,
1835
- name: smithy_client_1.expectString,
1836
- status: smithy_client_1.expectString,
1837
- statusMessage: smithy_client_1.expectString,
1838
- templateId: smithy_client_1.expectString,
1839
- totalSteps: smithy_client_1.expectInt32,
1840
- });
1841
- };
1842
- const de_MigrationWorkflowSummaryList = (output, context) => {
1843
- const retVal = (output || [])
1844
- .filter((e) => e != null)
1845
- .map((entry) => {
1846
- return de_MigrationWorkflowSummary(entry, context);
1847
- });
1848
- return retVal;
1849
- };
1850
- const deserializeMetadata = (output) => ({
1851
- httpStatusCode: output.statusCode,
1852
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1853
- extendedRequestId: output.headers["x-amz-id-2"],
1854
- cfId: output.headers["x-amz-cf-id"],
1855
- });
1856
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
1857
- const isSerializableHeaderValue = (value) => value !== undefined &&
1858
- value !== null &&
1859
- value !== "" &&
1860
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1861
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1862
- const _aACN = "adsApplicationConfigurationName";
1863
- const _mR = "maxResults";
1864
- const _n = "name";
1865
- const _nT = "nextToken";
1866
- const _s = "status";
1867
- const _sGI = "stepGroupId";
1868
- const _tI = "templateId";
1869
- const _tK = "tagKeys";
1870
- const _wI = "workflowId";
1871
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1872
- if (encoded.length) {
1873
- return JSON.parse(encoded);
1874
- }
1875
- return {};
1876
- });
1877
- const parseErrorBody = async (errorBody, context) => {
1878
- const value = await parseBody(errorBody, context);
1879
- value.message = value.message ?? value.Message;
1880
- return value;
1881
- };
1882
- const loadRestJsonErrorCode = (output, data) => {
1883
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1884
- const sanitizeErrorCode = (rawValue) => {
1885
- let cleanValue = rawValue;
1886
- if (typeof cleanValue === "number") {
1887
- cleanValue = cleanValue.toString();
1888
- }
1889
- if (cleanValue.indexOf(",") >= 0) {
1890
- cleanValue = cleanValue.split(",")[0];
1891
- }
1892
- if (cleanValue.indexOf(":") >= 0) {
1893
- cleanValue = cleanValue.split(":")[0];
1894
- }
1895
- if (cleanValue.indexOf("#") >= 0) {
1896
- cleanValue = cleanValue.split("#")[1];
1897
- }
1898
- return cleanValue;
1899
- };
1900
- const headerKey = findKey(output.headers, "x-amzn-errortype");
1901
- if (headerKey !== undefined) {
1902
- return sanitizeErrorCode(output.headers[headerKey]);
1903
- }
1904
- if (data.code !== undefined) {
1905
- return sanitizeErrorCode(data.code);
1906
- }
1907
- if (data["__type"] !== undefined) {
1908
- return sanitizeErrorCode(data["__type"]);
1909
- }
1910
- };
1
+ module.exports = require("../index.js");