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