@aws-sdk/client-migrationhuborchestrator 3.312.0 → 3.315.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,15 +13,15 @@ const se_CreateWorkflowCommand = async (input, context) => {
13
13
  };
14
14
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/migrationworkflow";
15
15
  let body;
16
- body = JSON.stringify({
17
- ...(input.applicationConfigurationId != null && { applicationConfigurationId: input.applicationConfigurationId }),
18
- ...(input.description != null && { description: input.description }),
19
- ...(input.inputParameters != null && { inputParameters: se_StepInputParameters(input.inputParameters, context) }),
20
- ...(input.name != null && { name: input.name }),
21
- ...(input.stepTargets != null && { stepTargets: se_StringList(input.stepTargets, context) }),
22
- ...(input.tags != null && { tags: se_StringMap(input.tags, context) }),
23
- ...(input.templateId != null && { templateId: input.templateId }),
24
- });
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
25
  return new protocol_http_1.HttpRequest({
26
26
  protocol,
27
27
  hostname,
@@ -40,20 +40,18 @@ const se_CreateWorkflowStepCommand = async (input, context) => {
40
40
  };
41
41
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workflowstep";
42
42
  let body;
43
- body = JSON.stringify({
44
- ...(input.description != null && { description: input.description }),
45
- ...(input.name != null && { name: input.name }),
46
- ...(input.next != null && { next: se_StringList(input.next, context) }),
47
- ...(input.outputs != null && { outputs: se_WorkflowStepOutputList(input.outputs, context) }),
48
- ...(input.previous != null && { previous: se_StringList(input.previous, context) }),
49
- ...(input.stepActionType != null && { stepActionType: input.stepActionType }),
50
- ...(input.stepGroupId != null && { stepGroupId: input.stepGroupId }),
51
- ...(input.stepTarget != null && { stepTarget: se_StringList(input.stepTarget, context) }),
52
- ...(input.workflowId != null && { workflowId: input.workflowId }),
53
- ...(input.workflowStepAutomationConfiguration != null && {
54
- workflowStepAutomationConfiguration: se_WorkflowStepAutomationConfiguration(input.workflowStepAutomationConfiguration, context),
55
- }),
56
- });
43
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
44
+ description: [],
45
+ name: [],
46
+ next: (_) => (0, smithy_client_1._json)(_),
47
+ outputs: (_) => (0, smithy_client_1._json)(_),
48
+ previous: (_) => (0, smithy_client_1._json)(_),
49
+ stepActionType: [],
50
+ stepGroupId: [],
51
+ stepTarget: (_) => (0, smithy_client_1._json)(_),
52
+ workflowId: [],
53
+ workflowStepAutomationConfiguration: (_) => (0, smithy_client_1._json)(_),
54
+ }));
57
55
  return new protocol_http_1.HttpRequest({
58
56
  protocol,
59
57
  hostname,
@@ -72,13 +70,13 @@ const se_CreateWorkflowStepGroupCommand = async (input, context) => {
72
70
  };
73
71
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workflowstepgroups";
74
72
  let body;
75
- body = JSON.stringify({
76
- ...(input.description != null && { description: input.description }),
77
- ...(input.name != null && { name: input.name }),
78
- ...(input.next != null && { next: se_StringList(input.next, context) }),
79
- ...(input.previous != null && { previous: se_StringList(input.previous, context) }),
80
- ...(input.workflowId != null && { workflowId: input.workflowId }),
81
- });
73
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
74
+ description: [],
75
+ name: [],
76
+ next: (_) => (0, smithy_client_1._json)(_),
77
+ previous: (_) => (0, smithy_client_1._json)(_),
78
+ workflowId: [],
79
+ }));
82
80
  return new protocol_http_1.HttpRequest({
83
81
  protocol,
84
82
  hostname,
@@ -112,7 +110,7 @@ const se_DeleteWorkflowStepCommand = async (input, context) => {
112
110
  const headers = {};
113
111
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workflowstep/{id}";
114
112
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
115
- const query = map({
113
+ const query = (0, smithy_client_1.map)({
116
114
  stepGroupId: [, (0, smithy_client_1.expectNonNull)(input.stepGroupId, `stepGroupId`)],
117
115
  workflowId: [, (0, smithy_client_1.expectNonNull)(input.workflowId, `workflowId`)],
118
116
  });
@@ -134,7 +132,7 @@ const se_DeleteWorkflowStepGroupCommand = async (input, context) => {
134
132
  const headers = {};
135
133
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workflowstepgroup/{id}";
136
134
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
137
- const query = map({
135
+ const query = (0, smithy_client_1.map)({
138
136
  workflowId: [, (0, smithy_client_1.expectNonNull)(input.workflowId, `workflowId`)],
139
137
  });
140
138
  let body;
@@ -172,7 +170,7 @@ const se_GetTemplateStepCommand = async (input, context) => {
172
170
  const headers = {};
173
171
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/templatestep/{id}";
174
172
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
175
- const query = map({
173
+ const query = (0, smithy_client_1.map)({
176
174
  templateId: [, (0, smithy_client_1.expectNonNull)(input.templateId, `templateId`)],
177
175
  stepGroupId: [, (0, smithy_client_1.expectNonNull)(input.stepGroupId, `stepGroupId`)],
178
176
  });
@@ -229,7 +227,7 @@ const se_GetWorkflowStepCommand = async (input, context) => {
229
227
  const headers = {};
230
228
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workflowstep/{id}";
231
229
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
232
- const query = map({
230
+ const query = (0, smithy_client_1.map)({
233
231
  workflowId: [, (0, smithy_client_1.expectNonNull)(input.workflowId, `workflowId`)],
234
232
  stepGroupId: [, (0, smithy_client_1.expectNonNull)(input.stepGroupId, `stepGroupId`)],
235
233
  });
@@ -251,7 +249,7 @@ const se_GetWorkflowStepGroupCommand = async (input, context) => {
251
249
  const headers = {};
252
250
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workflowstepgroup/{id}";
253
251
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
254
- const query = map({
252
+ const query = (0, smithy_client_1.map)({
255
253
  workflowId: [, (0, smithy_client_1.expectNonNull)(input.workflowId, `workflowId`)],
256
254
  });
257
255
  let body;
@@ -271,7 +269,7 @@ const se_ListPluginsCommand = async (input, context) => {
271
269
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
272
270
  const headers = {};
273
271
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/plugins";
274
- const query = map({
272
+ const query = (0, smithy_client_1.map)({
275
273
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
276
274
  nextToken: [, input.nextToken],
277
275
  });
@@ -309,7 +307,7 @@ const se_ListTemplatesCommand = async (input, context) => {
309
307
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
310
308
  const headers = {};
311
309
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/migrationworkflowtemplates";
312
- const query = map({
310
+ const query = (0, smithy_client_1.map)({
313
311
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
314
312
  nextToken: [, input.nextToken],
315
313
  name: [, input.name],
@@ -332,7 +330,7 @@ const se_ListTemplateStepGroupsCommand = async (input, context) => {
332
330
  const headers = {};
333
331
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/templatestepgroups/{templateId}";
334
332
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "templateId", () => input.templateId, "{templateId}", false);
335
- const query = map({
333
+ const query = (0, smithy_client_1.map)({
336
334
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
337
335
  nextToken: [, input.nextToken],
338
336
  });
@@ -353,7 +351,7 @@ const se_ListTemplateStepsCommand = async (input, context) => {
353
351
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
354
352
  const headers = {};
355
353
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/templatesteps";
356
- const query = map({
354
+ const query = (0, smithy_client_1.map)({
357
355
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
358
356
  nextToken: [, input.nextToken],
359
357
  templateId: [, (0, smithy_client_1.expectNonNull)(input.templateId, `templateId`)],
@@ -376,7 +374,7 @@ const se_ListWorkflowsCommand = async (input, context) => {
376
374
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
377
375
  const headers = {};
378
376
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/migrationworkflows";
379
- const query = map({
377
+ const query = (0, smithy_client_1.map)({
380
378
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
381
379
  nextToken: [, input.nextToken],
382
380
  templateId: [, input.templateId],
@@ -401,7 +399,7 @@ const se_ListWorkflowStepGroupsCommand = async (input, context) => {
401
399
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
402
400
  const headers = {};
403
401
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workflowstepgroups";
404
- const query = map({
402
+ const query = (0, smithy_client_1.map)({
405
403
  nextToken: [, input.nextToken],
406
404
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
407
405
  workflowId: [, (0, smithy_client_1.expectNonNull)(input.workflowId, `workflowId`)],
@@ -426,7 +424,7 @@ const se_ListWorkflowStepsCommand = async (input, context) => {
426
424
  "/workflow/{workflowId}/workflowstepgroups/{stepGroupId}/workflowsteps";
427
425
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workflowId", () => input.workflowId, "{workflowId}", false);
428
426
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "stepGroupId", () => input.stepGroupId, "{stepGroupId}", false);
429
- const query = map({
427
+ const query = (0, smithy_client_1.map)({
430
428
  nextToken: [, input.nextToken],
431
429
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
432
430
  });
@@ -448,7 +446,7 @@ const se_RetryWorkflowStepCommand = async (input, context) => {
448
446
  const headers = {};
449
447
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/retryworkflowstep/{id}";
450
448
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
451
- const query = map({
449
+ const query = (0, smithy_client_1.map)({
452
450
  workflowId: [, (0, smithy_client_1.expectNonNull)(input.workflowId, `workflowId`)],
453
451
  stepGroupId: [, (0, smithy_client_1.expectNonNull)(input.stepGroupId, `stepGroupId`)],
454
452
  });
@@ -507,9 +505,9 @@ const se_TagResourceCommand = async (input, context) => {
507
505
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
508
506
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
509
507
  let body;
510
- body = JSON.stringify({
511
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
512
- });
508
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
509
+ tags: (_) => (0, smithy_client_1._json)(_),
510
+ }));
513
511
  return new protocol_http_1.HttpRequest({
514
512
  protocol,
515
513
  hostname,
@@ -526,7 +524,7 @@ const se_UntagResourceCommand = async (input, context) => {
526
524
  const headers = {};
527
525
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
528
526
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
529
- const query = map({
527
+ const query = (0, smithy_client_1.map)({
530
528
  tagKeys: [
531
529
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
532
530
  () => (input.tagKeys || []).map((_entry) => _entry),
@@ -553,12 +551,12 @@ const se_UpdateWorkflowCommand = async (input, context) => {
553
551
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/migrationworkflow/{id}";
554
552
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
555
553
  let body;
556
- body = JSON.stringify({
557
- ...(input.description != null && { description: input.description }),
558
- ...(input.inputParameters != null && { inputParameters: se_StepInputParameters(input.inputParameters, context) }),
559
- ...(input.name != null && { name: input.name }),
560
- ...(input.stepTargets != null && { stepTargets: se_StringList(input.stepTargets, context) }),
561
- });
554
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
555
+ description: [],
556
+ inputParameters: (_) => (0, smithy_client_1._json)(_),
557
+ name: [],
558
+ stepTargets: (_) => (0, smithy_client_1._json)(_),
559
+ }));
562
560
  return new protocol_http_1.HttpRequest({
563
561
  protocol,
564
562
  hostname,
@@ -578,21 +576,19 @@ const se_UpdateWorkflowStepCommand = async (input, context) => {
578
576
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workflowstep/{id}";
579
577
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
580
578
  let body;
581
- body = JSON.stringify({
582
- ...(input.description != null && { description: input.description }),
583
- ...(input.name != null && { name: input.name }),
584
- ...(input.next != null && { next: se_StringList(input.next, context) }),
585
- ...(input.outputs != null && { outputs: se_WorkflowStepOutputList(input.outputs, context) }),
586
- ...(input.previous != null && { previous: se_StringList(input.previous, context) }),
587
- ...(input.status != null && { status: input.status }),
588
- ...(input.stepActionType != null && { stepActionType: input.stepActionType }),
589
- ...(input.stepGroupId != null && { stepGroupId: input.stepGroupId }),
590
- ...(input.stepTarget != null && { stepTarget: se_StringList(input.stepTarget, context) }),
591
- ...(input.workflowId != null && { workflowId: input.workflowId }),
592
- ...(input.workflowStepAutomationConfiguration != null && {
593
- workflowStepAutomationConfiguration: se_WorkflowStepAutomationConfiguration(input.workflowStepAutomationConfiguration, context),
594
- }),
595
- });
579
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
580
+ description: [],
581
+ name: [],
582
+ next: (_) => (0, smithy_client_1._json)(_),
583
+ outputs: (_) => (0, smithy_client_1._json)(_),
584
+ previous: (_) => (0, smithy_client_1._json)(_),
585
+ status: [],
586
+ stepActionType: [],
587
+ stepGroupId: [],
588
+ stepTarget: (_) => (0, smithy_client_1._json)(_),
589
+ workflowId: [],
590
+ workflowStepAutomationConfiguration: (_) => (0, smithy_client_1._json)(_),
591
+ }));
596
592
  return new protocol_http_1.HttpRequest({
597
593
  protocol,
598
594
  hostname,
@@ -611,16 +607,16 @@ const se_UpdateWorkflowStepGroupCommand = async (input, context) => {
611
607
  };
612
608
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workflowstepgroup/{id}";
613
609
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
614
- const query = map({
610
+ const query = (0, smithy_client_1.map)({
615
611
  workflowId: [, (0, smithy_client_1.expectNonNull)(input.workflowId, `workflowId`)],
616
612
  });
617
613
  let body;
618
- body = JSON.stringify({
619
- ...(input.description != null && { description: input.description }),
620
- ...(input.name != null && { name: input.name }),
621
- ...(input.next != null && { next: se_StringList(input.next, context) }),
622
- ...(input.previous != null && { previous: se_StringList(input.previous, context) }),
623
- });
614
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
615
+ description: [],
616
+ name: [],
617
+ next: (_) => (0, smithy_client_1._json)(_),
618
+ previous: (_) => (0, smithy_client_1._json)(_),
619
+ }));
624
620
  return new protocol_http_1.HttpRequest({
625
621
  protocol,
626
622
  hostname,
@@ -637,43 +633,24 @@ const de_CreateWorkflowCommand = async (output, context) => {
637
633
  if (output.statusCode !== 200 && output.statusCode >= 300) {
638
634
  return de_CreateWorkflowCommandError(output, context);
639
635
  }
640
- const contents = map({
636
+ const contents = (0, smithy_client_1.map)({
641
637
  $metadata: deserializeMetadata(output),
642
638
  });
643
639
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
644
- if (data.adsApplicationConfigurationId != null) {
645
- contents.adsApplicationConfigurationId = (0, smithy_client_1.expectString)(data.adsApplicationConfigurationId);
646
- }
647
- if (data.arn != null) {
648
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
649
- }
650
- if (data.creationTime != null) {
651
- contents.creationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationTime)));
652
- }
653
- if (data.description != null) {
654
- contents.description = (0, smithy_client_1.expectString)(data.description);
655
- }
656
- if (data.id != null) {
657
- contents.id = (0, smithy_client_1.expectString)(data.id);
658
- }
659
- if (data.name != null) {
660
- contents.name = (0, smithy_client_1.expectString)(data.name);
661
- }
662
- if (data.status != null) {
663
- contents.status = (0, smithy_client_1.expectString)(data.status);
664
- }
665
- if (data.stepTargets != null) {
666
- contents.stepTargets = de_StringList(data.stepTargets, context);
667
- }
668
- if (data.tags != null) {
669
- contents.tags = de_StringMap(data.tags, context);
670
- }
671
- if (data.templateId != null) {
672
- contents.templateId = (0, smithy_client_1.expectString)(data.templateId);
673
- }
674
- if (data.workflowInputs != null) {
675
- contents.workflowInputs = de_StepInputParameters(data.workflowInputs, context);
676
- }
640
+ const doc = (0, smithy_client_1.take)(data, {
641
+ adsApplicationConfigurationId: smithy_client_1.expectString,
642
+ arn: smithy_client_1.expectString,
643
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
644
+ description: smithy_client_1.expectString,
645
+ id: smithy_client_1.expectString,
646
+ name: smithy_client_1.expectString,
647
+ status: smithy_client_1.expectString,
648
+ stepTargets: smithy_client_1._json,
649
+ tags: smithy_client_1._json,
650
+ templateId: smithy_client_1.expectString,
651
+ workflowInputs: smithy_client_1._json,
652
+ });
653
+ Object.assign(contents, doc);
677
654
  return contents;
678
655
  };
679
656
  exports.de_CreateWorkflowCommand = de_CreateWorkflowCommand;
@@ -698,10 +675,9 @@ const de_CreateWorkflowCommandError = async (output, context) => {
698
675
  throw await de_ValidationExceptionRes(parsedOutput, context);
699
676
  default:
700
677
  const parsedBody = parsedOutput.body;
701
- (0, smithy_client_1.throwDefaultError)({
678
+ return throwDefaultError({
702
679
  output,
703
680
  parsedBody,
704
- exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
705
681
  errorCode,
706
682
  });
707
683
  }
@@ -710,22 +686,17 @@ const de_CreateWorkflowStepCommand = async (output, context) => {
710
686
  if (output.statusCode !== 200 && output.statusCode >= 300) {
711
687
  return de_CreateWorkflowStepCommandError(output, context);
712
688
  }
713
- const contents = map({
689
+ const contents = (0, smithy_client_1.map)({
714
690
  $metadata: deserializeMetadata(output),
715
691
  });
716
692
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
717
- if (data.id != null) {
718
- contents.id = (0, smithy_client_1.expectString)(data.id);
719
- }
720
- if (data.name != null) {
721
- contents.name = (0, smithy_client_1.expectString)(data.name);
722
- }
723
- if (data.stepGroupId != null) {
724
- contents.stepGroupId = (0, smithy_client_1.expectString)(data.stepGroupId);
725
- }
726
- if (data.workflowId != null) {
727
- contents.workflowId = (0, smithy_client_1.expectString)(data.workflowId);
728
- }
693
+ const doc = (0, smithy_client_1.take)(data, {
694
+ id: smithy_client_1.expectString,
695
+ name: smithy_client_1.expectString,
696
+ stepGroupId: smithy_client_1.expectString,
697
+ workflowId: smithy_client_1.expectString,
698
+ });
699
+ Object.assign(contents, doc);
729
700
  return contents;
730
701
  };
731
702
  exports.de_CreateWorkflowStepCommand = de_CreateWorkflowStepCommand;
@@ -750,10 +721,9 @@ const de_CreateWorkflowStepCommandError = async (output, context) => {
750
721
  throw await de_ValidationExceptionRes(parsedOutput, context);
751
722
  default:
752
723
  const parsedBody = parsedOutput.body;
753
- (0, smithy_client_1.throwDefaultError)({
724
+ return throwDefaultError({
754
725
  output,
755
726
  parsedBody,
756
- exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
757
727
  errorCode,
758
728
  });
759
729
  }
@@ -762,34 +732,21 @@ const de_CreateWorkflowStepGroupCommand = async (output, context) => {
762
732
  if (output.statusCode !== 200 && output.statusCode >= 300) {
763
733
  return de_CreateWorkflowStepGroupCommandError(output, context);
764
734
  }
765
- const contents = map({
735
+ const contents = (0, smithy_client_1.map)({
766
736
  $metadata: deserializeMetadata(output),
767
737
  });
768
738
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
769
- if (data.creationTime != null) {
770
- contents.creationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationTime)));
771
- }
772
- if (data.description != null) {
773
- contents.description = (0, smithy_client_1.expectString)(data.description);
774
- }
775
- if (data.id != null) {
776
- contents.id = (0, smithy_client_1.expectString)(data.id);
777
- }
778
- if (data.name != null) {
779
- contents.name = (0, smithy_client_1.expectString)(data.name);
780
- }
781
- if (data.next != null) {
782
- contents.next = de_StringList(data.next, context);
783
- }
784
- if (data.previous != null) {
785
- contents.previous = de_StringList(data.previous, context);
786
- }
787
- if (data.tools != null) {
788
- contents.tools = de_ToolsList(data.tools, context);
789
- }
790
- if (data.workflowId != null) {
791
- contents.workflowId = (0, smithy_client_1.expectString)(data.workflowId);
792
- }
739
+ const doc = (0, smithy_client_1.take)(data, {
740
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
741
+ description: smithy_client_1.expectString,
742
+ id: smithy_client_1.expectString,
743
+ name: smithy_client_1.expectString,
744
+ next: smithy_client_1._json,
745
+ previous: smithy_client_1._json,
746
+ tools: smithy_client_1._json,
747
+ workflowId: smithy_client_1.expectString,
748
+ });
749
+ Object.assign(contents, doc);
793
750
  return contents;
794
751
  };
795
752
  exports.de_CreateWorkflowStepGroupCommand = de_CreateWorkflowStepGroupCommand;
@@ -814,10 +771,9 @@ const de_CreateWorkflowStepGroupCommandError = async (output, context) => {
814
771
  throw await de_ValidationExceptionRes(parsedOutput, context);
815
772
  default:
816
773
  const parsedBody = parsedOutput.body;
817
- (0, smithy_client_1.throwDefaultError)({
774
+ return throwDefaultError({
818
775
  output,
819
776
  parsedBody,
820
- exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
821
777
  errorCode,
822
778
  });
823
779
  }
@@ -826,19 +782,16 @@ const de_DeleteWorkflowCommand = async (output, context) => {
826
782
  if (output.statusCode !== 202 && output.statusCode >= 300) {
827
783
  return de_DeleteWorkflowCommandError(output, context);
828
784
  }
829
- const contents = map({
785
+ const contents = (0, smithy_client_1.map)({
830
786
  $metadata: deserializeMetadata(output),
831
787
  });
832
788
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
833
- if (data.arn != null) {
834
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
835
- }
836
- if (data.id != null) {
837
- contents.id = (0, smithy_client_1.expectString)(data.id);
838
- }
839
- if (data.status != null) {
840
- contents.status = (0, smithy_client_1.expectString)(data.status);
841
- }
789
+ const doc = (0, smithy_client_1.take)(data, {
790
+ arn: smithy_client_1.expectString,
791
+ id: smithy_client_1.expectString,
792
+ status: smithy_client_1.expectString,
793
+ });
794
+ Object.assign(contents, doc);
842
795
  return contents;
843
796
  };
844
797
  exports.de_DeleteWorkflowCommand = de_DeleteWorkflowCommand;
@@ -866,10 +819,9 @@ const de_DeleteWorkflowCommandError = async (output, context) => {
866
819
  throw await de_ValidationExceptionRes(parsedOutput, context);
867
820
  default:
868
821
  const parsedBody = parsedOutput.body;
869
- (0, smithy_client_1.throwDefaultError)({
822
+ return throwDefaultError({
870
823
  output,
871
824
  parsedBody,
872
- exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
873
825
  errorCode,
874
826
  });
875
827
  }
@@ -878,7 +830,7 @@ const de_DeleteWorkflowStepCommand = async (output, context) => {
878
830
  if (output.statusCode !== 200 && output.statusCode >= 300) {
879
831
  return de_DeleteWorkflowStepCommandError(output, context);
880
832
  }
881
- const contents = map({
833
+ const contents = (0, smithy_client_1.map)({
882
834
  $metadata: deserializeMetadata(output),
883
835
  });
884
836
  await collectBody(output.body, context);
@@ -909,10 +861,9 @@ const de_DeleteWorkflowStepCommandError = async (output, context) => {
909
861
  throw await de_ValidationExceptionRes(parsedOutput, context);
910
862
  default:
911
863
  const parsedBody = parsedOutput.body;
912
- (0, smithy_client_1.throwDefaultError)({
864
+ return throwDefaultError({
913
865
  output,
914
866
  parsedBody,
915
- exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
916
867
  errorCode,
917
868
  });
918
869
  }
@@ -921,7 +872,7 @@ const de_DeleteWorkflowStepGroupCommand = async (output, context) => {
921
872
  if (output.statusCode !== 202 && output.statusCode >= 300) {
922
873
  return de_DeleteWorkflowStepGroupCommandError(output, context);
923
874
  }
924
- const contents = map({
875
+ const contents = (0, smithy_client_1.map)({
925
876
  $metadata: deserializeMetadata(output),
926
877
  });
927
878
  await collectBody(output.body, context);
@@ -952,10 +903,9 @@ const de_DeleteWorkflowStepGroupCommandError = async (output, context) => {
952
903
  throw await de_ValidationExceptionRes(parsedOutput, context);
953
904
  default:
954
905
  const parsedBody = parsedOutput.body;
955
- (0, smithy_client_1.throwDefaultError)({
906
+ return throwDefaultError({
956
907
  output,
957
908
  parsedBody,
958
- exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
959
909
  errorCode,
960
910
  });
961
911
  }
@@ -964,31 +914,20 @@ const de_GetTemplateCommand = async (output, context) => {
964
914
  if (output.statusCode !== 200 && output.statusCode >= 300) {
965
915
  return de_GetTemplateCommandError(output, context);
966
916
  }
967
- const contents = map({
917
+ const contents = (0, smithy_client_1.map)({
968
918
  $metadata: deserializeMetadata(output),
969
919
  });
970
920
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
971
- if (data.creationTime != null) {
972
- contents.creationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationTime)));
973
- }
974
- if (data.description != null) {
975
- contents.description = (0, smithy_client_1.expectString)(data.description);
976
- }
977
- if (data.id != null) {
978
- contents.id = (0, smithy_client_1.expectString)(data.id);
979
- }
980
- if (data.inputs != null) {
981
- contents.inputs = de_TemplateInputList(data.inputs, context);
982
- }
983
- if (data.name != null) {
984
- contents.name = (0, smithy_client_1.expectString)(data.name);
985
- }
986
- if (data.status != null) {
987
- contents.status = (0, smithy_client_1.expectString)(data.status);
988
- }
989
- if (data.tools != null) {
990
- contents.tools = de_ToolsList(data.tools, context);
991
- }
921
+ const doc = (0, smithy_client_1.take)(data, {
922
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
923
+ description: smithy_client_1.expectString,
924
+ id: smithy_client_1.expectString,
925
+ inputs: smithy_client_1._json,
926
+ name: smithy_client_1.expectString,
927
+ status: smithy_client_1.expectString,
928
+ tools: smithy_client_1._json,
929
+ });
930
+ Object.assign(contents, doc);
992
931
  return contents;
993
932
  };
994
933
  exports.de_GetTemplateCommand = de_GetTemplateCommand;
@@ -1013,10 +952,9 @@ const de_GetTemplateCommandError = async (output, context) => {
1013
952
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1014
953
  default:
1015
954
  const parsedBody = parsedOutput.body;
1016
- (0, smithy_client_1.throwDefaultError)({
955
+ return throwDefaultError({
1017
956
  output,
1018
957
  parsedBody,
1019
- exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1020
958
  errorCode,
1021
959
  });
1022
960
  }
@@ -1025,43 +963,24 @@ const de_GetTemplateStepCommand = async (output, context) => {
1025
963
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1026
964
  return de_GetTemplateStepCommandError(output, context);
1027
965
  }
1028
- const contents = map({
966
+ const contents = (0, smithy_client_1.map)({
1029
967
  $metadata: deserializeMetadata(output),
1030
968
  });
1031
969
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1032
- if (data.creationTime != null) {
1033
- contents.creationTime = (0, smithy_client_1.expectString)(data.creationTime);
1034
- }
1035
- if (data.description != null) {
1036
- contents.description = (0, smithy_client_1.expectString)(data.description);
1037
- }
1038
- if (data.id != null) {
1039
- contents.id = (0, smithy_client_1.expectString)(data.id);
1040
- }
1041
- if (data.name != null) {
1042
- contents.name = (0, smithy_client_1.expectString)(data.name);
1043
- }
1044
- if (data.next != null) {
1045
- contents.next = de_StringList(data.next, context);
1046
- }
1047
- if (data.outputs != null) {
1048
- contents.outputs = de_StepOutputList(data.outputs, context);
1049
- }
1050
- if (data.previous != null) {
1051
- contents.previous = de_StringList(data.previous, context);
1052
- }
1053
- if (data.stepActionType != null) {
1054
- contents.stepActionType = (0, smithy_client_1.expectString)(data.stepActionType);
1055
- }
1056
- if (data.stepAutomationConfiguration != null) {
1057
- contents.stepAutomationConfiguration = de_StepAutomationConfiguration(data.stepAutomationConfiguration, context);
1058
- }
1059
- if (data.stepGroupId != null) {
1060
- contents.stepGroupId = (0, smithy_client_1.expectString)(data.stepGroupId);
1061
- }
1062
- if (data.templateId != null) {
1063
- contents.templateId = (0, smithy_client_1.expectString)(data.templateId);
1064
- }
970
+ const doc = (0, smithy_client_1.take)(data, {
971
+ creationTime: smithy_client_1.expectString,
972
+ description: smithy_client_1.expectString,
973
+ id: smithy_client_1.expectString,
974
+ name: smithy_client_1.expectString,
975
+ next: smithy_client_1._json,
976
+ outputs: smithy_client_1._json,
977
+ previous: smithy_client_1._json,
978
+ stepActionType: smithy_client_1.expectString,
979
+ stepAutomationConfiguration: smithy_client_1._json,
980
+ stepGroupId: smithy_client_1.expectString,
981
+ templateId: smithy_client_1.expectString,
982
+ });
983
+ Object.assign(contents, doc);
1065
984
  return contents;
1066
985
  };
1067
986
  exports.de_GetTemplateStepCommand = de_GetTemplateStepCommand;
@@ -1089,10 +1008,9 @@ const de_GetTemplateStepCommandError = async (output, context) => {
1089
1008
  throw await de_ValidationExceptionRes(parsedOutput, context);
1090
1009
  default:
1091
1010
  const parsedBody = parsedOutput.body;
1092
- (0, smithy_client_1.throwDefaultError)({
1011
+ return throwDefaultError({
1093
1012
  output,
1094
1013
  parsedBody,
1095
- exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1096
1014
  errorCode,
1097
1015
  });
1098
1016
  }
@@ -1101,40 +1019,23 @@ const de_GetTemplateStepGroupCommand = async (output, context) => {
1101
1019
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1102
1020
  return de_GetTemplateStepGroupCommandError(output, context);
1103
1021
  }
1104
- const contents = map({
1022
+ const contents = (0, smithy_client_1.map)({
1105
1023
  $metadata: deserializeMetadata(output),
1106
1024
  });
1107
1025
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1108
- if (data.creationTime != null) {
1109
- contents.creationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationTime)));
1110
- }
1111
- if (data.description != null) {
1112
- contents.description = (0, smithy_client_1.expectString)(data.description);
1113
- }
1114
- if (data.id != null) {
1115
- contents.id = (0, smithy_client_1.expectString)(data.id);
1116
- }
1117
- if (data.lastModifiedTime != null) {
1118
- contents.lastModifiedTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.lastModifiedTime)));
1119
- }
1120
- if (data.name != null) {
1121
- contents.name = (0, smithy_client_1.expectString)(data.name);
1122
- }
1123
- if (data.next != null) {
1124
- contents.next = de_StringList(data.next, context);
1125
- }
1126
- if (data.previous != null) {
1127
- contents.previous = de_StringList(data.previous, context);
1128
- }
1129
- if (data.status != null) {
1130
- contents.status = (0, smithy_client_1.expectString)(data.status);
1131
- }
1132
- if (data.templateId != null) {
1133
- contents.templateId = (0, smithy_client_1.expectString)(data.templateId);
1134
- }
1135
- if (data.tools != null) {
1136
- contents.tools = de_ToolsList(data.tools, context);
1137
- }
1026
+ const doc = (0, smithy_client_1.take)(data, {
1027
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1028
+ description: smithy_client_1.expectString,
1029
+ id: smithy_client_1.expectString,
1030
+ lastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1031
+ name: smithy_client_1.expectString,
1032
+ next: smithy_client_1._json,
1033
+ previous: smithy_client_1._json,
1034
+ status: smithy_client_1.expectString,
1035
+ templateId: smithy_client_1.expectString,
1036
+ tools: smithy_client_1._json,
1037
+ });
1038
+ Object.assign(contents, doc);
1138
1039
  return contents;
1139
1040
  };
1140
1041
  exports.de_GetTemplateStepGroupCommand = de_GetTemplateStepGroupCommand;
@@ -1162,10 +1063,9 @@ const de_GetTemplateStepGroupCommandError = async (output, context) => {
1162
1063
  throw await de_ValidationExceptionRes(parsedOutput, context);
1163
1064
  default:
1164
1065
  const parsedBody = parsedOutput.body;
1165
- (0, smithy_client_1.throwDefaultError)({
1066
+ return throwDefaultError({
1166
1067
  output,
1167
1068
  parsedBody,
1168
- exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1169
1069
  errorCode,
1170
1070
  });
1171
1071
  }
@@ -1174,70 +1074,33 @@ const de_GetWorkflowCommand = async (output, context) => {
1174
1074
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1175
1075
  return de_GetWorkflowCommandError(output, context);
1176
1076
  }
1177
- const contents = map({
1077
+ const contents = (0, smithy_client_1.map)({
1178
1078
  $metadata: deserializeMetadata(output),
1179
1079
  });
1180
1080
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1181
- if (data.adsApplicationConfigurationId != null) {
1182
- contents.adsApplicationConfigurationId = (0, smithy_client_1.expectString)(data.adsApplicationConfigurationId);
1183
- }
1184
- if (data.adsApplicationName != null) {
1185
- contents.adsApplicationName = (0, smithy_client_1.expectString)(data.adsApplicationName);
1186
- }
1187
- if (data.arn != null) {
1188
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
1189
- }
1190
- if (data.completedSteps != null) {
1191
- contents.completedSteps = (0, smithy_client_1.expectInt32)(data.completedSteps);
1192
- }
1193
- if (data.creationTime != null) {
1194
- contents.creationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationTime)));
1195
- }
1196
- if (data.description != null) {
1197
- contents.description = (0, smithy_client_1.expectString)(data.description);
1198
- }
1199
- if (data.endTime != null) {
1200
- contents.endTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.endTime)));
1201
- }
1202
- if (data.id != null) {
1203
- contents.id = (0, smithy_client_1.expectString)(data.id);
1204
- }
1205
- if (data.lastModifiedTime != null) {
1206
- contents.lastModifiedTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.lastModifiedTime)));
1207
- }
1208
- if (data.lastStartTime != null) {
1209
- contents.lastStartTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.lastStartTime)));
1210
- }
1211
- if (data.lastStopTime != null) {
1212
- contents.lastStopTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.lastStopTime)));
1213
- }
1214
- if (data.name != null) {
1215
- contents.name = (0, smithy_client_1.expectString)(data.name);
1216
- }
1217
- if (data.status != null) {
1218
- contents.status = (0, smithy_client_1.expectString)(data.status);
1219
- }
1220
- if (data.statusMessage != null) {
1221
- contents.statusMessage = (0, smithy_client_1.expectString)(data.statusMessage);
1222
- }
1223
- if (data.tags != null) {
1224
- contents.tags = de_StringMap(data.tags, context);
1225
- }
1226
- if (data.templateId != null) {
1227
- contents.templateId = (0, smithy_client_1.expectString)(data.templateId);
1228
- }
1229
- if (data.tools != null) {
1230
- contents.tools = de_ToolsList(data.tools, context);
1231
- }
1232
- if (data.totalSteps != null) {
1233
- contents.totalSteps = (0, smithy_client_1.expectInt32)(data.totalSteps);
1234
- }
1235
- if (data.workflowBucket != null) {
1236
- contents.workflowBucket = (0, smithy_client_1.expectString)(data.workflowBucket);
1237
- }
1238
- if (data.workflowInputs != null) {
1239
- contents.workflowInputs = de_StepInputParameters(data.workflowInputs, context);
1240
- }
1081
+ const doc = (0, smithy_client_1.take)(data, {
1082
+ adsApplicationConfigurationId: smithy_client_1.expectString,
1083
+ adsApplicationName: smithy_client_1.expectString,
1084
+ arn: smithy_client_1.expectString,
1085
+ completedSteps: smithy_client_1.expectInt32,
1086
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1087
+ description: smithy_client_1.expectString,
1088
+ endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1089
+ id: smithy_client_1.expectString,
1090
+ lastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1091
+ lastStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1092
+ lastStopTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1093
+ name: smithy_client_1.expectString,
1094
+ status: smithy_client_1.expectString,
1095
+ statusMessage: smithy_client_1.expectString,
1096
+ tags: smithy_client_1._json,
1097
+ templateId: smithy_client_1.expectString,
1098
+ tools: smithy_client_1._json,
1099
+ totalSteps: smithy_client_1.expectInt32,
1100
+ workflowBucket: smithy_client_1.expectString,
1101
+ workflowInputs: smithy_client_1._json,
1102
+ });
1103
+ Object.assign(contents, doc);
1241
1104
  return contents;
1242
1105
  };
1243
1106
  exports.de_GetWorkflowCommand = de_GetWorkflowCommand;
@@ -1265,10 +1128,9 @@ const de_GetWorkflowCommandError = async (output, context) => {
1265
1128
  throw await de_ValidationExceptionRes(parsedOutput, context);
1266
1129
  default:
1267
1130
  const parsedBody = parsedOutput.body;
1268
- (0, smithy_client_1.throwDefaultError)({
1131
+ return throwDefaultError({
1269
1132
  output,
1270
1133
  parsedBody,
1271
- exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1272
1134
  errorCode,
1273
1135
  });
1274
1136
  }
@@ -1277,73 +1139,34 @@ const de_GetWorkflowStepCommand = async (output, context) => {
1277
1139
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1278
1140
  return de_GetWorkflowStepCommandError(output, context);
1279
1141
  }
1280
- const contents = map({
1142
+ const contents = (0, smithy_client_1.map)({
1281
1143
  $metadata: deserializeMetadata(output),
1282
1144
  });
1283
1145
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1284
- if (data.creationTime != null) {
1285
- contents.creationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationTime)));
1286
- }
1287
- if (data.description != null) {
1288
- contents.description = (0, smithy_client_1.expectString)(data.description);
1289
- }
1290
- if (data.endTime != null) {
1291
- contents.endTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.endTime)));
1292
- }
1293
- if (data.lastStartTime != null) {
1294
- contents.lastStartTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.lastStartTime)));
1295
- }
1296
- if (data.name != null) {
1297
- contents.name = (0, smithy_client_1.expectString)(data.name);
1298
- }
1299
- if (data.next != null) {
1300
- contents.next = de_StringList(data.next, context);
1301
- }
1302
- if (data.noOfSrvCompleted != null) {
1303
- contents.noOfSrvCompleted = (0, smithy_client_1.expectInt32)(data.noOfSrvCompleted);
1304
- }
1305
- if (data.noOfSrvFailed != null) {
1306
- contents.noOfSrvFailed = (0, smithy_client_1.expectInt32)(data.noOfSrvFailed);
1307
- }
1308
- if (data.outputs != null) {
1309
- contents.outputs = de_WorkflowStepOutputList(data.outputs, context);
1310
- }
1311
- if (data.owner != null) {
1312
- contents.owner = (0, smithy_client_1.expectString)(data.owner);
1313
- }
1314
- if (data.previous != null) {
1315
- contents.previous = de_StringList(data.previous, context);
1316
- }
1317
- if (data.scriptOutputLocation != null) {
1318
- contents.scriptOutputLocation = (0, smithy_client_1.expectString)(data.scriptOutputLocation);
1319
- }
1320
- if (data.status != null) {
1321
- contents.status = (0, smithy_client_1.expectString)(data.status);
1322
- }
1323
- if (data.statusMessage != null) {
1324
- contents.statusMessage = (0, smithy_client_1.expectString)(data.statusMessage);
1325
- }
1326
- if (data.stepActionType != null) {
1327
- contents.stepActionType = (0, smithy_client_1.expectString)(data.stepActionType);
1328
- }
1329
- if (data.stepGroupId != null) {
1330
- contents.stepGroupId = (0, smithy_client_1.expectString)(data.stepGroupId);
1331
- }
1332
- if (data.stepId != null) {
1333
- contents.stepId = (0, smithy_client_1.expectString)(data.stepId);
1334
- }
1335
- if (data.stepTarget != null) {
1336
- contents.stepTarget = de_StringList(data.stepTarget, context);
1337
- }
1338
- if (data.totalNoOfSrv != null) {
1339
- contents.totalNoOfSrv = (0, smithy_client_1.expectInt32)(data.totalNoOfSrv);
1340
- }
1341
- if (data.workflowId != null) {
1342
- contents.workflowId = (0, smithy_client_1.expectString)(data.workflowId);
1343
- }
1344
- if (data.workflowStepAutomationConfiguration != null) {
1345
- contents.workflowStepAutomationConfiguration = de_WorkflowStepAutomationConfiguration(data.workflowStepAutomationConfiguration, context);
1346
- }
1146
+ const doc = (0, smithy_client_1.take)(data, {
1147
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1148
+ description: smithy_client_1.expectString,
1149
+ endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1150
+ lastStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1151
+ name: smithy_client_1.expectString,
1152
+ next: smithy_client_1._json,
1153
+ noOfSrvCompleted: smithy_client_1.expectInt32,
1154
+ noOfSrvFailed: smithy_client_1.expectInt32,
1155
+ outputs: smithy_client_1._json,
1156
+ owner: smithy_client_1.expectString,
1157
+ previous: smithy_client_1._json,
1158
+ scriptOutputLocation: smithy_client_1.expectString,
1159
+ status: smithy_client_1.expectString,
1160
+ statusMessage: smithy_client_1.expectString,
1161
+ stepActionType: smithy_client_1.expectString,
1162
+ stepGroupId: smithy_client_1.expectString,
1163
+ stepId: smithy_client_1.expectString,
1164
+ stepTarget: smithy_client_1._json,
1165
+ totalNoOfSrv: smithy_client_1.expectInt32,
1166
+ workflowId: smithy_client_1.expectString,
1167
+ workflowStepAutomationConfiguration: smithy_client_1._json,
1168
+ });
1169
+ Object.assign(contents, doc);
1347
1170
  return contents;
1348
1171
  };
1349
1172
  exports.de_GetWorkflowStepCommand = de_GetWorkflowStepCommand;
@@ -1368,10 +1191,9 @@ const de_GetWorkflowStepCommandError = async (output, context) => {
1368
1191
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1369
1192
  default:
1370
1193
  const parsedBody = parsedOutput.body;
1371
- (0, smithy_client_1.throwDefaultError)({
1194
+ return throwDefaultError({
1372
1195
  output,
1373
1196
  parsedBody,
1374
- exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1375
1197
  errorCode,
1376
1198
  });
1377
1199
  }
@@ -1380,46 +1202,25 @@ const de_GetWorkflowStepGroupCommand = async (output, context) => {
1380
1202
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1381
1203
  return de_GetWorkflowStepGroupCommandError(output, context);
1382
1204
  }
1383
- const contents = map({
1205
+ const contents = (0, smithy_client_1.map)({
1384
1206
  $metadata: deserializeMetadata(output),
1385
1207
  });
1386
1208
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1387
- if (data.creationTime != null) {
1388
- contents.creationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationTime)));
1389
- }
1390
- if (data.description != null) {
1391
- contents.description = (0, smithy_client_1.expectString)(data.description);
1392
- }
1393
- if (data.endTime != null) {
1394
- contents.endTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.endTime)));
1395
- }
1396
- if (data.id != null) {
1397
- contents.id = (0, smithy_client_1.expectString)(data.id);
1398
- }
1399
- if (data.lastModifiedTime != null) {
1400
- contents.lastModifiedTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.lastModifiedTime)));
1401
- }
1402
- if (data.name != null) {
1403
- contents.name = (0, smithy_client_1.expectString)(data.name);
1404
- }
1405
- if (data.next != null) {
1406
- contents.next = de_StringList(data.next, context);
1407
- }
1408
- if (data.owner != null) {
1409
- contents.owner = (0, smithy_client_1.expectString)(data.owner);
1410
- }
1411
- if (data.previous != null) {
1412
- contents.previous = de_StringList(data.previous, context);
1413
- }
1414
- if (data.status != null) {
1415
- contents.status = (0, smithy_client_1.expectString)(data.status);
1416
- }
1417
- if (data.tools != null) {
1418
- contents.tools = de_ToolsList(data.tools, context);
1419
- }
1420
- if (data.workflowId != null) {
1421
- contents.workflowId = (0, smithy_client_1.expectString)(data.workflowId);
1422
- }
1209
+ const doc = (0, smithy_client_1.take)(data, {
1210
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1211
+ description: smithy_client_1.expectString,
1212
+ endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1213
+ id: smithy_client_1.expectString,
1214
+ lastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1215
+ name: smithy_client_1.expectString,
1216
+ next: smithy_client_1._json,
1217
+ owner: smithy_client_1.expectString,
1218
+ previous: smithy_client_1._json,
1219
+ status: smithy_client_1.expectString,
1220
+ tools: smithy_client_1._json,
1221
+ workflowId: smithy_client_1.expectString,
1222
+ });
1223
+ Object.assign(contents, doc);
1423
1224
  return contents;
1424
1225
  };
1425
1226
  exports.de_GetWorkflowStepGroupCommand = de_GetWorkflowStepGroupCommand;
@@ -1447,10 +1248,9 @@ const de_GetWorkflowStepGroupCommandError = async (output, context) => {
1447
1248
  throw await de_ValidationExceptionRes(parsedOutput, context);
1448
1249
  default:
1449
1250
  const parsedBody = parsedOutput.body;
1450
- (0, smithy_client_1.throwDefaultError)({
1251
+ return throwDefaultError({
1451
1252
  output,
1452
1253
  parsedBody,
1453
- exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1454
1254
  errorCode,
1455
1255
  });
1456
1256
  }
@@ -1459,16 +1259,15 @@ const de_ListPluginsCommand = async (output, context) => {
1459
1259
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1460
1260
  return de_ListPluginsCommandError(output, context);
1461
1261
  }
1462
- const contents = map({
1262
+ const contents = (0, smithy_client_1.map)({
1463
1263
  $metadata: deserializeMetadata(output),
1464
1264
  });
1465
1265
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1466
- if (data.nextToken != null) {
1467
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1468
- }
1469
- if (data.plugins != null) {
1470
- contents.plugins = de_PluginSummaries(data.plugins, context);
1471
- }
1266
+ const doc = (0, smithy_client_1.take)(data, {
1267
+ nextToken: smithy_client_1.expectString,
1268
+ plugins: smithy_client_1._json,
1269
+ });
1270
+ Object.assign(contents, doc);
1472
1271
  return contents;
1473
1272
  };
1474
1273
  exports.de_ListPluginsCommand = de_ListPluginsCommand;
@@ -1490,10 +1289,9 @@ const de_ListPluginsCommandError = async (output, context) => {
1490
1289
  throw await de_ValidationExceptionRes(parsedOutput, context);
1491
1290
  default:
1492
1291
  const parsedBody = parsedOutput.body;
1493
- (0, smithy_client_1.throwDefaultError)({
1292
+ return throwDefaultError({
1494
1293
  output,
1495
1294
  parsedBody,
1496
- exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1497
1295
  errorCode,
1498
1296
  });
1499
1297
  }
@@ -1502,13 +1300,14 @@ const de_ListTagsForResourceCommand = async (output, context) => {
1502
1300
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1503
1301
  return de_ListTagsForResourceCommandError(output, context);
1504
1302
  }
1505
- const contents = map({
1303
+ const contents = (0, smithy_client_1.map)({
1506
1304
  $metadata: deserializeMetadata(output),
1507
1305
  });
1508
1306
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1509
- if (data.tags != null) {
1510
- contents.tags = de_TagMap(data.tags, context);
1511
- }
1307
+ const doc = (0, smithy_client_1.take)(data, {
1308
+ tags: smithy_client_1._json,
1309
+ });
1310
+ Object.assign(contents, doc);
1512
1311
  return contents;
1513
1312
  };
1514
1313
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
@@ -1527,10 +1326,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
1527
1326
  throw await de_ValidationExceptionRes(parsedOutput, context);
1528
1327
  default:
1529
1328
  const parsedBody = parsedOutput.body;
1530
- (0, smithy_client_1.throwDefaultError)({
1329
+ return throwDefaultError({
1531
1330
  output,
1532
1331
  parsedBody,
1533
- exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1534
1332
  errorCode,
1535
1333
  });
1536
1334
  }
@@ -1539,16 +1337,15 @@ const de_ListTemplatesCommand = async (output, context) => {
1539
1337
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1540
1338
  return de_ListTemplatesCommandError(output, context);
1541
1339
  }
1542
- const contents = map({
1340
+ const contents = (0, smithy_client_1.map)({
1543
1341
  $metadata: deserializeMetadata(output),
1544
1342
  });
1545
1343
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1546
- if (data.nextToken != null) {
1547
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1548
- }
1549
- if (data.templateSummary != null) {
1550
- contents.templateSummary = de_TemplateSummaryList(data.templateSummary, context);
1551
- }
1344
+ const doc = (0, smithy_client_1.take)(data, {
1345
+ nextToken: smithy_client_1.expectString,
1346
+ templateSummary: smithy_client_1._json,
1347
+ });
1348
+ Object.assign(contents, doc);
1552
1349
  return contents;
1553
1350
  };
1554
1351
  exports.de_ListTemplatesCommand = de_ListTemplatesCommand;
@@ -1570,10 +1367,9 @@ const de_ListTemplatesCommandError = async (output, context) => {
1570
1367
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1571
1368
  default:
1572
1369
  const parsedBody = parsedOutput.body;
1573
- (0, smithy_client_1.throwDefaultError)({
1370
+ return throwDefaultError({
1574
1371
  output,
1575
1372
  parsedBody,
1576
- exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1577
1373
  errorCode,
1578
1374
  });
1579
1375
  }
@@ -1582,16 +1378,15 @@ const de_ListTemplateStepGroupsCommand = async (output, context) => {
1582
1378
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1583
1379
  return de_ListTemplateStepGroupsCommandError(output, context);
1584
1380
  }
1585
- const contents = map({
1381
+ const contents = (0, smithy_client_1.map)({
1586
1382
  $metadata: deserializeMetadata(output),
1587
1383
  });
1588
1384
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1589
- if (data.nextToken != null) {
1590
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1591
- }
1592
- if (data.templateStepGroupSummary != null) {
1593
- contents.templateStepGroupSummary = de_TemplateStepGroupSummaryList(data.templateStepGroupSummary, context);
1594
- }
1385
+ const doc = (0, smithy_client_1.take)(data, {
1386
+ nextToken: smithy_client_1.expectString,
1387
+ templateStepGroupSummary: smithy_client_1._json,
1388
+ });
1389
+ Object.assign(contents, doc);
1595
1390
  return contents;
1596
1391
  };
1597
1392
  exports.de_ListTemplateStepGroupsCommand = de_ListTemplateStepGroupsCommand;
@@ -1616,10 +1411,9 @@ const de_ListTemplateStepGroupsCommandError = async (output, context) => {
1616
1411
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1617
1412
  default:
1618
1413
  const parsedBody = parsedOutput.body;
1619
- (0, smithy_client_1.throwDefaultError)({
1414
+ return throwDefaultError({
1620
1415
  output,
1621
1416
  parsedBody,
1622
- exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1623
1417
  errorCode,
1624
1418
  });
1625
1419
  }
@@ -1628,16 +1422,15 @@ const de_ListTemplateStepsCommand = async (output, context) => {
1628
1422
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1629
1423
  return de_ListTemplateStepsCommandError(output, context);
1630
1424
  }
1631
- const contents = map({
1425
+ const contents = (0, smithy_client_1.map)({
1632
1426
  $metadata: deserializeMetadata(output),
1633
1427
  });
1634
1428
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1635
- if (data.nextToken != null) {
1636
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1637
- }
1638
- if (data.templateStepSummaryList != null) {
1639
- contents.templateStepSummaryList = de_TemplateStepSummaryList(data.templateStepSummaryList, context);
1640
- }
1429
+ const doc = (0, smithy_client_1.take)(data, {
1430
+ nextToken: smithy_client_1.expectString,
1431
+ templateStepSummaryList: smithy_client_1._json,
1432
+ });
1433
+ Object.assign(contents, doc);
1641
1434
  return contents;
1642
1435
  };
1643
1436
  exports.de_ListTemplateStepsCommand = de_ListTemplateStepsCommand;
@@ -1665,10 +1458,9 @@ const de_ListTemplateStepsCommandError = async (output, context) => {
1665
1458
  throw await de_ValidationExceptionRes(parsedOutput, context);
1666
1459
  default:
1667
1460
  const parsedBody = parsedOutput.body;
1668
- (0, smithy_client_1.throwDefaultError)({
1461
+ return throwDefaultError({
1669
1462
  output,
1670
1463
  parsedBody,
1671
- exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1672
1464
  errorCode,
1673
1465
  });
1674
1466
  }
@@ -1677,16 +1469,15 @@ const de_ListWorkflowsCommand = async (output, context) => {
1677
1469
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1678
1470
  return de_ListWorkflowsCommandError(output, context);
1679
1471
  }
1680
- const contents = map({
1472
+ const contents = (0, smithy_client_1.map)({
1681
1473
  $metadata: deserializeMetadata(output),
1682
1474
  });
1683
1475
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1684
- if (data.migrationWorkflowSummary != null) {
1685
- contents.migrationWorkflowSummary = de_MigrationWorkflowSummaryList(data.migrationWorkflowSummary, context);
1686
- }
1687
- if (data.nextToken != null) {
1688
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1689
- }
1476
+ const doc = (0, smithy_client_1.take)(data, {
1477
+ migrationWorkflowSummary: (_) => de_MigrationWorkflowSummaryList(_, context),
1478
+ nextToken: smithy_client_1.expectString,
1479
+ });
1480
+ Object.assign(contents, doc);
1690
1481
  return contents;
1691
1482
  };
1692
1483
  exports.de_ListWorkflowsCommand = de_ListWorkflowsCommand;
@@ -1714,10 +1505,9 @@ const de_ListWorkflowsCommandError = async (output, context) => {
1714
1505
  throw await de_ValidationExceptionRes(parsedOutput, context);
1715
1506
  default:
1716
1507
  const parsedBody = parsedOutput.body;
1717
- (0, smithy_client_1.throwDefaultError)({
1508
+ return throwDefaultError({
1718
1509
  output,
1719
1510
  parsedBody,
1720
- exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1721
1511
  errorCode,
1722
1512
  });
1723
1513
  }
@@ -1726,16 +1516,15 @@ const de_ListWorkflowStepGroupsCommand = async (output, context) => {
1726
1516
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1727
1517
  return de_ListWorkflowStepGroupsCommandError(output, context);
1728
1518
  }
1729
- const contents = map({
1519
+ const contents = (0, smithy_client_1.map)({
1730
1520
  $metadata: deserializeMetadata(output),
1731
1521
  });
1732
1522
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1733
- if (data.nextToken != null) {
1734
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1735
- }
1736
- if (data.workflowStepGroupsSummary != null) {
1737
- contents.workflowStepGroupsSummary = de_WorkflowStepGroupsSummaryList(data.workflowStepGroupsSummary, context);
1738
- }
1523
+ const doc = (0, smithy_client_1.take)(data, {
1524
+ nextToken: smithy_client_1.expectString,
1525
+ workflowStepGroupsSummary: smithy_client_1._json,
1526
+ });
1527
+ Object.assign(contents, doc);
1739
1528
  return contents;
1740
1529
  };
1741
1530
  exports.de_ListWorkflowStepGroupsCommand = de_ListWorkflowStepGroupsCommand;
@@ -1763,10 +1552,9 @@ const de_ListWorkflowStepGroupsCommandError = async (output, context) => {
1763
1552
  throw await de_ValidationExceptionRes(parsedOutput, context);
1764
1553
  default:
1765
1554
  const parsedBody = parsedOutput.body;
1766
- (0, smithy_client_1.throwDefaultError)({
1555
+ return throwDefaultError({
1767
1556
  output,
1768
1557
  parsedBody,
1769
- exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1770
1558
  errorCode,
1771
1559
  });
1772
1560
  }
@@ -1775,16 +1563,15 @@ const de_ListWorkflowStepsCommand = async (output, context) => {
1775
1563
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1776
1564
  return de_ListWorkflowStepsCommandError(output, context);
1777
1565
  }
1778
- const contents = map({
1566
+ const contents = (0, smithy_client_1.map)({
1779
1567
  $metadata: deserializeMetadata(output),
1780
1568
  });
1781
1569
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1782
- if (data.nextToken != null) {
1783
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1784
- }
1785
- if (data.workflowStepsSummary != null) {
1786
- contents.workflowStepsSummary = de_WorkflowStepsSummaryList(data.workflowStepsSummary, context);
1787
- }
1570
+ const doc = (0, smithy_client_1.take)(data, {
1571
+ nextToken: smithy_client_1.expectString,
1572
+ workflowStepsSummary: smithy_client_1._json,
1573
+ });
1574
+ Object.assign(contents, doc);
1788
1575
  return contents;
1789
1576
  };
1790
1577
  exports.de_ListWorkflowStepsCommand = de_ListWorkflowStepsCommand;
@@ -1809,10 +1596,9 @@ const de_ListWorkflowStepsCommandError = async (output, context) => {
1809
1596
  throw await de_ValidationExceptionRes(parsedOutput, context);
1810
1597
  default:
1811
1598
  const parsedBody = parsedOutput.body;
1812
- (0, smithy_client_1.throwDefaultError)({
1599
+ return throwDefaultError({
1813
1600
  output,
1814
1601
  parsedBody,
1815
- exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1816
1602
  errorCode,
1817
1603
  });
1818
1604
  }
@@ -1821,22 +1607,17 @@ const de_RetryWorkflowStepCommand = async (output, context) => {
1821
1607
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1822
1608
  return de_RetryWorkflowStepCommandError(output, context);
1823
1609
  }
1824
- const contents = map({
1610
+ const contents = (0, smithy_client_1.map)({
1825
1611
  $metadata: deserializeMetadata(output),
1826
1612
  });
1827
1613
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1828
- if (data.id != null) {
1829
- contents.id = (0, smithy_client_1.expectString)(data.id);
1830
- }
1831
- if (data.status != null) {
1832
- contents.status = (0, smithy_client_1.expectString)(data.status);
1833
- }
1834
- if (data.stepGroupId != null) {
1835
- contents.stepGroupId = (0, smithy_client_1.expectString)(data.stepGroupId);
1836
- }
1837
- if (data.workflowId != null) {
1838
- contents.workflowId = (0, smithy_client_1.expectString)(data.workflowId);
1839
- }
1614
+ const doc = (0, smithy_client_1.take)(data, {
1615
+ id: smithy_client_1.expectString,
1616
+ status: smithy_client_1.expectString,
1617
+ stepGroupId: smithy_client_1.expectString,
1618
+ workflowId: smithy_client_1.expectString,
1619
+ });
1620
+ Object.assign(contents, doc);
1840
1621
  return contents;
1841
1622
  };
1842
1623
  exports.de_RetryWorkflowStepCommand = de_RetryWorkflowStepCommand;
@@ -1861,10 +1642,9 @@ const de_RetryWorkflowStepCommandError = async (output, context) => {
1861
1642
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1862
1643
  default:
1863
1644
  const parsedBody = parsedOutput.body;
1864
- (0, smithy_client_1.throwDefaultError)({
1645
+ return throwDefaultError({
1865
1646
  output,
1866
1647
  parsedBody,
1867
- exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1868
1648
  errorCode,
1869
1649
  });
1870
1650
  }
@@ -1873,25 +1653,18 @@ const de_StartWorkflowCommand = async (output, context) => {
1873
1653
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1874
1654
  return de_StartWorkflowCommandError(output, context);
1875
1655
  }
1876
- const contents = map({
1656
+ const contents = (0, smithy_client_1.map)({
1877
1657
  $metadata: deserializeMetadata(output),
1878
1658
  });
1879
1659
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1880
- if (data.arn != null) {
1881
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
1882
- }
1883
- if (data.id != null) {
1884
- contents.id = (0, smithy_client_1.expectString)(data.id);
1885
- }
1886
- if (data.lastStartTime != null) {
1887
- contents.lastStartTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.lastStartTime)));
1888
- }
1889
- if (data.status != null) {
1890
- contents.status = (0, smithy_client_1.expectString)(data.status);
1891
- }
1892
- if (data.statusMessage != null) {
1893
- contents.statusMessage = (0, smithy_client_1.expectString)(data.statusMessage);
1894
- }
1660
+ const doc = (0, smithy_client_1.take)(data, {
1661
+ arn: smithy_client_1.expectString,
1662
+ id: smithy_client_1.expectString,
1663
+ lastStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1664
+ status: smithy_client_1.expectString,
1665
+ statusMessage: smithy_client_1.expectString,
1666
+ });
1667
+ Object.assign(contents, doc);
1895
1668
  return contents;
1896
1669
  };
1897
1670
  exports.de_StartWorkflowCommand = de_StartWorkflowCommand;
@@ -1919,10 +1692,9 @@ const de_StartWorkflowCommandError = async (output, context) => {
1919
1692
  throw await de_ValidationExceptionRes(parsedOutput, context);
1920
1693
  default:
1921
1694
  const parsedBody = parsedOutput.body;
1922
- (0, smithy_client_1.throwDefaultError)({
1695
+ return throwDefaultError({
1923
1696
  output,
1924
1697
  parsedBody,
1925
- exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1926
1698
  errorCode,
1927
1699
  });
1928
1700
  }
@@ -1931,25 +1703,18 @@ const de_StopWorkflowCommand = async (output, context) => {
1931
1703
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1932
1704
  return de_StopWorkflowCommandError(output, context);
1933
1705
  }
1934
- const contents = map({
1706
+ const contents = (0, smithy_client_1.map)({
1935
1707
  $metadata: deserializeMetadata(output),
1936
1708
  });
1937
1709
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1938
- if (data.arn != null) {
1939
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
1940
- }
1941
- if (data.id != null) {
1942
- contents.id = (0, smithy_client_1.expectString)(data.id);
1943
- }
1944
- if (data.lastStopTime != null) {
1945
- contents.lastStopTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.lastStopTime)));
1946
- }
1947
- if (data.status != null) {
1948
- contents.status = (0, smithy_client_1.expectString)(data.status);
1949
- }
1950
- if (data.statusMessage != null) {
1951
- contents.statusMessage = (0, smithy_client_1.expectString)(data.statusMessage);
1952
- }
1710
+ const doc = (0, smithy_client_1.take)(data, {
1711
+ arn: smithy_client_1.expectString,
1712
+ id: smithy_client_1.expectString,
1713
+ lastStopTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1714
+ status: smithy_client_1.expectString,
1715
+ statusMessage: smithy_client_1.expectString,
1716
+ });
1717
+ Object.assign(contents, doc);
1953
1718
  return contents;
1954
1719
  };
1955
1720
  exports.de_StopWorkflowCommand = de_StopWorkflowCommand;
@@ -1977,10 +1742,9 @@ const de_StopWorkflowCommandError = async (output, context) => {
1977
1742
  throw await de_ValidationExceptionRes(parsedOutput, context);
1978
1743
  default:
1979
1744
  const parsedBody = parsedOutput.body;
1980
- (0, smithy_client_1.throwDefaultError)({
1745
+ return throwDefaultError({
1981
1746
  output,
1982
1747
  parsedBody,
1983
- exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1984
1748
  errorCode,
1985
1749
  });
1986
1750
  }
@@ -1989,7 +1753,7 @@ const de_TagResourceCommand = async (output, context) => {
1989
1753
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1990
1754
  return de_TagResourceCommandError(output, context);
1991
1755
  }
1992
- const contents = map({
1756
+ const contents = (0, smithy_client_1.map)({
1993
1757
  $metadata: deserializeMetadata(output),
1994
1758
  });
1995
1759
  await collectBody(output.body, context);
@@ -2011,10 +1775,9 @@ const de_TagResourceCommandError = async (output, context) => {
2011
1775
  throw await de_ValidationExceptionRes(parsedOutput, context);
2012
1776
  default:
2013
1777
  const parsedBody = parsedOutput.body;
2014
- (0, smithy_client_1.throwDefaultError)({
1778
+ return throwDefaultError({
2015
1779
  output,
2016
1780
  parsedBody,
2017
- exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
2018
1781
  errorCode,
2019
1782
  });
2020
1783
  }
@@ -2023,7 +1786,7 @@ const de_UntagResourceCommand = async (output, context) => {
2023
1786
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2024
1787
  return de_UntagResourceCommandError(output, context);
2025
1788
  }
2026
- const contents = map({
1789
+ const contents = (0, smithy_client_1.map)({
2027
1790
  $metadata: deserializeMetadata(output),
2028
1791
  });
2029
1792
  await collectBody(output.body, context);
@@ -2045,10 +1808,9 @@ const de_UntagResourceCommandError = async (output, context) => {
2045
1808
  throw await de_ValidationExceptionRes(parsedOutput, context);
2046
1809
  default:
2047
1810
  const parsedBody = parsedOutput.body;
2048
- (0, smithy_client_1.throwDefaultError)({
1811
+ return throwDefaultError({
2049
1812
  output,
2050
1813
  parsedBody,
2051
- exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
2052
1814
  errorCode,
2053
1815
  });
2054
1816
  }
@@ -2057,46 +1819,25 @@ const de_UpdateWorkflowCommand = async (output, context) => {
2057
1819
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2058
1820
  return de_UpdateWorkflowCommandError(output, context);
2059
1821
  }
2060
- const contents = map({
1822
+ const contents = (0, smithy_client_1.map)({
2061
1823
  $metadata: deserializeMetadata(output),
2062
1824
  });
2063
1825
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2064
- if (data.adsApplicationConfigurationId != null) {
2065
- contents.adsApplicationConfigurationId = (0, smithy_client_1.expectString)(data.adsApplicationConfigurationId);
2066
- }
2067
- if (data.arn != null) {
2068
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
2069
- }
2070
- if (data.creationTime != null) {
2071
- contents.creationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationTime)));
2072
- }
2073
- if (data.description != null) {
2074
- contents.description = (0, smithy_client_1.expectString)(data.description);
2075
- }
2076
- if (data.id != null) {
2077
- contents.id = (0, smithy_client_1.expectString)(data.id);
2078
- }
2079
- if (data.lastModifiedTime != null) {
2080
- contents.lastModifiedTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.lastModifiedTime)));
2081
- }
2082
- if (data.name != null) {
2083
- contents.name = (0, smithy_client_1.expectString)(data.name);
2084
- }
2085
- if (data.status != null) {
2086
- contents.status = (0, smithy_client_1.expectString)(data.status);
2087
- }
2088
- if (data.stepTargets != null) {
2089
- contents.stepTargets = de_StringList(data.stepTargets, context);
2090
- }
2091
- if (data.tags != null) {
2092
- contents.tags = de_StringMap(data.tags, context);
2093
- }
2094
- if (data.templateId != null) {
2095
- contents.templateId = (0, smithy_client_1.expectString)(data.templateId);
2096
- }
2097
- if (data.workflowInputs != null) {
2098
- contents.workflowInputs = de_StepInputParameters(data.workflowInputs, context);
2099
- }
1826
+ const doc = (0, smithy_client_1.take)(data, {
1827
+ adsApplicationConfigurationId: smithy_client_1.expectString,
1828
+ arn: smithy_client_1.expectString,
1829
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1830
+ description: smithy_client_1.expectString,
1831
+ id: smithy_client_1.expectString,
1832
+ lastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1833
+ name: smithy_client_1.expectString,
1834
+ status: smithy_client_1.expectString,
1835
+ stepTargets: smithy_client_1._json,
1836
+ tags: smithy_client_1._json,
1837
+ templateId: smithy_client_1.expectString,
1838
+ workflowInputs: smithy_client_1._json,
1839
+ });
1840
+ Object.assign(contents, doc);
2100
1841
  return contents;
2101
1842
  };
2102
1843
  exports.de_UpdateWorkflowCommand = de_UpdateWorkflowCommand;
@@ -2124,10 +1865,9 @@ const de_UpdateWorkflowCommandError = async (output, context) => {
2124
1865
  throw await de_ValidationExceptionRes(parsedOutput, context);
2125
1866
  default:
2126
1867
  const parsedBody = parsedOutput.body;
2127
- (0, smithy_client_1.throwDefaultError)({
1868
+ return throwDefaultError({
2128
1869
  output,
2129
1870
  parsedBody,
2130
- exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
2131
1871
  errorCode,
2132
1872
  });
2133
1873
  }
@@ -2136,22 +1876,17 @@ const de_UpdateWorkflowStepCommand = async (output, context) => {
2136
1876
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2137
1877
  return de_UpdateWorkflowStepCommandError(output, context);
2138
1878
  }
2139
- const contents = map({
1879
+ const contents = (0, smithy_client_1.map)({
2140
1880
  $metadata: deserializeMetadata(output),
2141
1881
  });
2142
1882
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2143
- if (data.id != null) {
2144
- contents.id = (0, smithy_client_1.expectString)(data.id);
2145
- }
2146
- if (data.name != null) {
2147
- contents.name = (0, smithy_client_1.expectString)(data.name);
2148
- }
2149
- if (data.stepGroupId != null) {
2150
- contents.stepGroupId = (0, smithy_client_1.expectString)(data.stepGroupId);
2151
- }
2152
- if (data.workflowId != null) {
2153
- contents.workflowId = (0, smithy_client_1.expectString)(data.workflowId);
2154
- }
1883
+ const doc = (0, smithy_client_1.take)(data, {
1884
+ id: smithy_client_1.expectString,
1885
+ name: smithy_client_1.expectString,
1886
+ stepGroupId: smithy_client_1.expectString,
1887
+ workflowId: smithy_client_1.expectString,
1888
+ });
1889
+ Object.assign(contents, doc);
2155
1890
  return contents;
2156
1891
  };
2157
1892
  exports.de_UpdateWorkflowStepCommand = de_UpdateWorkflowStepCommand;
@@ -2176,10 +1911,9 @@ const de_UpdateWorkflowStepCommandError = async (output, context) => {
2176
1911
  throw await de_ValidationExceptionRes(parsedOutput, context);
2177
1912
  default:
2178
1913
  const parsedBody = parsedOutput.body;
2179
- (0, smithy_client_1.throwDefaultError)({
1914
+ return throwDefaultError({
2180
1915
  output,
2181
1916
  parsedBody,
2182
- exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
2183
1917
  errorCode,
2184
1918
  });
2185
1919
  }
@@ -2188,34 +1922,21 @@ const de_UpdateWorkflowStepGroupCommand = async (output, context) => {
2188
1922
  if (output.statusCode !== 202 && output.statusCode >= 300) {
2189
1923
  return de_UpdateWorkflowStepGroupCommandError(output, context);
2190
1924
  }
2191
- const contents = map({
1925
+ const contents = (0, smithy_client_1.map)({
2192
1926
  $metadata: deserializeMetadata(output),
2193
1927
  });
2194
1928
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2195
- if (data.description != null) {
2196
- contents.description = (0, smithy_client_1.expectString)(data.description);
2197
- }
2198
- if (data.id != null) {
2199
- contents.id = (0, smithy_client_1.expectString)(data.id);
2200
- }
2201
- if (data.lastModifiedTime != null) {
2202
- contents.lastModifiedTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.lastModifiedTime)));
2203
- }
2204
- if (data.name != null) {
2205
- contents.name = (0, smithy_client_1.expectString)(data.name);
2206
- }
2207
- if (data.next != null) {
2208
- contents.next = de_StringList(data.next, context);
2209
- }
2210
- if (data.previous != null) {
2211
- contents.previous = de_StringList(data.previous, context);
2212
- }
2213
- if (data.tools != null) {
2214
- contents.tools = de_ToolsList(data.tools, context);
2215
- }
2216
- if (data.workflowId != null) {
2217
- contents.workflowId = (0, smithy_client_1.expectString)(data.workflowId);
2218
- }
1929
+ const doc = (0, smithy_client_1.take)(data, {
1930
+ description: smithy_client_1.expectString,
1931
+ id: smithy_client_1.expectString,
1932
+ lastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1933
+ name: smithy_client_1.expectString,
1934
+ next: smithy_client_1._json,
1935
+ previous: smithy_client_1._json,
1936
+ tools: smithy_client_1._json,
1937
+ workflowId: smithy_client_1.expectString,
1938
+ });
1939
+ Object.assign(contents, doc);
2219
1940
  return contents;
2220
1941
  };
2221
1942
  exports.de_UpdateWorkflowStepGroupCommand = de_UpdateWorkflowStepGroupCommand;
@@ -2243,21 +1964,21 @@ const de_UpdateWorkflowStepGroupCommandError = async (output, context) => {
2243
1964
  throw await de_ValidationExceptionRes(parsedOutput, context);
2244
1965
  default:
2245
1966
  const parsedBody = parsedOutput.body;
2246
- (0, smithy_client_1.throwDefaultError)({
1967
+ return throwDefaultError({
2247
1968
  output,
2248
1969
  parsedBody,
2249
- exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
2250
1970
  errorCode,
2251
1971
  });
2252
1972
  }
2253
1973
  };
2254
- const map = smithy_client_1.map;
1974
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException);
2255
1975
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2256
- const contents = map({});
1976
+ const contents = (0, smithy_client_1.map)({});
2257
1977
  const data = parsedOutput.body;
2258
- if (data.message != null) {
2259
- contents.message = (0, smithy_client_1.expectString)(data.message);
2260
- }
1978
+ const doc = (0, smithy_client_1.take)(data, {
1979
+ message: smithy_client_1.expectString,
1980
+ });
1981
+ Object.assign(contents, doc);
2261
1982
  const exception = new models_0_1.AccessDeniedException({
2262
1983
  $metadata: deserializeMetadata(parsedOutput),
2263
1984
  ...contents,
@@ -2265,11 +1986,12 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2265
1986
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2266
1987
  };
2267
1988
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2268
- const contents = map({});
1989
+ const contents = (0, smithy_client_1.map)({});
2269
1990
  const data = parsedOutput.body;
2270
- if (data.message != null) {
2271
- contents.message = (0, smithy_client_1.expectString)(data.message);
2272
- }
1991
+ const doc = (0, smithy_client_1.take)(data, {
1992
+ message: smithy_client_1.expectString,
1993
+ });
1994
+ Object.assign(contents, doc);
2273
1995
  const exception = new models_0_1.InternalServerException({
2274
1996
  $metadata: deserializeMetadata(parsedOutput),
2275
1997
  ...contents,
@@ -2277,11 +1999,12 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2277
1999
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2278
2000
  };
2279
2001
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2280
- const contents = map({});
2002
+ const contents = (0, smithy_client_1.map)({});
2281
2003
  const data = parsedOutput.body;
2282
- if (data.message != null) {
2283
- contents.message = (0, smithy_client_1.expectString)(data.message);
2284
- }
2004
+ const doc = (0, smithy_client_1.take)(data, {
2005
+ message: smithy_client_1.expectString,
2006
+ });
2007
+ Object.assign(contents, doc);
2285
2008
  const exception = new models_0_1.ResourceNotFoundException({
2286
2009
  $metadata: deserializeMetadata(parsedOutput),
2287
2010
  ...contents,
@@ -2289,11 +2012,12 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2289
2012
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2290
2013
  };
2291
2014
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2292
- const contents = map({});
2015
+ const contents = (0, smithy_client_1.map)({});
2293
2016
  const data = parsedOutput.body;
2294
- if (data.message != null) {
2295
- contents.message = (0, smithy_client_1.expectString)(data.message);
2296
- }
2017
+ const doc = (0, smithy_client_1.take)(data, {
2018
+ message: smithy_client_1.expectString,
2019
+ });
2020
+ Object.assign(contents, doc);
2297
2021
  const exception = new models_0_1.ThrottlingException({
2298
2022
  $metadata: deserializeMetadata(parsedOutput),
2299
2023
  ...contents,
@@ -2301,438 +2025,40 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2301
2025
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2302
2026
  };
2303
2027
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
2304
- const contents = map({});
2028
+ const contents = (0, smithy_client_1.map)({});
2305
2029
  const data = parsedOutput.body;
2306
- if (data.message != null) {
2307
- contents.message = (0, smithy_client_1.expectString)(data.message);
2308
- }
2030
+ const doc = (0, smithy_client_1.take)(data, {
2031
+ message: smithy_client_1.expectString,
2032
+ });
2033
+ Object.assign(contents, doc);
2309
2034
  const exception = new models_0_1.ValidationException({
2310
2035
  $metadata: deserializeMetadata(parsedOutput),
2311
2036
  ...contents,
2312
2037
  });
2313
2038
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2314
2039
  };
2315
- const se_PlatformCommand = (input, context) => {
2316
- return {
2317
- ...(input.linux != null && { linux: input.linux }),
2318
- ...(input.windows != null && { windows: input.windows }),
2319
- };
2320
- };
2321
- const se_PlatformScriptKey = (input, context) => {
2322
- return {
2323
- ...(input.linux != null && { linux: input.linux }),
2324
- ...(input.windows != null && { windows: input.windows }),
2325
- };
2326
- };
2327
- const se_StepInput = (input, context) => {
2328
- return models_0_1.StepInput.visit(input, {
2329
- integerValue: (value) => ({ integerValue: value }),
2330
- listOfStringsValue: (value) => ({ listOfStringsValue: se_StringList(value, context) }),
2331
- mapOfStringValue: (value) => ({ mapOfStringValue: se_StringMap(value, context) }),
2332
- stringValue: (value) => ({ stringValue: value }),
2333
- _: (name, value) => ({ name: value }),
2334
- });
2335
- };
2336
- const se_StepInputParameters = (input, context) => {
2337
- return Object.entries(input).reduce((acc, [key, value]) => {
2338
- if (value === null) {
2339
- return acc;
2340
- }
2341
- acc[key] = se_StepInput(value, context);
2342
- return acc;
2343
- }, {});
2344
- };
2345
- const se_StringList = (input, context) => {
2346
- return input
2347
- .filter((e) => e != null)
2348
- .map((entry) => {
2349
- return entry;
2350
- });
2351
- };
2352
- const se_StringMap = (input, context) => {
2353
- return Object.entries(input).reduce((acc, [key, value]) => {
2354
- if (value === null) {
2355
- return acc;
2356
- }
2357
- acc[key] = value;
2358
- return acc;
2359
- }, {});
2360
- };
2361
- const se_TagMap = (input, context) => {
2362
- return Object.entries(input).reduce((acc, [key, value]) => {
2363
- if (value === null) {
2364
- return acc;
2365
- }
2366
- acc[key] = value;
2367
- return acc;
2368
- }, {});
2369
- };
2370
- const se_WorkflowStepAutomationConfiguration = (input, context) => {
2371
- return {
2372
- ...(input.command != null && { command: se_PlatformCommand(input.command, context) }),
2373
- ...(input.runEnvironment != null && { runEnvironment: input.runEnvironment }),
2374
- ...(input.scriptLocationS3Bucket != null && { scriptLocationS3Bucket: input.scriptLocationS3Bucket }),
2375
- ...(input.scriptLocationS3Key != null && {
2376
- scriptLocationS3Key: se_PlatformScriptKey(input.scriptLocationS3Key, context),
2377
- }),
2378
- ...(input.targetType != null && { targetType: input.targetType }),
2379
- };
2380
- };
2381
- const se_WorkflowStepOutput = (input, context) => {
2382
- return {
2383
- ...(input.dataType != null && { dataType: input.dataType }),
2384
- ...(input.name != null && { name: input.name }),
2385
- ...(input.required != null && { required: input.required }),
2386
- ...(input.value != null && { value: se_WorkflowStepOutputUnion(input.value, context) }),
2387
- };
2388
- };
2389
- const se_WorkflowStepOutputList = (input, context) => {
2390
- return input
2391
- .filter((e) => e != null)
2392
- .map((entry) => {
2393
- return se_WorkflowStepOutput(entry, context);
2394
- });
2395
- };
2396
- const se_WorkflowStepOutputUnion = (input, context) => {
2397
- return models_0_1.WorkflowStepOutputUnion.visit(input, {
2398
- integerValue: (value) => ({ integerValue: value }),
2399
- listOfStringValue: (value) => ({ listOfStringValue: se_StringList(value, context) }),
2400
- stringValue: (value) => ({ stringValue: value }),
2401
- _: (name, value) => ({ name: value }),
2402
- });
2403
- };
2404
2040
  const de_MigrationWorkflowSummary = (output, context) => {
2405
- return {
2406
- adsApplicationConfigurationName: (0, smithy_client_1.expectString)(output.adsApplicationConfigurationName),
2407
- completedSteps: (0, smithy_client_1.expectInt32)(output.completedSteps),
2408
- creationTime: output.creationTime != null
2409
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
2410
- : undefined,
2411
- endTime: output.endTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.endTime))) : undefined,
2412
- id: (0, smithy_client_1.expectString)(output.id),
2413
- name: (0, smithy_client_1.expectString)(output.name),
2414
- status: (0, smithy_client_1.expectString)(output.status),
2415
- statusMessage: (0, smithy_client_1.expectString)(output.statusMessage),
2416
- templateId: (0, smithy_client_1.expectString)(output.templateId),
2417
- totalSteps: (0, smithy_client_1.expectInt32)(output.totalSteps),
2418
- };
2041
+ return (0, smithy_client_1.take)(output, {
2042
+ adsApplicationConfigurationName: smithy_client_1.expectString,
2043
+ completedSteps: smithy_client_1.expectInt32,
2044
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2045
+ endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2046
+ id: smithy_client_1.expectString,
2047
+ name: smithy_client_1.expectString,
2048
+ status: smithy_client_1.expectString,
2049
+ statusMessage: smithy_client_1.expectString,
2050
+ templateId: smithy_client_1.expectString,
2051
+ totalSteps: smithy_client_1.expectInt32,
2052
+ });
2419
2053
  };
2420
2054
  const de_MigrationWorkflowSummaryList = (output, context) => {
2421
2055
  const retVal = (output || [])
2422
2056
  .filter((e) => e != null)
2423
2057
  .map((entry) => {
2424
- if (entry === null) {
2425
- return null;
2426
- }
2427
2058
  return de_MigrationWorkflowSummary(entry, context);
2428
2059
  });
2429
2060
  return retVal;
2430
2061
  };
2431
- const de_PlatformCommand = (output, context) => {
2432
- return {
2433
- linux: (0, smithy_client_1.expectString)(output.linux),
2434
- windows: (0, smithy_client_1.expectString)(output.windows),
2435
- };
2436
- };
2437
- const de_PlatformScriptKey = (output, context) => {
2438
- return {
2439
- linux: (0, smithy_client_1.expectString)(output.linux),
2440
- windows: (0, smithy_client_1.expectString)(output.windows),
2441
- };
2442
- };
2443
- const de_PluginSummaries = (output, context) => {
2444
- const retVal = (output || [])
2445
- .filter((e) => e != null)
2446
- .map((entry) => {
2447
- if (entry === null) {
2448
- return null;
2449
- }
2450
- return de_PluginSummary(entry, context);
2451
- });
2452
- return retVal;
2453
- };
2454
- const de_PluginSummary = (output, context) => {
2455
- return {
2456
- hostname: (0, smithy_client_1.expectString)(output.hostname),
2457
- ipAddress: (0, smithy_client_1.expectString)(output.ipAddress),
2458
- pluginId: (0, smithy_client_1.expectString)(output.pluginId),
2459
- registeredTime: (0, smithy_client_1.expectString)(output.registeredTime),
2460
- status: (0, smithy_client_1.expectString)(output.status),
2461
- version: (0, smithy_client_1.expectString)(output.version),
2462
- };
2463
- };
2464
- const de_StepAutomationConfiguration = (output, context) => {
2465
- return {
2466
- command: output.command != null ? de_PlatformCommand(output.command, context) : undefined,
2467
- runEnvironment: (0, smithy_client_1.expectString)(output.runEnvironment),
2468
- scriptLocationS3Bucket: (0, smithy_client_1.expectString)(output.scriptLocationS3Bucket),
2469
- scriptLocationS3Key: output.scriptLocationS3Key != null ? de_PlatformScriptKey(output.scriptLocationS3Key, context) : undefined,
2470
- targetType: (0, smithy_client_1.expectString)(output.targetType),
2471
- };
2472
- };
2473
- const de_StepInput = (output, context) => {
2474
- if ((0, smithy_client_1.expectInt32)(output.integerValue) !== undefined) {
2475
- return { integerValue: (0, smithy_client_1.expectInt32)(output.integerValue) };
2476
- }
2477
- if (output.listOfStringsValue != null) {
2478
- return {
2479
- listOfStringsValue: de_StringList(output.listOfStringsValue, context),
2480
- };
2481
- }
2482
- if (output.mapOfStringValue != null) {
2483
- return {
2484
- mapOfStringValue: de_StringMap(output.mapOfStringValue, context),
2485
- };
2486
- }
2487
- if ((0, smithy_client_1.expectString)(output.stringValue) !== undefined) {
2488
- return { stringValue: (0, smithy_client_1.expectString)(output.stringValue) };
2489
- }
2490
- return { $unknown: Object.entries(output)[0] };
2491
- };
2492
- const de_StepInputParameters = (output, context) => {
2493
- return Object.entries(output).reduce((acc, [key, value]) => {
2494
- if (value === null) {
2495
- return acc;
2496
- }
2497
- acc[key] = de_StepInput((0, smithy_client_1.expectUnion)(value), context);
2498
- return acc;
2499
- }, {});
2500
- };
2501
- const de_StepOutput = (output, context) => {
2502
- return {
2503
- dataType: (0, smithy_client_1.expectString)(output.dataType),
2504
- name: (0, smithy_client_1.expectString)(output.name),
2505
- required: (0, smithy_client_1.expectBoolean)(output.required),
2506
- };
2507
- };
2508
- const de_StepOutputList = (output, context) => {
2509
- const retVal = (output || [])
2510
- .filter((e) => e != null)
2511
- .map((entry) => {
2512
- if (entry === null) {
2513
- return null;
2514
- }
2515
- return de_StepOutput(entry, context);
2516
- });
2517
- return retVal;
2518
- };
2519
- const de_StringList = (output, context) => {
2520
- const retVal = (output || [])
2521
- .filter((e) => e != null)
2522
- .map((entry) => {
2523
- if (entry === null) {
2524
- return null;
2525
- }
2526
- return (0, smithy_client_1.expectString)(entry);
2527
- });
2528
- return retVal;
2529
- };
2530
- const de_StringMap = (output, context) => {
2531
- return Object.entries(output).reduce((acc, [key, value]) => {
2532
- if (value === null) {
2533
- return acc;
2534
- }
2535
- acc[key] = (0, smithy_client_1.expectString)(value);
2536
- return acc;
2537
- }, {});
2538
- };
2539
- const de_TagMap = (output, context) => {
2540
- return Object.entries(output).reduce((acc, [key, value]) => {
2541
- if (value === null) {
2542
- return acc;
2543
- }
2544
- acc[key] = (0, smithy_client_1.expectString)(value);
2545
- return acc;
2546
- }, {});
2547
- };
2548
- const de_TemplateInput = (output, context) => {
2549
- return {
2550
- dataType: (0, smithy_client_1.expectString)(output.dataType),
2551
- inputName: (0, smithy_client_1.expectString)(output.inputName),
2552
- required: (0, smithy_client_1.expectBoolean)(output.required),
2553
- };
2554
- };
2555
- const de_TemplateInputList = (output, context) => {
2556
- const retVal = (output || [])
2557
- .filter((e) => e != null)
2558
- .map((entry) => {
2559
- if (entry === null) {
2560
- return null;
2561
- }
2562
- return de_TemplateInput(entry, context);
2563
- });
2564
- return retVal;
2565
- };
2566
- const de_TemplateStepGroupSummary = (output, context) => {
2567
- return {
2568
- id: (0, smithy_client_1.expectString)(output.id),
2569
- name: (0, smithy_client_1.expectString)(output.name),
2570
- next: output.next != null ? de_StringList(output.next, context) : undefined,
2571
- previous: output.previous != null ? de_StringList(output.previous, context) : undefined,
2572
- };
2573
- };
2574
- const de_TemplateStepGroupSummaryList = (output, context) => {
2575
- const retVal = (output || [])
2576
- .filter((e) => e != null)
2577
- .map((entry) => {
2578
- if (entry === null) {
2579
- return null;
2580
- }
2581
- return de_TemplateStepGroupSummary(entry, context);
2582
- });
2583
- return retVal;
2584
- };
2585
- const de_TemplateStepSummary = (output, context) => {
2586
- return {
2587
- id: (0, smithy_client_1.expectString)(output.id),
2588
- name: (0, smithy_client_1.expectString)(output.name),
2589
- next: output.next != null ? de_StringList(output.next, context) : undefined,
2590
- owner: (0, smithy_client_1.expectString)(output.owner),
2591
- previous: output.previous != null ? de_StringList(output.previous, context) : undefined,
2592
- stepActionType: (0, smithy_client_1.expectString)(output.stepActionType),
2593
- stepGroupId: (0, smithy_client_1.expectString)(output.stepGroupId),
2594
- targetType: (0, smithy_client_1.expectString)(output.targetType),
2595
- templateId: (0, smithy_client_1.expectString)(output.templateId),
2596
- };
2597
- };
2598
- const de_TemplateStepSummaryList = (output, context) => {
2599
- const retVal = (output || [])
2600
- .filter((e) => e != null)
2601
- .map((entry) => {
2602
- if (entry === null) {
2603
- return null;
2604
- }
2605
- return de_TemplateStepSummary(entry, context);
2606
- });
2607
- return retVal;
2608
- };
2609
- const de_TemplateSummary = (output, context) => {
2610
- return {
2611
- arn: (0, smithy_client_1.expectString)(output.arn),
2612
- description: (0, smithy_client_1.expectString)(output.description),
2613
- id: (0, smithy_client_1.expectString)(output.id),
2614
- name: (0, smithy_client_1.expectString)(output.name),
2615
- };
2616
- };
2617
- const de_TemplateSummaryList = (output, context) => {
2618
- const retVal = (output || [])
2619
- .filter((e) => e != null)
2620
- .map((entry) => {
2621
- if (entry === null) {
2622
- return null;
2623
- }
2624
- return de_TemplateSummary(entry, context);
2625
- });
2626
- return retVal;
2627
- };
2628
- const de_Tool = (output, context) => {
2629
- return {
2630
- name: (0, smithy_client_1.expectString)(output.name),
2631
- url: (0, smithy_client_1.expectString)(output.url),
2632
- };
2633
- };
2634
- const de_ToolsList = (output, context) => {
2635
- const retVal = (output || [])
2636
- .filter((e) => e != null)
2637
- .map((entry) => {
2638
- if (entry === null) {
2639
- return null;
2640
- }
2641
- return de_Tool(entry, context);
2642
- });
2643
- return retVal;
2644
- };
2645
- const de_WorkflowStepAutomationConfiguration = (output, context) => {
2646
- return {
2647
- command: output.command != null ? de_PlatformCommand(output.command, context) : undefined,
2648
- runEnvironment: (0, smithy_client_1.expectString)(output.runEnvironment),
2649
- scriptLocationS3Bucket: (0, smithy_client_1.expectString)(output.scriptLocationS3Bucket),
2650
- scriptLocationS3Key: output.scriptLocationS3Key != null ? de_PlatformScriptKey(output.scriptLocationS3Key, context) : undefined,
2651
- targetType: (0, smithy_client_1.expectString)(output.targetType),
2652
- };
2653
- };
2654
- const de_WorkflowStepGroupsSummaryList = (output, context) => {
2655
- const retVal = (output || [])
2656
- .filter((e) => e != null)
2657
- .map((entry) => {
2658
- if (entry === null) {
2659
- return null;
2660
- }
2661
- return de_WorkflowStepGroupSummary(entry, context);
2662
- });
2663
- return retVal;
2664
- };
2665
- const de_WorkflowStepGroupSummary = (output, context) => {
2666
- return {
2667
- id: (0, smithy_client_1.expectString)(output.id),
2668
- name: (0, smithy_client_1.expectString)(output.name),
2669
- next: output.next != null ? de_StringList(output.next, context) : undefined,
2670
- owner: (0, smithy_client_1.expectString)(output.owner),
2671
- previous: output.previous != null ? de_StringList(output.previous, context) : undefined,
2672
- status: (0, smithy_client_1.expectString)(output.status),
2673
- };
2674
- };
2675
- const de_WorkflowStepOutput = (output, context) => {
2676
- return {
2677
- dataType: (0, smithy_client_1.expectString)(output.dataType),
2678
- name: (0, smithy_client_1.expectString)(output.name),
2679
- required: (0, smithy_client_1.expectBoolean)(output.required),
2680
- value: output.value != null ? de_WorkflowStepOutputUnion((0, smithy_client_1.expectUnion)(output.value), context) : undefined,
2681
- };
2682
- };
2683
- const de_WorkflowStepOutputList = (output, context) => {
2684
- const retVal = (output || [])
2685
- .filter((e) => e != null)
2686
- .map((entry) => {
2687
- if (entry === null) {
2688
- return null;
2689
- }
2690
- return de_WorkflowStepOutput(entry, context);
2691
- });
2692
- return retVal;
2693
- };
2694
- const de_WorkflowStepOutputUnion = (output, context) => {
2695
- if ((0, smithy_client_1.expectInt32)(output.integerValue) !== undefined) {
2696
- return { integerValue: (0, smithy_client_1.expectInt32)(output.integerValue) };
2697
- }
2698
- if (output.listOfStringValue != null) {
2699
- return {
2700
- listOfStringValue: de_StringList(output.listOfStringValue, context),
2701
- };
2702
- }
2703
- if ((0, smithy_client_1.expectString)(output.stringValue) !== undefined) {
2704
- return { stringValue: (0, smithy_client_1.expectString)(output.stringValue) };
2705
- }
2706
- return { $unknown: Object.entries(output)[0] };
2707
- };
2708
- const de_WorkflowStepsSummaryList = (output, context) => {
2709
- const retVal = (output || [])
2710
- .filter((e) => e != null)
2711
- .map((entry) => {
2712
- if (entry === null) {
2713
- return null;
2714
- }
2715
- return de_WorkflowStepSummary(entry, context);
2716
- });
2717
- return retVal;
2718
- };
2719
- const de_WorkflowStepSummary = (output, context) => {
2720
- return {
2721
- description: (0, smithy_client_1.expectString)(output.description),
2722
- name: (0, smithy_client_1.expectString)(output.name),
2723
- next: output.next != null ? de_StringList(output.next, context) : undefined,
2724
- noOfSrvCompleted: (0, smithy_client_1.expectInt32)(output.noOfSrvCompleted),
2725
- noOfSrvFailed: (0, smithy_client_1.expectInt32)(output.noOfSrvFailed),
2726
- owner: (0, smithy_client_1.expectString)(output.owner),
2727
- previous: output.previous != null ? de_StringList(output.previous, context) : undefined,
2728
- scriptLocation: (0, smithy_client_1.expectString)(output.scriptLocation),
2729
- status: (0, smithy_client_1.expectString)(output.status),
2730
- statusMessage: (0, smithy_client_1.expectString)(output.statusMessage),
2731
- stepActionType: (0, smithy_client_1.expectString)(output.stepActionType),
2732
- stepId: (0, smithy_client_1.expectString)(output.stepId),
2733
- totalNoOfSrv: (0, smithy_client_1.expectInt32)(output.totalNoOfSrv),
2734
- };
2735
- };
2736
2062
  const deserializeMetadata = (output) => ({
2737
2063
  httpStatusCode: output.statusCode,
2738
2064
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],