@aws-sdk/client-service-quotas 3.490.0 → 3.495.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.
Files changed (39) hide show
  1. package/dist-cjs/ServiceQuotas.js +1 -49
  2. package/dist-cjs/ServiceQuotasClient.js +1 -43
  3. package/dist-cjs/commands/AssociateServiceQuotaTemplateCommand.js +1 -28
  4. package/dist-cjs/commands/DeleteServiceQuotaIncreaseRequestFromTemplateCommand.js +1 -28
  5. package/dist-cjs/commands/DisassociateServiceQuotaTemplateCommand.js +1 -28
  6. package/dist-cjs/commands/GetAWSDefaultServiceQuotaCommand.js +1 -28
  7. package/dist-cjs/commands/GetAssociationForServiceQuotaTemplateCommand.js +1 -28
  8. package/dist-cjs/commands/GetRequestedServiceQuotaChangeCommand.js +1 -28
  9. package/dist-cjs/commands/GetServiceQuotaCommand.js +1 -28
  10. package/dist-cjs/commands/GetServiceQuotaIncreaseRequestFromTemplateCommand.js +1 -28
  11. package/dist-cjs/commands/ListAWSDefaultServiceQuotasCommand.js +1 -28
  12. package/dist-cjs/commands/ListRequestedServiceQuotaChangeHistoryByQuotaCommand.js +1 -28
  13. package/dist-cjs/commands/ListRequestedServiceQuotaChangeHistoryCommand.js +1 -28
  14. package/dist-cjs/commands/ListServiceQuotaIncreaseRequestsInTemplateCommand.js +1 -28
  15. package/dist-cjs/commands/ListServiceQuotasCommand.js +1 -28
  16. package/dist-cjs/commands/ListServicesCommand.js +1 -28
  17. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
  18. package/dist-cjs/commands/PutServiceQuotaIncreaseRequestIntoTemplateCommand.js +1 -28
  19. package/dist-cjs/commands/RequestServiceQuotaIncreaseCommand.js +1 -28
  20. package/dist-cjs/commands/TagResourceCommand.js +1 -28
  21. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  22. package/dist-cjs/commands/index.js +1 -22
  23. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  24. package/dist-cjs/extensionConfiguration.js +1 -2
  25. package/dist-cjs/index.js +2389 -11
  26. package/dist-cjs/models/ServiceQuotasServiceException.js +1 -12
  27. package/dist-cjs/models/index.js +1 -4
  28. package/dist-cjs/models/models_0.js +1 -279
  29. package/dist-cjs/pagination/Interfaces.js +1 -2
  30. package/dist-cjs/pagination/ListAWSDefaultServiceQuotasPaginator.js +1 -7
  31. package/dist-cjs/pagination/ListRequestedServiceQuotaChangeHistoryByQuotaPaginator.js +1 -7
  32. package/dist-cjs/pagination/ListRequestedServiceQuotaChangeHistoryPaginator.js +1 -7
  33. package/dist-cjs/pagination/ListServiceQuotaIncreaseRequestsInTemplatePaginator.js +1 -7
  34. package/dist-cjs/pagination/ListServiceQuotasPaginator.js +1 -7
  35. package/dist-cjs/pagination/ListServicesPaginator.js +1 -7
  36. package/dist-cjs/pagination/index.js +1 -10
  37. package/dist-cjs/protocols/Aws_json1_1.js +1 -1475
  38. package/dist-cjs/runtimeExtensions.js +1 -22
  39. package/package.json +40 -40
@@ -1,1475 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_RequestServiceQuotaIncreaseCommand = exports.de_PutServiceQuotaIncreaseRequestIntoTemplateCommand = exports.de_ListTagsForResourceCommand = exports.de_ListServicesCommand = exports.de_ListServiceQuotasCommand = exports.de_ListServiceQuotaIncreaseRequestsInTemplateCommand = exports.de_ListRequestedServiceQuotaChangeHistoryByQuotaCommand = exports.de_ListRequestedServiceQuotaChangeHistoryCommand = exports.de_ListAWSDefaultServiceQuotasCommand = exports.de_GetServiceQuotaIncreaseRequestFromTemplateCommand = exports.de_GetServiceQuotaCommand = exports.de_GetRequestedServiceQuotaChangeCommand = exports.de_GetAWSDefaultServiceQuotaCommand = exports.de_GetAssociationForServiceQuotaTemplateCommand = exports.de_DisassociateServiceQuotaTemplateCommand = exports.de_DeleteServiceQuotaIncreaseRequestFromTemplateCommand = exports.de_AssociateServiceQuotaTemplateCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_RequestServiceQuotaIncreaseCommand = exports.se_PutServiceQuotaIncreaseRequestIntoTemplateCommand = exports.se_ListTagsForResourceCommand = exports.se_ListServicesCommand = exports.se_ListServiceQuotasCommand = exports.se_ListServiceQuotaIncreaseRequestsInTemplateCommand = exports.se_ListRequestedServiceQuotaChangeHistoryByQuotaCommand = exports.se_ListRequestedServiceQuotaChangeHistoryCommand = exports.se_ListAWSDefaultServiceQuotasCommand = exports.se_GetServiceQuotaIncreaseRequestFromTemplateCommand = exports.se_GetServiceQuotaCommand = exports.se_GetRequestedServiceQuotaChangeCommand = exports.se_GetAWSDefaultServiceQuotaCommand = exports.se_GetAssociationForServiceQuotaTemplateCommand = exports.se_DisassociateServiceQuotaTemplateCommand = exports.se_DeleteServiceQuotaIncreaseRequestFromTemplateCommand = exports.se_AssociateServiceQuotaTemplateCommand = void 0;
4
- const protocol_http_1 = require("@smithy/protocol-http");
5
- const smithy_client_1 = require("@smithy/smithy-client");
6
- const models_0_1 = require("../models/models_0");
7
- const ServiceQuotasServiceException_1 = require("../models/ServiceQuotasServiceException");
8
- const se_AssociateServiceQuotaTemplateCommand = async (input, context) => {
9
- const headers = sharedHeaders("AssociateServiceQuotaTemplate");
10
- let body;
11
- body = JSON.stringify((0, smithy_client_1._json)(input));
12
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
- };
14
- exports.se_AssociateServiceQuotaTemplateCommand = se_AssociateServiceQuotaTemplateCommand;
15
- const se_DeleteServiceQuotaIncreaseRequestFromTemplateCommand = async (input, context) => {
16
- const headers = sharedHeaders("DeleteServiceQuotaIncreaseRequestFromTemplate");
17
- let body;
18
- body = JSON.stringify((0, smithy_client_1._json)(input));
19
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
20
- };
21
- exports.se_DeleteServiceQuotaIncreaseRequestFromTemplateCommand = se_DeleteServiceQuotaIncreaseRequestFromTemplateCommand;
22
- const se_DisassociateServiceQuotaTemplateCommand = async (input, context) => {
23
- const headers = sharedHeaders("DisassociateServiceQuotaTemplate");
24
- let body;
25
- body = JSON.stringify((0, smithy_client_1._json)(input));
26
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
27
- };
28
- exports.se_DisassociateServiceQuotaTemplateCommand = se_DisassociateServiceQuotaTemplateCommand;
29
- const se_GetAssociationForServiceQuotaTemplateCommand = async (input, context) => {
30
- const headers = sharedHeaders("GetAssociationForServiceQuotaTemplate");
31
- let body;
32
- body = JSON.stringify((0, smithy_client_1._json)(input));
33
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
34
- };
35
- exports.se_GetAssociationForServiceQuotaTemplateCommand = se_GetAssociationForServiceQuotaTemplateCommand;
36
- const se_GetAWSDefaultServiceQuotaCommand = async (input, context) => {
37
- const headers = sharedHeaders("GetAWSDefaultServiceQuota");
38
- let body;
39
- body = JSON.stringify((0, smithy_client_1._json)(input));
40
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
- };
42
- exports.se_GetAWSDefaultServiceQuotaCommand = se_GetAWSDefaultServiceQuotaCommand;
43
- const se_GetRequestedServiceQuotaChangeCommand = async (input, context) => {
44
- const headers = sharedHeaders("GetRequestedServiceQuotaChange");
45
- let body;
46
- body = JSON.stringify((0, smithy_client_1._json)(input));
47
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
48
- };
49
- exports.se_GetRequestedServiceQuotaChangeCommand = se_GetRequestedServiceQuotaChangeCommand;
50
- const se_GetServiceQuotaCommand = async (input, context) => {
51
- const headers = sharedHeaders("GetServiceQuota");
52
- let body;
53
- body = JSON.stringify((0, smithy_client_1._json)(input));
54
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
55
- };
56
- exports.se_GetServiceQuotaCommand = se_GetServiceQuotaCommand;
57
- const se_GetServiceQuotaIncreaseRequestFromTemplateCommand = async (input, context) => {
58
- const headers = sharedHeaders("GetServiceQuotaIncreaseRequestFromTemplate");
59
- let body;
60
- body = JSON.stringify((0, smithy_client_1._json)(input));
61
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
62
- };
63
- exports.se_GetServiceQuotaIncreaseRequestFromTemplateCommand = se_GetServiceQuotaIncreaseRequestFromTemplateCommand;
64
- const se_ListAWSDefaultServiceQuotasCommand = async (input, context) => {
65
- const headers = sharedHeaders("ListAWSDefaultServiceQuotas");
66
- let body;
67
- body = JSON.stringify((0, smithy_client_1._json)(input));
68
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
69
- };
70
- exports.se_ListAWSDefaultServiceQuotasCommand = se_ListAWSDefaultServiceQuotasCommand;
71
- const se_ListRequestedServiceQuotaChangeHistoryCommand = async (input, context) => {
72
- const headers = sharedHeaders("ListRequestedServiceQuotaChangeHistory");
73
- let body;
74
- body = JSON.stringify((0, smithy_client_1._json)(input));
75
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
- };
77
- exports.se_ListRequestedServiceQuotaChangeHistoryCommand = se_ListRequestedServiceQuotaChangeHistoryCommand;
78
- const se_ListRequestedServiceQuotaChangeHistoryByQuotaCommand = async (input, context) => {
79
- const headers = sharedHeaders("ListRequestedServiceQuotaChangeHistoryByQuota");
80
- let body;
81
- body = JSON.stringify((0, smithy_client_1._json)(input));
82
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
83
- };
84
- exports.se_ListRequestedServiceQuotaChangeHistoryByQuotaCommand = se_ListRequestedServiceQuotaChangeHistoryByQuotaCommand;
85
- const se_ListServiceQuotaIncreaseRequestsInTemplateCommand = async (input, context) => {
86
- const headers = sharedHeaders("ListServiceQuotaIncreaseRequestsInTemplate");
87
- let body;
88
- body = JSON.stringify((0, smithy_client_1._json)(input));
89
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
90
- };
91
- exports.se_ListServiceQuotaIncreaseRequestsInTemplateCommand = se_ListServiceQuotaIncreaseRequestsInTemplateCommand;
92
- const se_ListServiceQuotasCommand = async (input, context) => {
93
- const headers = sharedHeaders("ListServiceQuotas");
94
- let body;
95
- body = JSON.stringify((0, smithy_client_1._json)(input));
96
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
97
- };
98
- exports.se_ListServiceQuotasCommand = se_ListServiceQuotasCommand;
99
- const se_ListServicesCommand = async (input, context) => {
100
- const headers = sharedHeaders("ListServices");
101
- let body;
102
- body = JSON.stringify((0, smithy_client_1._json)(input));
103
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
104
- };
105
- exports.se_ListServicesCommand = se_ListServicesCommand;
106
- const se_ListTagsForResourceCommand = async (input, context) => {
107
- const headers = sharedHeaders("ListTagsForResource");
108
- let body;
109
- body = JSON.stringify((0, smithy_client_1._json)(input));
110
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
111
- };
112
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
113
- const se_PutServiceQuotaIncreaseRequestIntoTemplateCommand = async (input, context) => {
114
- const headers = sharedHeaders("PutServiceQuotaIncreaseRequestIntoTemplate");
115
- let body;
116
- body = JSON.stringify(se_PutServiceQuotaIncreaseRequestIntoTemplateRequest(input, context));
117
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
118
- };
119
- exports.se_PutServiceQuotaIncreaseRequestIntoTemplateCommand = se_PutServiceQuotaIncreaseRequestIntoTemplateCommand;
120
- const se_RequestServiceQuotaIncreaseCommand = async (input, context) => {
121
- const headers = sharedHeaders("RequestServiceQuotaIncrease");
122
- let body;
123
- body = JSON.stringify(se_RequestServiceQuotaIncreaseRequest(input, context));
124
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
125
- };
126
- exports.se_RequestServiceQuotaIncreaseCommand = se_RequestServiceQuotaIncreaseCommand;
127
- const se_TagResourceCommand = async (input, context) => {
128
- const headers = sharedHeaders("TagResource");
129
- let body;
130
- body = JSON.stringify((0, smithy_client_1._json)(input));
131
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
132
- };
133
- exports.se_TagResourceCommand = se_TagResourceCommand;
134
- const se_UntagResourceCommand = async (input, context) => {
135
- const headers = sharedHeaders("UntagResource");
136
- let body;
137
- body = JSON.stringify((0, smithy_client_1._json)(input));
138
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
139
- };
140
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
141
- const de_AssociateServiceQuotaTemplateCommand = async (output, context) => {
142
- if (output.statusCode >= 300) {
143
- return de_AssociateServiceQuotaTemplateCommandError(output, context);
144
- }
145
- const data = await parseBody(output.body, context);
146
- let contents = {};
147
- contents = (0, smithy_client_1._json)(data);
148
- const response = {
149
- $metadata: deserializeMetadata(output),
150
- ...contents,
151
- };
152
- return response;
153
- };
154
- exports.de_AssociateServiceQuotaTemplateCommand = de_AssociateServiceQuotaTemplateCommand;
155
- const de_AssociateServiceQuotaTemplateCommandError = async (output, context) => {
156
- const parsedOutput = {
157
- ...output,
158
- body: await parseErrorBody(output.body, context),
159
- };
160
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
161
- switch (errorCode) {
162
- case "AWSServiceAccessNotEnabledException":
163
- case "com.amazonaws.servicequotas#AWSServiceAccessNotEnabledException":
164
- throw await de_AWSServiceAccessNotEnabledExceptionRes(parsedOutput, context);
165
- case "AccessDeniedException":
166
- case "com.amazonaws.servicequotas#AccessDeniedException":
167
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
168
- case "DependencyAccessDeniedException":
169
- case "com.amazonaws.servicequotas#DependencyAccessDeniedException":
170
- throw await de_DependencyAccessDeniedExceptionRes(parsedOutput, context);
171
- case "NoAvailableOrganizationException":
172
- case "com.amazonaws.servicequotas#NoAvailableOrganizationException":
173
- throw await de_NoAvailableOrganizationExceptionRes(parsedOutput, context);
174
- case "OrganizationNotInAllFeaturesModeException":
175
- case "com.amazonaws.servicequotas#OrganizationNotInAllFeaturesModeException":
176
- throw await de_OrganizationNotInAllFeaturesModeExceptionRes(parsedOutput, context);
177
- case "ServiceException":
178
- case "com.amazonaws.servicequotas#ServiceException":
179
- throw await de_ServiceExceptionRes(parsedOutput, context);
180
- case "TemplatesNotAvailableInRegionException":
181
- case "com.amazonaws.servicequotas#TemplatesNotAvailableInRegionException":
182
- throw await de_TemplatesNotAvailableInRegionExceptionRes(parsedOutput, context);
183
- case "TooManyRequestsException":
184
- case "com.amazonaws.servicequotas#TooManyRequestsException":
185
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
186
- default:
187
- const parsedBody = parsedOutput.body;
188
- return throwDefaultError({
189
- output,
190
- parsedBody,
191
- errorCode,
192
- });
193
- }
194
- };
195
- const de_DeleteServiceQuotaIncreaseRequestFromTemplateCommand = async (output, context) => {
196
- if (output.statusCode >= 300) {
197
- return de_DeleteServiceQuotaIncreaseRequestFromTemplateCommandError(output, context);
198
- }
199
- const data = await parseBody(output.body, context);
200
- let contents = {};
201
- contents = (0, smithy_client_1._json)(data);
202
- const response = {
203
- $metadata: deserializeMetadata(output),
204
- ...contents,
205
- };
206
- return response;
207
- };
208
- exports.de_DeleteServiceQuotaIncreaseRequestFromTemplateCommand = de_DeleteServiceQuotaIncreaseRequestFromTemplateCommand;
209
- const de_DeleteServiceQuotaIncreaseRequestFromTemplateCommandError = async (output, context) => {
210
- const parsedOutput = {
211
- ...output,
212
- body: await parseErrorBody(output.body, context),
213
- };
214
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
215
- switch (errorCode) {
216
- case "AWSServiceAccessNotEnabledException":
217
- case "com.amazonaws.servicequotas#AWSServiceAccessNotEnabledException":
218
- throw await de_AWSServiceAccessNotEnabledExceptionRes(parsedOutput, context);
219
- case "AccessDeniedException":
220
- case "com.amazonaws.servicequotas#AccessDeniedException":
221
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
222
- case "DependencyAccessDeniedException":
223
- case "com.amazonaws.servicequotas#DependencyAccessDeniedException":
224
- throw await de_DependencyAccessDeniedExceptionRes(parsedOutput, context);
225
- case "IllegalArgumentException":
226
- case "com.amazonaws.servicequotas#IllegalArgumentException":
227
- throw await de_IllegalArgumentExceptionRes(parsedOutput, context);
228
- case "NoAvailableOrganizationException":
229
- case "com.amazonaws.servicequotas#NoAvailableOrganizationException":
230
- throw await de_NoAvailableOrganizationExceptionRes(parsedOutput, context);
231
- case "NoSuchResourceException":
232
- case "com.amazonaws.servicequotas#NoSuchResourceException":
233
- throw await de_NoSuchResourceExceptionRes(parsedOutput, context);
234
- case "ServiceException":
235
- case "com.amazonaws.servicequotas#ServiceException":
236
- throw await de_ServiceExceptionRes(parsedOutput, context);
237
- case "TemplatesNotAvailableInRegionException":
238
- case "com.amazonaws.servicequotas#TemplatesNotAvailableInRegionException":
239
- throw await de_TemplatesNotAvailableInRegionExceptionRes(parsedOutput, context);
240
- case "TooManyRequestsException":
241
- case "com.amazonaws.servicequotas#TooManyRequestsException":
242
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
243
- default:
244
- const parsedBody = parsedOutput.body;
245
- return throwDefaultError({
246
- output,
247
- parsedBody,
248
- errorCode,
249
- });
250
- }
251
- };
252
- const de_DisassociateServiceQuotaTemplateCommand = async (output, context) => {
253
- if (output.statusCode >= 300) {
254
- return de_DisassociateServiceQuotaTemplateCommandError(output, context);
255
- }
256
- const data = await parseBody(output.body, context);
257
- let contents = {};
258
- contents = (0, smithy_client_1._json)(data);
259
- const response = {
260
- $metadata: deserializeMetadata(output),
261
- ...contents,
262
- };
263
- return response;
264
- };
265
- exports.de_DisassociateServiceQuotaTemplateCommand = de_DisassociateServiceQuotaTemplateCommand;
266
- const de_DisassociateServiceQuotaTemplateCommandError = async (output, context) => {
267
- const parsedOutput = {
268
- ...output,
269
- body: await parseErrorBody(output.body, context),
270
- };
271
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
272
- switch (errorCode) {
273
- case "AWSServiceAccessNotEnabledException":
274
- case "com.amazonaws.servicequotas#AWSServiceAccessNotEnabledException":
275
- throw await de_AWSServiceAccessNotEnabledExceptionRes(parsedOutput, context);
276
- case "AccessDeniedException":
277
- case "com.amazonaws.servicequotas#AccessDeniedException":
278
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
279
- case "DependencyAccessDeniedException":
280
- case "com.amazonaws.servicequotas#DependencyAccessDeniedException":
281
- throw await de_DependencyAccessDeniedExceptionRes(parsedOutput, context);
282
- case "NoAvailableOrganizationException":
283
- case "com.amazonaws.servicequotas#NoAvailableOrganizationException":
284
- throw await de_NoAvailableOrganizationExceptionRes(parsedOutput, context);
285
- case "ServiceException":
286
- case "com.amazonaws.servicequotas#ServiceException":
287
- throw await de_ServiceExceptionRes(parsedOutput, context);
288
- case "ServiceQuotaTemplateNotInUseException":
289
- case "com.amazonaws.servicequotas#ServiceQuotaTemplateNotInUseException":
290
- throw await de_ServiceQuotaTemplateNotInUseExceptionRes(parsedOutput, context);
291
- case "TemplatesNotAvailableInRegionException":
292
- case "com.amazonaws.servicequotas#TemplatesNotAvailableInRegionException":
293
- throw await de_TemplatesNotAvailableInRegionExceptionRes(parsedOutput, context);
294
- case "TooManyRequestsException":
295
- case "com.amazonaws.servicequotas#TooManyRequestsException":
296
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
297
- default:
298
- const parsedBody = parsedOutput.body;
299
- return throwDefaultError({
300
- output,
301
- parsedBody,
302
- errorCode,
303
- });
304
- }
305
- };
306
- const de_GetAssociationForServiceQuotaTemplateCommand = async (output, context) => {
307
- if (output.statusCode >= 300) {
308
- return de_GetAssociationForServiceQuotaTemplateCommandError(output, context);
309
- }
310
- const data = await parseBody(output.body, context);
311
- let contents = {};
312
- contents = (0, smithy_client_1._json)(data);
313
- const response = {
314
- $metadata: deserializeMetadata(output),
315
- ...contents,
316
- };
317
- return response;
318
- };
319
- exports.de_GetAssociationForServiceQuotaTemplateCommand = de_GetAssociationForServiceQuotaTemplateCommand;
320
- const de_GetAssociationForServiceQuotaTemplateCommandError = async (output, context) => {
321
- const parsedOutput = {
322
- ...output,
323
- body: await parseErrorBody(output.body, context),
324
- };
325
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
326
- switch (errorCode) {
327
- case "AWSServiceAccessNotEnabledException":
328
- case "com.amazonaws.servicequotas#AWSServiceAccessNotEnabledException":
329
- throw await de_AWSServiceAccessNotEnabledExceptionRes(parsedOutput, context);
330
- case "AccessDeniedException":
331
- case "com.amazonaws.servicequotas#AccessDeniedException":
332
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
333
- case "DependencyAccessDeniedException":
334
- case "com.amazonaws.servicequotas#DependencyAccessDeniedException":
335
- throw await de_DependencyAccessDeniedExceptionRes(parsedOutput, context);
336
- case "NoAvailableOrganizationException":
337
- case "com.amazonaws.servicequotas#NoAvailableOrganizationException":
338
- throw await de_NoAvailableOrganizationExceptionRes(parsedOutput, context);
339
- case "ServiceException":
340
- case "com.amazonaws.servicequotas#ServiceException":
341
- throw await de_ServiceExceptionRes(parsedOutput, context);
342
- case "ServiceQuotaTemplateNotInUseException":
343
- case "com.amazonaws.servicequotas#ServiceQuotaTemplateNotInUseException":
344
- throw await de_ServiceQuotaTemplateNotInUseExceptionRes(parsedOutput, context);
345
- case "TemplatesNotAvailableInRegionException":
346
- case "com.amazonaws.servicequotas#TemplatesNotAvailableInRegionException":
347
- throw await de_TemplatesNotAvailableInRegionExceptionRes(parsedOutput, context);
348
- case "TooManyRequestsException":
349
- case "com.amazonaws.servicequotas#TooManyRequestsException":
350
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
351
- default:
352
- const parsedBody = parsedOutput.body;
353
- return throwDefaultError({
354
- output,
355
- parsedBody,
356
- errorCode,
357
- });
358
- }
359
- };
360
- const de_GetAWSDefaultServiceQuotaCommand = async (output, context) => {
361
- if (output.statusCode >= 300) {
362
- return de_GetAWSDefaultServiceQuotaCommandError(output, context);
363
- }
364
- const data = await parseBody(output.body, context);
365
- let contents = {};
366
- contents = de_GetAWSDefaultServiceQuotaResponse(data, context);
367
- const response = {
368
- $metadata: deserializeMetadata(output),
369
- ...contents,
370
- };
371
- return response;
372
- };
373
- exports.de_GetAWSDefaultServiceQuotaCommand = de_GetAWSDefaultServiceQuotaCommand;
374
- const de_GetAWSDefaultServiceQuotaCommandError = async (output, context) => {
375
- const parsedOutput = {
376
- ...output,
377
- body: await parseErrorBody(output.body, context),
378
- };
379
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
380
- switch (errorCode) {
381
- case "AccessDeniedException":
382
- case "com.amazonaws.servicequotas#AccessDeniedException":
383
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
384
- case "IllegalArgumentException":
385
- case "com.amazonaws.servicequotas#IllegalArgumentException":
386
- throw await de_IllegalArgumentExceptionRes(parsedOutput, context);
387
- case "NoSuchResourceException":
388
- case "com.amazonaws.servicequotas#NoSuchResourceException":
389
- throw await de_NoSuchResourceExceptionRes(parsedOutput, context);
390
- case "ServiceException":
391
- case "com.amazonaws.servicequotas#ServiceException":
392
- throw await de_ServiceExceptionRes(parsedOutput, context);
393
- case "TooManyRequestsException":
394
- case "com.amazonaws.servicequotas#TooManyRequestsException":
395
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
396
- default:
397
- const parsedBody = parsedOutput.body;
398
- return throwDefaultError({
399
- output,
400
- parsedBody,
401
- errorCode,
402
- });
403
- }
404
- };
405
- const de_GetRequestedServiceQuotaChangeCommand = async (output, context) => {
406
- if (output.statusCode >= 300) {
407
- return de_GetRequestedServiceQuotaChangeCommandError(output, context);
408
- }
409
- const data = await parseBody(output.body, context);
410
- let contents = {};
411
- contents = de_GetRequestedServiceQuotaChangeResponse(data, context);
412
- const response = {
413
- $metadata: deserializeMetadata(output),
414
- ...contents,
415
- };
416
- return response;
417
- };
418
- exports.de_GetRequestedServiceQuotaChangeCommand = de_GetRequestedServiceQuotaChangeCommand;
419
- const de_GetRequestedServiceQuotaChangeCommandError = async (output, context) => {
420
- const parsedOutput = {
421
- ...output,
422
- body: await parseErrorBody(output.body, context),
423
- };
424
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
425
- switch (errorCode) {
426
- case "AccessDeniedException":
427
- case "com.amazonaws.servicequotas#AccessDeniedException":
428
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
429
- case "IllegalArgumentException":
430
- case "com.amazonaws.servicequotas#IllegalArgumentException":
431
- throw await de_IllegalArgumentExceptionRes(parsedOutput, context);
432
- case "NoSuchResourceException":
433
- case "com.amazonaws.servicequotas#NoSuchResourceException":
434
- throw await de_NoSuchResourceExceptionRes(parsedOutput, context);
435
- case "ServiceException":
436
- case "com.amazonaws.servicequotas#ServiceException":
437
- throw await de_ServiceExceptionRes(parsedOutput, context);
438
- case "TooManyRequestsException":
439
- case "com.amazonaws.servicequotas#TooManyRequestsException":
440
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
441
- default:
442
- const parsedBody = parsedOutput.body;
443
- return throwDefaultError({
444
- output,
445
- parsedBody,
446
- errorCode,
447
- });
448
- }
449
- };
450
- const de_GetServiceQuotaCommand = async (output, context) => {
451
- if (output.statusCode >= 300) {
452
- return de_GetServiceQuotaCommandError(output, context);
453
- }
454
- const data = await parseBody(output.body, context);
455
- let contents = {};
456
- contents = de_GetServiceQuotaResponse(data, context);
457
- const response = {
458
- $metadata: deserializeMetadata(output),
459
- ...contents,
460
- };
461
- return response;
462
- };
463
- exports.de_GetServiceQuotaCommand = de_GetServiceQuotaCommand;
464
- const de_GetServiceQuotaCommandError = async (output, context) => {
465
- const parsedOutput = {
466
- ...output,
467
- body: await parseErrorBody(output.body, context),
468
- };
469
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
470
- switch (errorCode) {
471
- case "AccessDeniedException":
472
- case "com.amazonaws.servicequotas#AccessDeniedException":
473
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
474
- case "IllegalArgumentException":
475
- case "com.amazonaws.servicequotas#IllegalArgumentException":
476
- throw await de_IllegalArgumentExceptionRes(parsedOutput, context);
477
- case "NoSuchResourceException":
478
- case "com.amazonaws.servicequotas#NoSuchResourceException":
479
- throw await de_NoSuchResourceExceptionRes(parsedOutput, context);
480
- case "ServiceException":
481
- case "com.amazonaws.servicequotas#ServiceException":
482
- throw await de_ServiceExceptionRes(parsedOutput, context);
483
- case "TooManyRequestsException":
484
- case "com.amazonaws.servicequotas#TooManyRequestsException":
485
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
486
- default:
487
- const parsedBody = parsedOutput.body;
488
- return throwDefaultError({
489
- output,
490
- parsedBody,
491
- errorCode,
492
- });
493
- }
494
- };
495
- const de_GetServiceQuotaIncreaseRequestFromTemplateCommand = async (output, context) => {
496
- if (output.statusCode >= 300) {
497
- return de_GetServiceQuotaIncreaseRequestFromTemplateCommandError(output, context);
498
- }
499
- const data = await parseBody(output.body, context);
500
- let contents = {};
501
- contents = de_GetServiceQuotaIncreaseRequestFromTemplateResponse(data, context);
502
- const response = {
503
- $metadata: deserializeMetadata(output),
504
- ...contents,
505
- };
506
- return response;
507
- };
508
- exports.de_GetServiceQuotaIncreaseRequestFromTemplateCommand = de_GetServiceQuotaIncreaseRequestFromTemplateCommand;
509
- const de_GetServiceQuotaIncreaseRequestFromTemplateCommandError = async (output, context) => {
510
- const parsedOutput = {
511
- ...output,
512
- body: await parseErrorBody(output.body, context),
513
- };
514
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
515
- switch (errorCode) {
516
- case "AWSServiceAccessNotEnabledException":
517
- case "com.amazonaws.servicequotas#AWSServiceAccessNotEnabledException":
518
- throw await de_AWSServiceAccessNotEnabledExceptionRes(parsedOutput, context);
519
- case "AccessDeniedException":
520
- case "com.amazonaws.servicequotas#AccessDeniedException":
521
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
522
- case "DependencyAccessDeniedException":
523
- case "com.amazonaws.servicequotas#DependencyAccessDeniedException":
524
- throw await de_DependencyAccessDeniedExceptionRes(parsedOutput, context);
525
- case "IllegalArgumentException":
526
- case "com.amazonaws.servicequotas#IllegalArgumentException":
527
- throw await de_IllegalArgumentExceptionRes(parsedOutput, context);
528
- case "NoAvailableOrganizationException":
529
- case "com.amazonaws.servicequotas#NoAvailableOrganizationException":
530
- throw await de_NoAvailableOrganizationExceptionRes(parsedOutput, context);
531
- case "NoSuchResourceException":
532
- case "com.amazonaws.servicequotas#NoSuchResourceException":
533
- throw await de_NoSuchResourceExceptionRes(parsedOutput, context);
534
- case "ServiceException":
535
- case "com.amazonaws.servicequotas#ServiceException":
536
- throw await de_ServiceExceptionRes(parsedOutput, context);
537
- case "TemplatesNotAvailableInRegionException":
538
- case "com.amazonaws.servicequotas#TemplatesNotAvailableInRegionException":
539
- throw await de_TemplatesNotAvailableInRegionExceptionRes(parsedOutput, context);
540
- case "TooManyRequestsException":
541
- case "com.amazonaws.servicequotas#TooManyRequestsException":
542
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
543
- default:
544
- const parsedBody = parsedOutput.body;
545
- return throwDefaultError({
546
- output,
547
- parsedBody,
548
- errorCode,
549
- });
550
- }
551
- };
552
- const de_ListAWSDefaultServiceQuotasCommand = async (output, context) => {
553
- if (output.statusCode >= 300) {
554
- return de_ListAWSDefaultServiceQuotasCommandError(output, context);
555
- }
556
- const data = await parseBody(output.body, context);
557
- let contents = {};
558
- contents = de_ListAWSDefaultServiceQuotasResponse(data, context);
559
- const response = {
560
- $metadata: deserializeMetadata(output),
561
- ...contents,
562
- };
563
- return response;
564
- };
565
- exports.de_ListAWSDefaultServiceQuotasCommand = de_ListAWSDefaultServiceQuotasCommand;
566
- const de_ListAWSDefaultServiceQuotasCommandError = async (output, context) => {
567
- const parsedOutput = {
568
- ...output,
569
- body: await parseErrorBody(output.body, context),
570
- };
571
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
572
- switch (errorCode) {
573
- case "AccessDeniedException":
574
- case "com.amazonaws.servicequotas#AccessDeniedException":
575
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
576
- case "IllegalArgumentException":
577
- case "com.amazonaws.servicequotas#IllegalArgumentException":
578
- throw await de_IllegalArgumentExceptionRes(parsedOutput, context);
579
- case "InvalidPaginationTokenException":
580
- case "com.amazonaws.servicequotas#InvalidPaginationTokenException":
581
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
582
- case "NoSuchResourceException":
583
- case "com.amazonaws.servicequotas#NoSuchResourceException":
584
- throw await de_NoSuchResourceExceptionRes(parsedOutput, context);
585
- case "ServiceException":
586
- case "com.amazonaws.servicequotas#ServiceException":
587
- throw await de_ServiceExceptionRes(parsedOutput, context);
588
- case "TooManyRequestsException":
589
- case "com.amazonaws.servicequotas#TooManyRequestsException":
590
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
591
- default:
592
- const parsedBody = parsedOutput.body;
593
- return throwDefaultError({
594
- output,
595
- parsedBody,
596
- errorCode,
597
- });
598
- }
599
- };
600
- const de_ListRequestedServiceQuotaChangeHistoryCommand = async (output, context) => {
601
- if (output.statusCode >= 300) {
602
- return de_ListRequestedServiceQuotaChangeHistoryCommandError(output, context);
603
- }
604
- const data = await parseBody(output.body, context);
605
- let contents = {};
606
- contents = de_ListRequestedServiceQuotaChangeHistoryResponse(data, context);
607
- const response = {
608
- $metadata: deserializeMetadata(output),
609
- ...contents,
610
- };
611
- return response;
612
- };
613
- exports.de_ListRequestedServiceQuotaChangeHistoryCommand = de_ListRequestedServiceQuotaChangeHistoryCommand;
614
- const de_ListRequestedServiceQuotaChangeHistoryCommandError = async (output, context) => {
615
- const parsedOutput = {
616
- ...output,
617
- body: await parseErrorBody(output.body, context),
618
- };
619
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
620
- switch (errorCode) {
621
- case "AccessDeniedException":
622
- case "com.amazonaws.servicequotas#AccessDeniedException":
623
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
624
- case "IllegalArgumentException":
625
- case "com.amazonaws.servicequotas#IllegalArgumentException":
626
- throw await de_IllegalArgumentExceptionRes(parsedOutput, context);
627
- case "InvalidPaginationTokenException":
628
- case "com.amazonaws.servicequotas#InvalidPaginationTokenException":
629
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
630
- case "NoSuchResourceException":
631
- case "com.amazonaws.servicequotas#NoSuchResourceException":
632
- throw await de_NoSuchResourceExceptionRes(parsedOutput, context);
633
- case "ServiceException":
634
- case "com.amazonaws.servicequotas#ServiceException":
635
- throw await de_ServiceExceptionRes(parsedOutput, context);
636
- case "TooManyRequestsException":
637
- case "com.amazonaws.servicequotas#TooManyRequestsException":
638
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
639
- default:
640
- const parsedBody = parsedOutput.body;
641
- return throwDefaultError({
642
- output,
643
- parsedBody,
644
- errorCode,
645
- });
646
- }
647
- };
648
- const de_ListRequestedServiceQuotaChangeHistoryByQuotaCommand = async (output, context) => {
649
- if (output.statusCode >= 300) {
650
- return de_ListRequestedServiceQuotaChangeHistoryByQuotaCommandError(output, context);
651
- }
652
- const data = await parseBody(output.body, context);
653
- let contents = {};
654
- contents = de_ListRequestedServiceQuotaChangeHistoryByQuotaResponse(data, context);
655
- const response = {
656
- $metadata: deserializeMetadata(output),
657
- ...contents,
658
- };
659
- return response;
660
- };
661
- exports.de_ListRequestedServiceQuotaChangeHistoryByQuotaCommand = de_ListRequestedServiceQuotaChangeHistoryByQuotaCommand;
662
- const de_ListRequestedServiceQuotaChangeHistoryByQuotaCommandError = async (output, context) => {
663
- const parsedOutput = {
664
- ...output,
665
- body: await parseErrorBody(output.body, context),
666
- };
667
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
668
- switch (errorCode) {
669
- case "AccessDeniedException":
670
- case "com.amazonaws.servicequotas#AccessDeniedException":
671
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
672
- case "IllegalArgumentException":
673
- case "com.amazonaws.servicequotas#IllegalArgumentException":
674
- throw await de_IllegalArgumentExceptionRes(parsedOutput, context);
675
- case "InvalidPaginationTokenException":
676
- case "com.amazonaws.servicequotas#InvalidPaginationTokenException":
677
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
678
- case "NoSuchResourceException":
679
- case "com.amazonaws.servicequotas#NoSuchResourceException":
680
- throw await de_NoSuchResourceExceptionRes(parsedOutput, context);
681
- case "ServiceException":
682
- case "com.amazonaws.servicequotas#ServiceException":
683
- throw await de_ServiceExceptionRes(parsedOutput, context);
684
- case "TooManyRequestsException":
685
- case "com.amazonaws.servicequotas#TooManyRequestsException":
686
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
687
- default:
688
- const parsedBody = parsedOutput.body;
689
- return throwDefaultError({
690
- output,
691
- parsedBody,
692
- errorCode,
693
- });
694
- }
695
- };
696
- const de_ListServiceQuotaIncreaseRequestsInTemplateCommand = async (output, context) => {
697
- if (output.statusCode >= 300) {
698
- return de_ListServiceQuotaIncreaseRequestsInTemplateCommandError(output, context);
699
- }
700
- const data = await parseBody(output.body, context);
701
- let contents = {};
702
- contents = de_ListServiceQuotaIncreaseRequestsInTemplateResponse(data, context);
703
- const response = {
704
- $metadata: deserializeMetadata(output),
705
- ...contents,
706
- };
707
- return response;
708
- };
709
- exports.de_ListServiceQuotaIncreaseRequestsInTemplateCommand = de_ListServiceQuotaIncreaseRequestsInTemplateCommand;
710
- const de_ListServiceQuotaIncreaseRequestsInTemplateCommandError = async (output, context) => {
711
- const parsedOutput = {
712
- ...output,
713
- body: await parseErrorBody(output.body, context),
714
- };
715
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
716
- switch (errorCode) {
717
- case "AWSServiceAccessNotEnabledException":
718
- case "com.amazonaws.servicequotas#AWSServiceAccessNotEnabledException":
719
- throw await de_AWSServiceAccessNotEnabledExceptionRes(parsedOutput, context);
720
- case "AccessDeniedException":
721
- case "com.amazonaws.servicequotas#AccessDeniedException":
722
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
723
- case "DependencyAccessDeniedException":
724
- case "com.amazonaws.servicequotas#DependencyAccessDeniedException":
725
- throw await de_DependencyAccessDeniedExceptionRes(parsedOutput, context);
726
- case "IllegalArgumentException":
727
- case "com.amazonaws.servicequotas#IllegalArgumentException":
728
- throw await de_IllegalArgumentExceptionRes(parsedOutput, context);
729
- case "NoAvailableOrganizationException":
730
- case "com.amazonaws.servicequotas#NoAvailableOrganizationException":
731
- throw await de_NoAvailableOrganizationExceptionRes(parsedOutput, context);
732
- case "ServiceException":
733
- case "com.amazonaws.servicequotas#ServiceException":
734
- throw await de_ServiceExceptionRes(parsedOutput, context);
735
- case "TemplatesNotAvailableInRegionException":
736
- case "com.amazonaws.servicequotas#TemplatesNotAvailableInRegionException":
737
- throw await de_TemplatesNotAvailableInRegionExceptionRes(parsedOutput, context);
738
- case "TooManyRequestsException":
739
- case "com.amazonaws.servicequotas#TooManyRequestsException":
740
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
741
- default:
742
- const parsedBody = parsedOutput.body;
743
- return throwDefaultError({
744
- output,
745
- parsedBody,
746
- errorCode,
747
- });
748
- }
749
- };
750
- const de_ListServiceQuotasCommand = async (output, context) => {
751
- if (output.statusCode >= 300) {
752
- return de_ListServiceQuotasCommandError(output, context);
753
- }
754
- const data = await parseBody(output.body, context);
755
- let contents = {};
756
- contents = de_ListServiceQuotasResponse(data, context);
757
- const response = {
758
- $metadata: deserializeMetadata(output),
759
- ...contents,
760
- };
761
- return response;
762
- };
763
- exports.de_ListServiceQuotasCommand = de_ListServiceQuotasCommand;
764
- const de_ListServiceQuotasCommandError = async (output, context) => {
765
- const parsedOutput = {
766
- ...output,
767
- body: await parseErrorBody(output.body, context),
768
- };
769
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
770
- switch (errorCode) {
771
- case "AccessDeniedException":
772
- case "com.amazonaws.servicequotas#AccessDeniedException":
773
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
774
- case "IllegalArgumentException":
775
- case "com.amazonaws.servicequotas#IllegalArgumentException":
776
- throw await de_IllegalArgumentExceptionRes(parsedOutput, context);
777
- case "InvalidPaginationTokenException":
778
- case "com.amazonaws.servicequotas#InvalidPaginationTokenException":
779
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
780
- case "NoSuchResourceException":
781
- case "com.amazonaws.servicequotas#NoSuchResourceException":
782
- throw await de_NoSuchResourceExceptionRes(parsedOutput, context);
783
- case "ServiceException":
784
- case "com.amazonaws.servicequotas#ServiceException":
785
- throw await de_ServiceExceptionRes(parsedOutput, context);
786
- case "TooManyRequestsException":
787
- case "com.amazonaws.servicequotas#TooManyRequestsException":
788
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
789
- default:
790
- const parsedBody = parsedOutput.body;
791
- return throwDefaultError({
792
- output,
793
- parsedBody,
794
- errorCode,
795
- });
796
- }
797
- };
798
- const de_ListServicesCommand = async (output, context) => {
799
- if (output.statusCode >= 300) {
800
- return de_ListServicesCommandError(output, context);
801
- }
802
- const data = await parseBody(output.body, context);
803
- let contents = {};
804
- contents = (0, smithy_client_1._json)(data);
805
- const response = {
806
- $metadata: deserializeMetadata(output),
807
- ...contents,
808
- };
809
- return response;
810
- };
811
- exports.de_ListServicesCommand = de_ListServicesCommand;
812
- const de_ListServicesCommandError = async (output, context) => {
813
- const parsedOutput = {
814
- ...output,
815
- body: await parseErrorBody(output.body, context),
816
- };
817
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
818
- switch (errorCode) {
819
- case "AccessDeniedException":
820
- case "com.amazonaws.servicequotas#AccessDeniedException":
821
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
822
- case "IllegalArgumentException":
823
- case "com.amazonaws.servicequotas#IllegalArgumentException":
824
- throw await de_IllegalArgumentExceptionRes(parsedOutput, context);
825
- case "InvalidPaginationTokenException":
826
- case "com.amazonaws.servicequotas#InvalidPaginationTokenException":
827
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
828
- case "ServiceException":
829
- case "com.amazonaws.servicequotas#ServiceException":
830
- throw await de_ServiceExceptionRes(parsedOutput, context);
831
- case "TooManyRequestsException":
832
- case "com.amazonaws.servicequotas#TooManyRequestsException":
833
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
834
- default:
835
- const parsedBody = parsedOutput.body;
836
- return throwDefaultError({
837
- output,
838
- parsedBody,
839
- errorCode,
840
- });
841
- }
842
- };
843
- const de_ListTagsForResourceCommand = async (output, context) => {
844
- if (output.statusCode >= 300) {
845
- return de_ListTagsForResourceCommandError(output, context);
846
- }
847
- const data = await parseBody(output.body, context);
848
- let contents = {};
849
- contents = (0, smithy_client_1._json)(data);
850
- const response = {
851
- $metadata: deserializeMetadata(output),
852
- ...contents,
853
- };
854
- return response;
855
- };
856
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
857
- const de_ListTagsForResourceCommandError = async (output, context) => {
858
- const parsedOutput = {
859
- ...output,
860
- body: await parseErrorBody(output.body, context),
861
- };
862
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
863
- switch (errorCode) {
864
- case "AccessDeniedException":
865
- case "com.amazonaws.servicequotas#AccessDeniedException":
866
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
867
- case "IllegalArgumentException":
868
- case "com.amazonaws.servicequotas#IllegalArgumentException":
869
- throw await de_IllegalArgumentExceptionRes(parsedOutput, context);
870
- case "NoSuchResourceException":
871
- case "com.amazonaws.servicequotas#NoSuchResourceException":
872
- throw await de_NoSuchResourceExceptionRes(parsedOutput, context);
873
- case "ServiceException":
874
- case "com.amazonaws.servicequotas#ServiceException":
875
- throw await de_ServiceExceptionRes(parsedOutput, context);
876
- case "TooManyRequestsException":
877
- case "com.amazonaws.servicequotas#TooManyRequestsException":
878
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
879
- default:
880
- const parsedBody = parsedOutput.body;
881
- return throwDefaultError({
882
- output,
883
- parsedBody,
884
- errorCode,
885
- });
886
- }
887
- };
888
- const de_PutServiceQuotaIncreaseRequestIntoTemplateCommand = async (output, context) => {
889
- if (output.statusCode >= 300) {
890
- return de_PutServiceQuotaIncreaseRequestIntoTemplateCommandError(output, context);
891
- }
892
- const data = await parseBody(output.body, context);
893
- let contents = {};
894
- contents = de_PutServiceQuotaIncreaseRequestIntoTemplateResponse(data, context);
895
- const response = {
896
- $metadata: deserializeMetadata(output),
897
- ...contents,
898
- };
899
- return response;
900
- };
901
- exports.de_PutServiceQuotaIncreaseRequestIntoTemplateCommand = de_PutServiceQuotaIncreaseRequestIntoTemplateCommand;
902
- const de_PutServiceQuotaIncreaseRequestIntoTemplateCommandError = async (output, context) => {
903
- const parsedOutput = {
904
- ...output,
905
- body: await parseErrorBody(output.body, context),
906
- };
907
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
908
- switch (errorCode) {
909
- case "AWSServiceAccessNotEnabledException":
910
- case "com.amazonaws.servicequotas#AWSServiceAccessNotEnabledException":
911
- throw await de_AWSServiceAccessNotEnabledExceptionRes(parsedOutput, context);
912
- case "AccessDeniedException":
913
- case "com.amazonaws.servicequotas#AccessDeniedException":
914
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
915
- case "DependencyAccessDeniedException":
916
- case "com.amazonaws.servicequotas#DependencyAccessDeniedException":
917
- throw await de_DependencyAccessDeniedExceptionRes(parsedOutput, context);
918
- case "IllegalArgumentException":
919
- case "com.amazonaws.servicequotas#IllegalArgumentException":
920
- throw await de_IllegalArgumentExceptionRes(parsedOutput, context);
921
- case "NoAvailableOrganizationException":
922
- case "com.amazonaws.servicequotas#NoAvailableOrganizationException":
923
- throw await de_NoAvailableOrganizationExceptionRes(parsedOutput, context);
924
- case "NoSuchResourceException":
925
- case "com.amazonaws.servicequotas#NoSuchResourceException":
926
- throw await de_NoSuchResourceExceptionRes(parsedOutput, context);
927
- case "QuotaExceededException":
928
- case "com.amazonaws.servicequotas#QuotaExceededException":
929
- throw await de_QuotaExceededExceptionRes(parsedOutput, context);
930
- case "ServiceException":
931
- case "com.amazonaws.servicequotas#ServiceException":
932
- throw await de_ServiceExceptionRes(parsedOutput, context);
933
- case "TemplatesNotAvailableInRegionException":
934
- case "com.amazonaws.servicequotas#TemplatesNotAvailableInRegionException":
935
- throw await de_TemplatesNotAvailableInRegionExceptionRes(parsedOutput, context);
936
- case "TooManyRequestsException":
937
- case "com.amazonaws.servicequotas#TooManyRequestsException":
938
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
939
- default:
940
- const parsedBody = parsedOutput.body;
941
- return throwDefaultError({
942
- output,
943
- parsedBody,
944
- errorCode,
945
- });
946
- }
947
- };
948
- const de_RequestServiceQuotaIncreaseCommand = async (output, context) => {
949
- if (output.statusCode >= 300) {
950
- return de_RequestServiceQuotaIncreaseCommandError(output, context);
951
- }
952
- const data = await parseBody(output.body, context);
953
- let contents = {};
954
- contents = de_RequestServiceQuotaIncreaseResponse(data, context);
955
- const response = {
956
- $metadata: deserializeMetadata(output),
957
- ...contents,
958
- };
959
- return response;
960
- };
961
- exports.de_RequestServiceQuotaIncreaseCommand = de_RequestServiceQuotaIncreaseCommand;
962
- const de_RequestServiceQuotaIncreaseCommandError = async (output, context) => {
963
- const parsedOutput = {
964
- ...output,
965
- body: await parseErrorBody(output.body, context),
966
- };
967
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
968
- switch (errorCode) {
969
- case "AccessDeniedException":
970
- case "com.amazonaws.servicequotas#AccessDeniedException":
971
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
972
- case "DependencyAccessDeniedException":
973
- case "com.amazonaws.servicequotas#DependencyAccessDeniedException":
974
- throw await de_DependencyAccessDeniedExceptionRes(parsedOutput, context);
975
- case "IllegalArgumentException":
976
- case "com.amazonaws.servicequotas#IllegalArgumentException":
977
- throw await de_IllegalArgumentExceptionRes(parsedOutput, context);
978
- case "InvalidResourceStateException":
979
- case "com.amazonaws.servicequotas#InvalidResourceStateException":
980
- throw await de_InvalidResourceStateExceptionRes(parsedOutput, context);
981
- case "NoSuchResourceException":
982
- case "com.amazonaws.servicequotas#NoSuchResourceException":
983
- throw await de_NoSuchResourceExceptionRes(parsedOutput, context);
984
- case "QuotaExceededException":
985
- case "com.amazonaws.servicequotas#QuotaExceededException":
986
- throw await de_QuotaExceededExceptionRes(parsedOutput, context);
987
- case "ResourceAlreadyExistsException":
988
- case "com.amazonaws.servicequotas#ResourceAlreadyExistsException":
989
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
990
- case "ServiceException":
991
- case "com.amazonaws.servicequotas#ServiceException":
992
- throw await de_ServiceExceptionRes(parsedOutput, context);
993
- case "TooManyRequestsException":
994
- case "com.amazonaws.servicequotas#TooManyRequestsException":
995
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
996
- default:
997
- const parsedBody = parsedOutput.body;
998
- return throwDefaultError({
999
- output,
1000
- parsedBody,
1001
- errorCode,
1002
- });
1003
- }
1004
- };
1005
- const de_TagResourceCommand = async (output, context) => {
1006
- if (output.statusCode >= 300) {
1007
- return de_TagResourceCommandError(output, context);
1008
- }
1009
- const data = await parseBody(output.body, context);
1010
- let contents = {};
1011
- contents = (0, smithy_client_1._json)(data);
1012
- const response = {
1013
- $metadata: deserializeMetadata(output),
1014
- ...contents,
1015
- };
1016
- return response;
1017
- };
1018
- exports.de_TagResourceCommand = de_TagResourceCommand;
1019
- const de_TagResourceCommandError = async (output, context) => {
1020
- const parsedOutput = {
1021
- ...output,
1022
- body: await parseErrorBody(output.body, context),
1023
- };
1024
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1025
- switch (errorCode) {
1026
- case "AccessDeniedException":
1027
- case "com.amazonaws.servicequotas#AccessDeniedException":
1028
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1029
- case "IllegalArgumentException":
1030
- case "com.amazonaws.servicequotas#IllegalArgumentException":
1031
- throw await de_IllegalArgumentExceptionRes(parsedOutput, context);
1032
- case "NoSuchResourceException":
1033
- case "com.amazonaws.servicequotas#NoSuchResourceException":
1034
- throw await de_NoSuchResourceExceptionRes(parsedOutput, context);
1035
- case "ServiceException":
1036
- case "com.amazonaws.servicequotas#ServiceException":
1037
- throw await de_ServiceExceptionRes(parsedOutput, context);
1038
- case "TagPolicyViolationException":
1039
- case "com.amazonaws.servicequotas#TagPolicyViolationException":
1040
- throw await de_TagPolicyViolationExceptionRes(parsedOutput, context);
1041
- case "TooManyRequestsException":
1042
- case "com.amazonaws.servicequotas#TooManyRequestsException":
1043
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1044
- case "TooManyTagsException":
1045
- case "com.amazonaws.servicequotas#TooManyTagsException":
1046
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1047
- default:
1048
- const parsedBody = parsedOutput.body;
1049
- return throwDefaultError({
1050
- output,
1051
- parsedBody,
1052
- errorCode,
1053
- });
1054
- }
1055
- };
1056
- const de_UntagResourceCommand = async (output, context) => {
1057
- if (output.statusCode >= 300) {
1058
- return de_UntagResourceCommandError(output, context);
1059
- }
1060
- const data = await parseBody(output.body, context);
1061
- let contents = {};
1062
- contents = (0, smithy_client_1._json)(data);
1063
- const response = {
1064
- $metadata: deserializeMetadata(output),
1065
- ...contents,
1066
- };
1067
- return response;
1068
- };
1069
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
1070
- const de_UntagResourceCommandError = async (output, context) => {
1071
- const parsedOutput = {
1072
- ...output,
1073
- body: await parseErrorBody(output.body, context),
1074
- };
1075
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1076
- switch (errorCode) {
1077
- case "AccessDeniedException":
1078
- case "com.amazonaws.servicequotas#AccessDeniedException":
1079
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1080
- case "IllegalArgumentException":
1081
- case "com.amazonaws.servicequotas#IllegalArgumentException":
1082
- throw await de_IllegalArgumentExceptionRes(parsedOutput, context);
1083
- case "NoSuchResourceException":
1084
- case "com.amazonaws.servicequotas#NoSuchResourceException":
1085
- throw await de_NoSuchResourceExceptionRes(parsedOutput, context);
1086
- case "ServiceException":
1087
- case "com.amazonaws.servicequotas#ServiceException":
1088
- throw await de_ServiceExceptionRes(parsedOutput, context);
1089
- case "TooManyRequestsException":
1090
- case "com.amazonaws.servicequotas#TooManyRequestsException":
1091
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1092
- default:
1093
- const parsedBody = parsedOutput.body;
1094
- return throwDefaultError({
1095
- output,
1096
- parsedBody,
1097
- errorCode,
1098
- });
1099
- }
1100
- };
1101
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1102
- const body = parsedOutput.body;
1103
- const deserialized = (0, smithy_client_1._json)(body);
1104
- const exception = new models_0_1.AccessDeniedException({
1105
- $metadata: deserializeMetadata(parsedOutput),
1106
- ...deserialized,
1107
- });
1108
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1109
- };
1110
- const de_AWSServiceAccessNotEnabledExceptionRes = async (parsedOutput, context) => {
1111
- const body = parsedOutput.body;
1112
- const deserialized = (0, smithy_client_1._json)(body);
1113
- const exception = new models_0_1.AWSServiceAccessNotEnabledException({
1114
- $metadata: deserializeMetadata(parsedOutput),
1115
- ...deserialized,
1116
- });
1117
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1118
- };
1119
- const de_DependencyAccessDeniedExceptionRes = async (parsedOutput, context) => {
1120
- const body = parsedOutput.body;
1121
- const deserialized = (0, smithy_client_1._json)(body);
1122
- const exception = new models_0_1.DependencyAccessDeniedException({
1123
- $metadata: deserializeMetadata(parsedOutput),
1124
- ...deserialized,
1125
- });
1126
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1127
- };
1128
- const de_IllegalArgumentExceptionRes = async (parsedOutput, context) => {
1129
- const body = parsedOutput.body;
1130
- const deserialized = (0, smithy_client_1._json)(body);
1131
- const exception = new models_0_1.IllegalArgumentException({
1132
- $metadata: deserializeMetadata(parsedOutput),
1133
- ...deserialized,
1134
- });
1135
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1136
- };
1137
- const de_InvalidPaginationTokenExceptionRes = async (parsedOutput, context) => {
1138
- const body = parsedOutput.body;
1139
- const deserialized = (0, smithy_client_1._json)(body);
1140
- const exception = new models_0_1.InvalidPaginationTokenException({
1141
- $metadata: deserializeMetadata(parsedOutput),
1142
- ...deserialized,
1143
- });
1144
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1145
- };
1146
- const de_InvalidResourceStateExceptionRes = async (parsedOutput, context) => {
1147
- const body = parsedOutput.body;
1148
- const deserialized = (0, smithy_client_1._json)(body);
1149
- const exception = new models_0_1.InvalidResourceStateException({
1150
- $metadata: deserializeMetadata(parsedOutput),
1151
- ...deserialized,
1152
- });
1153
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1154
- };
1155
- const de_NoAvailableOrganizationExceptionRes = async (parsedOutput, context) => {
1156
- const body = parsedOutput.body;
1157
- const deserialized = (0, smithy_client_1._json)(body);
1158
- const exception = new models_0_1.NoAvailableOrganizationException({
1159
- $metadata: deserializeMetadata(parsedOutput),
1160
- ...deserialized,
1161
- });
1162
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1163
- };
1164
- const de_NoSuchResourceExceptionRes = async (parsedOutput, context) => {
1165
- const body = parsedOutput.body;
1166
- const deserialized = (0, smithy_client_1._json)(body);
1167
- const exception = new models_0_1.NoSuchResourceException({
1168
- $metadata: deserializeMetadata(parsedOutput),
1169
- ...deserialized,
1170
- });
1171
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1172
- };
1173
- const de_OrganizationNotInAllFeaturesModeExceptionRes = async (parsedOutput, context) => {
1174
- const body = parsedOutput.body;
1175
- const deserialized = (0, smithy_client_1._json)(body);
1176
- const exception = new models_0_1.OrganizationNotInAllFeaturesModeException({
1177
- $metadata: deserializeMetadata(parsedOutput),
1178
- ...deserialized,
1179
- });
1180
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1181
- };
1182
- const de_QuotaExceededExceptionRes = async (parsedOutput, context) => {
1183
- const body = parsedOutput.body;
1184
- const deserialized = (0, smithy_client_1._json)(body);
1185
- const exception = new models_0_1.QuotaExceededException({
1186
- $metadata: deserializeMetadata(parsedOutput),
1187
- ...deserialized,
1188
- });
1189
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1190
- };
1191
- const de_ResourceAlreadyExistsExceptionRes = async (parsedOutput, context) => {
1192
- const body = parsedOutput.body;
1193
- const deserialized = (0, smithy_client_1._json)(body);
1194
- const exception = new models_0_1.ResourceAlreadyExistsException({
1195
- $metadata: deserializeMetadata(parsedOutput),
1196
- ...deserialized,
1197
- });
1198
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1199
- };
1200
- const de_ServiceExceptionRes = async (parsedOutput, context) => {
1201
- const body = parsedOutput.body;
1202
- const deserialized = (0, smithy_client_1._json)(body);
1203
- const exception = new models_0_1.ServiceException({
1204
- $metadata: deserializeMetadata(parsedOutput),
1205
- ...deserialized,
1206
- });
1207
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1208
- };
1209
- const de_ServiceQuotaTemplateNotInUseExceptionRes = async (parsedOutput, context) => {
1210
- const body = parsedOutput.body;
1211
- const deserialized = (0, smithy_client_1._json)(body);
1212
- const exception = new models_0_1.ServiceQuotaTemplateNotInUseException({
1213
- $metadata: deserializeMetadata(parsedOutput),
1214
- ...deserialized,
1215
- });
1216
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1217
- };
1218
- const de_TagPolicyViolationExceptionRes = async (parsedOutput, context) => {
1219
- const body = parsedOutput.body;
1220
- const deserialized = (0, smithy_client_1._json)(body);
1221
- const exception = new models_0_1.TagPolicyViolationException({
1222
- $metadata: deserializeMetadata(parsedOutput),
1223
- ...deserialized,
1224
- });
1225
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1226
- };
1227
- const de_TemplatesNotAvailableInRegionExceptionRes = async (parsedOutput, context) => {
1228
- const body = parsedOutput.body;
1229
- const deserialized = (0, smithy_client_1._json)(body);
1230
- const exception = new models_0_1.TemplatesNotAvailableInRegionException({
1231
- $metadata: deserializeMetadata(parsedOutput),
1232
- ...deserialized,
1233
- });
1234
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1235
- };
1236
- const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
1237
- const body = parsedOutput.body;
1238
- const deserialized = (0, smithy_client_1._json)(body);
1239
- const exception = new models_0_1.TooManyRequestsException({
1240
- $metadata: deserializeMetadata(parsedOutput),
1241
- ...deserialized,
1242
- });
1243
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1244
- };
1245
- const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
1246
- const body = parsedOutput.body;
1247
- const deserialized = (0, smithy_client_1._json)(body);
1248
- const exception = new models_0_1.TooManyTagsException({
1249
- $metadata: deserializeMetadata(parsedOutput),
1250
- ...deserialized,
1251
- });
1252
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1253
- };
1254
- const se_PutServiceQuotaIncreaseRequestIntoTemplateRequest = (input, context) => {
1255
- return (0, smithy_client_1.take)(input, {
1256
- AwsRegion: [],
1257
- DesiredValue: smithy_client_1.serializeFloat,
1258
- QuotaCode: [],
1259
- ServiceCode: [],
1260
- });
1261
- };
1262
- const se_RequestServiceQuotaIncreaseRequest = (input, context) => {
1263
- return (0, smithy_client_1.take)(input, {
1264
- ContextId: [],
1265
- DesiredValue: smithy_client_1.serializeFloat,
1266
- QuotaCode: [],
1267
- ServiceCode: [],
1268
- });
1269
- };
1270
- const de_GetAWSDefaultServiceQuotaResponse = (output, context) => {
1271
- return (0, smithy_client_1.take)(output, {
1272
- Quota: (_) => de_ServiceQuota(_, context),
1273
- });
1274
- };
1275
- const de_GetRequestedServiceQuotaChangeResponse = (output, context) => {
1276
- return (0, smithy_client_1.take)(output, {
1277
- RequestedQuota: (_) => de_RequestedServiceQuotaChange(_, context),
1278
- });
1279
- };
1280
- const de_GetServiceQuotaIncreaseRequestFromTemplateResponse = (output, context) => {
1281
- return (0, smithy_client_1.take)(output, {
1282
- ServiceQuotaIncreaseRequestInTemplate: (_) => de_ServiceQuotaIncreaseRequestInTemplate(_, context),
1283
- });
1284
- };
1285
- const de_GetServiceQuotaResponse = (output, context) => {
1286
- return (0, smithy_client_1.take)(output, {
1287
- Quota: (_) => de_ServiceQuota(_, context),
1288
- });
1289
- };
1290
- const de_ListAWSDefaultServiceQuotasResponse = (output, context) => {
1291
- return (0, smithy_client_1.take)(output, {
1292
- NextToken: smithy_client_1.expectString,
1293
- Quotas: (_) => de_ServiceQuotaListDefinition(_, context),
1294
- });
1295
- };
1296
- const de_ListRequestedServiceQuotaChangeHistoryByQuotaResponse = (output, context) => {
1297
- return (0, smithy_client_1.take)(output, {
1298
- NextToken: smithy_client_1.expectString,
1299
- RequestedQuotas: (_) => de_RequestedServiceQuotaChangeHistoryListDefinition(_, context),
1300
- });
1301
- };
1302
- const de_ListRequestedServiceQuotaChangeHistoryResponse = (output, context) => {
1303
- return (0, smithy_client_1.take)(output, {
1304
- NextToken: smithy_client_1.expectString,
1305
- RequestedQuotas: (_) => de_RequestedServiceQuotaChangeHistoryListDefinition(_, context),
1306
- });
1307
- };
1308
- const de_ListServiceQuotaIncreaseRequestsInTemplateResponse = (output, context) => {
1309
- return (0, smithy_client_1.take)(output, {
1310
- NextToken: smithy_client_1.expectString,
1311
- ServiceQuotaIncreaseRequestInTemplateList: (_) => de_ServiceQuotaIncreaseRequestInTemplateList(_, context),
1312
- });
1313
- };
1314
- const de_ListServiceQuotasResponse = (output, context) => {
1315
- return (0, smithy_client_1.take)(output, {
1316
- NextToken: smithy_client_1.expectString,
1317
- Quotas: (_) => de_ServiceQuotaListDefinition(_, context),
1318
- });
1319
- };
1320
- const de_PutServiceQuotaIncreaseRequestIntoTemplateResponse = (output, context) => {
1321
- return (0, smithy_client_1.take)(output, {
1322
- ServiceQuotaIncreaseRequestInTemplate: (_) => de_ServiceQuotaIncreaseRequestInTemplate(_, context),
1323
- });
1324
- };
1325
- const de_RequestedServiceQuotaChange = (output, context) => {
1326
- return (0, smithy_client_1.take)(output, {
1327
- CaseId: smithy_client_1.expectString,
1328
- Created: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1329
- DesiredValue: smithy_client_1.limitedParseDouble,
1330
- GlobalQuota: smithy_client_1.expectBoolean,
1331
- Id: smithy_client_1.expectString,
1332
- LastUpdated: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1333
- QuotaArn: smithy_client_1.expectString,
1334
- QuotaCode: smithy_client_1.expectString,
1335
- QuotaContext: smithy_client_1._json,
1336
- QuotaName: smithy_client_1.expectString,
1337
- QuotaRequestedAtLevel: smithy_client_1.expectString,
1338
- Requester: smithy_client_1.expectString,
1339
- ServiceCode: smithy_client_1.expectString,
1340
- ServiceName: smithy_client_1.expectString,
1341
- Status: smithy_client_1.expectString,
1342
- Unit: smithy_client_1.expectString,
1343
- });
1344
- };
1345
- const de_RequestedServiceQuotaChangeHistoryListDefinition = (output, context) => {
1346
- const retVal = (output || [])
1347
- .filter((e) => e != null)
1348
- .map((entry) => {
1349
- return de_RequestedServiceQuotaChange(entry, context);
1350
- });
1351
- return retVal;
1352
- };
1353
- const de_RequestServiceQuotaIncreaseResponse = (output, context) => {
1354
- return (0, smithy_client_1.take)(output, {
1355
- RequestedQuota: (_) => de_RequestedServiceQuotaChange(_, context),
1356
- });
1357
- };
1358
- const de_ServiceQuota = (output, context) => {
1359
- return (0, smithy_client_1.take)(output, {
1360
- Adjustable: smithy_client_1.expectBoolean,
1361
- ErrorReason: smithy_client_1._json,
1362
- GlobalQuota: smithy_client_1.expectBoolean,
1363
- Period: smithy_client_1._json,
1364
- QuotaAppliedAtLevel: smithy_client_1.expectString,
1365
- QuotaArn: smithy_client_1.expectString,
1366
- QuotaCode: smithy_client_1.expectString,
1367
- QuotaContext: smithy_client_1._json,
1368
- QuotaName: smithy_client_1.expectString,
1369
- ServiceCode: smithy_client_1.expectString,
1370
- ServiceName: smithy_client_1.expectString,
1371
- Unit: smithy_client_1.expectString,
1372
- UsageMetric: smithy_client_1._json,
1373
- Value: smithy_client_1.limitedParseDouble,
1374
- });
1375
- };
1376
- const de_ServiceQuotaIncreaseRequestInTemplate = (output, context) => {
1377
- return (0, smithy_client_1.take)(output, {
1378
- AwsRegion: smithy_client_1.expectString,
1379
- DesiredValue: smithy_client_1.limitedParseDouble,
1380
- GlobalQuota: smithy_client_1.expectBoolean,
1381
- QuotaCode: smithy_client_1.expectString,
1382
- QuotaName: smithy_client_1.expectString,
1383
- ServiceCode: smithy_client_1.expectString,
1384
- ServiceName: smithy_client_1.expectString,
1385
- Unit: smithy_client_1.expectString,
1386
- });
1387
- };
1388
- const de_ServiceQuotaIncreaseRequestInTemplateList = (output, context) => {
1389
- const retVal = (output || [])
1390
- .filter((e) => e != null)
1391
- .map((entry) => {
1392
- return de_ServiceQuotaIncreaseRequestInTemplate(entry, context);
1393
- });
1394
- return retVal;
1395
- };
1396
- const de_ServiceQuotaListDefinition = (output, context) => {
1397
- const retVal = (output || [])
1398
- .filter((e) => e != null)
1399
- .map((entry) => {
1400
- return de_ServiceQuota(entry, context);
1401
- });
1402
- return retVal;
1403
- };
1404
- const deserializeMetadata = (output) => ({
1405
- httpStatusCode: output.statusCode,
1406
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1407
- extendedRequestId: output.headers["x-amz-id-2"],
1408
- cfId: output.headers["x-amz-cf-id"],
1409
- });
1410
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
1411
- const throwDefaultError = (0, smithy_client_1.withBaseException)(ServiceQuotasServiceException_1.ServiceQuotasServiceException);
1412
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1413
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1414
- const contents = {
1415
- protocol,
1416
- hostname,
1417
- port,
1418
- method: "POST",
1419
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1420
- headers,
1421
- };
1422
- if (resolvedHostname !== undefined) {
1423
- contents.hostname = resolvedHostname;
1424
- }
1425
- if (body !== undefined) {
1426
- contents.body = body;
1427
- }
1428
- return new protocol_http_1.HttpRequest(contents);
1429
- };
1430
- function sharedHeaders(operation) {
1431
- return {
1432
- "content-type": "application/x-amz-json-1.1",
1433
- "x-amz-target": `ServiceQuotasV20190624.${operation}`,
1434
- };
1435
- }
1436
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1437
- if (encoded.length) {
1438
- return JSON.parse(encoded);
1439
- }
1440
- return {};
1441
- });
1442
- const parseErrorBody = async (errorBody, context) => {
1443
- const value = await parseBody(errorBody, context);
1444
- value.message = value.message ?? value.Message;
1445
- return value;
1446
- };
1447
- const loadRestJsonErrorCode = (output, data) => {
1448
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1449
- const sanitizeErrorCode = (rawValue) => {
1450
- let cleanValue = rawValue;
1451
- if (typeof cleanValue === "number") {
1452
- cleanValue = cleanValue.toString();
1453
- }
1454
- if (cleanValue.indexOf(",") >= 0) {
1455
- cleanValue = cleanValue.split(",")[0];
1456
- }
1457
- if (cleanValue.indexOf(":") >= 0) {
1458
- cleanValue = cleanValue.split(":")[0];
1459
- }
1460
- if (cleanValue.indexOf("#") >= 0) {
1461
- cleanValue = cleanValue.split("#")[1];
1462
- }
1463
- return cleanValue;
1464
- };
1465
- const headerKey = findKey(output.headers, "x-amzn-errortype");
1466
- if (headerKey !== undefined) {
1467
- return sanitizeErrorCode(output.headers[headerKey]);
1468
- }
1469
- if (data.code !== undefined) {
1470
- return sanitizeErrorCode(data.code);
1471
- }
1472
- if (data["__type"] !== undefined) {
1473
- return sanitizeErrorCode(data["__type"]);
1474
- }
1475
- };
1
+ module.exports = require("../index.js");