@aws-sdk/client-budgets 3.310.0 → 3.315.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,210 +1,141 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { BudgetsServiceException as __BaseException } from "../models/BudgetsServiceException";
4
4
  import { AccessDeniedException, CreationLimitExceededException, DuplicateRecordException, ExpiredNextTokenException, InternalErrorException, InvalidNextTokenException, InvalidParameterException, NotFoundException, ResourceLockedException, ThrottlingException, } from "../models/models_0";
5
5
  export const se_CreateBudgetCommand = async (input, context) => {
6
- const headers = {
7
- "content-type": "application/x-amz-json-1.1",
8
- "x-amz-target": "AWSBudgetServiceGateway.CreateBudget",
9
- };
6
+ const headers = sharedHeaders("CreateBudget");
10
7
  let body;
11
8
  body = JSON.stringify(se_CreateBudgetRequest(input, context));
12
9
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
10
  };
14
11
  export const se_CreateBudgetActionCommand = async (input, context) => {
15
- const headers = {
16
- "content-type": "application/x-amz-json-1.1",
17
- "x-amz-target": "AWSBudgetServiceGateway.CreateBudgetAction",
18
- };
12
+ const headers = sharedHeaders("CreateBudgetAction");
19
13
  let body;
20
14
  body = JSON.stringify(se_CreateBudgetActionRequest(input, context));
21
15
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
16
  };
23
17
  export const se_CreateNotificationCommand = async (input, context) => {
24
- const headers = {
25
- "content-type": "application/x-amz-json-1.1",
26
- "x-amz-target": "AWSBudgetServiceGateway.CreateNotification",
27
- };
18
+ const headers = sharedHeaders("CreateNotification");
28
19
  let body;
29
20
  body = JSON.stringify(se_CreateNotificationRequest(input, context));
30
21
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
31
22
  };
32
23
  export const se_CreateSubscriberCommand = async (input, context) => {
33
- const headers = {
34
- "content-type": "application/x-amz-json-1.1",
35
- "x-amz-target": "AWSBudgetServiceGateway.CreateSubscriber",
36
- };
24
+ const headers = sharedHeaders("CreateSubscriber");
37
25
  let body;
38
26
  body = JSON.stringify(se_CreateSubscriberRequest(input, context));
39
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
28
  };
41
29
  export const se_DeleteBudgetCommand = async (input, context) => {
42
- const headers = {
43
- "content-type": "application/x-amz-json-1.1",
44
- "x-amz-target": "AWSBudgetServiceGateway.DeleteBudget",
45
- };
30
+ const headers = sharedHeaders("DeleteBudget");
46
31
  let body;
47
- body = JSON.stringify(se_DeleteBudgetRequest(input, context));
32
+ body = JSON.stringify(_json(input));
48
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
34
  };
50
35
  export const se_DeleteBudgetActionCommand = async (input, context) => {
51
- const headers = {
52
- "content-type": "application/x-amz-json-1.1",
53
- "x-amz-target": "AWSBudgetServiceGateway.DeleteBudgetAction",
54
- };
36
+ const headers = sharedHeaders("DeleteBudgetAction");
55
37
  let body;
56
- body = JSON.stringify(se_DeleteBudgetActionRequest(input, context));
38
+ body = JSON.stringify(_json(input));
57
39
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
40
  };
59
41
  export const se_DeleteNotificationCommand = async (input, context) => {
60
- const headers = {
61
- "content-type": "application/x-amz-json-1.1",
62
- "x-amz-target": "AWSBudgetServiceGateway.DeleteNotification",
63
- };
42
+ const headers = sharedHeaders("DeleteNotification");
64
43
  let body;
65
44
  body = JSON.stringify(se_DeleteNotificationRequest(input, context));
66
45
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
67
46
  };
68
47
  export const se_DeleteSubscriberCommand = async (input, context) => {
69
- const headers = {
70
- "content-type": "application/x-amz-json-1.1",
71
- "x-amz-target": "AWSBudgetServiceGateway.DeleteSubscriber",
72
- };
48
+ const headers = sharedHeaders("DeleteSubscriber");
73
49
  let body;
74
50
  body = JSON.stringify(se_DeleteSubscriberRequest(input, context));
75
51
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
52
  };
77
53
  export const se_DescribeBudgetCommand = async (input, context) => {
78
- const headers = {
79
- "content-type": "application/x-amz-json-1.1",
80
- "x-amz-target": "AWSBudgetServiceGateway.DescribeBudget",
81
- };
54
+ const headers = sharedHeaders("DescribeBudget");
82
55
  let body;
83
- body = JSON.stringify(se_DescribeBudgetRequest(input, context));
56
+ body = JSON.stringify(_json(input));
84
57
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
85
58
  };
86
59
  export const se_DescribeBudgetActionCommand = async (input, context) => {
87
- const headers = {
88
- "content-type": "application/x-amz-json-1.1",
89
- "x-amz-target": "AWSBudgetServiceGateway.DescribeBudgetAction",
90
- };
60
+ const headers = sharedHeaders("DescribeBudgetAction");
91
61
  let body;
92
- body = JSON.stringify(se_DescribeBudgetActionRequest(input, context));
62
+ body = JSON.stringify(_json(input));
93
63
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
94
64
  };
95
65
  export const se_DescribeBudgetActionHistoriesCommand = async (input, context) => {
96
- const headers = {
97
- "content-type": "application/x-amz-json-1.1",
98
- "x-amz-target": "AWSBudgetServiceGateway.DescribeBudgetActionHistories",
99
- };
66
+ const headers = sharedHeaders("DescribeBudgetActionHistories");
100
67
  let body;
101
68
  body = JSON.stringify(se_DescribeBudgetActionHistoriesRequest(input, context));
102
69
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
103
70
  };
104
71
  export const se_DescribeBudgetActionsForAccountCommand = async (input, context) => {
105
- const headers = {
106
- "content-type": "application/x-amz-json-1.1",
107
- "x-amz-target": "AWSBudgetServiceGateway.DescribeBudgetActionsForAccount",
108
- };
72
+ const headers = sharedHeaders("DescribeBudgetActionsForAccount");
109
73
  let body;
110
- body = JSON.stringify(se_DescribeBudgetActionsForAccountRequest(input, context));
74
+ body = JSON.stringify(_json(input));
111
75
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
76
  };
113
77
  export const se_DescribeBudgetActionsForBudgetCommand = async (input, context) => {
114
- const headers = {
115
- "content-type": "application/x-amz-json-1.1",
116
- "x-amz-target": "AWSBudgetServiceGateway.DescribeBudgetActionsForBudget",
117
- };
78
+ const headers = sharedHeaders("DescribeBudgetActionsForBudget");
118
79
  let body;
119
- body = JSON.stringify(se_DescribeBudgetActionsForBudgetRequest(input, context));
80
+ body = JSON.stringify(_json(input));
120
81
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
121
82
  };
122
83
  export const se_DescribeBudgetNotificationsForAccountCommand = async (input, context) => {
123
- const headers = {
124
- "content-type": "application/x-amz-json-1.1",
125
- "x-amz-target": "AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount",
126
- };
84
+ const headers = sharedHeaders("DescribeBudgetNotificationsForAccount");
127
85
  let body;
128
- body = JSON.stringify(se_DescribeBudgetNotificationsForAccountRequest(input, context));
86
+ body = JSON.stringify(_json(input));
129
87
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
130
88
  };
131
89
  export const se_DescribeBudgetPerformanceHistoryCommand = async (input, context) => {
132
- const headers = {
133
- "content-type": "application/x-amz-json-1.1",
134
- "x-amz-target": "AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory",
135
- };
90
+ const headers = sharedHeaders("DescribeBudgetPerformanceHistory");
136
91
  let body;
137
92
  body = JSON.stringify(se_DescribeBudgetPerformanceHistoryRequest(input, context));
138
93
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
139
94
  };
140
95
  export const se_DescribeBudgetsCommand = async (input, context) => {
141
- const headers = {
142
- "content-type": "application/x-amz-json-1.1",
143
- "x-amz-target": "AWSBudgetServiceGateway.DescribeBudgets",
144
- };
96
+ const headers = sharedHeaders("DescribeBudgets");
145
97
  let body;
146
- body = JSON.stringify(se_DescribeBudgetsRequest(input, context));
98
+ body = JSON.stringify(_json(input));
147
99
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
148
100
  };
149
101
  export const se_DescribeNotificationsForBudgetCommand = async (input, context) => {
150
- const headers = {
151
- "content-type": "application/x-amz-json-1.1",
152
- "x-amz-target": "AWSBudgetServiceGateway.DescribeNotificationsForBudget",
153
- };
102
+ const headers = sharedHeaders("DescribeNotificationsForBudget");
154
103
  let body;
155
- body = JSON.stringify(se_DescribeNotificationsForBudgetRequest(input, context));
104
+ body = JSON.stringify(_json(input));
156
105
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
157
106
  };
158
107
  export const se_DescribeSubscribersForNotificationCommand = async (input, context) => {
159
- const headers = {
160
- "content-type": "application/x-amz-json-1.1",
161
- "x-amz-target": "AWSBudgetServiceGateway.DescribeSubscribersForNotification",
162
- };
108
+ const headers = sharedHeaders("DescribeSubscribersForNotification");
163
109
  let body;
164
110
  body = JSON.stringify(se_DescribeSubscribersForNotificationRequest(input, context));
165
111
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
166
112
  };
167
113
  export const se_ExecuteBudgetActionCommand = async (input, context) => {
168
- const headers = {
169
- "content-type": "application/x-amz-json-1.1",
170
- "x-amz-target": "AWSBudgetServiceGateway.ExecuteBudgetAction",
171
- };
114
+ const headers = sharedHeaders("ExecuteBudgetAction");
172
115
  let body;
173
- body = JSON.stringify(se_ExecuteBudgetActionRequest(input, context));
116
+ body = JSON.stringify(_json(input));
174
117
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
175
118
  };
176
119
  export const se_UpdateBudgetCommand = async (input, context) => {
177
- const headers = {
178
- "content-type": "application/x-amz-json-1.1",
179
- "x-amz-target": "AWSBudgetServiceGateway.UpdateBudget",
180
- };
120
+ const headers = sharedHeaders("UpdateBudget");
181
121
  let body;
182
122
  body = JSON.stringify(se_UpdateBudgetRequest(input, context));
183
123
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
184
124
  };
185
125
  export const se_UpdateBudgetActionCommand = async (input, context) => {
186
- const headers = {
187
- "content-type": "application/x-amz-json-1.1",
188
- "x-amz-target": "AWSBudgetServiceGateway.UpdateBudgetAction",
189
- };
126
+ const headers = sharedHeaders("UpdateBudgetAction");
190
127
  let body;
191
128
  body = JSON.stringify(se_UpdateBudgetActionRequest(input, context));
192
129
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
193
130
  };
194
131
  export const se_UpdateNotificationCommand = async (input, context) => {
195
- const headers = {
196
- "content-type": "application/x-amz-json-1.1",
197
- "x-amz-target": "AWSBudgetServiceGateway.UpdateNotification",
198
- };
132
+ const headers = sharedHeaders("UpdateNotification");
199
133
  let body;
200
134
  body = JSON.stringify(se_UpdateNotificationRequest(input, context));
201
135
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
202
136
  };
203
137
  export const se_UpdateSubscriberCommand = async (input, context) => {
204
- const headers = {
205
- "content-type": "application/x-amz-json-1.1",
206
- "x-amz-target": "AWSBudgetServiceGateway.UpdateSubscriber",
207
- };
138
+ const headers = sharedHeaders("UpdateSubscriber");
208
139
  let body;
209
140
  body = JSON.stringify(se_UpdateSubscriberRequest(input, context));
210
141
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
@@ -215,12 +146,12 @@ export const de_CreateBudgetCommand = async (output, context) => {
215
146
  }
216
147
  const data = await parseBody(output.body, context);
217
148
  let contents = {};
218
- contents = de_CreateBudgetResponse(data, context);
149
+ contents = _json(data);
219
150
  const response = {
220
151
  $metadata: deserializeMetadata(output),
221
152
  ...contents,
222
153
  };
223
- return Promise.resolve(response);
154
+ return response;
224
155
  };
225
156
  const de_CreateBudgetCommandError = async (output, context) => {
226
157
  const parsedOutput = {
@@ -249,10 +180,9 @@ const de_CreateBudgetCommandError = async (output, context) => {
249
180
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
250
181
  default:
251
182
  const parsedBody = parsedOutput.body;
252
- throwDefaultError({
183
+ return throwDefaultError({
253
184
  output,
254
185
  parsedBody,
255
- exceptionCtor: __BaseException,
256
186
  errorCode,
257
187
  });
258
188
  }
@@ -263,12 +193,12 @@ export const de_CreateBudgetActionCommand = async (output, context) => {
263
193
  }
264
194
  const data = await parseBody(output.body, context);
265
195
  let contents = {};
266
- contents = de_CreateBudgetActionResponse(data, context);
196
+ contents = _json(data);
267
197
  const response = {
268
198
  $metadata: deserializeMetadata(output),
269
199
  ...contents,
270
200
  };
271
- return Promise.resolve(response);
201
+ return response;
272
202
  };
273
203
  const de_CreateBudgetActionCommandError = async (output, context) => {
274
204
  const parsedOutput = {
@@ -300,10 +230,9 @@ const de_CreateBudgetActionCommandError = async (output, context) => {
300
230
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
301
231
  default:
302
232
  const parsedBody = parsedOutput.body;
303
- throwDefaultError({
233
+ return throwDefaultError({
304
234
  output,
305
235
  parsedBody,
306
- exceptionCtor: __BaseException,
307
236
  errorCode,
308
237
  });
309
238
  }
@@ -314,12 +243,12 @@ export const de_CreateNotificationCommand = async (output, context) => {
314
243
  }
315
244
  const data = await parseBody(output.body, context);
316
245
  let contents = {};
317
- contents = de_CreateNotificationResponse(data, context);
246
+ contents = _json(data);
318
247
  const response = {
319
248
  $metadata: deserializeMetadata(output),
320
249
  ...contents,
321
250
  };
322
- return Promise.resolve(response);
251
+ return response;
323
252
  };
324
253
  const de_CreateNotificationCommandError = async (output, context) => {
325
254
  const parsedOutput = {
@@ -351,10 +280,9 @@ const de_CreateNotificationCommandError = async (output, context) => {
351
280
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
352
281
  default:
353
282
  const parsedBody = parsedOutput.body;
354
- throwDefaultError({
283
+ return throwDefaultError({
355
284
  output,
356
285
  parsedBody,
357
- exceptionCtor: __BaseException,
358
286
  errorCode,
359
287
  });
360
288
  }
@@ -365,12 +293,12 @@ export const de_CreateSubscriberCommand = async (output, context) => {
365
293
  }
366
294
  const data = await parseBody(output.body, context);
367
295
  let contents = {};
368
- contents = de_CreateSubscriberResponse(data, context);
296
+ contents = _json(data);
369
297
  const response = {
370
298
  $metadata: deserializeMetadata(output),
371
299
  ...contents,
372
300
  };
373
- return Promise.resolve(response);
301
+ return response;
374
302
  };
375
303
  const de_CreateSubscriberCommandError = async (output, context) => {
376
304
  const parsedOutput = {
@@ -402,10 +330,9 @@ const de_CreateSubscriberCommandError = async (output, context) => {
402
330
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
403
331
  default:
404
332
  const parsedBody = parsedOutput.body;
405
- throwDefaultError({
333
+ return throwDefaultError({
406
334
  output,
407
335
  parsedBody,
408
- exceptionCtor: __BaseException,
409
336
  errorCode,
410
337
  });
411
338
  }
@@ -416,12 +343,12 @@ export const de_DeleteBudgetCommand = async (output, context) => {
416
343
  }
417
344
  const data = await parseBody(output.body, context);
418
345
  let contents = {};
419
- contents = de_DeleteBudgetResponse(data, context);
346
+ contents = _json(data);
420
347
  const response = {
421
348
  $metadata: deserializeMetadata(output),
422
349
  ...contents,
423
350
  };
424
- return Promise.resolve(response);
351
+ return response;
425
352
  };
426
353
  const de_DeleteBudgetCommandError = async (output, context) => {
427
354
  const parsedOutput = {
@@ -447,10 +374,9 @@ const de_DeleteBudgetCommandError = async (output, context) => {
447
374
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
448
375
  default:
449
376
  const parsedBody = parsedOutput.body;
450
- throwDefaultError({
377
+ return throwDefaultError({
451
378
  output,
452
379
  parsedBody,
453
- exceptionCtor: __BaseException,
454
380
  errorCode,
455
381
  });
456
382
  }
@@ -466,7 +392,7 @@ export const de_DeleteBudgetActionCommand = async (output, context) => {
466
392
  $metadata: deserializeMetadata(output),
467
393
  ...contents,
468
394
  };
469
- return Promise.resolve(response);
395
+ return response;
470
396
  };
471
397
  const de_DeleteBudgetActionCommandError = async (output, context) => {
472
398
  const parsedOutput = {
@@ -495,10 +421,9 @@ const de_DeleteBudgetActionCommandError = async (output, context) => {
495
421
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
496
422
  default:
497
423
  const parsedBody = parsedOutput.body;
498
- throwDefaultError({
424
+ return throwDefaultError({
499
425
  output,
500
426
  parsedBody,
501
- exceptionCtor: __BaseException,
502
427
  errorCode,
503
428
  });
504
429
  }
@@ -509,12 +434,12 @@ export const de_DeleteNotificationCommand = async (output, context) => {
509
434
  }
510
435
  const data = await parseBody(output.body, context);
511
436
  let contents = {};
512
- contents = de_DeleteNotificationResponse(data, context);
437
+ contents = _json(data);
513
438
  const response = {
514
439
  $metadata: deserializeMetadata(output),
515
440
  ...contents,
516
441
  };
517
- return Promise.resolve(response);
442
+ return response;
518
443
  };
519
444
  const de_DeleteNotificationCommandError = async (output, context) => {
520
445
  const parsedOutput = {
@@ -540,10 +465,9 @@ const de_DeleteNotificationCommandError = async (output, context) => {
540
465
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
541
466
  default:
542
467
  const parsedBody = parsedOutput.body;
543
- throwDefaultError({
468
+ return throwDefaultError({
544
469
  output,
545
470
  parsedBody,
546
- exceptionCtor: __BaseException,
547
471
  errorCode,
548
472
  });
549
473
  }
@@ -554,12 +478,12 @@ export const de_DeleteSubscriberCommand = async (output, context) => {
554
478
  }
555
479
  const data = await parseBody(output.body, context);
556
480
  let contents = {};
557
- contents = de_DeleteSubscriberResponse(data, context);
481
+ contents = _json(data);
558
482
  const response = {
559
483
  $metadata: deserializeMetadata(output),
560
484
  ...contents,
561
485
  };
562
- return Promise.resolve(response);
486
+ return response;
563
487
  };
564
488
  const de_DeleteSubscriberCommandError = async (output, context) => {
565
489
  const parsedOutput = {
@@ -585,10 +509,9 @@ const de_DeleteSubscriberCommandError = async (output, context) => {
585
509
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
586
510
  default:
587
511
  const parsedBody = parsedOutput.body;
588
- throwDefaultError({
512
+ return throwDefaultError({
589
513
  output,
590
514
  parsedBody,
591
- exceptionCtor: __BaseException,
592
515
  errorCode,
593
516
  });
594
517
  }
@@ -604,7 +527,7 @@ export const de_DescribeBudgetCommand = async (output, context) => {
604
527
  $metadata: deserializeMetadata(output),
605
528
  ...contents,
606
529
  };
607
- return Promise.resolve(response);
530
+ return response;
608
531
  };
609
532
  const de_DescribeBudgetCommandError = async (output, context) => {
610
533
  const parsedOutput = {
@@ -630,10 +553,9 @@ const de_DescribeBudgetCommandError = async (output, context) => {
630
553
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
631
554
  default:
632
555
  const parsedBody = parsedOutput.body;
633
- throwDefaultError({
556
+ return throwDefaultError({
634
557
  output,
635
558
  parsedBody,
636
- exceptionCtor: __BaseException,
637
559
  errorCode,
638
560
  });
639
561
  }
@@ -649,7 +571,7 @@ export const de_DescribeBudgetActionCommand = async (output, context) => {
649
571
  $metadata: deserializeMetadata(output),
650
572
  ...contents,
651
573
  };
652
- return Promise.resolve(response);
574
+ return response;
653
575
  };
654
576
  const de_DescribeBudgetActionCommandError = async (output, context) => {
655
577
  const parsedOutput = {
@@ -675,10 +597,9 @@ const de_DescribeBudgetActionCommandError = async (output, context) => {
675
597
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
676
598
  default:
677
599
  const parsedBody = parsedOutput.body;
678
- throwDefaultError({
600
+ return throwDefaultError({
679
601
  output,
680
602
  parsedBody,
681
- exceptionCtor: __BaseException,
682
603
  errorCode,
683
604
  });
684
605
  }
@@ -694,7 +615,7 @@ export const de_DescribeBudgetActionHistoriesCommand = async (output, context) =
694
615
  $metadata: deserializeMetadata(output),
695
616
  ...contents,
696
617
  };
697
- return Promise.resolve(response);
618
+ return response;
698
619
  };
699
620
  const de_DescribeBudgetActionHistoriesCommandError = async (output, context) => {
700
621
  const parsedOutput = {
@@ -723,10 +644,9 @@ const de_DescribeBudgetActionHistoriesCommandError = async (output, context) =>
723
644
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
724
645
  default:
725
646
  const parsedBody = parsedOutput.body;
726
- throwDefaultError({
647
+ return throwDefaultError({
727
648
  output,
728
649
  parsedBody,
729
- exceptionCtor: __BaseException,
730
650
  errorCode,
731
651
  });
732
652
  }
@@ -742,7 +662,7 @@ export const de_DescribeBudgetActionsForAccountCommand = async (output, context)
742
662
  $metadata: deserializeMetadata(output),
743
663
  ...contents,
744
664
  };
745
- return Promise.resolve(response);
665
+ return response;
746
666
  };
747
667
  const de_DescribeBudgetActionsForAccountCommandError = async (output, context) => {
748
668
  const parsedOutput = {
@@ -768,10 +688,9 @@ const de_DescribeBudgetActionsForAccountCommandError = async (output, context) =
768
688
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
769
689
  default:
770
690
  const parsedBody = parsedOutput.body;
771
- throwDefaultError({
691
+ return throwDefaultError({
772
692
  output,
773
693
  parsedBody,
774
- exceptionCtor: __BaseException,
775
694
  errorCode,
776
695
  });
777
696
  }
@@ -787,7 +706,7 @@ export const de_DescribeBudgetActionsForBudgetCommand = async (output, context)
787
706
  $metadata: deserializeMetadata(output),
788
707
  ...contents,
789
708
  };
790
- return Promise.resolve(response);
709
+ return response;
791
710
  };
792
711
  const de_DescribeBudgetActionsForBudgetCommandError = async (output, context) => {
793
712
  const parsedOutput = {
@@ -816,10 +735,9 @@ const de_DescribeBudgetActionsForBudgetCommandError = async (output, context) =>
816
735
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
817
736
  default:
818
737
  const parsedBody = parsedOutput.body;
819
- throwDefaultError({
738
+ return throwDefaultError({
820
739
  output,
821
740
  parsedBody,
822
- exceptionCtor: __BaseException,
823
741
  errorCode,
824
742
  });
825
743
  }
@@ -835,7 +753,7 @@ export const de_DescribeBudgetNotificationsForAccountCommand = async (output, co
835
753
  $metadata: deserializeMetadata(output),
836
754
  ...contents,
837
755
  };
838
- return Promise.resolve(response);
756
+ return response;
839
757
  };
840
758
  const de_DescribeBudgetNotificationsForAccountCommandError = async (output, context) => {
841
759
  const parsedOutput = {
@@ -867,10 +785,9 @@ const de_DescribeBudgetNotificationsForAccountCommandError = async (output, cont
867
785
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
868
786
  default:
869
787
  const parsedBody = parsedOutput.body;
870
- throwDefaultError({
788
+ return throwDefaultError({
871
789
  output,
872
790
  parsedBody,
873
- exceptionCtor: __BaseException,
874
791
  errorCode,
875
792
  });
876
793
  }
@@ -886,7 +803,7 @@ export const de_DescribeBudgetPerformanceHistoryCommand = async (output, context
886
803
  $metadata: deserializeMetadata(output),
887
804
  ...contents,
888
805
  };
889
- return Promise.resolve(response);
806
+ return response;
890
807
  };
891
808
  const de_DescribeBudgetPerformanceHistoryCommandError = async (output, context) => {
892
809
  const parsedOutput = {
@@ -918,10 +835,9 @@ const de_DescribeBudgetPerformanceHistoryCommandError = async (output, context)
918
835
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
919
836
  default:
920
837
  const parsedBody = parsedOutput.body;
921
- throwDefaultError({
838
+ return throwDefaultError({
922
839
  output,
923
840
  parsedBody,
924
- exceptionCtor: __BaseException,
925
841
  errorCode,
926
842
  });
927
843
  }
@@ -937,7 +853,7 @@ export const de_DescribeBudgetsCommand = async (output, context) => {
937
853
  $metadata: deserializeMetadata(output),
938
854
  ...contents,
939
855
  };
940
- return Promise.resolve(response);
856
+ return response;
941
857
  };
942
858
  const de_DescribeBudgetsCommandError = async (output, context) => {
943
859
  const parsedOutput = {
@@ -969,10 +885,9 @@ const de_DescribeBudgetsCommandError = async (output, context) => {
969
885
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
970
886
  default:
971
887
  const parsedBody = parsedOutput.body;
972
- throwDefaultError({
888
+ return throwDefaultError({
973
889
  output,
974
890
  parsedBody,
975
- exceptionCtor: __BaseException,
976
891
  errorCode,
977
892
  });
978
893
  }
@@ -988,7 +903,7 @@ export const de_DescribeNotificationsForBudgetCommand = async (output, context)
988
903
  $metadata: deserializeMetadata(output),
989
904
  ...contents,
990
905
  };
991
- return Promise.resolve(response);
906
+ return response;
992
907
  };
993
908
  const de_DescribeNotificationsForBudgetCommandError = async (output, context) => {
994
909
  const parsedOutput = {
@@ -1020,10 +935,9 @@ const de_DescribeNotificationsForBudgetCommandError = async (output, context) =>
1020
935
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1021
936
  default:
1022
937
  const parsedBody = parsedOutput.body;
1023
- throwDefaultError({
938
+ return throwDefaultError({
1024
939
  output,
1025
940
  parsedBody,
1026
- exceptionCtor: __BaseException,
1027
941
  errorCode,
1028
942
  });
1029
943
  }
@@ -1034,12 +948,12 @@ export const de_DescribeSubscribersForNotificationCommand = async (output, conte
1034
948
  }
1035
949
  const data = await parseBody(output.body, context);
1036
950
  let contents = {};
1037
- contents = de_DescribeSubscribersForNotificationResponse(data, context);
951
+ contents = _json(data);
1038
952
  const response = {
1039
953
  $metadata: deserializeMetadata(output),
1040
954
  ...contents,
1041
955
  };
1042
- return Promise.resolve(response);
956
+ return response;
1043
957
  };
1044
958
  const de_DescribeSubscribersForNotificationCommandError = async (output, context) => {
1045
959
  const parsedOutput = {
@@ -1071,10 +985,9 @@ const de_DescribeSubscribersForNotificationCommandError = async (output, context
1071
985
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1072
986
  default:
1073
987
  const parsedBody = parsedOutput.body;
1074
- throwDefaultError({
988
+ return throwDefaultError({
1075
989
  output,
1076
990
  parsedBody,
1077
- exceptionCtor: __BaseException,
1078
991
  errorCode,
1079
992
  });
1080
993
  }
@@ -1085,12 +998,12 @@ export const de_ExecuteBudgetActionCommand = async (output, context) => {
1085
998
  }
1086
999
  const data = await parseBody(output.body, context);
1087
1000
  let contents = {};
1088
- contents = de_ExecuteBudgetActionResponse(data, context);
1001
+ contents = _json(data);
1089
1002
  const response = {
1090
1003
  $metadata: deserializeMetadata(output),
1091
1004
  ...contents,
1092
1005
  };
1093
- return Promise.resolve(response);
1006
+ return response;
1094
1007
  };
1095
1008
  const de_ExecuteBudgetActionCommandError = async (output, context) => {
1096
1009
  const parsedOutput = {
@@ -1119,10 +1032,9 @@ const de_ExecuteBudgetActionCommandError = async (output, context) => {
1119
1032
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1120
1033
  default:
1121
1034
  const parsedBody = parsedOutput.body;
1122
- throwDefaultError({
1035
+ return throwDefaultError({
1123
1036
  output,
1124
1037
  parsedBody,
1125
- exceptionCtor: __BaseException,
1126
1038
  errorCode,
1127
1039
  });
1128
1040
  }
@@ -1133,12 +1045,12 @@ export const de_UpdateBudgetCommand = async (output, context) => {
1133
1045
  }
1134
1046
  const data = await parseBody(output.body, context);
1135
1047
  let contents = {};
1136
- contents = de_UpdateBudgetResponse(data, context);
1048
+ contents = _json(data);
1137
1049
  const response = {
1138
1050
  $metadata: deserializeMetadata(output),
1139
1051
  ...contents,
1140
1052
  };
1141
- return Promise.resolve(response);
1053
+ return response;
1142
1054
  };
1143
1055
  const de_UpdateBudgetCommandError = async (output, context) => {
1144
1056
  const parsedOutput = {
@@ -1164,10 +1076,9 @@ const de_UpdateBudgetCommandError = async (output, context) => {
1164
1076
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1165
1077
  default:
1166
1078
  const parsedBody = parsedOutput.body;
1167
- throwDefaultError({
1079
+ return throwDefaultError({
1168
1080
  output,
1169
1081
  parsedBody,
1170
- exceptionCtor: __BaseException,
1171
1082
  errorCode,
1172
1083
  });
1173
1084
  }
@@ -1183,7 +1094,7 @@ export const de_UpdateBudgetActionCommand = async (output, context) => {
1183
1094
  $metadata: deserializeMetadata(output),
1184
1095
  ...contents,
1185
1096
  };
1186
- return Promise.resolve(response);
1097
+ return response;
1187
1098
  };
1188
1099
  const de_UpdateBudgetActionCommandError = async (output, context) => {
1189
1100
  const parsedOutput = {
@@ -1212,10 +1123,9 @@ const de_UpdateBudgetActionCommandError = async (output, context) => {
1212
1123
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1213
1124
  default:
1214
1125
  const parsedBody = parsedOutput.body;
1215
- throwDefaultError({
1126
+ return throwDefaultError({
1216
1127
  output,
1217
1128
  parsedBody,
1218
- exceptionCtor: __BaseException,
1219
1129
  errorCode,
1220
1130
  });
1221
1131
  }
@@ -1226,12 +1136,12 @@ export const de_UpdateNotificationCommand = async (output, context) => {
1226
1136
  }
1227
1137
  const data = await parseBody(output.body, context);
1228
1138
  let contents = {};
1229
- contents = de_UpdateNotificationResponse(data, context);
1139
+ contents = _json(data);
1230
1140
  const response = {
1231
1141
  $metadata: deserializeMetadata(output),
1232
1142
  ...contents,
1233
1143
  };
1234
- return Promise.resolve(response);
1144
+ return response;
1235
1145
  };
1236
1146
  const de_UpdateNotificationCommandError = async (output, context) => {
1237
1147
  const parsedOutput = {
@@ -1260,10 +1170,9 @@ const de_UpdateNotificationCommandError = async (output, context) => {
1260
1170
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1261
1171
  default:
1262
1172
  const parsedBody = parsedOutput.body;
1263
- throwDefaultError({
1173
+ return throwDefaultError({
1264
1174
  output,
1265
1175
  parsedBody,
1266
- exceptionCtor: __BaseException,
1267
1176
  errorCode,
1268
1177
  });
1269
1178
  }
@@ -1274,12 +1183,12 @@ export const de_UpdateSubscriberCommand = async (output, context) => {
1274
1183
  }
1275
1184
  const data = await parseBody(output.body, context);
1276
1185
  let contents = {};
1277
- contents = de_UpdateSubscriberResponse(data, context);
1186
+ contents = _json(data);
1278
1187
  const response = {
1279
1188
  $metadata: deserializeMetadata(output),
1280
1189
  ...contents,
1281
1190
  };
1282
- return Promise.resolve(response);
1191
+ return response;
1283
1192
  };
1284
1193
  const de_UpdateSubscriberCommandError = async (output, context) => {
1285
1194
  const parsedOutput = {
@@ -1308,17 +1217,16 @@ const de_UpdateSubscriberCommandError = async (output, context) => {
1308
1217
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1309
1218
  default:
1310
1219
  const parsedBody = parsedOutput.body;
1311
- throwDefaultError({
1220
+ return throwDefaultError({
1312
1221
  output,
1313
1222
  parsedBody,
1314
- exceptionCtor: __BaseException,
1315
1223
  errorCode,
1316
1224
  });
1317
1225
  }
1318
1226
  };
1319
1227
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1320
1228
  const body = parsedOutput.body;
1321
- const deserialized = de_AccessDeniedException(body, context);
1229
+ const deserialized = _json(body);
1322
1230
  const exception = new AccessDeniedException({
1323
1231
  $metadata: deserializeMetadata(parsedOutput),
1324
1232
  ...deserialized,
@@ -1327,7 +1235,7 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1327
1235
  };
1328
1236
  const de_CreationLimitExceededExceptionRes = async (parsedOutput, context) => {
1329
1237
  const body = parsedOutput.body;
1330
- const deserialized = de_CreationLimitExceededException(body, context);
1238
+ const deserialized = _json(body);
1331
1239
  const exception = new CreationLimitExceededException({
1332
1240
  $metadata: deserializeMetadata(parsedOutput),
1333
1241
  ...deserialized,
@@ -1336,7 +1244,7 @@ const de_CreationLimitExceededExceptionRes = async (parsedOutput, context) => {
1336
1244
  };
1337
1245
  const de_DuplicateRecordExceptionRes = async (parsedOutput, context) => {
1338
1246
  const body = parsedOutput.body;
1339
- const deserialized = de_DuplicateRecordException(body, context);
1247
+ const deserialized = _json(body);
1340
1248
  const exception = new DuplicateRecordException({
1341
1249
  $metadata: deserializeMetadata(parsedOutput),
1342
1250
  ...deserialized,
@@ -1345,7 +1253,7 @@ const de_DuplicateRecordExceptionRes = async (parsedOutput, context) => {
1345
1253
  };
1346
1254
  const de_ExpiredNextTokenExceptionRes = async (parsedOutput, context) => {
1347
1255
  const body = parsedOutput.body;
1348
- const deserialized = de_ExpiredNextTokenException(body, context);
1256
+ const deserialized = _json(body);
1349
1257
  const exception = new ExpiredNextTokenException({
1350
1258
  $metadata: deserializeMetadata(parsedOutput),
1351
1259
  ...deserialized,
@@ -1354,7 +1262,7 @@ const de_ExpiredNextTokenExceptionRes = async (parsedOutput, context) => {
1354
1262
  };
1355
1263
  const de_InternalErrorExceptionRes = async (parsedOutput, context) => {
1356
1264
  const body = parsedOutput.body;
1357
- const deserialized = de_InternalErrorException(body, context);
1265
+ const deserialized = _json(body);
1358
1266
  const exception = new InternalErrorException({
1359
1267
  $metadata: deserializeMetadata(parsedOutput),
1360
1268
  ...deserialized,
@@ -1363,7 +1271,7 @@ const de_InternalErrorExceptionRes = async (parsedOutput, context) => {
1363
1271
  };
1364
1272
  const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
1365
1273
  const body = parsedOutput.body;
1366
- const deserialized = de_InvalidNextTokenException(body, context);
1274
+ const deserialized = _json(body);
1367
1275
  const exception = new InvalidNextTokenException({
1368
1276
  $metadata: deserializeMetadata(parsedOutput),
1369
1277
  ...deserialized,
@@ -1372,7 +1280,7 @@ const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
1372
1280
  };
1373
1281
  const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
1374
1282
  const body = parsedOutput.body;
1375
- const deserialized = de_InvalidParameterException(body, context);
1283
+ const deserialized = _json(body);
1376
1284
  const exception = new InvalidParameterException({
1377
1285
  $metadata: deserializeMetadata(parsedOutput),
1378
1286
  ...deserialized,
@@ -1381,7 +1289,7 @@ const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
1381
1289
  };
1382
1290
  const de_NotFoundExceptionRes = async (parsedOutput, context) => {
1383
1291
  const body = parsedOutput.body;
1384
- const deserialized = de_NotFoundException(body, context);
1292
+ const deserialized = _json(body);
1385
1293
  const exception = new NotFoundException({
1386
1294
  $metadata: deserializeMetadata(parsedOutput),
1387
1295
  ...deserialized,
@@ -1390,7 +1298,7 @@ const de_NotFoundExceptionRes = async (parsedOutput, context) => {
1390
1298
  };
1391
1299
  const de_ResourceLockedExceptionRes = async (parsedOutput, context) => {
1392
1300
  const body = parsedOutput.body;
1393
- const deserialized = de_ResourceLockedException(body, context);
1301
+ const deserialized = _json(body);
1394
1302
  const exception = new ResourceLockedException({
1395
1303
  $metadata: deserializeMetadata(parsedOutput),
1396
1304
  ...deserialized,
@@ -1399,7 +1307,7 @@ const de_ResourceLockedExceptionRes = async (parsedOutput, context) => {
1399
1307
  };
1400
1308
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1401
1309
  const body = parsedOutput.body;
1402
- const deserialized = de_ThrottlingException(body, context);
1310
+ const deserialized = _json(body);
1403
1311
  const exception = new ThrottlingException({
1404
1312
  $metadata: deserializeMetadata(parsedOutput),
1405
1313
  ...deserialized,
@@ -1407,283 +1315,126 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1407
1315
  return __decorateServiceException(exception, body);
1408
1316
  };
1409
1317
  const se_ActionThreshold = (input, context) => {
1410
- return {
1411
- ...(input.ActionThresholdType != null && { ActionThresholdType: input.ActionThresholdType }),
1412
- ...(input.ActionThresholdValue != null && { ActionThresholdValue: __serializeFloat(input.ActionThresholdValue) }),
1413
- };
1318
+ return take(input, {
1319
+ ActionThresholdType: [],
1320
+ ActionThresholdValue: __serializeFloat,
1321
+ });
1414
1322
  };
1415
1323
  const se_AutoAdjustData = (input, context) => {
1416
- return {
1417
- ...(input.AutoAdjustType != null && { AutoAdjustType: input.AutoAdjustType }),
1418
- ...(input.HistoricalOptions != null && {
1419
- HistoricalOptions: se_HistoricalOptions(input.HistoricalOptions, context),
1420
- }),
1421
- ...(input.LastAutoAdjustTime != null && {
1422
- LastAutoAdjustTime: Math.round(input.LastAutoAdjustTime.getTime() / 1000),
1423
- }),
1424
- };
1324
+ return take(input, {
1325
+ AutoAdjustType: [],
1326
+ HistoricalOptions: _json,
1327
+ LastAutoAdjustTime: (_) => Math.round(_.getTime() / 1000),
1328
+ });
1425
1329
  };
1426
1330
  const se_Budget = (input, context) => {
1427
- return {
1428
- ...(input.AutoAdjustData != null && { AutoAdjustData: se_AutoAdjustData(input.AutoAdjustData, context) }),
1429
- ...(input.BudgetLimit != null && { BudgetLimit: se_Spend(input.BudgetLimit, context) }),
1430
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1431
- ...(input.BudgetType != null && { BudgetType: input.BudgetType }),
1432
- ...(input.CalculatedSpend != null && { CalculatedSpend: se_CalculatedSpend(input.CalculatedSpend, context) }),
1433
- ...(input.CostFilters != null && { CostFilters: se_CostFilters(input.CostFilters, context) }),
1434
- ...(input.CostTypes != null && { CostTypes: se_CostTypes(input.CostTypes, context) }),
1435
- ...(input.LastUpdatedTime != null && { LastUpdatedTime: Math.round(input.LastUpdatedTime.getTime() / 1000) }),
1436
- ...(input.PlannedBudgetLimits != null && {
1437
- PlannedBudgetLimits: se_PlannedBudgetLimits(input.PlannedBudgetLimits, context),
1438
- }),
1439
- ...(input.TimePeriod != null && { TimePeriod: se_TimePeriod(input.TimePeriod, context) }),
1440
- ...(input.TimeUnit != null && { TimeUnit: input.TimeUnit }),
1441
- };
1442
- };
1443
- const se_CalculatedSpend = (input, context) => {
1444
- return {
1445
- ...(input.ActualSpend != null && { ActualSpend: se_Spend(input.ActualSpend, context) }),
1446
- ...(input.ForecastedSpend != null && { ForecastedSpend: se_Spend(input.ForecastedSpend, context) }),
1447
- };
1448
- };
1449
- const se_CostFilters = (input, context) => {
1450
- return Object.entries(input).reduce((acc, [key, value]) => {
1451
- if (value === null) {
1452
- return acc;
1453
- }
1454
- acc[key] = se_DimensionValues(value, context);
1455
- return acc;
1456
- }, {});
1457
- };
1458
- const se_CostTypes = (input, context) => {
1459
- return {
1460
- ...(input.IncludeCredit != null && { IncludeCredit: input.IncludeCredit }),
1461
- ...(input.IncludeDiscount != null && { IncludeDiscount: input.IncludeDiscount }),
1462
- ...(input.IncludeOtherSubscription != null && { IncludeOtherSubscription: input.IncludeOtherSubscription }),
1463
- ...(input.IncludeRecurring != null && { IncludeRecurring: input.IncludeRecurring }),
1464
- ...(input.IncludeRefund != null && { IncludeRefund: input.IncludeRefund }),
1465
- ...(input.IncludeSubscription != null && { IncludeSubscription: input.IncludeSubscription }),
1466
- ...(input.IncludeSupport != null && { IncludeSupport: input.IncludeSupport }),
1467
- ...(input.IncludeTax != null && { IncludeTax: input.IncludeTax }),
1468
- ...(input.IncludeUpfront != null && { IncludeUpfront: input.IncludeUpfront }),
1469
- ...(input.UseAmortized != null && { UseAmortized: input.UseAmortized }),
1470
- ...(input.UseBlended != null && { UseBlended: input.UseBlended }),
1471
- };
1331
+ return take(input, {
1332
+ AutoAdjustData: (_) => se_AutoAdjustData(_, context),
1333
+ BudgetLimit: _json,
1334
+ BudgetName: [],
1335
+ BudgetType: [],
1336
+ CalculatedSpend: _json,
1337
+ CostFilters: _json,
1338
+ CostTypes: _json,
1339
+ LastUpdatedTime: (_) => Math.round(_.getTime() / 1000),
1340
+ PlannedBudgetLimits: _json,
1341
+ TimePeriod: (_) => se_TimePeriod(_, context),
1342
+ TimeUnit: [],
1343
+ });
1472
1344
  };
1473
1345
  const se_CreateBudgetActionRequest = (input, context) => {
1474
- return {
1475
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1476
- ...(input.ActionThreshold != null && { ActionThreshold: se_ActionThreshold(input.ActionThreshold, context) }),
1477
- ...(input.ActionType != null && { ActionType: input.ActionType }),
1478
- ...(input.ApprovalModel != null && { ApprovalModel: input.ApprovalModel }),
1479
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1480
- ...(input.Definition != null && { Definition: se_Definition(input.Definition, context) }),
1481
- ...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }),
1482
- ...(input.NotificationType != null && { NotificationType: input.NotificationType }),
1483
- ...(input.Subscribers != null && { Subscribers: se_Subscribers(input.Subscribers, context) }),
1484
- };
1346
+ return take(input, {
1347
+ AccountId: [],
1348
+ ActionThreshold: (_) => se_ActionThreshold(_, context),
1349
+ ActionType: [],
1350
+ ApprovalModel: [],
1351
+ BudgetName: [],
1352
+ Definition: _json,
1353
+ ExecutionRoleArn: [],
1354
+ NotificationType: [],
1355
+ Subscribers: _json,
1356
+ });
1485
1357
  };
1486
1358
  const se_CreateBudgetRequest = (input, context) => {
1487
- return {
1488
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1489
- ...(input.Budget != null && { Budget: se_Budget(input.Budget, context) }),
1490
- ...(input.NotificationsWithSubscribers != null && {
1491
- NotificationsWithSubscribers: se_NotificationWithSubscribersList(input.NotificationsWithSubscribers, context),
1492
- }),
1493
- };
1359
+ return take(input, {
1360
+ AccountId: [],
1361
+ Budget: (_) => se_Budget(_, context),
1362
+ NotificationsWithSubscribers: (_) => se_NotificationWithSubscribersList(_, context),
1363
+ });
1494
1364
  };
1495
1365
  const se_CreateNotificationRequest = (input, context) => {
1496
- return {
1497
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1498
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1499
- ...(input.Notification != null && { Notification: se_Notification(input.Notification, context) }),
1500
- ...(input.Subscribers != null && { Subscribers: se_Subscribers(input.Subscribers, context) }),
1501
- };
1366
+ return take(input, {
1367
+ AccountId: [],
1368
+ BudgetName: [],
1369
+ Notification: (_) => se_Notification(_, context),
1370
+ Subscribers: _json,
1371
+ });
1502
1372
  };
1503
1373
  const se_CreateSubscriberRequest = (input, context) => {
1504
- return {
1505
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1506
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1507
- ...(input.Notification != null && { Notification: se_Notification(input.Notification, context) }),
1508
- ...(input.Subscriber != null && { Subscriber: se_Subscriber(input.Subscriber, context) }),
1509
- };
1510
- };
1511
- const se_Definition = (input, context) => {
1512
- return {
1513
- ...(input.IamActionDefinition != null && {
1514
- IamActionDefinition: se_IamActionDefinition(input.IamActionDefinition, context),
1515
- }),
1516
- ...(input.ScpActionDefinition != null && {
1517
- ScpActionDefinition: se_ScpActionDefinition(input.ScpActionDefinition, context),
1518
- }),
1519
- ...(input.SsmActionDefinition != null && {
1520
- SsmActionDefinition: se_SsmActionDefinition(input.SsmActionDefinition, context),
1521
- }),
1522
- };
1523
- };
1524
- const se_DeleteBudgetActionRequest = (input, context) => {
1525
- return {
1526
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1527
- ...(input.ActionId != null && { ActionId: input.ActionId }),
1528
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1529
- };
1530
- };
1531
- const se_DeleteBudgetRequest = (input, context) => {
1532
- return {
1533
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1534
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1535
- };
1374
+ return take(input, {
1375
+ AccountId: [],
1376
+ BudgetName: [],
1377
+ Notification: (_) => se_Notification(_, context),
1378
+ Subscriber: _json,
1379
+ });
1536
1380
  };
1537
1381
  const se_DeleteNotificationRequest = (input, context) => {
1538
- return {
1539
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1540
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1541
- ...(input.Notification != null && { Notification: se_Notification(input.Notification, context) }),
1542
- };
1382
+ return take(input, {
1383
+ AccountId: [],
1384
+ BudgetName: [],
1385
+ Notification: (_) => se_Notification(_, context),
1386
+ });
1543
1387
  };
1544
1388
  const se_DeleteSubscriberRequest = (input, context) => {
1545
- return {
1546
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1547
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1548
- ...(input.Notification != null && { Notification: se_Notification(input.Notification, context) }),
1549
- ...(input.Subscriber != null && { Subscriber: se_Subscriber(input.Subscriber, context) }),
1550
- };
1389
+ return take(input, {
1390
+ AccountId: [],
1391
+ BudgetName: [],
1392
+ Notification: (_) => se_Notification(_, context),
1393
+ Subscriber: _json,
1394
+ });
1551
1395
  };
1552
1396
  const se_DescribeBudgetActionHistoriesRequest = (input, context) => {
1553
- return {
1554
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1555
- ...(input.ActionId != null && { ActionId: input.ActionId }),
1556
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1557
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1558
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1559
- ...(input.TimePeriod != null && { TimePeriod: se_TimePeriod(input.TimePeriod, context) }),
1560
- };
1561
- };
1562
- const se_DescribeBudgetActionRequest = (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
- };
1568
- };
1569
- const se_DescribeBudgetActionsForAccountRequest = (input, context) => {
1570
- return {
1571
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1572
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1573
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1574
- };
1575
- };
1576
- const se_DescribeBudgetActionsForBudgetRequest = (input, context) => {
1577
- return {
1578
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1579
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1580
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1581
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1582
- };
1583
- };
1584
- const se_DescribeBudgetNotificationsForAccountRequest = (input, context) => {
1585
- return {
1586
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1587
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1588
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1589
- };
1590
- };
1591
- const se_DescribeBudgetPerformanceHistoryRequest = (input, context) => {
1592
- return {
1593
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1594
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1595
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1596
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1597
- ...(input.TimePeriod != null && { TimePeriod: se_TimePeriod(input.TimePeriod, context) }),
1598
- };
1599
- };
1600
- const se_DescribeBudgetRequest = (input, context) => {
1601
- return {
1602
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1603
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1604
- };
1605
- };
1606
- const se_DescribeBudgetsRequest = (input, context) => {
1607
- return {
1608
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1609
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1610
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1611
- };
1612
- };
1613
- const se_DescribeNotificationsForBudgetRequest = (input, context) => {
1614
- return {
1615
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1616
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1617
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1618
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1619
- };
1620
- };
1621
- const se_DescribeSubscribersForNotificationRequest = (input, context) => {
1622
- return {
1623
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1624
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1625
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1626
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1627
- ...(input.Notification != null && { Notification: se_Notification(input.Notification, context) }),
1628
- };
1629
- };
1630
- const se_DimensionValues = (input, context) => {
1631
- return input
1632
- .filter((e) => e != null)
1633
- .map((entry) => {
1634
- return entry;
1397
+ return take(input, {
1398
+ AccountId: [],
1399
+ ActionId: [],
1400
+ BudgetName: [],
1401
+ MaxResults: [],
1402
+ NextToken: [],
1403
+ TimePeriod: (_) => se_TimePeriod(_, context),
1635
1404
  });
1636
1405
  };
1637
- const se_ExecuteBudgetActionRequest = (input, context) => {
1638
- return {
1639
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1640
- ...(input.ActionId != null && { ActionId: input.ActionId }),
1641
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1642
- ...(input.ExecutionType != null && { ExecutionType: input.ExecutionType }),
1643
- };
1644
- };
1645
- const se_Groups = (input, context) => {
1646
- return input
1647
- .filter((e) => e != null)
1648
- .map((entry) => {
1649
- return entry;
1406
+ const se_DescribeBudgetPerformanceHistoryRequest = (input, context) => {
1407
+ return take(input, {
1408
+ AccountId: [],
1409
+ BudgetName: [],
1410
+ MaxResults: [],
1411
+ NextToken: [],
1412
+ TimePeriod: (_) => se_TimePeriod(_, context),
1650
1413
  });
1651
1414
  };
1652
- const se_HistoricalOptions = (input, context) => {
1653
- return {
1654
- ...(input.BudgetAdjustmentPeriod != null && { BudgetAdjustmentPeriod: input.BudgetAdjustmentPeriod }),
1655
- ...(input.LookBackAvailablePeriods != null && { LookBackAvailablePeriods: input.LookBackAvailablePeriods }),
1656
- };
1657
- };
1658
- const se_IamActionDefinition = (input, context) => {
1659
- return {
1660
- ...(input.Groups != null && { Groups: se_Groups(input.Groups, context) }),
1661
- ...(input.PolicyArn != null && { PolicyArn: input.PolicyArn }),
1662
- ...(input.Roles != null && { Roles: se_Roles(input.Roles, context) }),
1663
- ...(input.Users != null && { Users: se_Users(input.Users, context) }),
1664
- };
1665
- };
1666
- const se_InstanceIds = (input, context) => {
1667
- return input
1668
- .filter((e) => e != null)
1669
- .map((entry) => {
1670
- return entry;
1415
+ const se_DescribeSubscribersForNotificationRequest = (input, context) => {
1416
+ return take(input, {
1417
+ AccountId: [],
1418
+ BudgetName: [],
1419
+ MaxResults: [],
1420
+ NextToken: [],
1421
+ Notification: (_) => se_Notification(_, context),
1671
1422
  });
1672
1423
  };
1673
1424
  const se_Notification = (input, context) => {
1674
- return {
1675
- ...(input.ComparisonOperator != null && { ComparisonOperator: input.ComparisonOperator }),
1676
- ...(input.NotificationState != null && { NotificationState: input.NotificationState }),
1677
- ...(input.NotificationType != null && { NotificationType: input.NotificationType }),
1678
- ...(input.Threshold != null && { Threshold: __serializeFloat(input.Threshold) }),
1679
- ...(input.ThresholdType != null && { ThresholdType: input.ThresholdType }),
1680
- };
1425
+ return take(input, {
1426
+ ComparisonOperator: [],
1427
+ NotificationState: [],
1428
+ NotificationType: [],
1429
+ Threshold: __serializeFloat,
1430
+ ThresholdType: [],
1431
+ });
1681
1432
  };
1682
1433
  const se_NotificationWithSubscribers = (input, context) => {
1683
- return {
1684
- ...(input.Notification != null && { Notification: se_Notification(input.Notification, context) }),
1685
- ...(input.Subscribers != null && { Subscribers: se_Subscribers(input.Subscribers, context) }),
1686
- };
1434
+ return take(input, {
1435
+ Notification: (_) => se_Notification(_, context),
1436
+ Subscribers: _json,
1437
+ });
1687
1438
  };
1688
1439
  const se_NotificationWithSubscribersList = (input, context) => {
1689
1440
  return input
@@ -1692,608 +1443,258 @@ const se_NotificationWithSubscribersList = (input, context) => {
1692
1443
  return se_NotificationWithSubscribers(entry, context);
1693
1444
  });
1694
1445
  };
1695
- const se_PlannedBudgetLimits = (input, context) => {
1696
- return Object.entries(input).reduce((acc, [key, value]) => {
1697
- if (value === null) {
1698
- return acc;
1699
- }
1700
- acc[key] = se_Spend(value, context);
1701
- return acc;
1702
- }, {});
1703
- };
1704
- const se_Roles = (input, context) => {
1705
- return input
1706
- .filter((e) => e != null)
1707
- .map((entry) => {
1708
- return entry;
1709
- });
1710
- };
1711
- const se_ScpActionDefinition = (input, context) => {
1712
- return {
1713
- ...(input.PolicyId != null && { PolicyId: input.PolicyId }),
1714
- ...(input.TargetIds != null && { TargetIds: se_TargetIds(input.TargetIds, context) }),
1715
- };
1716
- };
1717
- const se_Spend = (input, context) => {
1718
- return {
1719
- ...(input.Amount != null && { Amount: input.Amount }),
1720
- ...(input.Unit != null && { Unit: input.Unit }),
1721
- };
1722
- };
1723
- const se_SsmActionDefinition = (input, context) => {
1724
- return {
1725
- ...(input.ActionSubType != null && { ActionSubType: input.ActionSubType }),
1726
- ...(input.InstanceIds != null && { InstanceIds: se_InstanceIds(input.InstanceIds, context) }),
1727
- ...(input.Region != null && { Region: input.Region }),
1728
- };
1729
- };
1730
- const se_Subscriber = (input, context) => {
1731
- return {
1732
- ...(input.Address != null && { Address: input.Address }),
1733
- ...(input.SubscriptionType != null && { SubscriptionType: input.SubscriptionType }),
1734
- };
1735
- };
1736
- const se_Subscribers = (input, context) => {
1737
- return input
1738
- .filter((e) => e != null)
1739
- .map((entry) => {
1740
- return se_Subscriber(entry, context);
1741
- });
1742
- };
1743
- const se_TargetIds = (input, context) => {
1744
- return input
1745
- .filter((e) => e != null)
1746
- .map((entry) => {
1747
- return entry;
1748
- });
1749
- };
1750
1446
  const se_TimePeriod = (input, context) => {
1751
- return {
1752
- ...(input.End != null && { End: Math.round(input.End.getTime() / 1000) }),
1753
- ...(input.Start != null && { Start: Math.round(input.Start.getTime() / 1000) }),
1754
- };
1447
+ return take(input, {
1448
+ End: (_) => Math.round(_.getTime() / 1000),
1449
+ Start: (_) => Math.round(_.getTime() / 1000),
1450
+ });
1755
1451
  };
1756
1452
  const se_UpdateBudgetActionRequest = (input, context) => {
1757
- return {
1758
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1759
- ...(input.ActionId != null && { ActionId: input.ActionId }),
1760
- ...(input.ActionThreshold != null && { ActionThreshold: se_ActionThreshold(input.ActionThreshold, context) }),
1761
- ...(input.ApprovalModel != null && { ApprovalModel: input.ApprovalModel }),
1762
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1763
- ...(input.Definition != null && { Definition: se_Definition(input.Definition, context) }),
1764
- ...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }),
1765
- ...(input.NotificationType != null && { NotificationType: input.NotificationType }),
1766
- ...(input.Subscribers != null && { Subscribers: se_Subscribers(input.Subscribers, context) }),
1767
- };
1453
+ return take(input, {
1454
+ AccountId: [],
1455
+ ActionId: [],
1456
+ ActionThreshold: (_) => se_ActionThreshold(_, context),
1457
+ ApprovalModel: [],
1458
+ BudgetName: [],
1459
+ Definition: _json,
1460
+ ExecutionRoleArn: [],
1461
+ NotificationType: [],
1462
+ Subscribers: _json,
1463
+ });
1768
1464
  };
1769
1465
  const se_UpdateBudgetRequest = (input, context) => {
1770
- return {
1771
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1772
- ...(input.NewBudget != null && { NewBudget: se_Budget(input.NewBudget, context) }),
1773
- };
1466
+ return take(input, {
1467
+ AccountId: [],
1468
+ NewBudget: (_) => se_Budget(_, context),
1469
+ });
1774
1470
  };
1775
1471
  const se_UpdateNotificationRequest = (input, context) => {
1776
- return {
1777
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1778
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1779
- ...(input.NewNotification != null && { NewNotification: se_Notification(input.NewNotification, context) }),
1780
- ...(input.OldNotification != null && { OldNotification: se_Notification(input.OldNotification, context) }),
1781
- };
1472
+ return take(input, {
1473
+ AccountId: [],
1474
+ BudgetName: [],
1475
+ NewNotification: (_) => se_Notification(_, context),
1476
+ OldNotification: (_) => se_Notification(_, context),
1477
+ });
1782
1478
  };
1783
1479
  const se_UpdateSubscriberRequest = (input, context) => {
1784
- return {
1785
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1786
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1787
- ...(input.NewSubscriber != null && { NewSubscriber: se_Subscriber(input.NewSubscriber, context) }),
1788
- ...(input.Notification != null && { Notification: se_Notification(input.Notification, context) }),
1789
- ...(input.OldSubscriber != null && { OldSubscriber: se_Subscriber(input.OldSubscriber, context) }),
1790
- };
1791
- };
1792
- const se_Users = (input, context) => {
1793
- return input
1794
- .filter((e) => e != null)
1795
- .map((entry) => {
1796
- return entry;
1480
+ return take(input, {
1481
+ AccountId: [],
1482
+ BudgetName: [],
1483
+ NewSubscriber: _json,
1484
+ Notification: (_) => se_Notification(_, context),
1485
+ OldSubscriber: _json,
1797
1486
  });
1798
1487
  };
1799
- const de_AccessDeniedException = (output, context) => {
1800
- return {
1801
- Message: __expectString(output.Message),
1802
- };
1803
- };
1804
1488
  const de_Action = (output, context) => {
1805
- return {
1806
- ActionId: __expectString(output.ActionId),
1807
- ActionThreshold: output.ActionThreshold != null ? de_ActionThreshold(output.ActionThreshold, context) : undefined,
1808
- ActionType: __expectString(output.ActionType),
1809
- ApprovalModel: __expectString(output.ApprovalModel),
1810
- BudgetName: __expectString(output.BudgetName),
1811
- Definition: output.Definition != null ? de_Definition(output.Definition, context) : undefined,
1812
- ExecutionRoleArn: __expectString(output.ExecutionRoleArn),
1813
- NotificationType: __expectString(output.NotificationType),
1814
- Status: __expectString(output.Status),
1815
- Subscribers: output.Subscribers != null ? de_Subscribers(output.Subscribers, context) : undefined,
1816
- };
1489
+ return take(output, {
1490
+ ActionId: __expectString,
1491
+ ActionThreshold: (_) => de_ActionThreshold(_, context),
1492
+ ActionType: __expectString,
1493
+ ApprovalModel: __expectString,
1494
+ BudgetName: __expectString,
1495
+ Definition: _json,
1496
+ ExecutionRoleArn: __expectString,
1497
+ NotificationType: __expectString,
1498
+ Status: __expectString,
1499
+ Subscribers: _json,
1500
+ });
1817
1501
  };
1818
1502
  const de_ActionHistories = (output, context) => {
1819
1503
  const retVal = (output || [])
1820
1504
  .filter((e) => e != null)
1821
1505
  .map((entry) => {
1822
- if (entry === null) {
1823
- return null;
1824
- }
1825
1506
  return de_ActionHistory(entry, context);
1826
1507
  });
1827
1508
  return retVal;
1828
1509
  };
1829
1510
  const de_ActionHistory = (output, context) => {
1830
- return {
1831
- ActionHistoryDetails: output.ActionHistoryDetails != null ? de_ActionHistoryDetails(output.ActionHistoryDetails, context) : undefined,
1832
- EventType: __expectString(output.EventType),
1833
- Status: __expectString(output.Status),
1834
- Timestamp: output.Timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) : undefined,
1835
- };
1511
+ return take(output, {
1512
+ ActionHistoryDetails: (_) => de_ActionHistoryDetails(_, context),
1513
+ EventType: __expectString,
1514
+ Status: __expectString,
1515
+ Timestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1516
+ });
1836
1517
  };
1837
1518
  const de_ActionHistoryDetails = (output, context) => {
1838
- return {
1839
- Action: output.Action != null ? de_Action(output.Action, context) : undefined,
1840
- Message: __expectString(output.Message),
1841
- };
1519
+ return take(output, {
1520
+ Action: (_) => de_Action(_, context),
1521
+ Message: __expectString,
1522
+ });
1842
1523
  };
1843
1524
  const de_Actions = (output, context) => {
1844
1525
  const retVal = (output || [])
1845
1526
  .filter((e) => e != null)
1846
1527
  .map((entry) => {
1847
- if (entry === null) {
1848
- return null;
1849
- }
1850
1528
  return de_Action(entry, context);
1851
1529
  });
1852
1530
  return retVal;
1853
1531
  };
1854
1532
  const de_ActionThreshold = (output, context) => {
1855
- return {
1856
- ActionThresholdType: __expectString(output.ActionThresholdType),
1857
- ActionThresholdValue: __limitedParseDouble(output.ActionThresholdValue),
1858
- };
1533
+ return take(output, {
1534
+ ActionThresholdType: __expectString,
1535
+ ActionThresholdValue: __limitedParseDouble,
1536
+ });
1859
1537
  };
1860
1538
  const de_AutoAdjustData = (output, context) => {
1861
- return {
1862
- AutoAdjustType: __expectString(output.AutoAdjustType),
1863
- HistoricalOptions: output.HistoricalOptions != null ? de_HistoricalOptions(output.HistoricalOptions, context) : undefined,
1864
- LastAutoAdjustTime: output.LastAutoAdjustTime != null
1865
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAutoAdjustTime)))
1866
- : undefined,
1867
- };
1539
+ return take(output, {
1540
+ AutoAdjustType: __expectString,
1541
+ HistoricalOptions: _json,
1542
+ LastAutoAdjustTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1543
+ });
1868
1544
  };
1869
1545
  const de_Budget = (output, context) => {
1870
- return {
1871
- AutoAdjustData: output.AutoAdjustData != null ? de_AutoAdjustData(output.AutoAdjustData, context) : undefined,
1872
- BudgetLimit: output.BudgetLimit != null ? de_Spend(output.BudgetLimit, context) : undefined,
1873
- BudgetName: __expectString(output.BudgetName),
1874
- BudgetType: __expectString(output.BudgetType),
1875
- CalculatedSpend: output.CalculatedSpend != null ? de_CalculatedSpend(output.CalculatedSpend, context) : undefined,
1876
- CostFilters: output.CostFilters != null ? de_CostFilters(output.CostFilters, context) : undefined,
1877
- CostTypes: output.CostTypes != null ? de_CostTypes(output.CostTypes, context) : undefined,
1878
- LastUpdatedTime: output.LastUpdatedTime != null
1879
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime)))
1880
- : undefined,
1881
- PlannedBudgetLimits: output.PlannedBudgetLimits != null ? de_PlannedBudgetLimits(output.PlannedBudgetLimits, context) : undefined,
1882
- TimePeriod: output.TimePeriod != null ? de_TimePeriod(output.TimePeriod, context) : undefined,
1883
- TimeUnit: __expectString(output.TimeUnit),
1884
- };
1546
+ return take(output, {
1547
+ AutoAdjustData: (_) => de_AutoAdjustData(_, context),
1548
+ BudgetLimit: _json,
1549
+ BudgetName: __expectString,
1550
+ BudgetType: __expectString,
1551
+ CalculatedSpend: _json,
1552
+ CostFilters: _json,
1553
+ CostTypes: _json,
1554
+ LastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1555
+ PlannedBudgetLimits: _json,
1556
+ TimePeriod: (_) => de_TimePeriod(_, context),
1557
+ TimeUnit: __expectString,
1558
+ });
1885
1559
  };
1886
1560
  const de_BudgetedAndActualAmounts = (output, context) => {
1887
- return {
1888
- ActualAmount: output.ActualAmount != null ? de_Spend(output.ActualAmount, context) : undefined,
1889
- BudgetedAmount: output.BudgetedAmount != null ? de_Spend(output.BudgetedAmount, context) : undefined,
1890
- TimePeriod: output.TimePeriod != null ? de_TimePeriod(output.TimePeriod, context) : undefined,
1891
- };
1561
+ return take(output, {
1562
+ ActualAmount: _json,
1563
+ BudgetedAmount: _json,
1564
+ TimePeriod: (_) => de_TimePeriod(_, context),
1565
+ });
1892
1566
  };
1893
1567
  const de_BudgetedAndActualAmountsList = (output, context) => {
1894
1568
  const retVal = (output || [])
1895
1569
  .filter((e) => e != null)
1896
1570
  .map((entry) => {
1897
- if (entry === null) {
1898
- return null;
1899
- }
1900
1571
  return de_BudgetedAndActualAmounts(entry, context);
1901
1572
  });
1902
1573
  return retVal;
1903
1574
  };
1904
1575
  const de_BudgetNotificationsForAccount = (output, context) => {
1905
- return {
1906
- BudgetName: __expectString(output.BudgetName),
1907
- Notifications: output.Notifications != null ? de_Notifications(output.Notifications, context) : undefined,
1908
- };
1576
+ return take(output, {
1577
+ BudgetName: __expectString,
1578
+ Notifications: (_) => de_Notifications(_, context),
1579
+ });
1909
1580
  };
1910
1581
  const de_BudgetNotificationsForAccountList = (output, context) => {
1911
1582
  const retVal = (output || [])
1912
1583
  .filter((e) => e != null)
1913
1584
  .map((entry) => {
1914
- if (entry === null) {
1915
- return null;
1916
- }
1917
1585
  return de_BudgetNotificationsForAccount(entry, context);
1918
1586
  });
1919
1587
  return retVal;
1920
1588
  };
1921
1589
  const de_BudgetPerformanceHistory = (output, context) => {
1922
- return {
1923
- BudgetName: __expectString(output.BudgetName),
1924
- BudgetType: __expectString(output.BudgetType),
1925
- BudgetedAndActualAmountsList: output.BudgetedAndActualAmountsList != null
1926
- ? de_BudgetedAndActualAmountsList(output.BudgetedAndActualAmountsList, context)
1927
- : undefined,
1928
- CostFilters: output.CostFilters != null ? de_CostFilters(output.CostFilters, context) : undefined,
1929
- CostTypes: output.CostTypes != null ? de_CostTypes(output.CostTypes, context) : undefined,
1930
- TimeUnit: __expectString(output.TimeUnit),
1931
- };
1590
+ return take(output, {
1591
+ BudgetName: __expectString,
1592
+ BudgetType: __expectString,
1593
+ BudgetedAndActualAmountsList: (_) => de_BudgetedAndActualAmountsList(_, context),
1594
+ CostFilters: _json,
1595
+ CostTypes: _json,
1596
+ TimeUnit: __expectString,
1597
+ });
1932
1598
  };
1933
1599
  const de_Budgets = (output, context) => {
1934
1600
  const retVal = (output || [])
1935
1601
  .filter((e) => e != null)
1936
1602
  .map((entry) => {
1937
- if (entry === null) {
1938
- return null;
1939
- }
1940
1603
  return de_Budget(entry, context);
1941
1604
  });
1942
1605
  return retVal;
1943
1606
  };
1944
- const de_CalculatedSpend = (output, context) => {
1945
- return {
1946
- ActualSpend: output.ActualSpend != null ? de_Spend(output.ActualSpend, context) : undefined,
1947
- ForecastedSpend: output.ForecastedSpend != null ? de_Spend(output.ForecastedSpend, context) : undefined,
1948
- };
1949
- };
1950
- const de_CostFilters = (output, context) => {
1951
- return Object.entries(output).reduce((acc, [key, value]) => {
1952
- if (value === null) {
1953
- return acc;
1954
- }
1955
- acc[key] = de_DimensionValues(value, context);
1956
- return acc;
1957
- }, {});
1958
- };
1959
- const de_CostTypes = (output, context) => {
1960
- return {
1961
- IncludeCredit: __expectBoolean(output.IncludeCredit),
1962
- IncludeDiscount: __expectBoolean(output.IncludeDiscount),
1963
- IncludeOtherSubscription: __expectBoolean(output.IncludeOtherSubscription),
1964
- IncludeRecurring: __expectBoolean(output.IncludeRecurring),
1965
- IncludeRefund: __expectBoolean(output.IncludeRefund),
1966
- IncludeSubscription: __expectBoolean(output.IncludeSubscription),
1967
- IncludeSupport: __expectBoolean(output.IncludeSupport),
1968
- IncludeTax: __expectBoolean(output.IncludeTax),
1969
- IncludeUpfront: __expectBoolean(output.IncludeUpfront),
1970
- UseAmortized: __expectBoolean(output.UseAmortized),
1971
- UseBlended: __expectBoolean(output.UseBlended),
1972
- };
1973
- };
1974
- const de_CreateBudgetActionResponse = (output, context) => {
1975
- return {
1976
- AccountId: __expectString(output.AccountId),
1977
- ActionId: __expectString(output.ActionId),
1978
- BudgetName: __expectString(output.BudgetName),
1979
- };
1980
- };
1981
- const de_CreateBudgetResponse = (output, context) => {
1982
- return {};
1983
- };
1984
- const de_CreateNotificationResponse = (output, context) => {
1985
- return {};
1986
- };
1987
- const de_CreateSubscriberResponse = (output, context) => {
1988
- return {};
1989
- };
1990
- const de_CreationLimitExceededException = (output, context) => {
1991
- return {
1992
- Message: __expectString(output.Message),
1993
- };
1994
- };
1995
- const de_Definition = (output, context) => {
1996
- return {
1997
- IamActionDefinition: output.IamActionDefinition != null ? de_IamActionDefinition(output.IamActionDefinition, context) : undefined,
1998
- ScpActionDefinition: output.ScpActionDefinition != null ? de_ScpActionDefinition(output.ScpActionDefinition, context) : undefined,
1999
- SsmActionDefinition: output.SsmActionDefinition != null ? de_SsmActionDefinition(output.SsmActionDefinition, context) : undefined,
2000
- };
2001
- };
2002
1607
  const de_DeleteBudgetActionResponse = (output, context) => {
2003
- return {
2004
- AccountId: __expectString(output.AccountId),
2005
- Action: output.Action != null ? de_Action(output.Action, context) : undefined,
2006
- BudgetName: __expectString(output.BudgetName),
2007
- };
2008
- };
2009
- const de_DeleteBudgetResponse = (output, context) => {
2010
- return {};
2011
- };
2012
- const de_DeleteNotificationResponse = (output, context) => {
2013
- return {};
2014
- };
2015
- const de_DeleteSubscriberResponse = (output, context) => {
2016
- return {};
1608
+ return take(output, {
1609
+ AccountId: __expectString,
1610
+ Action: (_) => de_Action(_, context),
1611
+ BudgetName: __expectString,
1612
+ });
2017
1613
  };
2018
1614
  const de_DescribeBudgetActionHistoriesResponse = (output, context) => {
2019
- return {
2020
- ActionHistories: output.ActionHistories != null ? de_ActionHistories(output.ActionHistories, context) : undefined,
2021
- NextToken: __expectString(output.NextToken),
2022
- };
1615
+ return take(output, {
1616
+ ActionHistories: (_) => de_ActionHistories(_, context),
1617
+ NextToken: __expectString,
1618
+ });
2023
1619
  };
2024
1620
  const de_DescribeBudgetActionResponse = (output, context) => {
2025
- return {
2026
- AccountId: __expectString(output.AccountId),
2027
- Action: output.Action != null ? de_Action(output.Action, context) : undefined,
2028
- BudgetName: __expectString(output.BudgetName),
2029
- };
1621
+ return take(output, {
1622
+ AccountId: __expectString,
1623
+ Action: (_) => de_Action(_, context),
1624
+ BudgetName: __expectString,
1625
+ });
2030
1626
  };
2031
1627
  const de_DescribeBudgetActionsForAccountResponse = (output, context) => {
2032
- return {
2033
- Actions: output.Actions != null ? de_Actions(output.Actions, context) : undefined,
2034
- NextToken: __expectString(output.NextToken),
2035
- };
1628
+ return take(output, {
1629
+ Actions: (_) => de_Actions(_, context),
1630
+ NextToken: __expectString,
1631
+ });
2036
1632
  };
2037
1633
  const de_DescribeBudgetActionsForBudgetResponse = (output, context) => {
2038
- return {
2039
- Actions: output.Actions != null ? de_Actions(output.Actions, context) : undefined,
2040
- NextToken: __expectString(output.NextToken),
2041
- };
1634
+ return take(output, {
1635
+ Actions: (_) => de_Actions(_, context),
1636
+ NextToken: __expectString,
1637
+ });
2042
1638
  };
2043
1639
  const de_DescribeBudgetNotificationsForAccountResponse = (output, context) => {
2044
- return {
2045
- BudgetNotificationsForAccount: output.BudgetNotificationsForAccount != null
2046
- ? de_BudgetNotificationsForAccountList(output.BudgetNotificationsForAccount, context)
2047
- : undefined,
2048
- NextToken: __expectString(output.NextToken),
2049
- };
1640
+ return take(output, {
1641
+ BudgetNotificationsForAccount: (_) => de_BudgetNotificationsForAccountList(_, context),
1642
+ NextToken: __expectString,
1643
+ });
2050
1644
  };
2051
1645
  const de_DescribeBudgetPerformanceHistoryResponse = (output, context) => {
2052
- return {
2053
- BudgetPerformanceHistory: output.BudgetPerformanceHistory != null
2054
- ? de_BudgetPerformanceHistory(output.BudgetPerformanceHistory, context)
2055
- : undefined,
2056
- NextToken: __expectString(output.NextToken),
2057
- };
1646
+ return take(output, {
1647
+ BudgetPerformanceHistory: (_) => de_BudgetPerformanceHistory(_, context),
1648
+ NextToken: __expectString,
1649
+ });
2058
1650
  };
2059
1651
  const de_DescribeBudgetResponse = (output, context) => {
2060
- return {
2061
- Budget: output.Budget != null ? de_Budget(output.Budget, context) : undefined,
2062
- };
2063
- };
2064
- const de_DescribeBudgetsResponse = (output, context) => {
2065
- return {
2066
- Budgets: output.Budgets != null ? de_Budgets(output.Budgets, context) : undefined,
2067
- NextToken: __expectString(output.NextToken),
2068
- };
2069
- };
2070
- const de_DescribeNotificationsForBudgetResponse = (output, context) => {
2071
- return {
2072
- NextToken: __expectString(output.NextToken),
2073
- Notifications: output.Notifications != null ? de_Notifications(output.Notifications, context) : undefined,
2074
- };
2075
- };
2076
- const de_DescribeSubscribersForNotificationResponse = (output, context) => {
2077
- return {
2078
- NextToken: __expectString(output.NextToken),
2079
- Subscribers: output.Subscribers != null ? de_Subscribers(output.Subscribers, context) : undefined,
2080
- };
2081
- };
2082
- const de_DimensionValues = (output, context) => {
2083
- const retVal = (output || [])
2084
- .filter((e) => e != null)
2085
- .map((entry) => {
2086
- if (entry === null) {
2087
- return null;
2088
- }
2089
- return __expectString(entry);
1652
+ return take(output, {
1653
+ Budget: (_) => de_Budget(_, context),
2090
1654
  });
2091
- return retVal;
2092
- };
2093
- const de_DuplicateRecordException = (output, context) => {
2094
- return {
2095
- Message: __expectString(output.Message),
2096
- };
2097
1655
  };
2098
- const de_ExecuteBudgetActionResponse = (output, context) => {
2099
- return {
2100
- AccountId: __expectString(output.AccountId),
2101
- ActionId: __expectString(output.ActionId),
2102
- BudgetName: __expectString(output.BudgetName),
2103
- ExecutionType: __expectString(output.ExecutionType),
2104
- };
2105
- };
2106
- const de_ExpiredNextTokenException = (output, context) => {
2107
- return {
2108
- Message: __expectString(output.Message),
2109
- };
2110
- };
2111
- const de_Groups = (output, context) => {
2112
- const retVal = (output || [])
2113
- .filter((e) => e != null)
2114
- .map((entry) => {
2115
- if (entry === null) {
2116
- return null;
2117
- }
2118
- return __expectString(entry);
1656
+ const de_DescribeBudgetsResponse = (output, context) => {
1657
+ return take(output, {
1658
+ Budgets: (_) => de_Budgets(_, context),
1659
+ NextToken: __expectString,
2119
1660
  });
2120
- return retVal;
2121
1661
  };
2122
- const de_HistoricalOptions = (output, context) => {
2123
- return {
2124
- BudgetAdjustmentPeriod: __expectInt32(output.BudgetAdjustmentPeriod),
2125
- LookBackAvailablePeriods: __expectInt32(output.LookBackAvailablePeriods),
2126
- };
2127
- };
2128
- const de_IamActionDefinition = (output, context) => {
2129
- return {
2130
- Groups: output.Groups != null ? de_Groups(output.Groups, context) : undefined,
2131
- PolicyArn: __expectString(output.PolicyArn),
2132
- Roles: output.Roles != null ? de_Roles(output.Roles, context) : undefined,
2133
- Users: output.Users != null ? de_Users(output.Users, context) : undefined,
2134
- };
2135
- };
2136
- const de_InstanceIds = (output, context) => {
2137
- const retVal = (output || [])
2138
- .filter((e) => e != null)
2139
- .map((entry) => {
2140
- if (entry === null) {
2141
- return null;
2142
- }
2143
- return __expectString(entry);
1662
+ const de_DescribeNotificationsForBudgetResponse = (output, context) => {
1663
+ return take(output, {
1664
+ NextToken: __expectString,
1665
+ Notifications: (_) => de_Notifications(_, context),
2144
1666
  });
2145
- return retVal;
2146
- };
2147
- const de_InternalErrorException = (output, context) => {
2148
- return {
2149
- Message: __expectString(output.Message),
2150
- };
2151
- };
2152
- const de_InvalidNextTokenException = (output, context) => {
2153
- return {
2154
- Message: __expectString(output.Message),
2155
- };
2156
- };
2157
- const de_InvalidParameterException = (output, context) => {
2158
- return {
2159
- Message: __expectString(output.Message),
2160
- };
2161
- };
2162
- const de_NotFoundException = (output, context) => {
2163
- return {
2164
- Message: __expectString(output.Message),
2165
- };
2166
1667
  };
2167
1668
  const de_Notification = (output, context) => {
2168
- return {
2169
- ComparisonOperator: __expectString(output.ComparisonOperator),
2170
- NotificationState: __expectString(output.NotificationState),
2171
- NotificationType: __expectString(output.NotificationType),
2172
- Threshold: __limitedParseDouble(output.Threshold),
2173
- ThresholdType: __expectString(output.ThresholdType),
2174
- };
1669
+ return take(output, {
1670
+ ComparisonOperator: __expectString,
1671
+ NotificationState: __expectString,
1672
+ NotificationType: __expectString,
1673
+ Threshold: __limitedParseDouble,
1674
+ ThresholdType: __expectString,
1675
+ });
2175
1676
  };
2176
1677
  const de_Notifications = (output, context) => {
2177
1678
  const retVal = (output || [])
2178
1679
  .filter((e) => e != null)
2179
1680
  .map((entry) => {
2180
- if (entry === null) {
2181
- return null;
2182
- }
2183
1681
  return de_Notification(entry, context);
2184
1682
  });
2185
1683
  return retVal;
2186
1684
  };
2187
- const de_PlannedBudgetLimits = (output, context) => {
2188
- return Object.entries(output).reduce((acc, [key, value]) => {
2189
- if (value === null) {
2190
- return acc;
2191
- }
2192
- acc[key] = de_Spend(value, context);
2193
- return acc;
2194
- }, {});
2195
- };
2196
- const de_ResourceLockedException = (output, context) => {
2197
- return {
2198
- Message: __expectString(output.Message),
2199
- };
2200
- };
2201
- const de_Roles = (output, context) => {
2202
- const retVal = (output || [])
2203
- .filter((e) => e != null)
2204
- .map((entry) => {
2205
- if (entry === null) {
2206
- return null;
2207
- }
2208
- return __expectString(entry);
2209
- });
2210
- return retVal;
2211
- };
2212
- const de_ScpActionDefinition = (output, context) => {
2213
- return {
2214
- PolicyId: __expectString(output.PolicyId),
2215
- TargetIds: output.TargetIds != null ? de_TargetIds(output.TargetIds, context) : undefined,
2216
- };
2217
- };
2218
- const de_Spend = (output, context) => {
2219
- return {
2220
- Amount: __expectString(output.Amount),
2221
- Unit: __expectString(output.Unit),
2222
- };
2223
- };
2224
- const de_SsmActionDefinition = (output, context) => {
2225
- return {
2226
- ActionSubType: __expectString(output.ActionSubType),
2227
- InstanceIds: output.InstanceIds != null ? de_InstanceIds(output.InstanceIds, context) : undefined,
2228
- Region: __expectString(output.Region),
2229
- };
2230
- };
2231
- const de_Subscriber = (output, context) => {
2232
- return {
2233
- Address: __expectString(output.Address),
2234
- SubscriptionType: __expectString(output.SubscriptionType),
2235
- };
2236
- };
2237
- const de_Subscribers = (output, context) => {
2238
- const retVal = (output || [])
2239
- .filter((e) => e != null)
2240
- .map((entry) => {
2241
- if (entry === null) {
2242
- return null;
2243
- }
2244
- return de_Subscriber(entry, context);
2245
- });
2246
- return retVal;
2247
- };
2248
- const de_TargetIds = (output, context) => {
2249
- const retVal = (output || [])
2250
- .filter((e) => e != null)
2251
- .map((entry) => {
2252
- if (entry === null) {
2253
- return null;
2254
- }
2255
- return __expectString(entry);
2256
- });
2257
- return retVal;
2258
- };
2259
- const de_ThrottlingException = (output, context) => {
2260
- return {
2261
- Message: __expectString(output.Message),
2262
- };
2263
- };
2264
1685
  const de_TimePeriod = (output, context) => {
2265
- return {
2266
- End: output.End != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.End))) : undefined,
2267
- Start: output.Start != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Start))) : undefined,
2268
- };
1686
+ return take(output, {
1687
+ End: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1688
+ Start: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1689
+ });
2269
1690
  };
2270
1691
  const de_UpdateBudgetActionResponse = (output, context) => {
2271
- return {
2272
- AccountId: __expectString(output.AccountId),
2273
- BudgetName: __expectString(output.BudgetName),
2274
- NewAction: output.NewAction != null ? de_Action(output.NewAction, context) : undefined,
2275
- OldAction: output.OldAction != null ? de_Action(output.OldAction, context) : undefined,
2276
- };
2277
- };
2278
- const de_UpdateBudgetResponse = (output, context) => {
2279
- return {};
2280
- };
2281
- const de_UpdateNotificationResponse = (output, context) => {
2282
- return {};
2283
- };
2284
- const de_UpdateSubscriberResponse = (output, context) => {
2285
- return {};
2286
- };
2287
- const de_Users = (output, context) => {
2288
- const retVal = (output || [])
2289
- .filter((e) => e != null)
2290
- .map((entry) => {
2291
- if (entry === null) {
2292
- return null;
2293
- }
2294
- return __expectString(entry);
1692
+ return take(output, {
1693
+ AccountId: __expectString,
1694
+ BudgetName: __expectString,
1695
+ NewAction: (_) => de_Action(_, context),
1696
+ OldAction: (_) => de_Action(_, context),
2295
1697
  });
2296
- return retVal;
2297
1698
  };
2298
1699
  const deserializeMetadata = (output) => ({
2299
1700
  httpStatusCode: output.statusCode,
@@ -2308,6 +1709,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
2308
1709
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2309
1710
  };
2310
1711
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1712
+ const throwDefaultError = withBaseException(__BaseException);
2311
1713
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2312
1714
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2313
1715
  const contents = {
@@ -2326,6 +1728,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
2326
1728
  }
2327
1729
  return new __HttpRequest(contents);
2328
1730
  };
1731
+ function sharedHeaders(operation) {
1732
+ return {
1733
+ "content-type": "application/x-amz-json-1.1",
1734
+ "x-amz-target": `AWSBudgetServiceGateway.${operation}`,
1735
+ };
1736
+ }
2329
1737
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2330
1738
  if (encoded.length) {
2331
1739
  return JSON.parse(encoded);