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