@aws-sdk/client-service-quotas 3.183.0 → 3.185.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 (38) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist-cjs/protocols/Aws_json1_1.js +2 -2
  3. package/dist-es/ServiceQuotas.js +85 -78
  4. package/dist-es/ServiceQuotasClient.js +28 -22
  5. package/dist-es/commands/AssociateServiceQuotaTemplateCommand.js +28 -21
  6. package/dist-es/commands/DeleteServiceQuotaIncreaseRequestFromTemplateCommand.js +28 -21
  7. package/dist-es/commands/DisassociateServiceQuotaTemplateCommand.js +28 -21
  8. package/dist-es/commands/GetAWSDefaultServiceQuotaCommand.js +28 -21
  9. package/dist-es/commands/GetAssociationForServiceQuotaTemplateCommand.js +28 -21
  10. package/dist-es/commands/GetRequestedServiceQuotaChangeCommand.js +28 -21
  11. package/dist-es/commands/GetServiceQuotaCommand.js +28 -21
  12. package/dist-es/commands/GetServiceQuotaIncreaseRequestFromTemplateCommand.js +28 -21
  13. package/dist-es/commands/ListAWSDefaultServiceQuotasCommand.js +28 -21
  14. package/dist-es/commands/ListRequestedServiceQuotaChangeHistoryByQuotaCommand.js +28 -21
  15. package/dist-es/commands/ListRequestedServiceQuotaChangeHistoryCommand.js +28 -21
  16. package/dist-es/commands/ListServiceQuotaIncreaseRequestsInTemplateCommand.js +28 -21
  17. package/dist-es/commands/ListServiceQuotasCommand.js +28 -21
  18. package/dist-es/commands/ListServicesCommand.js +28 -21
  19. package/dist-es/commands/ListTagsForResourceCommand.js +28 -21
  20. package/dist-es/commands/PutServiceQuotaIncreaseRequestIntoTemplateCommand.js +28 -21
  21. package/dist-es/commands/RequestServiceQuotaIncreaseCommand.js +28 -21
  22. package/dist-es/commands/TagResourceCommand.js +28 -21
  23. package/dist-es/commands/UntagResourceCommand.js +28 -21
  24. package/dist-es/endpoints.js +8 -8
  25. package/dist-es/models/ServiceQuotasServiceException.js +10 -5
  26. package/dist-es/models/models_0.js +251 -342
  27. package/dist-es/pagination/ListAWSDefaultServiceQuotasPaginator.js +68 -25
  28. package/dist-es/pagination/ListRequestedServiceQuotaChangeHistoryByQuotaPaginator.js +68 -25
  29. package/dist-es/pagination/ListRequestedServiceQuotaChangeHistoryPaginator.js +68 -25
  30. package/dist-es/pagination/ListServiceQuotaIncreaseRequestsInTemplatePaginator.js +68 -25
  31. package/dist-es/pagination/ListServiceQuotasPaginator.js +68 -25
  32. package/dist-es/pagination/ListServicesPaginator.js +68 -25
  33. package/dist-es/protocols/Aws_json1_1.js +1952 -1501
  34. package/dist-es/runtimeConfig.browser.js +12 -26
  35. package/dist-es/runtimeConfig.js +12 -30
  36. package/dist-es/runtimeConfig.native.js +5 -8
  37. package/dist-es/runtimeConfig.shared.js +11 -8
  38. package/package.json +5 -5
@@ -1,1509 +1,1938 @@
1
+ import { __assign, __awaiter, __generator, __read } from "tslib";
1
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
3
  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";
3
4
  import { AccessDeniedException, AWSServiceAccessNotEnabledException, DependencyAccessDeniedException, IllegalArgumentException, InvalidPaginationTokenException, InvalidResourceStateException, NoAvailableOrganizationException, NoSuchResourceException, OrganizationNotInAllFeaturesModeException, QuotaExceededException, ResourceAlreadyExistsException, ServiceException, ServiceQuotaTemplateNotInUseException, TagPolicyViolationException, TemplatesNotAvailableInRegionException, TooManyRequestsException, TooManyTagsException, } from "../models/models_0";
4
5
  import { ServiceQuotasServiceException as __BaseException } from "../models/ServiceQuotasServiceException";
5
- export const serializeAws_json1_1AssociateServiceQuotaTemplateCommand = async (input, context) => {
6
- const headers = {
7
- "content-type": "application/x-amz-json-1.1",
8
- "x-amz-target": "ServiceQuotasV20190624.AssociateServiceQuotaTemplate",
9
- };
10
- let body;
11
- body = JSON.stringify(serializeAws_json1_1AssociateServiceQuotaTemplateRequest(input, context));
12
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
- };
14
- export const serializeAws_json1_1DeleteServiceQuotaIncreaseRequestFromTemplateCommand = async (input, context) => {
15
- const headers = {
16
- "content-type": "application/x-amz-json-1.1",
17
- "x-amz-target": "ServiceQuotasV20190624.DeleteServiceQuotaIncreaseRequestFromTemplate",
18
- };
19
- let body;
20
- body = JSON.stringify(serializeAws_json1_1DeleteServiceQuotaIncreaseRequestFromTemplateRequest(input, context));
21
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
- };
23
- export const serializeAws_json1_1DisassociateServiceQuotaTemplateCommand = async (input, context) => {
24
- const headers = {
25
- "content-type": "application/x-amz-json-1.1",
26
- "x-amz-target": "ServiceQuotasV20190624.DisassociateServiceQuotaTemplate",
27
- };
28
- let body;
29
- body = JSON.stringify(serializeAws_json1_1DisassociateServiceQuotaTemplateRequest(input, context));
30
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
31
- };
32
- export const serializeAws_json1_1GetAssociationForServiceQuotaTemplateCommand = async (input, context) => {
33
- const headers = {
34
- "content-type": "application/x-amz-json-1.1",
35
- "x-amz-target": "ServiceQuotasV20190624.GetAssociationForServiceQuotaTemplate",
36
- };
37
- let body;
38
- body = JSON.stringify(serializeAws_json1_1GetAssociationForServiceQuotaTemplateRequest(input, context));
39
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
- };
41
- export const serializeAws_json1_1GetAWSDefaultServiceQuotaCommand = async (input, context) => {
42
- const headers = {
43
- "content-type": "application/x-amz-json-1.1",
44
- "x-amz-target": "ServiceQuotasV20190624.GetAWSDefaultServiceQuota",
45
- };
46
- let body;
47
- body = JSON.stringify(serializeAws_json1_1GetAWSDefaultServiceQuotaRequest(input, context));
48
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
- };
50
- export const serializeAws_json1_1GetRequestedServiceQuotaChangeCommand = async (input, context) => {
51
- const headers = {
52
- "content-type": "application/x-amz-json-1.1",
53
- "x-amz-target": "ServiceQuotasV20190624.GetRequestedServiceQuotaChange",
54
- };
55
- let body;
56
- body = JSON.stringify(serializeAws_json1_1GetRequestedServiceQuotaChangeRequest(input, context));
57
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
- };
59
- export const serializeAws_json1_1GetServiceQuotaCommand = async (input, context) => {
60
- const headers = {
61
- "content-type": "application/x-amz-json-1.1",
62
- "x-amz-target": "ServiceQuotasV20190624.GetServiceQuota",
63
- };
64
- let body;
65
- body = JSON.stringify(serializeAws_json1_1GetServiceQuotaRequest(input, context));
66
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
67
- };
68
- export const serializeAws_json1_1GetServiceQuotaIncreaseRequestFromTemplateCommand = async (input, context) => {
69
- const headers = {
70
- "content-type": "application/x-amz-json-1.1",
71
- "x-amz-target": "ServiceQuotasV20190624.GetServiceQuotaIncreaseRequestFromTemplate",
72
- };
73
- let body;
74
- body = JSON.stringify(serializeAws_json1_1GetServiceQuotaIncreaseRequestFromTemplateRequest(input, context));
75
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
- };
77
- export const serializeAws_json1_1ListAWSDefaultServiceQuotasCommand = async (input, context) => {
78
- const headers = {
79
- "content-type": "application/x-amz-json-1.1",
80
- "x-amz-target": "ServiceQuotasV20190624.ListAWSDefaultServiceQuotas",
81
- };
82
- let body;
83
- body = JSON.stringify(serializeAws_json1_1ListAWSDefaultServiceQuotasRequest(input, context));
84
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
85
- };
86
- export const serializeAws_json1_1ListRequestedServiceQuotaChangeHistoryCommand = async (input, context) => {
87
- const headers = {
88
- "content-type": "application/x-amz-json-1.1",
89
- "x-amz-target": "ServiceQuotasV20190624.ListRequestedServiceQuotaChangeHistory",
90
- };
91
- let body;
92
- body = JSON.stringify(serializeAws_json1_1ListRequestedServiceQuotaChangeHistoryRequest(input, context));
93
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
94
- };
95
- export const serializeAws_json1_1ListRequestedServiceQuotaChangeHistoryByQuotaCommand = async (input, context) => {
96
- const headers = {
97
- "content-type": "application/x-amz-json-1.1",
98
- "x-amz-target": "ServiceQuotasV20190624.ListRequestedServiceQuotaChangeHistoryByQuota",
99
- };
100
- let body;
101
- body = JSON.stringify(serializeAws_json1_1ListRequestedServiceQuotaChangeHistoryByQuotaRequest(input, context));
102
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
103
- };
104
- export const serializeAws_json1_1ListServiceQuotaIncreaseRequestsInTemplateCommand = async (input, context) => {
105
- const headers = {
106
- "content-type": "application/x-amz-json-1.1",
107
- "x-amz-target": "ServiceQuotasV20190624.ListServiceQuotaIncreaseRequestsInTemplate",
108
- };
109
- let body;
110
- body = JSON.stringify(serializeAws_json1_1ListServiceQuotaIncreaseRequestsInTemplateRequest(input, context));
111
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
- };
113
- export const serializeAws_json1_1ListServiceQuotasCommand = async (input, context) => {
114
- const headers = {
115
- "content-type": "application/x-amz-json-1.1",
116
- "x-amz-target": "ServiceQuotasV20190624.ListServiceQuotas",
117
- };
118
- let body;
119
- body = JSON.stringify(serializeAws_json1_1ListServiceQuotasRequest(input, context));
120
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
121
- };
122
- export const serializeAws_json1_1ListServicesCommand = async (input, context) => {
123
- const headers = {
124
- "content-type": "application/x-amz-json-1.1",
125
- "x-amz-target": "ServiceQuotasV20190624.ListServices",
126
- };
127
- let body;
128
- body = JSON.stringify(serializeAws_json1_1ListServicesRequest(input, context));
129
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
130
- };
131
- export const serializeAws_json1_1ListTagsForResourceCommand = async (input, context) => {
132
- const headers = {
133
- "content-type": "application/x-amz-json-1.1",
134
- "x-amz-target": "ServiceQuotasV20190624.ListTagsForResource",
135
- };
136
- let body;
137
- body = JSON.stringify(serializeAws_json1_1ListTagsForResourceRequest(input, context));
138
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
139
- };
140
- export const serializeAws_json1_1PutServiceQuotaIncreaseRequestIntoTemplateCommand = async (input, context) => {
141
- const headers = {
142
- "content-type": "application/x-amz-json-1.1",
143
- "x-amz-target": "ServiceQuotasV20190624.PutServiceQuotaIncreaseRequestIntoTemplate",
144
- };
145
- let body;
146
- body = JSON.stringify(serializeAws_json1_1PutServiceQuotaIncreaseRequestIntoTemplateRequest(input, context));
147
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
148
- };
149
- export const serializeAws_json1_1RequestServiceQuotaIncreaseCommand = async (input, context) => {
150
- const headers = {
151
- "content-type": "application/x-amz-json-1.1",
152
- "x-amz-target": "ServiceQuotasV20190624.RequestServiceQuotaIncrease",
153
- };
154
- let body;
155
- body = JSON.stringify(serializeAws_json1_1RequestServiceQuotaIncreaseRequest(input, context));
156
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
157
- };
158
- export const serializeAws_json1_1TagResourceCommand = async (input, context) => {
159
- const headers = {
160
- "content-type": "application/x-amz-json-1.1",
161
- "x-amz-target": "ServiceQuotasV20190624.TagResource",
162
- };
163
- let body;
164
- body = JSON.stringify(serializeAws_json1_1TagResourceRequest(input, context));
165
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
166
- };
167
- export const serializeAws_json1_1UntagResourceCommand = async (input, context) => {
168
- const headers = {
169
- "content-type": "application/x-amz-json-1.1",
170
- "x-amz-target": "ServiceQuotasV20190624.UntagResource",
171
- };
172
- let body;
173
- body = JSON.stringify(serializeAws_json1_1UntagResourceRequest(input, context));
174
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
175
- };
176
- export const deserializeAws_json1_1AssociateServiceQuotaTemplateCommand = async (output, context) => {
177
- if (output.statusCode >= 300) {
178
- return deserializeAws_json1_1AssociateServiceQuotaTemplateCommandError(output, context);
179
- }
180
- const data = await parseBody(output.body, context);
181
- let contents = {};
182
- contents = deserializeAws_json1_1AssociateServiceQuotaTemplateResponse(data, context);
183
- const response = {
184
- $metadata: deserializeMetadata(output),
185
- ...contents,
186
- };
187
- return Promise.resolve(response);
188
- };
189
- const deserializeAws_json1_1AssociateServiceQuotaTemplateCommandError = async (output, context) => {
190
- const parsedOutput = {
191
- ...output,
192
- body: await parseErrorBody(output.body, context),
193
- };
194
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
195
- switch (errorCode) {
196
- case "AWSServiceAccessNotEnabledException":
197
- case "com.amazonaws.servicequotas#AWSServiceAccessNotEnabledException":
198
- throw await deserializeAws_json1_1AWSServiceAccessNotEnabledExceptionResponse(parsedOutput, context);
199
- case "AccessDeniedException":
200
- case "com.amazonaws.servicequotas#AccessDeniedException":
201
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
202
- case "DependencyAccessDeniedException":
203
- case "com.amazonaws.servicequotas#DependencyAccessDeniedException":
204
- throw await deserializeAws_json1_1DependencyAccessDeniedExceptionResponse(parsedOutput, context);
205
- case "NoAvailableOrganizationException":
206
- case "com.amazonaws.servicequotas#NoAvailableOrganizationException":
207
- throw await deserializeAws_json1_1NoAvailableOrganizationExceptionResponse(parsedOutput, context);
208
- case "OrganizationNotInAllFeaturesModeException":
209
- case "com.amazonaws.servicequotas#OrganizationNotInAllFeaturesModeException":
210
- throw await deserializeAws_json1_1OrganizationNotInAllFeaturesModeExceptionResponse(parsedOutput, context);
211
- case "ServiceException":
212
- case "com.amazonaws.servicequotas#ServiceException":
213
- throw await deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context);
214
- case "TemplatesNotAvailableInRegionException":
215
- case "com.amazonaws.servicequotas#TemplatesNotAvailableInRegionException":
216
- throw await deserializeAws_json1_1TemplatesNotAvailableInRegionExceptionResponse(parsedOutput, context);
217
- case "TooManyRequestsException":
218
- case "com.amazonaws.servicequotas#TooManyRequestsException":
219
- throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
220
- default:
221
- const parsedBody = parsedOutput.body;
222
- throwDefaultError({
223
- output,
224
- parsedBody,
225
- exceptionCtor: __BaseException,
226
- errorCode,
227
- });
228
- }
229
- };
230
- export const deserializeAws_json1_1DeleteServiceQuotaIncreaseRequestFromTemplateCommand = async (output, context) => {
231
- if (output.statusCode >= 300) {
232
- return deserializeAws_json1_1DeleteServiceQuotaIncreaseRequestFromTemplateCommandError(output, context);
233
- }
234
- const data = await parseBody(output.body, context);
235
- let contents = {};
236
- contents = deserializeAws_json1_1DeleteServiceQuotaIncreaseRequestFromTemplateResponse(data, context);
237
- const response = {
238
- $metadata: deserializeMetadata(output),
239
- ...contents,
240
- };
241
- return Promise.resolve(response);
242
- };
243
- const deserializeAws_json1_1DeleteServiceQuotaIncreaseRequestFromTemplateCommandError = async (output, context) => {
244
- const parsedOutput = {
245
- ...output,
246
- body: await parseErrorBody(output.body, context),
247
- };
248
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
249
- switch (errorCode) {
250
- case "AWSServiceAccessNotEnabledException":
251
- case "com.amazonaws.servicequotas#AWSServiceAccessNotEnabledException":
252
- throw await deserializeAws_json1_1AWSServiceAccessNotEnabledExceptionResponse(parsedOutput, context);
253
- case "AccessDeniedException":
254
- case "com.amazonaws.servicequotas#AccessDeniedException":
255
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
256
- case "DependencyAccessDeniedException":
257
- case "com.amazonaws.servicequotas#DependencyAccessDeniedException":
258
- throw await deserializeAws_json1_1DependencyAccessDeniedExceptionResponse(parsedOutput, context);
259
- case "IllegalArgumentException":
260
- case "com.amazonaws.servicequotas#IllegalArgumentException":
261
- throw await deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context);
262
- case "NoAvailableOrganizationException":
263
- case "com.amazonaws.servicequotas#NoAvailableOrganizationException":
264
- throw await deserializeAws_json1_1NoAvailableOrganizationExceptionResponse(parsedOutput, context);
265
- case "NoSuchResourceException":
266
- case "com.amazonaws.servicequotas#NoSuchResourceException":
267
- throw await deserializeAws_json1_1NoSuchResourceExceptionResponse(parsedOutput, context);
268
- case "ServiceException":
269
- case "com.amazonaws.servicequotas#ServiceException":
270
- throw await deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context);
271
- case "TemplatesNotAvailableInRegionException":
272
- case "com.amazonaws.servicequotas#TemplatesNotAvailableInRegionException":
273
- throw await deserializeAws_json1_1TemplatesNotAvailableInRegionExceptionResponse(parsedOutput, context);
274
- case "TooManyRequestsException":
275
- case "com.amazonaws.servicequotas#TooManyRequestsException":
276
- throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
277
- default:
278
- const parsedBody = parsedOutput.body;
279
- throwDefaultError({
280
- output,
281
- parsedBody,
282
- exceptionCtor: __BaseException,
283
- errorCode,
284
- });
285
- }
286
- };
287
- export const deserializeAws_json1_1DisassociateServiceQuotaTemplateCommand = async (output, context) => {
288
- if (output.statusCode >= 300) {
289
- return deserializeAws_json1_1DisassociateServiceQuotaTemplateCommandError(output, context);
290
- }
291
- const data = await parseBody(output.body, context);
292
- let contents = {};
293
- contents = deserializeAws_json1_1DisassociateServiceQuotaTemplateResponse(data, context);
294
- const response = {
295
- $metadata: deserializeMetadata(output),
296
- ...contents,
297
- };
298
- return Promise.resolve(response);
299
- };
300
- const deserializeAws_json1_1DisassociateServiceQuotaTemplateCommandError = async (output, context) => {
301
- const parsedOutput = {
302
- ...output,
303
- body: await parseErrorBody(output.body, context),
304
- };
305
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
306
- switch (errorCode) {
307
- case "AWSServiceAccessNotEnabledException":
308
- case "com.amazonaws.servicequotas#AWSServiceAccessNotEnabledException":
309
- throw await deserializeAws_json1_1AWSServiceAccessNotEnabledExceptionResponse(parsedOutput, context);
310
- case "AccessDeniedException":
311
- case "com.amazonaws.servicequotas#AccessDeniedException":
312
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
313
- case "DependencyAccessDeniedException":
314
- case "com.amazonaws.servicequotas#DependencyAccessDeniedException":
315
- throw await deserializeAws_json1_1DependencyAccessDeniedExceptionResponse(parsedOutput, context);
316
- case "NoAvailableOrganizationException":
317
- case "com.amazonaws.servicequotas#NoAvailableOrganizationException":
318
- throw await deserializeAws_json1_1NoAvailableOrganizationExceptionResponse(parsedOutput, context);
319
- case "ServiceException":
320
- case "com.amazonaws.servicequotas#ServiceException":
321
- throw await deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context);
322
- case "ServiceQuotaTemplateNotInUseException":
323
- case "com.amazonaws.servicequotas#ServiceQuotaTemplateNotInUseException":
324
- throw await deserializeAws_json1_1ServiceQuotaTemplateNotInUseExceptionResponse(parsedOutput, context);
325
- case "TemplatesNotAvailableInRegionException":
326
- case "com.amazonaws.servicequotas#TemplatesNotAvailableInRegionException":
327
- throw await deserializeAws_json1_1TemplatesNotAvailableInRegionExceptionResponse(parsedOutput, context);
328
- case "TooManyRequestsException":
329
- case "com.amazonaws.servicequotas#TooManyRequestsException":
330
- throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
331
- default:
332
- const parsedBody = parsedOutput.body;
333
- throwDefaultError({
334
- output,
335
- parsedBody,
336
- exceptionCtor: __BaseException,
337
- errorCode,
338
- });
339
- }
340
- };
341
- export const deserializeAws_json1_1GetAssociationForServiceQuotaTemplateCommand = async (output, context) => {
342
- if (output.statusCode >= 300) {
343
- return deserializeAws_json1_1GetAssociationForServiceQuotaTemplateCommandError(output, context);
344
- }
345
- const data = await parseBody(output.body, context);
346
- let contents = {};
347
- contents = deserializeAws_json1_1GetAssociationForServiceQuotaTemplateResponse(data, context);
348
- const response = {
349
- $metadata: deserializeMetadata(output),
350
- ...contents,
351
- };
352
- return Promise.resolve(response);
353
- };
354
- const deserializeAws_json1_1GetAssociationForServiceQuotaTemplateCommandError = async (output, context) => {
355
- const parsedOutput = {
356
- ...output,
357
- body: await parseErrorBody(output.body, context),
358
- };
359
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
360
- switch (errorCode) {
361
- case "AWSServiceAccessNotEnabledException":
362
- case "com.amazonaws.servicequotas#AWSServiceAccessNotEnabledException":
363
- throw await deserializeAws_json1_1AWSServiceAccessNotEnabledExceptionResponse(parsedOutput, context);
364
- case "AccessDeniedException":
365
- case "com.amazonaws.servicequotas#AccessDeniedException":
366
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
367
- case "DependencyAccessDeniedException":
368
- case "com.amazonaws.servicequotas#DependencyAccessDeniedException":
369
- throw await deserializeAws_json1_1DependencyAccessDeniedExceptionResponse(parsedOutput, context);
370
- case "NoAvailableOrganizationException":
371
- case "com.amazonaws.servicequotas#NoAvailableOrganizationException":
372
- throw await deserializeAws_json1_1NoAvailableOrganizationExceptionResponse(parsedOutput, context);
373
- case "ServiceException":
374
- case "com.amazonaws.servicequotas#ServiceException":
375
- throw await deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context);
376
- case "ServiceQuotaTemplateNotInUseException":
377
- case "com.amazonaws.servicequotas#ServiceQuotaTemplateNotInUseException":
378
- throw await deserializeAws_json1_1ServiceQuotaTemplateNotInUseExceptionResponse(parsedOutput, context);
379
- case "TemplatesNotAvailableInRegionException":
380
- case "com.amazonaws.servicequotas#TemplatesNotAvailableInRegionException":
381
- throw await deserializeAws_json1_1TemplatesNotAvailableInRegionExceptionResponse(parsedOutput, context);
382
- case "TooManyRequestsException":
383
- case "com.amazonaws.servicequotas#TooManyRequestsException":
384
- throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
385
- default:
386
- const parsedBody = parsedOutput.body;
387
- throwDefaultError({
388
- output,
389
- parsedBody,
390
- exceptionCtor: __BaseException,
391
- errorCode,
392
- });
393
- }
394
- };
395
- export const deserializeAws_json1_1GetAWSDefaultServiceQuotaCommand = async (output, context) => {
396
- if (output.statusCode >= 300) {
397
- return deserializeAws_json1_1GetAWSDefaultServiceQuotaCommandError(output, context);
398
- }
399
- const data = await parseBody(output.body, context);
400
- let contents = {};
401
- contents = deserializeAws_json1_1GetAWSDefaultServiceQuotaResponse(data, context);
402
- const response = {
403
- $metadata: deserializeMetadata(output),
404
- ...contents,
405
- };
406
- return Promise.resolve(response);
407
- };
408
- const deserializeAws_json1_1GetAWSDefaultServiceQuotaCommandError = async (output, context) => {
409
- const parsedOutput = {
410
- ...output,
411
- body: await parseErrorBody(output.body, context),
412
- };
413
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
414
- switch (errorCode) {
415
- case "AccessDeniedException":
416
- case "com.amazonaws.servicequotas#AccessDeniedException":
417
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
418
- case "IllegalArgumentException":
419
- case "com.amazonaws.servicequotas#IllegalArgumentException":
420
- throw await deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context);
421
- case "NoSuchResourceException":
422
- case "com.amazonaws.servicequotas#NoSuchResourceException":
423
- throw await deserializeAws_json1_1NoSuchResourceExceptionResponse(parsedOutput, context);
424
- case "ServiceException":
425
- case "com.amazonaws.servicequotas#ServiceException":
426
- throw await deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context);
427
- case "TooManyRequestsException":
428
- case "com.amazonaws.servicequotas#TooManyRequestsException":
429
- throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
430
- default:
431
- const parsedBody = parsedOutput.body;
432
- throwDefaultError({
433
- output,
434
- parsedBody,
435
- exceptionCtor: __BaseException,
436
- errorCode,
437
- });
438
- }
439
- };
440
- export const deserializeAws_json1_1GetRequestedServiceQuotaChangeCommand = async (output, context) => {
441
- if (output.statusCode >= 300) {
442
- return deserializeAws_json1_1GetRequestedServiceQuotaChangeCommandError(output, context);
443
- }
444
- const data = await parseBody(output.body, context);
445
- let contents = {};
446
- contents = deserializeAws_json1_1GetRequestedServiceQuotaChangeResponse(data, context);
447
- const response = {
448
- $metadata: deserializeMetadata(output),
449
- ...contents,
450
- };
451
- return Promise.resolve(response);
452
- };
453
- const deserializeAws_json1_1GetRequestedServiceQuotaChangeCommandError = async (output, context) => {
454
- const parsedOutput = {
455
- ...output,
456
- body: await parseErrorBody(output.body, context),
457
- };
458
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
459
- switch (errorCode) {
460
- case "AccessDeniedException":
461
- case "com.amazonaws.servicequotas#AccessDeniedException":
462
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
463
- case "IllegalArgumentException":
464
- case "com.amazonaws.servicequotas#IllegalArgumentException":
465
- throw await deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context);
466
- case "NoSuchResourceException":
467
- case "com.amazonaws.servicequotas#NoSuchResourceException":
468
- throw await deserializeAws_json1_1NoSuchResourceExceptionResponse(parsedOutput, context);
469
- case "ServiceException":
470
- case "com.amazonaws.servicequotas#ServiceException":
471
- throw await deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context);
472
- case "TooManyRequestsException":
473
- case "com.amazonaws.servicequotas#TooManyRequestsException":
474
- throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
475
- default:
476
- const parsedBody = parsedOutput.body;
477
- throwDefaultError({
478
- output,
479
- parsedBody,
480
- exceptionCtor: __BaseException,
481
- errorCode,
482
- });
483
- }
484
- };
485
- export const deserializeAws_json1_1GetServiceQuotaCommand = async (output, context) => {
486
- if (output.statusCode >= 300) {
487
- return deserializeAws_json1_1GetServiceQuotaCommandError(output, context);
488
- }
489
- const data = await parseBody(output.body, context);
490
- let contents = {};
491
- contents = deserializeAws_json1_1GetServiceQuotaResponse(data, context);
492
- const response = {
493
- $metadata: deserializeMetadata(output),
494
- ...contents,
495
- };
496
- return Promise.resolve(response);
497
- };
498
- const deserializeAws_json1_1GetServiceQuotaCommandError = async (output, context) => {
499
- const parsedOutput = {
500
- ...output,
501
- body: await parseErrorBody(output.body, context),
502
- };
503
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
504
- switch (errorCode) {
505
- case "AccessDeniedException":
506
- case "com.amazonaws.servicequotas#AccessDeniedException":
507
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
508
- case "IllegalArgumentException":
509
- case "com.amazonaws.servicequotas#IllegalArgumentException":
510
- throw await deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context);
511
- case "NoSuchResourceException":
512
- case "com.amazonaws.servicequotas#NoSuchResourceException":
513
- throw await deserializeAws_json1_1NoSuchResourceExceptionResponse(parsedOutput, context);
514
- case "ServiceException":
515
- case "com.amazonaws.servicequotas#ServiceException":
516
- throw await deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context);
517
- case "TooManyRequestsException":
518
- case "com.amazonaws.servicequotas#TooManyRequestsException":
519
- throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
520
- default:
521
- const parsedBody = parsedOutput.body;
522
- throwDefaultError({
523
- output,
524
- parsedBody,
525
- exceptionCtor: __BaseException,
526
- errorCode,
527
- });
528
- }
529
- };
530
- export const deserializeAws_json1_1GetServiceQuotaIncreaseRequestFromTemplateCommand = async (output, context) => {
531
- if (output.statusCode >= 300) {
532
- return deserializeAws_json1_1GetServiceQuotaIncreaseRequestFromTemplateCommandError(output, context);
533
- }
534
- const data = await parseBody(output.body, context);
535
- let contents = {};
536
- contents = deserializeAws_json1_1GetServiceQuotaIncreaseRequestFromTemplateResponse(data, context);
537
- const response = {
538
- $metadata: deserializeMetadata(output),
539
- ...contents,
540
- };
541
- return Promise.resolve(response);
542
- };
543
- const deserializeAws_json1_1GetServiceQuotaIncreaseRequestFromTemplateCommandError = async (output, context) => {
544
- const parsedOutput = {
545
- ...output,
546
- body: await parseErrorBody(output.body, context),
547
- };
548
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
549
- switch (errorCode) {
550
- case "AWSServiceAccessNotEnabledException":
551
- case "com.amazonaws.servicequotas#AWSServiceAccessNotEnabledException":
552
- throw await deserializeAws_json1_1AWSServiceAccessNotEnabledExceptionResponse(parsedOutput, context);
553
- case "AccessDeniedException":
554
- case "com.amazonaws.servicequotas#AccessDeniedException":
555
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
556
- case "DependencyAccessDeniedException":
557
- case "com.amazonaws.servicequotas#DependencyAccessDeniedException":
558
- throw await deserializeAws_json1_1DependencyAccessDeniedExceptionResponse(parsedOutput, context);
559
- case "IllegalArgumentException":
560
- case "com.amazonaws.servicequotas#IllegalArgumentException":
561
- throw await deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context);
562
- case "NoAvailableOrganizationException":
563
- case "com.amazonaws.servicequotas#NoAvailableOrganizationException":
564
- throw await deserializeAws_json1_1NoAvailableOrganizationExceptionResponse(parsedOutput, context);
565
- case "NoSuchResourceException":
566
- case "com.amazonaws.servicequotas#NoSuchResourceException":
567
- throw await deserializeAws_json1_1NoSuchResourceExceptionResponse(parsedOutput, context);
568
- case "ServiceException":
569
- case "com.amazonaws.servicequotas#ServiceException":
570
- throw await deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context);
571
- case "TemplatesNotAvailableInRegionException":
572
- case "com.amazonaws.servicequotas#TemplatesNotAvailableInRegionException":
573
- throw await deserializeAws_json1_1TemplatesNotAvailableInRegionExceptionResponse(parsedOutput, context);
574
- case "TooManyRequestsException":
575
- case "com.amazonaws.servicequotas#TooManyRequestsException":
576
- throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
577
- default:
578
- const parsedBody = parsedOutput.body;
579
- throwDefaultError({
580
- output,
581
- parsedBody,
582
- exceptionCtor: __BaseException,
583
- errorCode,
584
- });
585
- }
586
- };
587
- export const deserializeAws_json1_1ListAWSDefaultServiceQuotasCommand = async (output, context) => {
588
- if (output.statusCode >= 300) {
589
- return deserializeAws_json1_1ListAWSDefaultServiceQuotasCommandError(output, context);
590
- }
591
- const data = await parseBody(output.body, context);
592
- let contents = {};
593
- contents = deserializeAws_json1_1ListAWSDefaultServiceQuotasResponse(data, context);
594
- const response = {
595
- $metadata: deserializeMetadata(output),
596
- ...contents,
597
- };
598
- return Promise.resolve(response);
599
- };
600
- const deserializeAws_json1_1ListAWSDefaultServiceQuotasCommandError = async (output, context) => {
601
- const parsedOutput = {
602
- ...output,
603
- body: await parseErrorBody(output.body, context),
604
- };
605
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
606
- switch (errorCode) {
607
- case "AccessDeniedException":
608
- case "com.amazonaws.servicequotas#AccessDeniedException":
609
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
610
- case "IllegalArgumentException":
611
- case "com.amazonaws.servicequotas#IllegalArgumentException":
612
- throw await deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context);
613
- case "InvalidPaginationTokenException":
614
- case "com.amazonaws.servicequotas#InvalidPaginationTokenException":
615
- throw await deserializeAws_json1_1InvalidPaginationTokenExceptionResponse(parsedOutput, context);
616
- case "NoSuchResourceException":
617
- case "com.amazonaws.servicequotas#NoSuchResourceException":
618
- throw await deserializeAws_json1_1NoSuchResourceExceptionResponse(parsedOutput, context);
619
- case "ServiceException":
620
- case "com.amazonaws.servicequotas#ServiceException":
621
- throw await deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context);
622
- case "TooManyRequestsException":
623
- case "com.amazonaws.servicequotas#TooManyRequestsException":
624
- throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
625
- default:
626
- const parsedBody = parsedOutput.body;
627
- throwDefaultError({
628
- output,
629
- parsedBody,
630
- exceptionCtor: __BaseException,
631
- errorCode,
632
- });
633
- }
634
- };
635
- export const deserializeAws_json1_1ListRequestedServiceQuotaChangeHistoryCommand = async (output, context) => {
636
- if (output.statusCode >= 300) {
637
- return deserializeAws_json1_1ListRequestedServiceQuotaChangeHistoryCommandError(output, context);
638
- }
639
- const data = await parseBody(output.body, context);
640
- let contents = {};
641
- contents = deserializeAws_json1_1ListRequestedServiceQuotaChangeHistoryResponse(data, context);
642
- const response = {
643
- $metadata: deserializeMetadata(output),
644
- ...contents,
645
- };
646
- return Promise.resolve(response);
647
- };
648
- const deserializeAws_json1_1ListRequestedServiceQuotaChangeHistoryCommandError = async (output, context) => {
649
- const parsedOutput = {
650
- ...output,
651
- body: await parseErrorBody(output.body, context),
652
- };
653
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
654
- switch (errorCode) {
655
- case "AccessDeniedException":
656
- case "com.amazonaws.servicequotas#AccessDeniedException":
657
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
658
- case "IllegalArgumentException":
659
- case "com.amazonaws.servicequotas#IllegalArgumentException":
660
- throw await deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context);
661
- case "InvalidPaginationTokenException":
662
- case "com.amazonaws.servicequotas#InvalidPaginationTokenException":
663
- throw await deserializeAws_json1_1InvalidPaginationTokenExceptionResponse(parsedOutput, context);
664
- case "NoSuchResourceException":
665
- case "com.amazonaws.servicequotas#NoSuchResourceException":
666
- throw await deserializeAws_json1_1NoSuchResourceExceptionResponse(parsedOutput, context);
667
- case "ServiceException":
668
- case "com.amazonaws.servicequotas#ServiceException":
669
- throw await deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context);
670
- case "TooManyRequestsException":
671
- case "com.amazonaws.servicequotas#TooManyRequestsException":
672
- throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
673
- default:
674
- const parsedBody = parsedOutput.body;
675
- throwDefaultError({
676
- output,
677
- parsedBody,
678
- exceptionCtor: __BaseException,
679
- errorCode,
680
- });
681
- }
682
- };
683
- export const deserializeAws_json1_1ListRequestedServiceQuotaChangeHistoryByQuotaCommand = async (output, context) => {
684
- if (output.statusCode >= 300) {
685
- return deserializeAws_json1_1ListRequestedServiceQuotaChangeHistoryByQuotaCommandError(output, context);
686
- }
687
- const data = await parseBody(output.body, context);
688
- let contents = {};
689
- contents = deserializeAws_json1_1ListRequestedServiceQuotaChangeHistoryByQuotaResponse(data, context);
690
- const response = {
691
- $metadata: deserializeMetadata(output),
692
- ...contents,
693
- };
694
- return Promise.resolve(response);
695
- };
696
- const deserializeAws_json1_1ListRequestedServiceQuotaChangeHistoryByQuotaCommandError = async (output, context) => {
697
- const parsedOutput = {
698
- ...output,
699
- body: await parseErrorBody(output.body, context),
700
- };
701
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
702
- switch (errorCode) {
703
- case "AccessDeniedException":
704
- case "com.amazonaws.servicequotas#AccessDeniedException":
705
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
706
- case "IllegalArgumentException":
707
- case "com.amazonaws.servicequotas#IllegalArgumentException":
708
- throw await deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context);
709
- case "InvalidPaginationTokenException":
710
- case "com.amazonaws.servicequotas#InvalidPaginationTokenException":
711
- throw await deserializeAws_json1_1InvalidPaginationTokenExceptionResponse(parsedOutput, context);
712
- case "NoSuchResourceException":
713
- case "com.amazonaws.servicequotas#NoSuchResourceException":
714
- throw await deserializeAws_json1_1NoSuchResourceExceptionResponse(parsedOutput, context);
715
- case "ServiceException":
716
- case "com.amazonaws.servicequotas#ServiceException":
717
- throw await deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context);
718
- case "TooManyRequestsException":
719
- case "com.amazonaws.servicequotas#TooManyRequestsException":
720
- throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
721
- default:
722
- const parsedBody = parsedOutput.body;
723
- throwDefaultError({
724
- output,
725
- parsedBody,
726
- exceptionCtor: __BaseException,
727
- errorCode,
728
- });
729
- }
730
- };
731
- export const deserializeAws_json1_1ListServiceQuotaIncreaseRequestsInTemplateCommand = async (output, context) => {
732
- if (output.statusCode >= 300) {
733
- return deserializeAws_json1_1ListServiceQuotaIncreaseRequestsInTemplateCommandError(output, context);
734
- }
735
- const data = await parseBody(output.body, context);
736
- let contents = {};
737
- contents = deserializeAws_json1_1ListServiceQuotaIncreaseRequestsInTemplateResponse(data, context);
738
- const response = {
739
- $metadata: deserializeMetadata(output),
740
- ...contents,
741
- };
742
- return Promise.resolve(response);
743
- };
744
- const deserializeAws_json1_1ListServiceQuotaIncreaseRequestsInTemplateCommandError = async (output, context) => {
745
- const parsedOutput = {
746
- ...output,
747
- body: await parseErrorBody(output.body, context),
748
- };
749
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
750
- switch (errorCode) {
751
- case "AWSServiceAccessNotEnabledException":
752
- case "com.amazonaws.servicequotas#AWSServiceAccessNotEnabledException":
753
- throw await deserializeAws_json1_1AWSServiceAccessNotEnabledExceptionResponse(parsedOutput, context);
754
- case "AccessDeniedException":
755
- case "com.amazonaws.servicequotas#AccessDeniedException":
756
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
757
- case "DependencyAccessDeniedException":
758
- case "com.amazonaws.servicequotas#DependencyAccessDeniedException":
759
- throw await deserializeAws_json1_1DependencyAccessDeniedExceptionResponse(parsedOutput, context);
760
- case "IllegalArgumentException":
761
- case "com.amazonaws.servicequotas#IllegalArgumentException":
762
- throw await deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context);
763
- case "NoAvailableOrganizationException":
764
- case "com.amazonaws.servicequotas#NoAvailableOrganizationException":
765
- throw await deserializeAws_json1_1NoAvailableOrganizationExceptionResponse(parsedOutput, context);
766
- case "ServiceException":
767
- case "com.amazonaws.servicequotas#ServiceException":
768
- throw await deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context);
769
- case "TemplatesNotAvailableInRegionException":
770
- case "com.amazonaws.servicequotas#TemplatesNotAvailableInRegionException":
771
- throw await deserializeAws_json1_1TemplatesNotAvailableInRegionExceptionResponse(parsedOutput, context);
772
- case "TooManyRequestsException":
773
- case "com.amazonaws.servicequotas#TooManyRequestsException":
774
- throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
775
- default:
776
- const parsedBody = parsedOutput.body;
777
- throwDefaultError({
778
- output,
779
- parsedBody,
780
- exceptionCtor: __BaseException,
781
- errorCode,
782
- });
783
- }
784
- };
785
- export const deserializeAws_json1_1ListServiceQuotasCommand = async (output, context) => {
786
- if (output.statusCode >= 300) {
787
- return deserializeAws_json1_1ListServiceQuotasCommandError(output, context);
788
- }
789
- const data = await parseBody(output.body, context);
790
- let contents = {};
791
- contents = deserializeAws_json1_1ListServiceQuotasResponse(data, context);
792
- const response = {
793
- $metadata: deserializeMetadata(output),
794
- ...contents,
795
- };
796
- return Promise.resolve(response);
797
- };
798
- const deserializeAws_json1_1ListServiceQuotasCommandError = async (output, context) => {
799
- const parsedOutput = {
800
- ...output,
801
- body: await parseErrorBody(output.body, context),
802
- };
803
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
804
- switch (errorCode) {
805
- case "AccessDeniedException":
806
- case "com.amazonaws.servicequotas#AccessDeniedException":
807
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
808
- case "IllegalArgumentException":
809
- case "com.amazonaws.servicequotas#IllegalArgumentException":
810
- throw await deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context);
811
- case "InvalidPaginationTokenException":
812
- case "com.amazonaws.servicequotas#InvalidPaginationTokenException":
813
- throw await deserializeAws_json1_1InvalidPaginationTokenExceptionResponse(parsedOutput, context);
814
- case "NoSuchResourceException":
815
- case "com.amazonaws.servicequotas#NoSuchResourceException":
816
- throw await deserializeAws_json1_1NoSuchResourceExceptionResponse(parsedOutput, context);
817
- case "ServiceException":
818
- case "com.amazonaws.servicequotas#ServiceException":
819
- throw await deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context);
820
- case "TooManyRequestsException":
821
- case "com.amazonaws.servicequotas#TooManyRequestsException":
822
- throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
823
- default:
824
- const parsedBody = parsedOutput.body;
825
- throwDefaultError({
826
- output,
827
- parsedBody,
828
- exceptionCtor: __BaseException,
829
- errorCode,
830
- });
831
- }
832
- };
833
- export const deserializeAws_json1_1ListServicesCommand = async (output, context) => {
834
- if (output.statusCode >= 300) {
835
- return deserializeAws_json1_1ListServicesCommandError(output, context);
836
- }
837
- const data = await parseBody(output.body, context);
838
- let contents = {};
839
- contents = deserializeAws_json1_1ListServicesResponse(data, context);
840
- const response = {
841
- $metadata: deserializeMetadata(output),
842
- ...contents,
843
- };
844
- return Promise.resolve(response);
845
- };
846
- const deserializeAws_json1_1ListServicesCommandError = async (output, context) => {
847
- const parsedOutput = {
848
- ...output,
849
- body: await parseErrorBody(output.body, context),
850
- };
851
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
852
- switch (errorCode) {
853
- case "AccessDeniedException":
854
- case "com.amazonaws.servicequotas#AccessDeniedException":
855
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
856
- case "IllegalArgumentException":
857
- case "com.amazonaws.servicequotas#IllegalArgumentException":
858
- throw await deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context);
859
- case "InvalidPaginationTokenException":
860
- case "com.amazonaws.servicequotas#InvalidPaginationTokenException":
861
- throw await deserializeAws_json1_1InvalidPaginationTokenExceptionResponse(parsedOutput, context);
862
- case "ServiceException":
863
- case "com.amazonaws.servicequotas#ServiceException":
864
- throw await deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context);
865
- case "TooManyRequestsException":
866
- case "com.amazonaws.servicequotas#TooManyRequestsException":
867
- throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
868
- default:
869
- const parsedBody = parsedOutput.body;
870
- throwDefaultError({
871
- output,
872
- parsedBody,
873
- exceptionCtor: __BaseException,
874
- errorCode,
875
- });
876
- }
877
- };
878
- export const deserializeAws_json1_1ListTagsForResourceCommand = async (output, context) => {
879
- if (output.statusCode >= 300) {
880
- return deserializeAws_json1_1ListTagsForResourceCommandError(output, context);
881
- }
882
- const data = await parseBody(output.body, context);
883
- let contents = {};
884
- contents = deserializeAws_json1_1ListTagsForResourceResponse(data, context);
885
- const response = {
886
- $metadata: deserializeMetadata(output),
887
- ...contents,
888
- };
889
- return Promise.resolve(response);
890
- };
891
- const deserializeAws_json1_1ListTagsForResourceCommandError = async (output, context) => {
892
- const parsedOutput = {
893
- ...output,
894
- body: await parseErrorBody(output.body, context),
895
- };
896
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
897
- switch (errorCode) {
898
- case "AccessDeniedException":
899
- case "com.amazonaws.servicequotas#AccessDeniedException":
900
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
901
- case "IllegalArgumentException":
902
- case "com.amazonaws.servicequotas#IllegalArgumentException":
903
- throw await deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context);
904
- case "NoSuchResourceException":
905
- case "com.amazonaws.servicequotas#NoSuchResourceException":
906
- throw await deserializeAws_json1_1NoSuchResourceExceptionResponse(parsedOutput, context);
907
- case "ServiceException":
908
- case "com.amazonaws.servicequotas#ServiceException":
909
- throw await deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context);
910
- case "TooManyRequestsException":
911
- case "com.amazonaws.servicequotas#TooManyRequestsException":
912
- throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
913
- default:
914
- const parsedBody = parsedOutput.body;
915
- throwDefaultError({
916
- output,
917
- parsedBody,
918
- exceptionCtor: __BaseException,
919
- errorCode,
920
- });
921
- }
922
- };
923
- export const deserializeAws_json1_1PutServiceQuotaIncreaseRequestIntoTemplateCommand = async (output, context) => {
924
- if (output.statusCode >= 300) {
925
- return deserializeAws_json1_1PutServiceQuotaIncreaseRequestIntoTemplateCommandError(output, context);
926
- }
927
- const data = await parseBody(output.body, context);
928
- let contents = {};
929
- contents = deserializeAws_json1_1PutServiceQuotaIncreaseRequestIntoTemplateResponse(data, context);
930
- const response = {
931
- $metadata: deserializeMetadata(output),
932
- ...contents,
933
- };
934
- return Promise.resolve(response);
935
- };
936
- const deserializeAws_json1_1PutServiceQuotaIncreaseRequestIntoTemplateCommandError = async (output, context) => {
937
- const parsedOutput = {
938
- ...output,
939
- body: await parseErrorBody(output.body, context),
940
- };
941
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
942
- switch (errorCode) {
943
- case "AWSServiceAccessNotEnabledException":
944
- case "com.amazonaws.servicequotas#AWSServiceAccessNotEnabledException":
945
- throw await deserializeAws_json1_1AWSServiceAccessNotEnabledExceptionResponse(parsedOutput, context);
946
- case "AccessDeniedException":
947
- case "com.amazonaws.servicequotas#AccessDeniedException":
948
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
949
- case "DependencyAccessDeniedException":
950
- case "com.amazonaws.servicequotas#DependencyAccessDeniedException":
951
- throw await deserializeAws_json1_1DependencyAccessDeniedExceptionResponse(parsedOutput, context);
952
- case "IllegalArgumentException":
953
- case "com.amazonaws.servicequotas#IllegalArgumentException":
954
- throw await deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context);
955
- case "NoAvailableOrganizationException":
956
- case "com.amazonaws.servicequotas#NoAvailableOrganizationException":
957
- throw await deserializeAws_json1_1NoAvailableOrganizationExceptionResponse(parsedOutput, context);
958
- case "NoSuchResourceException":
959
- case "com.amazonaws.servicequotas#NoSuchResourceException":
960
- throw await deserializeAws_json1_1NoSuchResourceExceptionResponse(parsedOutput, context);
961
- case "QuotaExceededException":
962
- case "com.amazonaws.servicequotas#QuotaExceededException":
963
- throw await deserializeAws_json1_1QuotaExceededExceptionResponse(parsedOutput, context);
964
- case "ServiceException":
965
- case "com.amazonaws.servicequotas#ServiceException":
966
- throw await deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context);
967
- case "TemplatesNotAvailableInRegionException":
968
- case "com.amazonaws.servicequotas#TemplatesNotAvailableInRegionException":
969
- throw await deserializeAws_json1_1TemplatesNotAvailableInRegionExceptionResponse(parsedOutput, context);
970
- case "TooManyRequestsException":
971
- case "com.amazonaws.servicequotas#TooManyRequestsException":
972
- throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
973
- default:
974
- const parsedBody = parsedOutput.body;
975
- throwDefaultError({
976
- output,
977
- parsedBody,
978
- exceptionCtor: __BaseException,
979
- errorCode,
980
- });
981
- }
982
- };
983
- export const deserializeAws_json1_1RequestServiceQuotaIncreaseCommand = async (output, context) => {
984
- if (output.statusCode >= 300) {
985
- return deserializeAws_json1_1RequestServiceQuotaIncreaseCommandError(output, context);
986
- }
987
- const data = await parseBody(output.body, context);
988
- let contents = {};
989
- contents = deserializeAws_json1_1RequestServiceQuotaIncreaseResponse(data, context);
990
- const response = {
991
- $metadata: deserializeMetadata(output),
992
- ...contents,
993
- };
994
- return Promise.resolve(response);
995
- };
996
- const deserializeAws_json1_1RequestServiceQuotaIncreaseCommandError = async (output, context) => {
997
- const parsedOutput = {
998
- ...output,
999
- body: await parseErrorBody(output.body, context),
1000
- };
1001
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1002
- switch (errorCode) {
1003
- case "AccessDeniedException":
1004
- case "com.amazonaws.servicequotas#AccessDeniedException":
1005
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
1006
- case "DependencyAccessDeniedException":
1007
- case "com.amazonaws.servicequotas#DependencyAccessDeniedException":
1008
- throw await deserializeAws_json1_1DependencyAccessDeniedExceptionResponse(parsedOutput, context);
1009
- case "IllegalArgumentException":
1010
- case "com.amazonaws.servicequotas#IllegalArgumentException":
1011
- throw await deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context);
1012
- case "InvalidResourceStateException":
1013
- case "com.amazonaws.servicequotas#InvalidResourceStateException":
1014
- throw await deserializeAws_json1_1InvalidResourceStateExceptionResponse(parsedOutput, context);
1015
- case "NoSuchResourceException":
1016
- case "com.amazonaws.servicequotas#NoSuchResourceException":
1017
- throw await deserializeAws_json1_1NoSuchResourceExceptionResponse(parsedOutput, context);
1018
- case "QuotaExceededException":
1019
- case "com.amazonaws.servicequotas#QuotaExceededException":
1020
- throw await deserializeAws_json1_1QuotaExceededExceptionResponse(parsedOutput, context);
1021
- case "ResourceAlreadyExistsException":
1022
- case "com.amazonaws.servicequotas#ResourceAlreadyExistsException":
1023
- throw await deserializeAws_json1_1ResourceAlreadyExistsExceptionResponse(parsedOutput, context);
1024
- case "ServiceException":
1025
- case "com.amazonaws.servicequotas#ServiceException":
1026
- throw await deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context);
1027
- case "TooManyRequestsException":
1028
- case "com.amazonaws.servicequotas#TooManyRequestsException":
1029
- throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
1030
- default:
1031
- const parsedBody = parsedOutput.body;
1032
- throwDefaultError({
1033
- output,
1034
- parsedBody,
1035
- exceptionCtor: __BaseException,
1036
- errorCode,
1037
- });
1038
- }
1039
- };
1040
- export const deserializeAws_json1_1TagResourceCommand = async (output, context) => {
1041
- if (output.statusCode >= 300) {
1042
- return deserializeAws_json1_1TagResourceCommandError(output, context);
1043
- }
1044
- const data = await parseBody(output.body, context);
1045
- let contents = {};
1046
- contents = deserializeAws_json1_1TagResourceResponse(data, context);
1047
- const response = {
1048
- $metadata: deserializeMetadata(output),
1049
- ...contents,
1050
- };
1051
- return Promise.resolve(response);
1052
- };
1053
- const deserializeAws_json1_1TagResourceCommandError = async (output, context) => {
1054
- const parsedOutput = {
1055
- ...output,
1056
- body: await parseErrorBody(output.body, context),
1057
- };
1058
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1059
- switch (errorCode) {
1060
- case "AccessDeniedException":
1061
- case "com.amazonaws.servicequotas#AccessDeniedException":
1062
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
1063
- case "IllegalArgumentException":
1064
- case "com.amazonaws.servicequotas#IllegalArgumentException":
1065
- throw await deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context);
1066
- case "NoSuchResourceException":
1067
- case "com.amazonaws.servicequotas#NoSuchResourceException":
1068
- throw await deserializeAws_json1_1NoSuchResourceExceptionResponse(parsedOutput, context);
1069
- case "ServiceException":
1070
- case "com.amazonaws.servicequotas#ServiceException":
1071
- throw await deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context);
1072
- case "TagPolicyViolationException":
1073
- case "com.amazonaws.servicequotas#TagPolicyViolationException":
1074
- throw await deserializeAws_json1_1TagPolicyViolationExceptionResponse(parsedOutput, context);
1075
- case "TooManyRequestsException":
1076
- case "com.amazonaws.servicequotas#TooManyRequestsException":
1077
- throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
1078
- case "TooManyTagsException":
1079
- case "com.amazonaws.servicequotas#TooManyTagsException":
1080
- throw await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context);
1081
- default:
1082
- const parsedBody = parsedOutput.body;
1083
- throwDefaultError({
1084
- output,
1085
- parsedBody,
1086
- exceptionCtor: __BaseException,
1087
- errorCode,
1088
- });
1089
- }
1090
- };
1091
- export const deserializeAws_json1_1UntagResourceCommand = async (output, context) => {
1092
- if (output.statusCode >= 300) {
1093
- return deserializeAws_json1_1UntagResourceCommandError(output, context);
1094
- }
1095
- const data = await parseBody(output.body, context);
1096
- let contents = {};
1097
- contents = deserializeAws_json1_1UntagResourceResponse(data, context);
1098
- const response = {
1099
- $metadata: deserializeMetadata(output),
1100
- ...contents,
1101
- };
1102
- return Promise.resolve(response);
1103
- };
1104
- const deserializeAws_json1_1UntagResourceCommandError = async (output, context) => {
1105
- const parsedOutput = {
1106
- ...output,
1107
- body: await parseErrorBody(output.body, context),
1108
- };
1109
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1110
- switch (errorCode) {
1111
- case "AccessDeniedException":
1112
- case "com.amazonaws.servicequotas#AccessDeniedException":
1113
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
1114
- case "IllegalArgumentException":
1115
- case "com.amazonaws.servicequotas#IllegalArgumentException":
1116
- throw await deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context);
1117
- case "NoSuchResourceException":
1118
- case "com.amazonaws.servicequotas#NoSuchResourceException":
1119
- throw await deserializeAws_json1_1NoSuchResourceExceptionResponse(parsedOutput, context);
1120
- case "ServiceException":
1121
- case "com.amazonaws.servicequotas#ServiceException":
1122
- throw await deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context);
1123
- case "TooManyRequestsException":
1124
- case "com.amazonaws.servicequotas#TooManyRequestsException":
1125
- throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
1126
- default:
1127
- const parsedBody = parsedOutput.body;
1128
- throwDefaultError({
1129
- output,
1130
- parsedBody,
1131
- exceptionCtor: __BaseException,
1132
- errorCode,
1133
- });
1134
- }
1135
- };
1136
- const deserializeAws_json1_1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
1137
- const body = parsedOutput.body;
1138
- const deserialized = deserializeAws_json1_1AccessDeniedException(body, context);
1139
- const exception = new AccessDeniedException({
1140
- $metadata: deserializeMetadata(parsedOutput),
1141
- ...deserialized,
1142
- });
1143
- return __decorateServiceException(exception, body);
1144
- };
1145
- const deserializeAws_json1_1AWSServiceAccessNotEnabledExceptionResponse = async (parsedOutput, context) => {
1146
- const body = parsedOutput.body;
1147
- const deserialized = deserializeAws_json1_1AWSServiceAccessNotEnabledException(body, context);
1148
- const exception = new AWSServiceAccessNotEnabledException({
1149
- $metadata: deserializeMetadata(parsedOutput),
1150
- ...deserialized,
1151
- });
1152
- return __decorateServiceException(exception, body);
1153
- };
1154
- const deserializeAws_json1_1DependencyAccessDeniedExceptionResponse = async (parsedOutput, context) => {
1155
- const body = parsedOutput.body;
1156
- const deserialized = deserializeAws_json1_1DependencyAccessDeniedException(body, context);
1157
- const exception = new DependencyAccessDeniedException({
1158
- $metadata: deserializeMetadata(parsedOutput),
1159
- ...deserialized,
1160
- });
1161
- return __decorateServiceException(exception, body);
1162
- };
1163
- const deserializeAws_json1_1IllegalArgumentExceptionResponse = async (parsedOutput, context) => {
1164
- const body = parsedOutput.body;
1165
- const deserialized = deserializeAws_json1_1IllegalArgumentException(body, context);
1166
- const exception = new IllegalArgumentException({
1167
- $metadata: deserializeMetadata(parsedOutput),
1168
- ...deserialized,
1169
- });
1170
- return __decorateServiceException(exception, body);
1171
- };
1172
- const deserializeAws_json1_1InvalidPaginationTokenExceptionResponse = async (parsedOutput, context) => {
1173
- const body = parsedOutput.body;
1174
- const deserialized = deserializeAws_json1_1InvalidPaginationTokenException(body, context);
1175
- const exception = new InvalidPaginationTokenException({
1176
- $metadata: deserializeMetadata(parsedOutput),
1177
- ...deserialized,
1178
- });
1179
- return __decorateServiceException(exception, body);
1180
- };
1181
- const deserializeAws_json1_1InvalidResourceStateExceptionResponse = async (parsedOutput, context) => {
1182
- const body = parsedOutput.body;
1183
- const deserialized = deserializeAws_json1_1InvalidResourceStateException(body, context);
1184
- const exception = new InvalidResourceStateException({
1185
- $metadata: deserializeMetadata(parsedOutput),
1186
- ...deserialized,
1187
- });
1188
- return __decorateServiceException(exception, body);
1189
- };
1190
- const deserializeAws_json1_1NoAvailableOrganizationExceptionResponse = async (parsedOutput, context) => {
1191
- const body = parsedOutput.body;
1192
- const deserialized = deserializeAws_json1_1NoAvailableOrganizationException(body, context);
1193
- const exception = new NoAvailableOrganizationException({
1194
- $metadata: deserializeMetadata(parsedOutput),
1195
- ...deserialized,
1196
- });
1197
- return __decorateServiceException(exception, body);
1198
- };
1199
- const deserializeAws_json1_1NoSuchResourceExceptionResponse = async (parsedOutput, context) => {
1200
- const body = parsedOutput.body;
1201
- const deserialized = deserializeAws_json1_1NoSuchResourceException(body, context);
1202
- const exception = new NoSuchResourceException({
1203
- $metadata: deserializeMetadata(parsedOutput),
1204
- ...deserialized,
1205
- });
1206
- return __decorateServiceException(exception, body);
1207
- };
1208
- const deserializeAws_json1_1OrganizationNotInAllFeaturesModeExceptionResponse = async (parsedOutput, context) => {
1209
- const body = parsedOutput.body;
1210
- const deserialized = deserializeAws_json1_1OrganizationNotInAllFeaturesModeException(body, context);
1211
- const exception = new OrganizationNotInAllFeaturesModeException({
1212
- $metadata: deserializeMetadata(parsedOutput),
1213
- ...deserialized,
1214
- });
1215
- return __decorateServiceException(exception, body);
1216
- };
1217
- const deserializeAws_json1_1QuotaExceededExceptionResponse = async (parsedOutput, context) => {
1218
- const body = parsedOutput.body;
1219
- const deserialized = deserializeAws_json1_1QuotaExceededException(body, context);
1220
- const exception = new QuotaExceededException({
1221
- $metadata: deserializeMetadata(parsedOutput),
1222
- ...deserialized,
1223
- });
1224
- return __decorateServiceException(exception, body);
1225
- };
1226
- const deserializeAws_json1_1ResourceAlreadyExistsExceptionResponse = async (parsedOutput, context) => {
1227
- const body = parsedOutput.body;
1228
- const deserialized = deserializeAws_json1_1ResourceAlreadyExistsException(body, context);
1229
- const exception = new ResourceAlreadyExistsException({
1230
- $metadata: deserializeMetadata(parsedOutput),
1231
- ...deserialized,
1232
- });
1233
- return __decorateServiceException(exception, body);
1234
- };
1235
- const deserializeAws_json1_1ServiceExceptionResponse = async (parsedOutput, context) => {
1236
- const body = parsedOutput.body;
1237
- const deserialized = deserializeAws_json1_1ServiceException(body, context);
1238
- const exception = new ServiceException({
1239
- $metadata: deserializeMetadata(parsedOutput),
1240
- ...deserialized,
1241
- });
1242
- return __decorateServiceException(exception, body);
1243
- };
1244
- const deserializeAws_json1_1ServiceQuotaTemplateNotInUseExceptionResponse = async (parsedOutput, context) => {
1245
- const body = parsedOutput.body;
1246
- const deserialized = deserializeAws_json1_1ServiceQuotaTemplateNotInUseException(body, context);
1247
- const exception = new ServiceQuotaTemplateNotInUseException({
1248
- $metadata: deserializeMetadata(parsedOutput),
1249
- ...deserialized,
1250
- });
1251
- return __decorateServiceException(exception, body);
1252
- };
1253
- const deserializeAws_json1_1TagPolicyViolationExceptionResponse = async (parsedOutput, context) => {
1254
- const body = parsedOutput.body;
1255
- const deserialized = deserializeAws_json1_1TagPolicyViolationException(body, context);
1256
- const exception = new TagPolicyViolationException({
1257
- $metadata: deserializeMetadata(parsedOutput),
1258
- ...deserialized,
1259
- });
1260
- return __decorateServiceException(exception, body);
1261
- };
1262
- const deserializeAws_json1_1TemplatesNotAvailableInRegionExceptionResponse = async (parsedOutput, context) => {
1263
- const body = parsedOutput.body;
1264
- const deserialized = deserializeAws_json1_1TemplatesNotAvailableInRegionException(body, context);
1265
- const exception = new TemplatesNotAvailableInRegionException({
1266
- $metadata: deserializeMetadata(parsedOutput),
1267
- ...deserialized,
1268
- });
1269
- return __decorateServiceException(exception, body);
1270
- };
1271
- const deserializeAws_json1_1TooManyRequestsExceptionResponse = async (parsedOutput, context) => {
1272
- const body = parsedOutput.body;
1273
- const deserialized = deserializeAws_json1_1TooManyRequestsException(body, context);
1274
- const exception = new TooManyRequestsException({
1275
- $metadata: deserializeMetadata(parsedOutput),
1276
- ...deserialized,
1277
- });
1278
- return __decorateServiceException(exception, body);
1279
- };
1280
- const deserializeAws_json1_1TooManyTagsExceptionResponse = async (parsedOutput, context) => {
1281
- const body = parsedOutput.body;
1282
- const deserialized = deserializeAws_json1_1TooManyTagsException(body, context);
1283
- const exception = new TooManyTagsException({
1284
- $metadata: deserializeMetadata(parsedOutput),
1285
- ...deserialized,
1286
- });
1287
- return __decorateServiceException(exception, body);
1288
- };
1289
- const serializeAws_json1_1AssociateServiceQuotaTemplateRequest = (input, context) => {
6
+ export var serializeAws_json1_1AssociateServiceQuotaTemplateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
7
+ var headers, body;
8
+ return __generator(this, function (_a) {
9
+ headers = {
10
+ "content-type": "application/x-amz-json-1.1",
11
+ "x-amz-target": "ServiceQuotasV20190624.AssociateServiceQuotaTemplate",
12
+ };
13
+ body = JSON.stringify(serializeAws_json1_1AssociateServiceQuotaTemplateRequest(input, context));
14
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
15
+ });
16
+ }); };
17
+ export var serializeAws_json1_1DeleteServiceQuotaIncreaseRequestFromTemplateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
18
+ var headers, body;
19
+ return __generator(this, function (_a) {
20
+ headers = {
21
+ "content-type": "application/x-amz-json-1.1",
22
+ "x-amz-target": "ServiceQuotasV20190624.DeleteServiceQuotaIncreaseRequestFromTemplate",
23
+ };
24
+ body = JSON.stringify(serializeAws_json1_1DeleteServiceQuotaIncreaseRequestFromTemplateRequest(input, context));
25
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
26
+ });
27
+ }); };
28
+ export var serializeAws_json1_1DisassociateServiceQuotaTemplateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
29
+ var headers, body;
30
+ return __generator(this, function (_a) {
31
+ headers = {
32
+ "content-type": "application/x-amz-json-1.1",
33
+ "x-amz-target": "ServiceQuotasV20190624.DisassociateServiceQuotaTemplate",
34
+ };
35
+ body = JSON.stringify(serializeAws_json1_1DisassociateServiceQuotaTemplateRequest(input, context));
36
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
37
+ });
38
+ }); };
39
+ export var serializeAws_json1_1GetAssociationForServiceQuotaTemplateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
40
+ var headers, body;
41
+ return __generator(this, function (_a) {
42
+ headers = {
43
+ "content-type": "application/x-amz-json-1.1",
44
+ "x-amz-target": "ServiceQuotasV20190624.GetAssociationForServiceQuotaTemplate",
45
+ };
46
+ body = JSON.stringify(serializeAws_json1_1GetAssociationForServiceQuotaTemplateRequest(input, context));
47
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
48
+ });
49
+ }); };
50
+ export var serializeAws_json1_1GetAWSDefaultServiceQuotaCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
51
+ var headers, body;
52
+ return __generator(this, function (_a) {
53
+ headers = {
54
+ "content-type": "application/x-amz-json-1.1",
55
+ "x-amz-target": "ServiceQuotasV20190624.GetAWSDefaultServiceQuota",
56
+ };
57
+ body = JSON.stringify(serializeAws_json1_1GetAWSDefaultServiceQuotaRequest(input, context));
58
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
59
+ });
60
+ }); };
61
+ export var serializeAws_json1_1GetRequestedServiceQuotaChangeCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
62
+ var headers, body;
63
+ return __generator(this, function (_a) {
64
+ headers = {
65
+ "content-type": "application/x-amz-json-1.1",
66
+ "x-amz-target": "ServiceQuotasV20190624.GetRequestedServiceQuotaChange",
67
+ };
68
+ body = JSON.stringify(serializeAws_json1_1GetRequestedServiceQuotaChangeRequest(input, context));
69
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
70
+ });
71
+ }); };
72
+ export var serializeAws_json1_1GetServiceQuotaCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
73
+ var headers, body;
74
+ return __generator(this, function (_a) {
75
+ headers = {
76
+ "content-type": "application/x-amz-json-1.1",
77
+ "x-amz-target": "ServiceQuotasV20190624.GetServiceQuota",
78
+ };
79
+ body = JSON.stringify(serializeAws_json1_1GetServiceQuotaRequest(input, context));
80
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
81
+ });
82
+ }); };
83
+ export var serializeAws_json1_1GetServiceQuotaIncreaseRequestFromTemplateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
84
+ var headers, body;
85
+ return __generator(this, function (_a) {
86
+ headers = {
87
+ "content-type": "application/x-amz-json-1.1",
88
+ "x-amz-target": "ServiceQuotasV20190624.GetServiceQuotaIncreaseRequestFromTemplate",
89
+ };
90
+ body = JSON.stringify(serializeAws_json1_1GetServiceQuotaIncreaseRequestFromTemplateRequest(input, context));
91
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
92
+ });
93
+ }); };
94
+ export var serializeAws_json1_1ListAWSDefaultServiceQuotasCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
95
+ var headers, body;
96
+ return __generator(this, function (_a) {
97
+ headers = {
98
+ "content-type": "application/x-amz-json-1.1",
99
+ "x-amz-target": "ServiceQuotasV20190624.ListAWSDefaultServiceQuotas",
100
+ };
101
+ body = JSON.stringify(serializeAws_json1_1ListAWSDefaultServiceQuotasRequest(input, context));
102
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
103
+ });
104
+ }); };
105
+ export var serializeAws_json1_1ListRequestedServiceQuotaChangeHistoryCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
106
+ var headers, body;
107
+ return __generator(this, function (_a) {
108
+ headers = {
109
+ "content-type": "application/x-amz-json-1.1",
110
+ "x-amz-target": "ServiceQuotasV20190624.ListRequestedServiceQuotaChangeHistory",
111
+ };
112
+ body = JSON.stringify(serializeAws_json1_1ListRequestedServiceQuotaChangeHistoryRequest(input, context));
113
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
114
+ });
115
+ }); };
116
+ export var serializeAws_json1_1ListRequestedServiceQuotaChangeHistoryByQuotaCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
117
+ var headers, body;
118
+ return __generator(this, function (_a) {
119
+ headers = {
120
+ "content-type": "application/x-amz-json-1.1",
121
+ "x-amz-target": "ServiceQuotasV20190624.ListRequestedServiceQuotaChangeHistoryByQuota",
122
+ };
123
+ body = JSON.stringify(serializeAws_json1_1ListRequestedServiceQuotaChangeHistoryByQuotaRequest(input, context));
124
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
125
+ });
126
+ }); };
127
+ export var serializeAws_json1_1ListServiceQuotaIncreaseRequestsInTemplateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
128
+ var headers, body;
129
+ return __generator(this, function (_a) {
130
+ headers = {
131
+ "content-type": "application/x-amz-json-1.1",
132
+ "x-amz-target": "ServiceQuotasV20190624.ListServiceQuotaIncreaseRequestsInTemplate",
133
+ };
134
+ body = JSON.stringify(serializeAws_json1_1ListServiceQuotaIncreaseRequestsInTemplateRequest(input, context));
135
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
136
+ });
137
+ }); };
138
+ export var serializeAws_json1_1ListServiceQuotasCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
139
+ var headers, body;
140
+ return __generator(this, function (_a) {
141
+ headers = {
142
+ "content-type": "application/x-amz-json-1.1",
143
+ "x-amz-target": "ServiceQuotasV20190624.ListServiceQuotas",
144
+ };
145
+ body = JSON.stringify(serializeAws_json1_1ListServiceQuotasRequest(input, context));
146
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
147
+ });
148
+ }); };
149
+ export var serializeAws_json1_1ListServicesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
150
+ var headers, body;
151
+ return __generator(this, function (_a) {
152
+ headers = {
153
+ "content-type": "application/x-amz-json-1.1",
154
+ "x-amz-target": "ServiceQuotasV20190624.ListServices",
155
+ };
156
+ body = JSON.stringify(serializeAws_json1_1ListServicesRequest(input, context));
157
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
158
+ });
159
+ }); };
160
+ export var serializeAws_json1_1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
161
+ var headers, body;
162
+ return __generator(this, function (_a) {
163
+ headers = {
164
+ "content-type": "application/x-amz-json-1.1",
165
+ "x-amz-target": "ServiceQuotasV20190624.ListTagsForResource",
166
+ };
167
+ body = JSON.stringify(serializeAws_json1_1ListTagsForResourceRequest(input, context));
168
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
169
+ });
170
+ }); };
171
+ export var serializeAws_json1_1PutServiceQuotaIncreaseRequestIntoTemplateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
172
+ var headers, body;
173
+ return __generator(this, function (_a) {
174
+ headers = {
175
+ "content-type": "application/x-amz-json-1.1",
176
+ "x-amz-target": "ServiceQuotasV20190624.PutServiceQuotaIncreaseRequestIntoTemplate",
177
+ };
178
+ body = JSON.stringify(serializeAws_json1_1PutServiceQuotaIncreaseRequestIntoTemplateRequest(input, context));
179
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
180
+ });
181
+ }); };
182
+ export var serializeAws_json1_1RequestServiceQuotaIncreaseCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
183
+ var headers, body;
184
+ return __generator(this, function (_a) {
185
+ headers = {
186
+ "content-type": "application/x-amz-json-1.1",
187
+ "x-amz-target": "ServiceQuotasV20190624.RequestServiceQuotaIncrease",
188
+ };
189
+ body = JSON.stringify(serializeAws_json1_1RequestServiceQuotaIncreaseRequest(input, context));
190
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
191
+ });
192
+ }); };
193
+ export var serializeAws_json1_1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
194
+ var headers, body;
195
+ return __generator(this, function (_a) {
196
+ headers = {
197
+ "content-type": "application/x-amz-json-1.1",
198
+ "x-amz-target": "ServiceQuotasV20190624.TagResource",
199
+ };
200
+ body = JSON.stringify(serializeAws_json1_1TagResourceRequest(input, context));
201
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
202
+ });
203
+ }); };
204
+ export var serializeAws_json1_1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
205
+ var headers, body;
206
+ return __generator(this, function (_a) {
207
+ headers = {
208
+ "content-type": "application/x-amz-json-1.1",
209
+ "x-amz-target": "ServiceQuotasV20190624.UntagResource",
210
+ };
211
+ body = JSON.stringify(serializeAws_json1_1UntagResourceRequest(input, context));
212
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
213
+ });
214
+ }); };
215
+ export var deserializeAws_json1_1AssociateServiceQuotaTemplateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
216
+ var data, contents, response;
217
+ return __generator(this, function (_a) {
218
+ switch (_a.label) {
219
+ case 0:
220
+ if (output.statusCode >= 300) {
221
+ return [2, deserializeAws_json1_1AssociateServiceQuotaTemplateCommandError(output, context)];
222
+ }
223
+ return [4, parseBody(output.body, context)];
224
+ case 1:
225
+ data = _a.sent();
226
+ contents = {};
227
+ contents = deserializeAws_json1_1AssociateServiceQuotaTemplateResponse(data, context);
228
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
229
+ return [2, Promise.resolve(response)];
230
+ }
231
+ });
232
+ }); };
233
+ var deserializeAws_json1_1AssociateServiceQuotaTemplateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
234
+ var parsedOutput, _a, errorCode, _b, parsedBody;
235
+ var _c;
236
+ return __generator(this, function (_d) {
237
+ switch (_d.label) {
238
+ case 0:
239
+ _a = [__assign({}, output)];
240
+ _c = {};
241
+ return [4, parseErrorBody(output.body, context)];
242
+ case 1:
243
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
244
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
245
+ _b = errorCode;
246
+ switch (_b) {
247
+ case "AWSServiceAccessNotEnabledException": return [3, 2];
248
+ case "com.amazonaws.servicequotas#AWSServiceAccessNotEnabledException": return [3, 2];
249
+ case "AccessDeniedException": return [3, 4];
250
+ case "com.amazonaws.servicequotas#AccessDeniedException": return [3, 4];
251
+ case "DependencyAccessDeniedException": return [3, 6];
252
+ case "com.amazonaws.servicequotas#DependencyAccessDeniedException": return [3, 6];
253
+ case "NoAvailableOrganizationException": return [3, 8];
254
+ case "com.amazonaws.servicequotas#NoAvailableOrganizationException": return [3, 8];
255
+ case "OrganizationNotInAllFeaturesModeException": return [3, 10];
256
+ case "com.amazonaws.servicequotas#OrganizationNotInAllFeaturesModeException": return [3, 10];
257
+ case "ServiceException": return [3, 12];
258
+ case "com.amazonaws.servicequotas#ServiceException": return [3, 12];
259
+ case "TemplatesNotAvailableInRegionException": return [3, 14];
260
+ case "com.amazonaws.servicequotas#TemplatesNotAvailableInRegionException": return [3, 14];
261
+ case "TooManyRequestsException": return [3, 16];
262
+ case "com.amazonaws.servicequotas#TooManyRequestsException": return [3, 16];
263
+ }
264
+ return [3, 18];
265
+ case 2: return [4, deserializeAws_json1_1AWSServiceAccessNotEnabledExceptionResponse(parsedOutput, context)];
266
+ case 3: throw _d.sent();
267
+ case 4: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
268
+ case 5: throw _d.sent();
269
+ case 6: return [4, deserializeAws_json1_1DependencyAccessDeniedExceptionResponse(parsedOutput, context)];
270
+ case 7: throw _d.sent();
271
+ case 8: return [4, deserializeAws_json1_1NoAvailableOrganizationExceptionResponse(parsedOutput, context)];
272
+ case 9: throw _d.sent();
273
+ case 10: return [4, deserializeAws_json1_1OrganizationNotInAllFeaturesModeExceptionResponse(parsedOutput, context)];
274
+ case 11: throw _d.sent();
275
+ case 12: return [4, deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context)];
276
+ case 13: throw _d.sent();
277
+ case 14: return [4, deserializeAws_json1_1TemplatesNotAvailableInRegionExceptionResponse(parsedOutput, context)];
278
+ case 15: throw _d.sent();
279
+ case 16: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
280
+ case 17: throw _d.sent();
281
+ case 18:
282
+ parsedBody = parsedOutput.body;
283
+ throwDefaultError({
284
+ output: output,
285
+ parsedBody: parsedBody,
286
+ exceptionCtor: __BaseException,
287
+ errorCode: errorCode,
288
+ });
289
+ _d.label = 19;
290
+ case 19: return [2];
291
+ }
292
+ });
293
+ }); };
294
+ export var deserializeAws_json1_1DeleteServiceQuotaIncreaseRequestFromTemplateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
295
+ var data, contents, response;
296
+ return __generator(this, function (_a) {
297
+ switch (_a.label) {
298
+ case 0:
299
+ if (output.statusCode >= 300) {
300
+ return [2, deserializeAws_json1_1DeleteServiceQuotaIncreaseRequestFromTemplateCommandError(output, context)];
301
+ }
302
+ return [4, parseBody(output.body, context)];
303
+ case 1:
304
+ data = _a.sent();
305
+ contents = {};
306
+ contents = deserializeAws_json1_1DeleteServiceQuotaIncreaseRequestFromTemplateResponse(data, context);
307
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
308
+ return [2, Promise.resolve(response)];
309
+ }
310
+ });
311
+ }); };
312
+ var deserializeAws_json1_1DeleteServiceQuotaIncreaseRequestFromTemplateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
313
+ var parsedOutput, _a, errorCode, _b, parsedBody;
314
+ var _c;
315
+ return __generator(this, function (_d) {
316
+ switch (_d.label) {
317
+ case 0:
318
+ _a = [__assign({}, output)];
319
+ _c = {};
320
+ return [4, parseErrorBody(output.body, context)];
321
+ case 1:
322
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
323
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
324
+ _b = errorCode;
325
+ switch (_b) {
326
+ case "AWSServiceAccessNotEnabledException": return [3, 2];
327
+ case "com.amazonaws.servicequotas#AWSServiceAccessNotEnabledException": return [3, 2];
328
+ case "AccessDeniedException": return [3, 4];
329
+ case "com.amazonaws.servicequotas#AccessDeniedException": return [3, 4];
330
+ case "DependencyAccessDeniedException": return [3, 6];
331
+ case "com.amazonaws.servicequotas#DependencyAccessDeniedException": return [3, 6];
332
+ case "IllegalArgumentException": return [3, 8];
333
+ case "com.amazonaws.servicequotas#IllegalArgumentException": return [3, 8];
334
+ case "NoAvailableOrganizationException": return [3, 10];
335
+ case "com.amazonaws.servicequotas#NoAvailableOrganizationException": return [3, 10];
336
+ case "NoSuchResourceException": return [3, 12];
337
+ case "com.amazonaws.servicequotas#NoSuchResourceException": return [3, 12];
338
+ case "ServiceException": return [3, 14];
339
+ case "com.amazonaws.servicequotas#ServiceException": return [3, 14];
340
+ case "TemplatesNotAvailableInRegionException": return [3, 16];
341
+ case "com.amazonaws.servicequotas#TemplatesNotAvailableInRegionException": return [3, 16];
342
+ case "TooManyRequestsException": return [3, 18];
343
+ case "com.amazonaws.servicequotas#TooManyRequestsException": return [3, 18];
344
+ }
345
+ return [3, 20];
346
+ case 2: return [4, deserializeAws_json1_1AWSServiceAccessNotEnabledExceptionResponse(parsedOutput, context)];
347
+ case 3: throw _d.sent();
348
+ case 4: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
349
+ case 5: throw _d.sent();
350
+ case 6: return [4, deserializeAws_json1_1DependencyAccessDeniedExceptionResponse(parsedOutput, context)];
351
+ case 7: throw _d.sent();
352
+ case 8: return [4, deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context)];
353
+ case 9: throw _d.sent();
354
+ case 10: return [4, deserializeAws_json1_1NoAvailableOrganizationExceptionResponse(parsedOutput, context)];
355
+ case 11: throw _d.sent();
356
+ case 12: return [4, deserializeAws_json1_1NoSuchResourceExceptionResponse(parsedOutput, context)];
357
+ case 13: throw _d.sent();
358
+ case 14: return [4, deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context)];
359
+ case 15: throw _d.sent();
360
+ case 16: return [4, deserializeAws_json1_1TemplatesNotAvailableInRegionExceptionResponse(parsedOutput, context)];
361
+ case 17: throw _d.sent();
362
+ case 18: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
363
+ case 19: throw _d.sent();
364
+ case 20:
365
+ parsedBody = parsedOutput.body;
366
+ throwDefaultError({
367
+ output: output,
368
+ parsedBody: parsedBody,
369
+ exceptionCtor: __BaseException,
370
+ errorCode: errorCode,
371
+ });
372
+ _d.label = 21;
373
+ case 21: return [2];
374
+ }
375
+ });
376
+ }); };
377
+ export var deserializeAws_json1_1DisassociateServiceQuotaTemplateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
378
+ var data, contents, response;
379
+ return __generator(this, function (_a) {
380
+ switch (_a.label) {
381
+ case 0:
382
+ if (output.statusCode >= 300) {
383
+ return [2, deserializeAws_json1_1DisassociateServiceQuotaTemplateCommandError(output, context)];
384
+ }
385
+ return [4, parseBody(output.body, context)];
386
+ case 1:
387
+ data = _a.sent();
388
+ contents = {};
389
+ contents = deserializeAws_json1_1DisassociateServiceQuotaTemplateResponse(data, context);
390
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
391
+ return [2, Promise.resolve(response)];
392
+ }
393
+ });
394
+ }); };
395
+ var deserializeAws_json1_1DisassociateServiceQuotaTemplateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
396
+ var parsedOutput, _a, errorCode, _b, parsedBody;
397
+ var _c;
398
+ return __generator(this, function (_d) {
399
+ switch (_d.label) {
400
+ case 0:
401
+ _a = [__assign({}, output)];
402
+ _c = {};
403
+ return [4, parseErrorBody(output.body, context)];
404
+ case 1:
405
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
406
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
407
+ _b = errorCode;
408
+ switch (_b) {
409
+ case "AWSServiceAccessNotEnabledException": return [3, 2];
410
+ case "com.amazonaws.servicequotas#AWSServiceAccessNotEnabledException": return [3, 2];
411
+ case "AccessDeniedException": return [3, 4];
412
+ case "com.amazonaws.servicequotas#AccessDeniedException": return [3, 4];
413
+ case "DependencyAccessDeniedException": return [3, 6];
414
+ case "com.amazonaws.servicequotas#DependencyAccessDeniedException": return [3, 6];
415
+ case "NoAvailableOrganizationException": return [3, 8];
416
+ case "com.amazonaws.servicequotas#NoAvailableOrganizationException": return [3, 8];
417
+ case "ServiceException": return [3, 10];
418
+ case "com.amazonaws.servicequotas#ServiceException": return [3, 10];
419
+ case "ServiceQuotaTemplateNotInUseException": return [3, 12];
420
+ case "com.amazonaws.servicequotas#ServiceQuotaTemplateNotInUseException": return [3, 12];
421
+ case "TemplatesNotAvailableInRegionException": return [3, 14];
422
+ case "com.amazonaws.servicequotas#TemplatesNotAvailableInRegionException": return [3, 14];
423
+ case "TooManyRequestsException": return [3, 16];
424
+ case "com.amazonaws.servicequotas#TooManyRequestsException": return [3, 16];
425
+ }
426
+ return [3, 18];
427
+ case 2: return [4, deserializeAws_json1_1AWSServiceAccessNotEnabledExceptionResponse(parsedOutput, context)];
428
+ case 3: throw _d.sent();
429
+ case 4: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
430
+ case 5: throw _d.sent();
431
+ case 6: return [4, deserializeAws_json1_1DependencyAccessDeniedExceptionResponse(parsedOutput, context)];
432
+ case 7: throw _d.sent();
433
+ case 8: return [4, deserializeAws_json1_1NoAvailableOrganizationExceptionResponse(parsedOutput, context)];
434
+ case 9: throw _d.sent();
435
+ case 10: return [4, deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context)];
436
+ case 11: throw _d.sent();
437
+ case 12: return [4, deserializeAws_json1_1ServiceQuotaTemplateNotInUseExceptionResponse(parsedOutput, context)];
438
+ case 13: throw _d.sent();
439
+ case 14: return [4, deserializeAws_json1_1TemplatesNotAvailableInRegionExceptionResponse(parsedOutput, context)];
440
+ case 15: throw _d.sent();
441
+ case 16: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
442
+ case 17: throw _d.sent();
443
+ case 18:
444
+ parsedBody = parsedOutput.body;
445
+ throwDefaultError({
446
+ output: output,
447
+ parsedBody: parsedBody,
448
+ exceptionCtor: __BaseException,
449
+ errorCode: errorCode,
450
+ });
451
+ _d.label = 19;
452
+ case 19: return [2];
453
+ }
454
+ });
455
+ }); };
456
+ export var deserializeAws_json1_1GetAssociationForServiceQuotaTemplateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
457
+ var data, contents, response;
458
+ return __generator(this, function (_a) {
459
+ switch (_a.label) {
460
+ case 0:
461
+ if (output.statusCode >= 300) {
462
+ return [2, deserializeAws_json1_1GetAssociationForServiceQuotaTemplateCommandError(output, context)];
463
+ }
464
+ return [4, parseBody(output.body, context)];
465
+ case 1:
466
+ data = _a.sent();
467
+ contents = {};
468
+ contents = deserializeAws_json1_1GetAssociationForServiceQuotaTemplateResponse(data, context);
469
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
470
+ return [2, Promise.resolve(response)];
471
+ }
472
+ });
473
+ }); };
474
+ var deserializeAws_json1_1GetAssociationForServiceQuotaTemplateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
475
+ var parsedOutput, _a, errorCode, _b, parsedBody;
476
+ var _c;
477
+ return __generator(this, function (_d) {
478
+ switch (_d.label) {
479
+ case 0:
480
+ _a = [__assign({}, output)];
481
+ _c = {};
482
+ return [4, parseErrorBody(output.body, context)];
483
+ case 1:
484
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
485
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
486
+ _b = errorCode;
487
+ switch (_b) {
488
+ case "AWSServiceAccessNotEnabledException": return [3, 2];
489
+ case "com.amazonaws.servicequotas#AWSServiceAccessNotEnabledException": return [3, 2];
490
+ case "AccessDeniedException": return [3, 4];
491
+ case "com.amazonaws.servicequotas#AccessDeniedException": return [3, 4];
492
+ case "DependencyAccessDeniedException": return [3, 6];
493
+ case "com.amazonaws.servicequotas#DependencyAccessDeniedException": return [3, 6];
494
+ case "NoAvailableOrganizationException": return [3, 8];
495
+ case "com.amazonaws.servicequotas#NoAvailableOrganizationException": return [3, 8];
496
+ case "ServiceException": return [3, 10];
497
+ case "com.amazonaws.servicequotas#ServiceException": return [3, 10];
498
+ case "ServiceQuotaTemplateNotInUseException": return [3, 12];
499
+ case "com.amazonaws.servicequotas#ServiceQuotaTemplateNotInUseException": return [3, 12];
500
+ case "TemplatesNotAvailableInRegionException": return [3, 14];
501
+ case "com.amazonaws.servicequotas#TemplatesNotAvailableInRegionException": return [3, 14];
502
+ case "TooManyRequestsException": return [3, 16];
503
+ case "com.amazonaws.servicequotas#TooManyRequestsException": return [3, 16];
504
+ }
505
+ return [3, 18];
506
+ case 2: return [4, deserializeAws_json1_1AWSServiceAccessNotEnabledExceptionResponse(parsedOutput, context)];
507
+ case 3: throw _d.sent();
508
+ case 4: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
509
+ case 5: throw _d.sent();
510
+ case 6: return [4, deserializeAws_json1_1DependencyAccessDeniedExceptionResponse(parsedOutput, context)];
511
+ case 7: throw _d.sent();
512
+ case 8: return [4, deserializeAws_json1_1NoAvailableOrganizationExceptionResponse(parsedOutput, context)];
513
+ case 9: throw _d.sent();
514
+ case 10: return [4, deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context)];
515
+ case 11: throw _d.sent();
516
+ case 12: return [4, deserializeAws_json1_1ServiceQuotaTemplateNotInUseExceptionResponse(parsedOutput, context)];
517
+ case 13: throw _d.sent();
518
+ case 14: return [4, deserializeAws_json1_1TemplatesNotAvailableInRegionExceptionResponse(parsedOutput, context)];
519
+ case 15: throw _d.sent();
520
+ case 16: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
521
+ case 17: throw _d.sent();
522
+ case 18:
523
+ parsedBody = parsedOutput.body;
524
+ throwDefaultError({
525
+ output: output,
526
+ parsedBody: parsedBody,
527
+ exceptionCtor: __BaseException,
528
+ errorCode: errorCode,
529
+ });
530
+ _d.label = 19;
531
+ case 19: return [2];
532
+ }
533
+ });
534
+ }); };
535
+ export var deserializeAws_json1_1GetAWSDefaultServiceQuotaCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
536
+ var data, contents, response;
537
+ return __generator(this, function (_a) {
538
+ switch (_a.label) {
539
+ case 0:
540
+ if (output.statusCode >= 300) {
541
+ return [2, deserializeAws_json1_1GetAWSDefaultServiceQuotaCommandError(output, context)];
542
+ }
543
+ return [4, parseBody(output.body, context)];
544
+ case 1:
545
+ data = _a.sent();
546
+ contents = {};
547
+ contents = deserializeAws_json1_1GetAWSDefaultServiceQuotaResponse(data, context);
548
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
549
+ return [2, Promise.resolve(response)];
550
+ }
551
+ });
552
+ }); };
553
+ var deserializeAws_json1_1GetAWSDefaultServiceQuotaCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
554
+ var parsedOutput, _a, errorCode, _b, parsedBody;
555
+ var _c;
556
+ return __generator(this, function (_d) {
557
+ switch (_d.label) {
558
+ case 0:
559
+ _a = [__assign({}, output)];
560
+ _c = {};
561
+ return [4, parseErrorBody(output.body, context)];
562
+ case 1:
563
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
564
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
565
+ _b = errorCode;
566
+ switch (_b) {
567
+ case "AccessDeniedException": return [3, 2];
568
+ case "com.amazonaws.servicequotas#AccessDeniedException": return [3, 2];
569
+ case "IllegalArgumentException": return [3, 4];
570
+ case "com.amazonaws.servicequotas#IllegalArgumentException": return [3, 4];
571
+ case "NoSuchResourceException": return [3, 6];
572
+ case "com.amazonaws.servicequotas#NoSuchResourceException": return [3, 6];
573
+ case "ServiceException": return [3, 8];
574
+ case "com.amazonaws.servicequotas#ServiceException": return [3, 8];
575
+ case "TooManyRequestsException": return [3, 10];
576
+ case "com.amazonaws.servicequotas#TooManyRequestsException": return [3, 10];
577
+ }
578
+ return [3, 12];
579
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
580
+ case 3: throw _d.sent();
581
+ case 4: return [4, deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context)];
582
+ case 5: throw _d.sent();
583
+ case 6: return [4, deserializeAws_json1_1NoSuchResourceExceptionResponse(parsedOutput, context)];
584
+ case 7: throw _d.sent();
585
+ case 8: return [4, deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context)];
586
+ case 9: throw _d.sent();
587
+ case 10: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
588
+ case 11: throw _d.sent();
589
+ case 12:
590
+ parsedBody = parsedOutput.body;
591
+ throwDefaultError({
592
+ output: output,
593
+ parsedBody: parsedBody,
594
+ exceptionCtor: __BaseException,
595
+ errorCode: errorCode,
596
+ });
597
+ _d.label = 13;
598
+ case 13: return [2];
599
+ }
600
+ });
601
+ }); };
602
+ export var deserializeAws_json1_1GetRequestedServiceQuotaChangeCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
603
+ var data, contents, response;
604
+ return __generator(this, function (_a) {
605
+ switch (_a.label) {
606
+ case 0:
607
+ if (output.statusCode >= 300) {
608
+ return [2, deserializeAws_json1_1GetRequestedServiceQuotaChangeCommandError(output, context)];
609
+ }
610
+ return [4, parseBody(output.body, context)];
611
+ case 1:
612
+ data = _a.sent();
613
+ contents = {};
614
+ contents = deserializeAws_json1_1GetRequestedServiceQuotaChangeResponse(data, context);
615
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
616
+ return [2, Promise.resolve(response)];
617
+ }
618
+ });
619
+ }); };
620
+ var deserializeAws_json1_1GetRequestedServiceQuotaChangeCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
621
+ var parsedOutput, _a, errorCode, _b, parsedBody;
622
+ var _c;
623
+ return __generator(this, function (_d) {
624
+ switch (_d.label) {
625
+ case 0:
626
+ _a = [__assign({}, output)];
627
+ _c = {};
628
+ return [4, parseErrorBody(output.body, context)];
629
+ case 1:
630
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
631
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
632
+ _b = errorCode;
633
+ switch (_b) {
634
+ case "AccessDeniedException": return [3, 2];
635
+ case "com.amazonaws.servicequotas#AccessDeniedException": return [3, 2];
636
+ case "IllegalArgumentException": return [3, 4];
637
+ case "com.amazonaws.servicequotas#IllegalArgumentException": return [3, 4];
638
+ case "NoSuchResourceException": return [3, 6];
639
+ case "com.amazonaws.servicequotas#NoSuchResourceException": return [3, 6];
640
+ case "ServiceException": return [3, 8];
641
+ case "com.amazonaws.servicequotas#ServiceException": return [3, 8];
642
+ case "TooManyRequestsException": return [3, 10];
643
+ case "com.amazonaws.servicequotas#TooManyRequestsException": return [3, 10];
644
+ }
645
+ return [3, 12];
646
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
647
+ case 3: throw _d.sent();
648
+ case 4: return [4, deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context)];
649
+ case 5: throw _d.sent();
650
+ case 6: return [4, deserializeAws_json1_1NoSuchResourceExceptionResponse(parsedOutput, context)];
651
+ case 7: throw _d.sent();
652
+ case 8: return [4, deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context)];
653
+ case 9: throw _d.sent();
654
+ case 10: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
655
+ case 11: throw _d.sent();
656
+ case 12:
657
+ parsedBody = parsedOutput.body;
658
+ throwDefaultError({
659
+ output: output,
660
+ parsedBody: parsedBody,
661
+ exceptionCtor: __BaseException,
662
+ errorCode: errorCode,
663
+ });
664
+ _d.label = 13;
665
+ case 13: return [2];
666
+ }
667
+ });
668
+ }); };
669
+ export var deserializeAws_json1_1GetServiceQuotaCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
670
+ var data, contents, response;
671
+ return __generator(this, function (_a) {
672
+ switch (_a.label) {
673
+ case 0:
674
+ if (output.statusCode >= 300) {
675
+ return [2, deserializeAws_json1_1GetServiceQuotaCommandError(output, context)];
676
+ }
677
+ return [4, parseBody(output.body, context)];
678
+ case 1:
679
+ data = _a.sent();
680
+ contents = {};
681
+ contents = deserializeAws_json1_1GetServiceQuotaResponse(data, context);
682
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
683
+ return [2, Promise.resolve(response)];
684
+ }
685
+ });
686
+ }); };
687
+ var deserializeAws_json1_1GetServiceQuotaCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
688
+ var parsedOutput, _a, errorCode, _b, parsedBody;
689
+ var _c;
690
+ return __generator(this, function (_d) {
691
+ switch (_d.label) {
692
+ case 0:
693
+ _a = [__assign({}, output)];
694
+ _c = {};
695
+ return [4, parseErrorBody(output.body, context)];
696
+ case 1:
697
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
698
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
699
+ _b = errorCode;
700
+ switch (_b) {
701
+ case "AccessDeniedException": return [3, 2];
702
+ case "com.amazonaws.servicequotas#AccessDeniedException": return [3, 2];
703
+ case "IllegalArgumentException": return [3, 4];
704
+ case "com.amazonaws.servicequotas#IllegalArgumentException": return [3, 4];
705
+ case "NoSuchResourceException": return [3, 6];
706
+ case "com.amazonaws.servicequotas#NoSuchResourceException": return [3, 6];
707
+ case "ServiceException": return [3, 8];
708
+ case "com.amazonaws.servicequotas#ServiceException": return [3, 8];
709
+ case "TooManyRequestsException": return [3, 10];
710
+ case "com.amazonaws.servicequotas#TooManyRequestsException": return [3, 10];
711
+ }
712
+ return [3, 12];
713
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
714
+ case 3: throw _d.sent();
715
+ case 4: return [4, deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context)];
716
+ case 5: throw _d.sent();
717
+ case 6: return [4, deserializeAws_json1_1NoSuchResourceExceptionResponse(parsedOutput, context)];
718
+ case 7: throw _d.sent();
719
+ case 8: return [4, deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context)];
720
+ case 9: throw _d.sent();
721
+ case 10: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
722
+ case 11: throw _d.sent();
723
+ case 12:
724
+ parsedBody = parsedOutput.body;
725
+ throwDefaultError({
726
+ output: output,
727
+ parsedBody: parsedBody,
728
+ exceptionCtor: __BaseException,
729
+ errorCode: errorCode,
730
+ });
731
+ _d.label = 13;
732
+ case 13: return [2];
733
+ }
734
+ });
735
+ }); };
736
+ export var deserializeAws_json1_1GetServiceQuotaIncreaseRequestFromTemplateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
737
+ var data, contents, response;
738
+ return __generator(this, function (_a) {
739
+ switch (_a.label) {
740
+ case 0:
741
+ if (output.statusCode >= 300) {
742
+ return [2, deserializeAws_json1_1GetServiceQuotaIncreaseRequestFromTemplateCommandError(output, context)];
743
+ }
744
+ return [4, parseBody(output.body, context)];
745
+ case 1:
746
+ data = _a.sent();
747
+ contents = {};
748
+ contents = deserializeAws_json1_1GetServiceQuotaIncreaseRequestFromTemplateResponse(data, context);
749
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
750
+ return [2, Promise.resolve(response)];
751
+ }
752
+ });
753
+ }); };
754
+ var deserializeAws_json1_1GetServiceQuotaIncreaseRequestFromTemplateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
755
+ var parsedOutput, _a, errorCode, _b, parsedBody;
756
+ var _c;
757
+ return __generator(this, function (_d) {
758
+ switch (_d.label) {
759
+ case 0:
760
+ _a = [__assign({}, output)];
761
+ _c = {};
762
+ return [4, parseErrorBody(output.body, context)];
763
+ case 1:
764
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
765
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
766
+ _b = errorCode;
767
+ switch (_b) {
768
+ case "AWSServiceAccessNotEnabledException": return [3, 2];
769
+ case "com.amazonaws.servicequotas#AWSServiceAccessNotEnabledException": return [3, 2];
770
+ case "AccessDeniedException": return [3, 4];
771
+ case "com.amazonaws.servicequotas#AccessDeniedException": return [3, 4];
772
+ case "DependencyAccessDeniedException": return [3, 6];
773
+ case "com.amazonaws.servicequotas#DependencyAccessDeniedException": return [3, 6];
774
+ case "IllegalArgumentException": return [3, 8];
775
+ case "com.amazonaws.servicequotas#IllegalArgumentException": return [3, 8];
776
+ case "NoAvailableOrganizationException": return [3, 10];
777
+ case "com.amazonaws.servicequotas#NoAvailableOrganizationException": return [3, 10];
778
+ case "NoSuchResourceException": return [3, 12];
779
+ case "com.amazonaws.servicequotas#NoSuchResourceException": return [3, 12];
780
+ case "ServiceException": return [3, 14];
781
+ case "com.amazonaws.servicequotas#ServiceException": return [3, 14];
782
+ case "TemplatesNotAvailableInRegionException": return [3, 16];
783
+ case "com.amazonaws.servicequotas#TemplatesNotAvailableInRegionException": return [3, 16];
784
+ case "TooManyRequestsException": return [3, 18];
785
+ case "com.amazonaws.servicequotas#TooManyRequestsException": return [3, 18];
786
+ }
787
+ return [3, 20];
788
+ case 2: return [4, deserializeAws_json1_1AWSServiceAccessNotEnabledExceptionResponse(parsedOutput, context)];
789
+ case 3: throw _d.sent();
790
+ case 4: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
791
+ case 5: throw _d.sent();
792
+ case 6: return [4, deserializeAws_json1_1DependencyAccessDeniedExceptionResponse(parsedOutput, context)];
793
+ case 7: throw _d.sent();
794
+ case 8: return [4, deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context)];
795
+ case 9: throw _d.sent();
796
+ case 10: return [4, deserializeAws_json1_1NoAvailableOrganizationExceptionResponse(parsedOutput, context)];
797
+ case 11: throw _d.sent();
798
+ case 12: return [4, deserializeAws_json1_1NoSuchResourceExceptionResponse(parsedOutput, context)];
799
+ case 13: throw _d.sent();
800
+ case 14: return [4, deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context)];
801
+ case 15: throw _d.sent();
802
+ case 16: return [4, deserializeAws_json1_1TemplatesNotAvailableInRegionExceptionResponse(parsedOutput, context)];
803
+ case 17: throw _d.sent();
804
+ case 18: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
805
+ case 19: throw _d.sent();
806
+ case 20:
807
+ parsedBody = parsedOutput.body;
808
+ throwDefaultError({
809
+ output: output,
810
+ parsedBody: parsedBody,
811
+ exceptionCtor: __BaseException,
812
+ errorCode: errorCode,
813
+ });
814
+ _d.label = 21;
815
+ case 21: return [2];
816
+ }
817
+ });
818
+ }); };
819
+ export var deserializeAws_json1_1ListAWSDefaultServiceQuotasCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
820
+ var data, contents, response;
821
+ return __generator(this, function (_a) {
822
+ switch (_a.label) {
823
+ case 0:
824
+ if (output.statusCode >= 300) {
825
+ return [2, deserializeAws_json1_1ListAWSDefaultServiceQuotasCommandError(output, context)];
826
+ }
827
+ return [4, parseBody(output.body, context)];
828
+ case 1:
829
+ data = _a.sent();
830
+ contents = {};
831
+ contents = deserializeAws_json1_1ListAWSDefaultServiceQuotasResponse(data, context);
832
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
833
+ return [2, Promise.resolve(response)];
834
+ }
835
+ });
836
+ }); };
837
+ var deserializeAws_json1_1ListAWSDefaultServiceQuotasCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
838
+ var parsedOutput, _a, errorCode, _b, parsedBody;
839
+ var _c;
840
+ return __generator(this, function (_d) {
841
+ switch (_d.label) {
842
+ case 0:
843
+ _a = [__assign({}, output)];
844
+ _c = {};
845
+ return [4, parseErrorBody(output.body, context)];
846
+ case 1:
847
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
848
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
849
+ _b = errorCode;
850
+ switch (_b) {
851
+ case "AccessDeniedException": return [3, 2];
852
+ case "com.amazonaws.servicequotas#AccessDeniedException": return [3, 2];
853
+ case "IllegalArgumentException": return [3, 4];
854
+ case "com.amazonaws.servicequotas#IllegalArgumentException": return [3, 4];
855
+ case "InvalidPaginationTokenException": return [3, 6];
856
+ case "com.amazonaws.servicequotas#InvalidPaginationTokenException": return [3, 6];
857
+ case "NoSuchResourceException": return [3, 8];
858
+ case "com.amazonaws.servicequotas#NoSuchResourceException": return [3, 8];
859
+ case "ServiceException": return [3, 10];
860
+ case "com.amazonaws.servicequotas#ServiceException": return [3, 10];
861
+ case "TooManyRequestsException": return [3, 12];
862
+ case "com.amazonaws.servicequotas#TooManyRequestsException": return [3, 12];
863
+ }
864
+ return [3, 14];
865
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
866
+ case 3: throw _d.sent();
867
+ case 4: return [4, deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context)];
868
+ case 5: throw _d.sent();
869
+ case 6: return [4, deserializeAws_json1_1InvalidPaginationTokenExceptionResponse(parsedOutput, context)];
870
+ case 7: throw _d.sent();
871
+ case 8: return [4, deserializeAws_json1_1NoSuchResourceExceptionResponse(parsedOutput, context)];
872
+ case 9: throw _d.sent();
873
+ case 10: return [4, deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context)];
874
+ case 11: throw _d.sent();
875
+ case 12: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
876
+ case 13: throw _d.sent();
877
+ case 14:
878
+ parsedBody = parsedOutput.body;
879
+ throwDefaultError({
880
+ output: output,
881
+ parsedBody: parsedBody,
882
+ exceptionCtor: __BaseException,
883
+ errorCode: errorCode,
884
+ });
885
+ _d.label = 15;
886
+ case 15: return [2];
887
+ }
888
+ });
889
+ }); };
890
+ export var deserializeAws_json1_1ListRequestedServiceQuotaChangeHistoryCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
891
+ var data, contents, response;
892
+ return __generator(this, function (_a) {
893
+ switch (_a.label) {
894
+ case 0:
895
+ if (output.statusCode >= 300) {
896
+ return [2, deserializeAws_json1_1ListRequestedServiceQuotaChangeHistoryCommandError(output, context)];
897
+ }
898
+ return [4, parseBody(output.body, context)];
899
+ case 1:
900
+ data = _a.sent();
901
+ contents = {};
902
+ contents = deserializeAws_json1_1ListRequestedServiceQuotaChangeHistoryResponse(data, context);
903
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
904
+ return [2, Promise.resolve(response)];
905
+ }
906
+ });
907
+ }); };
908
+ var deserializeAws_json1_1ListRequestedServiceQuotaChangeHistoryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
909
+ var parsedOutput, _a, errorCode, _b, parsedBody;
910
+ var _c;
911
+ return __generator(this, function (_d) {
912
+ switch (_d.label) {
913
+ case 0:
914
+ _a = [__assign({}, output)];
915
+ _c = {};
916
+ return [4, parseErrorBody(output.body, context)];
917
+ case 1:
918
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
919
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
920
+ _b = errorCode;
921
+ switch (_b) {
922
+ case "AccessDeniedException": return [3, 2];
923
+ case "com.amazonaws.servicequotas#AccessDeniedException": return [3, 2];
924
+ case "IllegalArgumentException": return [3, 4];
925
+ case "com.amazonaws.servicequotas#IllegalArgumentException": return [3, 4];
926
+ case "InvalidPaginationTokenException": return [3, 6];
927
+ case "com.amazonaws.servicequotas#InvalidPaginationTokenException": return [3, 6];
928
+ case "NoSuchResourceException": return [3, 8];
929
+ case "com.amazonaws.servicequotas#NoSuchResourceException": return [3, 8];
930
+ case "ServiceException": return [3, 10];
931
+ case "com.amazonaws.servicequotas#ServiceException": return [3, 10];
932
+ case "TooManyRequestsException": return [3, 12];
933
+ case "com.amazonaws.servicequotas#TooManyRequestsException": return [3, 12];
934
+ }
935
+ return [3, 14];
936
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
937
+ case 3: throw _d.sent();
938
+ case 4: return [4, deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context)];
939
+ case 5: throw _d.sent();
940
+ case 6: return [4, deserializeAws_json1_1InvalidPaginationTokenExceptionResponse(parsedOutput, context)];
941
+ case 7: throw _d.sent();
942
+ case 8: return [4, deserializeAws_json1_1NoSuchResourceExceptionResponse(parsedOutput, context)];
943
+ case 9: throw _d.sent();
944
+ case 10: return [4, deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context)];
945
+ case 11: throw _d.sent();
946
+ case 12: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
947
+ case 13: throw _d.sent();
948
+ case 14:
949
+ parsedBody = parsedOutput.body;
950
+ throwDefaultError({
951
+ output: output,
952
+ parsedBody: parsedBody,
953
+ exceptionCtor: __BaseException,
954
+ errorCode: errorCode,
955
+ });
956
+ _d.label = 15;
957
+ case 15: return [2];
958
+ }
959
+ });
960
+ }); };
961
+ export var deserializeAws_json1_1ListRequestedServiceQuotaChangeHistoryByQuotaCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
962
+ var data, contents, response;
963
+ return __generator(this, function (_a) {
964
+ switch (_a.label) {
965
+ case 0:
966
+ if (output.statusCode >= 300) {
967
+ return [2, deserializeAws_json1_1ListRequestedServiceQuotaChangeHistoryByQuotaCommandError(output, context)];
968
+ }
969
+ return [4, parseBody(output.body, context)];
970
+ case 1:
971
+ data = _a.sent();
972
+ contents = {};
973
+ contents = deserializeAws_json1_1ListRequestedServiceQuotaChangeHistoryByQuotaResponse(data, context);
974
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
975
+ return [2, Promise.resolve(response)];
976
+ }
977
+ });
978
+ }); };
979
+ var deserializeAws_json1_1ListRequestedServiceQuotaChangeHistoryByQuotaCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
980
+ var parsedOutput, _a, errorCode, _b, parsedBody;
981
+ var _c;
982
+ return __generator(this, function (_d) {
983
+ switch (_d.label) {
984
+ case 0:
985
+ _a = [__assign({}, output)];
986
+ _c = {};
987
+ return [4, parseErrorBody(output.body, context)];
988
+ case 1:
989
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
990
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
991
+ _b = errorCode;
992
+ switch (_b) {
993
+ case "AccessDeniedException": return [3, 2];
994
+ case "com.amazonaws.servicequotas#AccessDeniedException": return [3, 2];
995
+ case "IllegalArgumentException": return [3, 4];
996
+ case "com.amazonaws.servicequotas#IllegalArgumentException": return [3, 4];
997
+ case "InvalidPaginationTokenException": return [3, 6];
998
+ case "com.amazonaws.servicequotas#InvalidPaginationTokenException": return [3, 6];
999
+ case "NoSuchResourceException": return [3, 8];
1000
+ case "com.amazonaws.servicequotas#NoSuchResourceException": return [3, 8];
1001
+ case "ServiceException": return [3, 10];
1002
+ case "com.amazonaws.servicequotas#ServiceException": return [3, 10];
1003
+ case "TooManyRequestsException": return [3, 12];
1004
+ case "com.amazonaws.servicequotas#TooManyRequestsException": return [3, 12];
1005
+ }
1006
+ return [3, 14];
1007
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1008
+ case 3: throw _d.sent();
1009
+ case 4: return [4, deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context)];
1010
+ case 5: throw _d.sent();
1011
+ case 6: return [4, deserializeAws_json1_1InvalidPaginationTokenExceptionResponse(parsedOutput, context)];
1012
+ case 7: throw _d.sent();
1013
+ case 8: return [4, deserializeAws_json1_1NoSuchResourceExceptionResponse(parsedOutput, context)];
1014
+ case 9: throw _d.sent();
1015
+ case 10: return [4, deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context)];
1016
+ case 11: throw _d.sent();
1017
+ case 12: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
1018
+ case 13: throw _d.sent();
1019
+ case 14:
1020
+ parsedBody = parsedOutput.body;
1021
+ throwDefaultError({
1022
+ output: output,
1023
+ parsedBody: parsedBody,
1024
+ exceptionCtor: __BaseException,
1025
+ errorCode: errorCode,
1026
+ });
1027
+ _d.label = 15;
1028
+ case 15: return [2];
1029
+ }
1030
+ });
1031
+ }); };
1032
+ export var deserializeAws_json1_1ListServiceQuotaIncreaseRequestsInTemplateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1033
+ var data, contents, response;
1034
+ return __generator(this, function (_a) {
1035
+ switch (_a.label) {
1036
+ case 0:
1037
+ if (output.statusCode >= 300) {
1038
+ return [2, deserializeAws_json1_1ListServiceQuotaIncreaseRequestsInTemplateCommandError(output, context)];
1039
+ }
1040
+ return [4, parseBody(output.body, context)];
1041
+ case 1:
1042
+ data = _a.sent();
1043
+ contents = {};
1044
+ contents = deserializeAws_json1_1ListServiceQuotaIncreaseRequestsInTemplateResponse(data, context);
1045
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1046
+ return [2, Promise.resolve(response)];
1047
+ }
1048
+ });
1049
+ }); };
1050
+ var deserializeAws_json1_1ListServiceQuotaIncreaseRequestsInTemplateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1051
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1052
+ var _c;
1053
+ return __generator(this, function (_d) {
1054
+ switch (_d.label) {
1055
+ case 0:
1056
+ _a = [__assign({}, output)];
1057
+ _c = {};
1058
+ return [4, parseErrorBody(output.body, context)];
1059
+ case 1:
1060
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1061
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1062
+ _b = errorCode;
1063
+ switch (_b) {
1064
+ case "AWSServiceAccessNotEnabledException": return [3, 2];
1065
+ case "com.amazonaws.servicequotas#AWSServiceAccessNotEnabledException": return [3, 2];
1066
+ case "AccessDeniedException": return [3, 4];
1067
+ case "com.amazonaws.servicequotas#AccessDeniedException": return [3, 4];
1068
+ case "DependencyAccessDeniedException": return [3, 6];
1069
+ case "com.amazonaws.servicequotas#DependencyAccessDeniedException": return [3, 6];
1070
+ case "IllegalArgumentException": return [3, 8];
1071
+ case "com.amazonaws.servicequotas#IllegalArgumentException": return [3, 8];
1072
+ case "NoAvailableOrganizationException": return [3, 10];
1073
+ case "com.amazonaws.servicequotas#NoAvailableOrganizationException": return [3, 10];
1074
+ case "ServiceException": return [3, 12];
1075
+ case "com.amazonaws.servicequotas#ServiceException": return [3, 12];
1076
+ case "TemplatesNotAvailableInRegionException": return [3, 14];
1077
+ case "com.amazonaws.servicequotas#TemplatesNotAvailableInRegionException": return [3, 14];
1078
+ case "TooManyRequestsException": return [3, 16];
1079
+ case "com.amazonaws.servicequotas#TooManyRequestsException": return [3, 16];
1080
+ }
1081
+ return [3, 18];
1082
+ case 2: return [4, deserializeAws_json1_1AWSServiceAccessNotEnabledExceptionResponse(parsedOutput, context)];
1083
+ case 3: throw _d.sent();
1084
+ case 4: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1085
+ case 5: throw _d.sent();
1086
+ case 6: return [4, deserializeAws_json1_1DependencyAccessDeniedExceptionResponse(parsedOutput, context)];
1087
+ case 7: throw _d.sent();
1088
+ case 8: return [4, deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context)];
1089
+ case 9: throw _d.sent();
1090
+ case 10: return [4, deserializeAws_json1_1NoAvailableOrganizationExceptionResponse(parsedOutput, context)];
1091
+ case 11: throw _d.sent();
1092
+ case 12: return [4, deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context)];
1093
+ case 13: throw _d.sent();
1094
+ case 14: return [4, deserializeAws_json1_1TemplatesNotAvailableInRegionExceptionResponse(parsedOutput, context)];
1095
+ case 15: throw _d.sent();
1096
+ case 16: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
1097
+ case 17: throw _d.sent();
1098
+ case 18:
1099
+ parsedBody = parsedOutput.body;
1100
+ throwDefaultError({
1101
+ output: output,
1102
+ parsedBody: parsedBody,
1103
+ exceptionCtor: __BaseException,
1104
+ errorCode: errorCode,
1105
+ });
1106
+ _d.label = 19;
1107
+ case 19: return [2];
1108
+ }
1109
+ });
1110
+ }); };
1111
+ export var deserializeAws_json1_1ListServiceQuotasCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1112
+ var data, contents, response;
1113
+ return __generator(this, function (_a) {
1114
+ switch (_a.label) {
1115
+ case 0:
1116
+ if (output.statusCode >= 300) {
1117
+ return [2, deserializeAws_json1_1ListServiceQuotasCommandError(output, context)];
1118
+ }
1119
+ return [4, parseBody(output.body, context)];
1120
+ case 1:
1121
+ data = _a.sent();
1122
+ contents = {};
1123
+ contents = deserializeAws_json1_1ListServiceQuotasResponse(data, context);
1124
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1125
+ return [2, Promise.resolve(response)];
1126
+ }
1127
+ });
1128
+ }); };
1129
+ var deserializeAws_json1_1ListServiceQuotasCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1130
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1131
+ var _c;
1132
+ return __generator(this, function (_d) {
1133
+ switch (_d.label) {
1134
+ case 0:
1135
+ _a = [__assign({}, output)];
1136
+ _c = {};
1137
+ return [4, parseErrorBody(output.body, context)];
1138
+ case 1:
1139
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1140
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1141
+ _b = errorCode;
1142
+ switch (_b) {
1143
+ case "AccessDeniedException": return [3, 2];
1144
+ case "com.amazonaws.servicequotas#AccessDeniedException": return [3, 2];
1145
+ case "IllegalArgumentException": return [3, 4];
1146
+ case "com.amazonaws.servicequotas#IllegalArgumentException": return [3, 4];
1147
+ case "InvalidPaginationTokenException": return [3, 6];
1148
+ case "com.amazonaws.servicequotas#InvalidPaginationTokenException": return [3, 6];
1149
+ case "NoSuchResourceException": return [3, 8];
1150
+ case "com.amazonaws.servicequotas#NoSuchResourceException": return [3, 8];
1151
+ case "ServiceException": return [3, 10];
1152
+ case "com.amazonaws.servicequotas#ServiceException": return [3, 10];
1153
+ case "TooManyRequestsException": return [3, 12];
1154
+ case "com.amazonaws.servicequotas#TooManyRequestsException": return [3, 12];
1155
+ }
1156
+ return [3, 14];
1157
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1158
+ case 3: throw _d.sent();
1159
+ case 4: return [4, deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context)];
1160
+ case 5: throw _d.sent();
1161
+ case 6: return [4, deserializeAws_json1_1InvalidPaginationTokenExceptionResponse(parsedOutput, context)];
1162
+ case 7: throw _d.sent();
1163
+ case 8: return [4, deserializeAws_json1_1NoSuchResourceExceptionResponse(parsedOutput, context)];
1164
+ case 9: throw _d.sent();
1165
+ case 10: return [4, deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context)];
1166
+ case 11: throw _d.sent();
1167
+ case 12: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
1168
+ case 13: throw _d.sent();
1169
+ case 14:
1170
+ parsedBody = parsedOutput.body;
1171
+ throwDefaultError({
1172
+ output: output,
1173
+ parsedBody: parsedBody,
1174
+ exceptionCtor: __BaseException,
1175
+ errorCode: errorCode,
1176
+ });
1177
+ _d.label = 15;
1178
+ case 15: return [2];
1179
+ }
1180
+ });
1181
+ }); };
1182
+ export var deserializeAws_json1_1ListServicesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1183
+ var data, contents, response;
1184
+ return __generator(this, function (_a) {
1185
+ switch (_a.label) {
1186
+ case 0:
1187
+ if (output.statusCode >= 300) {
1188
+ return [2, deserializeAws_json1_1ListServicesCommandError(output, context)];
1189
+ }
1190
+ return [4, parseBody(output.body, context)];
1191
+ case 1:
1192
+ data = _a.sent();
1193
+ contents = {};
1194
+ contents = deserializeAws_json1_1ListServicesResponse(data, context);
1195
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1196
+ return [2, Promise.resolve(response)];
1197
+ }
1198
+ });
1199
+ }); };
1200
+ var deserializeAws_json1_1ListServicesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1201
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1202
+ var _c;
1203
+ return __generator(this, function (_d) {
1204
+ switch (_d.label) {
1205
+ case 0:
1206
+ _a = [__assign({}, output)];
1207
+ _c = {};
1208
+ return [4, parseErrorBody(output.body, context)];
1209
+ case 1:
1210
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1211
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1212
+ _b = errorCode;
1213
+ switch (_b) {
1214
+ case "AccessDeniedException": return [3, 2];
1215
+ case "com.amazonaws.servicequotas#AccessDeniedException": return [3, 2];
1216
+ case "IllegalArgumentException": return [3, 4];
1217
+ case "com.amazonaws.servicequotas#IllegalArgumentException": return [3, 4];
1218
+ case "InvalidPaginationTokenException": return [3, 6];
1219
+ case "com.amazonaws.servicequotas#InvalidPaginationTokenException": return [3, 6];
1220
+ case "ServiceException": return [3, 8];
1221
+ case "com.amazonaws.servicequotas#ServiceException": return [3, 8];
1222
+ case "TooManyRequestsException": return [3, 10];
1223
+ case "com.amazonaws.servicequotas#TooManyRequestsException": return [3, 10];
1224
+ }
1225
+ return [3, 12];
1226
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1227
+ case 3: throw _d.sent();
1228
+ case 4: return [4, deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context)];
1229
+ case 5: throw _d.sent();
1230
+ case 6: return [4, deserializeAws_json1_1InvalidPaginationTokenExceptionResponse(parsedOutput, context)];
1231
+ case 7: throw _d.sent();
1232
+ case 8: return [4, deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context)];
1233
+ case 9: throw _d.sent();
1234
+ case 10: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
1235
+ case 11: throw _d.sent();
1236
+ case 12:
1237
+ parsedBody = parsedOutput.body;
1238
+ throwDefaultError({
1239
+ output: output,
1240
+ parsedBody: parsedBody,
1241
+ exceptionCtor: __BaseException,
1242
+ errorCode: errorCode,
1243
+ });
1244
+ _d.label = 13;
1245
+ case 13: return [2];
1246
+ }
1247
+ });
1248
+ }); };
1249
+ export var deserializeAws_json1_1ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1250
+ var data, contents, response;
1251
+ return __generator(this, function (_a) {
1252
+ switch (_a.label) {
1253
+ case 0:
1254
+ if (output.statusCode >= 300) {
1255
+ return [2, deserializeAws_json1_1ListTagsForResourceCommandError(output, context)];
1256
+ }
1257
+ return [4, parseBody(output.body, context)];
1258
+ case 1:
1259
+ data = _a.sent();
1260
+ contents = {};
1261
+ contents = deserializeAws_json1_1ListTagsForResourceResponse(data, context);
1262
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1263
+ return [2, Promise.resolve(response)];
1264
+ }
1265
+ });
1266
+ }); };
1267
+ var deserializeAws_json1_1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1268
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1269
+ var _c;
1270
+ return __generator(this, function (_d) {
1271
+ switch (_d.label) {
1272
+ case 0:
1273
+ _a = [__assign({}, output)];
1274
+ _c = {};
1275
+ return [4, parseErrorBody(output.body, context)];
1276
+ case 1:
1277
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1278
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1279
+ _b = errorCode;
1280
+ switch (_b) {
1281
+ case "AccessDeniedException": return [3, 2];
1282
+ case "com.amazonaws.servicequotas#AccessDeniedException": return [3, 2];
1283
+ case "IllegalArgumentException": return [3, 4];
1284
+ case "com.amazonaws.servicequotas#IllegalArgumentException": return [3, 4];
1285
+ case "NoSuchResourceException": return [3, 6];
1286
+ case "com.amazonaws.servicequotas#NoSuchResourceException": return [3, 6];
1287
+ case "ServiceException": return [3, 8];
1288
+ case "com.amazonaws.servicequotas#ServiceException": return [3, 8];
1289
+ case "TooManyRequestsException": return [3, 10];
1290
+ case "com.amazonaws.servicequotas#TooManyRequestsException": return [3, 10];
1291
+ }
1292
+ return [3, 12];
1293
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1294
+ case 3: throw _d.sent();
1295
+ case 4: return [4, deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context)];
1296
+ case 5: throw _d.sent();
1297
+ case 6: return [4, deserializeAws_json1_1NoSuchResourceExceptionResponse(parsedOutput, context)];
1298
+ case 7: throw _d.sent();
1299
+ case 8: return [4, deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context)];
1300
+ case 9: throw _d.sent();
1301
+ case 10: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
1302
+ case 11: throw _d.sent();
1303
+ case 12:
1304
+ parsedBody = parsedOutput.body;
1305
+ throwDefaultError({
1306
+ output: output,
1307
+ parsedBody: parsedBody,
1308
+ exceptionCtor: __BaseException,
1309
+ errorCode: errorCode,
1310
+ });
1311
+ _d.label = 13;
1312
+ case 13: return [2];
1313
+ }
1314
+ });
1315
+ }); };
1316
+ export var deserializeAws_json1_1PutServiceQuotaIncreaseRequestIntoTemplateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1317
+ var data, contents, response;
1318
+ return __generator(this, function (_a) {
1319
+ switch (_a.label) {
1320
+ case 0:
1321
+ if (output.statusCode >= 300) {
1322
+ return [2, deserializeAws_json1_1PutServiceQuotaIncreaseRequestIntoTemplateCommandError(output, context)];
1323
+ }
1324
+ return [4, parseBody(output.body, context)];
1325
+ case 1:
1326
+ data = _a.sent();
1327
+ contents = {};
1328
+ contents = deserializeAws_json1_1PutServiceQuotaIncreaseRequestIntoTemplateResponse(data, context);
1329
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1330
+ return [2, Promise.resolve(response)];
1331
+ }
1332
+ });
1333
+ }); };
1334
+ var deserializeAws_json1_1PutServiceQuotaIncreaseRequestIntoTemplateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1335
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1336
+ var _c;
1337
+ return __generator(this, function (_d) {
1338
+ switch (_d.label) {
1339
+ case 0:
1340
+ _a = [__assign({}, output)];
1341
+ _c = {};
1342
+ return [4, parseErrorBody(output.body, context)];
1343
+ case 1:
1344
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1345
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1346
+ _b = errorCode;
1347
+ switch (_b) {
1348
+ case "AWSServiceAccessNotEnabledException": return [3, 2];
1349
+ case "com.amazonaws.servicequotas#AWSServiceAccessNotEnabledException": return [3, 2];
1350
+ case "AccessDeniedException": return [3, 4];
1351
+ case "com.amazonaws.servicequotas#AccessDeniedException": return [3, 4];
1352
+ case "DependencyAccessDeniedException": return [3, 6];
1353
+ case "com.amazonaws.servicequotas#DependencyAccessDeniedException": return [3, 6];
1354
+ case "IllegalArgumentException": return [3, 8];
1355
+ case "com.amazonaws.servicequotas#IllegalArgumentException": return [3, 8];
1356
+ case "NoAvailableOrganizationException": return [3, 10];
1357
+ case "com.amazonaws.servicequotas#NoAvailableOrganizationException": return [3, 10];
1358
+ case "NoSuchResourceException": return [3, 12];
1359
+ case "com.amazonaws.servicequotas#NoSuchResourceException": return [3, 12];
1360
+ case "QuotaExceededException": return [3, 14];
1361
+ case "com.amazonaws.servicequotas#QuotaExceededException": return [3, 14];
1362
+ case "ServiceException": return [3, 16];
1363
+ case "com.amazonaws.servicequotas#ServiceException": return [3, 16];
1364
+ case "TemplatesNotAvailableInRegionException": return [3, 18];
1365
+ case "com.amazonaws.servicequotas#TemplatesNotAvailableInRegionException": return [3, 18];
1366
+ case "TooManyRequestsException": return [3, 20];
1367
+ case "com.amazonaws.servicequotas#TooManyRequestsException": return [3, 20];
1368
+ }
1369
+ return [3, 22];
1370
+ case 2: return [4, deserializeAws_json1_1AWSServiceAccessNotEnabledExceptionResponse(parsedOutput, context)];
1371
+ case 3: throw _d.sent();
1372
+ case 4: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1373
+ case 5: throw _d.sent();
1374
+ case 6: return [4, deserializeAws_json1_1DependencyAccessDeniedExceptionResponse(parsedOutput, context)];
1375
+ case 7: throw _d.sent();
1376
+ case 8: return [4, deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context)];
1377
+ case 9: throw _d.sent();
1378
+ case 10: return [4, deserializeAws_json1_1NoAvailableOrganizationExceptionResponse(parsedOutput, context)];
1379
+ case 11: throw _d.sent();
1380
+ case 12: return [4, deserializeAws_json1_1NoSuchResourceExceptionResponse(parsedOutput, context)];
1381
+ case 13: throw _d.sent();
1382
+ case 14: return [4, deserializeAws_json1_1QuotaExceededExceptionResponse(parsedOutput, context)];
1383
+ case 15: throw _d.sent();
1384
+ case 16: return [4, deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context)];
1385
+ case 17: throw _d.sent();
1386
+ case 18: return [4, deserializeAws_json1_1TemplatesNotAvailableInRegionExceptionResponse(parsedOutput, context)];
1387
+ case 19: throw _d.sent();
1388
+ case 20: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
1389
+ case 21: throw _d.sent();
1390
+ case 22:
1391
+ parsedBody = parsedOutput.body;
1392
+ throwDefaultError({
1393
+ output: output,
1394
+ parsedBody: parsedBody,
1395
+ exceptionCtor: __BaseException,
1396
+ errorCode: errorCode,
1397
+ });
1398
+ _d.label = 23;
1399
+ case 23: return [2];
1400
+ }
1401
+ });
1402
+ }); };
1403
+ export var deserializeAws_json1_1RequestServiceQuotaIncreaseCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1404
+ var data, contents, response;
1405
+ return __generator(this, function (_a) {
1406
+ switch (_a.label) {
1407
+ case 0:
1408
+ if (output.statusCode >= 300) {
1409
+ return [2, deserializeAws_json1_1RequestServiceQuotaIncreaseCommandError(output, context)];
1410
+ }
1411
+ return [4, parseBody(output.body, context)];
1412
+ case 1:
1413
+ data = _a.sent();
1414
+ contents = {};
1415
+ contents = deserializeAws_json1_1RequestServiceQuotaIncreaseResponse(data, context);
1416
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1417
+ return [2, Promise.resolve(response)];
1418
+ }
1419
+ });
1420
+ }); };
1421
+ var deserializeAws_json1_1RequestServiceQuotaIncreaseCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1422
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1423
+ var _c;
1424
+ return __generator(this, function (_d) {
1425
+ switch (_d.label) {
1426
+ case 0:
1427
+ _a = [__assign({}, output)];
1428
+ _c = {};
1429
+ return [4, parseErrorBody(output.body, context)];
1430
+ case 1:
1431
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1432
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1433
+ _b = errorCode;
1434
+ switch (_b) {
1435
+ case "AccessDeniedException": return [3, 2];
1436
+ case "com.amazonaws.servicequotas#AccessDeniedException": return [3, 2];
1437
+ case "DependencyAccessDeniedException": return [3, 4];
1438
+ case "com.amazonaws.servicequotas#DependencyAccessDeniedException": return [3, 4];
1439
+ case "IllegalArgumentException": return [3, 6];
1440
+ case "com.amazonaws.servicequotas#IllegalArgumentException": return [3, 6];
1441
+ case "InvalidResourceStateException": return [3, 8];
1442
+ case "com.amazonaws.servicequotas#InvalidResourceStateException": return [3, 8];
1443
+ case "NoSuchResourceException": return [3, 10];
1444
+ case "com.amazonaws.servicequotas#NoSuchResourceException": return [3, 10];
1445
+ case "QuotaExceededException": return [3, 12];
1446
+ case "com.amazonaws.servicequotas#QuotaExceededException": return [3, 12];
1447
+ case "ResourceAlreadyExistsException": return [3, 14];
1448
+ case "com.amazonaws.servicequotas#ResourceAlreadyExistsException": return [3, 14];
1449
+ case "ServiceException": return [3, 16];
1450
+ case "com.amazonaws.servicequotas#ServiceException": return [3, 16];
1451
+ case "TooManyRequestsException": return [3, 18];
1452
+ case "com.amazonaws.servicequotas#TooManyRequestsException": return [3, 18];
1453
+ }
1454
+ return [3, 20];
1455
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1456
+ case 3: throw _d.sent();
1457
+ case 4: return [4, deserializeAws_json1_1DependencyAccessDeniedExceptionResponse(parsedOutput, context)];
1458
+ case 5: throw _d.sent();
1459
+ case 6: return [4, deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context)];
1460
+ case 7: throw _d.sent();
1461
+ case 8: return [4, deserializeAws_json1_1InvalidResourceStateExceptionResponse(parsedOutput, context)];
1462
+ case 9: throw _d.sent();
1463
+ case 10: return [4, deserializeAws_json1_1NoSuchResourceExceptionResponse(parsedOutput, context)];
1464
+ case 11: throw _d.sent();
1465
+ case 12: return [4, deserializeAws_json1_1QuotaExceededExceptionResponse(parsedOutput, context)];
1466
+ case 13: throw _d.sent();
1467
+ case 14: return [4, deserializeAws_json1_1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)];
1468
+ case 15: throw _d.sent();
1469
+ case 16: return [4, deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context)];
1470
+ case 17: throw _d.sent();
1471
+ case 18: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
1472
+ case 19: throw _d.sent();
1473
+ case 20:
1474
+ parsedBody = parsedOutput.body;
1475
+ throwDefaultError({
1476
+ output: output,
1477
+ parsedBody: parsedBody,
1478
+ exceptionCtor: __BaseException,
1479
+ errorCode: errorCode,
1480
+ });
1481
+ _d.label = 21;
1482
+ case 21: return [2];
1483
+ }
1484
+ });
1485
+ }); };
1486
+ export var deserializeAws_json1_1TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1487
+ var data, contents, response;
1488
+ return __generator(this, function (_a) {
1489
+ switch (_a.label) {
1490
+ case 0:
1491
+ if (output.statusCode >= 300) {
1492
+ return [2, deserializeAws_json1_1TagResourceCommandError(output, context)];
1493
+ }
1494
+ return [4, parseBody(output.body, context)];
1495
+ case 1:
1496
+ data = _a.sent();
1497
+ contents = {};
1498
+ contents = deserializeAws_json1_1TagResourceResponse(data, context);
1499
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1500
+ return [2, Promise.resolve(response)];
1501
+ }
1502
+ });
1503
+ }); };
1504
+ var deserializeAws_json1_1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1505
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1506
+ var _c;
1507
+ return __generator(this, function (_d) {
1508
+ switch (_d.label) {
1509
+ case 0:
1510
+ _a = [__assign({}, output)];
1511
+ _c = {};
1512
+ return [4, parseErrorBody(output.body, context)];
1513
+ case 1:
1514
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1515
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1516
+ _b = errorCode;
1517
+ switch (_b) {
1518
+ case "AccessDeniedException": return [3, 2];
1519
+ case "com.amazonaws.servicequotas#AccessDeniedException": return [3, 2];
1520
+ case "IllegalArgumentException": return [3, 4];
1521
+ case "com.amazonaws.servicequotas#IllegalArgumentException": return [3, 4];
1522
+ case "NoSuchResourceException": return [3, 6];
1523
+ case "com.amazonaws.servicequotas#NoSuchResourceException": return [3, 6];
1524
+ case "ServiceException": return [3, 8];
1525
+ case "com.amazonaws.servicequotas#ServiceException": return [3, 8];
1526
+ case "TagPolicyViolationException": return [3, 10];
1527
+ case "com.amazonaws.servicequotas#TagPolicyViolationException": return [3, 10];
1528
+ case "TooManyRequestsException": return [3, 12];
1529
+ case "com.amazonaws.servicequotas#TooManyRequestsException": return [3, 12];
1530
+ case "TooManyTagsException": return [3, 14];
1531
+ case "com.amazonaws.servicequotas#TooManyTagsException": return [3, 14];
1532
+ }
1533
+ return [3, 16];
1534
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1535
+ case 3: throw _d.sent();
1536
+ case 4: return [4, deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context)];
1537
+ case 5: throw _d.sent();
1538
+ case 6: return [4, deserializeAws_json1_1NoSuchResourceExceptionResponse(parsedOutput, context)];
1539
+ case 7: throw _d.sent();
1540
+ case 8: return [4, deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context)];
1541
+ case 9: throw _d.sent();
1542
+ case 10: return [4, deserializeAws_json1_1TagPolicyViolationExceptionResponse(parsedOutput, context)];
1543
+ case 11: throw _d.sent();
1544
+ case 12: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
1545
+ case 13: throw _d.sent();
1546
+ case 14: return [4, deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)];
1547
+ case 15: throw _d.sent();
1548
+ case 16:
1549
+ parsedBody = parsedOutput.body;
1550
+ throwDefaultError({
1551
+ output: output,
1552
+ parsedBody: parsedBody,
1553
+ exceptionCtor: __BaseException,
1554
+ errorCode: errorCode,
1555
+ });
1556
+ _d.label = 17;
1557
+ case 17: return [2];
1558
+ }
1559
+ });
1560
+ }); };
1561
+ export var deserializeAws_json1_1UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1562
+ var data, contents, response;
1563
+ return __generator(this, function (_a) {
1564
+ switch (_a.label) {
1565
+ case 0:
1566
+ if (output.statusCode >= 300) {
1567
+ return [2, deserializeAws_json1_1UntagResourceCommandError(output, context)];
1568
+ }
1569
+ return [4, parseBody(output.body, context)];
1570
+ case 1:
1571
+ data = _a.sent();
1572
+ contents = {};
1573
+ contents = deserializeAws_json1_1UntagResourceResponse(data, context);
1574
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1575
+ return [2, Promise.resolve(response)];
1576
+ }
1577
+ });
1578
+ }); };
1579
+ var deserializeAws_json1_1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1580
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1581
+ var _c;
1582
+ return __generator(this, function (_d) {
1583
+ switch (_d.label) {
1584
+ case 0:
1585
+ _a = [__assign({}, output)];
1586
+ _c = {};
1587
+ return [4, parseErrorBody(output.body, context)];
1588
+ case 1:
1589
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1590
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1591
+ _b = errorCode;
1592
+ switch (_b) {
1593
+ case "AccessDeniedException": return [3, 2];
1594
+ case "com.amazonaws.servicequotas#AccessDeniedException": return [3, 2];
1595
+ case "IllegalArgumentException": return [3, 4];
1596
+ case "com.amazonaws.servicequotas#IllegalArgumentException": return [3, 4];
1597
+ case "NoSuchResourceException": return [3, 6];
1598
+ case "com.amazonaws.servicequotas#NoSuchResourceException": return [3, 6];
1599
+ case "ServiceException": return [3, 8];
1600
+ case "com.amazonaws.servicequotas#ServiceException": return [3, 8];
1601
+ case "TooManyRequestsException": return [3, 10];
1602
+ case "com.amazonaws.servicequotas#TooManyRequestsException": return [3, 10];
1603
+ }
1604
+ return [3, 12];
1605
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1606
+ case 3: throw _d.sent();
1607
+ case 4: return [4, deserializeAws_json1_1IllegalArgumentExceptionResponse(parsedOutput, context)];
1608
+ case 5: throw _d.sent();
1609
+ case 6: return [4, deserializeAws_json1_1NoSuchResourceExceptionResponse(parsedOutput, context)];
1610
+ case 7: throw _d.sent();
1611
+ case 8: return [4, deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context)];
1612
+ case 9: throw _d.sent();
1613
+ case 10: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
1614
+ case 11: throw _d.sent();
1615
+ case 12:
1616
+ parsedBody = parsedOutput.body;
1617
+ throwDefaultError({
1618
+ output: output,
1619
+ parsedBody: parsedBody,
1620
+ exceptionCtor: __BaseException,
1621
+ errorCode: errorCode,
1622
+ });
1623
+ _d.label = 13;
1624
+ case 13: return [2];
1625
+ }
1626
+ });
1627
+ }); };
1628
+ var deserializeAws_json1_1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1629
+ var body, deserialized, exception;
1630
+ return __generator(this, function (_a) {
1631
+ body = parsedOutput.body;
1632
+ deserialized = deserializeAws_json1_1AccessDeniedException(body, context);
1633
+ exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1634
+ return [2, __decorateServiceException(exception, body)];
1635
+ });
1636
+ }); };
1637
+ var deserializeAws_json1_1AWSServiceAccessNotEnabledExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1638
+ var body, deserialized, exception;
1639
+ return __generator(this, function (_a) {
1640
+ body = parsedOutput.body;
1641
+ deserialized = deserializeAws_json1_1AWSServiceAccessNotEnabledException(body, context);
1642
+ exception = new AWSServiceAccessNotEnabledException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1643
+ return [2, __decorateServiceException(exception, body)];
1644
+ });
1645
+ }); };
1646
+ var deserializeAws_json1_1DependencyAccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1647
+ var body, deserialized, exception;
1648
+ return __generator(this, function (_a) {
1649
+ body = parsedOutput.body;
1650
+ deserialized = deserializeAws_json1_1DependencyAccessDeniedException(body, context);
1651
+ exception = new DependencyAccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1652
+ return [2, __decorateServiceException(exception, body)];
1653
+ });
1654
+ }); };
1655
+ var deserializeAws_json1_1IllegalArgumentExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1656
+ var body, deserialized, exception;
1657
+ return __generator(this, function (_a) {
1658
+ body = parsedOutput.body;
1659
+ deserialized = deserializeAws_json1_1IllegalArgumentException(body, context);
1660
+ exception = new IllegalArgumentException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1661
+ return [2, __decorateServiceException(exception, body)];
1662
+ });
1663
+ }); };
1664
+ var deserializeAws_json1_1InvalidPaginationTokenExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1665
+ var body, deserialized, exception;
1666
+ return __generator(this, function (_a) {
1667
+ body = parsedOutput.body;
1668
+ deserialized = deserializeAws_json1_1InvalidPaginationTokenException(body, context);
1669
+ exception = new InvalidPaginationTokenException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1670
+ return [2, __decorateServiceException(exception, body)];
1671
+ });
1672
+ }); };
1673
+ var deserializeAws_json1_1InvalidResourceStateExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1674
+ var body, deserialized, exception;
1675
+ return __generator(this, function (_a) {
1676
+ body = parsedOutput.body;
1677
+ deserialized = deserializeAws_json1_1InvalidResourceStateException(body, context);
1678
+ exception = new InvalidResourceStateException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1679
+ return [2, __decorateServiceException(exception, body)];
1680
+ });
1681
+ }); };
1682
+ var deserializeAws_json1_1NoAvailableOrganizationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1683
+ var body, deserialized, exception;
1684
+ return __generator(this, function (_a) {
1685
+ body = parsedOutput.body;
1686
+ deserialized = deserializeAws_json1_1NoAvailableOrganizationException(body, context);
1687
+ exception = new NoAvailableOrganizationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1688
+ return [2, __decorateServiceException(exception, body)];
1689
+ });
1690
+ }); };
1691
+ var deserializeAws_json1_1NoSuchResourceExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1692
+ var body, deserialized, exception;
1693
+ return __generator(this, function (_a) {
1694
+ body = parsedOutput.body;
1695
+ deserialized = deserializeAws_json1_1NoSuchResourceException(body, context);
1696
+ exception = new NoSuchResourceException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1697
+ return [2, __decorateServiceException(exception, body)];
1698
+ });
1699
+ }); };
1700
+ var deserializeAws_json1_1OrganizationNotInAllFeaturesModeExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1701
+ var body, deserialized, exception;
1702
+ return __generator(this, function (_a) {
1703
+ body = parsedOutput.body;
1704
+ deserialized = deserializeAws_json1_1OrganizationNotInAllFeaturesModeException(body, context);
1705
+ exception = new OrganizationNotInAllFeaturesModeException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1706
+ return [2, __decorateServiceException(exception, body)];
1707
+ });
1708
+ }); };
1709
+ var deserializeAws_json1_1QuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1710
+ var body, deserialized, exception;
1711
+ return __generator(this, function (_a) {
1712
+ body = parsedOutput.body;
1713
+ deserialized = deserializeAws_json1_1QuotaExceededException(body, context);
1714
+ exception = new QuotaExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1715
+ return [2, __decorateServiceException(exception, body)];
1716
+ });
1717
+ }); };
1718
+ var deserializeAws_json1_1ResourceAlreadyExistsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1719
+ var body, deserialized, exception;
1720
+ return __generator(this, function (_a) {
1721
+ body = parsedOutput.body;
1722
+ deserialized = deserializeAws_json1_1ResourceAlreadyExistsException(body, context);
1723
+ exception = new ResourceAlreadyExistsException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1724
+ return [2, __decorateServiceException(exception, body)];
1725
+ });
1726
+ }); };
1727
+ var deserializeAws_json1_1ServiceExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1728
+ var body, deserialized, exception;
1729
+ return __generator(this, function (_a) {
1730
+ body = parsedOutput.body;
1731
+ deserialized = deserializeAws_json1_1ServiceException(body, context);
1732
+ exception = new ServiceException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1733
+ return [2, __decorateServiceException(exception, body)];
1734
+ });
1735
+ }); };
1736
+ var deserializeAws_json1_1ServiceQuotaTemplateNotInUseExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1737
+ var body, deserialized, exception;
1738
+ return __generator(this, function (_a) {
1739
+ body = parsedOutput.body;
1740
+ deserialized = deserializeAws_json1_1ServiceQuotaTemplateNotInUseException(body, context);
1741
+ exception = new ServiceQuotaTemplateNotInUseException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1742
+ return [2, __decorateServiceException(exception, body)];
1743
+ });
1744
+ }); };
1745
+ var deserializeAws_json1_1TagPolicyViolationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1746
+ var body, deserialized, exception;
1747
+ return __generator(this, function (_a) {
1748
+ body = parsedOutput.body;
1749
+ deserialized = deserializeAws_json1_1TagPolicyViolationException(body, context);
1750
+ exception = new TagPolicyViolationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1751
+ return [2, __decorateServiceException(exception, body)];
1752
+ });
1753
+ }); };
1754
+ var deserializeAws_json1_1TemplatesNotAvailableInRegionExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1755
+ var body, deserialized, exception;
1756
+ return __generator(this, function (_a) {
1757
+ body = parsedOutput.body;
1758
+ deserialized = deserializeAws_json1_1TemplatesNotAvailableInRegionException(body, context);
1759
+ exception = new TemplatesNotAvailableInRegionException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1760
+ return [2, __decorateServiceException(exception, body)];
1761
+ });
1762
+ }); };
1763
+ var deserializeAws_json1_1TooManyRequestsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1764
+ var body, deserialized, exception;
1765
+ return __generator(this, function (_a) {
1766
+ body = parsedOutput.body;
1767
+ deserialized = deserializeAws_json1_1TooManyRequestsException(body, context);
1768
+ exception = new TooManyRequestsException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1769
+ return [2, __decorateServiceException(exception, body)];
1770
+ });
1771
+ }); };
1772
+ var deserializeAws_json1_1TooManyTagsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1773
+ var body, deserialized, exception;
1774
+ return __generator(this, function (_a) {
1775
+ body = parsedOutput.body;
1776
+ deserialized = deserializeAws_json1_1TooManyTagsException(body, context);
1777
+ exception = new TooManyTagsException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1778
+ return [2, __decorateServiceException(exception, body)];
1779
+ });
1780
+ }); };
1781
+ var serializeAws_json1_1AssociateServiceQuotaTemplateRequest = function (input, context) {
1290
1782
  return {};
1291
1783
  };
1292
- const serializeAws_json1_1DeleteServiceQuotaIncreaseRequestFromTemplateRequest = (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
- };
1784
+ var serializeAws_json1_1DeleteServiceQuotaIncreaseRequestFromTemplateRequest = function (input, context) {
1785
+ return __assign(__assign(__assign({}, (input.AwsRegion != null && { AwsRegion: input.AwsRegion })), (input.QuotaCode != null && { QuotaCode: input.QuotaCode })), (input.ServiceCode != null && { ServiceCode: input.ServiceCode }));
1298
1786
  };
1299
- const serializeAws_json1_1DisassociateServiceQuotaTemplateRequest = (input, context) => {
1787
+ var serializeAws_json1_1DisassociateServiceQuotaTemplateRequest = function (input, context) {
1300
1788
  return {};
1301
1789
  };
1302
- const serializeAws_json1_1GetAssociationForServiceQuotaTemplateRequest = (input, context) => {
1790
+ var serializeAws_json1_1GetAssociationForServiceQuotaTemplateRequest = function (input, context) {
1303
1791
  return {};
1304
1792
  };
1305
- const serializeAws_json1_1GetAWSDefaultServiceQuotaRequest = (input, context) => {
1306
- return {
1307
- ...(input.QuotaCode != null && { QuotaCode: input.QuotaCode }),
1308
- ...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }),
1309
- };
1793
+ var serializeAws_json1_1GetAWSDefaultServiceQuotaRequest = function (input, context) {
1794
+ return __assign(__assign({}, (input.QuotaCode != null && { QuotaCode: input.QuotaCode })), (input.ServiceCode != null && { ServiceCode: input.ServiceCode }));
1310
1795
  };
1311
- const serializeAws_json1_1GetRequestedServiceQuotaChangeRequest = (input, context) => {
1312
- return {
1313
- ...(input.RequestId != null && { RequestId: input.RequestId }),
1314
- };
1796
+ var serializeAws_json1_1GetRequestedServiceQuotaChangeRequest = function (input, context) {
1797
+ return __assign({}, (input.RequestId != null && { RequestId: input.RequestId }));
1315
1798
  };
1316
- const serializeAws_json1_1GetServiceQuotaIncreaseRequestFromTemplateRequest = (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
- };
1799
+ var serializeAws_json1_1GetServiceQuotaIncreaseRequestFromTemplateRequest = function (input, context) {
1800
+ return __assign(__assign(__assign({}, (input.AwsRegion != null && { AwsRegion: input.AwsRegion })), (input.QuotaCode != null && { QuotaCode: input.QuotaCode })), (input.ServiceCode != null && { ServiceCode: input.ServiceCode }));
1322
1801
  };
1323
- const serializeAws_json1_1GetServiceQuotaRequest = (input, context) => {
1324
- return {
1325
- ...(input.QuotaCode != null && { QuotaCode: input.QuotaCode }),
1326
- ...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }),
1327
- };
1802
+ var serializeAws_json1_1GetServiceQuotaRequest = function (input, context) {
1803
+ return __assign(__assign({}, (input.QuotaCode != null && { QuotaCode: input.QuotaCode })), (input.ServiceCode != null && { ServiceCode: input.ServiceCode }));
1328
1804
  };
1329
- const serializeAws_json1_1InputTagKeys = (input, context) => {
1805
+ var serializeAws_json1_1InputTagKeys = function (input, context) {
1330
1806
  return input
1331
- .filter((e) => e != null)
1332
- .map((entry) => {
1807
+ .filter(function (e) { return e != null; })
1808
+ .map(function (entry) {
1333
1809
  return entry;
1334
1810
  });
1335
1811
  };
1336
- const serializeAws_json1_1InputTags = (input, context) => {
1812
+ var serializeAws_json1_1InputTags = function (input, context) {
1337
1813
  return input
1338
- .filter((e) => e != null)
1339
- .map((entry) => {
1814
+ .filter(function (e) { return e != null; })
1815
+ .map(function (entry) {
1340
1816
  return serializeAws_json1_1Tag(entry, context);
1341
1817
  });
1342
1818
  };
1343
- const serializeAws_json1_1ListAWSDefaultServiceQuotasRequest = (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
- };
1819
+ var serializeAws_json1_1ListAWSDefaultServiceQuotasRequest = function (input, context) {
1820
+ return __assign(__assign(__assign({}, (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.ServiceCode != null && { ServiceCode: input.ServiceCode }));
1349
1821
  };
1350
- const serializeAws_json1_1ListRequestedServiceQuotaChangeHistoryByQuotaRequest = (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
- };
1822
+ var serializeAws_json1_1ListRequestedServiceQuotaChangeHistoryByQuotaRequest = function (input, context) {
1823
+ return __assign(__assign(__assign(__assign(__assign({}, (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.QuotaCode != null && { QuotaCode: input.QuotaCode })), (input.ServiceCode != null && { ServiceCode: input.ServiceCode })), (input.Status != null && { Status: input.Status }));
1358
1824
  };
1359
- const serializeAws_json1_1ListRequestedServiceQuotaChangeHistoryRequest = (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
- };
1825
+ var serializeAws_json1_1ListRequestedServiceQuotaChangeHistoryRequest = function (input, context) {
1826
+ return __assign(__assign(__assign(__assign({}, (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.ServiceCode != null && { ServiceCode: input.ServiceCode })), (input.Status != null && { Status: input.Status }));
1366
1827
  };
1367
- const serializeAws_json1_1ListServiceQuotaIncreaseRequestsInTemplateRequest = (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
- };
1828
+ var serializeAws_json1_1ListServiceQuotaIncreaseRequestsInTemplateRequest = function (input, context) {
1829
+ return __assign(__assign(__assign(__assign({}, (input.AwsRegion != null && { AwsRegion: input.AwsRegion })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.ServiceCode != null && { ServiceCode: input.ServiceCode }));
1374
1830
  };
1375
- const serializeAws_json1_1ListServiceQuotasRequest = (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
- };
1831
+ var serializeAws_json1_1ListServiceQuotasRequest = function (input, context) {
1832
+ return __assign(__assign(__assign({}, (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.ServiceCode != null && { ServiceCode: input.ServiceCode }));
1381
1833
  };
1382
- const serializeAws_json1_1ListServicesRequest = (input, context) => {
1383
- return {
1384
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1385
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1386
- };
1834
+ var serializeAws_json1_1ListServicesRequest = function (input, context) {
1835
+ return __assign(__assign({}, (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
1387
1836
  };
1388
- const serializeAws_json1_1ListTagsForResourceRequest = (input, context) => {
1389
- return {
1390
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1391
- };
1837
+ var serializeAws_json1_1ListTagsForResourceRequest = function (input, context) {
1838
+ return __assign({}, (input.ResourceARN != null && { ResourceARN: input.ResourceARN }));
1392
1839
  };
1393
- const serializeAws_json1_1PutServiceQuotaIncreaseRequestIntoTemplateRequest = (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
- };
1840
+ var serializeAws_json1_1PutServiceQuotaIncreaseRequestIntoTemplateRequest = function (input, context) {
1841
+ return __assign(__assign(__assign(__assign({}, (input.AwsRegion != null && { AwsRegion: input.AwsRegion })), (input.DesiredValue != null && { DesiredValue: __serializeFloat(input.DesiredValue) })), (input.QuotaCode != null && { QuotaCode: input.QuotaCode })), (input.ServiceCode != null && { ServiceCode: input.ServiceCode }));
1400
1842
  };
1401
- const serializeAws_json1_1RequestServiceQuotaIncreaseRequest = (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
- };
1843
+ var serializeAws_json1_1RequestServiceQuotaIncreaseRequest = function (input, context) {
1844
+ return __assign(__assign(__assign({}, (input.DesiredValue != null && { DesiredValue: __serializeFloat(input.DesiredValue) })), (input.QuotaCode != null && { QuotaCode: input.QuotaCode })), (input.ServiceCode != null && { ServiceCode: input.ServiceCode }));
1407
1845
  };
1408
- const serializeAws_json1_1Tag = (input, context) => {
1409
- return {
1410
- ...(input.Key != null && { Key: input.Key }),
1411
- ...(input.Value != null && { Value: input.Value }),
1412
- };
1846
+ var serializeAws_json1_1Tag = function (input, context) {
1847
+ return __assign(__assign({}, (input.Key != null && { Key: input.Key })), (input.Value != null && { Value: input.Value }));
1413
1848
  };
1414
- const serializeAws_json1_1TagResourceRequest = (input, context) => {
1415
- return {
1416
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1417
- ...(input.Tags != null && { Tags: serializeAws_json1_1InputTags(input.Tags, context) }),
1418
- };
1849
+ var serializeAws_json1_1TagResourceRequest = function (input, context) {
1850
+ return __assign(__assign({}, (input.ResourceARN != null && { ResourceARN: input.ResourceARN })), (input.Tags != null && { Tags: serializeAws_json1_1InputTags(input.Tags, context) }));
1419
1851
  };
1420
- const serializeAws_json1_1UntagResourceRequest = (input, context) => {
1421
- return {
1422
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1423
- ...(input.TagKeys != null && { TagKeys: serializeAws_json1_1InputTagKeys(input.TagKeys, context) }),
1424
- };
1852
+ var serializeAws_json1_1UntagResourceRequest = function (input, context) {
1853
+ return __assign(__assign({}, (input.ResourceARN != null && { ResourceARN: input.ResourceARN })), (input.TagKeys != null && { TagKeys: serializeAws_json1_1InputTagKeys(input.TagKeys, context) }));
1425
1854
  };
1426
- const deserializeAws_json1_1AccessDeniedException = (output, context) => {
1855
+ var deserializeAws_json1_1AccessDeniedException = function (output, context) {
1427
1856
  return {
1428
1857
  Message: __expectString(output.Message),
1429
1858
  };
1430
1859
  };
1431
- const deserializeAws_json1_1AssociateServiceQuotaTemplateResponse = (output, context) => {
1860
+ var deserializeAws_json1_1AssociateServiceQuotaTemplateResponse = function (output, context) {
1432
1861
  return {};
1433
1862
  };
1434
- const deserializeAws_json1_1AWSServiceAccessNotEnabledException = (output, context) => {
1863
+ var deserializeAws_json1_1AWSServiceAccessNotEnabledException = function (output, context) {
1435
1864
  return {
1436
1865
  Message: __expectString(output.Message),
1437
1866
  };
1438
1867
  };
1439
- const deserializeAws_json1_1DeleteServiceQuotaIncreaseRequestFromTemplateResponse = (output, context) => {
1868
+ var deserializeAws_json1_1DeleteServiceQuotaIncreaseRequestFromTemplateResponse = function (output, context) {
1440
1869
  return {};
1441
1870
  };
1442
- const deserializeAws_json1_1DependencyAccessDeniedException = (output, context) => {
1871
+ var deserializeAws_json1_1DependencyAccessDeniedException = function (output, context) {
1443
1872
  return {
1444
1873
  Message: __expectString(output.Message),
1445
1874
  };
1446
1875
  };
1447
- const deserializeAws_json1_1DisassociateServiceQuotaTemplateResponse = (output, context) => {
1876
+ var deserializeAws_json1_1DisassociateServiceQuotaTemplateResponse = function (output, context) {
1448
1877
  return {};
1449
1878
  };
1450
- const deserializeAws_json1_1ErrorReason = (output, context) => {
1879
+ var deserializeAws_json1_1ErrorReason = function (output, context) {
1451
1880
  return {
1452
1881
  ErrorCode: __expectString(output.ErrorCode),
1453
1882
  ErrorMessage: __expectString(output.ErrorMessage),
1454
1883
  };
1455
1884
  };
1456
- const deserializeAws_json1_1GetAssociationForServiceQuotaTemplateResponse = (output, context) => {
1885
+ var deserializeAws_json1_1GetAssociationForServiceQuotaTemplateResponse = function (output, context) {
1457
1886
  return {
1458
1887
  ServiceQuotaTemplateAssociationStatus: __expectString(output.ServiceQuotaTemplateAssociationStatus),
1459
1888
  };
1460
1889
  };
1461
- const deserializeAws_json1_1GetAWSDefaultServiceQuotaResponse = (output, context) => {
1890
+ var deserializeAws_json1_1GetAWSDefaultServiceQuotaResponse = function (output, context) {
1462
1891
  return {
1463
1892
  Quota: output.Quota != null ? deserializeAws_json1_1ServiceQuota(output.Quota, context) : undefined,
1464
1893
  };
1465
1894
  };
1466
- const deserializeAws_json1_1GetRequestedServiceQuotaChangeResponse = (output, context) => {
1895
+ var deserializeAws_json1_1GetRequestedServiceQuotaChangeResponse = function (output, context) {
1467
1896
  return {
1468
1897
  RequestedQuota: output.RequestedQuota != null
1469
1898
  ? deserializeAws_json1_1RequestedServiceQuotaChange(output.RequestedQuota, context)
1470
1899
  : undefined,
1471
1900
  };
1472
1901
  };
1473
- const deserializeAws_json1_1GetServiceQuotaIncreaseRequestFromTemplateResponse = (output, context) => {
1902
+ var deserializeAws_json1_1GetServiceQuotaIncreaseRequestFromTemplateResponse = function (output, context) {
1474
1903
  return {
1475
1904
  ServiceQuotaIncreaseRequestInTemplate: output.ServiceQuotaIncreaseRequestInTemplate != null
1476
1905
  ? deserializeAws_json1_1ServiceQuotaIncreaseRequestInTemplate(output.ServiceQuotaIncreaseRequestInTemplate, context)
1477
1906
  : undefined,
1478
1907
  };
1479
1908
  };
1480
- const deserializeAws_json1_1GetServiceQuotaResponse = (output, context) => {
1909
+ var deserializeAws_json1_1GetServiceQuotaResponse = function (output, context) {
1481
1910
  return {
1482
1911
  Quota: output.Quota != null ? deserializeAws_json1_1ServiceQuota(output.Quota, context) : undefined,
1483
1912
  };
1484
1913
  };
1485
- const deserializeAws_json1_1IllegalArgumentException = (output, context) => {
1914
+ var deserializeAws_json1_1IllegalArgumentException = function (output, context) {
1486
1915
  return {
1487
1916
  Message: __expectString(output.Message),
1488
1917
  };
1489
1918
  };
1490
- const deserializeAws_json1_1InvalidPaginationTokenException = (output, context) => {
1919
+ var deserializeAws_json1_1InvalidPaginationTokenException = function (output, context) {
1491
1920
  return {
1492
1921
  Message: __expectString(output.Message),
1493
1922
  };
1494
1923
  };
1495
- const deserializeAws_json1_1InvalidResourceStateException = (output, context) => {
1924
+ var deserializeAws_json1_1InvalidResourceStateException = function (output, context) {
1496
1925
  return {
1497
1926
  Message: __expectString(output.Message),
1498
1927
  };
1499
1928
  };
1500
- const deserializeAws_json1_1ListAWSDefaultServiceQuotasResponse = (output, context) => {
1929
+ var deserializeAws_json1_1ListAWSDefaultServiceQuotasResponse = function (output, context) {
1501
1930
  return {
1502
1931
  NextToken: __expectString(output.NextToken),
1503
1932
  Quotas: output.Quotas != null ? deserializeAws_json1_1ServiceQuotaListDefinition(output.Quotas, context) : undefined,
1504
1933
  };
1505
1934
  };
1506
- const deserializeAws_json1_1ListRequestedServiceQuotaChangeHistoryByQuotaResponse = (output, context) => {
1935
+ var deserializeAws_json1_1ListRequestedServiceQuotaChangeHistoryByQuotaResponse = function (output, context) {
1507
1936
  return {
1508
1937
  NextToken: __expectString(output.NextToken),
1509
1938
  RequestedQuotas: output.RequestedQuotas != null
@@ -1511,7 +1940,7 @@ const deserializeAws_json1_1ListRequestedServiceQuotaChangeHistoryByQuotaRespons
1511
1940
  : undefined,
1512
1941
  };
1513
1942
  };
1514
- const deserializeAws_json1_1ListRequestedServiceQuotaChangeHistoryResponse = (output, context) => {
1943
+ var deserializeAws_json1_1ListRequestedServiceQuotaChangeHistoryResponse = function (output, context) {
1515
1944
  return {
1516
1945
  NextToken: __expectString(output.NextToken),
1517
1946
  RequestedQuotas: output.RequestedQuotas != null
@@ -1519,7 +1948,7 @@ const deserializeAws_json1_1ListRequestedServiceQuotaChangeHistoryResponse = (ou
1519
1948
  : undefined,
1520
1949
  };
1521
1950
  };
1522
- const deserializeAws_json1_1ListServiceQuotaIncreaseRequestsInTemplateResponse = (output, context) => {
1951
+ var deserializeAws_json1_1ListServiceQuotaIncreaseRequestsInTemplateResponse = function (output, context) {
1523
1952
  return {
1524
1953
  NextToken: __expectString(output.NextToken),
1525
1954
  ServiceQuotaIncreaseRequestInTemplateList: output.ServiceQuotaIncreaseRequestInTemplateList != null
@@ -1527,35 +1956,34 @@ const deserializeAws_json1_1ListServiceQuotaIncreaseRequestsInTemplateResponse =
1527
1956
  : undefined,
1528
1957
  };
1529
1958
  };
1530
- const deserializeAws_json1_1ListServiceQuotasResponse = (output, context) => {
1959
+ var deserializeAws_json1_1ListServiceQuotasResponse = function (output, context) {
1531
1960
  return {
1532
1961
  NextToken: __expectString(output.NextToken),
1533
1962
  Quotas: output.Quotas != null ? deserializeAws_json1_1ServiceQuotaListDefinition(output.Quotas, context) : undefined,
1534
1963
  };
1535
1964
  };
1536
- const deserializeAws_json1_1ListServicesResponse = (output, context) => {
1965
+ var deserializeAws_json1_1ListServicesResponse = function (output, context) {
1537
1966
  return {
1538
1967
  NextToken: __expectString(output.NextToken),
1539
1968
  Services: output.Services != null ? deserializeAws_json1_1ServiceInfoListDefinition(output.Services, context) : undefined,
1540
1969
  };
1541
1970
  };
1542
- const deserializeAws_json1_1ListTagsForResourceResponse = (output, context) => {
1971
+ var deserializeAws_json1_1ListTagsForResourceResponse = function (output, context) {
1543
1972
  return {
1544
1973
  Tags: output.Tags != null ? deserializeAws_json1_1OutputTags(output.Tags, context) : undefined,
1545
1974
  };
1546
1975
  };
1547
- const deserializeAws_json1_1MetricDimensionsMapDefinition = (output, context) => {
1548
- return Object.entries(output).reduce((acc, [key, value]) => {
1976
+ var deserializeAws_json1_1MetricDimensionsMapDefinition = function (output, context) {
1977
+ return Object.entries(output).reduce(function (acc, _a) {
1978
+ var _b;
1979
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
1549
1980
  if (value === null) {
1550
1981
  return acc;
1551
1982
  }
1552
- return {
1553
- ...acc,
1554
- [key]: __expectString(value),
1555
- };
1983
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
1556
1984
  }, {});
1557
1985
  };
1558
- const deserializeAws_json1_1MetricInfo = (output, context) => {
1986
+ var deserializeAws_json1_1MetricInfo = function (output, context) {
1559
1987
  return {
1560
1988
  MetricDimensions: output.MetricDimensions != null
1561
1989
  ? deserializeAws_json1_1MetricDimensionsMapDefinition(output.MetricDimensions, context)
@@ -1565,25 +1993,25 @@ const deserializeAws_json1_1MetricInfo = (output, context) => {
1565
1993
  MetricStatisticRecommendation: __expectString(output.MetricStatisticRecommendation),
1566
1994
  };
1567
1995
  };
1568
- const deserializeAws_json1_1NoAvailableOrganizationException = (output, context) => {
1996
+ var deserializeAws_json1_1NoAvailableOrganizationException = function (output, context) {
1569
1997
  return {
1570
1998
  Message: __expectString(output.Message),
1571
1999
  };
1572
2000
  };
1573
- const deserializeAws_json1_1NoSuchResourceException = (output, context) => {
2001
+ var deserializeAws_json1_1NoSuchResourceException = function (output, context) {
1574
2002
  return {
1575
2003
  Message: __expectString(output.Message),
1576
2004
  };
1577
2005
  };
1578
- const deserializeAws_json1_1OrganizationNotInAllFeaturesModeException = (output, context) => {
2006
+ var deserializeAws_json1_1OrganizationNotInAllFeaturesModeException = function (output, context) {
1579
2007
  return {
1580
2008
  Message: __expectString(output.Message),
1581
2009
  };
1582
2010
  };
1583
- const deserializeAws_json1_1OutputTags = (output, context) => {
1584
- const retVal = (output || [])
1585
- .filter((e) => e != null)
1586
- .map((entry) => {
2011
+ var deserializeAws_json1_1OutputTags = function (output, context) {
2012
+ var retVal = (output || [])
2013
+ .filter(function (e) { return e != null; })
2014
+ .map(function (entry) {
1587
2015
  if (entry === null) {
1588
2016
  return null;
1589
2017
  }
@@ -1591,25 +2019,25 @@ const deserializeAws_json1_1OutputTags = (output, context) => {
1591
2019
  });
1592
2020
  return retVal;
1593
2021
  };
1594
- const deserializeAws_json1_1PutServiceQuotaIncreaseRequestIntoTemplateResponse = (output, context) => {
2022
+ var deserializeAws_json1_1PutServiceQuotaIncreaseRequestIntoTemplateResponse = function (output, context) {
1595
2023
  return {
1596
2024
  ServiceQuotaIncreaseRequestInTemplate: output.ServiceQuotaIncreaseRequestInTemplate != null
1597
2025
  ? deserializeAws_json1_1ServiceQuotaIncreaseRequestInTemplate(output.ServiceQuotaIncreaseRequestInTemplate, context)
1598
2026
  : undefined,
1599
2027
  };
1600
2028
  };
1601
- const deserializeAws_json1_1QuotaExceededException = (output, context) => {
2029
+ var deserializeAws_json1_1QuotaExceededException = function (output, context) {
1602
2030
  return {
1603
2031
  Message: __expectString(output.Message),
1604
2032
  };
1605
2033
  };
1606
- const deserializeAws_json1_1QuotaPeriod = (output, context) => {
2034
+ var deserializeAws_json1_1QuotaPeriod = function (output, context) {
1607
2035
  return {
1608
2036
  PeriodUnit: __expectString(output.PeriodUnit),
1609
2037
  PeriodValue: __expectInt32(output.PeriodValue),
1610
2038
  };
1611
2039
  };
1612
- const deserializeAws_json1_1RequestedServiceQuotaChange = (output, context) => {
2040
+ var deserializeAws_json1_1RequestedServiceQuotaChange = function (output, context) {
1613
2041
  return {
1614
2042
  CaseId: __expectString(output.CaseId),
1615
2043
  Created: output.Created != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Created))) : undefined,
@@ -1629,10 +2057,10 @@ const deserializeAws_json1_1RequestedServiceQuotaChange = (output, context) => {
1629
2057
  Unit: __expectString(output.Unit),
1630
2058
  };
1631
2059
  };
1632
- const deserializeAws_json1_1RequestedServiceQuotaChangeHistoryListDefinition = (output, context) => {
1633
- const retVal = (output || [])
1634
- .filter((e) => e != null)
1635
- .map((entry) => {
2060
+ var deserializeAws_json1_1RequestedServiceQuotaChangeHistoryListDefinition = function (output, context) {
2061
+ var retVal = (output || [])
2062
+ .filter(function (e) { return e != null; })
2063
+ .map(function (entry) {
1636
2064
  if (entry === null) {
1637
2065
  return null;
1638
2066
  }
@@ -1640,33 +2068,33 @@ const deserializeAws_json1_1RequestedServiceQuotaChangeHistoryListDefinition = (
1640
2068
  });
1641
2069
  return retVal;
1642
2070
  };
1643
- const deserializeAws_json1_1RequestServiceQuotaIncreaseResponse = (output, context) => {
2071
+ var deserializeAws_json1_1RequestServiceQuotaIncreaseResponse = function (output, context) {
1644
2072
  return {
1645
2073
  RequestedQuota: output.RequestedQuota != null
1646
2074
  ? deserializeAws_json1_1RequestedServiceQuotaChange(output.RequestedQuota, context)
1647
2075
  : undefined,
1648
2076
  };
1649
2077
  };
1650
- const deserializeAws_json1_1ResourceAlreadyExistsException = (output, context) => {
2078
+ var deserializeAws_json1_1ResourceAlreadyExistsException = function (output, context) {
1651
2079
  return {
1652
2080
  Message: __expectString(output.Message),
1653
2081
  };
1654
2082
  };
1655
- const deserializeAws_json1_1ServiceException = (output, context) => {
2083
+ var deserializeAws_json1_1ServiceException = function (output, context) {
1656
2084
  return {
1657
2085
  Message: __expectString(output.Message),
1658
2086
  };
1659
2087
  };
1660
- const deserializeAws_json1_1ServiceInfo = (output, context) => {
2088
+ var deserializeAws_json1_1ServiceInfo = function (output, context) {
1661
2089
  return {
1662
2090
  ServiceCode: __expectString(output.ServiceCode),
1663
2091
  ServiceName: __expectString(output.ServiceName),
1664
2092
  };
1665
2093
  };
1666
- const deserializeAws_json1_1ServiceInfoListDefinition = (output, context) => {
1667
- const retVal = (output || [])
1668
- .filter((e) => e != null)
1669
- .map((entry) => {
2094
+ var deserializeAws_json1_1ServiceInfoListDefinition = function (output, context) {
2095
+ var retVal = (output || [])
2096
+ .filter(function (e) { return e != null; })
2097
+ .map(function (entry) {
1670
2098
  if (entry === null) {
1671
2099
  return null;
1672
2100
  }
@@ -1674,7 +2102,7 @@ const deserializeAws_json1_1ServiceInfoListDefinition = (output, context) => {
1674
2102
  });
1675
2103
  return retVal;
1676
2104
  };
1677
- const deserializeAws_json1_1ServiceQuota = (output, context) => {
2105
+ var deserializeAws_json1_1ServiceQuota = function (output, context) {
1678
2106
  return {
1679
2107
  Adjustable: __expectBoolean(output.Adjustable),
1680
2108
  ErrorReason: output.ErrorReason != null ? deserializeAws_json1_1ErrorReason(output.ErrorReason, context) : undefined,
@@ -1690,7 +2118,7 @@ const deserializeAws_json1_1ServiceQuota = (output, context) => {
1690
2118
  Value: __limitedParseDouble(output.Value),
1691
2119
  };
1692
2120
  };
1693
- const deserializeAws_json1_1ServiceQuotaIncreaseRequestInTemplate = (output, context) => {
2121
+ var deserializeAws_json1_1ServiceQuotaIncreaseRequestInTemplate = function (output, context) {
1694
2122
  return {
1695
2123
  AwsRegion: __expectString(output.AwsRegion),
1696
2124
  DesiredValue: __limitedParseDouble(output.DesiredValue),
@@ -1702,10 +2130,10 @@ const deserializeAws_json1_1ServiceQuotaIncreaseRequestInTemplate = (output, con
1702
2130
  Unit: __expectString(output.Unit),
1703
2131
  };
1704
2132
  };
1705
- const deserializeAws_json1_1ServiceQuotaIncreaseRequestInTemplateList = (output, context) => {
1706
- const retVal = (output || [])
1707
- .filter((e) => e != null)
1708
- .map((entry) => {
2133
+ var deserializeAws_json1_1ServiceQuotaIncreaseRequestInTemplateList = function (output, context) {
2134
+ var retVal = (output || [])
2135
+ .filter(function (e) { return e != null; })
2136
+ .map(function (entry) {
1709
2137
  if (entry === null) {
1710
2138
  return null;
1711
2139
  }
@@ -1713,10 +2141,10 @@ const deserializeAws_json1_1ServiceQuotaIncreaseRequestInTemplateList = (output,
1713
2141
  });
1714
2142
  return retVal;
1715
2143
  };
1716
- const deserializeAws_json1_1ServiceQuotaListDefinition = (output, context) => {
1717
- const retVal = (output || [])
1718
- .filter((e) => e != null)
1719
- .map((entry) => {
2144
+ var deserializeAws_json1_1ServiceQuotaListDefinition = function (output, context) {
2145
+ var retVal = (output || [])
2146
+ .filter(function (e) { return e != null; })
2147
+ .map(function (entry) {
1720
2148
  if (entry === null) {
1721
2149
  return null;
1722
2150
  }
@@ -1724,89 +2152,112 @@ const deserializeAws_json1_1ServiceQuotaListDefinition = (output, context) => {
1724
2152
  });
1725
2153
  return retVal;
1726
2154
  };
1727
- const deserializeAws_json1_1ServiceQuotaTemplateNotInUseException = (output, context) => {
2155
+ var deserializeAws_json1_1ServiceQuotaTemplateNotInUseException = function (output, context) {
1728
2156
  return {
1729
2157
  Message: __expectString(output.Message),
1730
2158
  };
1731
2159
  };
1732
- const deserializeAws_json1_1Tag = (output, context) => {
2160
+ var deserializeAws_json1_1Tag = function (output, context) {
1733
2161
  return {
1734
2162
  Key: __expectString(output.Key),
1735
2163
  Value: __expectString(output.Value),
1736
2164
  };
1737
2165
  };
1738
- const deserializeAws_json1_1TagPolicyViolationException = (output, context) => {
2166
+ var deserializeAws_json1_1TagPolicyViolationException = function (output, context) {
1739
2167
  return {
1740
2168
  Message: __expectString(output.Message),
1741
2169
  };
1742
2170
  };
1743
- const deserializeAws_json1_1TagResourceResponse = (output, context) => {
2171
+ var deserializeAws_json1_1TagResourceResponse = function (output, context) {
1744
2172
  return {};
1745
2173
  };
1746
- const deserializeAws_json1_1TemplatesNotAvailableInRegionException = (output, context) => {
2174
+ var deserializeAws_json1_1TemplatesNotAvailableInRegionException = function (output, context) {
1747
2175
  return {
1748
2176
  Message: __expectString(output.Message),
1749
2177
  };
1750
2178
  };
1751
- const deserializeAws_json1_1TooManyRequestsException = (output, context) => {
2179
+ var deserializeAws_json1_1TooManyRequestsException = function (output, context) {
1752
2180
  return {
1753
2181
  Message: __expectString(output.Message),
1754
2182
  };
1755
2183
  };
1756
- const deserializeAws_json1_1TooManyTagsException = (output, context) => {
2184
+ var deserializeAws_json1_1TooManyTagsException = function (output, context) {
1757
2185
  return {
1758
2186
  Message: __expectString(output.Message),
1759
2187
  };
1760
2188
  };
1761
- const deserializeAws_json1_1UntagResourceResponse = (output, context) => {
2189
+ var deserializeAws_json1_1UntagResourceResponse = function (output, context) {
1762
2190
  return {};
1763
2191
  };
1764
- const deserializeMetadata = (output) => ({
1765
- httpStatusCode: output.statusCode,
1766
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
1767
- extendedRequestId: output.headers["x-amz-id-2"],
1768
- cfId: output.headers["x-amz-cf-id"],
1769
- });
1770
- const collectBody = (streamBody = new Uint8Array(), context) => {
2192
+ var deserializeMetadata = function (output) {
2193
+ var _a, _b;
2194
+ return ({
2195
+ httpStatusCode: output.statusCode,
2196
+ requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
2197
+ extendedRequestId: output.headers["x-amz-id-2"],
2198
+ cfId: output.headers["x-amz-cf-id"],
2199
+ });
2200
+ };
2201
+ var collectBody = function (streamBody, context) {
2202
+ if (streamBody === void 0) { streamBody = new Uint8Array(); }
1771
2203
  if (streamBody instanceof Uint8Array) {
1772
2204
  return Promise.resolve(streamBody);
1773
2205
  }
1774
2206
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1775
2207
  };
1776
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1777
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1778
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1779
- const contents = {
1780
- protocol,
1781
- hostname,
1782
- port,
1783
- method: "POST",
1784
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1785
- headers,
1786
- };
1787
- if (resolvedHostname !== undefined) {
1788
- contents.hostname = resolvedHostname;
1789
- }
1790
- if (body !== undefined) {
1791
- contents.body = body;
1792
- }
1793
- return new __HttpRequest(contents);
2208
+ var collectBodyString = function (streamBody, context) {
2209
+ return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
2210
+ };
2211
+ var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, body) { return __awaiter(void 0, void 0, void 0, function () {
2212
+ var _a, hostname, _b, protocol, port, basePath, contents;
2213
+ return __generator(this, function (_c) {
2214
+ switch (_c.label) {
2215
+ case 0: return [4, context.endpoint()];
2216
+ case 1:
2217
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
2218
+ contents = {
2219
+ protocol: protocol,
2220
+ hostname: hostname,
2221
+ port: port,
2222
+ method: "POST",
2223
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2224
+ headers: headers,
2225
+ };
2226
+ if (resolvedHostname !== undefined) {
2227
+ contents.hostname = resolvedHostname;
2228
+ }
2229
+ if (body !== undefined) {
2230
+ contents.body = body;
2231
+ }
2232
+ return [2, new __HttpRequest(contents)];
2233
+ }
2234
+ });
2235
+ }); };
2236
+ var parseBody = function (streamBody, context) {
2237
+ return collectBodyString(streamBody, context).then(function (encoded) {
2238
+ if (encoded.length) {
2239
+ return JSON.parse(encoded);
2240
+ }
2241
+ return {};
2242
+ });
1794
2243
  };
1795
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1796
- if (encoded.length) {
1797
- return JSON.parse(encoded);
1798
- }
1799
- return {};
1800
- });
1801
- const parseErrorBody = async (errorBody, context) => {
1802
- const value = await parseBody(errorBody, context);
1803
- value.message = value.message ?? value.Message;
1804
- return value;
1805
- };
1806
- const loadRestJsonErrorCode = (output, data) => {
1807
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1808
- const sanitizeErrorCode = (rawValue) => {
1809
- let cleanValue = rawValue;
2244
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
2245
+ var value;
2246
+ var _a;
2247
+ return __generator(this, function (_b) {
2248
+ switch (_b.label) {
2249
+ case 0: return [4, parseBody(errorBody, context)];
2250
+ case 1:
2251
+ value = _b.sent();
2252
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
2253
+ return [2, value];
2254
+ }
2255
+ });
2256
+ }); };
2257
+ var loadRestJsonErrorCode = function (output, data) {
2258
+ var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
2259
+ var sanitizeErrorCode = function (rawValue) {
2260
+ var cleanValue = rawValue;
1810
2261
  if (typeof cleanValue === "number") {
1811
2262
  cleanValue = cleanValue.toString();
1812
2263
  }
@@ -1821,7 +2272,7 @@ const loadRestJsonErrorCode = (output, data) => {
1821
2272
  }
1822
2273
  return cleanValue;
1823
2274
  };
1824
- const headerKey = findKey(output.headers, "x-amzn-errortype");
2275
+ var headerKey = findKey(output.headers, "x-amzn-errortype");
1825
2276
  if (headerKey !== undefined) {
1826
2277
  return sanitizeErrorCode(output.headers[headerKey]);
1827
2278
  }