@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.
@@ -1,83 +1,83 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { Cloud9ServiceException as __BaseException } from "../models/Cloud9ServiceException";
4
4
  import { BadRequestException, ConcurrentAccessException, ConflictException, ForbiddenException, InternalServerErrorException, LimitExceededException, NotFoundException, TooManyRequestsException, } from "../models/models_0";
5
5
  export const se_CreateEnvironmentEC2Command = async (input, context) => {
6
6
  const headers = sharedHeaders("CreateEnvironmentEC2");
7
7
  let body;
8
- body = JSON.stringify(se_CreateEnvironmentEC2Request(input, context));
8
+ body = JSON.stringify(_json(input));
9
9
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
10
10
  };
11
11
  export const se_CreateEnvironmentMembershipCommand = async (input, context) => {
12
12
  const headers = sharedHeaders("CreateEnvironmentMembership");
13
13
  let body;
14
- body = JSON.stringify(se_CreateEnvironmentMembershipRequest(input, context));
14
+ body = JSON.stringify(_json(input));
15
15
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
16
16
  };
17
17
  export const se_DeleteEnvironmentCommand = async (input, context) => {
18
18
  const headers = sharedHeaders("DeleteEnvironment");
19
19
  let body;
20
- body = JSON.stringify(se_DeleteEnvironmentRequest(input, context));
20
+ body = JSON.stringify(_json(input));
21
21
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
22
  };
23
23
  export const se_DeleteEnvironmentMembershipCommand = async (input, context) => {
24
24
  const headers = sharedHeaders("DeleteEnvironmentMembership");
25
25
  let body;
26
- body = JSON.stringify(se_DeleteEnvironmentMembershipRequest(input, context));
26
+ body = JSON.stringify(_json(input));
27
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
28
  };
29
29
  export const se_DescribeEnvironmentMembershipsCommand = async (input, context) => {
30
30
  const headers = sharedHeaders("DescribeEnvironmentMemberships");
31
31
  let body;
32
- body = JSON.stringify(se_DescribeEnvironmentMembershipsRequest(input, context));
32
+ body = JSON.stringify(_json(input));
33
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
34
34
  };
35
35
  export const se_DescribeEnvironmentsCommand = async (input, context) => {
36
36
  const headers = sharedHeaders("DescribeEnvironments");
37
37
  let body;
38
- body = JSON.stringify(se_DescribeEnvironmentsRequest(input, context));
38
+ body = JSON.stringify(_json(input));
39
39
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
40
  };
41
41
  export const se_DescribeEnvironmentStatusCommand = async (input, context) => {
42
42
  const headers = sharedHeaders("DescribeEnvironmentStatus");
43
43
  let body;
44
- body = JSON.stringify(se_DescribeEnvironmentStatusRequest(input, context));
44
+ body = JSON.stringify(_json(input));
45
45
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
46
46
  };
47
47
  export const se_ListEnvironmentsCommand = async (input, context) => {
48
48
  const headers = sharedHeaders("ListEnvironments");
49
49
  let body;
50
- body = JSON.stringify(se_ListEnvironmentsRequest(input, context));
50
+ body = JSON.stringify(_json(input));
51
51
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
52
52
  };
53
53
  export const se_ListTagsForResourceCommand = async (input, context) => {
54
54
  const headers = sharedHeaders("ListTagsForResource");
55
55
  let body;
56
- body = JSON.stringify(se_ListTagsForResourceRequest(input, context));
56
+ body = JSON.stringify(_json(input));
57
57
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
58
  };
59
59
  export const se_TagResourceCommand = async (input, context) => {
60
60
  const headers = sharedHeaders("TagResource");
61
61
  let body;
62
- body = JSON.stringify(se_TagResourceRequest(input, context));
62
+ body = JSON.stringify(_json(input));
63
63
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
64
64
  };
65
65
  export const se_UntagResourceCommand = async (input, context) => {
66
66
  const headers = sharedHeaders("UntagResource");
67
67
  let body;
68
- body = JSON.stringify(se_UntagResourceRequest(input, context));
68
+ body = JSON.stringify(_json(input));
69
69
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
70
70
  };
71
71
  export const se_UpdateEnvironmentCommand = async (input, context) => {
72
72
  const headers = sharedHeaders("UpdateEnvironment");
73
73
  let body;
74
- body = JSON.stringify(se_UpdateEnvironmentRequest(input, context));
74
+ body = JSON.stringify(_json(input));
75
75
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
76
  };
77
77
  export const se_UpdateEnvironmentMembershipCommand = async (input, context) => {
78
78
  const headers = sharedHeaders("UpdateEnvironmentMembership");
79
79
  let body;
80
- body = JSON.stringify(se_UpdateEnvironmentMembershipRequest(input, context));
80
+ body = JSON.stringify(_json(input));
81
81
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
82
82
  };
83
83
  export const de_CreateEnvironmentEC2Command = async (output, context) => {
@@ -86,12 +86,12 @@ export const de_CreateEnvironmentEC2Command = async (output, context) => {
86
86
  }
87
87
  const data = await parseBody(output.body, context);
88
88
  let contents = {};
89
- contents = de_CreateEnvironmentEC2Result(data, context);
89
+ contents = _json(data);
90
90
  const response = {
91
91
  $metadata: deserializeMetadata(output),
92
92
  ...contents,
93
93
  };
94
- return Promise.resolve(response);
94
+ return response;
95
95
  };
96
96
  const de_CreateEnvironmentEC2CommandError = async (output, context) => {
97
97
  const parsedOutput = {
@@ -123,10 +123,9 @@ const de_CreateEnvironmentEC2CommandError = async (output, context) => {
123
123
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
124
124
  default:
125
125
  const parsedBody = parsedOutput.body;
126
- throwDefaultError({
126
+ return throwDefaultError({
127
127
  output,
128
128
  parsedBody,
129
- exceptionCtor: __BaseException,
130
129
  errorCode,
131
130
  });
132
131
  }
@@ -142,7 +141,7 @@ export const de_CreateEnvironmentMembershipCommand = async (output, context) =>
142
141
  $metadata: deserializeMetadata(output),
143
142
  ...contents,
144
143
  };
145
- return Promise.resolve(response);
144
+ return response;
146
145
  };
147
146
  const de_CreateEnvironmentMembershipCommandError = async (output, context) => {
148
147
  const parsedOutput = {
@@ -174,10 +173,9 @@ const de_CreateEnvironmentMembershipCommandError = async (output, context) => {
174
173
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
175
174
  default:
176
175
  const parsedBody = parsedOutput.body;
177
- throwDefaultError({
176
+ return throwDefaultError({
178
177
  output,
179
178
  parsedBody,
180
- exceptionCtor: __BaseException,
181
179
  errorCode,
182
180
  });
183
181
  }
@@ -188,12 +186,12 @@ export const de_DeleteEnvironmentCommand = async (output, context) => {
188
186
  }
189
187
  const data = await parseBody(output.body, context);
190
188
  let contents = {};
191
- contents = de_DeleteEnvironmentResult(data, context);
189
+ contents = _json(data);
192
190
  const response = {
193
191
  $metadata: deserializeMetadata(output),
194
192
  ...contents,
195
193
  };
196
- return Promise.resolve(response);
194
+ return response;
197
195
  };
198
196
  const de_DeleteEnvironmentCommandError = async (output, context) => {
199
197
  const parsedOutput = {
@@ -225,10 +223,9 @@ const de_DeleteEnvironmentCommandError = async (output, context) => {
225
223
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
226
224
  default:
227
225
  const parsedBody = parsedOutput.body;
228
- throwDefaultError({
226
+ return throwDefaultError({
229
227
  output,
230
228
  parsedBody,
231
- exceptionCtor: __BaseException,
232
229
  errorCode,
233
230
  });
234
231
  }
@@ -239,12 +236,12 @@ export const de_DeleteEnvironmentMembershipCommand = async (output, context) =>
239
236
  }
240
237
  const data = await parseBody(output.body, context);
241
238
  let contents = {};
242
- contents = de_DeleteEnvironmentMembershipResult(data, context);
239
+ contents = _json(data);
243
240
  const response = {
244
241
  $metadata: deserializeMetadata(output),
245
242
  ...contents,
246
243
  };
247
- return Promise.resolve(response);
244
+ return response;
248
245
  };
249
246
  const de_DeleteEnvironmentMembershipCommandError = async (output, context) => {
250
247
  const parsedOutput = {
@@ -276,10 +273,9 @@ const de_DeleteEnvironmentMembershipCommandError = async (output, context) => {
276
273
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
277
274
  default:
278
275
  const parsedBody = parsedOutput.body;
279
- throwDefaultError({
276
+ return throwDefaultError({
280
277
  output,
281
278
  parsedBody,
282
- exceptionCtor: __BaseException,
283
279
  errorCode,
284
280
  });
285
281
  }
@@ -295,7 +291,7 @@ export const de_DescribeEnvironmentMembershipsCommand = async (output, context)
295
291
  $metadata: deserializeMetadata(output),
296
292
  ...contents,
297
293
  };
298
- return Promise.resolve(response);
294
+ return response;
299
295
  };
300
296
  const de_DescribeEnvironmentMembershipsCommandError = async (output, context) => {
301
297
  const parsedOutput = {
@@ -327,10 +323,9 @@ const de_DescribeEnvironmentMembershipsCommandError = async (output, context) =>
327
323
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
328
324
  default:
329
325
  const parsedBody = parsedOutput.body;
330
- throwDefaultError({
326
+ return throwDefaultError({
331
327
  output,
332
328
  parsedBody,
333
- exceptionCtor: __BaseException,
334
329
  errorCode,
335
330
  });
336
331
  }
@@ -341,12 +336,12 @@ export const de_DescribeEnvironmentsCommand = async (output, context) => {
341
336
  }
342
337
  const data = await parseBody(output.body, context);
343
338
  let contents = {};
344
- contents = de_DescribeEnvironmentsResult(data, context);
339
+ contents = _json(data);
345
340
  const response = {
346
341
  $metadata: deserializeMetadata(output),
347
342
  ...contents,
348
343
  };
349
- return Promise.resolve(response);
344
+ return response;
350
345
  };
351
346
  const de_DescribeEnvironmentsCommandError = async (output, context) => {
352
347
  const parsedOutput = {
@@ -378,10 +373,9 @@ const de_DescribeEnvironmentsCommandError = async (output, context) => {
378
373
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
379
374
  default:
380
375
  const parsedBody = parsedOutput.body;
381
- throwDefaultError({
376
+ return throwDefaultError({
382
377
  output,
383
378
  parsedBody,
384
- exceptionCtor: __BaseException,
385
379
  errorCode,
386
380
  });
387
381
  }
@@ -392,12 +386,12 @@ export const de_DescribeEnvironmentStatusCommand = async (output, context) => {
392
386
  }
393
387
  const data = await parseBody(output.body, context);
394
388
  let contents = {};
395
- contents = de_DescribeEnvironmentStatusResult(data, context);
389
+ contents = _json(data);
396
390
  const response = {
397
391
  $metadata: deserializeMetadata(output),
398
392
  ...contents,
399
393
  };
400
- return Promise.resolve(response);
394
+ return response;
401
395
  };
402
396
  const de_DescribeEnvironmentStatusCommandError = async (output, context) => {
403
397
  const parsedOutput = {
@@ -429,10 +423,9 @@ const de_DescribeEnvironmentStatusCommandError = async (output, context) => {
429
423
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
430
424
  default:
431
425
  const parsedBody = parsedOutput.body;
432
- throwDefaultError({
426
+ return throwDefaultError({
433
427
  output,
434
428
  parsedBody,
435
- exceptionCtor: __BaseException,
436
429
  errorCode,
437
430
  });
438
431
  }
@@ -443,12 +436,12 @@ export const de_ListEnvironmentsCommand = async (output, context) => {
443
436
  }
444
437
  const data = await parseBody(output.body, context);
445
438
  let contents = {};
446
- contents = de_ListEnvironmentsResult(data, context);
439
+ contents = _json(data);
447
440
  const response = {
448
441
  $metadata: deserializeMetadata(output),
449
442
  ...contents,
450
443
  };
451
- return Promise.resolve(response);
444
+ return response;
452
445
  };
453
446
  const de_ListEnvironmentsCommandError = async (output, context) => {
454
447
  const parsedOutput = {
@@ -480,10 +473,9 @@ const de_ListEnvironmentsCommandError = async (output, context) => {
480
473
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
481
474
  default:
482
475
  const parsedBody = parsedOutput.body;
483
- throwDefaultError({
476
+ return throwDefaultError({
484
477
  output,
485
478
  parsedBody,
486
- exceptionCtor: __BaseException,
487
479
  errorCode,
488
480
  });
489
481
  }
@@ -494,12 +486,12 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
494
486
  }
495
487
  const data = await parseBody(output.body, context);
496
488
  let contents = {};
497
- contents = de_ListTagsForResourceResponse(data, context);
489
+ contents = _json(data);
498
490
  const response = {
499
491
  $metadata: deserializeMetadata(output),
500
492
  ...contents,
501
493
  };
502
- return Promise.resolve(response);
494
+ return response;
503
495
  };
504
496
  const de_ListTagsForResourceCommandError = async (output, context) => {
505
497
  const parsedOutput = {
@@ -519,10 +511,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
519
511
  throw await de_NotFoundExceptionRes(parsedOutput, context);
520
512
  default:
521
513
  const parsedBody = parsedOutput.body;
522
- throwDefaultError({
514
+ return throwDefaultError({
523
515
  output,
524
516
  parsedBody,
525
- exceptionCtor: __BaseException,
526
517
  errorCode,
527
518
  });
528
519
  }
@@ -533,12 +524,12 @@ export const de_TagResourceCommand = async (output, context) => {
533
524
  }
534
525
  const data = await parseBody(output.body, context);
535
526
  let contents = {};
536
- contents = de_TagResourceResponse(data, context);
527
+ contents = _json(data);
537
528
  const response = {
538
529
  $metadata: deserializeMetadata(output),
539
530
  ...contents,
540
531
  };
541
- return Promise.resolve(response);
532
+ return response;
542
533
  };
543
534
  const de_TagResourceCommandError = async (output, context) => {
544
535
  const parsedOutput = {
@@ -561,10 +552,9 @@ const de_TagResourceCommandError = async (output, context) => {
561
552
  throw await de_NotFoundExceptionRes(parsedOutput, context);
562
553
  default:
563
554
  const parsedBody = parsedOutput.body;
564
- throwDefaultError({
555
+ return throwDefaultError({
565
556
  output,
566
557
  parsedBody,
567
- exceptionCtor: __BaseException,
568
558
  errorCode,
569
559
  });
570
560
  }
@@ -575,12 +565,12 @@ export const de_UntagResourceCommand = async (output, context) => {
575
565
  }
576
566
  const data = await parseBody(output.body, context);
577
567
  let contents = {};
578
- contents = de_UntagResourceResponse(data, context);
568
+ contents = _json(data);
579
569
  const response = {
580
570
  $metadata: deserializeMetadata(output),
581
571
  ...contents,
582
572
  };
583
- return Promise.resolve(response);
573
+ return response;
584
574
  };
585
575
  const de_UntagResourceCommandError = async (output, context) => {
586
576
  const parsedOutput = {
@@ -603,10 +593,9 @@ const de_UntagResourceCommandError = async (output, context) => {
603
593
  throw await de_NotFoundExceptionRes(parsedOutput, context);
604
594
  default:
605
595
  const parsedBody = parsedOutput.body;
606
- throwDefaultError({
596
+ return throwDefaultError({
607
597
  output,
608
598
  parsedBody,
609
- exceptionCtor: __BaseException,
610
599
  errorCode,
611
600
  });
612
601
  }
@@ -617,12 +606,12 @@ export const de_UpdateEnvironmentCommand = async (output, context) => {
617
606
  }
618
607
  const data = await parseBody(output.body, context);
619
608
  let contents = {};
620
- contents = de_UpdateEnvironmentResult(data, context);
609
+ contents = _json(data);
621
610
  const response = {
622
611
  $metadata: deserializeMetadata(output),
623
612
  ...contents,
624
613
  };
625
- return Promise.resolve(response);
614
+ return response;
626
615
  };
627
616
  const de_UpdateEnvironmentCommandError = async (output, context) => {
628
617
  const parsedOutput = {
@@ -654,10 +643,9 @@ const de_UpdateEnvironmentCommandError = async (output, context) => {
654
643
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
655
644
  default:
656
645
  const parsedBody = parsedOutput.body;
657
- throwDefaultError({
646
+ return throwDefaultError({
658
647
  output,
659
648
  parsedBody,
660
- exceptionCtor: __BaseException,
661
649
  errorCode,
662
650
  });
663
651
  }
@@ -673,7 +661,7 @@ export const de_UpdateEnvironmentMembershipCommand = async (output, context) =>
673
661
  $metadata: deserializeMetadata(output),
674
662
  ...contents,
675
663
  };
676
- return Promise.resolve(response);
664
+ return response;
677
665
  };
678
666
  const de_UpdateEnvironmentMembershipCommandError = async (output, context) => {
679
667
  const parsedOutput = {
@@ -705,17 +693,16 @@ const de_UpdateEnvironmentMembershipCommandError = async (output, context) => {
705
693
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
706
694
  default:
707
695
  const parsedBody = parsedOutput.body;
708
- throwDefaultError({
696
+ return throwDefaultError({
709
697
  output,
710
698
  parsedBody,
711
- exceptionCtor: __BaseException,
712
699
  errorCode,
713
700
  });
714
701
  }
715
702
  };
716
703
  const de_BadRequestExceptionRes = async (parsedOutput, context) => {
717
704
  const body = parsedOutput.body;
718
- const deserialized = de_BadRequestException(body, context);
705
+ const deserialized = _json(body);
719
706
  const exception = new BadRequestException({
720
707
  $metadata: deserializeMetadata(parsedOutput),
721
708
  ...deserialized,
@@ -724,7 +711,7 @@ const de_BadRequestExceptionRes = async (parsedOutput, context) => {
724
711
  };
725
712
  const de_ConcurrentAccessExceptionRes = async (parsedOutput, context) => {
726
713
  const body = parsedOutput.body;
727
- const deserialized = de_ConcurrentAccessException(body, context);
714
+ const deserialized = _json(body);
728
715
  const exception = new ConcurrentAccessException({
729
716
  $metadata: deserializeMetadata(parsedOutput),
730
717
  ...deserialized,
@@ -733,7 +720,7 @@ const de_ConcurrentAccessExceptionRes = async (parsedOutput, context) => {
733
720
  };
734
721
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
735
722
  const body = parsedOutput.body;
736
- const deserialized = de_ConflictException(body, context);
723
+ const deserialized = _json(body);
737
724
  const exception = new ConflictException({
738
725
  $metadata: deserializeMetadata(parsedOutput),
739
726
  ...deserialized,
@@ -742,7 +729,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
742
729
  };
743
730
  const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
744
731
  const body = parsedOutput.body;
745
- const deserialized = de_ForbiddenException(body, context);
732
+ const deserialized = _json(body);
746
733
  const exception = new ForbiddenException({
747
734
  $metadata: deserializeMetadata(parsedOutput),
748
735
  ...deserialized,
@@ -751,7 +738,7 @@ const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
751
738
  };
752
739
  const de_InternalServerErrorExceptionRes = async (parsedOutput, context) => {
753
740
  const body = parsedOutput.body;
754
- const deserialized = de_InternalServerErrorException(body, context);
741
+ const deserialized = _json(body);
755
742
  const exception = new InternalServerErrorException({
756
743
  $metadata: deserializeMetadata(parsedOutput),
757
744
  ...deserialized,
@@ -760,7 +747,7 @@ const de_InternalServerErrorExceptionRes = async (parsedOutput, context) => {
760
747
  };
761
748
  const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
762
749
  const body = parsedOutput.body;
763
- const deserialized = de_LimitExceededException(body, context);
750
+ const deserialized = _json(body);
764
751
  const exception = new LimitExceededException({
765
752
  $metadata: deserializeMetadata(parsedOutput),
766
753
  ...deserialized,
@@ -769,7 +756,7 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
769
756
  };
770
757
  const de_NotFoundExceptionRes = async (parsedOutput, context) => {
771
758
  const body = parsedOutput.body;
772
- const deserialized = de_NotFoundException(body, context);
759
+ const deserialized = _json(body);
773
760
  const exception = new NotFoundException({
774
761
  $metadata: deserializeMetadata(parsedOutput),
775
762
  ...deserialized,
@@ -778,329 +765,45 @@ const de_NotFoundExceptionRes = async (parsedOutput, context) => {
778
765
  };
779
766
  const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
780
767
  const body = parsedOutput.body;
781
- const deserialized = de_TooManyRequestsException(body, context);
768
+ const deserialized = _json(body);
782
769
  const exception = new TooManyRequestsException({
783
770
  $metadata: deserializeMetadata(parsedOutput),
784
771
  ...deserialized,
785
772
  });
786
773
  return __decorateServiceException(exception, body);
787
774
  };
788
- const se_BoundedEnvironmentIdList = (input, context) => {
789
- return input
790
- .filter((e) => e != null)
791
- .map((entry) => {
792
- return entry;
793
- });
794
- };
795
- const se_CreateEnvironmentEC2Request = (input, context) => {
796
- return {
797
- ...(input.automaticStopTimeMinutes != null && { automaticStopTimeMinutes: input.automaticStopTimeMinutes }),
798
- ...(input.clientRequestToken != null && { clientRequestToken: input.clientRequestToken }),
799
- ...(input.connectionType != null && { connectionType: input.connectionType }),
800
- ...(input.description != null && { description: input.description }),
801
- ...(input.dryRun != null && { dryRun: input.dryRun }),
802
- ...(input.imageId != null && { imageId: input.imageId }),
803
- ...(input.instanceType != null && { instanceType: input.instanceType }),
804
- ...(input.name != null && { name: input.name }),
805
- ...(input.ownerArn != null && { ownerArn: input.ownerArn }),
806
- ...(input.subnetId != null && { subnetId: input.subnetId }),
807
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
808
- };
809
- };
810
- const se_CreateEnvironmentMembershipRequest = (input, context) => {
811
- return {
812
- ...(input.environmentId != null && { environmentId: input.environmentId }),
813
- ...(input.permissions != null && { permissions: input.permissions }),
814
- ...(input.userArn != null && { userArn: input.userArn }),
815
- };
816
- };
817
- const se_DeleteEnvironmentMembershipRequest = (input, context) => {
818
- return {
819
- ...(input.environmentId != null && { environmentId: input.environmentId }),
820
- ...(input.userArn != null && { userArn: input.userArn }),
821
- };
822
- };
823
- const se_DeleteEnvironmentRequest = (input, context) => {
824
- return {
825
- ...(input.environmentId != null && { environmentId: input.environmentId }),
826
- };
827
- };
828
- const se_DescribeEnvironmentMembershipsRequest = (input, context) => {
829
- return {
830
- ...(input.environmentId != null && { environmentId: input.environmentId }),
831
- ...(input.maxResults != null && { maxResults: input.maxResults }),
832
- ...(input.nextToken != null && { nextToken: input.nextToken }),
833
- ...(input.permissions != null && { permissions: se_PermissionsList(input.permissions, context) }),
834
- ...(input.userArn != null && { userArn: input.userArn }),
835
- };
836
- };
837
- const se_DescribeEnvironmentsRequest = (input, context) => {
838
- return {
839
- ...(input.environmentIds != null && { environmentIds: se_BoundedEnvironmentIdList(input.environmentIds, context) }),
840
- };
841
- };
842
- const se_DescribeEnvironmentStatusRequest = (input, context) => {
843
- return {
844
- ...(input.environmentId != null && { environmentId: input.environmentId }),
845
- };
846
- };
847
- const se_ListEnvironmentsRequest = (input, context) => {
848
- return {
849
- ...(input.maxResults != null && { maxResults: input.maxResults }),
850
- ...(input.nextToken != null && { nextToken: input.nextToken }),
851
- };
852
- };
853
- const se_ListTagsForResourceRequest = (input, context) => {
854
- return {
855
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
856
- };
857
- };
858
- const se_PermissionsList = (input, context) => {
859
- return input
860
- .filter((e) => e != null)
861
- .map((entry) => {
862
- return entry;
863
- });
864
- };
865
- const se_Tag = (input, context) => {
866
- return {
867
- ...(input.Key != null && { Key: input.Key }),
868
- ...(input.Value != null && { Value: input.Value }),
869
- };
870
- };
871
- const se_TagKeyList = (input, context) => {
872
- return input
873
- .filter((e) => e != null)
874
- .map((entry) => {
875
- return entry;
876
- });
877
- };
878
- const se_TagList = (input, context) => {
879
- return input
880
- .filter((e) => e != null)
881
- .map((entry) => {
882
- return se_Tag(entry, context);
883
- });
884
- };
885
- const se_TagResourceRequest = (input, context) => {
886
- return {
887
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
888
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
889
- };
890
- };
891
- const se_UntagResourceRequest = (input, context) => {
892
- return {
893
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
894
- ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }),
895
- };
896
- };
897
- const se_UpdateEnvironmentMembershipRequest = (input, context) => {
898
- return {
899
- ...(input.environmentId != null && { environmentId: input.environmentId }),
900
- ...(input.permissions != null && { permissions: input.permissions }),
901
- ...(input.userArn != null && { userArn: input.userArn }),
902
- };
903
- };
904
- const se_UpdateEnvironmentRequest = (input, context) => {
905
- return {
906
- ...(input.description != null && { description: input.description }),
907
- ...(input.environmentId != null && { environmentId: input.environmentId }),
908
- ...(input.managedCredentialsAction != null && { managedCredentialsAction: input.managedCredentialsAction }),
909
- ...(input.name != null && { name: input.name }),
910
- };
911
- };
912
- const de_BadRequestException = (output, context) => {
913
- return {
914
- className: __expectString(output.className),
915
- code: __expectInt32(output.code),
916
- message: __expectString(output.message),
917
- };
918
- };
919
- const de_ConcurrentAccessException = (output, context) => {
920
- return {
921
- className: __expectString(output.className),
922
- code: __expectInt32(output.code),
923
- message: __expectString(output.message),
924
- };
925
- };
926
- const de_ConflictException = (output, context) => {
927
- return {
928
- className: __expectString(output.className),
929
- code: __expectInt32(output.code),
930
- message: __expectString(output.message),
931
- };
932
- };
933
- const de_CreateEnvironmentEC2Result = (output, context) => {
934
- return {
935
- environmentId: __expectString(output.environmentId),
936
- };
937
- };
938
775
  const de_CreateEnvironmentMembershipResult = (output, context) => {
939
- return {
940
- membership: output.membership != null ? de_EnvironmentMember(output.membership, context) : undefined,
941
- };
942
- };
943
- const de_DeleteEnvironmentMembershipResult = (output, context) => {
944
- return {};
945
- };
946
- const de_DeleteEnvironmentResult = (output, context) => {
947
- return {};
948
- };
949
- const de_DescribeEnvironmentMembershipsResult = (output, context) => {
950
- return {
951
- memberships: output.memberships != null ? de_EnvironmentMembersList(output.memberships, context) : undefined,
952
- nextToken: __expectString(output.nextToken),
953
- };
954
- };
955
- const de_DescribeEnvironmentsResult = (output, context) => {
956
- return {
957
- environments: output.environments != null ? de_EnvironmentList(output.environments, context) : undefined,
958
- };
959
- };
960
- const de_DescribeEnvironmentStatusResult = (output, context) => {
961
- return {
962
- message: __expectString(output.message),
963
- status: __expectString(output.status),
964
- };
965
- };
966
- const de_Environment = (output, context) => {
967
- return {
968
- arn: __expectString(output.arn),
969
- connectionType: __expectString(output.connectionType),
970
- description: __expectString(output.description),
971
- id: __expectString(output.id),
972
- lifecycle: output.lifecycle != null ? de_EnvironmentLifecycle(output.lifecycle, context) : undefined,
973
- managedCredentialsStatus: __expectString(output.managedCredentialsStatus),
974
- name: __expectString(output.name),
975
- ownerArn: __expectString(output.ownerArn),
976
- type: __expectString(output.type),
977
- };
978
- };
979
- const de_EnvironmentIdList = (output, context) => {
980
- const retVal = (output || [])
981
- .filter((e) => e != null)
982
- .map((entry) => {
983
- if (entry === null) {
984
- return null;
985
- }
986
- return __expectString(entry);
776
+ return take(output, {
777
+ membership: (_) => de_EnvironmentMember(_, context),
987
778
  });
988
- return retVal;
989
- };
990
- const de_EnvironmentLifecycle = (output, context) => {
991
- return {
992
- failureResource: __expectString(output.failureResource),
993
- reason: __expectString(output.reason),
994
- status: __expectString(output.status),
995
- };
996
779
  };
997
- const de_EnvironmentList = (output, context) => {
998
- const retVal = (output || [])
999
- .filter((e) => e != null)
1000
- .map((entry) => {
1001
- if (entry === null) {
1002
- return null;
1003
- }
1004
- return de_Environment(entry, context);
780
+ const de_DescribeEnvironmentMembershipsResult = (output, context) => {
781
+ return take(output, {
782
+ memberships: (_) => de_EnvironmentMembersList(_, context),
783
+ nextToken: __expectString,
1005
784
  });
1006
- return retVal;
1007
785
  };
1008
786
  const de_EnvironmentMember = (output, context) => {
1009
- return {
1010
- environmentId: __expectString(output.environmentId),
1011
- lastAccess: output.lastAccess != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastAccess))) : undefined,
1012
- permissions: __expectString(output.permissions),
1013
- userArn: __expectString(output.userArn),
1014
- userId: __expectString(output.userId),
1015
- };
787
+ return take(output, {
788
+ environmentId: __expectString,
789
+ lastAccess: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
790
+ permissions: __expectString,
791
+ userArn: __expectString,
792
+ userId: __expectString,
793
+ });
1016
794
  };
1017
795
  const de_EnvironmentMembersList = (output, context) => {
1018
796
  const retVal = (output || [])
1019
797
  .filter((e) => e != null)
1020
798
  .map((entry) => {
1021
- if (entry === null) {
1022
- return null;
1023
- }
1024
799
  return de_EnvironmentMember(entry, context);
1025
800
  });
1026
801
  return retVal;
1027
802
  };
1028
- const de_ForbiddenException = (output, context) => {
1029
- return {
1030
- className: __expectString(output.className),
1031
- code: __expectInt32(output.code),
1032
- message: __expectString(output.message),
1033
- };
1034
- };
1035
- const de_InternalServerErrorException = (output, context) => {
1036
- return {
1037
- className: __expectString(output.className),
1038
- code: __expectInt32(output.code),
1039
- message: __expectString(output.message),
1040
- };
1041
- };
1042
- const de_LimitExceededException = (output, context) => {
1043
- return {
1044
- className: __expectString(output.className),
1045
- code: __expectInt32(output.code),
1046
- message: __expectString(output.message),
1047
- };
1048
- };
1049
- const de_ListEnvironmentsResult = (output, context) => {
1050
- return {
1051
- environmentIds: output.environmentIds != null ? de_EnvironmentIdList(output.environmentIds, context) : undefined,
1052
- nextToken: __expectString(output.nextToken),
1053
- };
1054
- };
1055
- const de_ListTagsForResourceResponse = (output, context) => {
1056
- return {
1057
- Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
1058
- };
1059
- };
1060
- const de_NotFoundException = (output, context) => {
1061
- return {
1062
- className: __expectString(output.className),
1063
- code: __expectInt32(output.code),
1064
- message: __expectString(output.message),
1065
- };
1066
- };
1067
- const de_Tag = (output, context) => {
1068
- return {
1069
- Key: __expectString(output.Key),
1070
- Value: __expectString(output.Value),
1071
- };
1072
- };
1073
- const de_TagList = (output, context) => {
1074
- const retVal = (output || [])
1075
- .filter((e) => e != null)
1076
- .map((entry) => {
1077
- if (entry === null) {
1078
- return null;
1079
- }
1080
- return de_Tag(entry, context);
1081
- });
1082
- return retVal;
1083
- };
1084
- const de_TagResourceResponse = (output, context) => {
1085
- return {};
1086
- };
1087
- const de_TooManyRequestsException = (output, context) => {
1088
- return {
1089
- className: __expectString(output.className),
1090
- code: __expectInt32(output.code),
1091
- message: __expectString(output.message),
1092
- };
1093
- };
1094
- const de_UntagResourceResponse = (output, context) => {
1095
- return {};
1096
- };
1097
803
  const de_UpdateEnvironmentMembershipResult = (output, context) => {
1098
- return {
1099
- membership: output.membership != null ? de_EnvironmentMember(output.membership, context) : undefined,
1100
- };
1101
- };
1102
- const de_UpdateEnvironmentResult = (output, context) => {
1103
- return {};
804
+ return take(output, {
805
+ membership: (_) => de_EnvironmentMember(_, context),
806
+ });
1104
807
  };
1105
808
  const deserializeMetadata = (output) => ({
1106
809
  httpStatusCode: output.statusCode,
@@ -1115,6 +818,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
1115
818
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1116
819
  };
1117
820
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
821
+ const throwDefaultError = withBaseException(__BaseException);
1118
822
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1119
823
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1120
824
  const contents = {