@aws-sdk/client-cloudcontrol 3.310.0 → 3.315.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,80 +7,56 @@ const uuid_1 = require("uuid");
7
7
  const CloudControlServiceException_1 = require("../models/CloudControlServiceException");
8
8
  const models_0_1 = require("../models/models_0");
9
9
  const se_CancelResourceRequestCommand = async (input, context) => {
10
- const headers = {
11
- "content-type": "application/x-amz-json-1.0",
12
- "x-amz-target": "CloudApiService.CancelResourceRequest",
13
- };
10
+ const headers = sharedHeaders("CancelResourceRequest");
14
11
  let body;
15
- body = JSON.stringify(se_CancelResourceRequestInput(input, context));
12
+ body = JSON.stringify((0, smithy_client_1._json)(input));
16
13
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
17
14
  };
18
15
  exports.se_CancelResourceRequestCommand = se_CancelResourceRequestCommand;
19
16
  const se_CreateResourceCommand = async (input, context) => {
20
- const headers = {
21
- "content-type": "application/x-amz-json-1.0",
22
- "x-amz-target": "CloudApiService.CreateResource",
23
- };
17
+ const headers = sharedHeaders("CreateResource");
24
18
  let body;
25
19
  body = JSON.stringify(se_CreateResourceInput(input, context));
26
20
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
27
21
  };
28
22
  exports.se_CreateResourceCommand = se_CreateResourceCommand;
29
23
  const se_DeleteResourceCommand = async (input, context) => {
30
- const headers = {
31
- "content-type": "application/x-amz-json-1.0",
32
- "x-amz-target": "CloudApiService.DeleteResource",
33
- };
24
+ const headers = sharedHeaders("DeleteResource");
34
25
  let body;
35
26
  body = JSON.stringify(se_DeleteResourceInput(input, context));
36
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
37
28
  };
38
29
  exports.se_DeleteResourceCommand = se_DeleteResourceCommand;
39
30
  const se_GetResourceCommand = async (input, context) => {
40
- const headers = {
41
- "content-type": "application/x-amz-json-1.0",
42
- "x-amz-target": "CloudApiService.GetResource",
43
- };
31
+ const headers = sharedHeaders("GetResource");
44
32
  let body;
45
- body = JSON.stringify(se_GetResourceInput(input, context));
33
+ body = JSON.stringify((0, smithy_client_1._json)(input));
46
34
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
47
35
  };
48
36
  exports.se_GetResourceCommand = se_GetResourceCommand;
49
37
  const se_GetResourceRequestStatusCommand = async (input, context) => {
50
- const headers = {
51
- "content-type": "application/x-amz-json-1.0",
52
- "x-amz-target": "CloudApiService.GetResourceRequestStatus",
53
- };
38
+ const headers = sharedHeaders("GetResourceRequestStatus");
54
39
  let body;
55
- body = JSON.stringify(se_GetResourceRequestStatusInput(input, context));
40
+ body = JSON.stringify((0, smithy_client_1._json)(input));
56
41
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
57
42
  };
58
43
  exports.se_GetResourceRequestStatusCommand = se_GetResourceRequestStatusCommand;
59
44
  const se_ListResourceRequestsCommand = async (input, context) => {
60
- const headers = {
61
- "content-type": "application/x-amz-json-1.0",
62
- "x-amz-target": "CloudApiService.ListResourceRequests",
63
- };
45
+ const headers = sharedHeaders("ListResourceRequests");
64
46
  let body;
65
- body = JSON.stringify(se_ListResourceRequestsInput(input, context));
47
+ body = JSON.stringify((0, smithy_client_1._json)(input));
66
48
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
67
49
  };
68
50
  exports.se_ListResourceRequestsCommand = se_ListResourceRequestsCommand;
69
51
  const se_ListResourcesCommand = async (input, context) => {
70
- const headers = {
71
- "content-type": "application/x-amz-json-1.0",
72
- "x-amz-target": "CloudApiService.ListResources",
73
- };
52
+ const headers = sharedHeaders("ListResources");
74
53
  let body;
75
- body = JSON.stringify(se_ListResourcesInput(input, context));
54
+ body = JSON.stringify((0, smithy_client_1._json)(input));
76
55
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
56
  };
78
57
  exports.se_ListResourcesCommand = se_ListResourcesCommand;
79
58
  const se_UpdateResourceCommand = async (input, context) => {
80
- const headers = {
81
- "content-type": "application/x-amz-json-1.0",
82
- "x-amz-target": "CloudApiService.UpdateResource",
83
- };
59
+ const headers = sharedHeaders("UpdateResource");
84
60
  let body;
85
61
  body = JSON.stringify(se_UpdateResourceInput(input, context));
86
62
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
@@ -97,7 +73,7 @@ const de_CancelResourceRequestCommand = async (output, context) => {
97
73
  $metadata: deserializeMetadata(output),
98
74
  ...contents,
99
75
  };
100
- return Promise.resolve(response);
76
+ return response;
101
77
  };
102
78
  exports.de_CancelResourceRequestCommand = de_CancelResourceRequestCommand;
103
79
  const de_CancelResourceRequestCommandError = async (output, context) => {
@@ -115,10 +91,9 @@ const de_CancelResourceRequestCommandError = async (output, context) => {
115
91
  throw await de_RequestTokenNotFoundExceptionRes(parsedOutput, context);
116
92
  default:
117
93
  const parsedBody = parsedOutput.body;
118
- (0, smithy_client_1.throwDefaultError)({
94
+ return throwDefaultError({
119
95
  output,
120
96
  parsedBody,
121
- exceptionCtor: CloudControlServiceException_1.CloudControlServiceException,
122
97
  errorCode,
123
98
  });
124
99
  }
@@ -134,7 +109,7 @@ const de_CreateResourceCommand = async (output, context) => {
134
109
  $metadata: deserializeMetadata(output),
135
110
  ...contents,
136
111
  };
137
- return Promise.resolve(response);
112
+ return response;
138
113
  };
139
114
  exports.de_CreateResourceCommand = de_CreateResourceCommand;
140
115
  const de_CreateResourceCommandError = async (output, context) => {
@@ -203,10 +178,9 @@ const de_CreateResourceCommandError = async (output, context) => {
203
178
  throw await de_UnsupportedActionExceptionRes(parsedOutput, context);
204
179
  default:
205
180
  const parsedBody = parsedOutput.body;
206
- (0, smithy_client_1.throwDefaultError)({
181
+ return throwDefaultError({
207
182
  output,
208
183
  parsedBody,
209
- exceptionCtor: CloudControlServiceException_1.CloudControlServiceException,
210
184
  errorCode,
211
185
  });
212
186
  }
@@ -222,7 +196,7 @@ const de_DeleteResourceCommand = async (output, context) => {
222
196
  $metadata: deserializeMetadata(output),
223
197
  ...contents,
224
198
  };
225
- return Promise.resolve(response);
199
+ return response;
226
200
  };
227
201
  exports.de_DeleteResourceCommand = de_DeleteResourceCommand;
228
202
  const de_DeleteResourceCommandError = async (output, context) => {
@@ -291,10 +265,9 @@ const de_DeleteResourceCommandError = async (output, context) => {
291
265
  throw await de_UnsupportedActionExceptionRes(parsedOutput, context);
292
266
  default:
293
267
  const parsedBody = parsedOutput.body;
294
- (0, smithy_client_1.throwDefaultError)({
268
+ return throwDefaultError({
295
269
  output,
296
270
  parsedBody,
297
- exceptionCtor: CloudControlServiceException_1.CloudControlServiceException,
298
271
  errorCode,
299
272
  });
300
273
  }
@@ -305,12 +278,12 @@ const de_GetResourceCommand = async (output, context) => {
305
278
  }
306
279
  const data = await parseBody(output.body, context);
307
280
  let contents = {};
308
- contents = de_GetResourceOutput(data, context);
281
+ contents = (0, smithy_client_1._json)(data);
309
282
  const response = {
310
283
  $metadata: deserializeMetadata(output),
311
284
  ...contents,
312
285
  };
313
- return Promise.resolve(response);
286
+ return response;
314
287
  };
315
288
  exports.de_GetResourceCommand = de_GetResourceCommand;
316
289
  const de_GetResourceCommandError = async (output, context) => {
@@ -373,10 +346,9 @@ const de_GetResourceCommandError = async (output, context) => {
373
346
  throw await de_UnsupportedActionExceptionRes(parsedOutput, context);
374
347
  default:
375
348
  const parsedBody = parsedOutput.body;
376
- (0, smithy_client_1.throwDefaultError)({
349
+ return throwDefaultError({
377
350
  output,
378
351
  parsedBody,
379
- exceptionCtor: CloudControlServiceException_1.CloudControlServiceException,
380
352
  errorCode,
381
353
  });
382
354
  }
@@ -392,7 +364,7 @@ const de_GetResourceRequestStatusCommand = async (output, context) => {
392
364
  $metadata: deserializeMetadata(output),
393
365
  ...contents,
394
366
  };
395
- return Promise.resolve(response);
367
+ return response;
396
368
  };
397
369
  exports.de_GetResourceRequestStatusCommand = de_GetResourceRequestStatusCommand;
398
370
  const de_GetResourceRequestStatusCommandError = async (output, context) => {
@@ -407,10 +379,9 @@ const de_GetResourceRequestStatusCommandError = async (output, context) => {
407
379
  throw await de_RequestTokenNotFoundExceptionRes(parsedOutput, context);
408
380
  default:
409
381
  const parsedBody = parsedOutput.body;
410
- (0, smithy_client_1.throwDefaultError)({
382
+ return throwDefaultError({
411
383
  output,
412
384
  parsedBody,
413
- exceptionCtor: CloudControlServiceException_1.CloudControlServiceException,
414
385
  errorCode,
415
386
  });
416
387
  }
@@ -426,7 +397,7 @@ const de_ListResourceRequestsCommand = async (output, context) => {
426
397
  $metadata: deserializeMetadata(output),
427
398
  ...contents,
428
399
  };
429
- return Promise.resolve(response);
400
+ return response;
430
401
  };
431
402
  exports.de_ListResourceRequestsCommand = de_ListResourceRequestsCommand;
432
403
  const de_ListResourceRequestsCommandError = async (output, context) => {
@@ -436,10 +407,9 @@ const de_ListResourceRequestsCommandError = async (output, context) => {
436
407
  };
437
408
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
438
409
  const parsedBody = parsedOutput.body;
439
- (0, smithy_client_1.throwDefaultError)({
410
+ return throwDefaultError({
440
411
  output,
441
412
  parsedBody,
442
- exceptionCtor: CloudControlServiceException_1.CloudControlServiceException,
443
413
  errorCode,
444
414
  });
445
415
  };
@@ -449,12 +419,12 @@ const de_ListResourcesCommand = async (output, context) => {
449
419
  }
450
420
  const data = await parseBody(output.body, context);
451
421
  let contents = {};
452
- contents = de_ListResourcesOutput(data, context);
422
+ contents = (0, smithy_client_1._json)(data);
453
423
  const response = {
454
424
  $metadata: deserializeMetadata(output),
455
425
  ...contents,
456
426
  };
457
- return Promise.resolve(response);
427
+ return response;
458
428
  };
459
429
  exports.de_ListResourcesCommand = de_ListResourcesCommand;
460
430
  const de_ListResourcesCommandError = async (output, context) => {
@@ -517,10 +487,9 @@ const de_ListResourcesCommandError = async (output, context) => {
517
487
  throw await de_UnsupportedActionExceptionRes(parsedOutput, context);
518
488
  default:
519
489
  const parsedBody = parsedOutput.body;
520
- (0, smithy_client_1.throwDefaultError)({
490
+ return throwDefaultError({
521
491
  output,
522
492
  parsedBody,
523
- exceptionCtor: CloudControlServiceException_1.CloudControlServiceException,
524
493
  errorCode,
525
494
  });
526
495
  }
@@ -536,7 +505,7 @@ const de_UpdateResourceCommand = async (output, context) => {
536
505
  $metadata: deserializeMetadata(output),
537
506
  ...contents,
538
507
  };
539
- return Promise.resolve(response);
508
+ return response;
540
509
  };
541
510
  exports.de_UpdateResourceCommand = de_UpdateResourceCommand;
542
511
  const de_UpdateResourceCommandError = async (output, context) => {
@@ -605,17 +574,16 @@ const de_UpdateResourceCommandError = async (output, context) => {
605
574
  throw await de_UnsupportedActionExceptionRes(parsedOutput, context);
606
575
  default:
607
576
  const parsedBody = parsedOutput.body;
608
- (0, smithy_client_1.throwDefaultError)({
577
+ return throwDefaultError({
609
578
  output,
610
579
  parsedBody,
611
- exceptionCtor: CloudControlServiceException_1.CloudControlServiceException,
612
580
  errorCode,
613
581
  });
614
582
  }
615
583
  };
616
584
  const de_AlreadyExistsExceptionRes = async (parsedOutput, context) => {
617
585
  const body = parsedOutput.body;
618
- const deserialized = de_AlreadyExistsException(body, context);
586
+ const deserialized = (0, smithy_client_1._json)(body);
619
587
  const exception = new models_0_1.AlreadyExistsException({
620
588
  $metadata: deserializeMetadata(parsedOutput),
621
589
  ...deserialized,
@@ -624,7 +592,7 @@ const de_AlreadyExistsExceptionRes = async (parsedOutput, context) => {
624
592
  };
625
593
  const de_ClientTokenConflictExceptionRes = async (parsedOutput, context) => {
626
594
  const body = parsedOutput.body;
627
- const deserialized = de_ClientTokenConflictException(body, context);
595
+ const deserialized = (0, smithy_client_1._json)(body);
628
596
  const exception = new models_0_1.ClientTokenConflictException({
629
597
  $metadata: deserializeMetadata(parsedOutput),
630
598
  ...deserialized,
@@ -633,7 +601,7 @@ const de_ClientTokenConflictExceptionRes = async (parsedOutput, context) => {
633
601
  };
634
602
  const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
635
603
  const body = parsedOutput.body;
636
- const deserialized = de_ConcurrentModificationException(body, context);
604
+ const deserialized = (0, smithy_client_1._json)(body);
637
605
  const exception = new models_0_1.ConcurrentModificationException({
638
606
  $metadata: deserializeMetadata(parsedOutput),
639
607
  ...deserialized,
@@ -642,7 +610,7 @@ const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
642
610
  };
643
611
  const de_ConcurrentOperationExceptionRes = async (parsedOutput, context) => {
644
612
  const body = parsedOutput.body;
645
- const deserialized = de_ConcurrentOperationException(body, context);
613
+ const deserialized = (0, smithy_client_1._json)(body);
646
614
  const exception = new models_0_1.ConcurrentOperationException({
647
615
  $metadata: deserializeMetadata(parsedOutput),
648
616
  ...deserialized,
@@ -651,7 +619,7 @@ const de_ConcurrentOperationExceptionRes = async (parsedOutput, context) => {
651
619
  };
652
620
  const de_GeneralServiceExceptionRes = async (parsedOutput, context) => {
653
621
  const body = parsedOutput.body;
654
- const deserialized = de_GeneralServiceException(body, context);
622
+ const deserialized = (0, smithy_client_1._json)(body);
655
623
  const exception = new models_0_1.GeneralServiceException({
656
624
  $metadata: deserializeMetadata(parsedOutput),
657
625
  ...deserialized,
@@ -660,7 +628,7 @@ const de_GeneralServiceExceptionRes = async (parsedOutput, context) => {
660
628
  };
661
629
  const de_HandlerFailureExceptionRes = async (parsedOutput, context) => {
662
630
  const body = parsedOutput.body;
663
- const deserialized = de_HandlerFailureException(body, context);
631
+ const deserialized = (0, smithy_client_1._json)(body);
664
632
  const exception = new models_0_1.HandlerFailureException({
665
633
  $metadata: deserializeMetadata(parsedOutput),
666
634
  ...deserialized,
@@ -669,7 +637,7 @@ const de_HandlerFailureExceptionRes = async (parsedOutput, context) => {
669
637
  };
670
638
  const de_HandlerInternalFailureExceptionRes = async (parsedOutput, context) => {
671
639
  const body = parsedOutput.body;
672
- const deserialized = de_HandlerInternalFailureException(body, context);
640
+ const deserialized = (0, smithy_client_1._json)(body);
673
641
  const exception = new models_0_1.HandlerInternalFailureException({
674
642
  $metadata: deserializeMetadata(parsedOutput),
675
643
  ...deserialized,
@@ -678,7 +646,7 @@ const de_HandlerInternalFailureExceptionRes = async (parsedOutput, context) => {
678
646
  };
679
647
  const de_InvalidCredentialsExceptionRes = async (parsedOutput, context) => {
680
648
  const body = parsedOutput.body;
681
- const deserialized = de_InvalidCredentialsException(body, context);
649
+ const deserialized = (0, smithy_client_1._json)(body);
682
650
  const exception = new models_0_1.InvalidCredentialsException({
683
651
  $metadata: deserializeMetadata(parsedOutput),
684
652
  ...deserialized,
@@ -687,7 +655,7 @@ const de_InvalidCredentialsExceptionRes = async (parsedOutput, context) => {
687
655
  };
688
656
  const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
689
657
  const body = parsedOutput.body;
690
- const deserialized = de_InvalidRequestException(body, context);
658
+ const deserialized = (0, smithy_client_1._json)(body);
691
659
  const exception = new models_0_1.InvalidRequestException({
692
660
  $metadata: deserializeMetadata(parsedOutput),
693
661
  ...deserialized,
@@ -696,7 +664,7 @@ const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
696
664
  };
697
665
  const de_NetworkFailureExceptionRes = async (parsedOutput, context) => {
698
666
  const body = parsedOutput.body;
699
- const deserialized = de_NetworkFailureException(body, context);
667
+ const deserialized = (0, smithy_client_1._json)(body);
700
668
  const exception = new models_0_1.NetworkFailureException({
701
669
  $metadata: deserializeMetadata(parsedOutput),
702
670
  ...deserialized,
@@ -705,7 +673,7 @@ const de_NetworkFailureExceptionRes = async (parsedOutput, context) => {
705
673
  };
706
674
  const de_NotStabilizedExceptionRes = async (parsedOutput, context) => {
707
675
  const body = parsedOutput.body;
708
- const deserialized = de_NotStabilizedException(body, context);
676
+ const deserialized = (0, smithy_client_1._json)(body);
709
677
  const exception = new models_0_1.NotStabilizedException({
710
678
  $metadata: deserializeMetadata(parsedOutput),
711
679
  ...deserialized,
@@ -714,7 +682,7 @@ const de_NotStabilizedExceptionRes = async (parsedOutput, context) => {
714
682
  };
715
683
  const de_NotUpdatableExceptionRes = async (parsedOutput, context) => {
716
684
  const body = parsedOutput.body;
717
- const deserialized = de_NotUpdatableException(body, context);
685
+ const deserialized = (0, smithy_client_1._json)(body);
718
686
  const exception = new models_0_1.NotUpdatableException({
719
687
  $metadata: deserializeMetadata(parsedOutput),
720
688
  ...deserialized,
@@ -723,7 +691,7 @@ const de_NotUpdatableExceptionRes = async (parsedOutput, context) => {
723
691
  };
724
692
  const de_PrivateTypeExceptionRes = async (parsedOutput, context) => {
725
693
  const body = parsedOutput.body;
726
- const deserialized = de_PrivateTypeException(body, context);
694
+ const deserialized = (0, smithy_client_1._json)(body);
727
695
  const exception = new models_0_1.PrivateTypeException({
728
696
  $metadata: deserializeMetadata(parsedOutput),
729
697
  ...deserialized,
@@ -732,7 +700,7 @@ const de_PrivateTypeExceptionRes = async (parsedOutput, context) => {
732
700
  };
733
701
  const de_RequestTokenNotFoundExceptionRes = async (parsedOutput, context) => {
734
702
  const body = parsedOutput.body;
735
- const deserialized = de_RequestTokenNotFoundException(body, context);
703
+ const deserialized = (0, smithy_client_1._json)(body);
736
704
  const exception = new models_0_1.RequestTokenNotFoundException({
737
705
  $metadata: deserializeMetadata(parsedOutput),
738
706
  ...deserialized,
@@ -741,7 +709,7 @@ const de_RequestTokenNotFoundExceptionRes = async (parsedOutput, context) => {
741
709
  };
742
710
  const de_ResourceConflictExceptionRes = async (parsedOutput, context) => {
743
711
  const body = parsedOutput.body;
744
- const deserialized = de_ResourceConflictException(body, context);
712
+ const deserialized = (0, smithy_client_1._json)(body);
745
713
  const exception = new models_0_1.ResourceConflictException({
746
714
  $metadata: deserializeMetadata(parsedOutput),
747
715
  ...deserialized,
@@ -750,7 +718,7 @@ const de_ResourceConflictExceptionRes = async (parsedOutput, context) => {
750
718
  };
751
719
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
752
720
  const body = parsedOutput.body;
753
- const deserialized = de_ResourceNotFoundException(body, context);
721
+ const deserialized = (0, smithy_client_1._json)(body);
754
722
  const exception = new models_0_1.ResourceNotFoundException({
755
723
  $metadata: deserializeMetadata(parsedOutput),
756
724
  ...deserialized,
@@ -759,7 +727,7 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
759
727
  };
760
728
  const de_ServiceInternalErrorExceptionRes = async (parsedOutput, context) => {
761
729
  const body = parsedOutput.body;
762
- const deserialized = de_ServiceInternalErrorException(body, context);
730
+ const deserialized = (0, smithy_client_1._json)(body);
763
731
  const exception = new models_0_1.ServiceInternalErrorException({
764
732
  $metadata: deserializeMetadata(parsedOutput),
765
733
  ...deserialized,
@@ -768,7 +736,7 @@ const de_ServiceInternalErrorExceptionRes = async (parsedOutput, context) => {
768
736
  };
769
737
  const de_ServiceLimitExceededExceptionRes = async (parsedOutput, context) => {
770
738
  const body = parsedOutput.body;
771
- const deserialized = de_ServiceLimitExceededException(body, context);
739
+ const deserialized = (0, smithy_client_1._json)(body);
772
740
  const exception = new models_0_1.ServiceLimitExceededException({
773
741
  $metadata: deserializeMetadata(parsedOutput),
774
742
  ...deserialized,
@@ -777,7 +745,7 @@ const de_ServiceLimitExceededExceptionRes = async (parsedOutput, context) => {
777
745
  };
778
746
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
779
747
  const body = parsedOutput.body;
780
- const deserialized = de_ThrottlingException(body, context);
748
+ const deserialized = (0, smithy_client_1._json)(body);
781
749
  const exception = new models_0_1.ThrottlingException({
782
750
  $metadata: deserializeMetadata(parsedOutput),
783
751
  ...deserialized,
@@ -786,7 +754,7 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
786
754
  };
787
755
  const de_TypeNotFoundExceptionRes = async (parsedOutput, context) => {
788
756
  const body = parsedOutput.body;
789
- const deserialized = de_TypeNotFoundException(body, context);
757
+ const deserialized = (0, smithy_client_1._json)(body);
790
758
  const exception = new models_0_1.TypeNotFoundException({
791
759
  $metadata: deserializeMetadata(parsedOutput),
792
760
  ...deserialized,
@@ -795,292 +763,93 @@ const de_TypeNotFoundExceptionRes = async (parsedOutput, context) => {
795
763
  };
796
764
  const de_UnsupportedActionExceptionRes = async (parsedOutput, context) => {
797
765
  const body = parsedOutput.body;
798
- const deserialized = de_UnsupportedActionException(body, context);
766
+ const deserialized = (0, smithy_client_1._json)(body);
799
767
  const exception = new models_0_1.UnsupportedActionException({
800
768
  $metadata: deserializeMetadata(parsedOutput),
801
769
  ...deserialized,
802
770
  });
803
771
  return (0, smithy_client_1.decorateServiceException)(exception, body);
804
772
  };
805
- const se_CancelResourceRequestInput = (input, context) => {
806
- return {
807
- ...(input.RequestToken != null && { RequestToken: input.RequestToken }),
808
- };
809
- };
810
773
  const se_CreateResourceInput = (input, context) => {
811
- return {
812
- ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
813
- ...(input.DesiredState != null && { DesiredState: input.DesiredState }),
814
- ...(input.RoleArn != null && { RoleArn: input.RoleArn }),
815
- ...(input.TypeName != null && { TypeName: input.TypeName }),
816
- ...(input.TypeVersionId != null && { TypeVersionId: input.TypeVersionId }),
817
- };
818
- };
819
- const se_DeleteResourceInput = (input, context) => {
820
- return {
821
- ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
822
- ...(input.Identifier != null && { Identifier: input.Identifier }),
823
- ...(input.RoleArn != null && { RoleArn: input.RoleArn }),
824
- ...(input.TypeName != null && { TypeName: input.TypeName }),
825
- ...(input.TypeVersionId != null && { TypeVersionId: input.TypeVersionId }),
826
- };
827
- };
828
- const se_GetResourceInput = (input, context) => {
829
- return {
830
- ...(input.Identifier != null && { Identifier: input.Identifier }),
831
- ...(input.RoleArn != null && { RoleArn: input.RoleArn }),
832
- ...(input.TypeName != null && { TypeName: input.TypeName }),
833
- ...(input.TypeVersionId != null && { TypeVersionId: input.TypeVersionId }),
834
- };
835
- };
836
- const se_GetResourceRequestStatusInput = (input, context) => {
837
- return {
838
- ...(input.RequestToken != null && { RequestToken: input.RequestToken }),
839
- };
840
- };
841
- const se_ListResourceRequestsInput = (input, context) => {
842
- return {
843
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
844
- ...(input.NextToken != null && { NextToken: input.NextToken }),
845
- ...(input.ResourceRequestStatusFilter != null && {
846
- ResourceRequestStatusFilter: se_ResourceRequestStatusFilter(input.ResourceRequestStatusFilter, context),
847
- }),
848
- };
849
- };
850
- const se_ListResourcesInput = (input, context) => {
851
- return {
852
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
853
- ...(input.NextToken != null && { NextToken: input.NextToken }),
854
- ...(input.ResourceModel != null && { ResourceModel: input.ResourceModel }),
855
- ...(input.RoleArn != null && { RoleArn: input.RoleArn }),
856
- ...(input.TypeName != null && { TypeName: input.TypeName }),
857
- ...(input.TypeVersionId != null && { TypeVersionId: input.TypeVersionId }),
858
- };
859
- };
860
- const se_Operations = (input, context) => {
861
- return input
862
- .filter((e) => e != null)
863
- .map((entry) => {
864
- return entry;
774
+ return (0, smithy_client_1.take)(input, {
775
+ ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
776
+ DesiredState: [],
777
+ RoleArn: [],
778
+ TypeName: [],
779
+ TypeVersionId: [],
865
780
  });
866
781
  };
867
- const se_OperationStatuses = (input, context) => {
868
- return input
869
- .filter((e) => e != null)
870
- .map((entry) => {
871
- return entry;
782
+ const se_DeleteResourceInput = (input, context) => {
783
+ return (0, smithy_client_1.take)(input, {
784
+ ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
785
+ Identifier: [],
786
+ RoleArn: [],
787
+ TypeName: [],
788
+ TypeVersionId: [],
872
789
  });
873
790
  };
874
- const se_ResourceRequestStatusFilter = (input, context) => {
875
- return {
876
- ...(input.OperationStatuses != null && {
877
- OperationStatuses: se_OperationStatuses(input.OperationStatuses, context),
878
- }),
879
- ...(input.Operations != null && { Operations: se_Operations(input.Operations, context) }),
880
- };
881
- };
882
791
  const se_UpdateResourceInput = (input, context) => {
883
- return {
884
- ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
885
- ...(input.Identifier != null && { Identifier: input.Identifier }),
886
- ...(input.PatchDocument != null && { PatchDocument: input.PatchDocument }),
887
- ...(input.RoleArn != null && { RoleArn: input.RoleArn }),
888
- ...(input.TypeName != null && { TypeName: input.TypeName }),
889
- ...(input.TypeVersionId != null && { TypeVersionId: input.TypeVersionId }),
890
- };
891
- };
892
- const de_AlreadyExistsException = (output, context) => {
893
- return {
894
- Message: (0, smithy_client_1.expectString)(output.Message),
895
- };
792
+ return (0, smithy_client_1.take)(input, {
793
+ ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
794
+ Identifier: [],
795
+ PatchDocument: [],
796
+ RoleArn: [],
797
+ TypeName: [],
798
+ TypeVersionId: [],
799
+ });
896
800
  };
897
801
  const de_CancelResourceRequestOutput = (output, context) => {
898
- return {
899
- ProgressEvent: output.ProgressEvent != null ? de_ProgressEvent(output.ProgressEvent, context) : undefined,
900
- };
901
- };
902
- const de_ClientTokenConflictException = (output, context) => {
903
- return {
904
- Message: (0, smithy_client_1.expectString)(output.Message),
905
- };
906
- };
907
- const de_ConcurrentModificationException = (output, context) => {
908
- return {
909
- Message: (0, smithy_client_1.expectString)(output.Message),
910
- };
911
- };
912
- const de_ConcurrentOperationException = (output, context) => {
913
- return {
914
- Message: (0, smithy_client_1.expectString)(output.Message),
915
- };
802
+ return (0, smithy_client_1.take)(output, {
803
+ ProgressEvent: (_) => de_ProgressEvent(_, context),
804
+ });
916
805
  };
917
806
  const de_CreateResourceOutput = (output, context) => {
918
- return {
919
- ProgressEvent: output.ProgressEvent != null ? de_ProgressEvent(output.ProgressEvent, context) : undefined,
920
- };
807
+ return (0, smithy_client_1.take)(output, {
808
+ ProgressEvent: (_) => de_ProgressEvent(_, context),
809
+ });
921
810
  };
922
811
  const de_DeleteResourceOutput = (output, context) => {
923
- return {
924
- ProgressEvent: output.ProgressEvent != null ? de_ProgressEvent(output.ProgressEvent, context) : undefined,
925
- };
926
- };
927
- const de_GeneralServiceException = (output, context) => {
928
- return {
929
- Message: (0, smithy_client_1.expectString)(output.Message),
930
- };
931
- };
932
- const de_GetResourceOutput = (output, context) => {
933
- return {
934
- ResourceDescription: output.ResourceDescription != null ? de_ResourceDescription(output.ResourceDescription, context) : undefined,
935
- TypeName: (0, smithy_client_1.expectString)(output.TypeName),
936
- };
812
+ return (0, smithy_client_1.take)(output, {
813
+ ProgressEvent: (_) => de_ProgressEvent(_, context),
814
+ });
937
815
  };
938
816
  const de_GetResourceRequestStatusOutput = (output, context) => {
939
- return {
940
- ProgressEvent: output.ProgressEvent != null ? de_ProgressEvent(output.ProgressEvent, context) : undefined,
941
- };
942
- };
943
- const de_HandlerFailureException = (output, context) => {
944
- return {
945
- Message: (0, smithy_client_1.expectString)(output.Message),
946
- };
947
- };
948
- const de_HandlerInternalFailureException = (output, context) => {
949
- return {
950
- Message: (0, smithy_client_1.expectString)(output.Message),
951
- };
952
- };
953
- const de_InvalidCredentialsException = (output, context) => {
954
- return {
955
- Message: (0, smithy_client_1.expectString)(output.Message),
956
- };
957
- };
958
- const de_InvalidRequestException = (output, context) => {
959
- return {
960
- Message: (0, smithy_client_1.expectString)(output.Message),
961
- };
817
+ return (0, smithy_client_1.take)(output, {
818
+ ProgressEvent: (_) => de_ProgressEvent(_, context),
819
+ });
962
820
  };
963
821
  const de_ListResourceRequestsOutput = (output, context) => {
964
- return {
965
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
966
- ResourceRequestStatusSummaries: output.ResourceRequestStatusSummaries != null
967
- ? de_ResourceRequestStatusSummaries(output.ResourceRequestStatusSummaries, context)
968
- : undefined,
969
- };
970
- };
971
- const de_ListResourcesOutput = (output, context) => {
972
- return {
973
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
974
- ResourceDescriptions: output.ResourceDescriptions != null ? de_ResourceDescriptions(output.ResourceDescriptions, context) : undefined,
975
- TypeName: (0, smithy_client_1.expectString)(output.TypeName),
976
- };
977
- };
978
- const de_NetworkFailureException = (output, context) => {
979
- return {
980
- Message: (0, smithy_client_1.expectString)(output.Message),
981
- };
982
- };
983
- const de_NotStabilizedException = (output, context) => {
984
- return {
985
- Message: (0, smithy_client_1.expectString)(output.Message),
986
- };
987
- };
988
- const de_NotUpdatableException = (output, context) => {
989
- return {
990
- Message: (0, smithy_client_1.expectString)(output.Message),
991
- };
992
- };
993
- const de_PrivateTypeException = (output, context) => {
994
- return {
995
- Message: (0, smithy_client_1.expectString)(output.Message),
996
- };
822
+ return (0, smithy_client_1.take)(output, {
823
+ NextToken: smithy_client_1.expectString,
824
+ ResourceRequestStatusSummaries: (_) => de_ResourceRequestStatusSummaries(_, context),
825
+ });
997
826
  };
998
827
  const de_ProgressEvent = (output, context) => {
999
- return {
1000
- ErrorCode: (0, smithy_client_1.expectString)(output.ErrorCode),
1001
- EventTime: output.EventTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.EventTime))) : undefined,
1002
- Identifier: (0, smithy_client_1.expectString)(output.Identifier),
1003
- Operation: (0, smithy_client_1.expectString)(output.Operation),
1004
- OperationStatus: (0, smithy_client_1.expectString)(output.OperationStatus),
1005
- RequestToken: (0, smithy_client_1.expectString)(output.RequestToken),
1006
- ResourceModel: (0, smithy_client_1.expectString)(output.ResourceModel),
1007
- RetryAfter: output.RetryAfter != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.RetryAfter))) : undefined,
1008
- StatusMessage: (0, smithy_client_1.expectString)(output.StatusMessage),
1009
- TypeName: (0, smithy_client_1.expectString)(output.TypeName),
1010
- };
1011
- };
1012
- const de_RequestTokenNotFoundException = (output, context) => {
1013
- return {
1014
- Message: (0, smithy_client_1.expectString)(output.Message),
1015
- };
1016
- };
1017
- const de_ResourceConflictException = (output, context) => {
1018
- return {
1019
- Message: (0, smithy_client_1.expectString)(output.Message),
1020
- };
1021
- };
1022
- const de_ResourceDescription = (output, context) => {
1023
- return {
1024
- Identifier: (0, smithy_client_1.expectString)(output.Identifier),
1025
- Properties: (0, smithy_client_1.expectString)(output.Properties),
1026
- };
1027
- };
1028
- const de_ResourceDescriptions = (output, context) => {
1029
- const retVal = (output || [])
1030
- .filter((e) => e != null)
1031
- .map((entry) => {
1032
- if (entry === null) {
1033
- return null;
1034
- }
1035
- return de_ResourceDescription(entry, context);
828
+ return (0, smithy_client_1.take)(output, {
829
+ ErrorCode: smithy_client_1.expectString,
830
+ EventTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
831
+ Identifier: smithy_client_1.expectString,
832
+ Operation: smithy_client_1.expectString,
833
+ OperationStatus: smithy_client_1.expectString,
834
+ RequestToken: smithy_client_1.expectString,
835
+ ResourceModel: smithy_client_1.expectString,
836
+ RetryAfter: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
837
+ StatusMessage: smithy_client_1.expectString,
838
+ TypeName: smithy_client_1.expectString,
1036
839
  });
1037
- return retVal;
1038
- };
1039
- const de_ResourceNotFoundException = (output, context) => {
1040
- return {
1041
- Message: (0, smithy_client_1.expectString)(output.Message),
1042
- };
1043
840
  };
1044
841
  const de_ResourceRequestStatusSummaries = (output, context) => {
1045
842
  const retVal = (output || [])
1046
843
  .filter((e) => e != null)
1047
844
  .map((entry) => {
1048
- if (entry === null) {
1049
- return null;
1050
- }
1051
845
  return de_ProgressEvent(entry, context);
1052
846
  });
1053
847
  return retVal;
1054
848
  };
1055
- const de_ServiceInternalErrorException = (output, context) => {
1056
- return {
1057
- Message: (0, smithy_client_1.expectString)(output.Message),
1058
- };
1059
- };
1060
- const de_ServiceLimitExceededException = (output, context) => {
1061
- return {
1062
- Message: (0, smithy_client_1.expectString)(output.Message),
1063
- };
1064
- };
1065
- const de_ThrottlingException = (output, context) => {
1066
- return {
1067
- Message: (0, smithy_client_1.expectString)(output.Message),
1068
- };
1069
- };
1070
- const de_TypeNotFoundException = (output, context) => {
1071
- return {
1072
- Message: (0, smithy_client_1.expectString)(output.Message),
1073
- };
1074
- };
1075
- const de_UnsupportedActionException = (output, context) => {
1076
- return {
1077
- Message: (0, smithy_client_1.expectString)(output.Message),
1078
- };
1079
- };
1080
849
  const de_UpdateResourceOutput = (output, context) => {
1081
- return {
1082
- ProgressEvent: output.ProgressEvent != null ? de_ProgressEvent(output.ProgressEvent, context) : undefined,
1083
- };
850
+ return (0, smithy_client_1.take)(output, {
851
+ ProgressEvent: (_) => de_ProgressEvent(_, context),
852
+ });
1084
853
  };
1085
854
  const deserializeMetadata = (output) => ({
1086
855
  httpStatusCode: output.statusCode,
@@ -1095,6 +864,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
1095
864
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1096
865
  };
1097
866
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
867
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(CloudControlServiceException_1.CloudControlServiceException);
1098
868
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1099
869
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1100
870
  const contents = {
@@ -1113,6 +883,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
1113
883
  }
1114
884
  return new protocol_http_1.HttpRequest(contents);
1115
885
  };
886
+ function sharedHeaders(operation) {
887
+ return {
888
+ "content-type": "application/x-amz-json-1.0",
889
+ "x-amz-target": `CloudApiService.${operation}`,
890
+ };
891
+ }
1116
892
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1117
893
  if (encoded.length) {
1118
894
  return JSON.parse(encoded);