@aws-sdk/client-budgets 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 (44) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist-cjs/protocols/Aws_json1_1.js +2 -2
  3. package/dist-es/Budgets.js +101 -94
  4. package/dist-es/BudgetsClient.js +28 -22
  5. package/dist-es/commands/CreateBudgetActionCommand.js +28 -21
  6. package/dist-es/commands/CreateBudgetCommand.js +28 -21
  7. package/dist-es/commands/CreateNotificationCommand.js +28 -21
  8. package/dist-es/commands/CreateSubscriberCommand.js +28 -21
  9. package/dist-es/commands/DeleteBudgetActionCommand.js +28 -21
  10. package/dist-es/commands/DeleteBudgetCommand.js +28 -21
  11. package/dist-es/commands/DeleteNotificationCommand.js +28 -21
  12. package/dist-es/commands/DeleteSubscriberCommand.js +28 -21
  13. package/dist-es/commands/DescribeBudgetActionCommand.js +28 -21
  14. package/dist-es/commands/DescribeBudgetActionHistoriesCommand.js +28 -21
  15. package/dist-es/commands/DescribeBudgetActionsForAccountCommand.js +28 -21
  16. package/dist-es/commands/DescribeBudgetActionsForBudgetCommand.js +28 -21
  17. package/dist-es/commands/DescribeBudgetCommand.js +28 -21
  18. package/dist-es/commands/DescribeBudgetNotificationsForAccountCommand.js +28 -21
  19. package/dist-es/commands/DescribeBudgetPerformanceHistoryCommand.js +28 -21
  20. package/dist-es/commands/DescribeBudgetsCommand.js +28 -21
  21. package/dist-es/commands/DescribeNotificationsForBudgetCommand.js +28 -21
  22. package/dist-es/commands/DescribeSubscribersForNotificationCommand.js +28 -21
  23. package/dist-es/commands/ExecuteBudgetActionCommand.js +28 -21
  24. package/dist-es/commands/UpdateBudgetActionCommand.js +28 -21
  25. package/dist-es/commands/UpdateBudgetCommand.js +28 -21
  26. package/dist-es/commands/UpdateNotificationCommand.js +28 -21
  27. package/dist-es/commands/UpdateSubscriberCommand.js +28 -21
  28. package/dist-es/endpoints.js +8 -8
  29. package/dist-es/models/BudgetsServiceException.js +10 -5
  30. package/dist-es/models/models_0.js +190 -340
  31. package/dist-es/pagination/DescribeBudgetActionHistoriesPaginator.js +68 -25
  32. package/dist-es/pagination/DescribeBudgetActionsForAccountPaginator.js +68 -25
  33. package/dist-es/pagination/DescribeBudgetActionsForBudgetPaginator.js +68 -25
  34. package/dist-es/pagination/DescribeBudgetNotificationsForAccountPaginator.js +68 -25
  35. package/dist-es/pagination/DescribeBudgetPerformanceHistoryPaginator.js +68 -25
  36. package/dist-es/pagination/DescribeBudgetsPaginator.js +68 -25
  37. package/dist-es/pagination/DescribeNotificationsForBudgetPaginator.js +68 -25
  38. package/dist-es/pagination/DescribeSubscribersForNotificationPaginator.js +68 -25
  39. package/dist-es/protocols/Aws_json1_1.js +2302 -1894
  40. package/dist-es/runtimeConfig.browser.js +12 -26
  41. package/dist-es/runtimeConfig.js +12 -30
  42. package/dist-es/runtimeConfig.native.js +5 -8
  43. package/dist-es/runtimeConfig.shared.js +11 -8
  44. package/package.json +5 -5
@@ -1,1825 +1,2212 @@
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 { BudgetsServiceException as __BaseException } from "../models/BudgetsServiceException";
4
5
  import { AccessDeniedException, CreationLimitExceededException, DuplicateRecordException, ExpiredNextTokenException, InternalErrorException, InvalidNextTokenException, InvalidParameterException, NotFoundException, ResourceLockedException, ThrottlingException, } from "../models/models_0";
5
- export const serializeAws_json1_1CreateBudgetCommand = async (input, context) => {
6
- const headers = {
7
- "content-type": "application/x-amz-json-1.1",
8
- "x-amz-target": "AWSBudgetServiceGateway.CreateBudget",
9
- };
10
- let body;
11
- body = JSON.stringify(serializeAws_json1_1CreateBudgetRequest(input, context));
12
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
- };
14
- export const serializeAws_json1_1CreateBudgetActionCommand = async (input, context) => {
15
- const headers = {
16
- "content-type": "application/x-amz-json-1.1",
17
- "x-amz-target": "AWSBudgetServiceGateway.CreateBudgetAction",
18
- };
19
- let body;
20
- body = JSON.stringify(serializeAws_json1_1CreateBudgetActionRequest(input, context));
21
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
- };
23
- export const serializeAws_json1_1CreateNotificationCommand = async (input, context) => {
24
- const headers = {
25
- "content-type": "application/x-amz-json-1.1",
26
- "x-amz-target": "AWSBudgetServiceGateway.CreateNotification",
27
- };
28
- let body;
29
- body = JSON.stringify(serializeAws_json1_1CreateNotificationRequest(input, context));
30
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
31
- };
32
- export const serializeAws_json1_1CreateSubscriberCommand = async (input, context) => {
33
- const headers = {
34
- "content-type": "application/x-amz-json-1.1",
35
- "x-amz-target": "AWSBudgetServiceGateway.CreateSubscriber",
36
- };
37
- let body;
38
- body = JSON.stringify(serializeAws_json1_1CreateSubscriberRequest(input, context));
39
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
- };
41
- export const serializeAws_json1_1DeleteBudgetCommand = async (input, context) => {
42
- const headers = {
43
- "content-type": "application/x-amz-json-1.1",
44
- "x-amz-target": "AWSBudgetServiceGateway.DeleteBudget",
45
- };
46
- let body;
47
- body = JSON.stringify(serializeAws_json1_1DeleteBudgetRequest(input, context));
48
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
- };
50
- export const serializeAws_json1_1DeleteBudgetActionCommand = async (input, context) => {
51
- const headers = {
52
- "content-type": "application/x-amz-json-1.1",
53
- "x-amz-target": "AWSBudgetServiceGateway.DeleteBudgetAction",
54
- };
55
- let body;
56
- body = JSON.stringify(serializeAws_json1_1DeleteBudgetActionRequest(input, context));
57
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
- };
59
- export const serializeAws_json1_1DeleteNotificationCommand = async (input, context) => {
60
- const headers = {
61
- "content-type": "application/x-amz-json-1.1",
62
- "x-amz-target": "AWSBudgetServiceGateway.DeleteNotification",
63
- };
64
- let body;
65
- body = JSON.stringify(serializeAws_json1_1DeleteNotificationRequest(input, context));
66
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
67
- };
68
- export const serializeAws_json1_1DeleteSubscriberCommand = async (input, context) => {
69
- const headers = {
70
- "content-type": "application/x-amz-json-1.1",
71
- "x-amz-target": "AWSBudgetServiceGateway.DeleteSubscriber",
72
- };
73
- let body;
74
- body = JSON.stringify(serializeAws_json1_1DeleteSubscriberRequest(input, context));
75
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
- };
77
- export const serializeAws_json1_1DescribeBudgetCommand = async (input, context) => {
78
- const headers = {
79
- "content-type": "application/x-amz-json-1.1",
80
- "x-amz-target": "AWSBudgetServiceGateway.DescribeBudget",
81
- };
82
- let body;
83
- body = JSON.stringify(serializeAws_json1_1DescribeBudgetRequest(input, context));
84
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
85
- };
86
- export const serializeAws_json1_1DescribeBudgetActionCommand = async (input, context) => {
87
- const headers = {
88
- "content-type": "application/x-amz-json-1.1",
89
- "x-amz-target": "AWSBudgetServiceGateway.DescribeBudgetAction",
90
- };
91
- let body;
92
- body = JSON.stringify(serializeAws_json1_1DescribeBudgetActionRequest(input, context));
93
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
94
- };
95
- export const serializeAws_json1_1DescribeBudgetActionHistoriesCommand = async (input, context) => {
96
- const headers = {
97
- "content-type": "application/x-amz-json-1.1",
98
- "x-amz-target": "AWSBudgetServiceGateway.DescribeBudgetActionHistories",
99
- };
100
- let body;
101
- body = JSON.stringify(serializeAws_json1_1DescribeBudgetActionHistoriesRequest(input, context));
102
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
103
- };
104
- export const serializeAws_json1_1DescribeBudgetActionsForAccountCommand = async (input, context) => {
105
- const headers = {
106
- "content-type": "application/x-amz-json-1.1",
107
- "x-amz-target": "AWSBudgetServiceGateway.DescribeBudgetActionsForAccount",
108
- };
109
- let body;
110
- body = JSON.stringify(serializeAws_json1_1DescribeBudgetActionsForAccountRequest(input, context));
111
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
- };
113
- export const serializeAws_json1_1DescribeBudgetActionsForBudgetCommand = async (input, context) => {
114
- const headers = {
115
- "content-type": "application/x-amz-json-1.1",
116
- "x-amz-target": "AWSBudgetServiceGateway.DescribeBudgetActionsForBudget",
117
- };
118
- let body;
119
- body = JSON.stringify(serializeAws_json1_1DescribeBudgetActionsForBudgetRequest(input, context));
120
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
121
- };
122
- export const serializeAws_json1_1DescribeBudgetNotificationsForAccountCommand = async (input, context) => {
123
- const headers = {
124
- "content-type": "application/x-amz-json-1.1",
125
- "x-amz-target": "AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount",
126
- };
127
- let body;
128
- body = JSON.stringify(serializeAws_json1_1DescribeBudgetNotificationsForAccountRequest(input, context));
129
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
130
- };
131
- export const serializeAws_json1_1DescribeBudgetPerformanceHistoryCommand = async (input, context) => {
132
- const headers = {
133
- "content-type": "application/x-amz-json-1.1",
134
- "x-amz-target": "AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory",
135
- };
136
- let body;
137
- body = JSON.stringify(serializeAws_json1_1DescribeBudgetPerformanceHistoryRequest(input, context));
138
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
139
- };
140
- export const serializeAws_json1_1DescribeBudgetsCommand = async (input, context) => {
141
- const headers = {
142
- "content-type": "application/x-amz-json-1.1",
143
- "x-amz-target": "AWSBudgetServiceGateway.DescribeBudgets",
144
- };
145
- let body;
146
- body = JSON.stringify(serializeAws_json1_1DescribeBudgetsRequest(input, context));
147
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
148
- };
149
- export const serializeAws_json1_1DescribeNotificationsForBudgetCommand = async (input, context) => {
150
- const headers = {
151
- "content-type": "application/x-amz-json-1.1",
152
- "x-amz-target": "AWSBudgetServiceGateway.DescribeNotificationsForBudget",
153
- };
154
- let body;
155
- body = JSON.stringify(serializeAws_json1_1DescribeNotificationsForBudgetRequest(input, context));
156
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
157
- };
158
- export const serializeAws_json1_1DescribeSubscribersForNotificationCommand = async (input, context) => {
159
- const headers = {
160
- "content-type": "application/x-amz-json-1.1",
161
- "x-amz-target": "AWSBudgetServiceGateway.DescribeSubscribersForNotification",
162
- };
163
- let body;
164
- body = JSON.stringify(serializeAws_json1_1DescribeSubscribersForNotificationRequest(input, context));
165
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
166
- };
167
- export const serializeAws_json1_1ExecuteBudgetActionCommand = async (input, context) => {
168
- const headers = {
169
- "content-type": "application/x-amz-json-1.1",
170
- "x-amz-target": "AWSBudgetServiceGateway.ExecuteBudgetAction",
171
- };
172
- let body;
173
- body = JSON.stringify(serializeAws_json1_1ExecuteBudgetActionRequest(input, context));
174
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
175
- };
176
- export const serializeAws_json1_1UpdateBudgetCommand = async (input, context) => {
177
- const headers = {
178
- "content-type": "application/x-amz-json-1.1",
179
- "x-amz-target": "AWSBudgetServiceGateway.UpdateBudget",
180
- };
181
- let body;
182
- body = JSON.stringify(serializeAws_json1_1UpdateBudgetRequest(input, context));
183
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
184
- };
185
- export const serializeAws_json1_1UpdateBudgetActionCommand = async (input, context) => {
186
- const headers = {
187
- "content-type": "application/x-amz-json-1.1",
188
- "x-amz-target": "AWSBudgetServiceGateway.UpdateBudgetAction",
189
- };
190
- let body;
191
- body = JSON.stringify(serializeAws_json1_1UpdateBudgetActionRequest(input, context));
192
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
193
- };
194
- export const serializeAws_json1_1UpdateNotificationCommand = async (input, context) => {
195
- const headers = {
196
- "content-type": "application/x-amz-json-1.1",
197
- "x-amz-target": "AWSBudgetServiceGateway.UpdateNotification",
198
- };
199
- let body;
200
- body = JSON.stringify(serializeAws_json1_1UpdateNotificationRequest(input, context));
201
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
202
- };
203
- export const serializeAws_json1_1UpdateSubscriberCommand = async (input, context) => {
204
- const headers = {
205
- "content-type": "application/x-amz-json-1.1",
206
- "x-amz-target": "AWSBudgetServiceGateway.UpdateSubscriber",
207
- };
208
- let body;
209
- body = JSON.stringify(serializeAws_json1_1UpdateSubscriberRequest(input, context));
210
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
211
- };
212
- export const deserializeAws_json1_1CreateBudgetCommand = async (output, context) => {
213
- if (output.statusCode >= 300) {
214
- return deserializeAws_json1_1CreateBudgetCommandError(output, context);
215
- }
216
- const data = await parseBody(output.body, context);
217
- let contents = {};
218
- contents = deserializeAws_json1_1CreateBudgetResponse(data, context);
219
- const response = {
220
- $metadata: deserializeMetadata(output),
221
- ...contents,
222
- };
223
- return Promise.resolve(response);
224
- };
225
- const deserializeAws_json1_1CreateBudgetCommandError = async (output, context) => {
226
- const parsedOutput = {
227
- ...output,
228
- body: await parseErrorBody(output.body, context),
229
- };
230
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
231
- switch (errorCode) {
232
- case "AccessDeniedException":
233
- case "com.amazonaws.budgets#AccessDeniedException":
234
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
235
- case "CreationLimitExceededException":
236
- case "com.amazonaws.budgets#CreationLimitExceededException":
237
- throw await deserializeAws_json1_1CreationLimitExceededExceptionResponse(parsedOutput, context);
238
- case "DuplicateRecordException":
239
- case "com.amazonaws.budgets#DuplicateRecordException":
240
- throw await deserializeAws_json1_1DuplicateRecordExceptionResponse(parsedOutput, context);
241
- case "InternalErrorException":
242
- case "com.amazonaws.budgets#InternalErrorException":
243
- throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
244
- case "InvalidParameterException":
245
- case "com.amazonaws.budgets#InvalidParameterException":
246
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
247
- case "ThrottlingException":
248
- case "com.amazonaws.budgets#ThrottlingException":
249
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
250
- default:
251
- const parsedBody = parsedOutput.body;
252
- throwDefaultError({
253
- output,
254
- parsedBody,
255
- exceptionCtor: __BaseException,
256
- errorCode,
257
- });
258
- }
259
- };
260
- export const deserializeAws_json1_1CreateBudgetActionCommand = async (output, context) => {
261
- if (output.statusCode >= 300) {
262
- return deserializeAws_json1_1CreateBudgetActionCommandError(output, context);
263
- }
264
- const data = await parseBody(output.body, context);
265
- let contents = {};
266
- contents = deserializeAws_json1_1CreateBudgetActionResponse(data, context);
267
- const response = {
268
- $metadata: deserializeMetadata(output),
269
- ...contents,
270
- };
271
- return Promise.resolve(response);
272
- };
273
- const deserializeAws_json1_1CreateBudgetActionCommandError = async (output, context) => {
274
- const parsedOutput = {
275
- ...output,
276
- body: await parseErrorBody(output.body, context),
277
- };
278
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
279
- switch (errorCode) {
280
- case "AccessDeniedException":
281
- case "com.amazonaws.budgets#AccessDeniedException":
282
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
283
- case "CreationLimitExceededException":
284
- case "com.amazonaws.budgets#CreationLimitExceededException":
285
- throw await deserializeAws_json1_1CreationLimitExceededExceptionResponse(parsedOutput, context);
286
- case "DuplicateRecordException":
287
- case "com.amazonaws.budgets#DuplicateRecordException":
288
- throw await deserializeAws_json1_1DuplicateRecordExceptionResponse(parsedOutput, context);
289
- case "InternalErrorException":
290
- case "com.amazonaws.budgets#InternalErrorException":
291
- throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
292
- case "InvalidParameterException":
293
- case "com.amazonaws.budgets#InvalidParameterException":
294
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
295
- case "NotFoundException":
296
- case "com.amazonaws.budgets#NotFoundException":
297
- throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
298
- case "ThrottlingException":
299
- case "com.amazonaws.budgets#ThrottlingException":
300
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
301
- default:
302
- const parsedBody = parsedOutput.body;
303
- throwDefaultError({
304
- output,
305
- parsedBody,
306
- exceptionCtor: __BaseException,
307
- errorCode,
308
- });
309
- }
310
- };
311
- export const deserializeAws_json1_1CreateNotificationCommand = async (output, context) => {
312
- if (output.statusCode >= 300) {
313
- return deserializeAws_json1_1CreateNotificationCommandError(output, context);
314
- }
315
- const data = await parseBody(output.body, context);
316
- let contents = {};
317
- contents = deserializeAws_json1_1CreateNotificationResponse(data, context);
318
- const response = {
319
- $metadata: deserializeMetadata(output),
320
- ...contents,
321
- };
322
- return Promise.resolve(response);
323
- };
324
- const deserializeAws_json1_1CreateNotificationCommandError = async (output, context) => {
325
- const parsedOutput = {
326
- ...output,
327
- body: await parseErrorBody(output.body, context),
328
- };
329
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
330
- switch (errorCode) {
331
- case "AccessDeniedException":
332
- case "com.amazonaws.budgets#AccessDeniedException":
333
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
334
- case "CreationLimitExceededException":
335
- case "com.amazonaws.budgets#CreationLimitExceededException":
336
- throw await deserializeAws_json1_1CreationLimitExceededExceptionResponse(parsedOutput, context);
337
- case "DuplicateRecordException":
338
- case "com.amazonaws.budgets#DuplicateRecordException":
339
- throw await deserializeAws_json1_1DuplicateRecordExceptionResponse(parsedOutput, context);
340
- case "InternalErrorException":
341
- case "com.amazonaws.budgets#InternalErrorException":
342
- throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
343
- case "InvalidParameterException":
344
- case "com.amazonaws.budgets#InvalidParameterException":
345
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
346
- case "NotFoundException":
347
- case "com.amazonaws.budgets#NotFoundException":
348
- throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
349
- case "ThrottlingException":
350
- case "com.amazonaws.budgets#ThrottlingException":
351
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
352
- default:
353
- const parsedBody = parsedOutput.body;
354
- throwDefaultError({
355
- output,
356
- parsedBody,
357
- exceptionCtor: __BaseException,
358
- errorCode,
359
- });
360
- }
361
- };
362
- export const deserializeAws_json1_1CreateSubscriberCommand = async (output, context) => {
363
- if (output.statusCode >= 300) {
364
- return deserializeAws_json1_1CreateSubscriberCommandError(output, context);
365
- }
366
- const data = await parseBody(output.body, context);
367
- let contents = {};
368
- contents = deserializeAws_json1_1CreateSubscriberResponse(data, context);
369
- const response = {
370
- $metadata: deserializeMetadata(output),
371
- ...contents,
372
- };
373
- return Promise.resolve(response);
374
- };
375
- const deserializeAws_json1_1CreateSubscriberCommandError = async (output, context) => {
376
- const parsedOutput = {
377
- ...output,
378
- body: await parseErrorBody(output.body, context),
379
- };
380
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
381
- switch (errorCode) {
382
- case "AccessDeniedException":
383
- case "com.amazonaws.budgets#AccessDeniedException":
384
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
385
- case "CreationLimitExceededException":
386
- case "com.amazonaws.budgets#CreationLimitExceededException":
387
- throw await deserializeAws_json1_1CreationLimitExceededExceptionResponse(parsedOutput, context);
388
- case "DuplicateRecordException":
389
- case "com.amazonaws.budgets#DuplicateRecordException":
390
- throw await deserializeAws_json1_1DuplicateRecordExceptionResponse(parsedOutput, context);
391
- case "InternalErrorException":
392
- case "com.amazonaws.budgets#InternalErrorException":
393
- throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
394
- case "InvalidParameterException":
395
- case "com.amazonaws.budgets#InvalidParameterException":
396
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
397
- case "NotFoundException":
398
- case "com.amazonaws.budgets#NotFoundException":
399
- throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
400
- case "ThrottlingException":
401
- case "com.amazonaws.budgets#ThrottlingException":
402
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
403
- default:
404
- const parsedBody = parsedOutput.body;
405
- throwDefaultError({
406
- output,
407
- parsedBody,
408
- exceptionCtor: __BaseException,
409
- errorCode,
410
- });
411
- }
412
- };
413
- export const deserializeAws_json1_1DeleteBudgetCommand = async (output, context) => {
414
- if (output.statusCode >= 300) {
415
- return deserializeAws_json1_1DeleteBudgetCommandError(output, context);
416
- }
417
- const data = await parseBody(output.body, context);
418
- let contents = {};
419
- contents = deserializeAws_json1_1DeleteBudgetResponse(data, context);
420
- const response = {
421
- $metadata: deserializeMetadata(output),
422
- ...contents,
423
- };
424
- return Promise.resolve(response);
425
- };
426
- const deserializeAws_json1_1DeleteBudgetCommandError = async (output, context) => {
427
- const parsedOutput = {
428
- ...output,
429
- body: await parseErrorBody(output.body, context),
430
- };
431
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
432
- switch (errorCode) {
433
- case "AccessDeniedException":
434
- case "com.amazonaws.budgets#AccessDeniedException":
435
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
436
- case "InternalErrorException":
437
- case "com.amazonaws.budgets#InternalErrorException":
438
- throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
439
- case "InvalidParameterException":
440
- case "com.amazonaws.budgets#InvalidParameterException":
441
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
442
- case "NotFoundException":
443
- case "com.amazonaws.budgets#NotFoundException":
444
- throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
445
- case "ThrottlingException":
446
- case "com.amazonaws.budgets#ThrottlingException":
447
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
448
- default:
449
- const parsedBody = parsedOutput.body;
450
- throwDefaultError({
451
- output,
452
- parsedBody,
453
- exceptionCtor: __BaseException,
454
- errorCode,
455
- });
456
- }
457
- };
458
- export const deserializeAws_json1_1DeleteBudgetActionCommand = async (output, context) => {
459
- if (output.statusCode >= 300) {
460
- return deserializeAws_json1_1DeleteBudgetActionCommandError(output, context);
461
- }
462
- const data = await parseBody(output.body, context);
463
- let contents = {};
464
- contents = deserializeAws_json1_1DeleteBudgetActionResponse(data, context);
465
- const response = {
466
- $metadata: deserializeMetadata(output),
467
- ...contents,
468
- };
469
- return Promise.resolve(response);
470
- };
471
- const deserializeAws_json1_1DeleteBudgetActionCommandError = async (output, context) => {
472
- const parsedOutput = {
473
- ...output,
474
- body: await parseErrorBody(output.body, context),
475
- };
476
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
477
- switch (errorCode) {
478
- case "AccessDeniedException":
479
- case "com.amazonaws.budgets#AccessDeniedException":
480
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
481
- case "InternalErrorException":
482
- case "com.amazonaws.budgets#InternalErrorException":
483
- throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
484
- case "InvalidParameterException":
485
- case "com.amazonaws.budgets#InvalidParameterException":
486
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
487
- case "NotFoundException":
488
- case "com.amazonaws.budgets#NotFoundException":
489
- throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
490
- case "ResourceLockedException":
491
- case "com.amazonaws.budgets#ResourceLockedException":
492
- throw await deserializeAws_json1_1ResourceLockedExceptionResponse(parsedOutput, context);
493
- case "ThrottlingException":
494
- case "com.amazonaws.budgets#ThrottlingException":
495
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
496
- default:
497
- const parsedBody = parsedOutput.body;
498
- throwDefaultError({
499
- output,
500
- parsedBody,
501
- exceptionCtor: __BaseException,
502
- errorCode,
503
- });
504
- }
505
- };
506
- export const deserializeAws_json1_1DeleteNotificationCommand = async (output, context) => {
507
- if (output.statusCode >= 300) {
508
- return deserializeAws_json1_1DeleteNotificationCommandError(output, context);
509
- }
510
- const data = await parseBody(output.body, context);
511
- let contents = {};
512
- contents = deserializeAws_json1_1DeleteNotificationResponse(data, context);
513
- const response = {
514
- $metadata: deserializeMetadata(output),
515
- ...contents,
516
- };
517
- return Promise.resolve(response);
518
- };
519
- const deserializeAws_json1_1DeleteNotificationCommandError = async (output, context) => {
520
- const parsedOutput = {
521
- ...output,
522
- body: await parseErrorBody(output.body, context),
523
- };
524
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
525
- switch (errorCode) {
526
- case "AccessDeniedException":
527
- case "com.amazonaws.budgets#AccessDeniedException":
528
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
529
- case "InternalErrorException":
530
- case "com.amazonaws.budgets#InternalErrorException":
531
- throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
532
- case "InvalidParameterException":
533
- case "com.amazonaws.budgets#InvalidParameterException":
534
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
535
- case "NotFoundException":
536
- case "com.amazonaws.budgets#NotFoundException":
537
- throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
538
- case "ThrottlingException":
539
- case "com.amazonaws.budgets#ThrottlingException":
540
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
541
- default:
542
- const parsedBody = parsedOutput.body;
543
- throwDefaultError({
544
- output,
545
- parsedBody,
546
- exceptionCtor: __BaseException,
547
- errorCode,
548
- });
549
- }
550
- };
551
- export const deserializeAws_json1_1DeleteSubscriberCommand = async (output, context) => {
552
- if (output.statusCode >= 300) {
553
- return deserializeAws_json1_1DeleteSubscriberCommandError(output, context);
554
- }
555
- const data = await parseBody(output.body, context);
556
- let contents = {};
557
- contents = deserializeAws_json1_1DeleteSubscriberResponse(data, context);
558
- const response = {
559
- $metadata: deserializeMetadata(output),
560
- ...contents,
561
- };
562
- return Promise.resolve(response);
563
- };
564
- const deserializeAws_json1_1DeleteSubscriberCommandError = async (output, context) => {
565
- const parsedOutput = {
566
- ...output,
567
- body: await parseErrorBody(output.body, context),
568
- };
569
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
570
- switch (errorCode) {
571
- case "AccessDeniedException":
572
- case "com.amazonaws.budgets#AccessDeniedException":
573
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
574
- case "InternalErrorException":
575
- case "com.amazonaws.budgets#InternalErrorException":
576
- throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
577
- case "InvalidParameterException":
578
- case "com.amazonaws.budgets#InvalidParameterException":
579
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
580
- case "NotFoundException":
581
- case "com.amazonaws.budgets#NotFoundException":
582
- throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
583
- case "ThrottlingException":
584
- case "com.amazonaws.budgets#ThrottlingException":
585
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
586
- default:
587
- const parsedBody = parsedOutput.body;
588
- throwDefaultError({
589
- output,
590
- parsedBody,
591
- exceptionCtor: __BaseException,
592
- errorCode,
593
- });
594
- }
595
- };
596
- export const deserializeAws_json1_1DescribeBudgetCommand = async (output, context) => {
597
- if (output.statusCode >= 300) {
598
- return deserializeAws_json1_1DescribeBudgetCommandError(output, context);
599
- }
600
- const data = await parseBody(output.body, context);
601
- let contents = {};
602
- contents = deserializeAws_json1_1DescribeBudgetResponse(data, context);
603
- const response = {
604
- $metadata: deserializeMetadata(output),
605
- ...contents,
606
- };
607
- return Promise.resolve(response);
608
- };
609
- const deserializeAws_json1_1DescribeBudgetCommandError = async (output, context) => {
610
- const parsedOutput = {
611
- ...output,
612
- body: await parseErrorBody(output.body, context),
613
- };
614
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
615
- switch (errorCode) {
616
- case "AccessDeniedException":
617
- case "com.amazonaws.budgets#AccessDeniedException":
618
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
619
- case "InternalErrorException":
620
- case "com.amazonaws.budgets#InternalErrorException":
621
- throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
622
- case "InvalidParameterException":
623
- case "com.amazonaws.budgets#InvalidParameterException":
624
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
625
- case "NotFoundException":
626
- case "com.amazonaws.budgets#NotFoundException":
627
- throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
628
- case "ThrottlingException":
629
- case "com.amazonaws.budgets#ThrottlingException":
630
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
631
- default:
632
- const parsedBody = parsedOutput.body;
633
- throwDefaultError({
634
- output,
635
- parsedBody,
636
- exceptionCtor: __BaseException,
637
- errorCode,
638
- });
639
- }
640
- };
641
- export const deserializeAws_json1_1DescribeBudgetActionCommand = async (output, context) => {
642
- if (output.statusCode >= 300) {
643
- return deserializeAws_json1_1DescribeBudgetActionCommandError(output, context);
644
- }
645
- const data = await parseBody(output.body, context);
646
- let contents = {};
647
- contents = deserializeAws_json1_1DescribeBudgetActionResponse(data, context);
648
- const response = {
649
- $metadata: deserializeMetadata(output),
650
- ...contents,
651
- };
652
- return Promise.resolve(response);
653
- };
654
- const deserializeAws_json1_1DescribeBudgetActionCommandError = async (output, context) => {
655
- const parsedOutput = {
656
- ...output,
657
- body: await parseErrorBody(output.body, context),
658
- };
659
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
660
- switch (errorCode) {
661
- case "AccessDeniedException":
662
- case "com.amazonaws.budgets#AccessDeniedException":
663
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
664
- case "InternalErrorException":
665
- case "com.amazonaws.budgets#InternalErrorException":
666
- throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
667
- case "InvalidParameterException":
668
- case "com.amazonaws.budgets#InvalidParameterException":
669
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
670
- case "NotFoundException":
671
- case "com.amazonaws.budgets#NotFoundException":
672
- throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
673
- case "ThrottlingException":
674
- case "com.amazonaws.budgets#ThrottlingException":
675
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
676
- default:
677
- const parsedBody = parsedOutput.body;
678
- throwDefaultError({
679
- output,
680
- parsedBody,
681
- exceptionCtor: __BaseException,
682
- errorCode,
683
- });
684
- }
685
- };
686
- export const deserializeAws_json1_1DescribeBudgetActionHistoriesCommand = async (output, context) => {
687
- if (output.statusCode >= 300) {
688
- return deserializeAws_json1_1DescribeBudgetActionHistoriesCommandError(output, context);
689
- }
690
- const data = await parseBody(output.body, context);
691
- let contents = {};
692
- contents = deserializeAws_json1_1DescribeBudgetActionHistoriesResponse(data, context);
693
- const response = {
694
- $metadata: deserializeMetadata(output),
695
- ...contents,
696
- };
697
- return Promise.resolve(response);
698
- };
699
- const deserializeAws_json1_1DescribeBudgetActionHistoriesCommandError = async (output, context) => {
700
- const parsedOutput = {
701
- ...output,
702
- body: await parseErrorBody(output.body, context),
703
- };
704
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
705
- switch (errorCode) {
706
- case "AccessDeniedException":
707
- case "com.amazonaws.budgets#AccessDeniedException":
708
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
709
- case "InternalErrorException":
710
- case "com.amazonaws.budgets#InternalErrorException":
711
- throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
712
- case "InvalidNextTokenException":
713
- case "com.amazonaws.budgets#InvalidNextTokenException":
714
- throw await deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context);
715
- case "InvalidParameterException":
716
- case "com.amazonaws.budgets#InvalidParameterException":
717
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
718
- case "NotFoundException":
719
- case "com.amazonaws.budgets#NotFoundException":
720
- throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
721
- case "ThrottlingException":
722
- case "com.amazonaws.budgets#ThrottlingException":
723
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
724
- default:
725
- const parsedBody = parsedOutput.body;
726
- throwDefaultError({
727
- output,
728
- parsedBody,
729
- exceptionCtor: __BaseException,
730
- errorCode,
731
- });
732
- }
733
- };
734
- export const deserializeAws_json1_1DescribeBudgetActionsForAccountCommand = async (output, context) => {
735
- if (output.statusCode >= 300) {
736
- return deserializeAws_json1_1DescribeBudgetActionsForAccountCommandError(output, context);
737
- }
738
- const data = await parseBody(output.body, context);
739
- let contents = {};
740
- contents = deserializeAws_json1_1DescribeBudgetActionsForAccountResponse(data, context);
741
- const response = {
742
- $metadata: deserializeMetadata(output),
743
- ...contents,
744
- };
745
- return Promise.resolve(response);
746
- };
747
- const deserializeAws_json1_1DescribeBudgetActionsForAccountCommandError = async (output, context) => {
748
- const parsedOutput = {
749
- ...output,
750
- body: await parseErrorBody(output.body, context),
751
- };
752
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
753
- switch (errorCode) {
754
- case "AccessDeniedException":
755
- case "com.amazonaws.budgets#AccessDeniedException":
756
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
757
- case "InternalErrorException":
758
- case "com.amazonaws.budgets#InternalErrorException":
759
- throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
760
- case "InvalidNextTokenException":
761
- case "com.amazonaws.budgets#InvalidNextTokenException":
762
- throw await deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context);
763
- case "InvalidParameterException":
764
- case "com.amazonaws.budgets#InvalidParameterException":
765
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
766
- case "ThrottlingException":
767
- case "com.amazonaws.budgets#ThrottlingException":
768
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
769
- default:
770
- const parsedBody = parsedOutput.body;
771
- throwDefaultError({
772
- output,
773
- parsedBody,
774
- exceptionCtor: __BaseException,
775
- errorCode,
776
- });
777
- }
778
- };
779
- export const deserializeAws_json1_1DescribeBudgetActionsForBudgetCommand = async (output, context) => {
780
- if (output.statusCode >= 300) {
781
- return deserializeAws_json1_1DescribeBudgetActionsForBudgetCommandError(output, context);
782
- }
783
- const data = await parseBody(output.body, context);
784
- let contents = {};
785
- contents = deserializeAws_json1_1DescribeBudgetActionsForBudgetResponse(data, context);
786
- const response = {
787
- $metadata: deserializeMetadata(output),
788
- ...contents,
789
- };
790
- return Promise.resolve(response);
791
- };
792
- const deserializeAws_json1_1DescribeBudgetActionsForBudgetCommandError = async (output, context) => {
793
- const parsedOutput = {
794
- ...output,
795
- body: await parseErrorBody(output.body, context),
796
- };
797
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
798
- switch (errorCode) {
799
- case "AccessDeniedException":
800
- case "com.amazonaws.budgets#AccessDeniedException":
801
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
802
- case "InternalErrorException":
803
- case "com.amazonaws.budgets#InternalErrorException":
804
- throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
805
- case "InvalidNextTokenException":
806
- case "com.amazonaws.budgets#InvalidNextTokenException":
807
- throw await deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context);
808
- case "InvalidParameterException":
809
- case "com.amazonaws.budgets#InvalidParameterException":
810
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
811
- case "NotFoundException":
812
- case "com.amazonaws.budgets#NotFoundException":
813
- throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
814
- case "ThrottlingException":
815
- case "com.amazonaws.budgets#ThrottlingException":
816
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
817
- default:
818
- const parsedBody = parsedOutput.body;
819
- throwDefaultError({
820
- output,
821
- parsedBody,
822
- exceptionCtor: __BaseException,
823
- errorCode,
824
- });
825
- }
826
- };
827
- export const deserializeAws_json1_1DescribeBudgetNotificationsForAccountCommand = async (output, context) => {
828
- if (output.statusCode >= 300) {
829
- return deserializeAws_json1_1DescribeBudgetNotificationsForAccountCommandError(output, context);
830
- }
831
- const data = await parseBody(output.body, context);
832
- let contents = {};
833
- contents = deserializeAws_json1_1DescribeBudgetNotificationsForAccountResponse(data, context);
834
- const response = {
835
- $metadata: deserializeMetadata(output),
836
- ...contents,
837
- };
838
- return Promise.resolve(response);
839
- };
840
- const deserializeAws_json1_1DescribeBudgetNotificationsForAccountCommandError = async (output, context) => {
841
- const parsedOutput = {
842
- ...output,
843
- body: await parseErrorBody(output.body, context),
844
- };
845
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
846
- switch (errorCode) {
847
- case "AccessDeniedException":
848
- case "com.amazonaws.budgets#AccessDeniedException":
849
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
850
- case "ExpiredNextTokenException":
851
- case "com.amazonaws.budgets#ExpiredNextTokenException":
852
- throw await deserializeAws_json1_1ExpiredNextTokenExceptionResponse(parsedOutput, context);
853
- case "InternalErrorException":
854
- case "com.amazonaws.budgets#InternalErrorException":
855
- throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
856
- case "InvalidNextTokenException":
857
- case "com.amazonaws.budgets#InvalidNextTokenException":
858
- throw await deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context);
859
- case "InvalidParameterException":
860
- case "com.amazonaws.budgets#InvalidParameterException":
861
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
862
- case "NotFoundException":
863
- case "com.amazonaws.budgets#NotFoundException":
864
- throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
865
- case "ThrottlingException":
866
- case "com.amazonaws.budgets#ThrottlingException":
867
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(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_1DescribeBudgetPerformanceHistoryCommand = async (output, context) => {
879
- if (output.statusCode >= 300) {
880
- return deserializeAws_json1_1DescribeBudgetPerformanceHistoryCommandError(output, context);
881
- }
882
- const data = await parseBody(output.body, context);
883
- let contents = {};
884
- contents = deserializeAws_json1_1DescribeBudgetPerformanceHistoryResponse(data, context);
885
- const response = {
886
- $metadata: deserializeMetadata(output),
887
- ...contents,
888
- };
889
- return Promise.resolve(response);
890
- };
891
- const deserializeAws_json1_1DescribeBudgetPerformanceHistoryCommandError = 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.budgets#AccessDeniedException":
900
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
901
- case "ExpiredNextTokenException":
902
- case "com.amazonaws.budgets#ExpiredNextTokenException":
903
- throw await deserializeAws_json1_1ExpiredNextTokenExceptionResponse(parsedOutput, context);
904
- case "InternalErrorException":
905
- case "com.amazonaws.budgets#InternalErrorException":
906
- throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
907
- case "InvalidNextTokenException":
908
- case "com.amazonaws.budgets#InvalidNextTokenException":
909
- throw await deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context);
910
- case "InvalidParameterException":
911
- case "com.amazonaws.budgets#InvalidParameterException":
912
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
913
- case "NotFoundException":
914
- case "com.amazonaws.budgets#NotFoundException":
915
- throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
916
- case "ThrottlingException":
917
- case "com.amazonaws.budgets#ThrottlingException":
918
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
919
- default:
920
- const parsedBody = parsedOutput.body;
921
- throwDefaultError({
922
- output,
923
- parsedBody,
924
- exceptionCtor: __BaseException,
925
- errorCode,
926
- });
927
- }
928
- };
929
- export const deserializeAws_json1_1DescribeBudgetsCommand = async (output, context) => {
930
- if (output.statusCode >= 300) {
931
- return deserializeAws_json1_1DescribeBudgetsCommandError(output, context);
932
- }
933
- const data = await parseBody(output.body, context);
934
- let contents = {};
935
- contents = deserializeAws_json1_1DescribeBudgetsResponse(data, context);
936
- const response = {
937
- $metadata: deserializeMetadata(output),
938
- ...contents,
939
- };
940
- return Promise.resolve(response);
941
- };
942
- const deserializeAws_json1_1DescribeBudgetsCommandError = async (output, context) => {
943
- const parsedOutput = {
944
- ...output,
945
- body: await parseErrorBody(output.body, context),
946
- };
947
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
948
- switch (errorCode) {
949
- case "AccessDeniedException":
950
- case "com.amazonaws.budgets#AccessDeniedException":
951
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
952
- case "ExpiredNextTokenException":
953
- case "com.amazonaws.budgets#ExpiredNextTokenException":
954
- throw await deserializeAws_json1_1ExpiredNextTokenExceptionResponse(parsedOutput, context);
955
- case "InternalErrorException":
956
- case "com.amazonaws.budgets#InternalErrorException":
957
- throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
958
- case "InvalidNextTokenException":
959
- case "com.amazonaws.budgets#InvalidNextTokenException":
960
- throw await deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context);
961
- case "InvalidParameterException":
962
- case "com.amazonaws.budgets#InvalidParameterException":
963
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
964
- case "NotFoundException":
965
- case "com.amazonaws.budgets#NotFoundException":
966
- throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
967
- case "ThrottlingException":
968
- case "com.amazonaws.budgets#ThrottlingException":
969
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
970
- default:
971
- const parsedBody = parsedOutput.body;
972
- throwDefaultError({
973
- output,
974
- parsedBody,
975
- exceptionCtor: __BaseException,
976
- errorCode,
977
- });
978
- }
979
- };
980
- export const deserializeAws_json1_1DescribeNotificationsForBudgetCommand = async (output, context) => {
981
- if (output.statusCode >= 300) {
982
- return deserializeAws_json1_1DescribeNotificationsForBudgetCommandError(output, context);
983
- }
984
- const data = await parseBody(output.body, context);
985
- let contents = {};
986
- contents = deserializeAws_json1_1DescribeNotificationsForBudgetResponse(data, context);
987
- const response = {
988
- $metadata: deserializeMetadata(output),
989
- ...contents,
990
- };
991
- return Promise.resolve(response);
992
- };
993
- const deserializeAws_json1_1DescribeNotificationsForBudgetCommandError = async (output, context) => {
994
- const parsedOutput = {
995
- ...output,
996
- body: await parseErrorBody(output.body, context),
997
- };
998
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
999
- switch (errorCode) {
1000
- case "AccessDeniedException":
1001
- case "com.amazonaws.budgets#AccessDeniedException":
1002
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
1003
- case "ExpiredNextTokenException":
1004
- case "com.amazonaws.budgets#ExpiredNextTokenException":
1005
- throw await deserializeAws_json1_1ExpiredNextTokenExceptionResponse(parsedOutput, context);
1006
- case "InternalErrorException":
1007
- case "com.amazonaws.budgets#InternalErrorException":
1008
- throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
1009
- case "InvalidNextTokenException":
1010
- case "com.amazonaws.budgets#InvalidNextTokenException":
1011
- throw await deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context);
1012
- case "InvalidParameterException":
1013
- case "com.amazonaws.budgets#InvalidParameterException":
1014
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
1015
- case "NotFoundException":
1016
- case "com.amazonaws.budgets#NotFoundException":
1017
- throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
1018
- case "ThrottlingException":
1019
- case "com.amazonaws.budgets#ThrottlingException":
1020
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
1021
- default:
1022
- const parsedBody = parsedOutput.body;
1023
- throwDefaultError({
1024
- output,
1025
- parsedBody,
1026
- exceptionCtor: __BaseException,
1027
- errorCode,
1028
- });
1029
- }
1030
- };
1031
- export const deserializeAws_json1_1DescribeSubscribersForNotificationCommand = async (output, context) => {
1032
- if (output.statusCode >= 300) {
1033
- return deserializeAws_json1_1DescribeSubscribersForNotificationCommandError(output, context);
1034
- }
1035
- const data = await parseBody(output.body, context);
1036
- let contents = {};
1037
- contents = deserializeAws_json1_1DescribeSubscribersForNotificationResponse(data, context);
1038
- const response = {
1039
- $metadata: deserializeMetadata(output),
1040
- ...contents,
1041
- };
1042
- return Promise.resolve(response);
1043
- };
1044
- const deserializeAws_json1_1DescribeSubscribersForNotificationCommandError = async (output, context) => {
1045
- const parsedOutput = {
1046
- ...output,
1047
- body: await parseErrorBody(output.body, context),
1048
- };
1049
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1050
- switch (errorCode) {
1051
- case "AccessDeniedException":
1052
- case "com.amazonaws.budgets#AccessDeniedException":
1053
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
1054
- case "ExpiredNextTokenException":
1055
- case "com.amazonaws.budgets#ExpiredNextTokenException":
1056
- throw await deserializeAws_json1_1ExpiredNextTokenExceptionResponse(parsedOutput, context);
1057
- case "InternalErrorException":
1058
- case "com.amazonaws.budgets#InternalErrorException":
1059
- throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
1060
- case "InvalidNextTokenException":
1061
- case "com.amazonaws.budgets#InvalidNextTokenException":
1062
- throw await deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context);
1063
- case "InvalidParameterException":
1064
- case "com.amazonaws.budgets#InvalidParameterException":
1065
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
1066
- case "NotFoundException":
1067
- case "com.amazonaws.budgets#NotFoundException":
1068
- throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
1069
- case "ThrottlingException":
1070
- case "com.amazonaws.budgets#ThrottlingException":
1071
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
1072
- default:
1073
- const parsedBody = parsedOutput.body;
1074
- throwDefaultError({
1075
- output,
1076
- parsedBody,
1077
- exceptionCtor: __BaseException,
1078
- errorCode,
1079
- });
1080
- }
1081
- };
1082
- export const deserializeAws_json1_1ExecuteBudgetActionCommand = async (output, context) => {
1083
- if (output.statusCode >= 300) {
1084
- return deserializeAws_json1_1ExecuteBudgetActionCommandError(output, context);
1085
- }
1086
- const data = await parseBody(output.body, context);
1087
- let contents = {};
1088
- contents = deserializeAws_json1_1ExecuteBudgetActionResponse(data, context);
1089
- const response = {
1090
- $metadata: deserializeMetadata(output),
1091
- ...contents,
1092
- };
1093
- return Promise.resolve(response);
1094
- };
1095
- const deserializeAws_json1_1ExecuteBudgetActionCommandError = async (output, context) => {
1096
- const parsedOutput = {
1097
- ...output,
1098
- body: await parseErrorBody(output.body, context),
1099
- };
1100
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1101
- switch (errorCode) {
1102
- case "AccessDeniedException":
1103
- case "com.amazonaws.budgets#AccessDeniedException":
1104
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
1105
- case "InternalErrorException":
1106
- case "com.amazonaws.budgets#InternalErrorException":
1107
- throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
1108
- case "InvalidParameterException":
1109
- case "com.amazonaws.budgets#InvalidParameterException":
1110
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
1111
- case "NotFoundException":
1112
- case "com.amazonaws.budgets#NotFoundException":
1113
- throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
1114
- case "ResourceLockedException":
1115
- case "com.amazonaws.budgets#ResourceLockedException":
1116
- throw await deserializeAws_json1_1ResourceLockedExceptionResponse(parsedOutput, context);
1117
- case "ThrottlingException":
1118
- case "com.amazonaws.budgets#ThrottlingException":
1119
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
1120
- default:
1121
- const parsedBody = parsedOutput.body;
1122
- throwDefaultError({
1123
- output,
1124
- parsedBody,
1125
- exceptionCtor: __BaseException,
1126
- errorCode,
1127
- });
1128
- }
1129
- };
1130
- export const deserializeAws_json1_1UpdateBudgetCommand = async (output, context) => {
1131
- if (output.statusCode >= 300) {
1132
- return deserializeAws_json1_1UpdateBudgetCommandError(output, context);
1133
- }
1134
- const data = await parseBody(output.body, context);
1135
- let contents = {};
1136
- contents = deserializeAws_json1_1UpdateBudgetResponse(data, context);
1137
- const response = {
1138
- $metadata: deserializeMetadata(output),
1139
- ...contents,
1140
- };
1141
- return Promise.resolve(response);
1142
- };
1143
- const deserializeAws_json1_1UpdateBudgetCommandError = async (output, context) => {
1144
- const parsedOutput = {
1145
- ...output,
1146
- body: await parseErrorBody(output.body, context),
1147
- };
1148
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1149
- switch (errorCode) {
1150
- case "AccessDeniedException":
1151
- case "com.amazonaws.budgets#AccessDeniedException":
1152
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
1153
- case "InternalErrorException":
1154
- case "com.amazonaws.budgets#InternalErrorException":
1155
- throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
1156
- case "InvalidParameterException":
1157
- case "com.amazonaws.budgets#InvalidParameterException":
1158
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
1159
- case "NotFoundException":
1160
- case "com.amazonaws.budgets#NotFoundException":
1161
- throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
1162
- case "ThrottlingException":
1163
- case "com.amazonaws.budgets#ThrottlingException":
1164
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
1165
- default:
1166
- const parsedBody = parsedOutput.body;
1167
- throwDefaultError({
1168
- output,
1169
- parsedBody,
1170
- exceptionCtor: __BaseException,
1171
- errorCode,
1172
- });
1173
- }
1174
- };
1175
- export const deserializeAws_json1_1UpdateBudgetActionCommand = async (output, context) => {
1176
- if (output.statusCode >= 300) {
1177
- return deserializeAws_json1_1UpdateBudgetActionCommandError(output, context);
1178
- }
1179
- const data = await parseBody(output.body, context);
1180
- let contents = {};
1181
- contents = deserializeAws_json1_1UpdateBudgetActionResponse(data, context);
1182
- const response = {
1183
- $metadata: deserializeMetadata(output),
1184
- ...contents,
1185
- };
1186
- return Promise.resolve(response);
1187
- };
1188
- const deserializeAws_json1_1UpdateBudgetActionCommandError = async (output, context) => {
1189
- const parsedOutput = {
1190
- ...output,
1191
- body: await parseErrorBody(output.body, context),
1192
- };
1193
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1194
- switch (errorCode) {
1195
- case "AccessDeniedException":
1196
- case "com.amazonaws.budgets#AccessDeniedException":
1197
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
1198
- case "InternalErrorException":
1199
- case "com.amazonaws.budgets#InternalErrorException":
1200
- throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
1201
- case "InvalidParameterException":
1202
- case "com.amazonaws.budgets#InvalidParameterException":
1203
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
1204
- case "NotFoundException":
1205
- case "com.amazonaws.budgets#NotFoundException":
1206
- throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
1207
- case "ResourceLockedException":
1208
- case "com.amazonaws.budgets#ResourceLockedException":
1209
- throw await deserializeAws_json1_1ResourceLockedExceptionResponse(parsedOutput, context);
1210
- case "ThrottlingException":
1211
- case "com.amazonaws.budgets#ThrottlingException":
1212
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
1213
- default:
1214
- const parsedBody = parsedOutput.body;
1215
- throwDefaultError({
1216
- output,
1217
- parsedBody,
1218
- exceptionCtor: __BaseException,
1219
- errorCode,
1220
- });
1221
- }
1222
- };
1223
- export const deserializeAws_json1_1UpdateNotificationCommand = async (output, context) => {
1224
- if (output.statusCode >= 300) {
1225
- return deserializeAws_json1_1UpdateNotificationCommandError(output, context);
1226
- }
1227
- const data = await parseBody(output.body, context);
1228
- let contents = {};
1229
- contents = deserializeAws_json1_1UpdateNotificationResponse(data, context);
1230
- const response = {
1231
- $metadata: deserializeMetadata(output),
1232
- ...contents,
1233
- };
1234
- return Promise.resolve(response);
1235
- };
1236
- const deserializeAws_json1_1UpdateNotificationCommandError = async (output, context) => {
1237
- const parsedOutput = {
1238
- ...output,
1239
- body: await parseErrorBody(output.body, context),
1240
- };
1241
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1242
- switch (errorCode) {
1243
- case "AccessDeniedException":
1244
- case "com.amazonaws.budgets#AccessDeniedException":
1245
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
1246
- case "DuplicateRecordException":
1247
- case "com.amazonaws.budgets#DuplicateRecordException":
1248
- throw await deserializeAws_json1_1DuplicateRecordExceptionResponse(parsedOutput, context);
1249
- case "InternalErrorException":
1250
- case "com.amazonaws.budgets#InternalErrorException":
1251
- throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
1252
- case "InvalidParameterException":
1253
- case "com.amazonaws.budgets#InvalidParameterException":
1254
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
1255
- case "NotFoundException":
1256
- case "com.amazonaws.budgets#NotFoundException":
1257
- throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
1258
- case "ThrottlingException":
1259
- case "com.amazonaws.budgets#ThrottlingException":
1260
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
1261
- default:
1262
- const parsedBody = parsedOutput.body;
1263
- throwDefaultError({
1264
- output,
1265
- parsedBody,
1266
- exceptionCtor: __BaseException,
1267
- errorCode,
1268
- });
1269
- }
1270
- };
1271
- export const deserializeAws_json1_1UpdateSubscriberCommand = async (output, context) => {
1272
- if (output.statusCode >= 300) {
1273
- return deserializeAws_json1_1UpdateSubscriberCommandError(output, context);
1274
- }
1275
- const data = await parseBody(output.body, context);
1276
- let contents = {};
1277
- contents = deserializeAws_json1_1UpdateSubscriberResponse(data, context);
1278
- const response = {
1279
- $metadata: deserializeMetadata(output),
1280
- ...contents,
1281
- };
1282
- return Promise.resolve(response);
1283
- };
1284
- const deserializeAws_json1_1UpdateSubscriberCommandError = async (output, context) => {
1285
- const parsedOutput = {
1286
- ...output,
1287
- body: await parseErrorBody(output.body, context),
1288
- };
1289
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1290
- switch (errorCode) {
1291
- case "AccessDeniedException":
1292
- case "com.amazonaws.budgets#AccessDeniedException":
1293
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
1294
- case "DuplicateRecordException":
1295
- case "com.amazonaws.budgets#DuplicateRecordException":
1296
- throw await deserializeAws_json1_1DuplicateRecordExceptionResponse(parsedOutput, context);
1297
- case "InternalErrorException":
1298
- case "com.amazonaws.budgets#InternalErrorException":
1299
- throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
1300
- case "InvalidParameterException":
1301
- case "com.amazonaws.budgets#InvalidParameterException":
1302
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
1303
- case "NotFoundException":
1304
- case "com.amazonaws.budgets#NotFoundException":
1305
- throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
1306
- case "ThrottlingException":
1307
- case "com.amazonaws.budgets#ThrottlingException":
1308
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
1309
- default:
1310
- const parsedBody = parsedOutput.body;
1311
- throwDefaultError({
1312
- output,
1313
- parsedBody,
1314
- exceptionCtor: __BaseException,
1315
- errorCode,
1316
- });
1317
- }
1318
- };
1319
- const deserializeAws_json1_1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
1320
- const body = parsedOutput.body;
1321
- const deserialized = deserializeAws_json1_1AccessDeniedException(body, context);
1322
- const exception = new AccessDeniedException({
1323
- $metadata: deserializeMetadata(parsedOutput),
1324
- ...deserialized,
1325
- });
1326
- return __decorateServiceException(exception, body);
1327
- };
1328
- const deserializeAws_json1_1CreationLimitExceededExceptionResponse = async (parsedOutput, context) => {
1329
- const body = parsedOutput.body;
1330
- const deserialized = deserializeAws_json1_1CreationLimitExceededException(body, context);
1331
- const exception = new CreationLimitExceededException({
1332
- $metadata: deserializeMetadata(parsedOutput),
1333
- ...deserialized,
1334
- });
1335
- return __decorateServiceException(exception, body);
1336
- };
1337
- const deserializeAws_json1_1DuplicateRecordExceptionResponse = async (parsedOutput, context) => {
1338
- const body = parsedOutput.body;
1339
- const deserialized = deserializeAws_json1_1DuplicateRecordException(body, context);
1340
- const exception = new DuplicateRecordException({
1341
- $metadata: deserializeMetadata(parsedOutput),
1342
- ...deserialized,
1343
- });
1344
- return __decorateServiceException(exception, body);
1345
- };
1346
- const deserializeAws_json1_1ExpiredNextTokenExceptionResponse = async (parsedOutput, context) => {
1347
- const body = parsedOutput.body;
1348
- const deserialized = deserializeAws_json1_1ExpiredNextTokenException(body, context);
1349
- const exception = new ExpiredNextTokenException({
1350
- $metadata: deserializeMetadata(parsedOutput),
1351
- ...deserialized,
1352
- });
1353
- return __decorateServiceException(exception, body);
1354
- };
1355
- const deserializeAws_json1_1InternalErrorExceptionResponse = async (parsedOutput, context) => {
1356
- const body = parsedOutput.body;
1357
- const deserialized = deserializeAws_json1_1InternalErrorException(body, context);
1358
- const exception = new InternalErrorException({
1359
- $metadata: deserializeMetadata(parsedOutput),
1360
- ...deserialized,
1361
- });
1362
- return __decorateServiceException(exception, body);
1363
- };
1364
- const deserializeAws_json1_1InvalidNextTokenExceptionResponse = async (parsedOutput, context) => {
1365
- const body = parsedOutput.body;
1366
- const deserialized = deserializeAws_json1_1InvalidNextTokenException(body, context);
1367
- const exception = new InvalidNextTokenException({
1368
- $metadata: deserializeMetadata(parsedOutput),
1369
- ...deserialized,
1370
- });
1371
- return __decorateServiceException(exception, body);
1372
- };
1373
- const deserializeAws_json1_1InvalidParameterExceptionResponse = async (parsedOutput, context) => {
1374
- const body = parsedOutput.body;
1375
- const deserialized = deserializeAws_json1_1InvalidParameterException(body, context);
1376
- const exception = new InvalidParameterException({
1377
- $metadata: deserializeMetadata(parsedOutput),
1378
- ...deserialized,
1379
- });
1380
- return __decorateServiceException(exception, body);
1381
- };
1382
- const deserializeAws_json1_1NotFoundExceptionResponse = async (parsedOutput, context) => {
1383
- const body = parsedOutput.body;
1384
- const deserialized = deserializeAws_json1_1NotFoundException(body, context);
1385
- const exception = new NotFoundException({
1386
- $metadata: deserializeMetadata(parsedOutput),
1387
- ...deserialized,
1388
- });
1389
- return __decorateServiceException(exception, body);
1390
- };
1391
- const deserializeAws_json1_1ResourceLockedExceptionResponse = async (parsedOutput, context) => {
1392
- const body = parsedOutput.body;
1393
- const deserialized = deserializeAws_json1_1ResourceLockedException(body, context);
1394
- const exception = new ResourceLockedException({
1395
- $metadata: deserializeMetadata(parsedOutput),
1396
- ...deserialized,
1397
- });
1398
- return __decorateServiceException(exception, body);
1399
- };
1400
- const deserializeAws_json1_1ThrottlingExceptionResponse = async (parsedOutput, context) => {
1401
- const body = parsedOutput.body;
1402
- const deserialized = deserializeAws_json1_1ThrottlingException(body, context);
1403
- const exception = new ThrottlingException({
1404
- $metadata: deserializeMetadata(parsedOutput),
1405
- ...deserialized,
1406
- });
1407
- return __decorateServiceException(exception, body);
1408
- };
1409
- const serializeAws_json1_1ActionThreshold = (input, context) => {
1410
- return {
1411
- ...(input.ActionThresholdType != null && { ActionThresholdType: input.ActionThresholdType }),
1412
- ...(input.ActionThresholdValue != null && { ActionThresholdValue: __serializeFloat(input.ActionThresholdValue) }),
1413
- };
1414
- };
1415
- const serializeAws_json1_1AutoAdjustData = (input, context) => {
1416
- return {
1417
- ...(input.AutoAdjustType != null && { AutoAdjustType: input.AutoAdjustType }),
1418
- ...(input.HistoricalOptions != null && {
1419
- HistoricalOptions: serializeAws_json1_1HistoricalOptions(input.HistoricalOptions, context),
1420
- }),
1421
- ...(input.LastAutoAdjustTime != null && {
1422
- LastAutoAdjustTime: Math.round(input.LastAutoAdjustTime.getTime() / 1000),
1423
- }),
1424
- };
1425
- };
1426
- const serializeAws_json1_1Budget = (input, context) => {
1427
- return {
1428
- ...(input.AutoAdjustData != null && {
1429
- AutoAdjustData: serializeAws_json1_1AutoAdjustData(input.AutoAdjustData, context),
1430
- }),
1431
- ...(input.BudgetLimit != null && { BudgetLimit: serializeAws_json1_1Spend(input.BudgetLimit, context) }),
1432
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1433
- ...(input.BudgetType != null && { BudgetType: input.BudgetType }),
1434
- ...(input.CalculatedSpend != null && {
1435
- CalculatedSpend: serializeAws_json1_1CalculatedSpend(input.CalculatedSpend, context),
1436
- }),
1437
- ...(input.CostFilters != null && { CostFilters: serializeAws_json1_1CostFilters(input.CostFilters, context) }),
1438
- ...(input.CostTypes != null && { CostTypes: serializeAws_json1_1CostTypes(input.CostTypes, context) }),
1439
- ...(input.LastUpdatedTime != null && { LastUpdatedTime: Math.round(input.LastUpdatedTime.getTime() / 1000) }),
1440
- ...(input.PlannedBudgetLimits != null && {
1441
- PlannedBudgetLimits: serializeAws_json1_1PlannedBudgetLimits(input.PlannedBudgetLimits, context),
1442
- }),
1443
- ...(input.TimePeriod != null && { TimePeriod: serializeAws_json1_1TimePeriod(input.TimePeriod, context) }),
1444
- ...(input.TimeUnit != null && { TimeUnit: input.TimeUnit }),
1445
- };
1446
- };
1447
- const serializeAws_json1_1CalculatedSpend = (input, context) => {
1448
- return {
1449
- ...(input.ActualSpend != null && { ActualSpend: serializeAws_json1_1Spend(input.ActualSpend, context) }),
1450
- ...(input.ForecastedSpend != null && {
1451
- ForecastedSpend: serializeAws_json1_1Spend(input.ForecastedSpend, context),
1452
- }),
1453
- };
1454
- };
1455
- const serializeAws_json1_1CostFilters = (input, context) => {
1456
- return Object.entries(input).reduce((acc, [key, value]) => {
6
+ export var serializeAws_json1_1CreateBudgetCommand = 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": "AWSBudgetServiceGateway.CreateBudget",
12
+ };
13
+ body = JSON.stringify(serializeAws_json1_1CreateBudgetRequest(input, context));
14
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
15
+ });
16
+ }); };
17
+ export var serializeAws_json1_1CreateBudgetActionCommand = 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": "AWSBudgetServiceGateway.CreateBudgetAction",
23
+ };
24
+ body = JSON.stringify(serializeAws_json1_1CreateBudgetActionRequest(input, context));
25
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
26
+ });
27
+ }); };
28
+ export var serializeAws_json1_1CreateNotificationCommand = 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": "AWSBudgetServiceGateway.CreateNotification",
34
+ };
35
+ body = JSON.stringify(serializeAws_json1_1CreateNotificationRequest(input, context));
36
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
37
+ });
38
+ }); };
39
+ export var serializeAws_json1_1CreateSubscriberCommand = 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": "AWSBudgetServiceGateway.CreateSubscriber",
45
+ };
46
+ body = JSON.stringify(serializeAws_json1_1CreateSubscriberRequest(input, context));
47
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
48
+ });
49
+ }); };
50
+ export var serializeAws_json1_1DeleteBudgetCommand = 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": "AWSBudgetServiceGateway.DeleteBudget",
56
+ };
57
+ body = JSON.stringify(serializeAws_json1_1DeleteBudgetRequest(input, context));
58
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
59
+ });
60
+ }); };
61
+ export var serializeAws_json1_1DeleteBudgetActionCommand = 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": "AWSBudgetServiceGateway.DeleteBudgetAction",
67
+ };
68
+ body = JSON.stringify(serializeAws_json1_1DeleteBudgetActionRequest(input, context));
69
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
70
+ });
71
+ }); };
72
+ export var serializeAws_json1_1DeleteNotificationCommand = 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": "AWSBudgetServiceGateway.DeleteNotification",
78
+ };
79
+ body = JSON.stringify(serializeAws_json1_1DeleteNotificationRequest(input, context));
80
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
81
+ });
82
+ }); };
83
+ export var serializeAws_json1_1DeleteSubscriberCommand = 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": "AWSBudgetServiceGateway.DeleteSubscriber",
89
+ };
90
+ body = JSON.stringify(serializeAws_json1_1DeleteSubscriberRequest(input, context));
91
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
92
+ });
93
+ }); };
94
+ export var serializeAws_json1_1DescribeBudgetCommand = 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": "AWSBudgetServiceGateway.DescribeBudget",
100
+ };
101
+ body = JSON.stringify(serializeAws_json1_1DescribeBudgetRequest(input, context));
102
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
103
+ });
104
+ }); };
105
+ export var serializeAws_json1_1DescribeBudgetActionCommand = 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": "AWSBudgetServiceGateway.DescribeBudgetAction",
111
+ };
112
+ body = JSON.stringify(serializeAws_json1_1DescribeBudgetActionRequest(input, context));
113
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
114
+ });
115
+ }); };
116
+ export var serializeAws_json1_1DescribeBudgetActionHistoriesCommand = 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": "AWSBudgetServiceGateway.DescribeBudgetActionHistories",
122
+ };
123
+ body = JSON.stringify(serializeAws_json1_1DescribeBudgetActionHistoriesRequest(input, context));
124
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
125
+ });
126
+ }); };
127
+ export var serializeAws_json1_1DescribeBudgetActionsForAccountCommand = 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": "AWSBudgetServiceGateway.DescribeBudgetActionsForAccount",
133
+ };
134
+ body = JSON.stringify(serializeAws_json1_1DescribeBudgetActionsForAccountRequest(input, context));
135
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
136
+ });
137
+ }); };
138
+ export var serializeAws_json1_1DescribeBudgetActionsForBudgetCommand = 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": "AWSBudgetServiceGateway.DescribeBudgetActionsForBudget",
144
+ };
145
+ body = JSON.stringify(serializeAws_json1_1DescribeBudgetActionsForBudgetRequest(input, context));
146
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
147
+ });
148
+ }); };
149
+ export var serializeAws_json1_1DescribeBudgetNotificationsForAccountCommand = 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": "AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount",
155
+ };
156
+ body = JSON.stringify(serializeAws_json1_1DescribeBudgetNotificationsForAccountRequest(input, context));
157
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
158
+ });
159
+ }); };
160
+ export var serializeAws_json1_1DescribeBudgetPerformanceHistoryCommand = 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": "AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory",
166
+ };
167
+ body = JSON.stringify(serializeAws_json1_1DescribeBudgetPerformanceHistoryRequest(input, context));
168
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
169
+ });
170
+ }); };
171
+ export var serializeAws_json1_1DescribeBudgetsCommand = 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": "AWSBudgetServiceGateway.DescribeBudgets",
177
+ };
178
+ body = JSON.stringify(serializeAws_json1_1DescribeBudgetsRequest(input, context));
179
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
180
+ });
181
+ }); };
182
+ export var serializeAws_json1_1DescribeNotificationsForBudgetCommand = 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": "AWSBudgetServiceGateway.DescribeNotificationsForBudget",
188
+ };
189
+ body = JSON.stringify(serializeAws_json1_1DescribeNotificationsForBudgetRequest(input, context));
190
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
191
+ });
192
+ }); };
193
+ export var serializeAws_json1_1DescribeSubscribersForNotificationCommand = 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": "AWSBudgetServiceGateway.DescribeSubscribersForNotification",
199
+ };
200
+ body = JSON.stringify(serializeAws_json1_1DescribeSubscribersForNotificationRequest(input, context));
201
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
202
+ });
203
+ }); };
204
+ export var serializeAws_json1_1ExecuteBudgetActionCommand = 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": "AWSBudgetServiceGateway.ExecuteBudgetAction",
210
+ };
211
+ body = JSON.stringify(serializeAws_json1_1ExecuteBudgetActionRequest(input, context));
212
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
213
+ });
214
+ }); };
215
+ export var serializeAws_json1_1UpdateBudgetCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
216
+ var headers, body;
217
+ return __generator(this, function (_a) {
218
+ headers = {
219
+ "content-type": "application/x-amz-json-1.1",
220
+ "x-amz-target": "AWSBudgetServiceGateway.UpdateBudget",
221
+ };
222
+ body = JSON.stringify(serializeAws_json1_1UpdateBudgetRequest(input, context));
223
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
224
+ });
225
+ }); };
226
+ export var serializeAws_json1_1UpdateBudgetActionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
227
+ var headers, body;
228
+ return __generator(this, function (_a) {
229
+ headers = {
230
+ "content-type": "application/x-amz-json-1.1",
231
+ "x-amz-target": "AWSBudgetServiceGateway.UpdateBudgetAction",
232
+ };
233
+ body = JSON.stringify(serializeAws_json1_1UpdateBudgetActionRequest(input, context));
234
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
235
+ });
236
+ }); };
237
+ export var serializeAws_json1_1UpdateNotificationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
238
+ var headers, body;
239
+ return __generator(this, function (_a) {
240
+ headers = {
241
+ "content-type": "application/x-amz-json-1.1",
242
+ "x-amz-target": "AWSBudgetServiceGateway.UpdateNotification",
243
+ };
244
+ body = JSON.stringify(serializeAws_json1_1UpdateNotificationRequest(input, context));
245
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
246
+ });
247
+ }); };
248
+ export var serializeAws_json1_1UpdateSubscriberCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
249
+ var headers, body;
250
+ return __generator(this, function (_a) {
251
+ headers = {
252
+ "content-type": "application/x-amz-json-1.1",
253
+ "x-amz-target": "AWSBudgetServiceGateway.UpdateSubscriber",
254
+ };
255
+ body = JSON.stringify(serializeAws_json1_1UpdateSubscriberRequest(input, context));
256
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
257
+ });
258
+ }); };
259
+ export var deserializeAws_json1_1CreateBudgetCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
260
+ var data, contents, response;
261
+ return __generator(this, function (_a) {
262
+ switch (_a.label) {
263
+ case 0:
264
+ if (output.statusCode >= 300) {
265
+ return [2, deserializeAws_json1_1CreateBudgetCommandError(output, context)];
266
+ }
267
+ return [4, parseBody(output.body, context)];
268
+ case 1:
269
+ data = _a.sent();
270
+ contents = {};
271
+ contents = deserializeAws_json1_1CreateBudgetResponse(data, context);
272
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
273
+ return [2, Promise.resolve(response)];
274
+ }
275
+ });
276
+ }); };
277
+ var deserializeAws_json1_1CreateBudgetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
278
+ var parsedOutput, _a, errorCode, _b, parsedBody;
279
+ var _c;
280
+ return __generator(this, function (_d) {
281
+ switch (_d.label) {
282
+ case 0:
283
+ _a = [__assign({}, output)];
284
+ _c = {};
285
+ return [4, parseErrorBody(output.body, context)];
286
+ case 1:
287
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
288
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
289
+ _b = errorCode;
290
+ switch (_b) {
291
+ case "AccessDeniedException": return [3, 2];
292
+ case "com.amazonaws.budgets#AccessDeniedException": return [3, 2];
293
+ case "CreationLimitExceededException": return [3, 4];
294
+ case "com.amazonaws.budgets#CreationLimitExceededException": return [3, 4];
295
+ case "DuplicateRecordException": return [3, 6];
296
+ case "com.amazonaws.budgets#DuplicateRecordException": return [3, 6];
297
+ case "InternalErrorException": return [3, 8];
298
+ case "com.amazonaws.budgets#InternalErrorException": return [3, 8];
299
+ case "InvalidParameterException": return [3, 10];
300
+ case "com.amazonaws.budgets#InvalidParameterException": return [3, 10];
301
+ case "ThrottlingException": return [3, 12];
302
+ case "com.amazonaws.budgets#ThrottlingException": return [3, 12];
303
+ }
304
+ return [3, 14];
305
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
306
+ case 3: throw _d.sent();
307
+ case 4: return [4, deserializeAws_json1_1CreationLimitExceededExceptionResponse(parsedOutput, context)];
308
+ case 5: throw _d.sent();
309
+ case 6: return [4, deserializeAws_json1_1DuplicateRecordExceptionResponse(parsedOutput, context)];
310
+ case 7: throw _d.sent();
311
+ case 8: return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
312
+ case 9: throw _d.sent();
313
+ case 10: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
314
+ case 11: throw _d.sent();
315
+ case 12: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
316
+ case 13: throw _d.sent();
317
+ case 14:
318
+ parsedBody = parsedOutput.body;
319
+ throwDefaultError({
320
+ output: output,
321
+ parsedBody: parsedBody,
322
+ exceptionCtor: __BaseException,
323
+ errorCode: errorCode,
324
+ });
325
+ _d.label = 15;
326
+ case 15: return [2];
327
+ }
328
+ });
329
+ }); };
330
+ export var deserializeAws_json1_1CreateBudgetActionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
331
+ var data, contents, response;
332
+ return __generator(this, function (_a) {
333
+ switch (_a.label) {
334
+ case 0:
335
+ if (output.statusCode >= 300) {
336
+ return [2, deserializeAws_json1_1CreateBudgetActionCommandError(output, context)];
337
+ }
338
+ return [4, parseBody(output.body, context)];
339
+ case 1:
340
+ data = _a.sent();
341
+ contents = {};
342
+ contents = deserializeAws_json1_1CreateBudgetActionResponse(data, context);
343
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
344
+ return [2, Promise.resolve(response)];
345
+ }
346
+ });
347
+ }); };
348
+ var deserializeAws_json1_1CreateBudgetActionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
349
+ var parsedOutput, _a, errorCode, _b, parsedBody;
350
+ var _c;
351
+ return __generator(this, function (_d) {
352
+ switch (_d.label) {
353
+ case 0:
354
+ _a = [__assign({}, output)];
355
+ _c = {};
356
+ return [4, parseErrorBody(output.body, context)];
357
+ case 1:
358
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
359
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
360
+ _b = errorCode;
361
+ switch (_b) {
362
+ case "AccessDeniedException": return [3, 2];
363
+ case "com.amazonaws.budgets#AccessDeniedException": return [3, 2];
364
+ case "CreationLimitExceededException": return [3, 4];
365
+ case "com.amazonaws.budgets#CreationLimitExceededException": return [3, 4];
366
+ case "DuplicateRecordException": return [3, 6];
367
+ case "com.amazonaws.budgets#DuplicateRecordException": return [3, 6];
368
+ case "InternalErrorException": return [3, 8];
369
+ case "com.amazonaws.budgets#InternalErrorException": return [3, 8];
370
+ case "InvalidParameterException": return [3, 10];
371
+ case "com.amazonaws.budgets#InvalidParameterException": return [3, 10];
372
+ case "NotFoundException": return [3, 12];
373
+ case "com.amazonaws.budgets#NotFoundException": return [3, 12];
374
+ case "ThrottlingException": return [3, 14];
375
+ case "com.amazonaws.budgets#ThrottlingException": return [3, 14];
376
+ }
377
+ return [3, 16];
378
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
379
+ case 3: throw _d.sent();
380
+ case 4: return [4, deserializeAws_json1_1CreationLimitExceededExceptionResponse(parsedOutput, context)];
381
+ case 5: throw _d.sent();
382
+ case 6: return [4, deserializeAws_json1_1DuplicateRecordExceptionResponse(parsedOutput, context)];
383
+ case 7: throw _d.sent();
384
+ case 8: return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
385
+ case 9: throw _d.sent();
386
+ case 10: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
387
+ case 11: throw _d.sent();
388
+ case 12: return [4, deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context)];
389
+ case 13: throw _d.sent();
390
+ case 14: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
391
+ case 15: throw _d.sent();
392
+ case 16:
393
+ parsedBody = parsedOutput.body;
394
+ throwDefaultError({
395
+ output: output,
396
+ parsedBody: parsedBody,
397
+ exceptionCtor: __BaseException,
398
+ errorCode: errorCode,
399
+ });
400
+ _d.label = 17;
401
+ case 17: return [2];
402
+ }
403
+ });
404
+ }); };
405
+ export var deserializeAws_json1_1CreateNotificationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
406
+ var data, contents, response;
407
+ return __generator(this, function (_a) {
408
+ switch (_a.label) {
409
+ case 0:
410
+ if (output.statusCode >= 300) {
411
+ return [2, deserializeAws_json1_1CreateNotificationCommandError(output, context)];
412
+ }
413
+ return [4, parseBody(output.body, context)];
414
+ case 1:
415
+ data = _a.sent();
416
+ contents = {};
417
+ contents = deserializeAws_json1_1CreateNotificationResponse(data, context);
418
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
419
+ return [2, Promise.resolve(response)];
420
+ }
421
+ });
422
+ }); };
423
+ var deserializeAws_json1_1CreateNotificationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
424
+ var parsedOutput, _a, errorCode, _b, parsedBody;
425
+ var _c;
426
+ return __generator(this, function (_d) {
427
+ switch (_d.label) {
428
+ case 0:
429
+ _a = [__assign({}, output)];
430
+ _c = {};
431
+ return [4, parseErrorBody(output.body, context)];
432
+ case 1:
433
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
434
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
435
+ _b = errorCode;
436
+ switch (_b) {
437
+ case "AccessDeniedException": return [3, 2];
438
+ case "com.amazonaws.budgets#AccessDeniedException": return [3, 2];
439
+ case "CreationLimitExceededException": return [3, 4];
440
+ case "com.amazonaws.budgets#CreationLimitExceededException": return [3, 4];
441
+ case "DuplicateRecordException": return [3, 6];
442
+ case "com.amazonaws.budgets#DuplicateRecordException": return [3, 6];
443
+ case "InternalErrorException": return [3, 8];
444
+ case "com.amazonaws.budgets#InternalErrorException": return [3, 8];
445
+ case "InvalidParameterException": return [3, 10];
446
+ case "com.amazonaws.budgets#InvalidParameterException": return [3, 10];
447
+ case "NotFoundException": return [3, 12];
448
+ case "com.amazonaws.budgets#NotFoundException": return [3, 12];
449
+ case "ThrottlingException": return [3, 14];
450
+ case "com.amazonaws.budgets#ThrottlingException": return [3, 14];
451
+ }
452
+ return [3, 16];
453
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
454
+ case 3: throw _d.sent();
455
+ case 4: return [4, deserializeAws_json1_1CreationLimitExceededExceptionResponse(parsedOutput, context)];
456
+ case 5: throw _d.sent();
457
+ case 6: return [4, deserializeAws_json1_1DuplicateRecordExceptionResponse(parsedOutput, context)];
458
+ case 7: throw _d.sent();
459
+ case 8: return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
460
+ case 9: throw _d.sent();
461
+ case 10: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
462
+ case 11: throw _d.sent();
463
+ case 12: return [4, deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context)];
464
+ case 13: throw _d.sent();
465
+ case 14: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
466
+ case 15: throw _d.sent();
467
+ case 16:
468
+ parsedBody = parsedOutput.body;
469
+ throwDefaultError({
470
+ output: output,
471
+ parsedBody: parsedBody,
472
+ exceptionCtor: __BaseException,
473
+ errorCode: errorCode,
474
+ });
475
+ _d.label = 17;
476
+ case 17: return [2];
477
+ }
478
+ });
479
+ }); };
480
+ export var deserializeAws_json1_1CreateSubscriberCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
481
+ var data, contents, response;
482
+ return __generator(this, function (_a) {
483
+ switch (_a.label) {
484
+ case 0:
485
+ if (output.statusCode >= 300) {
486
+ return [2, deserializeAws_json1_1CreateSubscriberCommandError(output, context)];
487
+ }
488
+ return [4, parseBody(output.body, context)];
489
+ case 1:
490
+ data = _a.sent();
491
+ contents = {};
492
+ contents = deserializeAws_json1_1CreateSubscriberResponse(data, context);
493
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
494
+ return [2, Promise.resolve(response)];
495
+ }
496
+ });
497
+ }); };
498
+ var deserializeAws_json1_1CreateSubscriberCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
499
+ var parsedOutput, _a, errorCode, _b, parsedBody;
500
+ var _c;
501
+ return __generator(this, function (_d) {
502
+ switch (_d.label) {
503
+ case 0:
504
+ _a = [__assign({}, output)];
505
+ _c = {};
506
+ return [4, parseErrorBody(output.body, context)];
507
+ case 1:
508
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
509
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
510
+ _b = errorCode;
511
+ switch (_b) {
512
+ case "AccessDeniedException": return [3, 2];
513
+ case "com.amazonaws.budgets#AccessDeniedException": return [3, 2];
514
+ case "CreationLimitExceededException": return [3, 4];
515
+ case "com.amazonaws.budgets#CreationLimitExceededException": return [3, 4];
516
+ case "DuplicateRecordException": return [3, 6];
517
+ case "com.amazonaws.budgets#DuplicateRecordException": return [3, 6];
518
+ case "InternalErrorException": return [3, 8];
519
+ case "com.amazonaws.budgets#InternalErrorException": return [3, 8];
520
+ case "InvalidParameterException": return [3, 10];
521
+ case "com.amazonaws.budgets#InvalidParameterException": return [3, 10];
522
+ case "NotFoundException": return [3, 12];
523
+ case "com.amazonaws.budgets#NotFoundException": return [3, 12];
524
+ case "ThrottlingException": return [3, 14];
525
+ case "com.amazonaws.budgets#ThrottlingException": return [3, 14];
526
+ }
527
+ return [3, 16];
528
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
529
+ case 3: throw _d.sent();
530
+ case 4: return [4, deserializeAws_json1_1CreationLimitExceededExceptionResponse(parsedOutput, context)];
531
+ case 5: throw _d.sent();
532
+ case 6: return [4, deserializeAws_json1_1DuplicateRecordExceptionResponse(parsedOutput, context)];
533
+ case 7: throw _d.sent();
534
+ case 8: return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
535
+ case 9: throw _d.sent();
536
+ case 10: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
537
+ case 11: throw _d.sent();
538
+ case 12: return [4, deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context)];
539
+ case 13: throw _d.sent();
540
+ case 14: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
541
+ case 15: throw _d.sent();
542
+ case 16:
543
+ parsedBody = parsedOutput.body;
544
+ throwDefaultError({
545
+ output: output,
546
+ parsedBody: parsedBody,
547
+ exceptionCtor: __BaseException,
548
+ errorCode: errorCode,
549
+ });
550
+ _d.label = 17;
551
+ case 17: return [2];
552
+ }
553
+ });
554
+ }); };
555
+ export var deserializeAws_json1_1DeleteBudgetCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
556
+ var data, contents, response;
557
+ return __generator(this, function (_a) {
558
+ switch (_a.label) {
559
+ case 0:
560
+ if (output.statusCode >= 300) {
561
+ return [2, deserializeAws_json1_1DeleteBudgetCommandError(output, context)];
562
+ }
563
+ return [4, parseBody(output.body, context)];
564
+ case 1:
565
+ data = _a.sent();
566
+ contents = {};
567
+ contents = deserializeAws_json1_1DeleteBudgetResponse(data, context);
568
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
569
+ return [2, Promise.resolve(response)];
570
+ }
571
+ });
572
+ }); };
573
+ var deserializeAws_json1_1DeleteBudgetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
574
+ var parsedOutput, _a, errorCode, _b, parsedBody;
575
+ var _c;
576
+ return __generator(this, function (_d) {
577
+ switch (_d.label) {
578
+ case 0:
579
+ _a = [__assign({}, output)];
580
+ _c = {};
581
+ return [4, parseErrorBody(output.body, context)];
582
+ case 1:
583
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
584
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
585
+ _b = errorCode;
586
+ switch (_b) {
587
+ case "AccessDeniedException": return [3, 2];
588
+ case "com.amazonaws.budgets#AccessDeniedException": return [3, 2];
589
+ case "InternalErrorException": return [3, 4];
590
+ case "com.amazonaws.budgets#InternalErrorException": return [3, 4];
591
+ case "InvalidParameterException": return [3, 6];
592
+ case "com.amazonaws.budgets#InvalidParameterException": return [3, 6];
593
+ case "NotFoundException": return [3, 8];
594
+ case "com.amazonaws.budgets#NotFoundException": return [3, 8];
595
+ case "ThrottlingException": return [3, 10];
596
+ case "com.amazonaws.budgets#ThrottlingException": return [3, 10];
597
+ }
598
+ return [3, 12];
599
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
600
+ case 3: throw _d.sent();
601
+ case 4: return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
602
+ case 5: throw _d.sent();
603
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
604
+ case 7: throw _d.sent();
605
+ case 8: return [4, deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context)];
606
+ case 9: throw _d.sent();
607
+ case 10: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
608
+ case 11: throw _d.sent();
609
+ case 12:
610
+ parsedBody = parsedOutput.body;
611
+ throwDefaultError({
612
+ output: output,
613
+ parsedBody: parsedBody,
614
+ exceptionCtor: __BaseException,
615
+ errorCode: errorCode,
616
+ });
617
+ _d.label = 13;
618
+ case 13: return [2];
619
+ }
620
+ });
621
+ }); };
622
+ export var deserializeAws_json1_1DeleteBudgetActionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
623
+ var data, contents, response;
624
+ return __generator(this, function (_a) {
625
+ switch (_a.label) {
626
+ case 0:
627
+ if (output.statusCode >= 300) {
628
+ return [2, deserializeAws_json1_1DeleteBudgetActionCommandError(output, context)];
629
+ }
630
+ return [4, parseBody(output.body, context)];
631
+ case 1:
632
+ data = _a.sent();
633
+ contents = {};
634
+ contents = deserializeAws_json1_1DeleteBudgetActionResponse(data, context);
635
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
636
+ return [2, Promise.resolve(response)];
637
+ }
638
+ });
639
+ }); };
640
+ var deserializeAws_json1_1DeleteBudgetActionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
641
+ var parsedOutput, _a, errorCode, _b, parsedBody;
642
+ var _c;
643
+ return __generator(this, function (_d) {
644
+ switch (_d.label) {
645
+ case 0:
646
+ _a = [__assign({}, output)];
647
+ _c = {};
648
+ return [4, parseErrorBody(output.body, context)];
649
+ case 1:
650
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
651
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
652
+ _b = errorCode;
653
+ switch (_b) {
654
+ case "AccessDeniedException": return [3, 2];
655
+ case "com.amazonaws.budgets#AccessDeniedException": return [3, 2];
656
+ case "InternalErrorException": return [3, 4];
657
+ case "com.amazonaws.budgets#InternalErrorException": return [3, 4];
658
+ case "InvalidParameterException": return [3, 6];
659
+ case "com.amazonaws.budgets#InvalidParameterException": return [3, 6];
660
+ case "NotFoundException": return [3, 8];
661
+ case "com.amazonaws.budgets#NotFoundException": return [3, 8];
662
+ case "ResourceLockedException": return [3, 10];
663
+ case "com.amazonaws.budgets#ResourceLockedException": return [3, 10];
664
+ case "ThrottlingException": return [3, 12];
665
+ case "com.amazonaws.budgets#ThrottlingException": return [3, 12];
666
+ }
667
+ return [3, 14];
668
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
669
+ case 3: throw _d.sent();
670
+ case 4: return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
671
+ case 5: throw _d.sent();
672
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
673
+ case 7: throw _d.sent();
674
+ case 8: return [4, deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context)];
675
+ case 9: throw _d.sent();
676
+ case 10: return [4, deserializeAws_json1_1ResourceLockedExceptionResponse(parsedOutput, context)];
677
+ case 11: throw _d.sent();
678
+ case 12: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
679
+ case 13: throw _d.sent();
680
+ case 14:
681
+ parsedBody = parsedOutput.body;
682
+ throwDefaultError({
683
+ output: output,
684
+ parsedBody: parsedBody,
685
+ exceptionCtor: __BaseException,
686
+ errorCode: errorCode,
687
+ });
688
+ _d.label = 15;
689
+ case 15: return [2];
690
+ }
691
+ });
692
+ }); };
693
+ export var deserializeAws_json1_1DeleteNotificationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
694
+ var data, contents, response;
695
+ return __generator(this, function (_a) {
696
+ switch (_a.label) {
697
+ case 0:
698
+ if (output.statusCode >= 300) {
699
+ return [2, deserializeAws_json1_1DeleteNotificationCommandError(output, context)];
700
+ }
701
+ return [4, parseBody(output.body, context)];
702
+ case 1:
703
+ data = _a.sent();
704
+ contents = {};
705
+ contents = deserializeAws_json1_1DeleteNotificationResponse(data, context);
706
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
707
+ return [2, Promise.resolve(response)];
708
+ }
709
+ });
710
+ }); };
711
+ var deserializeAws_json1_1DeleteNotificationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
712
+ var parsedOutput, _a, errorCode, _b, parsedBody;
713
+ var _c;
714
+ return __generator(this, function (_d) {
715
+ switch (_d.label) {
716
+ case 0:
717
+ _a = [__assign({}, output)];
718
+ _c = {};
719
+ return [4, parseErrorBody(output.body, context)];
720
+ case 1:
721
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
722
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
723
+ _b = errorCode;
724
+ switch (_b) {
725
+ case "AccessDeniedException": return [3, 2];
726
+ case "com.amazonaws.budgets#AccessDeniedException": return [3, 2];
727
+ case "InternalErrorException": return [3, 4];
728
+ case "com.amazonaws.budgets#InternalErrorException": return [3, 4];
729
+ case "InvalidParameterException": return [3, 6];
730
+ case "com.amazonaws.budgets#InvalidParameterException": return [3, 6];
731
+ case "NotFoundException": return [3, 8];
732
+ case "com.amazonaws.budgets#NotFoundException": return [3, 8];
733
+ case "ThrottlingException": return [3, 10];
734
+ case "com.amazonaws.budgets#ThrottlingException": return [3, 10];
735
+ }
736
+ return [3, 12];
737
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
738
+ case 3: throw _d.sent();
739
+ case 4: return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
740
+ case 5: throw _d.sent();
741
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
742
+ case 7: throw _d.sent();
743
+ case 8: return [4, deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context)];
744
+ case 9: throw _d.sent();
745
+ case 10: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
746
+ case 11: throw _d.sent();
747
+ case 12:
748
+ parsedBody = parsedOutput.body;
749
+ throwDefaultError({
750
+ output: output,
751
+ parsedBody: parsedBody,
752
+ exceptionCtor: __BaseException,
753
+ errorCode: errorCode,
754
+ });
755
+ _d.label = 13;
756
+ case 13: return [2];
757
+ }
758
+ });
759
+ }); };
760
+ export var deserializeAws_json1_1DeleteSubscriberCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
761
+ var data, contents, response;
762
+ return __generator(this, function (_a) {
763
+ switch (_a.label) {
764
+ case 0:
765
+ if (output.statusCode >= 300) {
766
+ return [2, deserializeAws_json1_1DeleteSubscriberCommandError(output, context)];
767
+ }
768
+ return [4, parseBody(output.body, context)];
769
+ case 1:
770
+ data = _a.sent();
771
+ contents = {};
772
+ contents = deserializeAws_json1_1DeleteSubscriberResponse(data, context);
773
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
774
+ return [2, Promise.resolve(response)];
775
+ }
776
+ });
777
+ }); };
778
+ var deserializeAws_json1_1DeleteSubscriberCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
779
+ var parsedOutput, _a, errorCode, _b, parsedBody;
780
+ var _c;
781
+ return __generator(this, function (_d) {
782
+ switch (_d.label) {
783
+ case 0:
784
+ _a = [__assign({}, output)];
785
+ _c = {};
786
+ return [4, parseErrorBody(output.body, context)];
787
+ case 1:
788
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
789
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
790
+ _b = errorCode;
791
+ switch (_b) {
792
+ case "AccessDeniedException": return [3, 2];
793
+ case "com.amazonaws.budgets#AccessDeniedException": return [3, 2];
794
+ case "InternalErrorException": return [3, 4];
795
+ case "com.amazonaws.budgets#InternalErrorException": return [3, 4];
796
+ case "InvalidParameterException": return [3, 6];
797
+ case "com.amazonaws.budgets#InvalidParameterException": return [3, 6];
798
+ case "NotFoundException": return [3, 8];
799
+ case "com.amazonaws.budgets#NotFoundException": return [3, 8];
800
+ case "ThrottlingException": return [3, 10];
801
+ case "com.amazonaws.budgets#ThrottlingException": return [3, 10];
802
+ }
803
+ return [3, 12];
804
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
805
+ case 3: throw _d.sent();
806
+ case 4: return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
807
+ case 5: throw _d.sent();
808
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
809
+ case 7: throw _d.sent();
810
+ case 8: return [4, deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context)];
811
+ case 9: throw _d.sent();
812
+ case 10: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
813
+ case 11: throw _d.sent();
814
+ case 12:
815
+ parsedBody = parsedOutput.body;
816
+ throwDefaultError({
817
+ output: output,
818
+ parsedBody: parsedBody,
819
+ exceptionCtor: __BaseException,
820
+ errorCode: errorCode,
821
+ });
822
+ _d.label = 13;
823
+ case 13: return [2];
824
+ }
825
+ });
826
+ }); };
827
+ export var deserializeAws_json1_1DescribeBudgetCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
828
+ var data, contents, response;
829
+ return __generator(this, function (_a) {
830
+ switch (_a.label) {
831
+ case 0:
832
+ if (output.statusCode >= 300) {
833
+ return [2, deserializeAws_json1_1DescribeBudgetCommandError(output, context)];
834
+ }
835
+ return [4, parseBody(output.body, context)];
836
+ case 1:
837
+ data = _a.sent();
838
+ contents = {};
839
+ contents = deserializeAws_json1_1DescribeBudgetResponse(data, context);
840
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
841
+ return [2, Promise.resolve(response)];
842
+ }
843
+ });
844
+ }); };
845
+ var deserializeAws_json1_1DescribeBudgetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
846
+ var parsedOutput, _a, errorCode, _b, parsedBody;
847
+ var _c;
848
+ return __generator(this, function (_d) {
849
+ switch (_d.label) {
850
+ case 0:
851
+ _a = [__assign({}, output)];
852
+ _c = {};
853
+ return [4, parseErrorBody(output.body, context)];
854
+ case 1:
855
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
856
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
857
+ _b = errorCode;
858
+ switch (_b) {
859
+ case "AccessDeniedException": return [3, 2];
860
+ case "com.amazonaws.budgets#AccessDeniedException": return [3, 2];
861
+ case "InternalErrorException": return [3, 4];
862
+ case "com.amazonaws.budgets#InternalErrorException": return [3, 4];
863
+ case "InvalidParameterException": return [3, 6];
864
+ case "com.amazonaws.budgets#InvalidParameterException": return [3, 6];
865
+ case "NotFoundException": return [3, 8];
866
+ case "com.amazonaws.budgets#NotFoundException": return [3, 8];
867
+ case "ThrottlingException": return [3, 10];
868
+ case "com.amazonaws.budgets#ThrottlingException": return [3, 10];
869
+ }
870
+ return [3, 12];
871
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
872
+ case 3: throw _d.sent();
873
+ case 4: return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
874
+ case 5: throw _d.sent();
875
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
876
+ case 7: throw _d.sent();
877
+ case 8: return [4, deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context)];
878
+ case 9: throw _d.sent();
879
+ case 10: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
880
+ case 11: throw _d.sent();
881
+ case 12:
882
+ parsedBody = parsedOutput.body;
883
+ throwDefaultError({
884
+ output: output,
885
+ parsedBody: parsedBody,
886
+ exceptionCtor: __BaseException,
887
+ errorCode: errorCode,
888
+ });
889
+ _d.label = 13;
890
+ case 13: return [2];
891
+ }
892
+ });
893
+ }); };
894
+ export var deserializeAws_json1_1DescribeBudgetActionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
895
+ var data, contents, response;
896
+ return __generator(this, function (_a) {
897
+ switch (_a.label) {
898
+ case 0:
899
+ if (output.statusCode >= 300) {
900
+ return [2, deserializeAws_json1_1DescribeBudgetActionCommandError(output, context)];
901
+ }
902
+ return [4, parseBody(output.body, context)];
903
+ case 1:
904
+ data = _a.sent();
905
+ contents = {};
906
+ contents = deserializeAws_json1_1DescribeBudgetActionResponse(data, context);
907
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
908
+ return [2, Promise.resolve(response)];
909
+ }
910
+ });
911
+ }); };
912
+ var deserializeAws_json1_1DescribeBudgetActionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
913
+ var parsedOutput, _a, errorCode, _b, parsedBody;
914
+ var _c;
915
+ return __generator(this, function (_d) {
916
+ switch (_d.label) {
917
+ case 0:
918
+ _a = [__assign({}, output)];
919
+ _c = {};
920
+ return [4, parseErrorBody(output.body, context)];
921
+ case 1:
922
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
923
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
924
+ _b = errorCode;
925
+ switch (_b) {
926
+ case "AccessDeniedException": return [3, 2];
927
+ case "com.amazonaws.budgets#AccessDeniedException": return [3, 2];
928
+ case "InternalErrorException": return [3, 4];
929
+ case "com.amazonaws.budgets#InternalErrorException": return [3, 4];
930
+ case "InvalidParameterException": return [3, 6];
931
+ case "com.amazonaws.budgets#InvalidParameterException": return [3, 6];
932
+ case "NotFoundException": return [3, 8];
933
+ case "com.amazonaws.budgets#NotFoundException": return [3, 8];
934
+ case "ThrottlingException": return [3, 10];
935
+ case "com.amazonaws.budgets#ThrottlingException": return [3, 10];
936
+ }
937
+ return [3, 12];
938
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
939
+ case 3: throw _d.sent();
940
+ case 4: return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
941
+ case 5: throw _d.sent();
942
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
943
+ case 7: throw _d.sent();
944
+ case 8: return [4, deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context)];
945
+ case 9: throw _d.sent();
946
+ case 10: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
947
+ case 11: throw _d.sent();
948
+ case 12:
949
+ parsedBody = parsedOutput.body;
950
+ throwDefaultError({
951
+ output: output,
952
+ parsedBody: parsedBody,
953
+ exceptionCtor: __BaseException,
954
+ errorCode: errorCode,
955
+ });
956
+ _d.label = 13;
957
+ case 13: return [2];
958
+ }
959
+ });
960
+ }); };
961
+ export var deserializeAws_json1_1DescribeBudgetActionHistoriesCommand = 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_1DescribeBudgetActionHistoriesCommandError(output, context)];
968
+ }
969
+ return [4, parseBody(output.body, context)];
970
+ case 1:
971
+ data = _a.sent();
972
+ contents = {};
973
+ contents = deserializeAws_json1_1DescribeBudgetActionHistoriesResponse(data, context);
974
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
975
+ return [2, Promise.resolve(response)];
976
+ }
977
+ });
978
+ }); };
979
+ var deserializeAws_json1_1DescribeBudgetActionHistoriesCommandError = 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.budgets#AccessDeniedException": return [3, 2];
995
+ case "InternalErrorException": return [3, 4];
996
+ case "com.amazonaws.budgets#InternalErrorException": return [3, 4];
997
+ case "InvalidNextTokenException": return [3, 6];
998
+ case "com.amazonaws.budgets#InvalidNextTokenException": return [3, 6];
999
+ case "InvalidParameterException": return [3, 8];
1000
+ case "com.amazonaws.budgets#InvalidParameterException": return [3, 8];
1001
+ case "NotFoundException": return [3, 10];
1002
+ case "com.amazonaws.budgets#NotFoundException": return [3, 10];
1003
+ case "ThrottlingException": return [3, 12];
1004
+ case "com.amazonaws.budgets#ThrottlingException": 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_1InternalErrorExceptionResponse(parsedOutput, context)];
1010
+ case 5: throw _d.sent();
1011
+ case 6: return [4, deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context)];
1012
+ case 7: throw _d.sent();
1013
+ case 8: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
1014
+ case 9: throw _d.sent();
1015
+ case 10: return [4, deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context)];
1016
+ case 11: throw _d.sent();
1017
+ case 12: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(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_1DescribeBudgetActionsForAccountCommand = 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_1DescribeBudgetActionsForAccountCommandError(output, context)];
1039
+ }
1040
+ return [4, parseBody(output.body, context)];
1041
+ case 1:
1042
+ data = _a.sent();
1043
+ contents = {};
1044
+ contents = deserializeAws_json1_1DescribeBudgetActionsForAccountResponse(data, context);
1045
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1046
+ return [2, Promise.resolve(response)];
1047
+ }
1048
+ });
1049
+ }); };
1050
+ var deserializeAws_json1_1DescribeBudgetActionsForAccountCommandError = 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 "AccessDeniedException": return [3, 2];
1065
+ case "com.amazonaws.budgets#AccessDeniedException": return [3, 2];
1066
+ case "InternalErrorException": return [3, 4];
1067
+ case "com.amazonaws.budgets#InternalErrorException": return [3, 4];
1068
+ case "InvalidNextTokenException": return [3, 6];
1069
+ case "com.amazonaws.budgets#InvalidNextTokenException": return [3, 6];
1070
+ case "InvalidParameterException": return [3, 8];
1071
+ case "com.amazonaws.budgets#InvalidParameterException": return [3, 8];
1072
+ case "ThrottlingException": return [3, 10];
1073
+ case "com.amazonaws.budgets#ThrottlingException": return [3, 10];
1074
+ }
1075
+ return [3, 12];
1076
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1077
+ case 3: throw _d.sent();
1078
+ case 4: return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
1079
+ case 5: throw _d.sent();
1080
+ case 6: return [4, deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context)];
1081
+ case 7: throw _d.sent();
1082
+ case 8: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
1083
+ case 9: throw _d.sent();
1084
+ case 10: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1085
+ case 11: throw _d.sent();
1086
+ case 12:
1087
+ parsedBody = parsedOutput.body;
1088
+ throwDefaultError({
1089
+ output: output,
1090
+ parsedBody: parsedBody,
1091
+ exceptionCtor: __BaseException,
1092
+ errorCode: errorCode,
1093
+ });
1094
+ _d.label = 13;
1095
+ case 13: return [2];
1096
+ }
1097
+ });
1098
+ }); };
1099
+ export var deserializeAws_json1_1DescribeBudgetActionsForBudgetCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1100
+ var data, contents, response;
1101
+ return __generator(this, function (_a) {
1102
+ switch (_a.label) {
1103
+ case 0:
1104
+ if (output.statusCode >= 300) {
1105
+ return [2, deserializeAws_json1_1DescribeBudgetActionsForBudgetCommandError(output, context)];
1106
+ }
1107
+ return [4, parseBody(output.body, context)];
1108
+ case 1:
1109
+ data = _a.sent();
1110
+ contents = {};
1111
+ contents = deserializeAws_json1_1DescribeBudgetActionsForBudgetResponse(data, context);
1112
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1113
+ return [2, Promise.resolve(response)];
1114
+ }
1115
+ });
1116
+ }); };
1117
+ var deserializeAws_json1_1DescribeBudgetActionsForBudgetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1118
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1119
+ var _c;
1120
+ return __generator(this, function (_d) {
1121
+ switch (_d.label) {
1122
+ case 0:
1123
+ _a = [__assign({}, output)];
1124
+ _c = {};
1125
+ return [4, parseErrorBody(output.body, context)];
1126
+ case 1:
1127
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1128
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1129
+ _b = errorCode;
1130
+ switch (_b) {
1131
+ case "AccessDeniedException": return [3, 2];
1132
+ case "com.amazonaws.budgets#AccessDeniedException": return [3, 2];
1133
+ case "InternalErrorException": return [3, 4];
1134
+ case "com.amazonaws.budgets#InternalErrorException": return [3, 4];
1135
+ case "InvalidNextTokenException": return [3, 6];
1136
+ case "com.amazonaws.budgets#InvalidNextTokenException": return [3, 6];
1137
+ case "InvalidParameterException": return [3, 8];
1138
+ case "com.amazonaws.budgets#InvalidParameterException": return [3, 8];
1139
+ case "NotFoundException": return [3, 10];
1140
+ case "com.amazonaws.budgets#NotFoundException": return [3, 10];
1141
+ case "ThrottlingException": return [3, 12];
1142
+ case "com.amazonaws.budgets#ThrottlingException": return [3, 12];
1143
+ }
1144
+ return [3, 14];
1145
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1146
+ case 3: throw _d.sent();
1147
+ case 4: return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
1148
+ case 5: throw _d.sent();
1149
+ case 6: return [4, deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context)];
1150
+ case 7: throw _d.sent();
1151
+ case 8: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
1152
+ case 9: throw _d.sent();
1153
+ case 10: return [4, deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context)];
1154
+ case 11: throw _d.sent();
1155
+ case 12: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1156
+ case 13: throw _d.sent();
1157
+ case 14:
1158
+ parsedBody = parsedOutput.body;
1159
+ throwDefaultError({
1160
+ output: output,
1161
+ parsedBody: parsedBody,
1162
+ exceptionCtor: __BaseException,
1163
+ errorCode: errorCode,
1164
+ });
1165
+ _d.label = 15;
1166
+ case 15: return [2];
1167
+ }
1168
+ });
1169
+ }); };
1170
+ export var deserializeAws_json1_1DescribeBudgetNotificationsForAccountCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1171
+ var data, contents, response;
1172
+ return __generator(this, function (_a) {
1173
+ switch (_a.label) {
1174
+ case 0:
1175
+ if (output.statusCode >= 300) {
1176
+ return [2, deserializeAws_json1_1DescribeBudgetNotificationsForAccountCommandError(output, context)];
1177
+ }
1178
+ return [4, parseBody(output.body, context)];
1179
+ case 1:
1180
+ data = _a.sent();
1181
+ contents = {};
1182
+ contents = deserializeAws_json1_1DescribeBudgetNotificationsForAccountResponse(data, context);
1183
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1184
+ return [2, Promise.resolve(response)];
1185
+ }
1186
+ });
1187
+ }); };
1188
+ var deserializeAws_json1_1DescribeBudgetNotificationsForAccountCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1189
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1190
+ var _c;
1191
+ return __generator(this, function (_d) {
1192
+ switch (_d.label) {
1193
+ case 0:
1194
+ _a = [__assign({}, output)];
1195
+ _c = {};
1196
+ return [4, parseErrorBody(output.body, context)];
1197
+ case 1:
1198
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1199
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1200
+ _b = errorCode;
1201
+ switch (_b) {
1202
+ case "AccessDeniedException": return [3, 2];
1203
+ case "com.amazonaws.budgets#AccessDeniedException": return [3, 2];
1204
+ case "ExpiredNextTokenException": return [3, 4];
1205
+ case "com.amazonaws.budgets#ExpiredNextTokenException": return [3, 4];
1206
+ case "InternalErrorException": return [3, 6];
1207
+ case "com.amazonaws.budgets#InternalErrorException": return [3, 6];
1208
+ case "InvalidNextTokenException": return [3, 8];
1209
+ case "com.amazonaws.budgets#InvalidNextTokenException": return [3, 8];
1210
+ case "InvalidParameterException": return [3, 10];
1211
+ case "com.amazonaws.budgets#InvalidParameterException": return [3, 10];
1212
+ case "NotFoundException": return [3, 12];
1213
+ case "com.amazonaws.budgets#NotFoundException": return [3, 12];
1214
+ case "ThrottlingException": return [3, 14];
1215
+ case "com.amazonaws.budgets#ThrottlingException": return [3, 14];
1216
+ }
1217
+ return [3, 16];
1218
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1219
+ case 3: throw _d.sent();
1220
+ case 4: return [4, deserializeAws_json1_1ExpiredNextTokenExceptionResponse(parsedOutput, context)];
1221
+ case 5: throw _d.sent();
1222
+ case 6: return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
1223
+ case 7: throw _d.sent();
1224
+ case 8: return [4, deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context)];
1225
+ case 9: throw _d.sent();
1226
+ case 10: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
1227
+ case 11: throw _d.sent();
1228
+ case 12: return [4, deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context)];
1229
+ case 13: throw _d.sent();
1230
+ case 14: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1231
+ case 15: throw _d.sent();
1232
+ case 16:
1233
+ parsedBody = parsedOutput.body;
1234
+ throwDefaultError({
1235
+ output: output,
1236
+ parsedBody: parsedBody,
1237
+ exceptionCtor: __BaseException,
1238
+ errorCode: errorCode,
1239
+ });
1240
+ _d.label = 17;
1241
+ case 17: return [2];
1242
+ }
1243
+ });
1244
+ }); };
1245
+ export var deserializeAws_json1_1DescribeBudgetPerformanceHistoryCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1246
+ var data, contents, response;
1247
+ return __generator(this, function (_a) {
1248
+ switch (_a.label) {
1249
+ case 0:
1250
+ if (output.statusCode >= 300) {
1251
+ return [2, deserializeAws_json1_1DescribeBudgetPerformanceHistoryCommandError(output, context)];
1252
+ }
1253
+ return [4, parseBody(output.body, context)];
1254
+ case 1:
1255
+ data = _a.sent();
1256
+ contents = {};
1257
+ contents = deserializeAws_json1_1DescribeBudgetPerformanceHistoryResponse(data, context);
1258
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1259
+ return [2, Promise.resolve(response)];
1260
+ }
1261
+ });
1262
+ }); };
1263
+ var deserializeAws_json1_1DescribeBudgetPerformanceHistoryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1264
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1265
+ var _c;
1266
+ return __generator(this, function (_d) {
1267
+ switch (_d.label) {
1268
+ case 0:
1269
+ _a = [__assign({}, output)];
1270
+ _c = {};
1271
+ return [4, parseErrorBody(output.body, context)];
1272
+ case 1:
1273
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1274
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1275
+ _b = errorCode;
1276
+ switch (_b) {
1277
+ case "AccessDeniedException": return [3, 2];
1278
+ case "com.amazonaws.budgets#AccessDeniedException": return [3, 2];
1279
+ case "ExpiredNextTokenException": return [3, 4];
1280
+ case "com.amazonaws.budgets#ExpiredNextTokenException": return [3, 4];
1281
+ case "InternalErrorException": return [3, 6];
1282
+ case "com.amazonaws.budgets#InternalErrorException": return [3, 6];
1283
+ case "InvalidNextTokenException": return [3, 8];
1284
+ case "com.amazonaws.budgets#InvalidNextTokenException": return [3, 8];
1285
+ case "InvalidParameterException": return [3, 10];
1286
+ case "com.amazonaws.budgets#InvalidParameterException": return [3, 10];
1287
+ case "NotFoundException": return [3, 12];
1288
+ case "com.amazonaws.budgets#NotFoundException": return [3, 12];
1289
+ case "ThrottlingException": return [3, 14];
1290
+ case "com.amazonaws.budgets#ThrottlingException": return [3, 14];
1291
+ }
1292
+ return [3, 16];
1293
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1294
+ case 3: throw _d.sent();
1295
+ case 4: return [4, deserializeAws_json1_1ExpiredNextTokenExceptionResponse(parsedOutput, context)];
1296
+ case 5: throw _d.sent();
1297
+ case 6: return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
1298
+ case 7: throw _d.sent();
1299
+ case 8: return [4, deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context)];
1300
+ case 9: throw _d.sent();
1301
+ case 10: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
1302
+ case 11: throw _d.sent();
1303
+ case 12: return [4, deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context)];
1304
+ case 13: throw _d.sent();
1305
+ case 14: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1306
+ case 15: throw _d.sent();
1307
+ case 16:
1308
+ parsedBody = parsedOutput.body;
1309
+ throwDefaultError({
1310
+ output: output,
1311
+ parsedBody: parsedBody,
1312
+ exceptionCtor: __BaseException,
1313
+ errorCode: errorCode,
1314
+ });
1315
+ _d.label = 17;
1316
+ case 17: return [2];
1317
+ }
1318
+ });
1319
+ }); };
1320
+ export var deserializeAws_json1_1DescribeBudgetsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1321
+ var data, contents, response;
1322
+ return __generator(this, function (_a) {
1323
+ switch (_a.label) {
1324
+ case 0:
1325
+ if (output.statusCode >= 300) {
1326
+ return [2, deserializeAws_json1_1DescribeBudgetsCommandError(output, context)];
1327
+ }
1328
+ return [4, parseBody(output.body, context)];
1329
+ case 1:
1330
+ data = _a.sent();
1331
+ contents = {};
1332
+ contents = deserializeAws_json1_1DescribeBudgetsResponse(data, context);
1333
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1334
+ return [2, Promise.resolve(response)];
1335
+ }
1336
+ });
1337
+ }); };
1338
+ var deserializeAws_json1_1DescribeBudgetsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1339
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1340
+ var _c;
1341
+ return __generator(this, function (_d) {
1342
+ switch (_d.label) {
1343
+ case 0:
1344
+ _a = [__assign({}, output)];
1345
+ _c = {};
1346
+ return [4, parseErrorBody(output.body, context)];
1347
+ case 1:
1348
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1349
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1350
+ _b = errorCode;
1351
+ switch (_b) {
1352
+ case "AccessDeniedException": return [3, 2];
1353
+ case "com.amazonaws.budgets#AccessDeniedException": return [3, 2];
1354
+ case "ExpiredNextTokenException": return [3, 4];
1355
+ case "com.amazonaws.budgets#ExpiredNextTokenException": return [3, 4];
1356
+ case "InternalErrorException": return [3, 6];
1357
+ case "com.amazonaws.budgets#InternalErrorException": return [3, 6];
1358
+ case "InvalidNextTokenException": return [3, 8];
1359
+ case "com.amazonaws.budgets#InvalidNextTokenException": return [3, 8];
1360
+ case "InvalidParameterException": return [3, 10];
1361
+ case "com.amazonaws.budgets#InvalidParameterException": return [3, 10];
1362
+ case "NotFoundException": return [3, 12];
1363
+ case "com.amazonaws.budgets#NotFoundException": return [3, 12];
1364
+ case "ThrottlingException": return [3, 14];
1365
+ case "com.amazonaws.budgets#ThrottlingException": return [3, 14];
1366
+ }
1367
+ return [3, 16];
1368
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1369
+ case 3: throw _d.sent();
1370
+ case 4: return [4, deserializeAws_json1_1ExpiredNextTokenExceptionResponse(parsedOutput, context)];
1371
+ case 5: throw _d.sent();
1372
+ case 6: return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
1373
+ case 7: throw _d.sent();
1374
+ case 8: return [4, deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context)];
1375
+ case 9: throw _d.sent();
1376
+ case 10: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
1377
+ case 11: throw _d.sent();
1378
+ case 12: return [4, deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context)];
1379
+ case 13: throw _d.sent();
1380
+ case 14: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1381
+ case 15: throw _d.sent();
1382
+ case 16:
1383
+ parsedBody = parsedOutput.body;
1384
+ throwDefaultError({
1385
+ output: output,
1386
+ parsedBody: parsedBody,
1387
+ exceptionCtor: __BaseException,
1388
+ errorCode: errorCode,
1389
+ });
1390
+ _d.label = 17;
1391
+ case 17: return [2];
1392
+ }
1393
+ });
1394
+ }); };
1395
+ export var deserializeAws_json1_1DescribeNotificationsForBudgetCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1396
+ var data, contents, response;
1397
+ return __generator(this, function (_a) {
1398
+ switch (_a.label) {
1399
+ case 0:
1400
+ if (output.statusCode >= 300) {
1401
+ return [2, deserializeAws_json1_1DescribeNotificationsForBudgetCommandError(output, context)];
1402
+ }
1403
+ return [4, parseBody(output.body, context)];
1404
+ case 1:
1405
+ data = _a.sent();
1406
+ contents = {};
1407
+ contents = deserializeAws_json1_1DescribeNotificationsForBudgetResponse(data, context);
1408
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1409
+ return [2, Promise.resolve(response)];
1410
+ }
1411
+ });
1412
+ }); };
1413
+ var deserializeAws_json1_1DescribeNotificationsForBudgetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1414
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1415
+ var _c;
1416
+ return __generator(this, function (_d) {
1417
+ switch (_d.label) {
1418
+ case 0:
1419
+ _a = [__assign({}, output)];
1420
+ _c = {};
1421
+ return [4, parseErrorBody(output.body, context)];
1422
+ case 1:
1423
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1424
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1425
+ _b = errorCode;
1426
+ switch (_b) {
1427
+ case "AccessDeniedException": return [3, 2];
1428
+ case "com.amazonaws.budgets#AccessDeniedException": return [3, 2];
1429
+ case "ExpiredNextTokenException": return [3, 4];
1430
+ case "com.amazonaws.budgets#ExpiredNextTokenException": return [3, 4];
1431
+ case "InternalErrorException": return [3, 6];
1432
+ case "com.amazonaws.budgets#InternalErrorException": return [3, 6];
1433
+ case "InvalidNextTokenException": return [3, 8];
1434
+ case "com.amazonaws.budgets#InvalidNextTokenException": return [3, 8];
1435
+ case "InvalidParameterException": return [3, 10];
1436
+ case "com.amazonaws.budgets#InvalidParameterException": return [3, 10];
1437
+ case "NotFoundException": return [3, 12];
1438
+ case "com.amazonaws.budgets#NotFoundException": return [3, 12];
1439
+ case "ThrottlingException": return [3, 14];
1440
+ case "com.amazonaws.budgets#ThrottlingException": return [3, 14];
1441
+ }
1442
+ return [3, 16];
1443
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1444
+ case 3: throw _d.sent();
1445
+ case 4: return [4, deserializeAws_json1_1ExpiredNextTokenExceptionResponse(parsedOutput, context)];
1446
+ case 5: throw _d.sent();
1447
+ case 6: return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
1448
+ case 7: throw _d.sent();
1449
+ case 8: return [4, deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context)];
1450
+ case 9: throw _d.sent();
1451
+ case 10: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
1452
+ case 11: throw _d.sent();
1453
+ case 12: return [4, deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context)];
1454
+ case 13: throw _d.sent();
1455
+ case 14: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1456
+ case 15: throw _d.sent();
1457
+ case 16:
1458
+ parsedBody = parsedOutput.body;
1459
+ throwDefaultError({
1460
+ output: output,
1461
+ parsedBody: parsedBody,
1462
+ exceptionCtor: __BaseException,
1463
+ errorCode: errorCode,
1464
+ });
1465
+ _d.label = 17;
1466
+ case 17: return [2];
1467
+ }
1468
+ });
1469
+ }); };
1470
+ export var deserializeAws_json1_1DescribeSubscribersForNotificationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1471
+ var data, contents, response;
1472
+ return __generator(this, function (_a) {
1473
+ switch (_a.label) {
1474
+ case 0:
1475
+ if (output.statusCode >= 300) {
1476
+ return [2, deserializeAws_json1_1DescribeSubscribersForNotificationCommandError(output, context)];
1477
+ }
1478
+ return [4, parseBody(output.body, context)];
1479
+ case 1:
1480
+ data = _a.sent();
1481
+ contents = {};
1482
+ contents = deserializeAws_json1_1DescribeSubscribersForNotificationResponse(data, context);
1483
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1484
+ return [2, Promise.resolve(response)];
1485
+ }
1486
+ });
1487
+ }); };
1488
+ var deserializeAws_json1_1DescribeSubscribersForNotificationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1489
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1490
+ var _c;
1491
+ return __generator(this, function (_d) {
1492
+ switch (_d.label) {
1493
+ case 0:
1494
+ _a = [__assign({}, output)];
1495
+ _c = {};
1496
+ return [4, parseErrorBody(output.body, context)];
1497
+ case 1:
1498
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1499
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1500
+ _b = errorCode;
1501
+ switch (_b) {
1502
+ case "AccessDeniedException": return [3, 2];
1503
+ case "com.amazonaws.budgets#AccessDeniedException": return [3, 2];
1504
+ case "ExpiredNextTokenException": return [3, 4];
1505
+ case "com.amazonaws.budgets#ExpiredNextTokenException": return [3, 4];
1506
+ case "InternalErrorException": return [3, 6];
1507
+ case "com.amazonaws.budgets#InternalErrorException": return [3, 6];
1508
+ case "InvalidNextTokenException": return [3, 8];
1509
+ case "com.amazonaws.budgets#InvalidNextTokenException": return [3, 8];
1510
+ case "InvalidParameterException": return [3, 10];
1511
+ case "com.amazonaws.budgets#InvalidParameterException": return [3, 10];
1512
+ case "NotFoundException": return [3, 12];
1513
+ case "com.amazonaws.budgets#NotFoundException": return [3, 12];
1514
+ case "ThrottlingException": return [3, 14];
1515
+ case "com.amazonaws.budgets#ThrottlingException": return [3, 14];
1516
+ }
1517
+ return [3, 16];
1518
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1519
+ case 3: throw _d.sent();
1520
+ case 4: return [4, deserializeAws_json1_1ExpiredNextTokenExceptionResponse(parsedOutput, context)];
1521
+ case 5: throw _d.sent();
1522
+ case 6: return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
1523
+ case 7: throw _d.sent();
1524
+ case 8: return [4, deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context)];
1525
+ case 9: throw _d.sent();
1526
+ case 10: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
1527
+ case 11: throw _d.sent();
1528
+ case 12: return [4, deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context)];
1529
+ case 13: throw _d.sent();
1530
+ case 14: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1531
+ case 15: throw _d.sent();
1532
+ case 16:
1533
+ parsedBody = parsedOutput.body;
1534
+ throwDefaultError({
1535
+ output: output,
1536
+ parsedBody: parsedBody,
1537
+ exceptionCtor: __BaseException,
1538
+ errorCode: errorCode,
1539
+ });
1540
+ _d.label = 17;
1541
+ case 17: return [2];
1542
+ }
1543
+ });
1544
+ }); };
1545
+ export var deserializeAws_json1_1ExecuteBudgetActionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1546
+ var data, contents, response;
1547
+ return __generator(this, function (_a) {
1548
+ switch (_a.label) {
1549
+ case 0:
1550
+ if (output.statusCode >= 300) {
1551
+ return [2, deserializeAws_json1_1ExecuteBudgetActionCommandError(output, context)];
1552
+ }
1553
+ return [4, parseBody(output.body, context)];
1554
+ case 1:
1555
+ data = _a.sent();
1556
+ contents = {};
1557
+ contents = deserializeAws_json1_1ExecuteBudgetActionResponse(data, context);
1558
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1559
+ return [2, Promise.resolve(response)];
1560
+ }
1561
+ });
1562
+ }); };
1563
+ var deserializeAws_json1_1ExecuteBudgetActionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1564
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1565
+ var _c;
1566
+ return __generator(this, function (_d) {
1567
+ switch (_d.label) {
1568
+ case 0:
1569
+ _a = [__assign({}, output)];
1570
+ _c = {};
1571
+ return [4, parseErrorBody(output.body, context)];
1572
+ case 1:
1573
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1574
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1575
+ _b = errorCode;
1576
+ switch (_b) {
1577
+ case "AccessDeniedException": return [3, 2];
1578
+ case "com.amazonaws.budgets#AccessDeniedException": return [3, 2];
1579
+ case "InternalErrorException": return [3, 4];
1580
+ case "com.amazonaws.budgets#InternalErrorException": return [3, 4];
1581
+ case "InvalidParameterException": return [3, 6];
1582
+ case "com.amazonaws.budgets#InvalidParameterException": return [3, 6];
1583
+ case "NotFoundException": return [3, 8];
1584
+ case "com.amazonaws.budgets#NotFoundException": return [3, 8];
1585
+ case "ResourceLockedException": return [3, 10];
1586
+ case "com.amazonaws.budgets#ResourceLockedException": return [3, 10];
1587
+ case "ThrottlingException": return [3, 12];
1588
+ case "com.amazonaws.budgets#ThrottlingException": return [3, 12];
1589
+ }
1590
+ return [3, 14];
1591
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1592
+ case 3: throw _d.sent();
1593
+ case 4: return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
1594
+ case 5: throw _d.sent();
1595
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
1596
+ case 7: throw _d.sent();
1597
+ case 8: return [4, deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context)];
1598
+ case 9: throw _d.sent();
1599
+ case 10: return [4, deserializeAws_json1_1ResourceLockedExceptionResponse(parsedOutput, context)];
1600
+ case 11: throw _d.sent();
1601
+ case 12: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1602
+ case 13: throw _d.sent();
1603
+ case 14:
1604
+ parsedBody = parsedOutput.body;
1605
+ throwDefaultError({
1606
+ output: output,
1607
+ parsedBody: parsedBody,
1608
+ exceptionCtor: __BaseException,
1609
+ errorCode: errorCode,
1610
+ });
1611
+ _d.label = 15;
1612
+ case 15: return [2];
1613
+ }
1614
+ });
1615
+ }); };
1616
+ export var deserializeAws_json1_1UpdateBudgetCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1617
+ var data, contents, response;
1618
+ return __generator(this, function (_a) {
1619
+ switch (_a.label) {
1620
+ case 0:
1621
+ if (output.statusCode >= 300) {
1622
+ return [2, deserializeAws_json1_1UpdateBudgetCommandError(output, context)];
1623
+ }
1624
+ return [4, parseBody(output.body, context)];
1625
+ case 1:
1626
+ data = _a.sent();
1627
+ contents = {};
1628
+ contents = deserializeAws_json1_1UpdateBudgetResponse(data, context);
1629
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1630
+ return [2, Promise.resolve(response)];
1631
+ }
1632
+ });
1633
+ }); };
1634
+ var deserializeAws_json1_1UpdateBudgetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1635
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1636
+ var _c;
1637
+ return __generator(this, function (_d) {
1638
+ switch (_d.label) {
1639
+ case 0:
1640
+ _a = [__assign({}, output)];
1641
+ _c = {};
1642
+ return [4, parseErrorBody(output.body, context)];
1643
+ case 1:
1644
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1645
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1646
+ _b = errorCode;
1647
+ switch (_b) {
1648
+ case "AccessDeniedException": return [3, 2];
1649
+ case "com.amazonaws.budgets#AccessDeniedException": return [3, 2];
1650
+ case "InternalErrorException": return [3, 4];
1651
+ case "com.amazonaws.budgets#InternalErrorException": return [3, 4];
1652
+ case "InvalidParameterException": return [3, 6];
1653
+ case "com.amazonaws.budgets#InvalidParameterException": return [3, 6];
1654
+ case "NotFoundException": return [3, 8];
1655
+ case "com.amazonaws.budgets#NotFoundException": return [3, 8];
1656
+ case "ThrottlingException": return [3, 10];
1657
+ case "com.amazonaws.budgets#ThrottlingException": return [3, 10];
1658
+ }
1659
+ return [3, 12];
1660
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1661
+ case 3: throw _d.sent();
1662
+ case 4: return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
1663
+ case 5: throw _d.sent();
1664
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
1665
+ case 7: throw _d.sent();
1666
+ case 8: return [4, deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context)];
1667
+ case 9: throw _d.sent();
1668
+ case 10: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1669
+ case 11: throw _d.sent();
1670
+ case 12:
1671
+ parsedBody = parsedOutput.body;
1672
+ throwDefaultError({
1673
+ output: output,
1674
+ parsedBody: parsedBody,
1675
+ exceptionCtor: __BaseException,
1676
+ errorCode: errorCode,
1677
+ });
1678
+ _d.label = 13;
1679
+ case 13: return [2];
1680
+ }
1681
+ });
1682
+ }); };
1683
+ export var deserializeAws_json1_1UpdateBudgetActionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1684
+ var data, contents, response;
1685
+ return __generator(this, function (_a) {
1686
+ switch (_a.label) {
1687
+ case 0:
1688
+ if (output.statusCode >= 300) {
1689
+ return [2, deserializeAws_json1_1UpdateBudgetActionCommandError(output, context)];
1690
+ }
1691
+ return [4, parseBody(output.body, context)];
1692
+ case 1:
1693
+ data = _a.sent();
1694
+ contents = {};
1695
+ contents = deserializeAws_json1_1UpdateBudgetActionResponse(data, context);
1696
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1697
+ return [2, Promise.resolve(response)];
1698
+ }
1699
+ });
1700
+ }); };
1701
+ var deserializeAws_json1_1UpdateBudgetActionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1702
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1703
+ var _c;
1704
+ return __generator(this, function (_d) {
1705
+ switch (_d.label) {
1706
+ case 0:
1707
+ _a = [__assign({}, output)];
1708
+ _c = {};
1709
+ return [4, parseErrorBody(output.body, context)];
1710
+ case 1:
1711
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1712
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1713
+ _b = errorCode;
1714
+ switch (_b) {
1715
+ case "AccessDeniedException": return [3, 2];
1716
+ case "com.amazonaws.budgets#AccessDeniedException": return [3, 2];
1717
+ case "InternalErrorException": return [3, 4];
1718
+ case "com.amazonaws.budgets#InternalErrorException": return [3, 4];
1719
+ case "InvalidParameterException": return [3, 6];
1720
+ case "com.amazonaws.budgets#InvalidParameterException": return [3, 6];
1721
+ case "NotFoundException": return [3, 8];
1722
+ case "com.amazonaws.budgets#NotFoundException": return [3, 8];
1723
+ case "ResourceLockedException": return [3, 10];
1724
+ case "com.amazonaws.budgets#ResourceLockedException": return [3, 10];
1725
+ case "ThrottlingException": return [3, 12];
1726
+ case "com.amazonaws.budgets#ThrottlingException": return [3, 12];
1727
+ }
1728
+ return [3, 14];
1729
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1730
+ case 3: throw _d.sent();
1731
+ case 4: return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
1732
+ case 5: throw _d.sent();
1733
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
1734
+ case 7: throw _d.sent();
1735
+ case 8: return [4, deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context)];
1736
+ case 9: throw _d.sent();
1737
+ case 10: return [4, deserializeAws_json1_1ResourceLockedExceptionResponse(parsedOutput, context)];
1738
+ case 11: throw _d.sent();
1739
+ case 12: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1740
+ case 13: throw _d.sent();
1741
+ case 14:
1742
+ parsedBody = parsedOutput.body;
1743
+ throwDefaultError({
1744
+ output: output,
1745
+ parsedBody: parsedBody,
1746
+ exceptionCtor: __BaseException,
1747
+ errorCode: errorCode,
1748
+ });
1749
+ _d.label = 15;
1750
+ case 15: return [2];
1751
+ }
1752
+ });
1753
+ }); };
1754
+ export var deserializeAws_json1_1UpdateNotificationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1755
+ var data, contents, response;
1756
+ return __generator(this, function (_a) {
1757
+ switch (_a.label) {
1758
+ case 0:
1759
+ if (output.statusCode >= 300) {
1760
+ return [2, deserializeAws_json1_1UpdateNotificationCommandError(output, context)];
1761
+ }
1762
+ return [4, parseBody(output.body, context)];
1763
+ case 1:
1764
+ data = _a.sent();
1765
+ contents = {};
1766
+ contents = deserializeAws_json1_1UpdateNotificationResponse(data, context);
1767
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1768
+ return [2, Promise.resolve(response)];
1769
+ }
1770
+ });
1771
+ }); };
1772
+ var deserializeAws_json1_1UpdateNotificationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1773
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1774
+ var _c;
1775
+ return __generator(this, function (_d) {
1776
+ switch (_d.label) {
1777
+ case 0:
1778
+ _a = [__assign({}, output)];
1779
+ _c = {};
1780
+ return [4, parseErrorBody(output.body, context)];
1781
+ case 1:
1782
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1783
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1784
+ _b = errorCode;
1785
+ switch (_b) {
1786
+ case "AccessDeniedException": return [3, 2];
1787
+ case "com.amazonaws.budgets#AccessDeniedException": return [3, 2];
1788
+ case "DuplicateRecordException": return [3, 4];
1789
+ case "com.amazonaws.budgets#DuplicateRecordException": return [3, 4];
1790
+ case "InternalErrorException": return [3, 6];
1791
+ case "com.amazonaws.budgets#InternalErrorException": return [3, 6];
1792
+ case "InvalidParameterException": return [3, 8];
1793
+ case "com.amazonaws.budgets#InvalidParameterException": return [3, 8];
1794
+ case "NotFoundException": return [3, 10];
1795
+ case "com.amazonaws.budgets#NotFoundException": return [3, 10];
1796
+ case "ThrottlingException": return [3, 12];
1797
+ case "com.amazonaws.budgets#ThrottlingException": return [3, 12];
1798
+ }
1799
+ return [3, 14];
1800
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1801
+ case 3: throw _d.sent();
1802
+ case 4: return [4, deserializeAws_json1_1DuplicateRecordExceptionResponse(parsedOutput, context)];
1803
+ case 5: throw _d.sent();
1804
+ case 6: return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
1805
+ case 7: throw _d.sent();
1806
+ case 8: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
1807
+ case 9: throw _d.sent();
1808
+ case 10: return [4, deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context)];
1809
+ case 11: throw _d.sent();
1810
+ case 12: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1811
+ case 13: throw _d.sent();
1812
+ case 14:
1813
+ parsedBody = parsedOutput.body;
1814
+ throwDefaultError({
1815
+ output: output,
1816
+ parsedBody: parsedBody,
1817
+ exceptionCtor: __BaseException,
1818
+ errorCode: errorCode,
1819
+ });
1820
+ _d.label = 15;
1821
+ case 15: return [2];
1822
+ }
1823
+ });
1824
+ }); };
1825
+ export var deserializeAws_json1_1UpdateSubscriberCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1826
+ var data, contents, response;
1827
+ return __generator(this, function (_a) {
1828
+ switch (_a.label) {
1829
+ case 0:
1830
+ if (output.statusCode >= 300) {
1831
+ return [2, deserializeAws_json1_1UpdateSubscriberCommandError(output, context)];
1832
+ }
1833
+ return [4, parseBody(output.body, context)];
1834
+ case 1:
1835
+ data = _a.sent();
1836
+ contents = {};
1837
+ contents = deserializeAws_json1_1UpdateSubscriberResponse(data, context);
1838
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1839
+ return [2, Promise.resolve(response)];
1840
+ }
1841
+ });
1842
+ }); };
1843
+ var deserializeAws_json1_1UpdateSubscriberCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1844
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1845
+ var _c;
1846
+ return __generator(this, function (_d) {
1847
+ switch (_d.label) {
1848
+ case 0:
1849
+ _a = [__assign({}, output)];
1850
+ _c = {};
1851
+ return [4, parseErrorBody(output.body, context)];
1852
+ case 1:
1853
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1854
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1855
+ _b = errorCode;
1856
+ switch (_b) {
1857
+ case "AccessDeniedException": return [3, 2];
1858
+ case "com.amazonaws.budgets#AccessDeniedException": return [3, 2];
1859
+ case "DuplicateRecordException": return [3, 4];
1860
+ case "com.amazonaws.budgets#DuplicateRecordException": return [3, 4];
1861
+ case "InternalErrorException": return [3, 6];
1862
+ case "com.amazonaws.budgets#InternalErrorException": return [3, 6];
1863
+ case "InvalidParameterException": return [3, 8];
1864
+ case "com.amazonaws.budgets#InvalidParameterException": return [3, 8];
1865
+ case "NotFoundException": return [3, 10];
1866
+ case "com.amazonaws.budgets#NotFoundException": return [3, 10];
1867
+ case "ThrottlingException": return [3, 12];
1868
+ case "com.amazonaws.budgets#ThrottlingException": return [3, 12];
1869
+ }
1870
+ return [3, 14];
1871
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1872
+ case 3: throw _d.sent();
1873
+ case 4: return [4, deserializeAws_json1_1DuplicateRecordExceptionResponse(parsedOutput, context)];
1874
+ case 5: throw _d.sent();
1875
+ case 6: return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
1876
+ case 7: throw _d.sent();
1877
+ case 8: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
1878
+ case 9: throw _d.sent();
1879
+ case 10: return [4, deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context)];
1880
+ case 11: throw _d.sent();
1881
+ case 12: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1882
+ case 13: throw _d.sent();
1883
+ case 14:
1884
+ parsedBody = parsedOutput.body;
1885
+ throwDefaultError({
1886
+ output: output,
1887
+ parsedBody: parsedBody,
1888
+ exceptionCtor: __BaseException,
1889
+ errorCode: errorCode,
1890
+ });
1891
+ _d.label = 15;
1892
+ case 15: return [2];
1893
+ }
1894
+ });
1895
+ }); };
1896
+ var deserializeAws_json1_1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1897
+ var body, deserialized, exception;
1898
+ return __generator(this, function (_a) {
1899
+ body = parsedOutput.body;
1900
+ deserialized = deserializeAws_json1_1AccessDeniedException(body, context);
1901
+ exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1902
+ return [2, __decorateServiceException(exception, body)];
1903
+ });
1904
+ }); };
1905
+ var deserializeAws_json1_1CreationLimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1906
+ var body, deserialized, exception;
1907
+ return __generator(this, function (_a) {
1908
+ body = parsedOutput.body;
1909
+ deserialized = deserializeAws_json1_1CreationLimitExceededException(body, context);
1910
+ exception = new CreationLimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1911
+ return [2, __decorateServiceException(exception, body)];
1912
+ });
1913
+ }); };
1914
+ var deserializeAws_json1_1DuplicateRecordExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1915
+ var body, deserialized, exception;
1916
+ return __generator(this, function (_a) {
1917
+ body = parsedOutput.body;
1918
+ deserialized = deserializeAws_json1_1DuplicateRecordException(body, context);
1919
+ exception = new DuplicateRecordException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1920
+ return [2, __decorateServiceException(exception, body)];
1921
+ });
1922
+ }); };
1923
+ var deserializeAws_json1_1ExpiredNextTokenExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1924
+ var body, deserialized, exception;
1925
+ return __generator(this, function (_a) {
1926
+ body = parsedOutput.body;
1927
+ deserialized = deserializeAws_json1_1ExpiredNextTokenException(body, context);
1928
+ exception = new ExpiredNextTokenException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1929
+ return [2, __decorateServiceException(exception, body)];
1930
+ });
1931
+ }); };
1932
+ var deserializeAws_json1_1InternalErrorExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1933
+ var body, deserialized, exception;
1934
+ return __generator(this, function (_a) {
1935
+ body = parsedOutput.body;
1936
+ deserialized = deserializeAws_json1_1InternalErrorException(body, context);
1937
+ exception = new InternalErrorException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1938
+ return [2, __decorateServiceException(exception, body)];
1939
+ });
1940
+ }); };
1941
+ var deserializeAws_json1_1InvalidNextTokenExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1942
+ var body, deserialized, exception;
1943
+ return __generator(this, function (_a) {
1944
+ body = parsedOutput.body;
1945
+ deserialized = deserializeAws_json1_1InvalidNextTokenException(body, context);
1946
+ exception = new InvalidNextTokenException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1947
+ return [2, __decorateServiceException(exception, body)];
1948
+ });
1949
+ }); };
1950
+ var deserializeAws_json1_1InvalidParameterExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1951
+ var body, deserialized, exception;
1952
+ return __generator(this, function (_a) {
1953
+ body = parsedOutput.body;
1954
+ deserialized = deserializeAws_json1_1InvalidParameterException(body, context);
1955
+ exception = new InvalidParameterException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1956
+ return [2, __decorateServiceException(exception, body)];
1957
+ });
1958
+ }); };
1959
+ var deserializeAws_json1_1NotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1960
+ var body, deserialized, exception;
1961
+ return __generator(this, function (_a) {
1962
+ body = parsedOutput.body;
1963
+ deserialized = deserializeAws_json1_1NotFoundException(body, context);
1964
+ exception = new NotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1965
+ return [2, __decorateServiceException(exception, body)];
1966
+ });
1967
+ }); };
1968
+ var deserializeAws_json1_1ResourceLockedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1969
+ var body, deserialized, exception;
1970
+ return __generator(this, function (_a) {
1971
+ body = parsedOutput.body;
1972
+ deserialized = deserializeAws_json1_1ResourceLockedException(body, context);
1973
+ exception = new ResourceLockedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1974
+ return [2, __decorateServiceException(exception, body)];
1975
+ });
1976
+ }); };
1977
+ var deserializeAws_json1_1ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1978
+ var body, deserialized, exception;
1979
+ return __generator(this, function (_a) {
1980
+ body = parsedOutput.body;
1981
+ deserialized = deserializeAws_json1_1ThrottlingException(body, context);
1982
+ exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1983
+ return [2, __decorateServiceException(exception, body)];
1984
+ });
1985
+ }); };
1986
+ var serializeAws_json1_1ActionThreshold = function (input, context) {
1987
+ return __assign(__assign({}, (input.ActionThresholdType != null && { ActionThresholdType: input.ActionThresholdType })), (input.ActionThresholdValue != null && { ActionThresholdValue: __serializeFloat(input.ActionThresholdValue) }));
1988
+ };
1989
+ var serializeAws_json1_1AutoAdjustData = function (input, context) {
1990
+ return __assign(__assign(__assign({}, (input.AutoAdjustType != null && { AutoAdjustType: input.AutoAdjustType })), (input.HistoricalOptions != null && {
1991
+ HistoricalOptions: serializeAws_json1_1HistoricalOptions(input.HistoricalOptions, context),
1992
+ })), (input.LastAutoAdjustTime != null && {
1993
+ LastAutoAdjustTime: Math.round(input.LastAutoAdjustTime.getTime() / 1000),
1994
+ }));
1995
+ };
1996
+ var serializeAws_json1_1Budget = function (input, context) {
1997
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AutoAdjustData != null && {
1998
+ AutoAdjustData: serializeAws_json1_1AutoAdjustData(input.AutoAdjustData, context),
1999
+ })), (input.BudgetLimit != null && { BudgetLimit: serializeAws_json1_1Spend(input.BudgetLimit, context) })), (input.BudgetName != null && { BudgetName: input.BudgetName })), (input.BudgetType != null && { BudgetType: input.BudgetType })), (input.CalculatedSpend != null && {
2000
+ CalculatedSpend: serializeAws_json1_1CalculatedSpend(input.CalculatedSpend, context),
2001
+ })), (input.CostFilters != null && { CostFilters: serializeAws_json1_1CostFilters(input.CostFilters, context) })), (input.CostTypes != null && { CostTypes: serializeAws_json1_1CostTypes(input.CostTypes, context) })), (input.LastUpdatedTime != null && { LastUpdatedTime: Math.round(input.LastUpdatedTime.getTime() / 1000) })), (input.PlannedBudgetLimits != null && {
2002
+ PlannedBudgetLimits: serializeAws_json1_1PlannedBudgetLimits(input.PlannedBudgetLimits, context),
2003
+ })), (input.TimePeriod != null && { TimePeriod: serializeAws_json1_1TimePeriod(input.TimePeriod, context) })), (input.TimeUnit != null && { TimeUnit: input.TimeUnit }));
2004
+ };
2005
+ var serializeAws_json1_1CalculatedSpend = function (input, context) {
2006
+ return __assign(__assign({}, (input.ActualSpend != null && { ActualSpend: serializeAws_json1_1Spend(input.ActualSpend, context) })), (input.ForecastedSpend != null && {
2007
+ ForecastedSpend: serializeAws_json1_1Spend(input.ForecastedSpend, context),
2008
+ }));
2009
+ };
2010
+ var serializeAws_json1_1CostFilters = function (input, context) {
2011
+ return Object.entries(input).reduce(function (acc, _a) {
2012
+ var _b;
2013
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
1457
2014
  if (value === null) {
1458
2015
  return acc;
1459
2016
  }
1460
- return {
1461
- ...acc,
1462
- [key]: serializeAws_json1_1DimensionValues(value, context),
1463
- };
2017
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = serializeAws_json1_1DimensionValues(value, context), _b));
1464
2018
  }, {});
1465
2019
  };
1466
- const serializeAws_json1_1CostTypes = (input, context) => {
1467
- return {
1468
- ...(input.IncludeCredit != null && { IncludeCredit: input.IncludeCredit }),
1469
- ...(input.IncludeDiscount != null && { IncludeDiscount: input.IncludeDiscount }),
1470
- ...(input.IncludeOtherSubscription != null && { IncludeOtherSubscription: input.IncludeOtherSubscription }),
1471
- ...(input.IncludeRecurring != null && { IncludeRecurring: input.IncludeRecurring }),
1472
- ...(input.IncludeRefund != null && { IncludeRefund: input.IncludeRefund }),
1473
- ...(input.IncludeSubscription != null && { IncludeSubscription: input.IncludeSubscription }),
1474
- ...(input.IncludeSupport != null && { IncludeSupport: input.IncludeSupport }),
1475
- ...(input.IncludeTax != null && { IncludeTax: input.IncludeTax }),
1476
- ...(input.IncludeUpfront != null && { IncludeUpfront: input.IncludeUpfront }),
1477
- ...(input.UseAmortized != null && { UseAmortized: input.UseAmortized }),
1478
- ...(input.UseBlended != null && { UseBlended: input.UseBlended }),
1479
- };
2020
+ var serializeAws_json1_1CostTypes = function (input, context) {
2021
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.IncludeCredit != null && { IncludeCredit: input.IncludeCredit })), (input.IncludeDiscount != null && { IncludeDiscount: input.IncludeDiscount })), (input.IncludeOtherSubscription != null && { IncludeOtherSubscription: input.IncludeOtherSubscription })), (input.IncludeRecurring != null && { IncludeRecurring: input.IncludeRecurring })), (input.IncludeRefund != null && { IncludeRefund: input.IncludeRefund })), (input.IncludeSubscription != null && { IncludeSubscription: input.IncludeSubscription })), (input.IncludeSupport != null && { IncludeSupport: input.IncludeSupport })), (input.IncludeTax != null && { IncludeTax: input.IncludeTax })), (input.IncludeUpfront != null && { IncludeUpfront: input.IncludeUpfront })), (input.UseAmortized != null && { UseAmortized: input.UseAmortized })), (input.UseBlended != null && { UseBlended: input.UseBlended }));
1480
2022
  };
1481
- const serializeAws_json1_1CreateBudgetActionRequest = (input, context) => {
1482
- return {
1483
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1484
- ...(input.ActionThreshold != null && {
1485
- ActionThreshold: serializeAws_json1_1ActionThreshold(input.ActionThreshold, context),
1486
- }),
1487
- ...(input.ActionType != null && { ActionType: input.ActionType }),
1488
- ...(input.ApprovalModel != null && { ApprovalModel: input.ApprovalModel }),
1489
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1490
- ...(input.Definition != null && { Definition: serializeAws_json1_1Definition(input.Definition, context) }),
1491
- ...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }),
1492
- ...(input.NotificationType != null && { NotificationType: input.NotificationType }),
1493
- ...(input.Subscribers != null && { Subscribers: serializeAws_json1_1Subscribers(input.Subscribers, context) }),
1494
- };
2023
+ var serializeAws_json1_1CreateBudgetActionRequest = function (input, context) {
2024
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.ActionThreshold != null && {
2025
+ ActionThreshold: serializeAws_json1_1ActionThreshold(input.ActionThreshold, context),
2026
+ })), (input.ActionType != null && { ActionType: input.ActionType })), (input.ApprovalModel != null && { ApprovalModel: input.ApprovalModel })), (input.BudgetName != null && { BudgetName: input.BudgetName })), (input.Definition != null && { Definition: serializeAws_json1_1Definition(input.Definition, context) })), (input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn })), (input.NotificationType != null && { NotificationType: input.NotificationType })), (input.Subscribers != null && { Subscribers: serializeAws_json1_1Subscribers(input.Subscribers, context) }));
1495
2027
  };
1496
- const serializeAws_json1_1CreateBudgetRequest = (input, context) => {
1497
- return {
1498
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1499
- ...(input.Budget != null && { Budget: serializeAws_json1_1Budget(input.Budget, context) }),
1500
- ...(input.NotificationsWithSubscribers != null && {
1501
- NotificationsWithSubscribers: serializeAws_json1_1NotificationWithSubscribersList(input.NotificationsWithSubscribers, context),
1502
- }),
1503
- };
2028
+ var serializeAws_json1_1CreateBudgetRequest = function (input, context) {
2029
+ return __assign(__assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.Budget != null && { Budget: serializeAws_json1_1Budget(input.Budget, context) })), (input.NotificationsWithSubscribers != null && {
2030
+ NotificationsWithSubscribers: serializeAws_json1_1NotificationWithSubscribersList(input.NotificationsWithSubscribers, context),
2031
+ }));
1504
2032
  };
1505
- const serializeAws_json1_1CreateNotificationRequest = (input, context) => {
1506
- return {
1507
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1508
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1509
- ...(input.Notification != null && { Notification: serializeAws_json1_1Notification(input.Notification, context) }),
1510
- ...(input.Subscribers != null && { Subscribers: serializeAws_json1_1Subscribers(input.Subscribers, context) }),
1511
- };
2033
+ var serializeAws_json1_1CreateNotificationRequest = function (input, context) {
2034
+ return __assign(__assign(__assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.BudgetName != null && { BudgetName: input.BudgetName })), (input.Notification != null && { Notification: serializeAws_json1_1Notification(input.Notification, context) })), (input.Subscribers != null && { Subscribers: serializeAws_json1_1Subscribers(input.Subscribers, context) }));
1512
2035
  };
1513
- const serializeAws_json1_1CreateSubscriberRequest = (input, context) => {
1514
- return {
1515
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1516
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1517
- ...(input.Notification != null && { Notification: serializeAws_json1_1Notification(input.Notification, context) }),
1518
- ...(input.Subscriber != null && { Subscriber: serializeAws_json1_1Subscriber(input.Subscriber, context) }),
1519
- };
2036
+ var serializeAws_json1_1CreateSubscriberRequest = function (input, context) {
2037
+ return __assign(__assign(__assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.BudgetName != null && { BudgetName: input.BudgetName })), (input.Notification != null && { Notification: serializeAws_json1_1Notification(input.Notification, context) })), (input.Subscriber != null && { Subscriber: serializeAws_json1_1Subscriber(input.Subscriber, context) }));
1520
2038
  };
1521
- const serializeAws_json1_1Definition = (input, context) => {
1522
- return {
1523
- ...(input.IamActionDefinition != null && {
1524
- IamActionDefinition: serializeAws_json1_1IamActionDefinition(input.IamActionDefinition, context),
1525
- }),
1526
- ...(input.ScpActionDefinition != null && {
1527
- ScpActionDefinition: serializeAws_json1_1ScpActionDefinition(input.ScpActionDefinition, context),
1528
- }),
1529
- ...(input.SsmActionDefinition != null && {
1530
- SsmActionDefinition: serializeAws_json1_1SsmActionDefinition(input.SsmActionDefinition, context),
1531
- }),
1532
- };
2039
+ var serializeAws_json1_1Definition = function (input, context) {
2040
+ return __assign(__assign(__assign({}, (input.IamActionDefinition != null && {
2041
+ IamActionDefinition: serializeAws_json1_1IamActionDefinition(input.IamActionDefinition, context),
2042
+ })), (input.ScpActionDefinition != null && {
2043
+ ScpActionDefinition: serializeAws_json1_1ScpActionDefinition(input.ScpActionDefinition, context),
2044
+ })), (input.SsmActionDefinition != null && {
2045
+ SsmActionDefinition: serializeAws_json1_1SsmActionDefinition(input.SsmActionDefinition, context),
2046
+ }));
1533
2047
  };
1534
- const serializeAws_json1_1DeleteBudgetActionRequest = (input, context) => {
1535
- return {
1536
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1537
- ...(input.ActionId != null && { ActionId: input.ActionId }),
1538
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1539
- };
2048
+ var serializeAws_json1_1DeleteBudgetActionRequest = function (input, context) {
2049
+ return __assign(__assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.ActionId != null && { ActionId: input.ActionId })), (input.BudgetName != null && { BudgetName: input.BudgetName }));
1540
2050
  };
1541
- const serializeAws_json1_1DeleteBudgetRequest = (input, context) => {
1542
- return {
1543
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1544
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1545
- };
2051
+ var serializeAws_json1_1DeleteBudgetRequest = function (input, context) {
2052
+ return __assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.BudgetName != null && { BudgetName: input.BudgetName }));
1546
2053
  };
1547
- const serializeAws_json1_1DeleteNotificationRequest = (input, context) => {
1548
- return {
1549
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1550
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1551
- ...(input.Notification != null && { Notification: serializeAws_json1_1Notification(input.Notification, context) }),
1552
- };
2054
+ var serializeAws_json1_1DeleteNotificationRequest = function (input, context) {
2055
+ return __assign(__assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.BudgetName != null && { BudgetName: input.BudgetName })), (input.Notification != null && { Notification: serializeAws_json1_1Notification(input.Notification, context) }));
1553
2056
  };
1554
- const serializeAws_json1_1DeleteSubscriberRequest = (input, context) => {
1555
- return {
1556
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1557
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1558
- ...(input.Notification != null && { Notification: serializeAws_json1_1Notification(input.Notification, context) }),
1559
- ...(input.Subscriber != null && { Subscriber: serializeAws_json1_1Subscriber(input.Subscriber, context) }),
1560
- };
2057
+ var serializeAws_json1_1DeleteSubscriberRequest = function (input, context) {
2058
+ return __assign(__assign(__assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.BudgetName != null && { BudgetName: input.BudgetName })), (input.Notification != null && { Notification: serializeAws_json1_1Notification(input.Notification, context) })), (input.Subscriber != null && { Subscriber: serializeAws_json1_1Subscriber(input.Subscriber, context) }));
1561
2059
  };
1562
- const serializeAws_json1_1DescribeBudgetActionHistoriesRequest = (input, context) => {
1563
- return {
1564
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1565
- ...(input.ActionId != null && { ActionId: input.ActionId }),
1566
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1567
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1568
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1569
- ...(input.TimePeriod != null && { TimePeriod: serializeAws_json1_1TimePeriod(input.TimePeriod, context) }),
1570
- };
2060
+ var serializeAws_json1_1DescribeBudgetActionHistoriesRequest = function (input, context) {
2061
+ return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.ActionId != null && { ActionId: input.ActionId })), (input.BudgetName != null && { BudgetName: input.BudgetName })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.TimePeriod != null && { TimePeriod: serializeAws_json1_1TimePeriod(input.TimePeriod, context) }));
1571
2062
  };
1572
- const serializeAws_json1_1DescribeBudgetActionRequest = (input, context) => {
1573
- return {
1574
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1575
- ...(input.ActionId != null && { ActionId: input.ActionId }),
1576
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1577
- };
2063
+ var serializeAws_json1_1DescribeBudgetActionRequest = function (input, context) {
2064
+ return __assign(__assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.ActionId != null && { ActionId: input.ActionId })), (input.BudgetName != null && { BudgetName: input.BudgetName }));
1578
2065
  };
1579
- const serializeAws_json1_1DescribeBudgetActionsForAccountRequest = (input, context) => {
1580
- return {
1581
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1582
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1583
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1584
- };
2066
+ var serializeAws_json1_1DescribeBudgetActionsForAccountRequest = function (input, context) {
2067
+ return __assign(__assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
1585
2068
  };
1586
- const serializeAws_json1_1DescribeBudgetActionsForBudgetRequest = (input, context) => {
1587
- return {
1588
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1589
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1590
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1591
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1592
- };
2069
+ var serializeAws_json1_1DescribeBudgetActionsForBudgetRequest = function (input, context) {
2070
+ return __assign(__assign(__assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.BudgetName != null && { BudgetName: input.BudgetName })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
1593
2071
  };
1594
- const serializeAws_json1_1DescribeBudgetNotificationsForAccountRequest = (input, context) => {
1595
- return {
1596
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1597
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1598
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1599
- };
2072
+ var serializeAws_json1_1DescribeBudgetNotificationsForAccountRequest = function (input, context) {
2073
+ return __assign(__assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
1600
2074
  };
1601
- const serializeAws_json1_1DescribeBudgetPerformanceHistoryRequest = (input, context) => {
1602
- return {
1603
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1604
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1605
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1606
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1607
- ...(input.TimePeriod != null && { TimePeriod: serializeAws_json1_1TimePeriod(input.TimePeriod, context) }),
1608
- };
2075
+ var serializeAws_json1_1DescribeBudgetPerformanceHistoryRequest = function (input, context) {
2076
+ return __assign(__assign(__assign(__assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.BudgetName != null && { BudgetName: input.BudgetName })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.TimePeriod != null && { TimePeriod: serializeAws_json1_1TimePeriod(input.TimePeriod, context) }));
1609
2077
  };
1610
- const serializeAws_json1_1DescribeBudgetRequest = (input, context) => {
1611
- return {
1612
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1613
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1614
- };
2078
+ var serializeAws_json1_1DescribeBudgetRequest = function (input, context) {
2079
+ return __assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.BudgetName != null && { BudgetName: input.BudgetName }));
1615
2080
  };
1616
- const serializeAws_json1_1DescribeBudgetsRequest = (input, context) => {
1617
- return {
1618
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1619
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1620
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1621
- };
2081
+ var serializeAws_json1_1DescribeBudgetsRequest = function (input, context) {
2082
+ return __assign(__assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
1622
2083
  };
1623
- const serializeAws_json1_1DescribeNotificationsForBudgetRequest = (input, context) => {
1624
- return {
1625
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1626
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1627
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1628
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1629
- };
2084
+ var serializeAws_json1_1DescribeNotificationsForBudgetRequest = function (input, context) {
2085
+ return __assign(__assign(__assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.BudgetName != null && { BudgetName: input.BudgetName })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
1630
2086
  };
1631
- const serializeAws_json1_1DescribeSubscribersForNotificationRequest = (input, context) => {
1632
- return {
1633
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1634
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1635
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1636
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1637
- ...(input.Notification != null && { Notification: serializeAws_json1_1Notification(input.Notification, context) }),
1638
- };
2087
+ var serializeAws_json1_1DescribeSubscribersForNotificationRequest = function (input, context) {
2088
+ return __assign(__assign(__assign(__assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.BudgetName != null && { BudgetName: input.BudgetName })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.Notification != null && { Notification: serializeAws_json1_1Notification(input.Notification, context) }));
1639
2089
  };
1640
- const serializeAws_json1_1DimensionValues = (input, context) => {
2090
+ var serializeAws_json1_1DimensionValues = function (input, context) {
1641
2091
  return input
1642
- .filter((e) => e != null)
1643
- .map((entry) => {
2092
+ .filter(function (e) { return e != null; })
2093
+ .map(function (entry) {
1644
2094
  return entry;
1645
2095
  });
1646
2096
  };
1647
- const serializeAws_json1_1ExecuteBudgetActionRequest = (input, context) => {
1648
- return {
1649
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1650
- ...(input.ActionId != null && { ActionId: input.ActionId }),
1651
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1652
- ...(input.ExecutionType != null && { ExecutionType: input.ExecutionType }),
1653
- };
2097
+ var serializeAws_json1_1ExecuteBudgetActionRequest = function (input, context) {
2098
+ return __assign(__assign(__assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.ActionId != null && { ActionId: input.ActionId })), (input.BudgetName != null && { BudgetName: input.BudgetName })), (input.ExecutionType != null && { ExecutionType: input.ExecutionType }));
1654
2099
  };
1655
- const serializeAws_json1_1Groups = (input, context) => {
2100
+ var serializeAws_json1_1Groups = function (input, context) {
1656
2101
  return input
1657
- .filter((e) => e != null)
1658
- .map((entry) => {
2102
+ .filter(function (e) { return e != null; })
2103
+ .map(function (entry) {
1659
2104
  return entry;
1660
2105
  });
1661
2106
  };
1662
- const serializeAws_json1_1HistoricalOptions = (input, context) => {
1663
- return {
1664
- ...(input.BudgetAdjustmentPeriod != null && { BudgetAdjustmentPeriod: input.BudgetAdjustmentPeriod }),
1665
- ...(input.LookBackAvailablePeriods != null && { LookBackAvailablePeriods: input.LookBackAvailablePeriods }),
1666
- };
2107
+ var serializeAws_json1_1HistoricalOptions = function (input, context) {
2108
+ return __assign(__assign({}, (input.BudgetAdjustmentPeriod != null && { BudgetAdjustmentPeriod: input.BudgetAdjustmentPeriod })), (input.LookBackAvailablePeriods != null && { LookBackAvailablePeriods: input.LookBackAvailablePeriods }));
1667
2109
  };
1668
- const serializeAws_json1_1IamActionDefinition = (input, context) => {
1669
- return {
1670
- ...(input.Groups != null && { Groups: serializeAws_json1_1Groups(input.Groups, context) }),
1671
- ...(input.PolicyArn != null && { PolicyArn: input.PolicyArn }),
1672
- ...(input.Roles != null && { Roles: serializeAws_json1_1Roles(input.Roles, context) }),
1673
- ...(input.Users != null && { Users: serializeAws_json1_1Users(input.Users, context) }),
1674
- };
2110
+ var serializeAws_json1_1IamActionDefinition = function (input, context) {
2111
+ return __assign(__assign(__assign(__assign({}, (input.Groups != null && { Groups: serializeAws_json1_1Groups(input.Groups, context) })), (input.PolicyArn != null && { PolicyArn: input.PolicyArn })), (input.Roles != null && { Roles: serializeAws_json1_1Roles(input.Roles, context) })), (input.Users != null && { Users: serializeAws_json1_1Users(input.Users, context) }));
1675
2112
  };
1676
- const serializeAws_json1_1InstanceIds = (input, context) => {
2113
+ var serializeAws_json1_1InstanceIds = function (input, context) {
1677
2114
  return input
1678
- .filter((e) => e != null)
1679
- .map((entry) => {
2115
+ .filter(function (e) { return e != null; })
2116
+ .map(function (entry) {
1680
2117
  return entry;
1681
2118
  });
1682
2119
  };
1683
- const serializeAws_json1_1Notification = (input, context) => {
1684
- return {
1685
- ...(input.ComparisonOperator != null && { ComparisonOperator: input.ComparisonOperator }),
1686
- ...(input.NotificationState != null && { NotificationState: input.NotificationState }),
1687
- ...(input.NotificationType != null && { NotificationType: input.NotificationType }),
1688
- ...(input.Threshold != null && { Threshold: __serializeFloat(input.Threshold) }),
1689
- ...(input.ThresholdType != null && { ThresholdType: input.ThresholdType }),
1690
- };
2120
+ var serializeAws_json1_1Notification = function (input, context) {
2121
+ return __assign(__assign(__assign(__assign(__assign({}, (input.ComparisonOperator != null && { ComparisonOperator: input.ComparisonOperator })), (input.NotificationState != null && { NotificationState: input.NotificationState })), (input.NotificationType != null && { NotificationType: input.NotificationType })), (input.Threshold != null && { Threshold: __serializeFloat(input.Threshold) })), (input.ThresholdType != null && { ThresholdType: input.ThresholdType }));
1691
2122
  };
1692
- const serializeAws_json1_1NotificationWithSubscribers = (input, context) => {
1693
- return {
1694
- ...(input.Notification != null && { Notification: serializeAws_json1_1Notification(input.Notification, context) }),
1695
- ...(input.Subscribers != null && { Subscribers: serializeAws_json1_1Subscribers(input.Subscribers, context) }),
1696
- };
2123
+ var serializeAws_json1_1NotificationWithSubscribers = function (input, context) {
2124
+ return __assign(__assign({}, (input.Notification != null && { Notification: serializeAws_json1_1Notification(input.Notification, context) })), (input.Subscribers != null && { Subscribers: serializeAws_json1_1Subscribers(input.Subscribers, context) }));
1697
2125
  };
1698
- const serializeAws_json1_1NotificationWithSubscribersList = (input, context) => {
2126
+ var serializeAws_json1_1NotificationWithSubscribersList = function (input, context) {
1699
2127
  return input
1700
- .filter((e) => e != null)
1701
- .map((entry) => {
2128
+ .filter(function (e) { return e != null; })
2129
+ .map(function (entry) {
1702
2130
  return serializeAws_json1_1NotificationWithSubscribers(entry, context);
1703
2131
  });
1704
2132
  };
1705
- const serializeAws_json1_1PlannedBudgetLimits = (input, context) => {
1706
- return Object.entries(input).reduce((acc, [key, value]) => {
2133
+ var serializeAws_json1_1PlannedBudgetLimits = function (input, context) {
2134
+ return Object.entries(input).reduce(function (acc, _a) {
2135
+ var _b;
2136
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
1707
2137
  if (value === null) {
1708
2138
  return acc;
1709
2139
  }
1710
- return {
1711
- ...acc,
1712
- [key]: serializeAws_json1_1Spend(value, context),
1713
- };
2140
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = serializeAws_json1_1Spend(value, context), _b));
1714
2141
  }, {});
1715
2142
  };
1716
- const serializeAws_json1_1Roles = (input, context) => {
2143
+ var serializeAws_json1_1Roles = function (input, context) {
1717
2144
  return input
1718
- .filter((e) => e != null)
1719
- .map((entry) => {
2145
+ .filter(function (e) { return e != null; })
2146
+ .map(function (entry) {
1720
2147
  return entry;
1721
2148
  });
1722
2149
  };
1723
- const serializeAws_json1_1ScpActionDefinition = (input, context) => {
1724
- return {
1725
- ...(input.PolicyId != null && { PolicyId: input.PolicyId }),
1726
- ...(input.TargetIds != null && { TargetIds: serializeAws_json1_1TargetIds(input.TargetIds, context) }),
1727
- };
2150
+ var serializeAws_json1_1ScpActionDefinition = function (input, context) {
2151
+ return __assign(__assign({}, (input.PolicyId != null && { PolicyId: input.PolicyId })), (input.TargetIds != null && { TargetIds: serializeAws_json1_1TargetIds(input.TargetIds, context) }));
1728
2152
  };
1729
- const serializeAws_json1_1Spend = (input, context) => {
1730
- return {
1731
- ...(input.Amount != null && { Amount: input.Amount }),
1732
- ...(input.Unit != null && { Unit: input.Unit }),
1733
- };
2153
+ var serializeAws_json1_1Spend = function (input, context) {
2154
+ return __assign(__assign({}, (input.Amount != null && { Amount: input.Amount })), (input.Unit != null && { Unit: input.Unit }));
1734
2155
  };
1735
- const serializeAws_json1_1SsmActionDefinition = (input, context) => {
1736
- return {
1737
- ...(input.ActionSubType != null && { ActionSubType: input.ActionSubType }),
1738
- ...(input.InstanceIds != null && { InstanceIds: serializeAws_json1_1InstanceIds(input.InstanceIds, context) }),
1739
- ...(input.Region != null && { Region: input.Region }),
1740
- };
2156
+ var serializeAws_json1_1SsmActionDefinition = function (input, context) {
2157
+ return __assign(__assign(__assign({}, (input.ActionSubType != null && { ActionSubType: input.ActionSubType })), (input.InstanceIds != null && { InstanceIds: serializeAws_json1_1InstanceIds(input.InstanceIds, context) })), (input.Region != null && { Region: input.Region }));
1741
2158
  };
1742
- const serializeAws_json1_1Subscriber = (input, context) => {
1743
- return {
1744
- ...(input.Address != null && { Address: input.Address }),
1745
- ...(input.SubscriptionType != null && { SubscriptionType: input.SubscriptionType }),
1746
- };
2159
+ var serializeAws_json1_1Subscriber = function (input, context) {
2160
+ return __assign(__assign({}, (input.Address != null && { Address: input.Address })), (input.SubscriptionType != null && { SubscriptionType: input.SubscriptionType }));
1747
2161
  };
1748
- const serializeAws_json1_1Subscribers = (input, context) => {
2162
+ var serializeAws_json1_1Subscribers = function (input, context) {
1749
2163
  return input
1750
- .filter((e) => e != null)
1751
- .map((entry) => {
2164
+ .filter(function (e) { return e != null; })
2165
+ .map(function (entry) {
1752
2166
  return serializeAws_json1_1Subscriber(entry, context);
1753
2167
  });
1754
2168
  };
1755
- const serializeAws_json1_1TargetIds = (input, context) => {
2169
+ var serializeAws_json1_1TargetIds = function (input, context) {
1756
2170
  return input
1757
- .filter((e) => e != null)
1758
- .map((entry) => {
2171
+ .filter(function (e) { return e != null; })
2172
+ .map(function (entry) {
1759
2173
  return entry;
1760
2174
  });
1761
2175
  };
1762
- const serializeAws_json1_1TimePeriod = (input, context) => {
1763
- return {
1764
- ...(input.End != null && { End: Math.round(input.End.getTime() / 1000) }),
1765
- ...(input.Start != null && { Start: Math.round(input.Start.getTime() / 1000) }),
1766
- };
2176
+ var serializeAws_json1_1TimePeriod = function (input, context) {
2177
+ return __assign(__assign({}, (input.End != null && { End: Math.round(input.End.getTime() / 1000) })), (input.Start != null && { Start: Math.round(input.Start.getTime() / 1000) }));
1767
2178
  };
1768
- const serializeAws_json1_1UpdateBudgetActionRequest = (input, context) => {
1769
- return {
1770
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1771
- ...(input.ActionId != null && { ActionId: input.ActionId }),
1772
- ...(input.ActionThreshold != null && {
1773
- ActionThreshold: serializeAws_json1_1ActionThreshold(input.ActionThreshold, context),
1774
- }),
1775
- ...(input.ApprovalModel != null && { ApprovalModel: input.ApprovalModel }),
1776
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1777
- ...(input.Definition != null && { Definition: serializeAws_json1_1Definition(input.Definition, context) }),
1778
- ...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }),
1779
- ...(input.NotificationType != null && { NotificationType: input.NotificationType }),
1780
- ...(input.Subscribers != null && { Subscribers: serializeAws_json1_1Subscribers(input.Subscribers, context) }),
1781
- };
2179
+ var serializeAws_json1_1UpdateBudgetActionRequest = function (input, context) {
2180
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.ActionId != null && { ActionId: input.ActionId })), (input.ActionThreshold != null && {
2181
+ ActionThreshold: serializeAws_json1_1ActionThreshold(input.ActionThreshold, context),
2182
+ })), (input.ApprovalModel != null && { ApprovalModel: input.ApprovalModel })), (input.BudgetName != null && { BudgetName: input.BudgetName })), (input.Definition != null && { Definition: serializeAws_json1_1Definition(input.Definition, context) })), (input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn })), (input.NotificationType != null && { NotificationType: input.NotificationType })), (input.Subscribers != null && { Subscribers: serializeAws_json1_1Subscribers(input.Subscribers, context) }));
1782
2183
  };
1783
- const serializeAws_json1_1UpdateBudgetRequest = (input, context) => {
1784
- return {
1785
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1786
- ...(input.NewBudget != null && { NewBudget: serializeAws_json1_1Budget(input.NewBudget, context) }),
1787
- };
2184
+ var serializeAws_json1_1UpdateBudgetRequest = function (input, context) {
2185
+ return __assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.NewBudget != null && { NewBudget: serializeAws_json1_1Budget(input.NewBudget, context) }));
1788
2186
  };
1789
- const serializeAws_json1_1UpdateNotificationRequest = (input, context) => {
1790
- return {
1791
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1792
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1793
- ...(input.NewNotification != null && {
1794
- NewNotification: serializeAws_json1_1Notification(input.NewNotification, context),
1795
- }),
1796
- ...(input.OldNotification != null && {
1797
- OldNotification: serializeAws_json1_1Notification(input.OldNotification, context),
1798
- }),
1799
- };
2187
+ var serializeAws_json1_1UpdateNotificationRequest = function (input, context) {
2188
+ return __assign(__assign(__assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.BudgetName != null && { BudgetName: input.BudgetName })), (input.NewNotification != null && {
2189
+ NewNotification: serializeAws_json1_1Notification(input.NewNotification, context),
2190
+ })), (input.OldNotification != null && {
2191
+ OldNotification: serializeAws_json1_1Notification(input.OldNotification, context),
2192
+ }));
1800
2193
  };
1801
- const serializeAws_json1_1UpdateSubscriberRequest = (input, context) => {
1802
- return {
1803
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1804
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1805
- ...(input.NewSubscriber != null && { NewSubscriber: serializeAws_json1_1Subscriber(input.NewSubscriber, context) }),
1806
- ...(input.Notification != null && { Notification: serializeAws_json1_1Notification(input.Notification, context) }),
1807
- ...(input.OldSubscriber != null && { OldSubscriber: serializeAws_json1_1Subscriber(input.OldSubscriber, context) }),
1808
- };
2194
+ var serializeAws_json1_1UpdateSubscriberRequest = function (input, context) {
2195
+ return __assign(__assign(__assign(__assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.BudgetName != null && { BudgetName: input.BudgetName })), (input.NewSubscriber != null && { NewSubscriber: serializeAws_json1_1Subscriber(input.NewSubscriber, context) })), (input.Notification != null && { Notification: serializeAws_json1_1Notification(input.Notification, context) })), (input.OldSubscriber != null && { OldSubscriber: serializeAws_json1_1Subscriber(input.OldSubscriber, context) }));
1809
2196
  };
1810
- const serializeAws_json1_1Users = (input, context) => {
2197
+ var serializeAws_json1_1Users = function (input, context) {
1811
2198
  return input
1812
- .filter((e) => e != null)
1813
- .map((entry) => {
2199
+ .filter(function (e) { return e != null; })
2200
+ .map(function (entry) {
1814
2201
  return entry;
1815
2202
  });
1816
2203
  };
1817
- const deserializeAws_json1_1AccessDeniedException = (output, context) => {
2204
+ var deserializeAws_json1_1AccessDeniedException = function (output, context) {
1818
2205
  return {
1819
2206
  Message: __expectString(output.Message),
1820
2207
  };
1821
2208
  };
1822
- const deserializeAws_json1_1Action = (output, context) => {
2209
+ var deserializeAws_json1_1Action = function (output, context) {
1823
2210
  return {
1824
2211
  ActionId: __expectString(output.ActionId),
1825
2212
  ActionThreshold: output.ActionThreshold != null
@@ -1835,10 +2222,10 @@ const deserializeAws_json1_1Action = (output, context) => {
1835
2222
  Subscribers: output.Subscribers != null ? deserializeAws_json1_1Subscribers(output.Subscribers, context) : undefined,
1836
2223
  };
1837
2224
  };
1838
- const deserializeAws_json1_1ActionHistories = (output, context) => {
1839
- const retVal = (output || [])
1840
- .filter((e) => e != null)
1841
- .map((entry) => {
2225
+ var deserializeAws_json1_1ActionHistories = function (output, context) {
2226
+ var retVal = (output || [])
2227
+ .filter(function (e) { return e != null; })
2228
+ .map(function (entry) {
1842
2229
  if (entry === null) {
1843
2230
  return null;
1844
2231
  }
@@ -1846,7 +2233,7 @@ const deserializeAws_json1_1ActionHistories = (output, context) => {
1846
2233
  });
1847
2234
  return retVal;
1848
2235
  };
1849
- const deserializeAws_json1_1ActionHistory = (output, context) => {
2236
+ var deserializeAws_json1_1ActionHistory = function (output, context) {
1850
2237
  return {
1851
2238
  ActionHistoryDetails: output.ActionHistoryDetails != null
1852
2239
  ? deserializeAws_json1_1ActionHistoryDetails(output.ActionHistoryDetails, context)
@@ -1856,16 +2243,16 @@ const deserializeAws_json1_1ActionHistory = (output, context) => {
1856
2243
  Timestamp: output.Timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) : undefined,
1857
2244
  };
1858
2245
  };
1859
- const deserializeAws_json1_1ActionHistoryDetails = (output, context) => {
2246
+ var deserializeAws_json1_1ActionHistoryDetails = function (output, context) {
1860
2247
  return {
1861
2248
  Action: output.Action != null ? deserializeAws_json1_1Action(output.Action, context) : undefined,
1862
2249
  Message: __expectString(output.Message),
1863
2250
  };
1864
2251
  };
1865
- const deserializeAws_json1_1Actions = (output, context) => {
1866
- const retVal = (output || [])
1867
- .filter((e) => e != null)
1868
- .map((entry) => {
2252
+ var deserializeAws_json1_1Actions = function (output, context) {
2253
+ var retVal = (output || [])
2254
+ .filter(function (e) { return e != null; })
2255
+ .map(function (entry) {
1869
2256
  if (entry === null) {
1870
2257
  return null;
1871
2258
  }
@@ -1873,13 +2260,13 @@ const deserializeAws_json1_1Actions = (output, context) => {
1873
2260
  });
1874
2261
  return retVal;
1875
2262
  };
1876
- const deserializeAws_json1_1ActionThreshold = (output, context) => {
2263
+ var deserializeAws_json1_1ActionThreshold = function (output, context) {
1877
2264
  return {
1878
2265
  ActionThresholdType: __expectString(output.ActionThresholdType),
1879
2266
  ActionThresholdValue: __limitedParseDouble(output.ActionThresholdValue),
1880
2267
  };
1881
2268
  };
1882
- const deserializeAws_json1_1AutoAdjustData = (output, context) => {
2269
+ var deserializeAws_json1_1AutoAdjustData = function (output, context) {
1883
2270
  return {
1884
2271
  AutoAdjustType: __expectString(output.AutoAdjustType),
1885
2272
  HistoricalOptions: output.HistoricalOptions != null
@@ -1890,7 +2277,7 @@ const deserializeAws_json1_1AutoAdjustData = (output, context) => {
1890
2277
  : undefined,
1891
2278
  };
1892
2279
  };
1893
- const deserializeAws_json1_1Budget = (output, context) => {
2280
+ var deserializeAws_json1_1Budget = function (output, context) {
1894
2281
  return {
1895
2282
  AutoAdjustData: output.AutoAdjustData != null ? deserializeAws_json1_1AutoAdjustData(output.AutoAdjustData, context) : undefined,
1896
2283
  BudgetLimit: output.BudgetLimit != null ? deserializeAws_json1_1Spend(output.BudgetLimit, context) : undefined,
@@ -1911,17 +2298,17 @@ const deserializeAws_json1_1Budget = (output, context) => {
1911
2298
  TimeUnit: __expectString(output.TimeUnit),
1912
2299
  };
1913
2300
  };
1914
- const deserializeAws_json1_1BudgetedAndActualAmounts = (output, context) => {
2301
+ var deserializeAws_json1_1BudgetedAndActualAmounts = function (output, context) {
1915
2302
  return {
1916
2303
  ActualAmount: output.ActualAmount != null ? deserializeAws_json1_1Spend(output.ActualAmount, context) : undefined,
1917
2304
  BudgetedAmount: output.BudgetedAmount != null ? deserializeAws_json1_1Spend(output.BudgetedAmount, context) : undefined,
1918
2305
  TimePeriod: output.TimePeriod != null ? deserializeAws_json1_1TimePeriod(output.TimePeriod, context) : undefined,
1919
2306
  };
1920
2307
  };
1921
- const deserializeAws_json1_1BudgetedAndActualAmountsList = (output, context) => {
1922
- const retVal = (output || [])
1923
- .filter((e) => e != null)
1924
- .map((entry) => {
2308
+ var deserializeAws_json1_1BudgetedAndActualAmountsList = function (output, context) {
2309
+ var retVal = (output || [])
2310
+ .filter(function (e) { return e != null; })
2311
+ .map(function (entry) {
1925
2312
  if (entry === null) {
1926
2313
  return null;
1927
2314
  }
@@ -1929,16 +2316,16 @@ const deserializeAws_json1_1BudgetedAndActualAmountsList = (output, context) =>
1929
2316
  });
1930
2317
  return retVal;
1931
2318
  };
1932
- const deserializeAws_json1_1BudgetNotificationsForAccount = (output, context) => {
2319
+ var deserializeAws_json1_1BudgetNotificationsForAccount = function (output, context) {
1933
2320
  return {
1934
2321
  BudgetName: __expectString(output.BudgetName),
1935
2322
  Notifications: output.Notifications != null ? deserializeAws_json1_1Notifications(output.Notifications, context) : undefined,
1936
2323
  };
1937
2324
  };
1938
- const deserializeAws_json1_1BudgetNotificationsForAccountList = (output, context) => {
1939
- const retVal = (output || [])
1940
- .filter((e) => e != null)
1941
- .map((entry) => {
2325
+ var deserializeAws_json1_1BudgetNotificationsForAccountList = function (output, context) {
2326
+ var retVal = (output || [])
2327
+ .filter(function (e) { return e != null; })
2328
+ .map(function (entry) {
1942
2329
  if (entry === null) {
1943
2330
  return null;
1944
2331
  }
@@ -1946,7 +2333,7 @@ const deserializeAws_json1_1BudgetNotificationsForAccountList = (output, context
1946
2333
  });
1947
2334
  return retVal;
1948
2335
  };
1949
- const deserializeAws_json1_1BudgetPerformanceHistory = (output, context) => {
2336
+ var deserializeAws_json1_1BudgetPerformanceHistory = function (output, context) {
1950
2337
  return {
1951
2338
  BudgetName: __expectString(output.BudgetName),
1952
2339
  BudgetType: __expectString(output.BudgetType),
@@ -1958,10 +2345,10 @@ const deserializeAws_json1_1BudgetPerformanceHistory = (output, context) => {
1958
2345
  TimeUnit: __expectString(output.TimeUnit),
1959
2346
  };
1960
2347
  };
1961
- const deserializeAws_json1_1Budgets = (output, context) => {
1962
- const retVal = (output || [])
1963
- .filter((e) => e != null)
1964
- .map((entry) => {
2348
+ var deserializeAws_json1_1Budgets = function (output, context) {
2349
+ var retVal = (output || [])
2350
+ .filter(function (e) { return e != null; })
2351
+ .map(function (entry) {
1965
2352
  if (entry === null) {
1966
2353
  return null;
1967
2354
  }
@@ -1969,24 +2356,23 @@ const deserializeAws_json1_1Budgets = (output, context) => {
1969
2356
  });
1970
2357
  return retVal;
1971
2358
  };
1972
- const deserializeAws_json1_1CalculatedSpend = (output, context) => {
2359
+ var deserializeAws_json1_1CalculatedSpend = function (output, context) {
1973
2360
  return {
1974
2361
  ActualSpend: output.ActualSpend != null ? deserializeAws_json1_1Spend(output.ActualSpend, context) : undefined,
1975
2362
  ForecastedSpend: output.ForecastedSpend != null ? deserializeAws_json1_1Spend(output.ForecastedSpend, context) : undefined,
1976
2363
  };
1977
2364
  };
1978
- const deserializeAws_json1_1CostFilters = (output, context) => {
1979
- return Object.entries(output).reduce((acc, [key, value]) => {
2365
+ var deserializeAws_json1_1CostFilters = function (output, context) {
2366
+ return Object.entries(output).reduce(function (acc, _a) {
2367
+ var _b;
2368
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
1980
2369
  if (value === null) {
1981
2370
  return acc;
1982
2371
  }
1983
- return {
1984
- ...acc,
1985
- [key]: deserializeAws_json1_1DimensionValues(value, context),
1986
- };
2372
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = deserializeAws_json1_1DimensionValues(value, context), _b));
1987
2373
  }, {});
1988
2374
  };
1989
- const deserializeAws_json1_1CostTypes = (output, context) => {
2375
+ var deserializeAws_json1_1CostTypes = function (output, context) {
1990
2376
  return {
1991
2377
  IncludeCredit: __expectBoolean(output.IncludeCredit),
1992
2378
  IncludeDiscount: __expectBoolean(output.IncludeDiscount),
@@ -2001,28 +2387,28 @@ const deserializeAws_json1_1CostTypes = (output, context) => {
2001
2387
  UseBlended: __expectBoolean(output.UseBlended),
2002
2388
  };
2003
2389
  };
2004
- const deserializeAws_json1_1CreateBudgetActionResponse = (output, context) => {
2390
+ var deserializeAws_json1_1CreateBudgetActionResponse = function (output, context) {
2005
2391
  return {
2006
2392
  AccountId: __expectString(output.AccountId),
2007
2393
  ActionId: __expectString(output.ActionId),
2008
2394
  BudgetName: __expectString(output.BudgetName),
2009
2395
  };
2010
2396
  };
2011
- const deserializeAws_json1_1CreateBudgetResponse = (output, context) => {
2397
+ var deserializeAws_json1_1CreateBudgetResponse = function (output, context) {
2012
2398
  return {};
2013
2399
  };
2014
- const deserializeAws_json1_1CreateNotificationResponse = (output, context) => {
2400
+ var deserializeAws_json1_1CreateNotificationResponse = function (output, context) {
2015
2401
  return {};
2016
2402
  };
2017
- const deserializeAws_json1_1CreateSubscriberResponse = (output, context) => {
2403
+ var deserializeAws_json1_1CreateSubscriberResponse = function (output, context) {
2018
2404
  return {};
2019
2405
  };
2020
- const deserializeAws_json1_1CreationLimitExceededException = (output, context) => {
2406
+ var deserializeAws_json1_1CreationLimitExceededException = function (output, context) {
2021
2407
  return {
2022
2408
  Message: __expectString(output.Message),
2023
2409
  };
2024
2410
  };
2025
- const deserializeAws_json1_1Definition = (output, context) => {
2411
+ var deserializeAws_json1_1Definition = function (output, context) {
2026
2412
  return {
2027
2413
  IamActionDefinition: output.IamActionDefinition != null
2028
2414
  ? deserializeAws_json1_1IamActionDefinition(output.IamActionDefinition, context)
@@ -2035,23 +2421,23 @@ const deserializeAws_json1_1Definition = (output, context) => {
2035
2421
  : undefined,
2036
2422
  };
2037
2423
  };
2038
- const deserializeAws_json1_1DeleteBudgetActionResponse = (output, context) => {
2424
+ var deserializeAws_json1_1DeleteBudgetActionResponse = function (output, context) {
2039
2425
  return {
2040
2426
  AccountId: __expectString(output.AccountId),
2041
2427
  Action: output.Action != null ? deserializeAws_json1_1Action(output.Action, context) : undefined,
2042
2428
  BudgetName: __expectString(output.BudgetName),
2043
2429
  };
2044
2430
  };
2045
- const deserializeAws_json1_1DeleteBudgetResponse = (output, context) => {
2431
+ var deserializeAws_json1_1DeleteBudgetResponse = function (output, context) {
2046
2432
  return {};
2047
2433
  };
2048
- const deserializeAws_json1_1DeleteNotificationResponse = (output, context) => {
2434
+ var deserializeAws_json1_1DeleteNotificationResponse = function (output, context) {
2049
2435
  return {};
2050
2436
  };
2051
- const deserializeAws_json1_1DeleteSubscriberResponse = (output, context) => {
2437
+ var deserializeAws_json1_1DeleteSubscriberResponse = function (output, context) {
2052
2438
  return {};
2053
2439
  };
2054
- const deserializeAws_json1_1DescribeBudgetActionHistoriesResponse = (output, context) => {
2440
+ var deserializeAws_json1_1DescribeBudgetActionHistoriesResponse = function (output, context) {
2055
2441
  return {
2056
2442
  ActionHistories: output.ActionHistories != null
2057
2443
  ? deserializeAws_json1_1ActionHistories(output.ActionHistories, context)
@@ -2059,26 +2445,26 @@ const deserializeAws_json1_1DescribeBudgetActionHistoriesResponse = (output, con
2059
2445
  NextToken: __expectString(output.NextToken),
2060
2446
  };
2061
2447
  };
2062
- const deserializeAws_json1_1DescribeBudgetActionResponse = (output, context) => {
2448
+ var deserializeAws_json1_1DescribeBudgetActionResponse = function (output, context) {
2063
2449
  return {
2064
2450
  AccountId: __expectString(output.AccountId),
2065
2451
  Action: output.Action != null ? deserializeAws_json1_1Action(output.Action, context) : undefined,
2066
2452
  BudgetName: __expectString(output.BudgetName),
2067
2453
  };
2068
2454
  };
2069
- const deserializeAws_json1_1DescribeBudgetActionsForAccountResponse = (output, context) => {
2455
+ var deserializeAws_json1_1DescribeBudgetActionsForAccountResponse = function (output, context) {
2070
2456
  return {
2071
2457
  Actions: output.Actions != null ? deserializeAws_json1_1Actions(output.Actions, context) : undefined,
2072
2458
  NextToken: __expectString(output.NextToken),
2073
2459
  };
2074
2460
  };
2075
- const deserializeAws_json1_1DescribeBudgetActionsForBudgetResponse = (output, context) => {
2461
+ var deserializeAws_json1_1DescribeBudgetActionsForBudgetResponse = function (output, context) {
2076
2462
  return {
2077
2463
  Actions: output.Actions != null ? deserializeAws_json1_1Actions(output.Actions, context) : undefined,
2078
2464
  NextToken: __expectString(output.NextToken),
2079
2465
  };
2080
2466
  };
2081
- const deserializeAws_json1_1DescribeBudgetNotificationsForAccountResponse = (output, context) => {
2467
+ var deserializeAws_json1_1DescribeBudgetNotificationsForAccountResponse = function (output, context) {
2082
2468
  return {
2083
2469
  BudgetNotificationsForAccount: output.BudgetNotificationsForAccount != null
2084
2470
  ? deserializeAws_json1_1BudgetNotificationsForAccountList(output.BudgetNotificationsForAccount, context)
@@ -2086,7 +2472,7 @@ const deserializeAws_json1_1DescribeBudgetNotificationsForAccountResponse = (out
2086
2472
  NextToken: __expectString(output.NextToken),
2087
2473
  };
2088
2474
  };
2089
- const deserializeAws_json1_1DescribeBudgetPerformanceHistoryResponse = (output, context) => {
2475
+ var deserializeAws_json1_1DescribeBudgetPerformanceHistoryResponse = function (output, context) {
2090
2476
  return {
2091
2477
  BudgetPerformanceHistory: output.BudgetPerformanceHistory != null
2092
2478
  ? deserializeAws_json1_1BudgetPerformanceHistory(output.BudgetPerformanceHistory, context)
@@ -2094,33 +2480,33 @@ const deserializeAws_json1_1DescribeBudgetPerformanceHistoryResponse = (output,
2094
2480
  NextToken: __expectString(output.NextToken),
2095
2481
  };
2096
2482
  };
2097
- const deserializeAws_json1_1DescribeBudgetResponse = (output, context) => {
2483
+ var deserializeAws_json1_1DescribeBudgetResponse = function (output, context) {
2098
2484
  return {
2099
2485
  Budget: output.Budget != null ? deserializeAws_json1_1Budget(output.Budget, context) : undefined,
2100
2486
  };
2101
2487
  };
2102
- const deserializeAws_json1_1DescribeBudgetsResponse = (output, context) => {
2488
+ var deserializeAws_json1_1DescribeBudgetsResponse = function (output, context) {
2103
2489
  return {
2104
2490
  Budgets: output.Budgets != null ? deserializeAws_json1_1Budgets(output.Budgets, context) : undefined,
2105
2491
  NextToken: __expectString(output.NextToken),
2106
2492
  };
2107
2493
  };
2108
- const deserializeAws_json1_1DescribeNotificationsForBudgetResponse = (output, context) => {
2494
+ var deserializeAws_json1_1DescribeNotificationsForBudgetResponse = function (output, context) {
2109
2495
  return {
2110
2496
  NextToken: __expectString(output.NextToken),
2111
2497
  Notifications: output.Notifications != null ? deserializeAws_json1_1Notifications(output.Notifications, context) : undefined,
2112
2498
  };
2113
2499
  };
2114
- const deserializeAws_json1_1DescribeSubscribersForNotificationResponse = (output, context) => {
2500
+ var deserializeAws_json1_1DescribeSubscribersForNotificationResponse = function (output, context) {
2115
2501
  return {
2116
2502
  NextToken: __expectString(output.NextToken),
2117
2503
  Subscribers: output.Subscribers != null ? deserializeAws_json1_1Subscribers(output.Subscribers, context) : undefined,
2118
2504
  };
2119
2505
  };
2120
- const deserializeAws_json1_1DimensionValues = (output, context) => {
2121
- const retVal = (output || [])
2122
- .filter((e) => e != null)
2123
- .map((entry) => {
2506
+ var deserializeAws_json1_1DimensionValues = function (output, context) {
2507
+ var retVal = (output || [])
2508
+ .filter(function (e) { return e != null; })
2509
+ .map(function (entry) {
2124
2510
  if (entry === null) {
2125
2511
  return null;
2126
2512
  }
@@ -2128,12 +2514,12 @@ const deserializeAws_json1_1DimensionValues = (output, context) => {
2128
2514
  });
2129
2515
  return retVal;
2130
2516
  };
2131
- const deserializeAws_json1_1DuplicateRecordException = (output, context) => {
2517
+ var deserializeAws_json1_1DuplicateRecordException = function (output, context) {
2132
2518
  return {
2133
2519
  Message: __expectString(output.Message),
2134
2520
  };
2135
2521
  };
2136
- const deserializeAws_json1_1ExecuteBudgetActionResponse = (output, context) => {
2522
+ var deserializeAws_json1_1ExecuteBudgetActionResponse = function (output, context) {
2137
2523
  return {
2138
2524
  AccountId: __expectString(output.AccountId),
2139
2525
  ActionId: __expectString(output.ActionId),
@@ -2141,15 +2527,15 @@ const deserializeAws_json1_1ExecuteBudgetActionResponse = (output, context) => {
2141
2527
  ExecutionType: __expectString(output.ExecutionType),
2142
2528
  };
2143
2529
  };
2144
- const deserializeAws_json1_1ExpiredNextTokenException = (output, context) => {
2530
+ var deserializeAws_json1_1ExpiredNextTokenException = function (output, context) {
2145
2531
  return {
2146
2532
  Message: __expectString(output.Message),
2147
2533
  };
2148
2534
  };
2149
- const deserializeAws_json1_1Groups = (output, context) => {
2150
- const retVal = (output || [])
2151
- .filter((e) => e != null)
2152
- .map((entry) => {
2535
+ var deserializeAws_json1_1Groups = function (output, context) {
2536
+ var retVal = (output || [])
2537
+ .filter(function (e) { return e != null; })
2538
+ .map(function (entry) {
2153
2539
  if (entry === null) {
2154
2540
  return null;
2155
2541
  }
@@ -2157,13 +2543,13 @@ const deserializeAws_json1_1Groups = (output, context) => {
2157
2543
  });
2158
2544
  return retVal;
2159
2545
  };
2160
- const deserializeAws_json1_1HistoricalOptions = (output, context) => {
2546
+ var deserializeAws_json1_1HistoricalOptions = function (output, context) {
2161
2547
  return {
2162
2548
  BudgetAdjustmentPeriod: __expectInt32(output.BudgetAdjustmentPeriod),
2163
2549
  LookBackAvailablePeriods: __expectInt32(output.LookBackAvailablePeriods),
2164
2550
  };
2165
2551
  };
2166
- const deserializeAws_json1_1IamActionDefinition = (output, context) => {
2552
+ var deserializeAws_json1_1IamActionDefinition = function (output, context) {
2167
2553
  return {
2168
2554
  Groups: output.Groups != null ? deserializeAws_json1_1Groups(output.Groups, context) : undefined,
2169
2555
  PolicyArn: __expectString(output.PolicyArn),
@@ -2171,10 +2557,10 @@ const deserializeAws_json1_1IamActionDefinition = (output, context) => {
2171
2557
  Users: output.Users != null ? deserializeAws_json1_1Users(output.Users, context) : undefined,
2172
2558
  };
2173
2559
  };
2174
- const deserializeAws_json1_1InstanceIds = (output, context) => {
2175
- const retVal = (output || [])
2176
- .filter((e) => e != null)
2177
- .map((entry) => {
2560
+ var deserializeAws_json1_1InstanceIds = function (output, context) {
2561
+ var retVal = (output || [])
2562
+ .filter(function (e) { return e != null; })
2563
+ .map(function (entry) {
2178
2564
  if (entry === null) {
2179
2565
  return null;
2180
2566
  }
@@ -2182,27 +2568,27 @@ const deserializeAws_json1_1InstanceIds = (output, context) => {
2182
2568
  });
2183
2569
  return retVal;
2184
2570
  };
2185
- const deserializeAws_json1_1InternalErrorException = (output, context) => {
2571
+ var deserializeAws_json1_1InternalErrorException = function (output, context) {
2186
2572
  return {
2187
2573
  Message: __expectString(output.Message),
2188
2574
  };
2189
2575
  };
2190
- const deserializeAws_json1_1InvalidNextTokenException = (output, context) => {
2576
+ var deserializeAws_json1_1InvalidNextTokenException = function (output, context) {
2191
2577
  return {
2192
2578
  Message: __expectString(output.Message),
2193
2579
  };
2194
2580
  };
2195
- const deserializeAws_json1_1InvalidParameterException = (output, context) => {
2581
+ var deserializeAws_json1_1InvalidParameterException = function (output, context) {
2196
2582
  return {
2197
2583
  Message: __expectString(output.Message),
2198
2584
  };
2199
2585
  };
2200
- const deserializeAws_json1_1NotFoundException = (output, context) => {
2586
+ var deserializeAws_json1_1NotFoundException = function (output, context) {
2201
2587
  return {
2202
2588
  Message: __expectString(output.Message),
2203
2589
  };
2204
2590
  };
2205
- const deserializeAws_json1_1Notification = (output, context) => {
2591
+ var deserializeAws_json1_1Notification = function (output, context) {
2206
2592
  return {
2207
2593
  ComparisonOperator: __expectString(output.ComparisonOperator),
2208
2594
  NotificationState: __expectString(output.NotificationState),
@@ -2211,10 +2597,10 @@ const deserializeAws_json1_1Notification = (output, context) => {
2211
2597
  ThresholdType: __expectString(output.ThresholdType),
2212
2598
  };
2213
2599
  };
2214
- const deserializeAws_json1_1Notifications = (output, context) => {
2215
- const retVal = (output || [])
2216
- .filter((e) => e != null)
2217
- .map((entry) => {
2600
+ var deserializeAws_json1_1Notifications = function (output, context) {
2601
+ var retVal = (output || [])
2602
+ .filter(function (e) { return e != null; })
2603
+ .map(function (entry) {
2218
2604
  if (entry === null) {
2219
2605
  return null;
2220
2606
  }
@@ -2222,26 +2608,25 @@ const deserializeAws_json1_1Notifications = (output, context) => {
2222
2608
  });
2223
2609
  return retVal;
2224
2610
  };
2225
- const deserializeAws_json1_1PlannedBudgetLimits = (output, context) => {
2226
- return Object.entries(output).reduce((acc, [key, value]) => {
2611
+ var deserializeAws_json1_1PlannedBudgetLimits = function (output, context) {
2612
+ return Object.entries(output).reduce(function (acc, _a) {
2613
+ var _b;
2614
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
2227
2615
  if (value === null) {
2228
2616
  return acc;
2229
2617
  }
2230
- return {
2231
- ...acc,
2232
- [key]: deserializeAws_json1_1Spend(value, context),
2233
- };
2618
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = deserializeAws_json1_1Spend(value, context), _b));
2234
2619
  }, {});
2235
2620
  };
2236
- const deserializeAws_json1_1ResourceLockedException = (output, context) => {
2621
+ var deserializeAws_json1_1ResourceLockedException = function (output, context) {
2237
2622
  return {
2238
2623
  Message: __expectString(output.Message),
2239
2624
  };
2240
2625
  };
2241
- const deserializeAws_json1_1Roles = (output, context) => {
2242
- const retVal = (output || [])
2243
- .filter((e) => e != null)
2244
- .map((entry) => {
2626
+ var deserializeAws_json1_1Roles = function (output, context) {
2627
+ var retVal = (output || [])
2628
+ .filter(function (e) { return e != null; })
2629
+ .map(function (entry) {
2245
2630
  if (entry === null) {
2246
2631
  return null;
2247
2632
  }
@@ -2249,35 +2634,35 @@ const deserializeAws_json1_1Roles = (output, context) => {
2249
2634
  });
2250
2635
  return retVal;
2251
2636
  };
2252
- const deserializeAws_json1_1ScpActionDefinition = (output, context) => {
2637
+ var deserializeAws_json1_1ScpActionDefinition = function (output, context) {
2253
2638
  return {
2254
2639
  PolicyId: __expectString(output.PolicyId),
2255
2640
  TargetIds: output.TargetIds != null ? deserializeAws_json1_1TargetIds(output.TargetIds, context) : undefined,
2256
2641
  };
2257
2642
  };
2258
- const deserializeAws_json1_1Spend = (output, context) => {
2643
+ var deserializeAws_json1_1Spend = function (output, context) {
2259
2644
  return {
2260
2645
  Amount: __expectString(output.Amount),
2261
2646
  Unit: __expectString(output.Unit),
2262
2647
  };
2263
2648
  };
2264
- const deserializeAws_json1_1SsmActionDefinition = (output, context) => {
2649
+ var deserializeAws_json1_1SsmActionDefinition = function (output, context) {
2265
2650
  return {
2266
2651
  ActionSubType: __expectString(output.ActionSubType),
2267
2652
  InstanceIds: output.InstanceIds != null ? deserializeAws_json1_1InstanceIds(output.InstanceIds, context) : undefined,
2268
2653
  Region: __expectString(output.Region),
2269
2654
  };
2270
2655
  };
2271
- const deserializeAws_json1_1Subscriber = (output, context) => {
2656
+ var deserializeAws_json1_1Subscriber = function (output, context) {
2272
2657
  return {
2273
2658
  Address: __expectString(output.Address),
2274
2659
  SubscriptionType: __expectString(output.SubscriptionType),
2275
2660
  };
2276
2661
  };
2277
- const deserializeAws_json1_1Subscribers = (output, context) => {
2278
- const retVal = (output || [])
2279
- .filter((e) => e != null)
2280
- .map((entry) => {
2662
+ var deserializeAws_json1_1Subscribers = function (output, context) {
2663
+ var retVal = (output || [])
2664
+ .filter(function (e) { return e != null; })
2665
+ .map(function (entry) {
2281
2666
  if (entry === null) {
2282
2667
  return null;
2283
2668
  }
@@ -2285,10 +2670,10 @@ const deserializeAws_json1_1Subscribers = (output, context) => {
2285
2670
  });
2286
2671
  return retVal;
2287
2672
  };
2288
- const deserializeAws_json1_1TargetIds = (output, context) => {
2289
- const retVal = (output || [])
2290
- .filter((e) => e != null)
2291
- .map((entry) => {
2673
+ var deserializeAws_json1_1TargetIds = function (output, context) {
2674
+ var retVal = (output || [])
2675
+ .filter(function (e) { return e != null; })
2676
+ .map(function (entry) {
2292
2677
  if (entry === null) {
2293
2678
  return null;
2294
2679
  }
@@ -2296,18 +2681,18 @@ const deserializeAws_json1_1TargetIds = (output, context) => {
2296
2681
  });
2297
2682
  return retVal;
2298
2683
  };
2299
- const deserializeAws_json1_1ThrottlingException = (output, context) => {
2684
+ var deserializeAws_json1_1ThrottlingException = function (output, context) {
2300
2685
  return {
2301
2686
  Message: __expectString(output.Message),
2302
2687
  };
2303
2688
  };
2304
- const deserializeAws_json1_1TimePeriod = (output, context) => {
2689
+ var deserializeAws_json1_1TimePeriod = function (output, context) {
2305
2690
  return {
2306
2691
  End: output.End != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.End))) : undefined,
2307
2692
  Start: output.Start != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Start))) : undefined,
2308
2693
  };
2309
2694
  };
2310
- const deserializeAws_json1_1UpdateBudgetActionResponse = (output, context) => {
2695
+ var deserializeAws_json1_1UpdateBudgetActionResponse = function (output, context) {
2311
2696
  return {
2312
2697
  AccountId: __expectString(output.AccountId),
2313
2698
  BudgetName: __expectString(output.BudgetName),
@@ -2315,19 +2700,19 @@ const deserializeAws_json1_1UpdateBudgetActionResponse = (output, context) => {
2315
2700
  OldAction: output.OldAction != null ? deserializeAws_json1_1Action(output.OldAction, context) : undefined,
2316
2701
  };
2317
2702
  };
2318
- const deserializeAws_json1_1UpdateBudgetResponse = (output, context) => {
2703
+ var deserializeAws_json1_1UpdateBudgetResponse = function (output, context) {
2319
2704
  return {};
2320
2705
  };
2321
- const deserializeAws_json1_1UpdateNotificationResponse = (output, context) => {
2706
+ var deserializeAws_json1_1UpdateNotificationResponse = function (output, context) {
2322
2707
  return {};
2323
2708
  };
2324
- const deserializeAws_json1_1UpdateSubscriberResponse = (output, context) => {
2709
+ var deserializeAws_json1_1UpdateSubscriberResponse = function (output, context) {
2325
2710
  return {};
2326
2711
  };
2327
- const deserializeAws_json1_1Users = (output, context) => {
2328
- const retVal = (output || [])
2329
- .filter((e) => e != null)
2330
- .map((entry) => {
2712
+ var deserializeAws_json1_1Users = function (output, context) {
2713
+ var retVal = (output || [])
2714
+ .filter(function (e) { return e != null; })
2715
+ .map(function (entry) {
2331
2716
  if (entry === null) {
2332
2717
  return null;
2333
2718
  }
@@ -2335,52 +2720,75 @@ const deserializeAws_json1_1Users = (output, context) => {
2335
2720
  });
2336
2721
  return retVal;
2337
2722
  };
2338
- const deserializeMetadata = (output) => ({
2339
- httpStatusCode: output.statusCode,
2340
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
2341
- extendedRequestId: output.headers["x-amz-id-2"],
2342
- cfId: output.headers["x-amz-cf-id"],
2343
- });
2344
- const collectBody = (streamBody = new Uint8Array(), context) => {
2723
+ var deserializeMetadata = function (output) {
2724
+ var _a, _b;
2725
+ return ({
2726
+ httpStatusCode: output.statusCode,
2727
+ 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"],
2728
+ extendedRequestId: output.headers["x-amz-id-2"],
2729
+ cfId: output.headers["x-amz-cf-id"],
2730
+ });
2731
+ };
2732
+ var collectBody = function (streamBody, context) {
2733
+ if (streamBody === void 0) { streamBody = new Uint8Array(); }
2345
2734
  if (streamBody instanceof Uint8Array) {
2346
2735
  return Promise.resolve(streamBody);
2347
2736
  }
2348
2737
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2349
2738
  };
2350
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
2351
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2352
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2353
- const contents = {
2354
- protocol,
2355
- hostname,
2356
- port,
2357
- method: "POST",
2358
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2359
- headers,
2360
- };
2361
- if (resolvedHostname !== undefined) {
2362
- contents.hostname = resolvedHostname;
2363
- }
2364
- if (body !== undefined) {
2365
- contents.body = body;
2366
- }
2367
- return new __HttpRequest(contents);
2739
+ var collectBodyString = function (streamBody, context) {
2740
+ return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
2741
+ };
2742
+ var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, body) { return __awaiter(void 0, void 0, void 0, function () {
2743
+ var _a, hostname, _b, protocol, port, basePath, contents;
2744
+ return __generator(this, function (_c) {
2745
+ switch (_c.label) {
2746
+ case 0: return [4, context.endpoint()];
2747
+ case 1:
2748
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
2749
+ contents = {
2750
+ protocol: protocol,
2751
+ hostname: hostname,
2752
+ port: port,
2753
+ method: "POST",
2754
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2755
+ headers: headers,
2756
+ };
2757
+ if (resolvedHostname !== undefined) {
2758
+ contents.hostname = resolvedHostname;
2759
+ }
2760
+ if (body !== undefined) {
2761
+ contents.body = body;
2762
+ }
2763
+ return [2, new __HttpRequest(contents)];
2764
+ }
2765
+ });
2766
+ }); };
2767
+ var parseBody = function (streamBody, context) {
2768
+ return collectBodyString(streamBody, context).then(function (encoded) {
2769
+ if (encoded.length) {
2770
+ return JSON.parse(encoded);
2771
+ }
2772
+ return {};
2773
+ });
2368
2774
  };
2369
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2370
- if (encoded.length) {
2371
- return JSON.parse(encoded);
2372
- }
2373
- return {};
2374
- });
2375
- const parseErrorBody = async (errorBody, context) => {
2376
- const value = await parseBody(errorBody, context);
2377
- value.message = value.message ?? value.Message;
2378
- return value;
2379
- };
2380
- const loadRestJsonErrorCode = (output, data) => {
2381
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2382
- const sanitizeErrorCode = (rawValue) => {
2383
- let cleanValue = rawValue;
2775
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
2776
+ var value;
2777
+ var _a;
2778
+ return __generator(this, function (_b) {
2779
+ switch (_b.label) {
2780
+ case 0: return [4, parseBody(errorBody, context)];
2781
+ case 1:
2782
+ value = _b.sent();
2783
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
2784
+ return [2, value];
2785
+ }
2786
+ });
2787
+ }); };
2788
+ var loadRestJsonErrorCode = function (output, data) {
2789
+ var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
2790
+ var sanitizeErrorCode = function (rawValue) {
2791
+ var cleanValue = rawValue;
2384
2792
  if (typeof cleanValue === "number") {
2385
2793
  cleanValue = cleanValue.toString();
2386
2794
  }
@@ -2395,7 +2803,7 @@ const loadRestJsonErrorCode = (output, data) => {
2395
2803
  }
2396
2804
  return cleanValue;
2397
2805
  };
2398
- const headerKey = findKey(output.headers, "x-amzn-errortype");
2806
+ var headerKey = findKey(output.headers, "x-amzn-errortype");
2399
2807
  if (headerKey !== undefined) {
2400
2808
  return sanitizeErrorCode(output.headers[headerKey]);
2401
2809
  }