@aws-sdk/client-service-quotas 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,176 +1,119 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { AccessDeniedException, AWSServiceAccessNotEnabledException, DependencyAccessDeniedException, IllegalArgumentException, InvalidPaginationTokenException, InvalidResourceStateException, NoAvailableOrganizationException, NoSuchResourceException, OrganizationNotInAllFeaturesModeException, QuotaExceededException, ResourceAlreadyExistsException, ServiceException, ServiceQuotaTemplateNotInUseException, TagPolicyViolationException, TemplatesNotAvailableInRegionException, TooManyRequestsException, TooManyTagsException, } from "../models/models_0";
4
4
  import { ServiceQuotasServiceException as __BaseException } from "../models/ServiceQuotasServiceException";
5
5
  export const se_AssociateServiceQuotaTemplateCommand = async (input, context) => {
6
- const headers = {
7
- "content-type": "application/x-amz-json-1.1",
8
- "x-amz-target": "ServiceQuotasV20190624.AssociateServiceQuotaTemplate",
9
- };
6
+ const headers = sharedHeaders("AssociateServiceQuotaTemplate");
10
7
  let body;
11
- body = JSON.stringify(se_AssociateServiceQuotaTemplateRequest(input, context));
8
+ body = JSON.stringify(_json(input));
12
9
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
10
  };
14
11
  export const se_DeleteServiceQuotaIncreaseRequestFromTemplateCommand = async (input, context) => {
15
- const headers = {
16
- "content-type": "application/x-amz-json-1.1",
17
- "x-amz-target": "ServiceQuotasV20190624.DeleteServiceQuotaIncreaseRequestFromTemplate",
18
- };
12
+ const headers = sharedHeaders("DeleteServiceQuotaIncreaseRequestFromTemplate");
19
13
  let body;
20
- body = JSON.stringify(se_DeleteServiceQuotaIncreaseRequestFromTemplateRequest(input, context));
14
+ body = JSON.stringify(_json(input));
21
15
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
16
  };
23
17
  export const se_DisassociateServiceQuotaTemplateCommand = async (input, context) => {
24
- const headers = {
25
- "content-type": "application/x-amz-json-1.1",
26
- "x-amz-target": "ServiceQuotasV20190624.DisassociateServiceQuotaTemplate",
27
- };
18
+ const headers = sharedHeaders("DisassociateServiceQuotaTemplate");
28
19
  let body;
29
- body = JSON.stringify(se_DisassociateServiceQuotaTemplateRequest(input, context));
20
+ body = JSON.stringify(_json(input));
30
21
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
31
22
  };
32
23
  export const se_GetAssociationForServiceQuotaTemplateCommand = async (input, context) => {
33
- const headers = {
34
- "content-type": "application/x-amz-json-1.1",
35
- "x-amz-target": "ServiceQuotasV20190624.GetAssociationForServiceQuotaTemplate",
36
- };
24
+ const headers = sharedHeaders("GetAssociationForServiceQuotaTemplate");
37
25
  let body;
38
- body = JSON.stringify(se_GetAssociationForServiceQuotaTemplateRequest(input, context));
26
+ body = JSON.stringify(_json(input));
39
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
28
  };
41
29
  export const se_GetAWSDefaultServiceQuotaCommand = async (input, context) => {
42
- const headers = {
43
- "content-type": "application/x-amz-json-1.1",
44
- "x-amz-target": "ServiceQuotasV20190624.GetAWSDefaultServiceQuota",
45
- };
30
+ const headers = sharedHeaders("GetAWSDefaultServiceQuota");
46
31
  let body;
47
- body = JSON.stringify(se_GetAWSDefaultServiceQuotaRequest(input, context));
32
+ body = JSON.stringify(_json(input));
48
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
34
  };
50
35
  export const se_GetRequestedServiceQuotaChangeCommand = async (input, context) => {
51
- const headers = {
52
- "content-type": "application/x-amz-json-1.1",
53
- "x-amz-target": "ServiceQuotasV20190624.GetRequestedServiceQuotaChange",
54
- };
36
+ const headers = sharedHeaders("GetRequestedServiceQuotaChange");
55
37
  let body;
56
- body = JSON.stringify(se_GetRequestedServiceQuotaChangeRequest(input, context));
38
+ body = JSON.stringify(_json(input));
57
39
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
40
  };
59
41
  export const se_GetServiceQuotaCommand = async (input, context) => {
60
- const headers = {
61
- "content-type": "application/x-amz-json-1.1",
62
- "x-amz-target": "ServiceQuotasV20190624.GetServiceQuota",
63
- };
42
+ const headers = sharedHeaders("GetServiceQuota");
64
43
  let body;
65
- body = JSON.stringify(se_GetServiceQuotaRequest(input, context));
44
+ body = JSON.stringify(_json(input));
66
45
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
67
46
  };
68
47
  export const se_GetServiceQuotaIncreaseRequestFromTemplateCommand = async (input, context) => {
69
- const headers = {
70
- "content-type": "application/x-amz-json-1.1",
71
- "x-amz-target": "ServiceQuotasV20190624.GetServiceQuotaIncreaseRequestFromTemplate",
72
- };
48
+ const headers = sharedHeaders("GetServiceQuotaIncreaseRequestFromTemplate");
73
49
  let body;
74
- body = JSON.stringify(se_GetServiceQuotaIncreaseRequestFromTemplateRequest(input, context));
50
+ body = JSON.stringify(_json(input));
75
51
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
52
  };
77
53
  export const se_ListAWSDefaultServiceQuotasCommand = async (input, context) => {
78
- const headers = {
79
- "content-type": "application/x-amz-json-1.1",
80
- "x-amz-target": "ServiceQuotasV20190624.ListAWSDefaultServiceQuotas",
81
- };
54
+ const headers = sharedHeaders("ListAWSDefaultServiceQuotas");
82
55
  let body;
83
- body = JSON.stringify(se_ListAWSDefaultServiceQuotasRequest(input, context));
56
+ body = JSON.stringify(_json(input));
84
57
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
85
58
  };
86
59
  export const se_ListRequestedServiceQuotaChangeHistoryCommand = async (input, context) => {
87
- const headers = {
88
- "content-type": "application/x-amz-json-1.1",
89
- "x-amz-target": "ServiceQuotasV20190624.ListRequestedServiceQuotaChangeHistory",
90
- };
60
+ const headers = sharedHeaders("ListRequestedServiceQuotaChangeHistory");
91
61
  let body;
92
- body = JSON.stringify(se_ListRequestedServiceQuotaChangeHistoryRequest(input, context));
62
+ body = JSON.stringify(_json(input));
93
63
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
94
64
  };
95
65
  export const se_ListRequestedServiceQuotaChangeHistoryByQuotaCommand = async (input, context) => {
96
- const headers = {
97
- "content-type": "application/x-amz-json-1.1",
98
- "x-amz-target": "ServiceQuotasV20190624.ListRequestedServiceQuotaChangeHistoryByQuota",
99
- };
66
+ const headers = sharedHeaders("ListRequestedServiceQuotaChangeHistoryByQuota");
100
67
  let body;
101
- body = JSON.stringify(se_ListRequestedServiceQuotaChangeHistoryByQuotaRequest(input, context));
68
+ body = JSON.stringify(_json(input));
102
69
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
103
70
  };
104
71
  export const se_ListServiceQuotaIncreaseRequestsInTemplateCommand = async (input, context) => {
105
- const headers = {
106
- "content-type": "application/x-amz-json-1.1",
107
- "x-amz-target": "ServiceQuotasV20190624.ListServiceQuotaIncreaseRequestsInTemplate",
108
- };
72
+ const headers = sharedHeaders("ListServiceQuotaIncreaseRequestsInTemplate");
109
73
  let body;
110
- body = JSON.stringify(se_ListServiceQuotaIncreaseRequestsInTemplateRequest(input, context));
74
+ body = JSON.stringify(_json(input));
111
75
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
76
  };
113
77
  export const se_ListServiceQuotasCommand = async (input, context) => {
114
- const headers = {
115
- "content-type": "application/x-amz-json-1.1",
116
- "x-amz-target": "ServiceQuotasV20190624.ListServiceQuotas",
117
- };
78
+ const headers = sharedHeaders("ListServiceQuotas");
118
79
  let body;
119
- body = JSON.stringify(se_ListServiceQuotasRequest(input, context));
80
+ body = JSON.stringify(_json(input));
120
81
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
121
82
  };
122
83
  export const se_ListServicesCommand = async (input, context) => {
123
- const headers = {
124
- "content-type": "application/x-amz-json-1.1",
125
- "x-amz-target": "ServiceQuotasV20190624.ListServices",
126
- };
84
+ const headers = sharedHeaders("ListServices");
127
85
  let body;
128
- body = JSON.stringify(se_ListServicesRequest(input, context));
86
+ body = JSON.stringify(_json(input));
129
87
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
130
88
  };
131
89
  export const se_ListTagsForResourceCommand = async (input, context) => {
132
- const headers = {
133
- "content-type": "application/x-amz-json-1.1",
134
- "x-amz-target": "ServiceQuotasV20190624.ListTagsForResource",
135
- };
90
+ const headers = sharedHeaders("ListTagsForResource");
136
91
  let body;
137
- body = JSON.stringify(se_ListTagsForResourceRequest(input, context));
92
+ body = JSON.stringify(_json(input));
138
93
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
139
94
  };
140
95
  export const se_PutServiceQuotaIncreaseRequestIntoTemplateCommand = async (input, context) => {
141
- const headers = {
142
- "content-type": "application/x-amz-json-1.1",
143
- "x-amz-target": "ServiceQuotasV20190624.PutServiceQuotaIncreaseRequestIntoTemplate",
144
- };
96
+ const headers = sharedHeaders("PutServiceQuotaIncreaseRequestIntoTemplate");
145
97
  let body;
146
98
  body = JSON.stringify(se_PutServiceQuotaIncreaseRequestIntoTemplateRequest(input, context));
147
99
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
148
100
  };
149
101
  export const se_RequestServiceQuotaIncreaseCommand = async (input, context) => {
150
- const headers = {
151
- "content-type": "application/x-amz-json-1.1",
152
- "x-amz-target": "ServiceQuotasV20190624.RequestServiceQuotaIncrease",
153
- };
102
+ const headers = sharedHeaders("RequestServiceQuotaIncrease");
154
103
  let body;
155
104
  body = JSON.stringify(se_RequestServiceQuotaIncreaseRequest(input, context));
156
105
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
157
106
  };
158
107
  export const se_TagResourceCommand = async (input, context) => {
159
- const headers = {
160
- "content-type": "application/x-amz-json-1.1",
161
- "x-amz-target": "ServiceQuotasV20190624.TagResource",
162
- };
108
+ const headers = sharedHeaders("TagResource");
163
109
  let body;
164
- body = JSON.stringify(se_TagResourceRequest(input, context));
110
+ body = JSON.stringify(_json(input));
165
111
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
166
112
  };
167
113
  export const se_UntagResourceCommand = async (input, context) => {
168
- const headers = {
169
- "content-type": "application/x-amz-json-1.1",
170
- "x-amz-target": "ServiceQuotasV20190624.UntagResource",
171
- };
114
+ const headers = sharedHeaders("UntagResource");
172
115
  let body;
173
- body = JSON.stringify(se_UntagResourceRequest(input, context));
116
+ body = JSON.stringify(_json(input));
174
117
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
175
118
  };
176
119
  export const de_AssociateServiceQuotaTemplateCommand = async (output, context) => {
@@ -179,12 +122,12 @@ export const de_AssociateServiceQuotaTemplateCommand = async (output, context) =
179
122
  }
180
123
  const data = await parseBody(output.body, context);
181
124
  let contents = {};
182
- contents = de_AssociateServiceQuotaTemplateResponse(data, context);
125
+ contents = _json(data);
183
126
  const response = {
184
127
  $metadata: deserializeMetadata(output),
185
128
  ...contents,
186
129
  };
187
- return Promise.resolve(response);
130
+ return response;
188
131
  };
189
132
  const de_AssociateServiceQuotaTemplateCommandError = async (output, context) => {
190
133
  const parsedOutput = {
@@ -219,10 +162,9 @@ const de_AssociateServiceQuotaTemplateCommandError = async (output, context) =>
219
162
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
220
163
  default:
221
164
  const parsedBody = parsedOutput.body;
222
- throwDefaultError({
165
+ return throwDefaultError({
223
166
  output,
224
167
  parsedBody,
225
- exceptionCtor: __BaseException,
226
168
  errorCode,
227
169
  });
228
170
  }
@@ -233,12 +175,12 @@ export const de_DeleteServiceQuotaIncreaseRequestFromTemplateCommand = async (ou
233
175
  }
234
176
  const data = await parseBody(output.body, context);
235
177
  let contents = {};
236
- contents = de_DeleteServiceQuotaIncreaseRequestFromTemplateResponse(data, context);
178
+ contents = _json(data);
237
179
  const response = {
238
180
  $metadata: deserializeMetadata(output),
239
181
  ...contents,
240
182
  };
241
- return Promise.resolve(response);
183
+ return response;
242
184
  };
243
185
  const de_DeleteServiceQuotaIncreaseRequestFromTemplateCommandError = async (output, context) => {
244
186
  const parsedOutput = {
@@ -276,10 +218,9 @@ const de_DeleteServiceQuotaIncreaseRequestFromTemplateCommandError = async (outp
276
218
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
277
219
  default:
278
220
  const parsedBody = parsedOutput.body;
279
- throwDefaultError({
221
+ return throwDefaultError({
280
222
  output,
281
223
  parsedBody,
282
- exceptionCtor: __BaseException,
283
224
  errorCode,
284
225
  });
285
226
  }
@@ -290,12 +231,12 @@ export const de_DisassociateServiceQuotaTemplateCommand = async (output, context
290
231
  }
291
232
  const data = await parseBody(output.body, context);
292
233
  let contents = {};
293
- contents = de_DisassociateServiceQuotaTemplateResponse(data, context);
234
+ contents = _json(data);
294
235
  const response = {
295
236
  $metadata: deserializeMetadata(output),
296
237
  ...contents,
297
238
  };
298
- return Promise.resolve(response);
239
+ return response;
299
240
  };
300
241
  const de_DisassociateServiceQuotaTemplateCommandError = async (output, context) => {
301
242
  const parsedOutput = {
@@ -330,10 +271,9 @@ const de_DisassociateServiceQuotaTemplateCommandError = async (output, context)
330
271
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
331
272
  default:
332
273
  const parsedBody = parsedOutput.body;
333
- throwDefaultError({
274
+ return throwDefaultError({
334
275
  output,
335
276
  parsedBody,
336
- exceptionCtor: __BaseException,
337
277
  errorCode,
338
278
  });
339
279
  }
@@ -344,12 +284,12 @@ export const de_GetAssociationForServiceQuotaTemplateCommand = async (output, co
344
284
  }
345
285
  const data = await parseBody(output.body, context);
346
286
  let contents = {};
347
- contents = de_GetAssociationForServiceQuotaTemplateResponse(data, context);
287
+ contents = _json(data);
348
288
  const response = {
349
289
  $metadata: deserializeMetadata(output),
350
290
  ...contents,
351
291
  };
352
- return Promise.resolve(response);
292
+ return response;
353
293
  };
354
294
  const de_GetAssociationForServiceQuotaTemplateCommandError = async (output, context) => {
355
295
  const parsedOutput = {
@@ -384,10 +324,9 @@ const de_GetAssociationForServiceQuotaTemplateCommandError = async (output, cont
384
324
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
385
325
  default:
386
326
  const parsedBody = parsedOutput.body;
387
- throwDefaultError({
327
+ return throwDefaultError({
388
328
  output,
389
329
  parsedBody,
390
- exceptionCtor: __BaseException,
391
330
  errorCode,
392
331
  });
393
332
  }
@@ -403,7 +342,7 @@ export const de_GetAWSDefaultServiceQuotaCommand = async (output, context) => {
403
342
  $metadata: deserializeMetadata(output),
404
343
  ...contents,
405
344
  };
406
- return Promise.resolve(response);
345
+ return response;
407
346
  };
408
347
  const de_GetAWSDefaultServiceQuotaCommandError = async (output, context) => {
409
348
  const parsedOutput = {
@@ -429,10 +368,9 @@ const de_GetAWSDefaultServiceQuotaCommandError = async (output, context) => {
429
368
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
430
369
  default:
431
370
  const parsedBody = parsedOutput.body;
432
- throwDefaultError({
371
+ return throwDefaultError({
433
372
  output,
434
373
  parsedBody,
435
- exceptionCtor: __BaseException,
436
374
  errorCode,
437
375
  });
438
376
  }
@@ -448,7 +386,7 @@ export const de_GetRequestedServiceQuotaChangeCommand = async (output, context)
448
386
  $metadata: deserializeMetadata(output),
449
387
  ...contents,
450
388
  };
451
- return Promise.resolve(response);
389
+ return response;
452
390
  };
453
391
  const de_GetRequestedServiceQuotaChangeCommandError = async (output, context) => {
454
392
  const parsedOutput = {
@@ -474,10 +412,9 @@ const de_GetRequestedServiceQuotaChangeCommandError = async (output, context) =>
474
412
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
475
413
  default:
476
414
  const parsedBody = parsedOutput.body;
477
- throwDefaultError({
415
+ return throwDefaultError({
478
416
  output,
479
417
  parsedBody,
480
- exceptionCtor: __BaseException,
481
418
  errorCode,
482
419
  });
483
420
  }
@@ -493,7 +430,7 @@ export const de_GetServiceQuotaCommand = async (output, context) => {
493
430
  $metadata: deserializeMetadata(output),
494
431
  ...contents,
495
432
  };
496
- return Promise.resolve(response);
433
+ return response;
497
434
  };
498
435
  const de_GetServiceQuotaCommandError = async (output, context) => {
499
436
  const parsedOutput = {
@@ -519,10 +456,9 @@ const de_GetServiceQuotaCommandError = async (output, context) => {
519
456
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
520
457
  default:
521
458
  const parsedBody = parsedOutput.body;
522
- throwDefaultError({
459
+ return throwDefaultError({
523
460
  output,
524
461
  parsedBody,
525
- exceptionCtor: __BaseException,
526
462
  errorCode,
527
463
  });
528
464
  }
@@ -538,7 +474,7 @@ export const de_GetServiceQuotaIncreaseRequestFromTemplateCommand = async (outpu
538
474
  $metadata: deserializeMetadata(output),
539
475
  ...contents,
540
476
  };
541
- return Promise.resolve(response);
477
+ return response;
542
478
  };
543
479
  const de_GetServiceQuotaIncreaseRequestFromTemplateCommandError = async (output, context) => {
544
480
  const parsedOutput = {
@@ -576,10 +512,9 @@ const de_GetServiceQuotaIncreaseRequestFromTemplateCommandError = async (output,
576
512
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
577
513
  default:
578
514
  const parsedBody = parsedOutput.body;
579
- throwDefaultError({
515
+ return throwDefaultError({
580
516
  output,
581
517
  parsedBody,
582
- exceptionCtor: __BaseException,
583
518
  errorCode,
584
519
  });
585
520
  }
@@ -595,7 +530,7 @@ export const de_ListAWSDefaultServiceQuotasCommand = async (output, context) =>
595
530
  $metadata: deserializeMetadata(output),
596
531
  ...contents,
597
532
  };
598
- return Promise.resolve(response);
533
+ return response;
599
534
  };
600
535
  const de_ListAWSDefaultServiceQuotasCommandError = async (output, context) => {
601
536
  const parsedOutput = {
@@ -624,10 +559,9 @@ const de_ListAWSDefaultServiceQuotasCommandError = async (output, context) => {
624
559
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
625
560
  default:
626
561
  const parsedBody = parsedOutput.body;
627
- throwDefaultError({
562
+ return throwDefaultError({
628
563
  output,
629
564
  parsedBody,
630
- exceptionCtor: __BaseException,
631
565
  errorCode,
632
566
  });
633
567
  }
@@ -643,7 +577,7 @@ export const de_ListRequestedServiceQuotaChangeHistoryCommand = async (output, c
643
577
  $metadata: deserializeMetadata(output),
644
578
  ...contents,
645
579
  };
646
- return Promise.resolve(response);
580
+ return response;
647
581
  };
648
582
  const de_ListRequestedServiceQuotaChangeHistoryCommandError = async (output, context) => {
649
583
  const parsedOutput = {
@@ -672,10 +606,9 @@ const de_ListRequestedServiceQuotaChangeHistoryCommandError = async (output, con
672
606
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
673
607
  default:
674
608
  const parsedBody = parsedOutput.body;
675
- throwDefaultError({
609
+ return throwDefaultError({
676
610
  output,
677
611
  parsedBody,
678
- exceptionCtor: __BaseException,
679
612
  errorCode,
680
613
  });
681
614
  }
@@ -691,7 +624,7 @@ export const de_ListRequestedServiceQuotaChangeHistoryByQuotaCommand = async (ou
691
624
  $metadata: deserializeMetadata(output),
692
625
  ...contents,
693
626
  };
694
- return Promise.resolve(response);
627
+ return response;
695
628
  };
696
629
  const de_ListRequestedServiceQuotaChangeHistoryByQuotaCommandError = async (output, context) => {
697
630
  const parsedOutput = {
@@ -720,10 +653,9 @@ const de_ListRequestedServiceQuotaChangeHistoryByQuotaCommandError = async (outp
720
653
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
721
654
  default:
722
655
  const parsedBody = parsedOutput.body;
723
- throwDefaultError({
656
+ return throwDefaultError({
724
657
  output,
725
658
  parsedBody,
726
- exceptionCtor: __BaseException,
727
659
  errorCode,
728
660
  });
729
661
  }
@@ -739,7 +671,7 @@ export const de_ListServiceQuotaIncreaseRequestsInTemplateCommand = async (outpu
739
671
  $metadata: deserializeMetadata(output),
740
672
  ...contents,
741
673
  };
742
- return Promise.resolve(response);
674
+ return response;
743
675
  };
744
676
  const de_ListServiceQuotaIncreaseRequestsInTemplateCommandError = async (output, context) => {
745
677
  const parsedOutput = {
@@ -774,10 +706,9 @@ const de_ListServiceQuotaIncreaseRequestsInTemplateCommandError = async (output,
774
706
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
775
707
  default:
776
708
  const parsedBody = parsedOutput.body;
777
- throwDefaultError({
709
+ return throwDefaultError({
778
710
  output,
779
711
  parsedBody,
780
- exceptionCtor: __BaseException,
781
712
  errorCode,
782
713
  });
783
714
  }
@@ -793,7 +724,7 @@ export const de_ListServiceQuotasCommand = async (output, context) => {
793
724
  $metadata: deserializeMetadata(output),
794
725
  ...contents,
795
726
  };
796
- return Promise.resolve(response);
727
+ return response;
797
728
  };
798
729
  const de_ListServiceQuotasCommandError = async (output, context) => {
799
730
  const parsedOutput = {
@@ -822,10 +753,9 @@ const de_ListServiceQuotasCommandError = async (output, context) => {
822
753
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
823
754
  default:
824
755
  const parsedBody = parsedOutput.body;
825
- throwDefaultError({
756
+ return throwDefaultError({
826
757
  output,
827
758
  parsedBody,
828
- exceptionCtor: __BaseException,
829
759
  errorCode,
830
760
  });
831
761
  }
@@ -836,12 +766,12 @@ export const de_ListServicesCommand = async (output, context) => {
836
766
  }
837
767
  const data = await parseBody(output.body, context);
838
768
  let contents = {};
839
- contents = de_ListServicesResponse(data, context);
769
+ contents = _json(data);
840
770
  const response = {
841
771
  $metadata: deserializeMetadata(output),
842
772
  ...contents,
843
773
  };
844
- return Promise.resolve(response);
774
+ return response;
845
775
  };
846
776
  const de_ListServicesCommandError = async (output, context) => {
847
777
  const parsedOutput = {
@@ -867,10 +797,9 @@ const de_ListServicesCommandError = async (output, context) => {
867
797
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
868
798
  default:
869
799
  const parsedBody = parsedOutput.body;
870
- throwDefaultError({
800
+ return throwDefaultError({
871
801
  output,
872
802
  parsedBody,
873
- exceptionCtor: __BaseException,
874
803
  errorCode,
875
804
  });
876
805
  }
@@ -881,12 +810,12 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
881
810
  }
882
811
  const data = await parseBody(output.body, context);
883
812
  let contents = {};
884
- contents = de_ListTagsForResourceResponse(data, context);
813
+ contents = _json(data);
885
814
  const response = {
886
815
  $metadata: deserializeMetadata(output),
887
816
  ...contents,
888
817
  };
889
- return Promise.resolve(response);
818
+ return response;
890
819
  };
891
820
  const de_ListTagsForResourceCommandError = async (output, context) => {
892
821
  const parsedOutput = {
@@ -912,10 +841,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
912
841
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
913
842
  default:
914
843
  const parsedBody = parsedOutput.body;
915
- throwDefaultError({
844
+ return throwDefaultError({
916
845
  output,
917
846
  parsedBody,
918
- exceptionCtor: __BaseException,
919
847
  errorCode,
920
848
  });
921
849
  }
@@ -931,7 +859,7 @@ export const de_PutServiceQuotaIncreaseRequestIntoTemplateCommand = async (outpu
931
859
  $metadata: deserializeMetadata(output),
932
860
  ...contents,
933
861
  };
934
- return Promise.resolve(response);
862
+ return response;
935
863
  };
936
864
  const de_PutServiceQuotaIncreaseRequestIntoTemplateCommandError = async (output, context) => {
937
865
  const parsedOutput = {
@@ -972,10 +900,9 @@ const de_PutServiceQuotaIncreaseRequestIntoTemplateCommandError = async (output,
972
900
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
973
901
  default:
974
902
  const parsedBody = parsedOutput.body;
975
- throwDefaultError({
903
+ return throwDefaultError({
976
904
  output,
977
905
  parsedBody,
978
- exceptionCtor: __BaseException,
979
906
  errorCode,
980
907
  });
981
908
  }
@@ -991,7 +918,7 @@ export const de_RequestServiceQuotaIncreaseCommand = async (output, context) =>
991
918
  $metadata: deserializeMetadata(output),
992
919
  ...contents,
993
920
  };
994
- return Promise.resolve(response);
921
+ return response;
995
922
  };
996
923
  const de_RequestServiceQuotaIncreaseCommandError = async (output, context) => {
997
924
  const parsedOutput = {
@@ -1029,10 +956,9 @@ const de_RequestServiceQuotaIncreaseCommandError = async (output, context) => {
1029
956
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1030
957
  default:
1031
958
  const parsedBody = parsedOutput.body;
1032
- throwDefaultError({
959
+ return throwDefaultError({
1033
960
  output,
1034
961
  parsedBody,
1035
- exceptionCtor: __BaseException,
1036
962
  errorCode,
1037
963
  });
1038
964
  }
@@ -1043,12 +969,12 @@ export const de_TagResourceCommand = async (output, context) => {
1043
969
  }
1044
970
  const data = await parseBody(output.body, context);
1045
971
  let contents = {};
1046
- contents = de_TagResourceResponse(data, context);
972
+ contents = _json(data);
1047
973
  const response = {
1048
974
  $metadata: deserializeMetadata(output),
1049
975
  ...contents,
1050
976
  };
1051
- return Promise.resolve(response);
977
+ return response;
1052
978
  };
1053
979
  const de_TagResourceCommandError = async (output, context) => {
1054
980
  const parsedOutput = {
@@ -1080,10 +1006,9 @@ const de_TagResourceCommandError = async (output, context) => {
1080
1006
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1081
1007
  default:
1082
1008
  const parsedBody = parsedOutput.body;
1083
- throwDefaultError({
1009
+ return throwDefaultError({
1084
1010
  output,
1085
1011
  parsedBody,
1086
- exceptionCtor: __BaseException,
1087
1012
  errorCode,
1088
1013
  });
1089
1014
  }
@@ -1094,12 +1019,12 @@ export const de_UntagResourceCommand = async (output, context) => {
1094
1019
  }
1095
1020
  const data = await parseBody(output.body, context);
1096
1021
  let contents = {};
1097
- contents = de_UntagResourceResponse(data, context);
1022
+ contents = _json(data);
1098
1023
  const response = {
1099
1024
  $metadata: deserializeMetadata(output),
1100
1025
  ...contents,
1101
1026
  };
1102
- return Promise.resolve(response);
1027
+ return response;
1103
1028
  };
1104
1029
  const de_UntagResourceCommandError = async (output, context) => {
1105
1030
  const parsedOutput = {
@@ -1125,17 +1050,16 @@ const de_UntagResourceCommandError = async (output, context) => {
1125
1050
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1126
1051
  default:
1127
1052
  const parsedBody = parsedOutput.body;
1128
- throwDefaultError({
1053
+ return throwDefaultError({
1129
1054
  output,
1130
1055
  parsedBody,
1131
- exceptionCtor: __BaseException,
1132
1056
  errorCode,
1133
1057
  });
1134
1058
  }
1135
1059
  };
1136
1060
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1137
1061
  const body = parsedOutput.body;
1138
- const deserialized = de_AccessDeniedException(body, context);
1062
+ const deserialized = _json(body);
1139
1063
  const exception = new AccessDeniedException({
1140
1064
  $metadata: deserializeMetadata(parsedOutput),
1141
1065
  ...deserialized,
@@ -1144,7 +1068,7 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1144
1068
  };
1145
1069
  const de_AWSServiceAccessNotEnabledExceptionRes = async (parsedOutput, context) => {
1146
1070
  const body = parsedOutput.body;
1147
- const deserialized = de_AWSServiceAccessNotEnabledException(body, context);
1071
+ const deserialized = _json(body);
1148
1072
  const exception = new AWSServiceAccessNotEnabledException({
1149
1073
  $metadata: deserializeMetadata(parsedOutput),
1150
1074
  ...deserialized,
@@ -1153,7 +1077,7 @@ const de_AWSServiceAccessNotEnabledExceptionRes = async (parsedOutput, context)
1153
1077
  };
1154
1078
  const de_DependencyAccessDeniedExceptionRes = async (parsedOutput, context) => {
1155
1079
  const body = parsedOutput.body;
1156
- const deserialized = de_DependencyAccessDeniedException(body, context);
1080
+ const deserialized = _json(body);
1157
1081
  const exception = new DependencyAccessDeniedException({
1158
1082
  $metadata: deserializeMetadata(parsedOutput),
1159
1083
  ...deserialized,
@@ -1162,7 +1086,7 @@ const de_DependencyAccessDeniedExceptionRes = async (parsedOutput, context) => {
1162
1086
  };
1163
1087
  const de_IllegalArgumentExceptionRes = async (parsedOutput, context) => {
1164
1088
  const body = parsedOutput.body;
1165
- const deserialized = de_IllegalArgumentException(body, context);
1089
+ const deserialized = _json(body);
1166
1090
  const exception = new IllegalArgumentException({
1167
1091
  $metadata: deserializeMetadata(parsedOutput),
1168
1092
  ...deserialized,
@@ -1171,7 +1095,7 @@ const de_IllegalArgumentExceptionRes = async (parsedOutput, context) => {
1171
1095
  };
1172
1096
  const de_InvalidPaginationTokenExceptionRes = async (parsedOutput, context) => {
1173
1097
  const body = parsedOutput.body;
1174
- const deserialized = de_InvalidPaginationTokenException(body, context);
1098
+ const deserialized = _json(body);
1175
1099
  const exception = new InvalidPaginationTokenException({
1176
1100
  $metadata: deserializeMetadata(parsedOutput),
1177
1101
  ...deserialized,
@@ -1180,7 +1104,7 @@ const de_InvalidPaginationTokenExceptionRes = async (parsedOutput, context) => {
1180
1104
  };
1181
1105
  const de_InvalidResourceStateExceptionRes = async (parsedOutput, context) => {
1182
1106
  const body = parsedOutput.body;
1183
- const deserialized = de_InvalidResourceStateException(body, context);
1107
+ const deserialized = _json(body);
1184
1108
  const exception = new InvalidResourceStateException({
1185
1109
  $metadata: deserializeMetadata(parsedOutput),
1186
1110
  ...deserialized,
@@ -1189,7 +1113,7 @@ const de_InvalidResourceStateExceptionRes = async (parsedOutput, context) => {
1189
1113
  };
1190
1114
  const de_NoAvailableOrganizationExceptionRes = async (parsedOutput, context) => {
1191
1115
  const body = parsedOutput.body;
1192
- const deserialized = de_NoAvailableOrganizationException(body, context);
1116
+ const deserialized = _json(body);
1193
1117
  const exception = new NoAvailableOrganizationException({
1194
1118
  $metadata: deserializeMetadata(parsedOutput),
1195
1119
  ...deserialized,
@@ -1198,7 +1122,7 @@ const de_NoAvailableOrganizationExceptionRes = async (parsedOutput, context) =>
1198
1122
  };
1199
1123
  const de_NoSuchResourceExceptionRes = async (parsedOutput, context) => {
1200
1124
  const body = parsedOutput.body;
1201
- const deserialized = de_NoSuchResourceException(body, context);
1125
+ const deserialized = _json(body);
1202
1126
  const exception = new NoSuchResourceException({
1203
1127
  $metadata: deserializeMetadata(parsedOutput),
1204
1128
  ...deserialized,
@@ -1207,7 +1131,7 @@ const de_NoSuchResourceExceptionRes = async (parsedOutput, context) => {
1207
1131
  };
1208
1132
  const de_OrganizationNotInAllFeaturesModeExceptionRes = async (parsedOutput, context) => {
1209
1133
  const body = parsedOutput.body;
1210
- const deserialized = de_OrganizationNotInAllFeaturesModeException(body, context);
1134
+ const deserialized = _json(body);
1211
1135
  const exception = new OrganizationNotInAllFeaturesModeException({
1212
1136
  $metadata: deserializeMetadata(parsedOutput),
1213
1137
  ...deserialized,
@@ -1216,7 +1140,7 @@ const de_OrganizationNotInAllFeaturesModeExceptionRes = async (parsedOutput, con
1216
1140
  };
1217
1141
  const de_QuotaExceededExceptionRes = async (parsedOutput, context) => {
1218
1142
  const body = parsedOutput.body;
1219
- const deserialized = de_QuotaExceededException(body, context);
1143
+ const deserialized = _json(body);
1220
1144
  const exception = new QuotaExceededException({
1221
1145
  $metadata: deserializeMetadata(parsedOutput),
1222
1146
  ...deserialized,
@@ -1225,7 +1149,7 @@ const de_QuotaExceededExceptionRes = async (parsedOutput, context) => {
1225
1149
  };
1226
1150
  const de_ResourceAlreadyExistsExceptionRes = async (parsedOutput, context) => {
1227
1151
  const body = parsedOutput.body;
1228
- const deserialized = de_ResourceAlreadyExistsException(body, context);
1152
+ const deserialized = _json(body);
1229
1153
  const exception = new ResourceAlreadyExistsException({
1230
1154
  $metadata: deserializeMetadata(parsedOutput),
1231
1155
  ...deserialized,
@@ -1234,7 +1158,7 @@ const de_ResourceAlreadyExistsExceptionRes = async (parsedOutput, context) => {
1234
1158
  };
1235
1159
  const de_ServiceExceptionRes = async (parsedOutput, context) => {
1236
1160
  const body = parsedOutput.body;
1237
- const deserialized = de_ServiceException(body, context);
1161
+ const deserialized = _json(body);
1238
1162
  const exception = new ServiceException({
1239
1163
  $metadata: deserializeMetadata(parsedOutput),
1240
1164
  ...deserialized,
@@ -1243,7 +1167,7 @@ const de_ServiceExceptionRes = async (parsedOutput, context) => {
1243
1167
  };
1244
1168
  const de_ServiceQuotaTemplateNotInUseExceptionRes = async (parsedOutput, context) => {
1245
1169
  const body = parsedOutput.body;
1246
- const deserialized = de_ServiceQuotaTemplateNotInUseException(body, context);
1170
+ const deserialized = _json(body);
1247
1171
  const exception = new ServiceQuotaTemplateNotInUseException({
1248
1172
  $metadata: deserializeMetadata(parsedOutput),
1249
1173
  ...deserialized,
@@ -1252,7 +1176,7 @@ const de_ServiceQuotaTemplateNotInUseExceptionRes = async (parsedOutput, context
1252
1176
  };
1253
1177
  const de_TagPolicyViolationExceptionRes = async (parsedOutput, context) => {
1254
1178
  const body = parsedOutput.body;
1255
- const deserialized = de_TagPolicyViolationException(body, context);
1179
+ const deserialized = _json(body);
1256
1180
  const exception = new TagPolicyViolationException({
1257
1181
  $metadata: deserializeMetadata(parsedOutput),
1258
1182
  ...deserialized,
@@ -1261,7 +1185,7 @@ const de_TagPolicyViolationExceptionRes = async (parsedOutput, context) => {
1261
1185
  };
1262
1186
  const de_TemplatesNotAvailableInRegionExceptionRes = async (parsedOutput, context) => {
1263
1187
  const body = parsedOutput.body;
1264
- const deserialized = de_TemplatesNotAvailableInRegionException(body, context);
1188
+ const deserialized = _json(body);
1265
1189
  const exception = new TemplatesNotAvailableInRegionException({
1266
1190
  $metadata: deserializeMetadata(parsedOutput),
1267
1191
  ...deserialized,
@@ -1270,7 +1194,7 @@ const de_TemplatesNotAvailableInRegionExceptionRes = async (parsedOutput, contex
1270
1194
  };
1271
1195
  const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
1272
1196
  const body = parsedOutput.body;
1273
- const deserialized = de_TooManyRequestsException(body, context);
1197
+ const deserialized = _json(body);
1274
1198
  const exception = new TooManyRequestsException({
1275
1199
  $metadata: deserializeMetadata(parsedOutput),
1276
1200
  ...deserialized,
@@ -1279,428 +1203,146 @@ const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
1279
1203
  };
1280
1204
  const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
1281
1205
  const body = parsedOutput.body;
1282
- const deserialized = de_TooManyTagsException(body, context);
1206
+ const deserialized = _json(body);
1283
1207
  const exception = new TooManyTagsException({
1284
1208
  $metadata: deserializeMetadata(parsedOutput),
1285
1209
  ...deserialized,
1286
1210
  });
1287
1211
  return __decorateServiceException(exception, body);
1288
1212
  };
1289
- const se_AssociateServiceQuotaTemplateRequest = (input, context) => {
1290
- return {};
1291
- };
1292
- const se_DeleteServiceQuotaIncreaseRequestFromTemplateRequest = (input, context) => {
1293
- return {
1294
- ...(input.AwsRegion != null && { AwsRegion: input.AwsRegion }),
1295
- ...(input.QuotaCode != null && { QuotaCode: input.QuotaCode }),
1296
- ...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }),
1297
- };
1298
- };
1299
- const se_DisassociateServiceQuotaTemplateRequest = (input, context) => {
1300
- return {};
1301
- };
1302
- const se_GetAssociationForServiceQuotaTemplateRequest = (input, context) => {
1303
- return {};
1304
- };
1305
- const se_GetAWSDefaultServiceQuotaRequest = (input, context) => {
1306
- return {
1307
- ...(input.QuotaCode != null && { QuotaCode: input.QuotaCode }),
1308
- ...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }),
1309
- };
1310
- };
1311
- const se_GetRequestedServiceQuotaChangeRequest = (input, context) => {
1312
- return {
1313
- ...(input.RequestId != null && { RequestId: input.RequestId }),
1314
- };
1315
- };
1316
- const se_GetServiceQuotaIncreaseRequestFromTemplateRequest = (input, context) => {
1317
- return {
1318
- ...(input.AwsRegion != null && { AwsRegion: input.AwsRegion }),
1319
- ...(input.QuotaCode != null && { QuotaCode: input.QuotaCode }),
1320
- ...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }),
1321
- };
1322
- };
1323
- const se_GetServiceQuotaRequest = (input, context) => {
1324
- return {
1325
- ...(input.QuotaCode != null && { QuotaCode: input.QuotaCode }),
1326
- ...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }),
1327
- };
1328
- };
1329
- const se_InputTagKeys = (input, context) => {
1330
- return input
1331
- .filter((e) => e != null)
1332
- .map((entry) => {
1333
- return entry;
1334
- });
1335
- };
1336
- const se_InputTags = (input, context) => {
1337
- return input
1338
- .filter((e) => e != null)
1339
- .map((entry) => {
1340
- return se_Tag(entry, context);
1341
- });
1342
- };
1343
- const se_ListAWSDefaultServiceQuotasRequest = (input, context) => {
1344
- return {
1345
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1346
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1347
- ...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }),
1348
- };
1349
- };
1350
- const se_ListRequestedServiceQuotaChangeHistoryByQuotaRequest = (input, context) => {
1351
- return {
1352
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1353
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1354
- ...(input.QuotaCode != null && { QuotaCode: input.QuotaCode }),
1355
- ...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }),
1356
- ...(input.Status != null && { Status: input.Status }),
1357
- };
1358
- };
1359
- const se_ListRequestedServiceQuotaChangeHistoryRequest = (input, context) => {
1360
- return {
1361
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1362
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1363
- ...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }),
1364
- ...(input.Status != null && { Status: input.Status }),
1365
- };
1366
- };
1367
- const se_ListServiceQuotaIncreaseRequestsInTemplateRequest = (input, context) => {
1368
- return {
1369
- ...(input.AwsRegion != null && { AwsRegion: input.AwsRegion }),
1370
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1371
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1372
- ...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }),
1373
- };
1374
- };
1375
- const se_ListServiceQuotasRequest = (input, context) => {
1376
- return {
1377
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1378
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1379
- ...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }),
1380
- };
1381
- };
1382
- const se_ListServicesRequest = (input, context) => {
1383
- return {
1384
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1385
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1386
- };
1387
- };
1388
- const se_ListTagsForResourceRequest = (input, context) => {
1389
- return {
1390
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1391
- };
1392
- };
1393
1213
  const se_PutServiceQuotaIncreaseRequestIntoTemplateRequest = (input, context) => {
1394
- return {
1395
- ...(input.AwsRegion != null && { AwsRegion: input.AwsRegion }),
1396
- ...(input.DesiredValue != null && { DesiredValue: __serializeFloat(input.DesiredValue) }),
1397
- ...(input.QuotaCode != null && { QuotaCode: input.QuotaCode }),
1398
- ...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }),
1399
- };
1214
+ return take(input, {
1215
+ AwsRegion: [],
1216
+ DesiredValue: __serializeFloat,
1217
+ QuotaCode: [],
1218
+ ServiceCode: [],
1219
+ });
1400
1220
  };
1401
1221
  const se_RequestServiceQuotaIncreaseRequest = (input, context) => {
1402
- return {
1403
- ...(input.DesiredValue != null && { DesiredValue: __serializeFloat(input.DesiredValue) }),
1404
- ...(input.QuotaCode != null && { QuotaCode: input.QuotaCode }),
1405
- ...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }),
1406
- };
1407
- };
1408
- const se_Tag = (input, context) => {
1409
- return {
1410
- ...(input.Key != null && { Key: input.Key }),
1411
- ...(input.Value != null && { Value: input.Value }),
1412
- };
1413
- };
1414
- const se_TagResourceRequest = (input, context) => {
1415
- return {
1416
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1417
- ...(input.Tags != null && { Tags: se_InputTags(input.Tags, context) }),
1418
- };
1419
- };
1420
- const se_UntagResourceRequest = (input, context) => {
1421
- return {
1422
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1423
- ...(input.TagKeys != null && { TagKeys: se_InputTagKeys(input.TagKeys, context) }),
1424
- };
1425
- };
1426
- const de_AccessDeniedException = (output, context) => {
1427
- return {
1428
- Message: __expectString(output.Message),
1429
- };
1430
- };
1431
- const de_AssociateServiceQuotaTemplateResponse = (output, context) => {
1432
- return {};
1433
- };
1434
- const de_AWSServiceAccessNotEnabledException = (output, context) => {
1435
- return {
1436
- Message: __expectString(output.Message),
1437
- };
1438
- };
1439
- const de_DeleteServiceQuotaIncreaseRequestFromTemplateResponse = (output, context) => {
1440
- return {};
1441
- };
1442
- const de_DependencyAccessDeniedException = (output, context) => {
1443
- return {
1444
- Message: __expectString(output.Message),
1445
- };
1446
- };
1447
- const de_DisassociateServiceQuotaTemplateResponse = (output, context) => {
1448
- return {};
1449
- };
1450
- const de_ErrorReason = (output, context) => {
1451
- return {
1452
- ErrorCode: __expectString(output.ErrorCode),
1453
- ErrorMessage: __expectString(output.ErrorMessage),
1454
- };
1455
- };
1456
- const de_GetAssociationForServiceQuotaTemplateResponse = (output, context) => {
1457
- return {
1458
- ServiceQuotaTemplateAssociationStatus: __expectString(output.ServiceQuotaTemplateAssociationStatus),
1459
- };
1222
+ return take(input, {
1223
+ DesiredValue: __serializeFloat,
1224
+ QuotaCode: [],
1225
+ ServiceCode: [],
1226
+ });
1460
1227
  };
1461
1228
  const de_GetAWSDefaultServiceQuotaResponse = (output, context) => {
1462
- return {
1463
- Quota: output.Quota != null ? de_ServiceQuota(output.Quota, context) : undefined,
1464
- };
1229
+ return take(output, {
1230
+ Quota: (_) => de_ServiceQuota(_, context),
1231
+ });
1465
1232
  };
1466
1233
  const de_GetRequestedServiceQuotaChangeResponse = (output, context) => {
1467
- return {
1468
- RequestedQuota: output.RequestedQuota != null ? de_RequestedServiceQuotaChange(output.RequestedQuota, context) : undefined,
1469
- };
1234
+ return take(output, {
1235
+ RequestedQuota: (_) => de_RequestedServiceQuotaChange(_, context),
1236
+ });
1470
1237
  };
1471
1238
  const de_GetServiceQuotaIncreaseRequestFromTemplateResponse = (output, context) => {
1472
- return {
1473
- ServiceQuotaIncreaseRequestInTemplate: output.ServiceQuotaIncreaseRequestInTemplate != null
1474
- ? de_ServiceQuotaIncreaseRequestInTemplate(output.ServiceQuotaIncreaseRequestInTemplate, context)
1475
- : undefined,
1476
- };
1239
+ return take(output, {
1240
+ ServiceQuotaIncreaseRequestInTemplate: (_) => de_ServiceQuotaIncreaseRequestInTemplate(_, context),
1241
+ });
1477
1242
  };
1478
1243
  const de_GetServiceQuotaResponse = (output, context) => {
1479
- return {
1480
- Quota: output.Quota != null ? de_ServiceQuota(output.Quota, context) : undefined,
1481
- };
1482
- };
1483
- const de_IllegalArgumentException = (output, context) => {
1484
- return {
1485
- Message: __expectString(output.Message),
1486
- };
1487
- };
1488
- const de_InvalidPaginationTokenException = (output, context) => {
1489
- return {
1490
- Message: __expectString(output.Message),
1491
- };
1492
- };
1493
- const de_InvalidResourceStateException = (output, context) => {
1494
- return {
1495
- Message: __expectString(output.Message),
1496
- };
1244
+ return take(output, {
1245
+ Quota: (_) => de_ServiceQuota(_, context),
1246
+ });
1497
1247
  };
1498
1248
  const de_ListAWSDefaultServiceQuotasResponse = (output, context) => {
1499
- return {
1500
- NextToken: __expectString(output.NextToken),
1501
- Quotas: output.Quotas != null ? de_ServiceQuotaListDefinition(output.Quotas, context) : undefined,
1502
- };
1249
+ return take(output, {
1250
+ NextToken: __expectString,
1251
+ Quotas: (_) => de_ServiceQuotaListDefinition(_, context),
1252
+ });
1503
1253
  };
1504
1254
  const de_ListRequestedServiceQuotaChangeHistoryByQuotaResponse = (output, context) => {
1505
- return {
1506
- NextToken: __expectString(output.NextToken),
1507
- RequestedQuotas: output.RequestedQuotas != null
1508
- ? de_RequestedServiceQuotaChangeHistoryListDefinition(output.RequestedQuotas, context)
1509
- : undefined,
1510
- };
1255
+ return take(output, {
1256
+ NextToken: __expectString,
1257
+ RequestedQuotas: (_) => de_RequestedServiceQuotaChangeHistoryListDefinition(_, context),
1258
+ });
1511
1259
  };
1512
1260
  const de_ListRequestedServiceQuotaChangeHistoryResponse = (output, context) => {
1513
- return {
1514
- NextToken: __expectString(output.NextToken),
1515
- RequestedQuotas: output.RequestedQuotas != null
1516
- ? de_RequestedServiceQuotaChangeHistoryListDefinition(output.RequestedQuotas, context)
1517
- : undefined,
1518
- };
1261
+ return take(output, {
1262
+ NextToken: __expectString,
1263
+ RequestedQuotas: (_) => de_RequestedServiceQuotaChangeHistoryListDefinition(_, context),
1264
+ });
1519
1265
  };
1520
1266
  const de_ListServiceQuotaIncreaseRequestsInTemplateResponse = (output, context) => {
1521
- return {
1522
- NextToken: __expectString(output.NextToken),
1523
- ServiceQuotaIncreaseRequestInTemplateList: output.ServiceQuotaIncreaseRequestInTemplateList != null
1524
- ? de_ServiceQuotaIncreaseRequestInTemplateList(output.ServiceQuotaIncreaseRequestInTemplateList, context)
1525
- : undefined,
1526
- };
1267
+ return take(output, {
1268
+ NextToken: __expectString,
1269
+ ServiceQuotaIncreaseRequestInTemplateList: (_) => de_ServiceQuotaIncreaseRequestInTemplateList(_, context),
1270
+ });
1527
1271
  };
1528
1272
  const de_ListServiceQuotasResponse = (output, context) => {
1529
- return {
1530
- NextToken: __expectString(output.NextToken),
1531
- Quotas: output.Quotas != null ? de_ServiceQuotaListDefinition(output.Quotas, context) : undefined,
1532
- };
1533
- };
1534
- const de_ListServicesResponse = (output, context) => {
1535
- return {
1536
- NextToken: __expectString(output.NextToken),
1537
- Services: output.Services != null ? de_ServiceInfoListDefinition(output.Services, context) : undefined,
1538
- };
1539
- };
1540
- const de_ListTagsForResourceResponse = (output, context) => {
1541
- return {
1542
- Tags: output.Tags != null ? de_OutputTags(output.Tags, context) : undefined,
1543
- };
1544
- };
1545
- const de_MetricDimensionsMapDefinition = (output, context) => {
1546
- return Object.entries(output).reduce((acc, [key, value]) => {
1547
- if (value === null) {
1548
- return acc;
1549
- }
1550
- acc[key] = __expectString(value);
1551
- return acc;
1552
- }, {});
1553
- };
1554
- const de_MetricInfo = (output, context) => {
1555
- return {
1556
- MetricDimensions: output.MetricDimensions != null ? de_MetricDimensionsMapDefinition(output.MetricDimensions, context) : undefined,
1557
- MetricName: __expectString(output.MetricName),
1558
- MetricNamespace: __expectString(output.MetricNamespace),
1559
- MetricStatisticRecommendation: __expectString(output.MetricStatisticRecommendation),
1560
- };
1561
- };
1562
- const de_NoAvailableOrganizationException = (output, context) => {
1563
- return {
1564
- Message: __expectString(output.Message),
1565
- };
1566
- };
1567
- const de_NoSuchResourceException = (output, context) => {
1568
- return {
1569
- Message: __expectString(output.Message),
1570
- };
1571
- };
1572
- const de_OrganizationNotInAllFeaturesModeException = (output, context) => {
1573
- return {
1574
- Message: __expectString(output.Message),
1575
- };
1576
- };
1577
- const de_OutputTags = (output, context) => {
1578
- const retVal = (output || [])
1579
- .filter((e) => e != null)
1580
- .map((entry) => {
1581
- if (entry === null) {
1582
- return null;
1583
- }
1584
- return de_Tag(entry, context);
1273
+ return take(output, {
1274
+ NextToken: __expectString,
1275
+ Quotas: (_) => de_ServiceQuotaListDefinition(_, context),
1585
1276
  });
1586
- return retVal;
1587
1277
  };
1588
1278
  const de_PutServiceQuotaIncreaseRequestIntoTemplateResponse = (output, context) => {
1589
- return {
1590
- ServiceQuotaIncreaseRequestInTemplate: output.ServiceQuotaIncreaseRequestInTemplate != null
1591
- ? de_ServiceQuotaIncreaseRequestInTemplate(output.ServiceQuotaIncreaseRequestInTemplate, context)
1592
- : undefined,
1593
- };
1594
- };
1595
- const de_QuotaExceededException = (output, context) => {
1596
- return {
1597
- Message: __expectString(output.Message),
1598
- };
1599
- };
1600
- const de_QuotaPeriod = (output, context) => {
1601
- return {
1602
- PeriodUnit: __expectString(output.PeriodUnit),
1603
- PeriodValue: __expectInt32(output.PeriodValue),
1604
- };
1279
+ return take(output, {
1280
+ ServiceQuotaIncreaseRequestInTemplate: (_) => de_ServiceQuotaIncreaseRequestInTemplate(_, context),
1281
+ });
1605
1282
  };
1606
1283
  const de_RequestedServiceQuotaChange = (output, context) => {
1607
- return {
1608
- CaseId: __expectString(output.CaseId),
1609
- Created: output.Created != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Created))) : undefined,
1610
- DesiredValue: __limitedParseDouble(output.DesiredValue),
1611
- GlobalQuota: __expectBoolean(output.GlobalQuota),
1612
- Id: __expectString(output.Id),
1613
- LastUpdated: output.LastUpdated != null
1614
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdated)))
1615
- : undefined,
1616
- QuotaArn: __expectString(output.QuotaArn),
1617
- QuotaCode: __expectString(output.QuotaCode),
1618
- QuotaName: __expectString(output.QuotaName),
1619
- Requester: __expectString(output.Requester),
1620
- ServiceCode: __expectString(output.ServiceCode),
1621
- ServiceName: __expectString(output.ServiceName),
1622
- Status: __expectString(output.Status),
1623
- Unit: __expectString(output.Unit),
1624
- };
1284
+ return take(output, {
1285
+ CaseId: __expectString,
1286
+ Created: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1287
+ DesiredValue: __limitedParseDouble,
1288
+ GlobalQuota: __expectBoolean,
1289
+ Id: __expectString,
1290
+ LastUpdated: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1291
+ QuotaArn: __expectString,
1292
+ QuotaCode: __expectString,
1293
+ QuotaName: __expectString,
1294
+ Requester: __expectString,
1295
+ ServiceCode: __expectString,
1296
+ ServiceName: __expectString,
1297
+ Status: __expectString,
1298
+ Unit: __expectString,
1299
+ });
1625
1300
  };
1626
1301
  const de_RequestedServiceQuotaChangeHistoryListDefinition = (output, context) => {
1627
1302
  const retVal = (output || [])
1628
1303
  .filter((e) => e != null)
1629
1304
  .map((entry) => {
1630
- if (entry === null) {
1631
- return null;
1632
- }
1633
1305
  return de_RequestedServiceQuotaChange(entry, context);
1634
1306
  });
1635
1307
  return retVal;
1636
1308
  };
1637
1309
  const de_RequestServiceQuotaIncreaseResponse = (output, context) => {
1638
- return {
1639
- RequestedQuota: output.RequestedQuota != null ? de_RequestedServiceQuotaChange(output.RequestedQuota, context) : undefined,
1640
- };
1641
- };
1642
- const de_ResourceAlreadyExistsException = (output, context) => {
1643
- return {
1644
- Message: __expectString(output.Message),
1645
- };
1646
- };
1647
- const de_ServiceException = (output, context) => {
1648
- return {
1649
- Message: __expectString(output.Message),
1650
- };
1651
- };
1652
- const de_ServiceInfo = (output, context) => {
1653
- return {
1654
- ServiceCode: __expectString(output.ServiceCode),
1655
- ServiceName: __expectString(output.ServiceName),
1656
- };
1657
- };
1658
- const de_ServiceInfoListDefinition = (output, context) => {
1659
- const retVal = (output || [])
1660
- .filter((e) => e != null)
1661
- .map((entry) => {
1662
- if (entry === null) {
1663
- return null;
1664
- }
1665
- return de_ServiceInfo(entry, context);
1310
+ return take(output, {
1311
+ RequestedQuota: (_) => de_RequestedServiceQuotaChange(_, context),
1666
1312
  });
1667
- return retVal;
1668
1313
  };
1669
1314
  const de_ServiceQuota = (output, context) => {
1670
- return {
1671
- Adjustable: __expectBoolean(output.Adjustable),
1672
- ErrorReason: output.ErrorReason != null ? de_ErrorReason(output.ErrorReason, context) : undefined,
1673
- GlobalQuota: __expectBoolean(output.GlobalQuota),
1674
- Period: output.Period != null ? de_QuotaPeriod(output.Period, context) : undefined,
1675
- QuotaArn: __expectString(output.QuotaArn),
1676
- QuotaCode: __expectString(output.QuotaCode),
1677
- QuotaName: __expectString(output.QuotaName),
1678
- ServiceCode: __expectString(output.ServiceCode),
1679
- ServiceName: __expectString(output.ServiceName),
1680
- Unit: __expectString(output.Unit),
1681
- UsageMetric: output.UsageMetric != null ? de_MetricInfo(output.UsageMetric, context) : undefined,
1682
- Value: __limitedParseDouble(output.Value),
1683
- };
1315
+ return take(output, {
1316
+ Adjustable: __expectBoolean,
1317
+ ErrorReason: _json,
1318
+ GlobalQuota: __expectBoolean,
1319
+ Period: _json,
1320
+ QuotaArn: __expectString,
1321
+ QuotaCode: __expectString,
1322
+ QuotaName: __expectString,
1323
+ ServiceCode: __expectString,
1324
+ ServiceName: __expectString,
1325
+ Unit: __expectString,
1326
+ UsageMetric: _json,
1327
+ Value: __limitedParseDouble,
1328
+ });
1684
1329
  };
1685
1330
  const de_ServiceQuotaIncreaseRequestInTemplate = (output, context) => {
1686
- return {
1687
- AwsRegion: __expectString(output.AwsRegion),
1688
- DesiredValue: __limitedParseDouble(output.DesiredValue),
1689
- GlobalQuota: __expectBoolean(output.GlobalQuota),
1690
- QuotaCode: __expectString(output.QuotaCode),
1691
- QuotaName: __expectString(output.QuotaName),
1692
- ServiceCode: __expectString(output.ServiceCode),
1693
- ServiceName: __expectString(output.ServiceName),
1694
- Unit: __expectString(output.Unit),
1695
- };
1331
+ return take(output, {
1332
+ AwsRegion: __expectString,
1333
+ DesiredValue: __limitedParseDouble,
1334
+ GlobalQuota: __expectBoolean,
1335
+ QuotaCode: __expectString,
1336
+ QuotaName: __expectString,
1337
+ ServiceCode: __expectString,
1338
+ ServiceName: __expectString,
1339
+ Unit: __expectString,
1340
+ });
1696
1341
  };
1697
1342
  const de_ServiceQuotaIncreaseRequestInTemplateList = (output, context) => {
1698
1343
  const retVal = (output || [])
1699
1344
  .filter((e) => e != null)
1700
1345
  .map((entry) => {
1701
- if (entry === null) {
1702
- return null;
1703
- }
1704
1346
  return de_ServiceQuotaIncreaseRequestInTemplate(entry, context);
1705
1347
  });
1706
1348
  return retVal;
@@ -1709,50 +1351,10 @@ const de_ServiceQuotaListDefinition = (output, context) => {
1709
1351
  const retVal = (output || [])
1710
1352
  .filter((e) => e != null)
1711
1353
  .map((entry) => {
1712
- if (entry === null) {
1713
- return null;
1714
- }
1715
1354
  return de_ServiceQuota(entry, context);
1716
1355
  });
1717
1356
  return retVal;
1718
1357
  };
1719
- const de_ServiceQuotaTemplateNotInUseException = (output, context) => {
1720
- return {
1721
- Message: __expectString(output.Message),
1722
- };
1723
- };
1724
- const de_Tag = (output, context) => {
1725
- return {
1726
- Key: __expectString(output.Key),
1727
- Value: __expectString(output.Value),
1728
- };
1729
- };
1730
- const de_TagPolicyViolationException = (output, context) => {
1731
- return {
1732
- Message: __expectString(output.Message),
1733
- };
1734
- };
1735
- const de_TagResourceResponse = (output, context) => {
1736
- return {};
1737
- };
1738
- const de_TemplatesNotAvailableInRegionException = (output, context) => {
1739
- return {
1740
- Message: __expectString(output.Message),
1741
- };
1742
- };
1743
- const de_TooManyRequestsException = (output, context) => {
1744
- return {
1745
- Message: __expectString(output.Message),
1746
- };
1747
- };
1748
- const de_TooManyTagsException = (output, context) => {
1749
- return {
1750
- Message: __expectString(output.Message),
1751
- };
1752
- };
1753
- const de_UntagResourceResponse = (output, context) => {
1754
- return {};
1755
- };
1756
1358
  const deserializeMetadata = (output) => ({
1757
1359
  httpStatusCode: output.statusCode,
1758
1360
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -1766,6 +1368,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
1766
1368
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1767
1369
  };
1768
1370
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1371
+ const throwDefaultError = withBaseException(__BaseException);
1769
1372
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1770
1373
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1771
1374
  const contents = {
@@ -1784,6 +1387,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
1784
1387
  }
1785
1388
  return new __HttpRequest(contents);
1786
1389
  };
1390
+ function sharedHeaders(operation) {
1391
+ return {
1392
+ "content-type": "application/x-amz-json-1.1",
1393
+ "x-amz-target": `ServiceQuotasV20190624.${operation}`,
1394
+ };
1395
+ }
1787
1396
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1788
1397
  if (encoded.length) {
1789
1398
  return JSON.parse(encoded);