@aws-sdk/client-cloud9 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.
@@ -8,91 +8,91 @@ const models_0_1 = require("../models/models_0");
8
8
  const se_CreateEnvironmentEC2Command = async (input, context) => {
9
9
  const headers = sharedHeaders("CreateEnvironmentEC2");
10
10
  let body;
11
- body = JSON.stringify(se_CreateEnvironmentEC2Request(input, context));
11
+ body = JSON.stringify((0, smithy_client_1._json)(input));
12
12
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
13
  };
14
14
  exports.se_CreateEnvironmentEC2Command = se_CreateEnvironmentEC2Command;
15
15
  const se_CreateEnvironmentMembershipCommand = async (input, context) => {
16
16
  const headers = sharedHeaders("CreateEnvironmentMembership");
17
17
  let body;
18
- body = JSON.stringify(se_CreateEnvironmentMembershipRequest(input, context));
18
+ body = JSON.stringify((0, smithy_client_1._json)(input));
19
19
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
20
20
  };
21
21
  exports.se_CreateEnvironmentMembershipCommand = se_CreateEnvironmentMembershipCommand;
22
22
  const se_DeleteEnvironmentCommand = async (input, context) => {
23
23
  const headers = sharedHeaders("DeleteEnvironment");
24
24
  let body;
25
- body = JSON.stringify(se_DeleteEnvironmentRequest(input, context));
25
+ body = JSON.stringify((0, smithy_client_1._json)(input));
26
26
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
27
27
  };
28
28
  exports.se_DeleteEnvironmentCommand = se_DeleteEnvironmentCommand;
29
29
  const se_DeleteEnvironmentMembershipCommand = async (input, context) => {
30
30
  const headers = sharedHeaders("DeleteEnvironmentMembership");
31
31
  let body;
32
- body = JSON.stringify(se_DeleteEnvironmentMembershipRequest(input, context));
32
+ body = JSON.stringify((0, smithy_client_1._json)(input));
33
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
34
34
  };
35
35
  exports.se_DeleteEnvironmentMembershipCommand = se_DeleteEnvironmentMembershipCommand;
36
36
  const se_DescribeEnvironmentMembershipsCommand = async (input, context) => {
37
37
  const headers = sharedHeaders("DescribeEnvironmentMemberships");
38
38
  let body;
39
- body = JSON.stringify(se_DescribeEnvironmentMembershipsRequest(input, context));
39
+ body = JSON.stringify((0, smithy_client_1._json)(input));
40
40
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
41
  };
42
42
  exports.se_DescribeEnvironmentMembershipsCommand = se_DescribeEnvironmentMembershipsCommand;
43
43
  const se_DescribeEnvironmentsCommand = async (input, context) => {
44
44
  const headers = sharedHeaders("DescribeEnvironments");
45
45
  let body;
46
- body = JSON.stringify(se_DescribeEnvironmentsRequest(input, context));
46
+ body = JSON.stringify((0, smithy_client_1._json)(input));
47
47
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
48
48
  };
49
49
  exports.se_DescribeEnvironmentsCommand = se_DescribeEnvironmentsCommand;
50
50
  const se_DescribeEnvironmentStatusCommand = async (input, context) => {
51
51
  const headers = sharedHeaders("DescribeEnvironmentStatus");
52
52
  let body;
53
- body = JSON.stringify(se_DescribeEnvironmentStatusRequest(input, context));
53
+ body = JSON.stringify((0, smithy_client_1._json)(input));
54
54
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
55
55
  };
56
56
  exports.se_DescribeEnvironmentStatusCommand = se_DescribeEnvironmentStatusCommand;
57
57
  const se_ListEnvironmentsCommand = async (input, context) => {
58
58
  const headers = sharedHeaders("ListEnvironments");
59
59
  let body;
60
- body = JSON.stringify(se_ListEnvironmentsRequest(input, context));
60
+ body = JSON.stringify((0, smithy_client_1._json)(input));
61
61
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
62
62
  };
63
63
  exports.se_ListEnvironmentsCommand = se_ListEnvironmentsCommand;
64
64
  const se_ListTagsForResourceCommand = async (input, context) => {
65
65
  const headers = sharedHeaders("ListTagsForResource");
66
66
  let body;
67
- body = JSON.stringify(se_ListTagsForResourceRequest(input, context));
67
+ body = JSON.stringify((0, smithy_client_1._json)(input));
68
68
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
69
69
  };
70
70
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
71
71
  const se_TagResourceCommand = async (input, context) => {
72
72
  const headers = sharedHeaders("TagResource");
73
73
  let body;
74
- body = JSON.stringify(se_TagResourceRequest(input, context));
74
+ body = JSON.stringify((0, smithy_client_1._json)(input));
75
75
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
76
  };
77
77
  exports.se_TagResourceCommand = se_TagResourceCommand;
78
78
  const se_UntagResourceCommand = async (input, context) => {
79
79
  const headers = sharedHeaders("UntagResource");
80
80
  let body;
81
- body = JSON.stringify(se_UntagResourceRequest(input, context));
81
+ body = JSON.stringify((0, smithy_client_1._json)(input));
82
82
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
83
83
  };
84
84
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
85
85
  const se_UpdateEnvironmentCommand = async (input, context) => {
86
86
  const headers = sharedHeaders("UpdateEnvironment");
87
87
  let body;
88
- body = JSON.stringify(se_UpdateEnvironmentRequest(input, context));
88
+ body = JSON.stringify((0, smithy_client_1._json)(input));
89
89
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
90
90
  };
91
91
  exports.se_UpdateEnvironmentCommand = se_UpdateEnvironmentCommand;
92
92
  const se_UpdateEnvironmentMembershipCommand = async (input, context) => {
93
93
  const headers = sharedHeaders("UpdateEnvironmentMembership");
94
94
  let body;
95
- body = JSON.stringify(se_UpdateEnvironmentMembershipRequest(input, context));
95
+ body = JSON.stringify((0, smithy_client_1._json)(input));
96
96
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
97
97
  };
98
98
  exports.se_UpdateEnvironmentMembershipCommand = se_UpdateEnvironmentMembershipCommand;
@@ -102,12 +102,12 @@ const de_CreateEnvironmentEC2Command = async (output, context) => {
102
102
  }
103
103
  const data = await parseBody(output.body, context);
104
104
  let contents = {};
105
- contents = de_CreateEnvironmentEC2Result(data, context);
105
+ contents = (0, smithy_client_1._json)(data);
106
106
  const response = {
107
107
  $metadata: deserializeMetadata(output),
108
108
  ...contents,
109
109
  };
110
- return Promise.resolve(response);
110
+ return response;
111
111
  };
112
112
  exports.de_CreateEnvironmentEC2Command = de_CreateEnvironmentEC2Command;
113
113
  const de_CreateEnvironmentEC2CommandError = async (output, context) => {
@@ -140,10 +140,9 @@ const de_CreateEnvironmentEC2CommandError = async (output, context) => {
140
140
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
141
141
  default:
142
142
  const parsedBody = parsedOutput.body;
143
- (0, smithy_client_1.throwDefaultError)({
143
+ return throwDefaultError({
144
144
  output,
145
145
  parsedBody,
146
- exceptionCtor: Cloud9ServiceException_1.Cloud9ServiceException,
147
146
  errorCode,
148
147
  });
149
148
  }
@@ -159,7 +158,7 @@ const de_CreateEnvironmentMembershipCommand = async (output, context) => {
159
158
  $metadata: deserializeMetadata(output),
160
159
  ...contents,
161
160
  };
162
- return Promise.resolve(response);
161
+ return response;
163
162
  };
164
163
  exports.de_CreateEnvironmentMembershipCommand = de_CreateEnvironmentMembershipCommand;
165
164
  const de_CreateEnvironmentMembershipCommandError = async (output, context) => {
@@ -192,10 +191,9 @@ const de_CreateEnvironmentMembershipCommandError = async (output, context) => {
192
191
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
193
192
  default:
194
193
  const parsedBody = parsedOutput.body;
195
- (0, smithy_client_1.throwDefaultError)({
194
+ return throwDefaultError({
196
195
  output,
197
196
  parsedBody,
198
- exceptionCtor: Cloud9ServiceException_1.Cloud9ServiceException,
199
197
  errorCode,
200
198
  });
201
199
  }
@@ -206,12 +204,12 @@ const de_DeleteEnvironmentCommand = async (output, context) => {
206
204
  }
207
205
  const data = await parseBody(output.body, context);
208
206
  let contents = {};
209
- contents = de_DeleteEnvironmentResult(data, context);
207
+ contents = (0, smithy_client_1._json)(data);
210
208
  const response = {
211
209
  $metadata: deserializeMetadata(output),
212
210
  ...contents,
213
211
  };
214
- return Promise.resolve(response);
212
+ return response;
215
213
  };
216
214
  exports.de_DeleteEnvironmentCommand = de_DeleteEnvironmentCommand;
217
215
  const de_DeleteEnvironmentCommandError = async (output, context) => {
@@ -244,10 +242,9 @@ const de_DeleteEnvironmentCommandError = async (output, context) => {
244
242
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
245
243
  default:
246
244
  const parsedBody = parsedOutput.body;
247
- (0, smithy_client_1.throwDefaultError)({
245
+ return throwDefaultError({
248
246
  output,
249
247
  parsedBody,
250
- exceptionCtor: Cloud9ServiceException_1.Cloud9ServiceException,
251
248
  errorCode,
252
249
  });
253
250
  }
@@ -258,12 +255,12 @@ const de_DeleteEnvironmentMembershipCommand = async (output, context) => {
258
255
  }
259
256
  const data = await parseBody(output.body, context);
260
257
  let contents = {};
261
- contents = de_DeleteEnvironmentMembershipResult(data, context);
258
+ contents = (0, smithy_client_1._json)(data);
262
259
  const response = {
263
260
  $metadata: deserializeMetadata(output),
264
261
  ...contents,
265
262
  };
266
- return Promise.resolve(response);
263
+ return response;
267
264
  };
268
265
  exports.de_DeleteEnvironmentMembershipCommand = de_DeleteEnvironmentMembershipCommand;
269
266
  const de_DeleteEnvironmentMembershipCommandError = async (output, context) => {
@@ -296,10 +293,9 @@ const de_DeleteEnvironmentMembershipCommandError = async (output, context) => {
296
293
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
297
294
  default:
298
295
  const parsedBody = parsedOutput.body;
299
- (0, smithy_client_1.throwDefaultError)({
296
+ return throwDefaultError({
300
297
  output,
301
298
  parsedBody,
302
- exceptionCtor: Cloud9ServiceException_1.Cloud9ServiceException,
303
299
  errorCode,
304
300
  });
305
301
  }
@@ -315,7 +311,7 @@ const de_DescribeEnvironmentMembershipsCommand = async (output, context) => {
315
311
  $metadata: deserializeMetadata(output),
316
312
  ...contents,
317
313
  };
318
- return Promise.resolve(response);
314
+ return response;
319
315
  };
320
316
  exports.de_DescribeEnvironmentMembershipsCommand = de_DescribeEnvironmentMembershipsCommand;
321
317
  const de_DescribeEnvironmentMembershipsCommandError = async (output, context) => {
@@ -348,10 +344,9 @@ const de_DescribeEnvironmentMembershipsCommandError = async (output, context) =>
348
344
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
349
345
  default:
350
346
  const parsedBody = parsedOutput.body;
351
- (0, smithy_client_1.throwDefaultError)({
347
+ return throwDefaultError({
352
348
  output,
353
349
  parsedBody,
354
- exceptionCtor: Cloud9ServiceException_1.Cloud9ServiceException,
355
350
  errorCode,
356
351
  });
357
352
  }
@@ -362,12 +357,12 @@ const de_DescribeEnvironmentsCommand = async (output, context) => {
362
357
  }
363
358
  const data = await parseBody(output.body, context);
364
359
  let contents = {};
365
- contents = de_DescribeEnvironmentsResult(data, context);
360
+ contents = (0, smithy_client_1._json)(data);
366
361
  const response = {
367
362
  $metadata: deserializeMetadata(output),
368
363
  ...contents,
369
364
  };
370
- return Promise.resolve(response);
365
+ return response;
371
366
  };
372
367
  exports.de_DescribeEnvironmentsCommand = de_DescribeEnvironmentsCommand;
373
368
  const de_DescribeEnvironmentsCommandError = async (output, context) => {
@@ -400,10 +395,9 @@ const de_DescribeEnvironmentsCommandError = async (output, context) => {
400
395
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
401
396
  default:
402
397
  const parsedBody = parsedOutput.body;
403
- (0, smithy_client_1.throwDefaultError)({
398
+ return throwDefaultError({
404
399
  output,
405
400
  parsedBody,
406
- exceptionCtor: Cloud9ServiceException_1.Cloud9ServiceException,
407
401
  errorCode,
408
402
  });
409
403
  }
@@ -414,12 +408,12 @@ const de_DescribeEnvironmentStatusCommand = async (output, context) => {
414
408
  }
415
409
  const data = await parseBody(output.body, context);
416
410
  let contents = {};
417
- contents = de_DescribeEnvironmentStatusResult(data, context);
411
+ contents = (0, smithy_client_1._json)(data);
418
412
  const response = {
419
413
  $metadata: deserializeMetadata(output),
420
414
  ...contents,
421
415
  };
422
- return Promise.resolve(response);
416
+ return response;
423
417
  };
424
418
  exports.de_DescribeEnvironmentStatusCommand = de_DescribeEnvironmentStatusCommand;
425
419
  const de_DescribeEnvironmentStatusCommandError = async (output, context) => {
@@ -452,10 +446,9 @@ const de_DescribeEnvironmentStatusCommandError = async (output, context) => {
452
446
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
453
447
  default:
454
448
  const parsedBody = parsedOutput.body;
455
- (0, smithy_client_1.throwDefaultError)({
449
+ return throwDefaultError({
456
450
  output,
457
451
  parsedBody,
458
- exceptionCtor: Cloud9ServiceException_1.Cloud9ServiceException,
459
452
  errorCode,
460
453
  });
461
454
  }
@@ -466,12 +459,12 @@ const de_ListEnvironmentsCommand = async (output, context) => {
466
459
  }
467
460
  const data = await parseBody(output.body, context);
468
461
  let contents = {};
469
- contents = de_ListEnvironmentsResult(data, context);
462
+ contents = (0, smithy_client_1._json)(data);
470
463
  const response = {
471
464
  $metadata: deserializeMetadata(output),
472
465
  ...contents,
473
466
  };
474
- return Promise.resolve(response);
467
+ return response;
475
468
  };
476
469
  exports.de_ListEnvironmentsCommand = de_ListEnvironmentsCommand;
477
470
  const de_ListEnvironmentsCommandError = async (output, context) => {
@@ -504,10 +497,9 @@ const de_ListEnvironmentsCommandError = async (output, context) => {
504
497
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
505
498
  default:
506
499
  const parsedBody = parsedOutput.body;
507
- (0, smithy_client_1.throwDefaultError)({
500
+ return throwDefaultError({
508
501
  output,
509
502
  parsedBody,
510
- exceptionCtor: Cloud9ServiceException_1.Cloud9ServiceException,
511
503
  errorCode,
512
504
  });
513
505
  }
@@ -518,12 +510,12 @@ const de_ListTagsForResourceCommand = async (output, context) => {
518
510
  }
519
511
  const data = await parseBody(output.body, context);
520
512
  let contents = {};
521
- contents = de_ListTagsForResourceResponse(data, context);
513
+ contents = (0, smithy_client_1._json)(data);
522
514
  const response = {
523
515
  $metadata: deserializeMetadata(output),
524
516
  ...contents,
525
517
  };
526
- return Promise.resolve(response);
518
+ return response;
527
519
  };
528
520
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
529
521
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -544,10 +536,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
544
536
  throw await de_NotFoundExceptionRes(parsedOutput, context);
545
537
  default:
546
538
  const parsedBody = parsedOutput.body;
547
- (0, smithy_client_1.throwDefaultError)({
539
+ return throwDefaultError({
548
540
  output,
549
541
  parsedBody,
550
- exceptionCtor: Cloud9ServiceException_1.Cloud9ServiceException,
551
542
  errorCode,
552
543
  });
553
544
  }
@@ -558,12 +549,12 @@ const de_TagResourceCommand = async (output, context) => {
558
549
  }
559
550
  const data = await parseBody(output.body, context);
560
551
  let contents = {};
561
- contents = de_TagResourceResponse(data, context);
552
+ contents = (0, smithy_client_1._json)(data);
562
553
  const response = {
563
554
  $metadata: deserializeMetadata(output),
564
555
  ...contents,
565
556
  };
566
- return Promise.resolve(response);
557
+ return response;
567
558
  };
568
559
  exports.de_TagResourceCommand = de_TagResourceCommand;
569
560
  const de_TagResourceCommandError = async (output, context) => {
@@ -587,10 +578,9 @@ const de_TagResourceCommandError = async (output, context) => {
587
578
  throw await de_NotFoundExceptionRes(parsedOutput, context);
588
579
  default:
589
580
  const parsedBody = parsedOutput.body;
590
- (0, smithy_client_1.throwDefaultError)({
581
+ return throwDefaultError({
591
582
  output,
592
583
  parsedBody,
593
- exceptionCtor: Cloud9ServiceException_1.Cloud9ServiceException,
594
584
  errorCode,
595
585
  });
596
586
  }
@@ -601,12 +591,12 @@ const de_UntagResourceCommand = async (output, context) => {
601
591
  }
602
592
  const data = await parseBody(output.body, context);
603
593
  let contents = {};
604
- contents = de_UntagResourceResponse(data, context);
594
+ contents = (0, smithy_client_1._json)(data);
605
595
  const response = {
606
596
  $metadata: deserializeMetadata(output),
607
597
  ...contents,
608
598
  };
609
- return Promise.resolve(response);
599
+ return response;
610
600
  };
611
601
  exports.de_UntagResourceCommand = de_UntagResourceCommand;
612
602
  const de_UntagResourceCommandError = async (output, context) => {
@@ -630,10 +620,9 @@ const de_UntagResourceCommandError = async (output, context) => {
630
620
  throw await de_NotFoundExceptionRes(parsedOutput, context);
631
621
  default:
632
622
  const parsedBody = parsedOutput.body;
633
- (0, smithy_client_1.throwDefaultError)({
623
+ return throwDefaultError({
634
624
  output,
635
625
  parsedBody,
636
- exceptionCtor: Cloud9ServiceException_1.Cloud9ServiceException,
637
626
  errorCode,
638
627
  });
639
628
  }
@@ -644,12 +633,12 @@ const de_UpdateEnvironmentCommand = async (output, context) => {
644
633
  }
645
634
  const data = await parseBody(output.body, context);
646
635
  let contents = {};
647
- contents = de_UpdateEnvironmentResult(data, context);
636
+ contents = (0, smithy_client_1._json)(data);
648
637
  const response = {
649
638
  $metadata: deserializeMetadata(output),
650
639
  ...contents,
651
640
  };
652
- return Promise.resolve(response);
641
+ return response;
653
642
  };
654
643
  exports.de_UpdateEnvironmentCommand = de_UpdateEnvironmentCommand;
655
644
  const de_UpdateEnvironmentCommandError = async (output, context) => {
@@ -682,10 +671,9 @@ const de_UpdateEnvironmentCommandError = async (output, context) => {
682
671
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
683
672
  default:
684
673
  const parsedBody = parsedOutput.body;
685
- (0, smithy_client_1.throwDefaultError)({
674
+ return throwDefaultError({
686
675
  output,
687
676
  parsedBody,
688
- exceptionCtor: Cloud9ServiceException_1.Cloud9ServiceException,
689
677
  errorCode,
690
678
  });
691
679
  }
@@ -701,7 +689,7 @@ const de_UpdateEnvironmentMembershipCommand = async (output, context) => {
701
689
  $metadata: deserializeMetadata(output),
702
690
  ...contents,
703
691
  };
704
- return Promise.resolve(response);
692
+ return response;
705
693
  };
706
694
  exports.de_UpdateEnvironmentMembershipCommand = de_UpdateEnvironmentMembershipCommand;
707
695
  const de_UpdateEnvironmentMembershipCommandError = async (output, context) => {
@@ -734,17 +722,16 @@ const de_UpdateEnvironmentMembershipCommandError = async (output, context) => {
734
722
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
735
723
  default:
736
724
  const parsedBody = parsedOutput.body;
737
- (0, smithy_client_1.throwDefaultError)({
725
+ return throwDefaultError({
738
726
  output,
739
727
  parsedBody,
740
- exceptionCtor: Cloud9ServiceException_1.Cloud9ServiceException,
741
728
  errorCode,
742
729
  });
743
730
  }
744
731
  };
745
732
  const de_BadRequestExceptionRes = async (parsedOutput, context) => {
746
733
  const body = parsedOutput.body;
747
- const deserialized = de_BadRequestException(body, context);
734
+ const deserialized = (0, smithy_client_1._json)(body);
748
735
  const exception = new models_0_1.BadRequestException({
749
736
  $metadata: deserializeMetadata(parsedOutput),
750
737
  ...deserialized,
@@ -753,7 +740,7 @@ const de_BadRequestExceptionRes = async (parsedOutput, context) => {
753
740
  };
754
741
  const de_ConcurrentAccessExceptionRes = async (parsedOutput, context) => {
755
742
  const body = parsedOutput.body;
756
- const deserialized = de_ConcurrentAccessException(body, context);
743
+ const deserialized = (0, smithy_client_1._json)(body);
757
744
  const exception = new models_0_1.ConcurrentAccessException({
758
745
  $metadata: deserializeMetadata(parsedOutput),
759
746
  ...deserialized,
@@ -762,7 +749,7 @@ const de_ConcurrentAccessExceptionRes = async (parsedOutput, context) => {
762
749
  };
763
750
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
764
751
  const body = parsedOutput.body;
765
- const deserialized = de_ConflictException(body, context);
752
+ const deserialized = (0, smithy_client_1._json)(body);
766
753
  const exception = new models_0_1.ConflictException({
767
754
  $metadata: deserializeMetadata(parsedOutput),
768
755
  ...deserialized,
@@ -771,7 +758,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
771
758
  };
772
759
  const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
773
760
  const body = parsedOutput.body;
774
- const deserialized = de_ForbiddenException(body, context);
761
+ const deserialized = (0, smithy_client_1._json)(body);
775
762
  const exception = new models_0_1.ForbiddenException({
776
763
  $metadata: deserializeMetadata(parsedOutput),
777
764
  ...deserialized,
@@ -780,7 +767,7 @@ const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
780
767
  };
781
768
  const de_InternalServerErrorExceptionRes = async (parsedOutput, context) => {
782
769
  const body = parsedOutput.body;
783
- const deserialized = de_InternalServerErrorException(body, context);
770
+ const deserialized = (0, smithy_client_1._json)(body);
784
771
  const exception = new models_0_1.InternalServerErrorException({
785
772
  $metadata: deserializeMetadata(parsedOutput),
786
773
  ...deserialized,
@@ -789,7 +776,7 @@ const de_InternalServerErrorExceptionRes = async (parsedOutput, context) => {
789
776
  };
790
777
  const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
791
778
  const body = parsedOutput.body;
792
- const deserialized = de_LimitExceededException(body, context);
779
+ const deserialized = (0, smithy_client_1._json)(body);
793
780
  const exception = new models_0_1.LimitExceededException({
794
781
  $metadata: deserializeMetadata(parsedOutput),
795
782
  ...deserialized,
@@ -798,7 +785,7 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
798
785
  };
799
786
  const de_NotFoundExceptionRes = async (parsedOutput, context) => {
800
787
  const body = parsedOutput.body;
801
- const deserialized = de_NotFoundException(body, context);
788
+ const deserialized = (0, smithy_client_1._json)(body);
802
789
  const exception = new models_0_1.NotFoundException({
803
790
  $metadata: deserializeMetadata(parsedOutput),
804
791
  ...deserialized,
@@ -807,329 +794,45 @@ const de_NotFoundExceptionRes = async (parsedOutput, context) => {
807
794
  };
808
795
  const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
809
796
  const body = parsedOutput.body;
810
- const deserialized = de_TooManyRequestsException(body, context);
797
+ const deserialized = (0, smithy_client_1._json)(body);
811
798
  const exception = new models_0_1.TooManyRequestsException({
812
799
  $metadata: deserializeMetadata(parsedOutput),
813
800
  ...deserialized,
814
801
  });
815
802
  return (0, smithy_client_1.decorateServiceException)(exception, body);
816
803
  };
817
- const se_BoundedEnvironmentIdList = (input, context) => {
818
- return input
819
- .filter((e) => e != null)
820
- .map((entry) => {
821
- return entry;
822
- });
823
- };
824
- const se_CreateEnvironmentEC2Request = (input, context) => {
825
- return {
826
- ...(input.automaticStopTimeMinutes != null && { automaticStopTimeMinutes: input.automaticStopTimeMinutes }),
827
- ...(input.clientRequestToken != null && { clientRequestToken: input.clientRequestToken }),
828
- ...(input.connectionType != null && { connectionType: input.connectionType }),
829
- ...(input.description != null && { description: input.description }),
830
- ...(input.dryRun != null && { dryRun: input.dryRun }),
831
- ...(input.imageId != null && { imageId: input.imageId }),
832
- ...(input.instanceType != null && { instanceType: input.instanceType }),
833
- ...(input.name != null && { name: input.name }),
834
- ...(input.ownerArn != null && { ownerArn: input.ownerArn }),
835
- ...(input.subnetId != null && { subnetId: input.subnetId }),
836
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
837
- };
838
- };
839
- const se_CreateEnvironmentMembershipRequest = (input, context) => {
840
- return {
841
- ...(input.environmentId != null && { environmentId: input.environmentId }),
842
- ...(input.permissions != null && { permissions: input.permissions }),
843
- ...(input.userArn != null && { userArn: input.userArn }),
844
- };
845
- };
846
- const se_DeleteEnvironmentMembershipRequest = (input, context) => {
847
- return {
848
- ...(input.environmentId != null && { environmentId: input.environmentId }),
849
- ...(input.userArn != null && { userArn: input.userArn }),
850
- };
851
- };
852
- const se_DeleteEnvironmentRequest = (input, context) => {
853
- return {
854
- ...(input.environmentId != null && { environmentId: input.environmentId }),
855
- };
856
- };
857
- const se_DescribeEnvironmentMembershipsRequest = (input, context) => {
858
- return {
859
- ...(input.environmentId != null && { environmentId: input.environmentId }),
860
- ...(input.maxResults != null && { maxResults: input.maxResults }),
861
- ...(input.nextToken != null && { nextToken: input.nextToken }),
862
- ...(input.permissions != null && { permissions: se_PermissionsList(input.permissions, context) }),
863
- ...(input.userArn != null && { userArn: input.userArn }),
864
- };
865
- };
866
- const se_DescribeEnvironmentsRequest = (input, context) => {
867
- return {
868
- ...(input.environmentIds != null && { environmentIds: se_BoundedEnvironmentIdList(input.environmentIds, context) }),
869
- };
870
- };
871
- const se_DescribeEnvironmentStatusRequest = (input, context) => {
872
- return {
873
- ...(input.environmentId != null && { environmentId: input.environmentId }),
874
- };
875
- };
876
- const se_ListEnvironmentsRequest = (input, context) => {
877
- return {
878
- ...(input.maxResults != null && { maxResults: input.maxResults }),
879
- ...(input.nextToken != null && { nextToken: input.nextToken }),
880
- };
881
- };
882
- const se_ListTagsForResourceRequest = (input, context) => {
883
- return {
884
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
885
- };
886
- };
887
- const se_PermissionsList = (input, context) => {
888
- return input
889
- .filter((e) => e != null)
890
- .map((entry) => {
891
- return entry;
892
- });
893
- };
894
- const se_Tag = (input, context) => {
895
- return {
896
- ...(input.Key != null && { Key: input.Key }),
897
- ...(input.Value != null && { Value: input.Value }),
898
- };
899
- };
900
- const se_TagKeyList = (input, context) => {
901
- return input
902
- .filter((e) => e != null)
903
- .map((entry) => {
904
- return entry;
905
- });
906
- };
907
- const se_TagList = (input, context) => {
908
- return input
909
- .filter((e) => e != null)
910
- .map((entry) => {
911
- return se_Tag(entry, context);
912
- });
913
- };
914
- const se_TagResourceRequest = (input, context) => {
915
- return {
916
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
917
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
918
- };
919
- };
920
- const se_UntagResourceRequest = (input, context) => {
921
- return {
922
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
923
- ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }),
924
- };
925
- };
926
- const se_UpdateEnvironmentMembershipRequest = (input, context) => {
927
- return {
928
- ...(input.environmentId != null && { environmentId: input.environmentId }),
929
- ...(input.permissions != null && { permissions: input.permissions }),
930
- ...(input.userArn != null && { userArn: input.userArn }),
931
- };
932
- };
933
- const se_UpdateEnvironmentRequest = (input, context) => {
934
- return {
935
- ...(input.description != null && { description: input.description }),
936
- ...(input.environmentId != null && { environmentId: input.environmentId }),
937
- ...(input.managedCredentialsAction != null && { managedCredentialsAction: input.managedCredentialsAction }),
938
- ...(input.name != null && { name: input.name }),
939
- };
940
- };
941
- const de_BadRequestException = (output, context) => {
942
- return {
943
- className: (0, smithy_client_1.expectString)(output.className),
944
- code: (0, smithy_client_1.expectInt32)(output.code),
945
- message: (0, smithy_client_1.expectString)(output.message),
946
- };
947
- };
948
- const de_ConcurrentAccessException = (output, context) => {
949
- return {
950
- className: (0, smithy_client_1.expectString)(output.className),
951
- code: (0, smithy_client_1.expectInt32)(output.code),
952
- message: (0, smithy_client_1.expectString)(output.message),
953
- };
954
- };
955
- const de_ConflictException = (output, context) => {
956
- return {
957
- className: (0, smithy_client_1.expectString)(output.className),
958
- code: (0, smithy_client_1.expectInt32)(output.code),
959
- message: (0, smithy_client_1.expectString)(output.message),
960
- };
961
- };
962
- const de_CreateEnvironmentEC2Result = (output, context) => {
963
- return {
964
- environmentId: (0, smithy_client_1.expectString)(output.environmentId),
965
- };
966
- };
967
804
  const de_CreateEnvironmentMembershipResult = (output, context) => {
968
- return {
969
- membership: output.membership != null ? de_EnvironmentMember(output.membership, context) : undefined,
970
- };
971
- };
972
- const de_DeleteEnvironmentMembershipResult = (output, context) => {
973
- return {};
974
- };
975
- const de_DeleteEnvironmentResult = (output, context) => {
976
- return {};
977
- };
978
- const de_DescribeEnvironmentMembershipsResult = (output, context) => {
979
- return {
980
- memberships: output.memberships != null ? de_EnvironmentMembersList(output.memberships, context) : undefined,
981
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
982
- };
983
- };
984
- const de_DescribeEnvironmentsResult = (output, context) => {
985
- return {
986
- environments: output.environments != null ? de_EnvironmentList(output.environments, context) : undefined,
987
- };
988
- };
989
- const de_DescribeEnvironmentStatusResult = (output, context) => {
990
- return {
991
- message: (0, smithy_client_1.expectString)(output.message),
992
- status: (0, smithy_client_1.expectString)(output.status),
993
- };
994
- };
995
- const de_Environment = (output, context) => {
996
- return {
997
- arn: (0, smithy_client_1.expectString)(output.arn),
998
- connectionType: (0, smithy_client_1.expectString)(output.connectionType),
999
- description: (0, smithy_client_1.expectString)(output.description),
1000
- id: (0, smithy_client_1.expectString)(output.id),
1001
- lifecycle: output.lifecycle != null ? de_EnvironmentLifecycle(output.lifecycle, context) : undefined,
1002
- managedCredentialsStatus: (0, smithy_client_1.expectString)(output.managedCredentialsStatus),
1003
- name: (0, smithy_client_1.expectString)(output.name),
1004
- ownerArn: (0, smithy_client_1.expectString)(output.ownerArn),
1005
- type: (0, smithy_client_1.expectString)(output.type),
1006
- };
1007
- };
1008
- const de_EnvironmentIdList = (output, context) => {
1009
- const retVal = (output || [])
1010
- .filter((e) => e != null)
1011
- .map((entry) => {
1012
- if (entry === null) {
1013
- return null;
1014
- }
1015
- return (0, smithy_client_1.expectString)(entry);
805
+ return (0, smithy_client_1.take)(output, {
806
+ membership: (_) => de_EnvironmentMember(_, context),
1016
807
  });
1017
- return retVal;
1018
- };
1019
- const de_EnvironmentLifecycle = (output, context) => {
1020
- return {
1021
- failureResource: (0, smithy_client_1.expectString)(output.failureResource),
1022
- reason: (0, smithy_client_1.expectString)(output.reason),
1023
- status: (0, smithy_client_1.expectString)(output.status),
1024
- };
1025
808
  };
1026
- const de_EnvironmentList = (output, context) => {
1027
- const retVal = (output || [])
1028
- .filter((e) => e != null)
1029
- .map((entry) => {
1030
- if (entry === null) {
1031
- return null;
1032
- }
1033
- return de_Environment(entry, context);
809
+ const de_DescribeEnvironmentMembershipsResult = (output, context) => {
810
+ return (0, smithy_client_1.take)(output, {
811
+ memberships: (_) => de_EnvironmentMembersList(_, context),
812
+ nextToken: smithy_client_1.expectString,
1034
813
  });
1035
- return retVal;
1036
814
  };
1037
815
  const de_EnvironmentMember = (output, context) => {
1038
- return {
1039
- environmentId: (0, smithy_client_1.expectString)(output.environmentId),
1040
- lastAccess: output.lastAccess != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastAccess))) : undefined,
1041
- permissions: (0, smithy_client_1.expectString)(output.permissions),
1042
- userArn: (0, smithy_client_1.expectString)(output.userArn),
1043
- userId: (0, smithy_client_1.expectString)(output.userId),
1044
- };
816
+ return (0, smithy_client_1.take)(output, {
817
+ environmentId: smithy_client_1.expectString,
818
+ lastAccess: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
819
+ permissions: smithy_client_1.expectString,
820
+ userArn: smithy_client_1.expectString,
821
+ userId: smithy_client_1.expectString,
822
+ });
1045
823
  };
1046
824
  const de_EnvironmentMembersList = (output, context) => {
1047
825
  const retVal = (output || [])
1048
826
  .filter((e) => e != null)
1049
827
  .map((entry) => {
1050
- if (entry === null) {
1051
- return null;
1052
- }
1053
828
  return de_EnvironmentMember(entry, context);
1054
829
  });
1055
830
  return retVal;
1056
831
  };
1057
- const de_ForbiddenException = (output, context) => {
1058
- return {
1059
- className: (0, smithy_client_1.expectString)(output.className),
1060
- code: (0, smithy_client_1.expectInt32)(output.code),
1061
- message: (0, smithy_client_1.expectString)(output.message),
1062
- };
1063
- };
1064
- const de_InternalServerErrorException = (output, context) => {
1065
- return {
1066
- className: (0, smithy_client_1.expectString)(output.className),
1067
- code: (0, smithy_client_1.expectInt32)(output.code),
1068
- message: (0, smithy_client_1.expectString)(output.message),
1069
- };
1070
- };
1071
- const de_LimitExceededException = (output, context) => {
1072
- return {
1073
- className: (0, smithy_client_1.expectString)(output.className),
1074
- code: (0, smithy_client_1.expectInt32)(output.code),
1075
- message: (0, smithy_client_1.expectString)(output.message),
1076
- };
1077
- };
1078
- const de_ListEnvironmentsResult = (output, context) => {
1079
- return {
1080
- environmentIds: output.environmentIds != null ? de_EnvironmentIdList(output.environmentIds, context) : undefined,
1081
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
1082
- };
1083
- };
1084
- const de_ListTagsForResourceResponse = (output, context) => {
1085
- return {
1086
- Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
1087
- };
1088
- };
1089
- const de_NotFoundException = (output, context) => {
1090
- return {
1091
- className: (0, smithy_client_1.expectString)(output.className),
1092
- code: (0, smithy_client_1.expectInt32)(output.code),
1093
- message: (0, smithy_client_1.expectString)(output.message),
1094
- };
1095
- };
1096
- const de_Tag = (output, context) => {
1097
- return {
1098
- Key: (0, smithy_client_1.expectString)(output.Key),
1099
- Value: (0, smithy_client_1.expectString)(output.Value),
1100
- };
1101
- };
1102
- const de_TagList = (output, context) => {
1103
- const retVal = (output || [])
1104
- .filter((e) => e != null)
1105
- .map((entry) => {
1106
- if (entry === null) {
1107
- return null;
1108
- }
1109
- return de_Tag(entry, context);
1110
- });
1111
- return retVal;
1112
- };
1113
- const de_TagResourceResponse = (output, context) => {
1114
- return {};
1115
- };
1116
- const de_TooManyRequestsException = (output, context) => {
1117
- return {
1118
- className: (0, smithy_client_1.expectString)(output.className),
1119
- code: (0, smithy_client_1.expectInt32)(output.code),
1120
- message: (0, smithy_client_1.expectString)(output.message),
1121
- };
1122
- };
1123
- const de_UntagResourceResponse = (output, context) => {
1124
- return {};
1125
- };
1126
832
  const de_UpdateEnvironmentMembershipResult = (output, context) => {
1127
- return {
1128
- membership: output.membership != null ? de_EnvironmentMember(output.membership, context) : undefined,
1129
- };
1130
- };
1131
- const de_UpdateEnvironmentResult = (output, context) => {
1132
- return {};
833
+ return (0, smithy_client_1.take)(output, {
834
+ membership: (_) => de_EnvironmentMember(_, context),
835
+ });
1133
836
  };
1134
837
  const deserializeMetadata = (output) => ({
1135
838
  httpStatusCode: output.statusCode,
@@ -1144,6 +847,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
1144
847
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1145
848
  };
1146
849
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
850
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(Cloud9ServiceException_1.Cloud9ServiceException);
1147
851
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1148
852
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1149
853
  const contents = {