@aws-sdk/client-budgets 3.186.0 → 3.190.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 (43) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist-es/Budgets.js +94 -101
  3. package/dist-es/BudgetsClient.js +22 -28
  4. package/dist-es/commands/CreateBudgetActionCommand.js +21 -28
  5. package/dist-es/commands/CreateBudgetCommand.js +21 -28
  6. package/dist-es/commands/CreateNotificationCommand.js +21 -28
  7. package/dist-es/commands/CreateSubscriberCommand.js +21 -28
  8. package/dist-es/commands/DeleteBudgetActionCommand.js +21 -28
  9. package/dist-es/commands/DeleteBudgetCommand.js +21 -28
  10. package/dist-es/commands/DeleteNotificationCommand.js +21 -28
  11. package/dist-es/commands/DeleteSubscriberCommand.js +21 -28
  12. package/dist-es/commands/DescribeBudgetActionCommand.js +21 -28
  13. package/dist-es/commands/DescribeBudgetActionHistoriesCommand.js +21 -28
  14. package/dist-es/commands/DescribeBudgetActionsForAccountCommand.js +21 -28
  15. package/dist-es/commands/DescribeBudgetActionsForBudgetCommand.js +21 -28
  16. package/dist-es/commands/DescribeBudgetCommand.js +21 -28
  17. package/dist-es/commands/DescribeBudgetNotificationsForAccountCommand.js +21 -28
  18. package/dist-es/commands/DescribeBudgetPerformanceHistoryCommand.js +21 -28
  19. package/dist-es/commands/DescribeBudgetsCommand.js +21 -28
  20. package/dist-es/commands/DescribeNotificationsForBudgetCommand.js +21 -28
  21. package/dist-es/commands/DescribeSubscribersForNotificationCommand.js +21 -28
  22. package/dist-es/commands/ExecuteBudgetActionCommand.js +21 -28
  23. package/dist-es/commands/UpdateBudgetActionCommand.js +21 -28
  24. package/dist-es/commands/UpdateBudgetCommand.js +21 -28
  25. package/dist-es/commands/UpdateNotificationCommand.js +21 -28
  26. package/dist-es/commands/UpdateSubscriberCommand.js +21 -28
  27. package/dist-es/endpoints.js +8 -8
  28. package/dist-es/models/BudgetsServiceException.js +5 -10
  29. package/dist-es/models/models_0.js +340 -190
  30. package/dist-es/pagination/DescribeBudgetActionHistoriesPaginator.js +25 -68
  31. package/dist-es/pagination/DescribeBudgetActionsForAccountPaginator.js +25 -68
  32. package/dist-es/pagination/DescribeBudgetActionsForBudgetPaginator.js +25 -68
  33. package/dist-es/pagination/DescribeBudgetNotificationsForAccountPaginator.js +25 -68
  34. package/dist-es/pagination/DescribeBudgetPerformanceHistoryPaginator.js +25 -68
  35. package/dist-es/pagination/DescribeBudgetsPaginator.js +25 -68
  36. package/dist-es/pagination/DescribeNotificationsForBudgetPaginator.js +25 -68
  37. package/dist-es/pagination/DescribeSubscribersForNotificationPaginator.js +25 -68
  38. package/dist-es/protocols/Aws_json1_1.js +1894 -2302
  39. package/dist-es/runtimeConfig.browser.js +26 -12
  40. package/dist-es/runtimeConfig.js +30 -12
  41. package/dist-es/runtimeConfig.native.js +8 -5
  42. package/dist-es/runtimeConfig.shared.js +8 -11
  43. package/package.json +33 -33
@@ -1,2212 +1,1825 @@
1
- import { __assign, __awaiter, __generator, __read } from "tslib";
2
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
2
  import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, throwDefaultError, } from "@aws-sdk/smithy-client";
4
3
  import { BudgetsServiceException as __BaseException } from "../models/BudgetsServiceException";
5
4
  import { AccessDeniedException, CreationLimitExceededException, DuplicateRecordException, ExpiredNextTokenException, InternalErrorException, InvalidNextTokenException, InvalidParameterException, NotFoundException, ResourceLockedException, ThrottlingException, } from "../models/models_0";
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];
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]) => {
2014
1457
  if (value === null) {
2015
1458
  return acc;
2016
1459
  }
2017
- return __assign(__assign({}, acc), (_b = {}, _b[key] = serializeAws_json1_1DimensionValues(value, context), _b));
1460
+ return {
1461
+ ...acc,
1462
+ [key]: serializeAws_json1_1DimensionValues(value, context),
1463
+ };
2018
1464
  }, {});
2019
1465
  };
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 }));
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
+ };
2022
1480
  };
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) }));
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
+ };
2027
1495
  };
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
- }));
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
+ };
2032
1504
  };
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) }));
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
+ };
2035
1512
  };
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) }));
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
+ };
2038
1520
  };
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
- }));
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
+ };
2047
1533
  };
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 }));
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
+ };
2050
1540
  };
2051
- var serializeAws_json1_1DeleteBudgetRequest = function (input, context) {
2052
- return __assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.BudgetName != null && { BudgetName: input.BudgetName }));
1541
+ const serializeAws_json1_1DeleteBudgetRequest = (input, context) => {
1542
+ return {
1543
+ ...(input.AccountId != null && { AccountId: input.AccountId }),
1544
+ ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1545
+ };
2053
1546
  };
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) }));
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
+ };
2056
1553
  };
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) }));
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
+ };
2059
1561
  };
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) }));
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
+ };
2062
1571
  };
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 }));
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
+ };
2065
1578
  };
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 }));
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
+ };
2068
1585
  };
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 }));
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
+ };
2071
1593
  };
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 }));
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
+ };
2074
1600
  };
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) }));
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
+ };
2077
1609
  };
2078
- var serializeAws_json1_1DescribeBudgetRequest = function (input, context) {
2079
- return __assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.BudgetName != null && { BudgetName: input.BudgetName }));
1610
+ const serializeAws_json1_1DescribeBudgetRequest = (input, context) => {
1611
+ return {
1612
+ ...(input.AccountId != null && { AccountId: input.AccountId }),
1613
+ ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1614
+ };
2080
1615
  };
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 }));
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
+ };
2083
1622
  };
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 }));
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
+ };
2086
1630
  };
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) }));
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
+ };
2089
1639
  };
2090
- var serializeAws_json1_1DimensionValues = function (input, context) {
1640
+ const serializeAws_json1_1DimensionValues = (input, context) => {
2091
1641
  return input
2092
- .filter(function (e) { return e != null; })
2093
- .map(function (entry) {
1642
+ .filter((e) => e != null)
1643
+ .map((entry) => {
2094
1644
  return entry;
2095
1645
  });
2096
1646
  };
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 }));
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
+ };
2099
1654
  };
2100
- var serializeAws_json1_1Groups = function (input, context) {
1655
+ const serializeAws_json1_1Groups = (input, context) => {
2101
1656
  return input
2102
- .filter(function (e) { return e != null; })
2103
- .map(function (entry) {
1657
+ .filter((e) => e != null)
1658
+ .map((entry) => {
2104
1659
  return entry;
2105
1660
  });
2106
1661
  };
2107
- var serializeAws_json1_1HistoricalOptions = function (input, context) {
2108
- return __assign(__assign({}, (input.BudgetAdjustmentPeriod != null && { BudgetAdjustmentPeriod: input.BudgetAdjustmentPeriod })), (input.LookBackAvailablePeriods != null && { LookBackAvailablePeriods: input.LookBackAvailablePeriods }));
1662
+ const serializeAws_json1_1HistoricalOptions = (input, context) => {
1663
+ return {
1664
+ ...(input.BudgetAdjustmentPeriod != null && { BudgetAdjustmentPeriod: input.BudgetAdjustmentPeriod }),
1665
+ ...(input.LookBackAvailablePeriods != null && { LookBackAvailablePeriods: input.LookBackAvailablePeriods }),
1666
+ };
2109
1667
  };
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) }));
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
+ };
2112
1675
  };
2113
- var serializeAws_json1_1InstanceIds = function (input, context) {
1676
+ const serializeAws_json1_1InstanceIds = (input, context) => {
2114
1677
  return input
2115
- .filter(function (e) { return e != null; })
2116
- .map(function (entry) {
1678
+ .filter((e) => e != null)
1679
+ .map((entry) => {
2117
1680
  return entry;
2118
1681
  });
2119
1682
  };
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 }));
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
+ };
2122
1691
  };
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) }));
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
+ };
2125
1697
  };
2126
- var serializeAws_json1_1NotificationWithSubscribersList = function (input, context) {
1698
+ const serializeAws_json1_1NotificationWithSubscribersList = (input, context) => {
2127
1699
  return input
2128
- .filter(function (e) { return e != null; })
2129
- .map(function (entry) {
1700
+ .filter((e) => e != null)
1701
+ .map((entry) => {
2130
1702
  return serializeAws_json1_1NotificationWithSubscribers(entry, context);
2131
1703
  });
2132
1704
  };
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];
1705
+ const serializeAws_json1_1PlannedBudgetLimits = (input, context) => {
1706
+ return Object.entries(input).reduce((acc, [key, value]) => {
2137
1707
  if (value === null) {
2138
1708
  return acc;
2139
1709
  }
2140
- return __assign(__assign({}, acc), (_b = {}, _b[key] = serializeAws_json1_1Spend(value, context), _b));
1710
+ return {
1711
+ ...acc,
1712
+ [key]: serializeAws_json1_1Spend(value, context),
1713
+ };
2141
1714
  }, {});
2142
1715
  };
2143
- var serializeAws_json1_1Roles = function (input, context) {
1716
+ const serializeAws_json1_1Roles = (input, context) => {
2144
1717
  return input
2145
- .filter(function (e) { return e != null; })
2146
- .map(function (entry) {
1718
+ .filter((e) => e != null)
1719
+ .map((entry) => {
2147
1720
  return entry;
2148
1721
  });
2149
1722
  };
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) }));
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
+ };
2152
1728
  };
2153
- var serializeAws_json1_1Spend = function (input, context) {
2154
- return __assign(__assign({}, (input.Amount != null && { Amount: input.Amount })), (input.Unit != null && { Unit: input.Unit }));
1729
+ const serializeAws_json1_1Spend = (input, context) => {
1730
+ return {
1731
+ ...(input.Amount != null && { Amount: input.Amount }),
1732
+ ...(input.Unit != null && { Unit: input.Unit }),
1733
+ };
2155
1734
  };
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 }));
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
+ };
2158
1741
  };
2159
- var serializeAws_json1_1Subscriber = function (input, context) {
2160
- return __assign(__assign({}, (input.Address != null && { Address: input.Address })), (input.SubscriptionType != null && { SubscriptionType: input.SubscriptionType }));
1742
+ const serializeAws_json1_1Subscriber = (input, context) => {
1743
+ return {
1744
+ ...(input.Address != null && { Address: input.Address }),
1745
+ ...(input.SubscriptionType != null && { SubscriptionType: input.SubscriptionType }),
1746
+ };
2161
1747
  };
2162
- var serializeAws_json1_1Subscribers = function (input, context) {
1748
+ const serializeAws_json1_1Subscribers = (input, context) => {
2163
1749
  return input
2164
- .filter(function (e) { return e != null; })
2165
- .map(function (entry) {
1750
+ .filter((e) => e != null)
1751
+ .map((entry) => {
2166
1752
  return serializeAws_json1_1Subscriber(entry, context);
2167
1753
  });
2168
1754
  };
2169
- var serializeAws_json1_1TargetIds = function (input, context) {
1755
+ const serializeAws_json1_1TargetIds = (input, context) => {
2170
1756
  return input
2171
- .filter(function (e) { return e != null; })
2172
- .map(function (entry) {
1757
+ .filter((e) => e != null)
1758
+ .map((entry) => {
2173
1759
  return entry;
2174
1760
  });
2175
1761
  };
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) }));
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
+ };
2178
1767
  };
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) }));
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
+ };
2183
1782
  };
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) }));
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
+ };
2186
1788
  };
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
- }));
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
+ };
2193
1800
  };
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) }));
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
+ };
2196
1809
  };
2197
- var serializeAws_json1_1Users = function (input, context) {
1810
+ const serializeAws_json1_1Users = (input, context) => {
2198
1811
  return input
2199
- .filter(function (e) { return e != null; })
2200
- .map(function (entry) {
1812
+ .filter((e) => e != null)
1813
+ .map((entry) => {
2201
1814
  return entry;
2202
1815
  });
2203
1816
  };
2204
- var deserializeAws_json1_1AccessDeniedException = function (output, context) {
1817
+ const deserializeAws_json1_1AccessDeniedException = (output, context) => {
2205
1818
  return {
2206
1819
  Message: __expectString(output.Message),
2207
1820
  };
2208
1821
  };
2209
- var deserializeAws_json1_1Action = function (output, context) {
1822
+ const deserializeAws_json1_1Action = (output, context) => {
2210
1823
  return {
2211
1824
  ActionId: __expectString(output.ActionId),
2212
1825
  ActionThreshold: output.ActionThreshold != null
@@ -2222,10 +1835,10 @@ var deserializeAws_json1_1Action = function (output, context) {
2222
1835
  Subscribers: output.Subscribers != null ? deserializeAws_json1_1Subscribers(output.Subscribers, context) : undefined,
2223
1836
  };
2224
1837
  };
2225
- var deserializeAws_json1_1ActionHistories = function (output, context) {
2226
- var retVal = (output || [])
2227
- .filter(function (e) { return e != null; })
2228
- .map(function (entry) {
1838
+ const deserializeAws_json1_1ActionHistories = (output, context) => {
1839
+ const retVal = (output || [])
1840
+ .filter((e) => e != null)
1841
+ .map((entry) => {
2229
1842
  if (entry === null) {
2230
1843
  return null;
2231
1844
  }
@@ -2233,7 +1846,7 @@ var deserializeAws_json1_1ActionHistories = function (output, context) {
2233
1846
  });
2234
1847
  return retVal;
2235
1848
  };
2236
- var deserializeAws_json1_1ActionHistory = function (output, context) {
1849
+ const deserializeAws_json1_1ActionHistory = (output, context) => {
2237
1850
  return {
2238
1851
  ActionHistoryDetails: output.ActionHistoryDetails != null
2239
1852
  ? deserializeAws_json1_1ActionHistoryDetails(output.ActionHistoryDetails, context)
@@ -2243,16 +1856,16 @@ var deserializeAws_json1_1ActionHistory = function (output, context) {
2243
1856
  Timestamp: output.Timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) : undefined,
2244
1857
  };
2245
1858
  };
2246
- var deserializeAws_json1_1ActionHistoryDetails = function (output, context) {
1859
+ const deserializeAws_json1_1ActionHistoryDetails = (output, context) => {
2247
1860
  return {
2248
1861
  Action: output.Action != null ? deserializeAws_json1_1Action(output.Action, context) : undefined,
2249
1862
  Message: __expectString(output.Message),
2250
1863
  };
2251
1864
  };
2252
- var deserializeAws_json1_1Actions = function (output, context) {
2253
- var retVal = (output || [])
2254
- .filter(function (e) { return e != null; })
2255
- .map(function (entry) {
1865
+ const deserializeAws_json1_1Actions = (output, context) => {
1866
+ const retVal = (output || [])
1867
+ .filter((e) => e != null)
1868
+ .map((entry) => {
2256
1869
  if (entry === null) {
2257
1870
  return null;
2258
1871
  }
@@ -2260,13 +1873,13 @@ var deserializeAws_json1_1Actions = function (output, context) {
2260
1873
  });
2261
1874
  return retVal;
2262
1875
  };
2263
- var deserializeAws_json1_1ActionThreshold = function (output, context) {
1876
+ const deserializeAws_json1_1ActionThreshold = (output, context) => {
2264
1877
  return {
2265
1878
  ActionThresholdType: __expectString(output.ActionThresholdType),
2266
1879
  ActionThresholdValue: __limitedParseDouble(output.ActionThresholdValue),
2267
1880
  };
2268
1881
  };
2269
- var deserializeAws_json1_1AutoAdjustData = function (output, context) {
1882
+ const deserializeAws_json1_1AutoAdjustData = (output, context) => {
2270
1883
  return {
2271
1884
  AutoAdjustType: __expectString(output.AutoAdjustType),
2272
1885
  HistoricalOptions: output.HistoricalOptions != null
@@ -2277,7 +1890,7 @@ var deserializeAws_json1_1AutoAdjustData = function (output, context) {
2277
1890
  : undefined,
2278
1891
  };
2279
1892
  };
2280
- var deserializeAws_json1_1Budget = function (output, context) {
1893
+ const deserializeAws_json1_1Budget = (output, context) => {
2281
1894
  return {
2282
1895
  AutoAdjustData: output.AutoAdjustData != null ? deserializeAws_json1_1AutoAdjustData(output.AutoAdjustData, context) : undefined,
2283
1896
  BudgetLimit: output.BudgetLimit != null ? deserializeAws_json1_1Spend(output.BudgetLimit, context) : undefined,
@@ -2298,17 +1911,17 @@ var deserializeAws_json1_1Budget = function (output, context) {
2298
1911
  TimeUnit: __expectString(output.TimeUnit),
2299
1912
  };
2300
1913
  };
2301
- var deserializeAws_json1_1BudgetedAndActualAmounts = function (output, context) {
1914
+ const deserializeAws_json1_1BudgetedAndActualAmounts = (output, context) => {
2302
1915
  return {
2303
1916
  ActualAmount: output.ActualAmount != null ? deserializeAws_json1_1Spend(output.ActualAmount, context) : undefined,
2304
1917
  BudgetedAmount: output.BudgetedAmount != null ? deserializeAws_json1_1Spend(output.BudgetedAmount, context) : undefined,
2305
1918
  TimePeriod: output.TimePeriod != null ? deserializeAws_json1_1TimePeriod(output.TimePeriod, context) : undefined,
2306
1919
  };
2307
1920
  };
2308
- var deserializeAws_json1_1BudgetedAndActualAmountsList = function (output, context) {
2309
- var retVal = (output || [])
2310
- .filter(function (e) { return e != null; })
2311
- .map(function (entry) {
1921
+ const deserializeAws_json1_1BudgetedAndActualAmountsList = (output, context) => {
1922
+ const retVal = (output || [])
1923
+ .filter((e) => e != null)
1924
+ .map((entry) => {
2312
1925
  if (entry === null) {
2313
1926
  return null;
2314
1927
  }
@@ -2316,16 +1929,16 @@ var deserializeAws_json1_1BudgetedAndActualAmountsList = function (output, conte
2316
1929
  });
2317
1930
  return retVal;
2318
1931
  };
2319
- var deserializeAws_json1_1BudgetNotificationsForAccount = function (output, context) {
1932
+ const deserializeAws_json1_1BudgetNotificationsForAccount = (output, context) => {
2320
1933
  return {
2321
1934
  BudgetName: __expectString(output.BudgetName),
2322
1935
  Notifications: output.Notifications != null ? deserializeAws_json1_1Notifications(output.Notifications, context) : undefined,
2323
1936
  };
2324
1937
  };
2325
- var deserializeAws_json1_1BudgetNotificationsForAccountList = function (output, context) {
2326
- var retVal = (output || [])
2327
- .filter(function (e) { return e != null; })
2328
- .map(function (entry) {
1938
+ const deserializeAws_json1_1BudgetNotificationsForAccountList = (output, context) => {
1939
+ const retVal = (output || [])
1940
+ .filter((e) => e != null)
1941
+ .map((entry) => {
2329
1942
  if (entry === null) {
2330
1943
  return null;
2331
1944
  }
@@ -2333,7 +1946,7 @@ var deserializeAws_json1_1BudgetNotificationsForAccountList = function (output,
2333
1946
  });
2334
1947
  return retVal;
2335
1948
  };
2336
- var deserializeAws_json1_1BudgetPerformanceHistory = function (output, context) {
1949
+ const deserializeAws_json1_1BudgetPerformanceHistory = (output, context) => {
2337
1950
  return {
2338
1951
  BudgetName: __expectString(output.BudgetName),
2339
1952
  BudgetType: __expectString(output.BudgetType),
@@ -2345,10 +1958,10 @@ var deserializeAws_json1_1BudgetPerformanceHistory = function (output, context)
2345
1958
  TimeUnit: __expectString(output.TimeUnit),
2346
1959
  };
2347
1960
  };
2348
- var deserializeAws_json1_1Budgets = function (output, context) {
2349
- var retVal = (output || [])
2350
- .filter(function (e) { return e != null; })
2351
- .map(function (entry) {
1961
+ const deserializeAws_json1_1Budgets = (output, context) => {
1962
+ const retVal = (output || [])
1963
+ .filter((e) => e != null)
1964
+ .map((entry) => {
2352
1965
  if (entry === null) {
2353
1966
  return null;
2354
1967
  }
@@ -2356,23 +1969,24 @@ var deserializeAws_json1_1Budgets = function (output, context) {
2356
1969
  });
2357
1970
  return retVal;
2358
1971
  };
2359
- var deserializeAws_json1_1CalculatedSpend = function (output, context) {
1972
+ const deserializeAws_json1_1CalculatedSpend = (output, context) => {
2360
1973
  return {
2361
1974
  ActualSpend: output.ActualSpend != null ? deserializeAws_json1_1Spend(output.ActualSpend, context) : undefined,
2362
1975
  ForecastedSpend: output.ForecastedSpend != null ? deserializeAws_json1_1Spend(output.ForecastedSpend, context) : undefined,
2363
1976
  };
2364
1977
  };
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];
1978
+ const deserializeAws_json1_1CostFilters = (output, context) => {
1979
+ return Object.entries(output).reduce((acc, [key, value]) => {
2369
1980
  if (value === null) {
2370
1981
  return acc;
2371
1982
  }
2372
- return __assign(__assign({}, acc), (_b = {}, _b[key] = deserializeAws_json1_1DimensionValues(value, context), _b));
1983
+ return {
1984
+ ...acc,
1985
+ [key]: deserializeAws_json1_1DimensionValues(value, context),
1986
+ };
2373
1987
  }, {});
2374
1988
  };
2375
- var deserializeAws_json1_1CostTypes = function (output, context) {
1989
+ const deserializeAws_json1_1CostTypes = (output, context) => {
2376
1990
  return {
2377
1991
  IncludeCredit: __expectBoolean(output.IncludeCredit),
2378
1992
  IncludeDiscount: __expectBoolean(output.IncludeDiscount),
@@ -2387,28 +2001,28 @@ var deserializeAws_json1_1CostTypes = function (output, context) {
2387
2001
  UseBlended: __expectBoolean(output.UseBlended),
2388
2002
  };
2389
2003
  };
2390
- var deserializeAws_json1_1CreateBudgetActionResponse = function (output, context) {
2004
+ const deserializeAws_json1_1CreateBudgetActionResponse = (output, context) => {
2391
2005
  return {
2392
2006
  AccountId: __expectString(output.AccountId),
2393
2007
  ActionId: __expectString(output.ActionId),
2394
2008
  BudgetName: __expectString(output.BudgetName),
2395
2009
  };
2396
2010
  };
2397
- var deserializeAws_json1_1CreateBudgetResponse = function (output, context) {
2011
+ const deserializeAws_json1_1CreateBudgetResponse = (output, context) => {
2398
2012
  return {};
2399
2013
  };
2400
- var deserializeAws_json1_1CreateNotificationResponse = function (output, context) {
2014
+ const deserializeAws_json1_1CreateNotificationResponse = (output, context) => {
2401
2015
  return {};
2402
2016
  };
2403
- var deserializeAws_json1_1CreateSubscriberResponse = function (output, context) {
2017
+ const deserializeAws_json1_1CreateSubscriberResponse = (output, context) => {
2404
2018
  return {};
2405
2019
  };
2406
- var deserializeAws_json1_1CreationLimitExceededException = function (output, context) {
2020
+ const deserializeAws_json1_1CreationLimitExceededException = (output, context) => {
2407
2021
  return {
2408
2022
  Message: __expectString(output.Message),
2409
2023
  };
2410
2024
  };
2411
- var deserializeAws_json1_1Definition = function (output, context) {
2025
+ const deserializeAws_json1_1Definition = (output, context) => {
2412
2026
  return {
2413
2027
  IamActionDefinition: output.IamActionDefinition != null
2414
2028
  ? deserializeAws_json1_1IamActionDefinition(output.IamActionDefinition, context)
@@ -2421,23 +2035,23 @@ var deserializeAws_json1_1Definition = function (output, context) {
2421
2035
  : undefined,
2422
2036
  };
2423
2037
  };
2424
- var deserializeAws_json1_1DeleteBudgetActionResponse = function (output, context) {
2038
+ const deserializeAws_json1_1DeleteBudgetActionResponse = (output, context) => {
2425
2039
  return {
2426
2040
  AccountId: __expectString(output.AccountId),
2427
2041
  Action: output.Action != null ? deserializeAws_json1_1Action(output.Action, context) : undefined,
2428
2042
  BudgetName: __expectString(output.BudgetName),
2429
2043
  };
2430
2044
  };
2431
- var deserializeAws_json1_1DeleteBudgetResponse = function (output, context) {
2045
+ const deserializeAws_json1_1DeleteBudgetResponse = (output, context) => {
2432
2046
  return {};
2433
2047
  };
2434
- var deserializeAws_json1_1DeleteNotificationResponse = function (output, context) {
2048
+ const deserializeAws_json1_1DeleteNotificationResponse = (output, context) => {
2435
2049
  return {};
2436
2050
  };
2437
- var deserializeAws_json1_1DeleteSubscriberResponse = function (output, context) {
2051
+ const deserializeAws_json1_1DeleteSubscriberResponse = (output, context) => {
2438
2052
  return {};
2439
2053
  };
2440
- var deserializeAws_json1_1DescribeBudgetActionHistoriesResponse = function (output, context) {
2054
+ const deserializeAws_json1_1DescribeBudgetActionHistoriesResponse = (output, context) => {
2441
2055
  return {
2442
2056
  ActionHistories: output.ActionHistories != null
2443
2057
  ? deserializeAws_json1_1ActionHistories(output.ActionHistories, context)
@@ -2445,26 +2059,26 @@ var deserializeAws_json1_1DescribeBudgetActionHistoriesResponse = function (outp
2445
2059
  NextToken: __expectString(output.NextToken),
2446
2060
  };
2447
2061
  };
2448
- var deserializeAws_json1_1DescribeBudgetActionResponse = function (output, context) {
2062
+ const deserializeAws_json1_1DescribeBudgetActionResponse = (output, context) => {
2449
2063
  return {
2450
2064
  AccountId: __expectString(output.AccountId),
2451
2065
  Action: output.Action != null ? deserializeAws_json1_1Action(output.Action, context) : undefined,
2452
2066
  BudgetName: __expectString(output.BudgetName),
2453
2067
  };
2454
2068
  };
2455
- var deserializeAws_json1_1DescribeBudgetActionsForAccountResponse = function (output, context) {
2069
+ const deserializeAws_json1_1DescribeBudgetActionsForAccountResponse = (output, context) => {
2456
2070
  return {
2457
2071
  Actions: output.Actions != null ? deserializeAws_json1_1Actions(output.Actions, context) : undefined,
2458
2072
  NextToken: __expectString(output.NextToken),
2459
2073
  };
2460
2074
  };
2461
- var deserializeAws_json1_1DescribeBudgetActionsForBudgetResponse = function (output, context) {
2075
+ const deserializeAws_json1_1DescribeBudgetActionsForBudgetResponse = (output, context) => {
2462
2076
  return {
2463
2077
  Actions: output.Actions != null ? deserializeAws_json1_1Actions(output.Actions, context) : undefined,
2464
2078
  NextToken: __expectString(output.NextToken),
2465
2079
  };
2466
2080
  };
2467
- var deserializeAws_json1_1DescribeBudgetNotificationsForAccountResponse = function (output, context) {
2081
+ const deserializeAws_json1_1DescribeBudgetNotificationsForAccountResponse = (output, context) => {
2468
2082
  return {
2469
2083
  BudgetNotificationsForAccount: output.BudgetNotificationsForAccount != null
2470
2084
  ? deserializeAws_json1_1BudgetNotificationsForAccountList(output.BudgetNotificationsForAccount, context)
@@ -2472,7 +2086,7 @@ var deserializeAws_json1_1DescribeBudgetNotificationsForAccountResponse = functi
2472
2086
  NextToken: __expectString(output.NextToken),
2473
2087
  };
2474
2088
  };
2475
- var deserializeAws_json1_1DescribeBudgetPerformanceHistoryResponse = function (output, context) {
2089
+ const deserializeAws_json1_1DescribeBudgetPerformanceHistoryResponse = (output, context) => {
2476
2090
  return {
2477
2091
  BudgetPerformanceHistory: output.BudgetPerformanceHistory != null
2478
2092
  ? deserializeAws_json1_1BudgetPerformanceHistory(output.BudgetPerformanceHistory, context)
@@ -2480,33 +2094,33 @@ var deserializeAws_json1_1DescribeBudgetPerformanceHistoryResponse = function (o
2480
2094
  NextToken: __expectString(output.NextToken),
2481
2095
  };
2482
2096
  };
2483
- var deserializeAws_json1_1DescribeBudgetResponse = function (output, context) {
2097
+ const deserializeAws_json1_1DescribeBudgetResponse = (output, context) => {
2484
2098
  return {
2485
2099
  Budget: output.Budget != null ? deserializeAws_json1_1Budget(output.Budget, context) : undefined,
2486
2100
  };
2487
2101
  };
2488
- var deserializeAws_json1_1DescribeBudgetsResponse = function (output, context) {
2102
+ const deserializeAws_json1_1DescribeBudgetsResponse = (output, context) => {
2489
2103
  return {
2490
2104
  Budgets: output.Budgets != null ? deserializeAws_json1_1Budgets(output.Budgets, context) : undefined,
2491
2105
  NextToken: __expectString(output.NextToken),
2492
2106
  };
2493
2107
  };
2494
- var deserializeAws_json1_1DescribeNotificationsForBudgetResponse = function (output, context) {
2108
+ const deserializeAws_json1_1DescribeNotificationsForBudgetResponse = (output, context) => {
2495
2109
  return {
2496
2110
  NextToken: __expectString(output.NextToken),
2497
2111
  Notifications: output.Notifications != null ? deserializeAws_json1_1Notifications(output.Notifications, context) : undefined,
2498
2112
  };
2499
2113
  };
2500
- var deserializeAws_json1_1DescribeSubscribersForNotificationResponse = function (output, context) {
2114
+ const deserializeAws_json1_1DescribeSubscribersForNotificationResponse = (output, context) => {
2501
2115
  return {
2502
2116
  NextToken: __expectString(output.NextToken),
2503
2117
  Subscribers: output.Subscribers != null ? deserializeAws_json1_1Subscribers(output.Subscribers, context) : undefined,
2504
2118
  };
2505
2119
  };
2506
- var deserializeAws_json1_1DimensionValues = function (output, context) {
2507
- var retVal = (output || [])
2508
- .filter(function (e) { return e != null; })
2509
- .map(function (entry) {
2120
+ const deserializeAws_json1_1DimensionValues = (output, context) => {
2121
+ const retVal = (output || [])
2122
+ .filter((e) => e != null)
2123
+ .map((entry) => {
2510
2124
  if (entry === null) {
2511
2125
  return null;
2512
2126
  }
@@ -2514,12 +2128,12 @@ var deserializeAws_json1_1DimensionValues = function (output, context) {
2514
2128
  });
2515
2129
  return retVal;
2516
2130
  };
2517
- var deserializeAws_json1_1DuplicateRecordException = function (output, context) {
2131
+ const deserializeAws_json1_1DuplicateRecordException = (output, context) => {
2518
2132
  return {
2519
2133
  Message: __expectString(output.Message),
2520
2134
  };
2521
2135
  };
2522
- var deserializeAws_json1_1ExecuteBudgetActionResponse = function (output, context) {
2136
+ const deserializeAws_json1_1ExecuteBudgetActionResponse = (output, context) => {
2523
2137
  return {
2524
2138
  AccountId: __expectString(output.AccountId),
2525
2139
  ActionId: __expectString(output.ActionId),
@@ -2527,15 +2141,15 @@ var deserializeAws_json1_1ExecuteBudgetActionResponse = function (output, contex
2527
2141
  ExecutionType: __expectString(output.ExecutionType),
2528
2142
  };
2529
2143
  };
2530
- var deserializeAws_json1_1ExpiredNextTokenException = function (output, context) {
2144
+ const deserializeAws_json1_1ExpiredNextTokenException = (output, context) => {
2531
2145
  return {
2532
2146
  Message: __expectString(output.Message),
2533
2147
  };
2534
2148
  };
2535
- var deserializeAws_json1_1Groups = function (output, context) {
2536
- var retVal = (output || [])
2537
- .filter(function (e) { return e != null; })
2538
- .map(function (entry) {
2149
+ const deserializeAws_json1_1Groups = (output, context) => {
2150
+ const retVal = (output || [])
2151
+ .filter((e) => e != null)
2152
+ .map((entry) => {
2539
2153
  if (entry === null) {
2540
2154
  return null;
2541
2155
  }
@@ -2543,13 +2157,13 @@ var deserializeAws_json1_1Groups = function (output, context) {
2543
2157
  });
2544
2158
  return retVal;
2545
2159
  };
2546
- var deserializeAws_json1_1HistoricalOptions = function (output, context) {
2160
+ const deserializeAws_json1_1HistoricalOptions = (output, context) => {
2547
2161
  return {
2548
2162
  BudgetAdjustmentPeriod: __expectInt32(output.BudgetAdjustmentPeriod),
2549
2163
  LookBackAvailablePeriods: __expectInt32(output.LookBackAvailablePeriods),
2550
2164
  };
2551
2165
  };
2552
- var deserializeAws_json1_1IamActionDefinition = function (output, context) {
2166
+ const deserializeAws_json1_1IamActionDefinition = (output, context) => {
2553
2167
  return {
2554
2168
  Groups: output.Groups != null ? deserializeAws_json1_1Groups(output.Groups, context) : undefined,
2555
2169
  PolicyArn: __expectString(output.PolicyArn),
@@ -2557,10 +2171,10 @@ var deserializeAws_json1_1IamActionDefinition = function (output, context) {
2557
2171
  Users: output.Users != null ? deserializeAws_json1_1Users(output.Users, context) : undefined,
2558
2172
  };
2559
2173
  };
2560
- var deserializeAws_json1_1InstanceIds = function (output, context) {
2561
- var retVal = (output || [])
2562
- .filter(function (e) { return e != null; })
2563
- .map(function (entry) {
2174
+ const deserializeAws_json1_1InstanceIds = (output, context) => {
2175
+ const retVal = (output || [])
2176
+ .filter((e) => e != null)
2177
+ .map((entry) => {
2564
2178
  if (entry === null) {
2565
2179
  return null;
2566
2180
  }
@@ -2568,27 +2182,27 @@ var deserializeAws_json1_1InstanceIds = function (output, context) {
2568
2182
  });
2569
2183
  return retVal;
2570
2184
  };
2571
- var deserializeAws_json1_1InternalErrorException = function (output, context) {
2185
+ const deserializeAws_json1_1InternalErrorException = (output, context) => {
2572
2186
  return {
2573
2187
  Message: __expectString(output.Message),
2574
2188
  };
2575
2189
  };
2576
- var deserializeAws_json1_1InvalidNextTokenException = function (output, context) {
2190
+ const deserializeAws_json1_1InvalidNextTokenException = (output, context) => {
2577
2191
  return {
2578
2192
  Message: __expectString(output.Message),
2579
2193
  };
2580
2194
  };
2581
- var deserializeAws_json1_1InvalidParameterException = function (output, context) {
2195
+ const deserializeAws_json1_1InvalidParameterException = (output, context) => {
2582
2196
  return {
2583
2197
  Message: __expectString(output.Message),
2584
2198
  };
2585
2199
  };
2586
- var deserializeAws_json1_1NotFoundException = function (output, context) {
2200
+ const deserializeAws_json1_1NotFoundException = (output, context) => {
2587
2201
  return {
2588
2202
  Message: __expectString(output.Message),
2589
2203
  };
2590
2204
  };
2591
- var deserializeAws_json1_1Notification = function (output, context) {
2205
+ const deserializeAws_json1_1Notification = (output, context) => {
2592
2206
  return {
2593
2207
  ComparisonOperator: __expectString(output.ComparisonOperator),
2594
2208
  NotificationState: __expectString(output.NotificationState),
@@ -2597,10 +2211,10 @@ var deserializeAws_json1_1Notification = function (output, context) {
2597
2211
  ThresholdType: __expectString(output.ThresholdType),
2598
2212
  };
2599
2213
  };
2600
- var deserializeAws_json1_1Notifications = function (output, context) {
2601
- var retVal = (output || [])
2602
- .filter(function (e) { return e != null; })
2603
- .map(function (entry) {
2214
+ const deserializeAws_json1_1Notifications = (output, context) => {
2215
+ const retVal = (output || [])
2216
+ .filter((e) => e != null)
2217
+ .map((entry) => {
2604
2218
  if (entry === null) {
2605
2219
  return null;
2606
2220
  }
@@ -2608,25 +2222,26 @@ var deserializeAws_json1_1Notifications = function (output, context) {
2608
2222
  });
2609
2223
  return retVal;
2610
2224
  };
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];
2225
+ const deserializeAws_json1_1PlannedBudgetLimits = (output, context) => {
2226
+ return Object.entries(output).reduce((acc, [key, value]) => {
2615
2227
  if (value === null) {
2616
2228
  return acc;
2617
2229
  }
2618
- return __assign(__assign({}, acc), (_b = {}, _b[key] = deserializeAws_json1_1Spend(value, context), _b));
2230
+ return {
2231
+ ...acc,
2232
+ [key]: deserializeAws_json1_1Spend(value, context),
2233
+ };
2619
2234
  }, {});
2620
2235
  };
2621
- var deserializeAws_json1_1ResourceLockedException = function (output, context) {
2236
+ const deserializeAws_json1_1ResourceLockedException = (output, context) => {
2622
2237
  return {
2623
2238
  Message: __expectString(output.Message),
2624
2239
  };
2625
2240
  };
2626
- var deserializeAws_json1_1Roles = function (output, context) {
2627
- var retVal = (output || [])
2628
- .filter(function (e) { return e != null; })
2629
- .map(function (entry) {
2241
+ const deserializeAws_json1_1Roles = (output, context) => {
2242
+ const retVal = (output || [])
2243
+ .filter((e) => e != null)
2244
+ .map((entry) => {
2630
2245
  if (entry === null) {
2631
2246
  return null;
2632
2247
  }
@@ -2634,35 +2249,35 @@ var deserializeAws_json1_1Roles = function (output, context) {
2634
2249
  });
2635
2250
  return retVal;
2636
2251
  };
2637
- var deserializeAws_json1_1ScpActionDefinition = function (output, context) {
2252
+ const deserializeAws_json1_1ScpActionDefinition = (output, context) => {
2638
2253
  return {
2639
2254
  PolicyId: __expectString(output.PolicyId),
2640
2255
  TargetIds: output.TargetIds != null ? deserializeAws_json1_1TargetIds(output.TargetIds, context) : undefined,
2641
2256
  };
2642
2257
  };
2643
- var deserializeAws_json1_1Spend = function (output, context) {
2258
+ const deserializeAws_json1_1Spend = (output, context) => {
2644
2259
  return {
2645
2260
  Amount: __expectString(output.Amount),
2646
2261
  Unit: __expectString(output.Unit),
2647
2262
  };
2648
2263
  };
2649
- var deserializeAws_json1_1SsmActionDefinition = function (output, context) {
2264
+ const deserializeAws_json1_1SsmActionDefinition = (output, context) => {
2650
2265
  return {
2651
2266
  ActionSubType: __expectString(output.ActionSubType),
2652
2267
  InstanceIds: output.InstanceIds != null ? deserializeAws_json1_1InstanceIds(output.InstanceIds, context) : undefined,
2653
2268
  Region: __expectString(output.Region),
2654
2269
  };
2655
2270
  };
2656
- var deserializeAws_json1_1Subscriber = function (output, context) {
2271
+ const deserializeAws_json1_1Subscriber = (output, context) => {
2657
2272
  return {
2658
2273
  Address: __expectString(output.Address),
2659
2274
  SubscriptionType: __expectString(output.SubscriptionType),
2660
2275
  };
2661
2276
  };
2662
- var deserializeAws_json1_1Subscribers = function (output, context) {
2663
- var retVal = (output || [])
2664
- .filter(function (e) { return e != null; })
2665
- .map(function (entry) {
2277
+ const deserializeAws_json1_1Subscribers = (output, context) => {
2278
+ const retVal = (output || [])
2279
+ .filter((e) => e != null)
2280
+ .map((entry) => {
2666
2281
  if (entry === null) {
2667
2282
  return null;
2668
2283
  }
@@ -2670,10 +2285,10 @@ var deserializeAws_json1_1Subscribers = function (output, context) {
2670
2285
  });
2671
2286
  return retVal;
2672
2287
  };
2673
- var deserializeAws_json1_1TargetIds = function (output, context) {
2674
- var retVal = (output || [])
2675
- .filter(function (e) { return e != null; })
2676
- .map(function (entry) {
2288
+ const deserializeAws_json1_1TargetIds = (output, context) => {
2289
+ const retVal = (output || [])
2290
+ .filter((e) => e != null)
2291
+ .map((entry) => {
2677
2292
  if (entry === null) {
2678
2293
  return null;
2679
2294
  }
@@ -2681,18 +2296,18 @@ var deserializeAws_json1_1TargetIds = function (output, context) {
2681
2296
  });
2682
2297
  return retVal;
2683
2298
  };
2684
- var deserializeAws_json1_1ThrottlingException = function (output, context) {
2299
+ const deserializeAws_json1_1ThrottlingException = (output, context) => {
2685
2300
  return {
2686
2301
  Message: __expectString(output.Message),
2687
2302
  };
2688
2303
  };
2689
- var deserializeAws_json1_1TimePeriod = function (output, context) {
2304
+ const deserializeAws_json1_1TimePeriod = (output, context) => {
2690
2305
  return {
2691
2306
  End: output.End != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.End))) : undefined,
2692
2307
  Start: output.Start != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Start))) : undefined,
2693
2308
  };
2694
2309
  };
2695
- var deserializeAws_json1_1UpdateBudgetActionResponse = function (output, context) {
2310
+ const deserializeAws_json1_1UpdateBudgetActionResponse = (output, context) => {
2696
2311
  return {
2697
2312
  AccountId: __expectString(output.AccountId),
2698
2313
  BudgetName: __expectString(output.BudgetName),
@@ -2700,19 +2315,19 @@ var deserializeAws_json1_1UpdateBudgetActionResponse = function (output, context
2700
2315
  OldAction: output.OldAction != null ? deserializeAws_json1_1Action(output.OldAction, context) : undefined,
2701
2316
  };
2702
2317
  };
2703
- var deserializeAws_json1_1UpdateBudgetResponse = function (output, context) {
2318
+ const deserializeAws_json1_1UpdateBudgetResponse = (output, context) => {
2704
2319
  return {};
2705
2320
  };
2706
- var deserializeAws_json1_1UpdateNotificationResponse = function (output, context) {
2321
+ const deserializeAws_json1_1UpdateNotificationResponse = (output, context) => {
2707
2322
  return {};
2708
2323
  };
2709
- var deserializeAws_json1_1UpdateSubscriberResponse = function (output, context) {
2324
+ const deserializeAws_json1_1UpdateSubscriberResponse = (output, context) => {
2710
2325
  return {};
2711
2326
  };
2712
- var deserializeAws_json1_1Users = function (output, context) {
2713
- var retVal = (output || [])
2714
- .filter(function (e) { return e != null; })
2715
- .map(function (entry) {
2327
+ const deserializeAws_json1_1Users = (output, context) => {
2328
+ const retVal = (output || [])
2329
+ .filter((e) => e != null)
2330
+ .map((entry) => {
2716
2331
  if (entry === null) {
2717
2332
  return null;
2718
2333
  }
@@ -2720,75 +2335,52 @@ var deserializeAws_json1_1Users = function (output, context) {
2720
2335
  });
2721
2336
  return retVal;
2722
2337
  };
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(); }
2338
+ const deserializeMetadata = (output) => ({
2339
+ httpStatusCode: output.statusCode,
2340
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-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) => {
2734
2345
  if (streamBody instanceof Uint8Array) {
2735
2346
  return Promise.resolve(streamBody);
2736
2347
  }
2737
2348
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2738
2349
  };
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
- });
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);
2774
2368
  };
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;
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;
2792
2384
  if (typeof cleanValue === "number") {
2793
2385
  cleanValue = cleanValue.toString();
2794
2386
  }
@@ -2803,7 +2395,7 @@ var loadRestJsonErrorCode = function (output, data) {
2803
2395
  }
2804
2396
  return cleanValue;
2805
2397
  };
2806
- var headerKey = findKey(output.headers, "x-amzn-errortype");
2398
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
2807
2399
  if (headerKey !== undefined) {
2808
2400
  return sanitizeErrorCode(output.headers[headerKey]);
2809
2401
  }