@aws-sdk/client-budgets 3.312.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.
@@ -36,14 +36,14 @@ exports.se_CreateSubscriberCommand = se_CreateSubscriberCommand;
36
36
  const se_DeleteBudgetCommand = async (input, context) => {
37
37
  const headers = sharedHeaders("DeleteBudget");
38
38
  let body;
39
- body = JSON.stringify(se_DeleteBudgetRequest(input, context));
39
+ body = JSON.stringify((0, smithy_client_1._json)(input));
40
40
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
41
  };
42
42
  exports.se_DeleteBudgetCommand = se_DeleteBudgetCommand;
43
43
  const se_DeleteBudgetActionCommand = async (input, context) => {
44
44
  const headers = sharedHeaders("DeleteBudgetAction");
45
45
  let body;
46
- body = JSON.stringify(se_DeleteBudgetActionRequest(input, context));
46
+ body = JSON.stringify((0, smithy_client_1._json)(input));
47
47
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
48
48
  };
49
49
  exports.se_DeleteBudgetActionCommand = se_DeleteBudgetActionCommand;
@@ -64,14 +64,14 @@ exports.se_DeleteSubscriberCommand = se_DeleteSubscriberCommand;
64
64
  const se_DescribeBudgetCommand = async (input, context) => {
65
65
  const headers = sharedHeaders("DescribeBudget");
66
66
  let body;
67
- body = JSON.stringify(se_DescribeBudgetRequest(input, context));
67
+ body = JSON.stringify((0, smithy_client_1._json)(input));
68
68
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
69
69
  };
70
70
  exports.se_DescribeBudgetCommand = se_DescribeBudgetCommand;
71
71
  const se_DescribeBudgetActionCommand = async (input, context) => {
72
72
  const headers = sharedHeaders("DescribeBudgetAction");
73
73
  let body;
74
- body = JSON.stringify(se_DescribeBudgetActionRequest(input, context));
74
+ body = JSON.stringify((0, smithy_client_1._json)(input));
75
75
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
76
  };
77
77
  exports.se_DescribeBudgetActionCommand = se_DescribeBudgetActionCommand;
@@ -85,21 +85,21 @@ exports.se_DescribeBudgetActionHistoriesCommand = se_DescribeBudgetActionHistori
85
85
  const se_DescribeBudgetActionsForAccountCommand = async (input, context) => {
86
86
  const headers = sharedHeaders("DescribeBudgetActionsForAccount");
87
87
  let body;
88
- body = JSON.stringify(se_DescribeBudgetActionsForAccountRequest(input, context));
88
+ body = JSON.stringify((0, smithy_client_1._json)(input));
89
89
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
90
90
  };
91
91
  exports.se_DescribeBudgetActionsForAccountCommand = se_DescribeBudgetActionsForAccountCommand;
92
92
  const se_DescribeBudgetActionsForBudgetCommand = async (input, context) => {
93
93
  const headers = sharedHeaders("DescribeBudgetActionsForBudget");
94
94
  let body;
95
- body = JSON.stringify(se_DescribeBudgetActionsForBudgetRequest(input, context));
95
+ body = JSON.stringify((0, smithy_client_1._json)(input));
96
96
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
97
97
  };
98
98
  exports.se_DescribeBudgetActionsForBudgetCommand = se_DescribeBudgetActionsForBudgetCommand;
99
99
  const se_DescribeBudgetNotificationsForAccountCommand = async (input, context) => {
100
100
  const headers = sharedHeaders("DescribeBudgetNotificationsForAccount");
101
101
  let body;
102
- body = JSON.stringify(se_DescribeBudgetNotificationsForAccountRequest(input, context));
102
+ body = JSON.stringify((0, smithy_client_1._json)(input));
103
103
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
104
104
  };
105
105
  exports.se_DescribeBudgetNotificationsForAccountCommand = se_DescribeBudgetNotificationsForAccountCommand;
@@ -113,14 +113,14 @@ exports.se_DescribeBudgetPerformanceHistoryCommand = se_DescribeBudgetPerformanc
113
113
  const se_DescribeBudgetsCommand = async (input, context) => {
114
114
  const headers = sharedHeaders("DescribeBudgets");
115
115
  let body;
116
- body = JSON.stringify(se_DescribeBudgetsRequest(input, context));
116
+ body = JSON.stringify((0, smithy_client_1._json)(input));
117
117
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
118
118
  };
119
119
  exports.se_DescribeBudgetsCommand = se_DescribeBudgetsCommand;
120
120
  const se_DescribeNotificationsForBudgetCommand = async (input, context) => {
121
121
  const headers = sharedHeaders("DescribeNotificationsForBudget");
122
122
  let body;
123
- body = JSON.stringify(se_DescribeNotificationsForBudgetRequest(input, context));
123
+ body = JSON.stringify((0, smithy_client_1._json)(input));
124
124
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
125
125
  };
126
126
  exports.se_DescribeNotificationsForBudgetCommand = se_DescribeNotificationsForBudgetCommand;
@@ -134,7 +134,7 @@ exports.se_DescribeSubscribersForNotificationCommand = se_DescribeSubscribersFor
134
134
  const se_ExecuteBudgetActionCommand = async (input, context) => {
135
135
  const headers = sharedHeaders("ExecuteBudgetAction");
136
136
  let body;
137
- body = JSON.stringify(se_ExecuteBudgetActionRequest(input, context));
137
+ body = JSON.stringify((0, smithy_client_1._json)(input));
138
138
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
139
139
  };
140
140
  exports.se_ExecuteBudgetActionCommand = se_ExecuteBudgetActionCommand;
@@ -172,12 +172,12 @@ const de_CreateBudgetCommand = async (output, context) => {
172
172
  }
173
173
  const data = await parseBody(output.body, context);
174
174
  let contents = {};
175
- contents = de_CreateBudgetResponse(data, context);
175
+ contents = (0, smithy_client_1._json)(data);
176
176
  const response = {
177
177
  $metadata: deserializeMetadata(output),
178
178
  ...contents,
179
179
  };
180
- return Promise.resolve(response);
180
+ return response;
181
181
  };
182
182
  exports.de_CreateBudgetCommand = de_CreateBudgetCommand;
183
183
  const de_CreateBudgetCommandError = async (output, context) => {
@@ -207,10 +207,9 @@ const de_CreateBudgetCommandError = async (output, context) => {
207
207
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
208
208
  default:
209
209
  const parsedBody = parsedOutput.body;
210
- (0, smithy_client_1.throwDefaultError)({
210
+ return throwDefaultError({
211
211
  output,
212
212
  parsedBody,
213
- exceptionCtor: BudgetsServiceException_1.BudgetsServiceException,
214
213
  errorCode,
215
214
  });
216
215
  }
@@ -221,12 +220,12 @@ const de_CreateBudgetActionCommand = async (output, context) => {
221
220
  }
222
221
  const data = await parseBody(output.body, context);
223
222
  let contents = {};
224
- contents = de_CreateBudgetActionResponse(data, context);
223
+ contents = (0, smithy_client_1._json)(data);
225
224
  const response = {
226
225
  $metadata: deserializeMetadata(output),
227
226
  ...contents,
228
227
  };
229
- return Promise.resolve(response);
228
+ return response;
230
229
  };
231
230
  exports.de_CreateBudgetActionCommand = de_CreateBudgetActionCommand;
232
231
  const de_CreateBudgetActionCommandError = async (output, context) => {
@@ -259,10 +258,9 @@ const de_CreateBudgetActionCommandError = async (output, context) => {
259
258
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
260
259
  default:
261
260
  const parsedBody = parsedOutput.body;
262
- (0, smithy_client_1.throwDefaultError)({
261
+ return throwDefaultError({
263
262
  output,
264
263
  parsedBody,
265
- exceptionCtor: BudgetsServiceException_1.BudgetsServiceException,
266
264
  errorCode,
267
265
  });
268
266
  }
@@ -273,12 +271,12 @@ const de_CreateNotificationCommand = async (output, context) => {
273
271
  }
274
272
  const data = await parseBody(output.body, context);
275
273
  let contents = {};
276
- contents = de_CreateNotificationResponse(data, context);
274
+ contents = (0, smithy_client_1._json)(data);
277
275
  const response = {
278
276
  $metadata: deserializeMetadata(output),
279
277
  ...contents,
280
278
  };
281
- return Promise.resolve(response);
279
+ return response;
282
280
  };
283
281
  exports.de_CreateNotificationCommand = de_CreateNotificationCommand;
284
282
  const de_CreateNotificationCommandError = async (output, context) => {
@@ -311,10 +309,9 @@ const de_CreateNotificationCommandError = async (output, context) => {
311
309
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
312
310
  default:
313
311
  const parsedBody = parsedOutput.body;
314
- (0, smithy_client_1.throwDefaultError)({
312
+ return throwDefaultError({
315
313
  output,
316
314
  parsedBody,
317
- exceptionCtor: BudgetsServiceException_1.BudgetsServiceException,
318
315
  errorCode,
319
316
  });
320
317
  }
@@ -325,12 +322,12 @@ const de_CreateSubscriberCommand = async (output, context) => {
325
322
  }
326
323
  const data = await parseBody(output.body, context);
327
324
  let contents = {};
328
- contents = de_CreateSubscriberResponse(data, context);
325
+ contents = (0, smithy_client_1._json)(data);
329
326
  const response = {
330
327
  $metadata: deserializeMetadata(output),
331
328
  ...contents,
332
329
  };
333
- return Promise.resolve(response);
330
+ return response;
334
331
  };
335
332
  exports.de_CreateSubscriberCommand = de_CreateSubscriberCommand;
336
333
  const de_CreateSubscriberCommandError = async (output, context) => {
@@ -363,10 +360,9 @@ const de_CreateSubscriberCommandError = async (output, context) => {
363
360
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
364
361
  default:
365
362
  const parsedBody = parsedOutput.body;
366
- (0, smithy_client_1.throwDefaultError)({
363
+ return throwDefaultError({
367
364
  output,
368
365
  parsedBody,
369
- exceptionCtor: BudgetsServiceException_1.BudgetsServiceException,
370
366
  errorCode,
371
367
  });
372
368
  }
@@ -377,12 +373,12 @@ const de_DeleteBudgetCommand = async (output, context) => {
377
373
  }
378
374
  const data = await parseBody(output.body, context);
379
375
  let contents = {};
380
- contents = de_DeleteBudgetResponse(data, context);
376
+ contents = (0, smithy_client_1._json)(data);
381
377
  const response = {
382
378
  $metadata: deserializeMetadata(output),
383
379
  ...contents,
384
380
  };
385
- return Promise.resolve(response);
381
+ return response;
386
382
  };
387
383
  exports.de_DeleteBudgetCommand = de_DeleteBudgetCommand;
388
384
  const de_DeleteBudgetCommandError = async (output, context) => {
@@ -409,10 +405,9 @@ const de_DeleteBudgetCommandError = async (output, context) => {
409
405
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
410
406
  default:
411
407
  const parsedBody = parsedOutput.body;
412
- (0, smithy_client_1.throwDefaultError)({
408
+ return throwDefaultError({
413
409
  output,
414
410
  parsedBody,
415
- exceptionCtor: BudgetsServiceException_1.BudgetsServiceException,
416
411
  errorCode,
417
412
  });
418
413
  }
@@ -428,7 +423,7 @@ const de_DeleteBudgetActionCommand = async (output, context) => {
428
423
  $metadata: deserializeMetadata(output),
429
424
  ...contents,
430
425
  };
431
- return Promise.resolve(response);
426
+ return response;
432
427
  };
433
428
  exports.de_DeleteBudgetActionCommand = de_DeleteBudgetActionCommand;
434
429
  const de_DeleteBudgetActionCommandError = async (output, context) => {
@@ -458,10 +453,9 @@ const de_DeleteBudgetActionCommandError = async (output, context) => {
458
453
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
459
454
  default:
460
455
  const parsedBody = parsedOutput.body;
461
- (0, smithy_client_1.throwDefaultError)({
456
+ return throwDefaultError({
462
457
  output,
463
458
  parsedBody,
464
- exceptionCtor: BudgetsServiceException_1.BudgetsServiceException,
465
459
  errorCode,
466
460
  });
467
461
  }
@@ -472,12 +466,12 @@ const de_DeleteNotificationCommand = async (output, context) => {
472
466
  }
473
467
  const data = await parseBody(output.body, context);
474
468
  let contents = {};
475
- contents = de_DeleteNotificationResponse(data, context);
469
+ contents = (0, smithy_client_1._json)(data);
476
470
  const response = {
477
471
  $metadata: deserializeMetadata(output),
478
472
  ...contents,
479
473
  };
480
- return Promise.resolve(response);
474
+ return response;
481
475
  };
482
476
  exports.de_DeleteNotificationCommand = de_DeleteNotificationCommand;
483
477
  const de_DeleteNotificationCommandError = async (output, context) => {
@@ -504,10 +498,9 @@ const de_DeleteNotificationCommandError = async (output, context) => {
504
498
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
505
499
  default:
506
500
  const parsedBody = parsedOutput.body;
507
- (0, smithy_client_1.throwDefaultError)({
501
+ return throwDefaultError({
508
502
  output,
509
503
  parsedBody,
510
- exceptionCtor: BudgetsServiceException_1.BudgetsServiceException,
511
504
  errorCode,
512
505
  });
513
506
  }
@@ -518,12 +511,12 @@ const de_DeleteSubscriberCommand = async (output, context) => {
518
511
  }
519
512
  const data = await parseBody(output.body, context);
520
513
  let contents = {};
521
- contents = de_DeleteSubscriberResponse(data, context);
514
+ contents = (0, smithy_client_1._json)(data);
522
515
  const response = {
523
516
  $metadata: deserializeMetadata(output),
524
517
  ...contents,
525
518
  };
526
- return Promise.resolve(response);
519
+ return response;
527
520
  };
528
521
  exports.de_DeleteSubscriberCommand = de_DeleteSubscriberCommand;
529
522
  const de_DeleteSubscriberCommandError = async (output, context) => {
@@ -550,10 +543,9 @@ const de_DeleteSubscriberCommandError = async (output, context) => {
550
543
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
551
544
  default:
552
545
  const parsedBody = parsedOutput.body;
553
- (0, smithy_client_1.throwDefaultError)({
546
+ return throwDefaultError({
554
547
  output,
555
548
  parsedBody,
556
- exceptionCtor: BudgetsServiceException_1.BudgetsServiceException,
557
549
  errorCode,
558
550
  });
559
551
  }
@@ -569,7 +561,7 @@ const de_DescribeBudgetCommand = async (output, context) => {
569
561
  $metadata: deserializeMetadata(output),
570
562
  ...contents,
571
563
  };
572
- return Promise.resolve(response);
564
+ return response;
573
565
  };
574
566
  exports.de_DescribeBudgetCommand = de_DescribeBudgetCommand;
575
567
  const de_DescribeBudgetCommandError = async (output, context) => {
@@ -596,10 +588,9 @@ const de_DescribeBudgetCommandError = async (output, context) => {
596
588
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
597
589
  default:
598
590
  const parsedBody = parsedOutput.body;
599
- (0, smithy_client_1.throwDefaultError)({
591
+ return throwDefaultError({
600
592
  output,
601
593
  parsedBody,
602
- exceptionCtor: BudgetsServiceException_1.BudgetsServiceException,
603
594
  errorCode,
604
595
  });
605
596
  }
@@ -615,7 +606,7 @@ const de_DescribeBudgetActionCommand = async (output, context) => {
615
606
  $metadata: deserializeMetadata(output),
616
607
  ...contents,
617
608
  };
618
- return Promise.resolve(response);
609
+ return response;
619
610
  };
620
611
  exports.de_DescribeBudgetActionCommand = de_DescribeBudgetActionCommand;
621
612
  const de_DescribeBudgetActionCommandError = async (output, context) => {
@@ -642,10 +633,9 @@ const de_DescribeBudgetActionCommandError = async (output, context) => {
642
633
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
643
634
  default:
644
635
  const parsedBody = parsedOutput.body;
645
- (0, smithy_client_1.throwDefaultError)({
636
+ return throwDefaultError({
646
637
  output,
647
638
  parsedBody,
648
- exceptionCtor: BudgetsServiceException_1.BudgetsServiceException,
649
639
  errorCode,
650
640
  });
651
641
  }
@@ -661,7 +651,7 @@ const de_DescribeBudgetActionHistoriesCommand = async (output, context) => {
661
651
  $metadata: deserializeMetadata(output),
662
652
  ...contents,
663
653
  };
664
- return Promise.resolve(response);
654
+ return response;
665
655
  };
666
656
  exports.de_DescribeBudgetActionHistoriesCommand = de_DescribeBudgetActionHistoriesCommand;
667
657
  const de_DescribeBudgetActionHistoriesCommandError = async (output, context) => {
@@ -691,10 +681,9 @@ const de_DescribeBudgetActionHistoriesCommandError = async (output, context) =>
691
681
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
692
682
  default:
693
683
  const parsedBody = parsedOutput.body;
694
- (0, smithy_client_1.throwDefaultError)({
684
+ return throwDefaultError({
695
685
  output,
696
686
  parsedBody,
697
- exceptionCtor: BudgetsServiceException_1.BudgetsServiceException,
698
687
  errorCode,
699
688
  });
700
689
  }
@@ -710,7 +699,7 @@ const de_DescribeBudgetActionsForAccountCommand = async (output, context) => {
710
699
  $metadata: deserializeMetadata(output),
711
700
  ...contents,
712
701
  };
713
- return Promise.resolve(response);
702
+ return response;
714
703
  };
715
704
  exports.de_DescribeBudgetActionsForAccountCommand = de_DescribeBudgetActionsForAccountCommand;
716
705
  const de_DescribeBudgetActionsForAccountCommandError = async (output, context) => {
@@ -737,10 +726,9 @@ const de_DescribeBudgetActionsForAccountCommandError = async (output, context) =
737
726
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
738
727
  default:
739
728
  const parsedBody = parsedOutput.body;
740
- (0, smithy_client_1.throwDefaultError)({
729
+ return throwDefaultError({
741
730
  output,
742
731
  parsedBody,
743
- exceptionCtor: BudgetsServiceException_1.BudgetsServiceException,
744
732
  errorCode,
745
733
  });
746
734
  }
@@ -756,7 +744,7 @@ const de_DescribeBudgetActionsForBudgetCommand = async (output, context) => {
756
744
  $metadata: deserializeMetadata(output),
757
745
  ...contents,
758
746
  };
759
- return Promise.resolve(response);
747
+ return response;
760
748
  };
761
749
  exports.de_DescribeBudgetActionsForBudgetCommand = de_DescribeBudgetActionsForBudgetCommand;
762
750
  const de_DescribeBudgetActionsForBudgetCommandError = async (output, context) => {
@@ -786,10 +774,9 @@ const de_DescribeBudgetActionsForBudgetCommandError = async (output, context) =>
786
774
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
787
775
  default:
788
776
  const parsedBody = parsedOutput.body;
789
- (0, smithy_client_1.throwDefaultError)({
777
+ return throwDefaultError({
790
778
  output,
791
779
  parsedBody,
792
- exceptionCtor: BudgetsServiceException_1.BudgetsServiceException,
793
780
  errorCode,
794
781
  });
795
782
  }
@@ -805,7 +792,7 @@ const de_DescribeBudgetNotificationsForAccountCommand = async (output, context)
805
792
  $metadata: deserializeMetadata(output),
806
793
  ...contents,
807
794
  };
808
- return Promise.resolve(response);
795
+ return response;
809
796
  };
810
797
  exports.de_DescribeBudgetNotificationsForAccountCommand = de_DescribeBudgetNotificationsForAccountCommand;
811
798
  const de_DescribeBudgetNotificationsForAccountCommandError = async (output, context) => {
@@ -838,10 +825,9 @@ const de_DescribeBudgetNotificationsForAccountCommandError = async (output, cont
838
825
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
839
826
  default:
840
827
  const parsedBody = parsedOutput.body;
841
- (0, smithy_client_1.throwDefaultError)({
828
+ return throwDefaultError({
842
829
  output,
843
830
  parsedBody,
844
- exceptionCtor: BudgetsServiceException_1.BudgetsServiceException,
845
831
  errorCode,
846
832
  });
847
833
  }
@@ -857,7 +843,7 @@ const de_DescribeBudgetPerformanceHistoryCommand = async (output, context) => {
857
843
  $metadata: deserializeMetadata(output),
858
844
  ...contents,
859
845
  };
860
- return Promise.resolve(response);
846
+ return response;
861
847
  };
862
848
  exports.de_DescribeBudgetPerformanceHistoryCommand = de_DescribeBudgetPerformanceHistoryCommand;
863
849
  const de_DescribeBudgetPerformanceHistoryCommandError = async (output, context) => {
@@ -890,10 +876,9 @@ const de_DescribeBudgetPerformanceHistoryCommandError = async (output, context)
890
876
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
891
877
  default:
892
878
  const parsedBody = parsedOutput.body;
893
- (0, smithy_client_1.throwDefaultError)({
879
+ return throwDefaultError({
894
880
  output,
895
881
  parsedBody,
896
- exceptionCtor: BudgetsServiceException_1.BudgetsServiceException,
897
882
  errorCode,
898
883
  });
899
884
  }
@@ -909,7 +894,7 @@ const de_DescribeBudgetsCommand = async (output, context) => {
909
894
  $metadata: deserializeMetadata(output),
910
895
  ...contents,
911
896
  };
912
- return Promise.resolve(response);
897
+ return response;
913
898
  };
914
899
  exports.de_DescribeBudgetsCommand = de_DescribeBudgetsCommand;
915
900
  const de_DescribeBudgetsCommandError = async (output, context) => {
@@ -942,10 +927,9 @@ const de_DescribeBudgetsCommandError = async (output, context) => {
942
927
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
943
928
  default:
944
929
  const parsedBody = parsedOutput.body;
945
- (0, smithy_client_1.throwDefaultError)({
930
+ return throwDefaultError({
946
931
  output,
947
932
  parsedBody,
948
- exceptionCtor: BudgetsServiceException_1.BudgetsServiceException,
949
933
  errorCode,
950
934
  });
951
935
  }
@@ -961,7 +945,7 @@ const de_DescribeNotificationsForBudgetCommand = async (output, context) => {
961
945
  $metadata: deserializeMetadata(output),
962
946
  ...contents,
963
947
  };
964
- return Promise.resolve(response);
948
+ return response;
965
949
  };
966
950
  exports.de_DescribeNotificationsForBudgetCommand = de_DescribeNotificationsForBudgetCommand;
967
951
  const de_DescribeNotificationsForBudgetCommandError = async (output, context) => {
@@ -994,10 +978,9 @@ const de_DescribeNotificationsForBudgetCommandError = async (output, context) =>
994
978
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
995
979
  default:
996
980
  const parsedBody = parsedOutput.body;
997
- (0, smithy_client_1.throwDefaultError)({
981
+ return throwDefaultError({
998
982
  output,
999
983
  parsedBody,
1000
- exceptionCtor: BudgetsServiceException_1.BudgetsServiceException,
1001
984
  errorCode,
1002
985
  });
1003
986
  }
@@ -1008,12 +991,12 @@ const de_DescribeSubscribersForNotificationCommand = async (output, context) =>
1008
991
  }
1009
992
  const data = await parseBody(output.body, context);
1010
993
  let contents = {};
1011
- contents = de_DescribeSubscribersForNotificationResponse(data, context);
994
+ contents = (0, smithy_client_1._json)(data);
1012
995
  const response = {
1013
996
  $metadata: deserializeMetadata(output),
1014
997
  ...contents,
1015
998
  };
1016
- return Promise.resolve(response);
999
+ return response;
1017
1000
  };
1018
1001
  exports.de_DescribeSubscribersForNotificationCommand = de_DescribeSubscribersForNotificationCommand;
1019
1002
  const de_DescribeSubscribersForNotificationCommandError = async (output, context) => {
@@ -1046,10 +1029,9 @@ const de_DescribeSubscribersForNotificationCommandError = async (output, context
1046
1029
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1047
1030
  default:
1048
1031
  const parsedBody = parsedOutput.body;
1049
- (0, smithy_client_1.throwDefaultError)({
1032
+ return throwDefaultError({
1050
1033
  output,
1051
1034
  parsedBody,
1052
- exceptionCtor: BudgetsServiceException_1.BudgetsServiceException,
1053
1035
  errorCode,
1054
1036
  });
1055
1037
  }
@@ -1060,12 +1042,12 @@ const de_ExecuteBudgetActionCommand = async (output, context) => {
1060
1042
  }
1061
1043
  const data = await parseBody(output.body, context);
1062
1044
  let contents = {};
1063
- contents = de_ExecuteBudgetActionResponse(data, context);
1045
+ contents = (0, smithy_client_1._json)(data);
1064
1046
  const response = {
1065
1047
  $metadata: deserializeMetadata(output),
1066
1048
  ...contents,
1067
1049
  };
1068
- return Promise.resolve(response);
1050
+ return response;
1069
1051
  };
1070
1052
  exports.de_ExecuteBudgetActionCommand = de_ExecuteBudgetActionCommand;
1071
1053
  const de_ExecuteBudgetActionCommandError = async (output, context) => {
@@ -1095,10 +1077,9 @@ const de_ExecuteBudgetActionCommandError = async (output, context) => {
1095
1077
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1096
1078
  default:
1097
1079
  const parsedBody = parsedOutput.body;
1098
- (0, smithy_client_1.throwDefaultError)({
1080
+ return throwDefaultError({
1099
1081
  output,
1100
1082
  parsedBody,
1101
- exceptionCtor: BudgetsServiceException_1.BudgetsServiceException,
1102
1083
  errorCode,
1103
1084
  });
1104
1085
  }
@@ -1109,12 +1090,12 @@ const de_UpdateBudgetCommand = async (output, context) => {
1109
1090
  }
1110
1091
  const data = await parseBody(output.body, context);
1111
1092
  let contents = {};
1112
- contents = de_UpdateBudgetResponse(data, context);
1093
+ contents = (0, smithy_client_1._json)(data);
1113
1094
  const response = {
1114
1095
  $metadata: deserializeMetadata(output),
1115
1096
  ...contents,
1116
1097
  };
1117
- return Promise.resolve(response);
1098
+ return response;
1118
1099
  };
1119
1100
  exports.de_UpdateBudgetCommand = de_UpdateBudgetCommand;
1120
1101
  const de_UpdateBudgetCommandError = async (output, context) => {
@@ -1141,10 +1122,9 @@ const de_UpdateBudgetCommandError = async (output, context) => {
1141
1122
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1142
1123
  default:
1143
1124
  const parsedBody = parsedOutput.body;
1144
- (0, smithy_client_1.throwDefaultError)({
1125
+ return throwDefaultError({
1145
1126
  output,
1146
1127
  parsedBody,
1147
- exceptionCtor: BudgetsServiceException_1.BudgetsServiceException,
1148
1128
  errorCode,
1149
1129
  });
1150
1130
  }
@@ -1160,7 +1140,7 @@ const de_UpdateBudgetActionCommand = async (output, context) => {
1160
1140
  $metadata: deserializeMetadata(output),
1161
1141
  ...contents,
1162
1142
  };
1163
- return Promise.resolve(response);
1143
+ return response;
1164
1144
  };
1165
1145
  exports.de_UpdateBudgetActionCommand = de_UpdateBudgetActionCommand;
1166
1146
  const de_UpdateBudgetActionCommandError = async (output, context) => {
@@ -1190,10 +1170,9 @@ const de_UpdateBudgetActionCommandError = async (output, context) => {
1190
1170
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1191
1171
  default:
1192
1172
  const parsedBody = parsedOutput.body;
1193
- (0, smithy_client_1.throwDefaultError)({
1173
+ return throwDefaultError({
1194
1174
  output,
1195
1175
  parsedBody,
1196
- exceptionCtor: BudgetsServiceException_1.BudgetsServiceException,
1197
1176
  errorCode,
1198
1177
  });
1199
1178
  }
@@ -1204,12 +1183,12 @@ const de_UpdateNotificationCommand = async (output, context) => {
1204
1183
  }
1205
1184
  const data = await parseBody(output.body, context);
1206
1185
  let contents = {};
1207
- contents = de_UpdateNotificationResponse(data, context);
1186
+ contents = (0, smithy_client_1._json)(data);
1208
1187
  const response = {
1209
1188
  $metadata: deserializeMetadata(output),
1210
1189
  ...contents,
1211
1190
  };
1212
- return Promise.resolve(response);
1191
+ return response;
1213
1192
  };
1214
1193
  exports.de_UpdateNotificationCommand = de_UpdateNotificationCommand;
1215
1194
  const de_UpdateNotificationCommandError = async (output, context) => {
@@ -1239,10 +1218,9 @@ const de_UpdateNotificationCommandError = async (output, context) => {
1239
1218
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1240
1219
  default:
1241
1220
  const parsedBody = parsedOutput.body;
1242
- (0, smithy_client_1.throwDefaultError)({
1221
+ return throwDefaultError({
1243
1222
  output,
1244
1223
  parsedBody,
1245
- exceptionCtor: BudgetsServiceException_1.BudgetsServiceException,
1246
1224
  errorCode,
1247
1225
  });
1248
1226
  }
@@ -1253,12 +1231,12 @@ const de_UpdateSubscriberCommand = async (output, context) => {
1253
1231
  }
1254
1232
  const data = await parseBody(output.body, context);
1255
1233
  let contents = {};
1256
- contents = de_UpdateSubscriberResponse(data, context);
1234
+ contents = (0, smithy_client_1._json)(data);
1257
1235
  const response = {
1258
1236
  $metadata: deserializeMetadata(output),
1259
1237
  ...contents,
1260
1238
  };
1261
- return Promise.resolve(response);
1239
+ return response;
1262
1240
  };
1263
1241
  exports.de_UpdateSubscriberCommand = de_UpdateSubscriberCommand;
1264
1242
  const de_UpdateSubscriberCommandError = async (output, context) => {
@@ -1288,17 +1266,16 @@ const de_UpdateSubscriberCommandError = async (output, context) => {
1288
1266
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1289
1267
  default:
1290
1268
  const parsedBody = parsedOutput.body;
1291
- (0, smithy_client_1.throwDefaultError)({
1269
+ return throwDefaultError({
1292
1270
  output,
1293
1271
  parsedBody,
1294
- exceptionCtor: BudgetsServiceException_1.BudgetsServiceException,
1295
1272
  errorCode,
1296
1273
  });
1297
1274
  }
1298
1275
  };
1299
1276
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1300
1277
  const body = parsedOutput.body;
1301
- const deserialized = de_AccessDeniedException(body, context);
1278
+ const deserialized = (0, smithy_client_1._json)(body);
1302
1279
  const exception = new models_0_1.AccessDeniedException({
1303
1280
  $metadata: deserializeMetadata(parsedOutput),
1304
1281
  ...deserialized,
@@ -1307,7 +1284,7 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1307
1284
  };
1308
1285
  const de_CreationLimitExceededExceptionRes = async (parsedOutput, context) => {
1309
1286
  const body = parsedOutput.body;
1310
- const deserialized = de_CreationLimitExceededException(body, context);
1287
+ const deserialized = (0, smithy_client_1._json)(body);
1311
1288
  const exception = new models_0_1.CreationLimitExceededException({
1312
1289
  $metadata: deserializeMetadata(parsedOutput),
1313
1290
  ...deserialized,
@@ -1316,7 +1293,7 @@ const de_CreationLimitExceededExceptionRes = async (parsedOutput, context) => {
1316
1293
  };
1317
1294
  const de_DuplicateRecordExceptionRes = async (parsedOutput, context) => {
1318
1295
  const body = parsedOutput.body;
1319
- const deserialized = de_DuplicateRecordException(body, context);
1296
+ const deserialized = (0, smithy_client_1._json)(body);
1320
1297
  const exception = new models_0_1.DuplicateRecordException({
1321
1298
  $metadata: deserializeMetadata(parsedOutput),
1322
1299
  ...deserialized,
@@ -1325,7 +1302,7 @@ const de_DuplicateRecordExceptionRes = async (parsedOutput, context) => {
1325
1302
  };
1326
1303
  const de_ExpiredNextTokenExceptionRes = async (parsedOutput, context) => {
1327
1304
  const body = parsedOutput.body;
1328
- const deserialized = de_ExpiredNextTokenException(body, context);
1305
+ const deserialized = (0, smithy_client_1._json)(body);
1329
1306
  const exception = new models_0_1.ExpiredNextTokenException({
1330
1307
  $metadata: deserializeMetadata(parsedOutput),
1331
1308
  ...deserialized,
@@ -1334,7 +1311,7 @@ const de_ExpiredNextTokenExceptionRes = async (parsedOutput, context) => {
1334
1311
  };
1335
1312
  const de_InternalErrorExceptionRes = async (parsedOutput, context) => {
1336
1313
  const body = parsedOutput.body;
1337
- const deserialized = de_InternalErrorException(body, context);
1314
+ const deserialized = (0, smithy_client_1._json)(body);
1338
1315
  const exception = new models_0_1.InternalErrorException({
1339
1316
  $metadata: deserializeMetadata(parsedOutput),
1340
1317
  ...deserialized,
@@ -1343,7 +1320,7 @@ const de_InternalErrorExceptionRes = async (parsedOutput, context) => {
1343
1320
  };
1344
1321
  const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
1345
1322
  const body = parsedOutput.body;
1346
- const deserialized = de_InvalidNextTokenException(body, context);
1323
+ const deserialized = (0, smithy_client_1._json)(body);
1347
1324
  const exception = new models_0_1.InvalidNextTokenException({
1348
1325
  $metadata: deserializeMetadata(parsedOutput),
1349
1326
  ...deserialized,
@@ -1352,7 +1329,7 @@ const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
1352
1329
  };
1353
1330
  const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
1354
1331
  const body = parsedOutput.body;
1355
- const deserialized = de_InvalidParameterException(body, context);
1332
+ const deserialized = (0, smithy_client_1._json)(body);
1356
1333
  const exception = new models_0_1.InvalidParameterException({
1357
1334
  $metadata: deserializeMetadata(parsedOutput),
1358
1335
  ...deserialized,
@@ -1361,7 +1338,7 @@ const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
1361
1338
  };
1362
1339
  const de_NotFoundExceptionRes = async (parsedOutput, context) => {
1363
1340
  const body = parsedOutput.body;
1364
- const deserialized = de_NotFoundException(body, context);
1341
+ const deserialized = (0, smithy_client_1._json)(body);
1365
1342
  const exception = new models_0_1.NotFoundException({
1366
1343
  $metadata: deserializeMetadata(parsedOutput),
1367
1344
  ...deserialized,
@@ -1370,7 +1347,7 @@ const de_NotFoundExceptionRes = async (parsedOutput, context) => {
1370
1347
  };
1371
1348
  const de_ResourceLockedExceptionRes = async (parsedOutput, context) => {
1372
1349
  const body = parsedOutput.body;
1373
- const deserialized = de_ResourceLockedException(body, context);
1350
+ const deserialized = (0, smithy_client_1._json)(body);
1374
1351
  const exception = new models_0_1.ResourceLockedException({
1375
1352
  $metadata: deserializeMetadata(parsedOutput),
1376
1353
  ...deserialized,
@@ -1379,7 +1356,7 @@ const de_ResourceLockedExceptionRes = async (parsedOutput, context) => {
1379
1356
  };
1380
1357
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1381
1358
  const body = parsedOutput.body;
1382
- const deserialized = de_ThrottlingException(body, context);
1359
+ const deserialized = (0, smithy_client_1._json)(body);
1383
1360
  const exception = new models_0_1.ThrottlingException({
1384
1361
  $metadata: deserializeMetadata(parsedOutput),
1385
1362
  ...deserialized,
@@ -1387,283 +1364,126 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1387
1364
  return (0, smithy_client_1.decorateServiceException)(exception, body);
1388
1365
  };
1389
1366
  const se_ActionThreshold = (input, context) => {
1390
- return {
1391
- ...(input.ActionThresholdType != null && { ActionThresholdType: input.ActionThresholdType }),
1392
- ...(input.ActionThresholdValue != null && { ActionThresholdValue: (0, smithy_client_1.serializeFloat)(input.ActionThresholdValue) }),
1393
- };
1367
+ return (0, smithy_client_1.take)(input, {
1368
+ ActionThresholdType: [],
1369
+ ActionThresholdValue: smithy_client_1.serializeFloat,
1370
+ });
1394
1371
  };
1395
1372
  const se_AutoAdjustData = (input, context) => {
1396
- return {
1397
- ...(input.AutoAdjustType != null && { AutoAdjustType: input.AutoAdjustType }),
1398
- ...(input.HistoricalOptions != null && {
1399
- HistoricalOptions: se_HistoricalOptions(input.HistoricalOptions, context),
1400
- }),
1401
- ...(input.LastAutoAdjustTime != null && {
1402
- LastAutoAdjustTime: Math.round(input.LastAutoAdjustTime.getTime() / 1000),
1403
- }),
1404
- };
1373
+ return (0, smithy_client_1.take)(input, {
1374
+ AutoAdjustType: [],
1375
+ HistoricalOptions: smithy_client_1._json,
1376
+ LastAutoAdjustTime: (_) => Math.round(_.getTime() / 1000),
1377
+ });
1405
1378
  };
1406
1379
  const se_Budget = (input, context) => {
1407
- return {
1408
- ...(input.AutoAdjustData != null && { AutoAdjustData: se_AutoAdjustData(input.AutoAdjustData, context) }),
1409
- ...(input.BudgetLimit != null && { BudgetLimit: se_Spend(input.BudgetLimit, context) }),
1410
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1411
- ...(input.BudgetType != null && { BudgetType: input.BudgetType }),
1412
- ...(input.CalculatedSpend != null && { CalculatedSpend: se_CalculatedSpend(input.CalculatedSpend, context) }),
1413
- ...(input.CostFilters != null && { CostFilters: se_CostFilters(input.CostFilters, context) }),
1414
- ...(input.CostTypes != null && { CostTypes: se_CostTypes(input.CostTypes, context) }),
1415
- ...(input.LastUpdatedTime != null && { LastUpdatedTime: Math.round(input.LastUpdatedTime.getTime() / 1000) }),
1416
- ...(input.PlannedBudgetLimits != null && {
1417
- PlannedBudgetLimits: se_PlannedBudgetLimits(input.PlannedBudgetLimits, context),
1418
- }),
1419
- ...(input.TimePeriod != null && { TimePeriod: se_TimePeriod(input.TimePeriod, context) }),
1420
- ...(input.TimeUnit != null && { TimeUnit: input.TimeUnit }),
1421
- };
1422
- };
1423
- const se_CalculatedSpend = (input, context) => {
1424
- return {
1425
- ...(input.ActualSpend != null && { ActualSpend: se_Spend(input.ActualSpend, context) }),
1426
- ...(input.ForecastedSpend != null && { ForecastedSpend: se_Spend(input.ForecastedSpend, context) }),
1427
- };
1428
- };
1429
- const se_CostFilters = (input, context) => {
1430
- return Object.entries(input).reduce((acc, [key, value]) => {
1431
- if (value === null) {
1432
- return acc;
1433
- }
1434
- acc[key] = se_DimensionValues(value, context);
1435
- return acc;
1436
- }, {});
1437
- };
1438
- const se_CostTypes = (input, context) => {
1439
- return {
1440
- ...(input.IncludeCredit != null && { IncludeCredit: input.IncludeCredit }),
1441
- ...(input.IncludeDiscount != null && { IncludeDiscount: input.IncludeDiscount }),
1442
- ...(input.IncludeOtherSubscription != null && { IncludeOtherSubscription: input.IncludeOtherSubscription }),
1443
- ...(input.IncludeRecurring != null && { IncludeRecurring: input.IncludeRecurring }),
1444
- ...(input.IncludeRefund != null && { IncludeRefund: input.IncludeRefund }),
1445
- ...(input.IncludeSubscription != null && { IncludeSubscription: input.IncludeSubscription }),
1446
- ...(input.IncludeSupport != null && { IncludeSupport: input.IncludeSupport }),
1447
- ...(input.IncludeTax != null && { IncludeTax: input.IncludeTax }),
1448
- ...(input.IncludeUpfront != null && { IncludeUpfront: input.IncludeUpfront }),
1449
- ...(input.UseAmortized != null && { UseAmortized: input.UseAmortized }),
1450
- ...(input.UseBlended != null && { UseBlended: input.UseBlended }),
1451
- };
1380
+ return (0, smithy_client_1.take)(input, {
1381
+ AutoAdjustData: (_) => se_AutoAdjustData(_, context),
1382
+ BudgetLimit: smithy_client_1._json,
1383
+ BudgetName: [],
1384
+ BudgetType: [],
1385
+ CalculatedSpend: smithy_client_1._json,
1386
+ CostFilters: smithy_client_1._json,
1387
+ CostTypes: smithy_client_1._json,
1388
+ LastUpdatedTime: (_) => Math.round(_.getTime() / 1000),
1389
+ PlannedBudgetLimits: smithy_client_1._json,
1390
+ TimePeriod: (_) => se_TimePeriod(_, context),
1391
+ TimeUnit: [],
1392
+ });
1452
1393
  };
1453
1394
  const se_CreateBudgetActionRequest = (input, context) => {
1454
- return {
1455
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1456
- ...(input.ActionThreshold != null && { ActionThreshold: se_ActionThreshold(input.ActionThreshold, context) }),
1457
- ...(input.ActionType != null && { ActionType: input.ActionType }),
1458
- ...(input.ApprovalModel != null && { ApprovalModel: input.ApprovalModel }),
1459
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1460
- ...(input.Definition != null && { Definition: se_Definition(input.Definition, context) }),
1461
- ...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }),
1462
- ...(input.NotificationType != null && { NotificationType: input.NotificationType }),
1463
- ...(input.Subscribers != null && { Subscribers: se_Subscribers(input.Subscribers, context) }),
1464
- };
1395
+ return (0, smithy_client_1.take)(input, {
1396
+ AccountId: [],
1397
+ ActionThreshold: (_) => se_ActionThreshold(_, context),
1398
+ ActionType: [],
1399
+ ApprovalModel: [],
1400
+ BudgetName: [],
1401
+ Definition: smithy_client_1._json,
1402
+ ExecutionRoleArn: [],
1403
+ NotificationType: [],
1404
+ Subscribers: smithy_client_1._json,
1405
+ });
1465
1406
  };
1466
1407
  const se_CreateBudgetRequest = (input, context) => {
1467
- return {
1468
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1469
- ...(input.Budget != null && { Budget: se_Budget(input.Budget, context) }),
1470
- ...(input.NotificationsWithSubscribers != null && {
1471
- NotificationsWithSubscribers: se_NotificationWithSubscribersList(input.NotificationsWithSubscribers, context),
1472
- }),
1473
- };
1408
+ return (0, smithy_client_1.take)(input, {
1409
+ AccountId: [],
1410
+ Budget: (_) => se_Budget(_, context),
1411
+ NotificationsWithSubscribers: (_) => se_NotificationWithSubscribersList(_, context),
1412
+ });
1474
1413
  };
1475
1414
  const se_CreateNotificationRequest = (input, context) => {
1476
- return {
1477
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1478
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1479
- ...(input.Notification != null && { Notification: se_Notification(input.Notification, context) }),
1480
- ...(input.Subscribers != null && { Subscribers: se_Subscribers(input.Subscribers, context) }),
1481
- };
1415
+ return (0, smithy_client_1.take)(input, {
1416
+ AccountId: [],
1417
+ BudgetName: [],
1418
+ Notification: (_) => se_Notification(_, context),
1419
+ Subscribers: smithy_client_1._json,
1420
+ });
1482
1421
  };
1483
1422
  const se_CreateSubscriberRequest = (input, context) => {
1484
- return {
1485
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1486
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1487
- ...(input.Notification != null && { Notification: se_Notification(input.Notification, context) }),
1488
- ...(input.Subscriber != null && { Subscriber: se_Subscriber(input.Subscriber, context) }),
1489
- };
1490
- };
1491
- const se_Definition = (input, context) => {
1492
- return {
1493
- ...(input.IamActionDefinition != null && {
1494
- IamActionDefinition: se_IamActionDefinition(input.IamActionDefinition, context),
1495
- }),
1496
- ...(input.ScpActionDefinition != null && {
1497
- ScpActionDefinition: se_ScpActionDefinition(input.ScpActionDefinition, context),
1498
- }),
1499
- ...(input.SsmActionDefinition != null && {
1500
- SsmActionDefinition: se_SsmActionDefinition(input.SsmActionDefinition, context),
1501
- }),
1502
- };
1503
- };
1504
- const se_DeleteBudgetActionRequest = (input, context) => {
1505
- return {
1506
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1507
- ...(input.ActionId != null && { ActionId: input.ActionId }),
1508
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1509
- };
1510
- };
1511
- const se_DeleteBudgetRequest = (input, context) => {
1512
- return {
1513
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1514
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1515
- };
1423
+ return (0, smithy_client_1.take)(input, {
1424
+ AccountId: [],
1425
+ BudgetName: [],
1426
+ Notification: (_) => se_Notification(_, context),
1427
+ Subscriber: smithy_client_1._json,
1428
+ });
1516
1429
  };
1517
1430
  const se_DeleteNotificationRequest = (input, context) => {
1518
- return {
1519
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1520
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1521
- ...(input.Notification != null && { Notification: se_Notification(input.Notification, context) }),
1522
- };
1431
+ return (0, smithy_client_1.take)(input, {
1432
+ AccountId: [],
1433
+ BudgetName: [],
1434
+ Notification: (_) => se_Notification(_, context),
1435
+ });
1523
1436
  };
1524
1437
  const se_DeleteSubscriberRequest = (input, context) => {
1525
- return {
1526
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1527
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1528
- ...(input.Notification != null && { Notification: se_Notification(input.Notification, context) }),
1529
- ...(input.Subscriber != null && { Subscriber: se_Subscriber(input.Subscriber, context) }),
1530
- };
1438
+ return (0, smithy_client_1.take)(input, {
1439
+ AccountId: [],
1440
+ BudgetName: [],
1441
+ Notification: (_) => se_Notification(_, context),
1442
+ Subscriber: smithy_client_1._json,
1443
+ });
1531
1444
  };
1532
1445
  const se_DescribeBudgetActionHistoriesRequest = (input, context) => {
1533
- return {
1534
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1535
- ...(input.ActionId != null && { ActionId: input.ActionId }),
1536
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1537
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1538
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1539
- ...(input.TimePeriod != null && { TimePeriod: se_TimePeriod(input.TimePeriod, context) }),
1540
- };
1541
- };
1542
- const se_DescribeBudgetActionRequest = (input, context) => {
1543
- return {
1544
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1545
- ...(input.ActionId != null && { ActionId: input.ActionId }),
1546
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1547
- };
1548
- };
1549
- const se_DescribeBudgetActionsForAccountRequest = (input, context) => {
1550
- return {
1551
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1552
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1553
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1554
- };
1555
- };
1556
- const se_DescribeBudgetActionsForBudgetRequest = (input, context) => {
1557
- return {
1558
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1559
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1560
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1561
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1562
- };
1563
- };
1564
- const se_DescribeBudgetNotificationsForAccountRequest = (input, context) => {
1565
- return {
1566
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1567
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1568
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1569
- };
1570
- };
1571
- const se_DescribeBudgetPerformanceHistoryRequest = (input, context) => {
1572
- return {
1573
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1574
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1575
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1576
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1577
- ...(input.TimePeriod != null && { TimePeriod: se_TimePeriod(input.TimePeriod, context) }),
1578
- };
1579
- };
1580
- const se_DescribeBudgetRequest = (input, context) => {
1581
- return {
1582
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1583
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1584
- };
1585
- };
1586
- const se_DescribeBudgetsRequest = (input, context) => {
1587
- return {
1588
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1589
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1590
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1591
- };
1592
- };
1593
- const se_DescribeNotificationsForBudgetRequest = (input, context) => {
1594
- return {
1595
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1596
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1597
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1598
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1599
- };
1600
- };
1601
- const se_DescribeSubscribersForNotificationRequest = (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.Notification != null && { Notification: se_Notification(input.Notification, context) }),
1608
- };
1609
- };
1610
- const se_DimensionValues = (input, context) => {
1611
- return input
1612
- .filter((e) => e != null)
1613
- .map((entry) => {
1614
- return entry;
1446
+ return (0, smithy_client_1.take)(input, {
1447
+ AccountId: [],
1448
+ ActionId: [],
1449
+ BudgetName: [],
1450
+ MaxResults: [],
1451
+ NextToken: [],
1452
+ TimePeriod: (_) => se_TimePeriod(_, context),
1615
1453
  });
1616
1454
  };
1617
- const se_ExecuteBudgetActionRequest = (input, context) => {
1618
- return {
1619
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1620
- ...(input.ActionId != null && { ActionId: input.ActionId }),
1621
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1622
- ...(input.ExecutionType != null && { ExecutionType: input.ExecutionType }),
1623
- };
1624
- };
1625
- const se_Groups = (input, context) => {
1626
- return input
1627
- .filter((e) => e != null)
1628
- .map((entry) => {
1629
- return entry;
1455
+ const se_DescribeBudgetPerformanceHistoryRequest = (input, context) => {
1456
+ return (0, smithy_client_1.take)(input, {
1457
+ AccountId: [],
1458
+ BudgetName: [],
1459
+ MaxResults: [],
1460
+ NextToken: [],
1461
+ TimePeriod: (_) => se_TimePeriod(_, context),
1630
1462
  });
1631
1463
  };
1632
- const se_HistoricalOptions = (input, context) => {
1633
- return {
1634
- ...(input.BudgetAdjustmentPeriod != null && { BudgetAdjustmentPeriod: input.BudgetAdjustmentPeriod }),
1635
- ...(input.LookBackAvailablePeriods != null && { LookBackAvailablePeriods: input.LookBackAvailablePeriods }),
1636
- };
1637
- };
1638
- const se_IamActionDefinition = (input, context) => {
1639
- return {
1640
- ...(input.Groups != null && { Groups: se_Groups(input.Groups, context) }),
1641
- ...(input.PolicyArn != null && { PolicyArn: input.PolicyArn }),
1642
- ...(input.Roles != null && { Roles: se_Roles(input.Roles, context) }),
1643
- ...(input.Users != null && { Users: se_Users(input.Users, context) }),
1644
- };
1645
- };
1646
- const se_InstanceIds = (input, context) => {
1647
- return input
1648
- .filter((e) => e != null)
1649
- .map((entry) => {
1650
- return entry;
1464
+ const se_DescribeSubscribersForNotificationRequest = (input, context) => {
1465
+ return (0, smithy_client_1.take)(input, {
1466
+ AccountId: [],
1467
+ BudgetName: [],
1468
+ MaxResults: [],
1469
+ NextToken: [],
1470
+ Notification: (_) => se_Notification(_, context),
1651
1471
  });
1652
1472
  };
1653
1473
  const se_Notification = (input, context) => {
1654
- return {
1655
- ...(input.ComparisonOperator != null && { ComparisonOperator: input.ComparisonOperator }),
1656
- ...(input.NotificationState != null && { NotificationState: input.NotificationState }),
1657
- ...(input.NotificationType != null && { NotificationType: input.NotificationType }),
1658
- ...(input.Threshold != null && { Threshold: (0, smithy_client_1.serializeFloat)(input.Threshold) }),
1659
- ...(input.ThresholdType != null && { ThresholdType: input.ThresholdType }),
1660
- };
1474
+ return (0, smithy_client_1.take)(input, {
1475
+ ComparisonOperator: [],
1476
+ NotificationState: [],
1477
+ NotificationType: [],
1478
+ Threshold: smithy_client_1.serializeFloat,
1479
+ ThresholdType: [],
1480
+ });
1661
1481
  };
1662
1482
  const se_NotificationWithSubscribers = (input, context) => {
1663
- return {
1664
- ...(input.Notification != null && { Notification: se_Notification(input.Notification, context) }),
1665
- ...(input.Subscribers != null && { Subscribers: se_Subscribers(input.Subscribers, context) }),
1666
- };
1483
+ return (0, smithy_client_1.take)(input, {
1484
+ Notification: (_) => se_Notification(_, context),
1485
+ Subscribers: smithy_client_1._json,
1486
+ });
1667
1487
  };
1668
1488
  const se_NotificationWithSubscribersList = (input, context) => {
1669
1489
  return input
@@ -1672,608 +1492,258 @@ const se_NotificationWithSubscribersList = (input, context) => {
1672
1492
  return se_NotificationWithSubscribers(entry, context);
1673
1493
  });
1674
1494
  };
1675
- const se_PlannedBudgetLimits = (input, context) => {
1676
- return Object.entries(input).reduce((acc, [key, value]) => {
1677
- if (value === null) {
1678
- return acc;
1679
- }
1680
- acc[key] = se_Spend(value, context);
1681
- return acc;
1682
- }, {});
1683
- };
1684
- const se_Roles = (input, context) => {
1685
- return input
1686
- .filter((e) => e != null)
1687
- .map((entry) => {
1688
- return entry;
1689
- });
1690
- };
1691
- const se_ScpActionDefinition = (input, context) => {
1692
- return {
1693
- ...(input.PolicyId != null && { PolicyId: input.PolicyId }),
1694
- ...(input.TargetIds != null && { TargetIds: se_TargetIds(input.TargetIds, context) }),
1695
- };
1696
- };
1697
- const se_Spend = (input, context) => {
1698
- return {
1699
- ...(input.Amount != null && { Amount: input.Amount }),
1700
- ...(input.Unit != null && { Unit: input.Unit }),
1701
- };
1702
- };
1703
- const se_SsmActionDefinition = (input, context) => {
1704
- return {
1705
- ...(input.ActionSubType != null && { ActionSubType: input.ActionSubType }),
1706
- ...(input.InstanceIds != null && { InstanceIds: se_InstanceIds(input.InstanceIds, context) }),
1707
- ...(input.Region != null && { Region: input.Region }),
1708
- };
1709
- };
1710
- const se_Subscriber = (input, context) => {
1711
- return {
1712
- ...(input.Address != null && { Address: input.Address }),
1713
- ...(input.SubscriptionType != null && { SubscriptionType: input.SubscriptionType }),
1714
- };
1715
- };
1716
- const se_Subscribers = (input, context) => {
1717
- return input
1718
- .filter((e) => e != null)
1719
- .map((entry) => {
1720
- return se_Subscriber(entry, context);
1721
- });
1722
- };
1723
- const se_TargetIds = (input, context) => {
1724
- return input
1725
- .filter((e) => e != null)
1726
- .map((entry) => {
1727
- return entry;
1728
- });
1729
- };
1730
1495
  const se_TimePeriod = (input, context) => {
1731
- return {
1732
- ...(input.End != null && { End: Math.round(input.End.getTime() / 1000) }),
1733
- ...(input.Start != null && { Start: Math.round(input.Start.getTime() / 1000) }),
1734
- };
1496
+ return (0, smithy_client_1.take)(input, {
1497
+ End: (_) => Math.round(_.getTime() / 1000),
1498
+ Start: (_) => Math.round(_.getTime() / 1000),
1499
+ });
1735
1500
  };
1736
1501
  const se_UpdateBudgetActionRequest = (input, context) => {
1737
- return {
1738
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1739
- ...(input.ActionId != null && { ActionId: input.ActionId }),
1740
- ...(input.ActionThreshold != null && { ActionThreshold: se_ActionThreshold(input.ActionThreshold, context) }),
1741
- ...(input.ApprovalModel != null && { ApprovalModel: input.ApprovalModel }),
1742
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1743
- ...(input.Definition != null && { Definition: se_Definition(input.Definition, context) }),
1744
- ...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }),
1745
- ...(input.NotificationType != null && { NotificationType: input.NotificationType }),
1746
- ...(input.Subscribers != null && { Subscribers: se_Subscribers(input.Subscribers, context) }),
1747
- };
1502
+ return (0, smithy_client_1.take)(input, {
1503
+ AccountId: [],
1504
+ ActionId: [],
1505
+ ActionThreshold: (_) => se_ActionThreshold(_, context),
1506
+ ApprovalModel: [],
1507
+ BudgetName: [],
1508
+ Definition: smithy_client_1._json,
1509
+ ExecutionRoleArn: [],
1510
+ NotificationType: [],
1511
+ Subscribers: smithy_client_1._json,
1512
+ });
1748
1513
  };
1749
1514
  const se_UpdateBudgetRequest = (input, context) => {
1750
- return {
1751
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1752
- ...(input.NewBudget != null && { NewBudget: se_Budget(input.NewBudget, context) }),
1753
- };
1515
+ return (0, smithy_client_1.take)(input, {
1516
+ AccountId: [],
1517
+ NewBudget: (_) => se_Budget(_, context),
1518
+ });
1754
1519
  };
1755
1520
  const se_UpdateNotificationRequest = (input, context) => {
1756
- return {
1757
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1758
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1759
- ...(input.NewNotification != null && { NewNotification: se_Notification(input.NewNotification, context) }),
1760
- ...(input.OldNotification != null && { OldNotification: se_Notification(input.OldNotification, context) }),
1761
- };
1521
+ return (0, smithy_client_1.take)(input, {
1522
+ AccountId: [],
1523
+ BudgetName: [],
1524
+ NewNotification: (_) => se_Notification(_, context),
1525
+ OldNotification: (_) => se_Notification(_, context),
1526
+ });
1762
1527
  };
1763
1528
  const se_UpdateSubscriberRequest = (input, context) => {
1764
- return {
1765
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1766
- ...(input.BudgetName != null && { BudgetName: input.BudgetName }),
1767
- ...(input.NewSubscriber != null && { NewSubscriber: se_Subscriber(input.NewSubscriber, context) }),
1768
- ...(input.Notification != null && { Notification: se_Notification(input.Notification, context) }),
1769
- ...(input.OldSubscriber != null && { OldSubscriber: se_Subscriber(input.OldSubscriber, context) }),
1770
- };
1771
- };
1772
- const se_Users = (input, context) => {
1773
- return input
1774
- .filter((e) => e != null)
1775
- .map((entry) => {
1776
- return entry;
1529
+ return (0, smithy_client_1.take)(input, {
1530
+ AccountId: [],
1531
+ BudgetName: [],
1532
+ NewSubscriber: smithy_client_1._json,
1533
+ Notification: (_) => se_Notification(_, context),
1534
+ OldSubscriber: smithy_client_1._json,
1777
1535
  });
1778
1536
  };
1779
- const de_AccessDeniedException = (output, context) => {
1780
- return {
1781
- Message: (0, smithy_client_1.expectString)(output.Message),
1782
- };
1783
- };
1784
1537
  const de_Action = (output, context) => {
1785
- return {
1786
- ActionId: (0, smithy_client_1.expectString)(output.ActionId),
1787
- ActionThreshold: output.ActionThreshold != null ? de_ActionThreshold(output.ActionThreshold, context) : undefined,
1788
- ActionType: (0, smithy_client_1.expectString)(output.ActionType),
1789
- ApprovalModel: (0, smithy_client_1.expectString)(output.ApprovalModel),
1790
- BudgetName: (0, smithy_client_1.expectString)(output.BudgetName),
1791
- Definition: output.Definition != null ? de_Definition(output.Definition, context) : undefined,
1792
- ExecutionRoleArn: (0, smithy_client_1.expectString)(output.ExecutionRoleArn),
1793
- NotificationType: (0, smithy_client_1.expectString)(output.NotificationType),
1794
- Status: (0, smithy_client_1.expectString)(output.Status),
1795
- Subscribers: output.Subscribers != null ? de_Subscribers(output.Subscribers, context) : undefined,
1796
- };
1538
+ return (0, smithy_client_1.take)(output, {
1539
+ ActionId: smithy_client_1.expectString,
1540
+ ActionThreshold: (_) => de_ActionThreshold(_, context),
1541
+ ActionType: smithy_client_1.expectString,
1542
+ ApprovalModel: smithy_client_1.expectString,
1543
+ BudgetName: smithy_client_1.expectString,
1544
+ Definition: smithy_client_1._json,
1545
+ ExecutionRoleArn: smithy_client_1.expectString,
1546
+ NotificationType: smithy_client_1.expectString,
1547
+ Status: smithy_client_1.expectString,
1548
+ Subscribers: smithy_client_1._json,
1549
+ });
1797
1550
  };
1798
1551
  const de_ActionHistories = (output, context) => {
1799
1552
  const retVal = (output || [])
1800
1553
  .filter((e) => e != null)
1801
1554
  .map((entry) => {
1802
- if (entry === null) {
1803
- return null;
1804
- }
1805
1555
  return de_ActionHistory(entry, context);
1806
1556
  });
1807
1557
  return retVal;
1808
1558
  };
1809
1559
  const de_ActionHistory = (output, context) => {
1810
- return {
1811
- ActionHistoryDetails: output.ActionHistoryDetails != null ? de_ActionHistoryDetails(output.ActionHistoryDetails, context) : undefined,
1812
- EventType: (0, smithy_client_1.expectString)(output.EventType),
1813
- Status: (0, smithy_client_1.expectString)(output.Status),
1814
- Timestamp: output.Timestamp != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.Timestamp))) : undefined,
1815
- };
1560
+ return (0, smithy_client_1.take)(output, {
1561
+ ActionHistoryDetails: (_) => de_ActionHistoryDetails(_, context),
1562
+ EventType: smithy_client_1.expectString,
1563
+ Status: smithy_client_1.expectString,
1564
+ Timestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1565
+ });
1816
1566
  };
1817
1567
  const de_ActionHistoryDetails = (output, context) => {
1818
- return {
1819
- Action: output.Action != null ? de_Action(output.Action, context) : undefined,
1820
- Message: (0, smithy_client_1.expectString)(output.Message),
1821
- };
1568
+ return (0, smithy_client_1.take)(output, {
1569
+ Action: (_) => de_Action(_, context),
1570
+ Message: smithy_client_1.expectString,
1571
+ });
1822
1572
  };
1823
1573
  const de_Actions = (output, context) => {
1824
1574
  const retVal = (output || [])
1825
1575
  .filter((e) => e != null)
1826
1576
  .map((entry) => {
1827
- if (entry === null) {
1828
- return null;
1829
- }
1830
1577
  return de_Action(entry, context);
1831
1578
  });
1832
1579
  return retVal;
1833
1580
  };
1834
1581
  const de_ActionThreshold = (output, context) => {
1835
- return {
1836
- ActionThresholdType: (0, smithy_client_1.expectString)(output.ActionThresholdType),
1837
- ActionThresholdValue: (0, smithy_client_1.limitedParseDouble)(output.ActionThresholdValue),
1838
- };
1582
+ return (0, smithy_client_1.take)(output, {
1583
+ ActionThresholdType: smithy_client_1.expectString,
1584
+ ActionThresholdValue: smithy_client_1.limitedParseDouble,
1585
+ });
1839
1586
  };
1840
1587
  const de_AutoAdjustData = (output, context) => {
1841
- return {
1842
- AutoAdjustType: (0, smithy_client_1.expectString)(output.AutoAdjustType),
1843
- HistoricalOptions: output.HistoricalOptions != null ? de_HistoricalOptions(output.HistoricalOptions, context) : undefined,
1844
- LastAutoAdjustTime: output.LastAutoAdjustTime != null
1845
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastAutoAdjustTime)))
1846
- : undefined,
1847
- };
1588
+ return (0, smithy_client_1.take)(output, {
1589
+ AutoAdjustType: smithy_client_1.expectString,
1590
+ HistoricalOptions: smithy_client_1._json,
1591
+ LastAutoAdjustTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1592
+ });
1848
1593
  };
1849
1594
  const de_Budget = (output, context) => {
1850
- return {
1851
- AutoAdjustData: output.AutoAdjustData != null ? de_AutoAdjustData(output.AutoAdjustData, context) : undefined,
1852
- BudgetLimit: output.BudgetLimit != null ? de_Spend(output.BudgetLimit, context) : undefined,
1853
- BudgetName: (0, smithy_client_1.expectString)(output.BudgetName),
1854
- BudgetType: (0, smithy_client_1.expectString)(output.BudgetType),
1855
- CalculatedSpend: output.CalculatedSpend != null ? de_CalculatedSpend(output.CalculatedSpend, context) : undefined,
1856
- CostFilters: output.CostFilters != null ? de_CostFilters(output.CostFilters, context) : undefined,
1857
- CostTypes: output.CostTypes != null ? de_CostTypes(output.CostTypes, context) : undefined,
1858
- LastUpdatedTime: output.LastUpdatedTime != null
1859
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedTime)))
1860
- : undefined,
1861
- PlannedBudgetLimits: output.PlannedBudgetLimits != null ? de_PlannedBudgetLimits(output.PlannedBudgetLimits, context) : undefined,
1862
- TimePeriod: output.TimePeriod != null ? de_TimePeriod(output.TimePeriod, context) : undefined,
1863
- TimeUnit: (0, smithy_client_1.expectString)(output.TimeUnit),
1864
- };
1595
+ return (0, smithy_client_1.take)(output, {
1596
+ AutoAdjustData: (_) => de_AutoAdjustData(_, context),
1597
+ BudgetLimit: smithy_client_1._json,
1598
+ BudgetName: smithy_client_1.expectString,
1599
+ BudgetType: smithy_client_1.expectString,
1600
+ CalculatedSpend: smithy_client_1._json,
1601
+ CostFilters: smithy_client_1._json,
1602
+ CostTypes: smithy_client_1._json,
1603
+ LastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1604
+ PlannedBudgetLimits: smithy_client_1._json,
1605
+ TimePeriod: (_) => de_TimePeriod(_, context),
1606
+ TimeUnit: smithy_client_1.expectString,
1607
+ });
1865
1608
  };
1866
1609
  const de_BudgetedAndActualAmounts = (output, context) => {
1867
- return {
1868
- ActualAmount: output.ActualAmount != null ? de_Spend(output.ActualAmount, context) : undefined,
1869
- BudgetedAmount: output.BudgetedAmount != null ? de_Spend(output.BudgetedAmount, context) : undefined,
1870
- TimePeriod: output.TimePeriod != null ? de_TimePeriod(output.TimePeriod, context) : undefined,
1871
- };
1610
+ return (0, smithy_client_1.take)(output, {
1611
+ ActualAmount: smithy_client_1._json,
1612
+ BudgetedAmount: smithy_client_1._json,
1613
+ TimePeriod: (_) => de_TimePeriod(_, context),
1614
+ });
1872
1615
  };
1873
1616
  const de_BudgetedAndActualAmountsList = (output, context) => {
1874
1617
  const retVal = (output || [])
1875
1618
  .filter((e) => e != null)
1876
1619
  .map((entry) => {
1877
- if (entry === null) {
1878
- return null;
1879
- }
1880
1620
  return de_BudgetedAndActualAmounts(entry, context);
1881
1621
  });
1882
1622
  return retVal;
1883
1623
  };
1884
1624
  const de_BudgetNotificationsForAccount = (output, context) => {
1885
- return {
1886
- BudgetName: (0, smithy_client_1.expectString)(output.BudgetName),
1887
- Notifications: output.Notifications != null ? de_Notifications(output.Notifications, context) : undefined,
1888
- };
1625
+ return (0, smithy_client_1.take)(output, {
1626
+ BudgetName: smithy_client_1.expectString,
1627
+ Notifications: (_) => de_Notifications(_, context),
1628
+ });
1889
1629
  };
1890
1630
  const de_BudgetNotificationsForAccountList = (output, context) => {
1891
1631
  const retVal = (output || [])
1892
1632
  .filter((e) => e != null)
1893
1633
  .map((entry) => {
1894
- if (entry === null) {
1895
- return null;
1896
- }
1897
1634
  return de_BudgetNotificationsForAccount(entry, context);
1898
1635
  });
1899
1636
  return retVal;
1900
1637
  };
1901
1638
  const de_BudgetPerformanceHistory = (output, context) => {
1902
- return {
1903
- BudgetName: (0, smithy_client_1.expectString)(output.BudgetName),
1904
- BudgetType: (0, smithy_client_1.expectString)(output.BudgetType),
1905
- BudgetedAndActualAmountsList: output.BudgetedAndActualAmountsList != null
1906
- ? de_BudgetedAndActualAmountsList(output.BudgetedAndActualAmountsList, context)
1907
- : undefined,
1908
- CostFilters: output.CostFilters != null ? de_CostFilters(output.CostFilters, context) : undefined,
1909
- CostTypes: output.CostTypes != null ? de_CostTypes(output.CostTypes, context) : undefined,
1910
- TimeUnit: (0, smithy_client_1.expectString)(output.TimeUnit),
1911
- };
1639
+ return (0, smithy_client_1.take)(output, {
1640
+ BudgetName: smithy_client_1.expectString,
1641
+ BudgetType: smithy_client_1.expectString,
1642
+ BudgetedAndActualAmountsList: (_) => de_BudgetedAndActualAmountsList(_, context),
1643
+ CostFilters: smithy_client_1._json,
1644
+ CostTypes: smithy_client_1._json,
1645
+ TimeUnit: smithy_client_1.expectString,
1646
+ });
1912
1647
  };
1913
1648
  const de_Budgets = (output, context) => {
1914
1649
  const retVal = (output || [])
1915
1650
  .filter((e) => e != null)
1916
1651
  .map((entry) => {
1917
- if (entry === null) {
1918
- return null;
1919
- }
1920
1652
  return de_Budget(entry, context);
1921
1653
  });
1922
1654
  return retVal;
1923
1655
  };
1924
- const de_CalculatedSpend = (output, context) => {
1925
- return {
1926
- ActualSpend: output.ActualSpend != null ? de_Spend(output.ActualSpend, context) : undefined,
1927
- ForecastedSpend: output.ForecastedSpend != null ? de_Spend(output.ForecastedSpend, context) : undefined,
1928
- };
1929
- };
1930
- const de_CostFilters = (output, context) => {
1931
- return Object.entries(output).reduce((acc, [key, value]) => {
1932
- if (value === null) {
1933
- return acc;
1934
- }
1935
- acc[key] = de_DimensionValues(value, context);
1936
- return acc;
1937
- }, {});
1938
- };
1939
- const de_CostTypes = (output, context) => {
1940
- return {
1941
- IncludeCredit: (0, smithy_client_1.expectBoolean)(output.IncludeCredit),
1942
- IncludeDiscount: (0, smithy_client_1.expectBoolean)(output.IncludeDiscount),
1943
- IncludeOtherSubscription: (0, smithy_client_1.expectBoolean)(output.IncludeOtherSubscription),
1944
- IncludeRecurring: (0, smithy_client_1.expectBoolean)(output.IncludeRecurring),
1945
- IncludeRefund: (0, smithy_client_1.expectBoolean)(output.IncludeRefund),
1946
- IncludeSubscription: (0, smithy_client_1.expectBoolean)(output.IncludeSubscription),
1947
- IncludeSupport: (0, smithy_client_1.expectBoolean)(output.IncludeSupport),
1948
- IncludeTax: (0, smithy_client_1.expectBoolean)(output.IncludeTax),
1949
- IncludeUpfront: (0, smithy_client_1.expectBoolean)(output.IncludeUpfront),
1950
- UseAmortized: (0, smithy_client_1.expectBoolean)(output.UseAmortized),
1951
- UseBlended: (0, smithy_client_1.expectBoolean)(output.UseBlended),
1952
- };
1953
- };
1954
- const de_CreateBudgetActionResponse = (output, context) => {
1955
- return {
1956
- AccountId: (0, smithy_client_1.expectString)(output.AccountId),
1957
- ActionId: (0, smithy_client_1.expectString)(output.ActionId),
1958
- BudgetName: (0, smithy_client_1.expectString)(output.BudgetName),
1959
- };
1960
- };
1961
- const de_CreateBudgetResponse = (output, context) => {
1962
- return {};
1963
- };
1964
- const de_CreateNotificationResponse = (output, context) => {
1965
- return {};
1966
- };
1967
- const de_CreateSubscriberResponse = (output, context) => {
1968
- return {};
1969
- };
1970
- const de_CreationLimitExceededException = (output, context) => {
1971
- return {
1972
- Message: (0, smithy_client_1.expectString)(output.Message),
1973
- };
1974
- };
1975
- const de_Definition = (output, context) => {
1976
- return {
1977
- IamActionDefinition: output.IamActionDefinition != null ? de_IamActionDefinition(output.IamActionDefinition, context) : undefined,
1978
- ScpActionDefinition: output.ScpActionDefinition != null ? de_ScpActionDefinition(output.ScpActionDefinition, context) : undefined,
1979
- SsmActionDefinition: output.SsmActionDefinition != null ? de_SsmActionDefinition(output.SsmActionDefinition, context) : undefined,
1980
- };
1981
- };
1982
1656
  const de_DeleteBudgetActionResponse = (output, context) => {
1983
- return {
1984
- AccountId: (0, smithy_client_1.expectString)(output.AccountId),
1985
- Action: output.Action != null ? de_Action(output.Action, context) : undefined,
1986
- BudgetName: (0, smithy_client_1.expectString)(output.BudgetName),
1987
- };
1988
- };
1989
- const de_DeleteBudgetResponse = (output, context) => {
1990
- return {};
1991
- };
1992
- const de_DeleteNotificationResponse = (output, context) => {
1993
- return {};
1994
- };
1995
- const de_DeleteSubscriberResponse = (output, context) => {
1996
- return {};
1657
+ return (0, smithy_client_1.take)(output, {
1658
+ AccountId: smithy_client_1.expectString,
1659
+ Action: (_) => de_Action(_, context),
1660
+ BudgetName: smithy_client_1.expectString,
1661
+ });
1997
1662
  };
1998
1663
  const de_DescribeBudgetActionHistoriesResponse = (output, context) => {
1999
- return {
2000
- ActionHistories: output.ActionHistories != null ? de_ActionHistories(output.ActionHistories, context) : undefined,
2001
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
2002
- };
1664
+ return (0, smithy_client_1.take)(output, {
1665
+ ActionHistories: (_) => de_ActionHistories(_, context),
1666
+ NextToken: smithy_client_1.expectString,
1667
+ });
2003
1668
  };
2004
1669
  const de_DescribeBudgetActionResponse = (output, context) => {
2005
- return {
2006
- AccountId: (0, smithy_client_1.expectString)(output.AccountId),
2007
- Action: output.Action != null ? de_Action(output.Action, context) : undefined,
2008
- BudgetName: (0, smithy_client_1.expectString)(output.BudgetName),
2009
- };
1670
+ return (0, smithy_client_1.take)(output, {
1671
+ AccountId: smithy_client_1.expectString,
1672
+ Action: (_) => de_Action(_, context),
1673
+ BudgetName: smithy_client_1.expectString,
1674
+ });
2010
1675
  };
2011
1676
  const de_DescribeBudgetActionsForAccountResponse = (output, context) => {
2012
- return {
2013
- Actions: output.Actions != null ? de_Actions(output.Actions, context) : undefined,
2014
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
2015
- };
1677
+ return (0, smithy_client_1.take)(output, {
1678
+ Actions: (_) => de_Actions(_, context),
1679
+ NextToken: smithy_client_1.expectString,
1680
+ });
2016
1681
  };
2017
1682
  const de_DescribeBudgetActionsForBudgetResponse = (output, context) => {
2018
- return {
2019
- Actions: output.Actions != null ? de_Actions(output.Actions, context) : undefined,
2020
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
2021
- };
1683
+ return (0, smithy_client_1.take)(output, {
1684
+ Actions: (_) => de_Actions(_, context),
1685
+ NextToken: smithy_client_1.expectString,
1686
+ });
2022
1687
  };
2023
1688
  const de_DescribeBudgetNotificationsForAccountResponse = (output, context) => {
2024
- return {
2025
- BudgetNotificationsForAccount: output.BudgetNotificationsForAccount != null
2026
- ? de_BudgetNotificationsForAccountList(output.BudgetNotificationsForAccount, context)
2027
- : undefined,
2028
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
2029
- };
1689
+ return (0, smithy_client_1.take)(output, {
1690
+ BudgetNotificationsForAccount: (_) => de_BudgetNotificationsForAccountList(_, context),
1691
+ NextToken: smithy_client_1.expectString,
1692
+ });
2030
1693
  };
2031
1694
  const de_DescribeBudgetPerformanceHistoryResponse = (output, context) => {
2032
- return {
2033
- BudgetPerformanceHistory: output.BudgetPerformanceHistory != null
2034
- ? de_BudgetPerformanceHistory(output.BudgetPerformanceHistory, context)
2035
- : undefined,
2036
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
2037
- };
1695
+ return (0, smithy_client_1.take)(output, {
1696
+ BudgetPerformanceHistory: (_) => de_BudgetPerformanceHistory(_, context),
1697
+ NextToken: smithy_client_1.expectString,
1698
+ });
2038
1699
  };
2039
1700
  const de_DescribeBudgetResponse = (output, context) => {
2040
- return {
2041
- Budget: output.Budget != null ? de_Budget(output.Budget, context) : undefined,
2042
- };
2043
- };
2044
- const de_DescribeBudgetsResponse = (output, context) => {
2045
- return {
2046
- Budgets: output.Budgets != null ? de_Budgets(output.Budgets, context) : undefined,
2047
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
2048
- };
2049
- };
2050
- const de_DescribeNotificationsForBudgetResponse = (output, context) => {
2051
- return {
2052
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
2053
- Notifications: output.Notifications != null ? de_Notifications(output.Notifications, context) : undefined,
2054
- };
2055
- };
2056
- const de_DescribeSubscribersForNotificationResponse = (output, context) => {
2057
- return {
2058
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
2059
- Subscribers: output.Subscribers != null ? de_Subscribers(output.Subscribers, context) : undefined,
2060
- };
2061
- };
2062
- const de_DimensionValues = (output, context) => {
2063
- const retVal = (output || [])
2064
- .filter((e) => e != null)
2065
- .map((entry) => {
2066
- if (entry === null) {
2067
- return null;
2068
- }
2069
- return (0, smithy_client_1.expectString)(entry);
1701
+ return (0, smithy_client_1.take)(output, {
1702
+ Budget: (_) => de_Budget(_, context),
2070
1703
  });
2071
- return retVal;
2072
- };
2073
- const de_DuplicateRecordException = (output, context) => {
2074
- return {
2075
- Message: (0, smithy_client_1.expectString)(output.Message),
2076
- };
2077
- };
2078
- const de_ExecuteBudgetActionResponse = (output, context) => {
2079
- return {
2080
- AccountId: (0, smithy_client_1.expectString)(output.AccountId),
2081
- ActionId: (0, smithy_client_1.expectString)(output.ActionId),
2082
- BudgetName: (0, smithy_client_1.expectString)(output.BudgetName),
2083
- ExecutionType: (0, smithy_client_1.expectString)(output.ExecutionType),
2084
- };
2085
1704
  };
2086
- const de_ExpiredNextTokenException = (output, context) => {
2087
- return {
2088
- Message: (0, smithy_client_1.expectString)(output.Message),
2089
- };
2090
- };
2091
- const de_Groups = (output, context) => {
2092
- const retVal = (output || [])
2093
- .filter((e) => e != null)
2094
- .map((entry) => {
2095
- if (entry === null) {
2096
- return null;
2097
- }
2098
- return (0, smithy_client_1.expectString)(entry);
1705
+ const de_DescribeBudgetsResponse = (output, context) => {
1706
+ return (0, smithy_client_1.take)(output, {
1707
+ Budgets: (_) => de_Budgets(_, context),
1708
+ NextToken: smithy_client_1.expectString,
2099
1709
  });
2100
- return retVal;
2101
- };
2102
- const de_HistoricalOptions = (output, context) => {
2103
- return {
2104
- BudgetAdjustmentPeriod: (0, smithy_client_1.expectInt32)(output.BudgetAdjustmentPeriod),
2105
- LookBackAvailablePeriods: (0, smithy_client_1.expectInt32)(output.LookBackAvailablePeriods),
2106
- };
2107
1710
  };
2108
- const de_IamActionDefinition = (output, context) => {
2109
- return {
2110
- Groups: output.Groups != null ? de_Groups(output.Groups, context) : undefined,
2111
- PolicyArn: (0, smithy_client_1.expectString)(output.PolicyArn),
2112
- Roles: output.Roles != null ? de_Roles(output.Roles, context) : undefined,
2113
- Users: output.Users != null ? de_Users(output.Users, context) : undefined,
2114
- };
2115
- };
2116
- const de_InstanceIds = (output, context) => {
2117
- const retVal = (output || [])
2118
- .filter((e) => e != null)
2119
- .map((entry) => {
2120
- if (entry === null) {
2121
- return null;
2122
- }
2123
- return (0, smithy_client_1.expectString)(entry);
1711
+ const de_DescribeNotificationsForBudgetResponse = (output, context) => {
1712
+ return (0, smithy_client_1.take)(output, {
1713
+ NextToken: smithy_client_1.expectString,
1714
+ Notifications: (_) => de_Notifications(_, context),
2124
1715
  });
2125
- return retVal;
2126
- };
2127
- const de_InternalErrorException = (output, context) => {
2128
- return {
2129
- Message: (0, smithy_client_1.expectString)(output.Message),
2130
- };
2131
- };
2132
- const de_InvalidNextTokenException = (output, context) => {
2133
- return {
2134
- Message: (0, smithy_client_1.expectString)(output.Message),
2135
- };
2136
- };
2137
- const de_InvalidParameterException = (output, context) => {
2138
- return {
2139
- Message: (0, smithy_client_1.expectString)(output.Message),
2140
- };
2141
- };
2142
- const de_NotFoundException = (output, context) => {
2143
- return {
2144
- Message: (0, smithy_client_1.expectString)(output.Message),
2145
- };
2146
1716
  };
2147
1717
  const de_Notification = (output, context) => {
2148
- return {
2149
- ComparisonOperator: (0, smithy_client_1.expectString)(output.ComparisonOperator),
2150
- NotificationState: (0, smithy_client_1.expectString)(output.NotificationState),
2151
- NotificationType: (0, smithy_client_1.expectString)(output.NotificationType),
2152
- Threshold: (0, smithy_client_1.limitedParseDouble)(output.Threshold),
2153
- ThresholdType: (0, smithy_client_1.expectString)(output.ThresholdType),
2154
- };
1718
+ return (0, smithy_client_1.take)(output, {
1719
+ ComparisonOperator: smithy_client_1.expectString,
1720
+ NotificationState: smithy_client_1.expectString,
1721
+ NotificationType: smithy_client_1.expectString,
1722
+ Threshold: smithy_client_1.limitedParseDouble,
1723
+ ThresholdType: smithy_client_1.expectString,
1724
+ });
2155
1725
  };
2156
1726
  const de_Notifications = (output, context) => {
2157
1727
  const retVal = (output || [])
2158
1728
  .filter((e) => e != null)
2159
1729
  .map((entry) => {
2160
- if (entry === null) {
2161
- return null;
2162
- }
2163
1730
  return de_Notification(entry, context);
2164
1731
  });
2165
1732
  return retVal;
2166
1733
  };
2167
- const de_PlannedBudgetLimits = (output, context) => {
2168
- return Object.entries(output).reduce((acc, [key, value]) => {
2169
- if (value === null) {
2170
- return acc;
2171
- }
2172
- acc[key] = de_Spend(value, context);
2173
- return acc;
2174
- }, {});
2175
- };
2176
- const de_ResourceLockedException = (output, context) => {
2177
- return {
2178
- Message: (0, smithy_client_1.expectString)(output.Message),
2179
- };
2180
- };
2181
- const de_Roles = (output, context) => {
2182
- const retVal = (output || [])
2183
- .filter((e) => e != null)
2184
- .map((entry) => {
2185
- if (entry === null) {
2186
- return null;
2187
- }
2188
- return (0, smithy_client_1.expectString)(entry);
2189
- });
2190
- return retVal;
2191
- };
2192
- const de_ScpActionDefinition = (output, context) => {
2193
- return {
2194
- PolicyId: (0, smithy_client_1.expectString)(output.PolicyId),
2195
- TargetIds: output.TargetIds != null ? de_TargetIds(output.TargetIds, context) : undefined,
2196
- };
2197
- };
2198
- const de_Spend = (output, context) => {
2199
- return {
2200
- Amount: (0, smithy_client_1.expectString)(output.Amount),
2201
- Unit: (0, smithy_client_1.expectString)(output.Unit),
2202
- };
2203
- };
2204
- const de_SsmActionDefinition = (output, context) => {
2205
- return {
2206
- ActionSubType: (0, smithy_client_1.expectString)(output.ActionSubType),
2207
- InstanceIds: output.InstanceIds != null ? de_InstanceIds(output.InstanceIds, context) : undefined,
2208
- Region: (0, smithy_client_1.expectString)(output.Region),
2209
- };
2210
- };
2211
- const de_Subscriber = (output, context) => {
2212
- return {
2213
- Address: (0, smithy_client_1.expectString)(output.Address),
2214
- SubscriptionType: (0, smithy_client_1.expectString)(output.SubscriptionType),
2215
- };
2216
- };
2217
- const de_Subscribers = (output, context) => {
2218
- const retVal = (output || [])
2219
- .filter((e) => e != null)
2220
- .map((entry) => {
2221
- if (entry === null) {
2222
- return null;
2223
- }
2224
- return de_Subscriber(entry, context);
2225
- });
2226
- return retVal;
2227
- };
2228
- const de_TargetIds = (output, context) => {
2229
- const retVal = (output || [])
2230
- .filter((e) => e != null)
2231
- .map((entry) => {
2232
- if (entry === null) {
2233
- return null;
2234
- }
2235
- return (0, smithy_client_1.expectString)(entry);
2236
- });
2237
- return retVal;
2238
- };
2239
- const de_ThrottlingException = (output, context) => {
2240
- return {
2241
- Message: (0, smithy_client_1.expectString)(output.Message),
2242
- };
2243
- };
2244
1734
  const de_TimePeriod = (output, context) => {
2245
- return {
2246
- End: output.End != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.End))) : undefined,
2247
- Start: output.Start != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.Start))) : undefined,
2248
- };
1735
+ return (0, smithy_client_1.take)(output, {
1736
+ End: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1737
+ Start: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1738
+ });
2249
1739
  };
2250
1740
  const de_UpdateBudgetActionResponse = (output, context) => {
2251
- return {
2252
- AccountId: (0, smithy_client_1.expectString)(output.AccountId),
2253
- BudgetName: (0, smithy_client_1.expectString)(output.BudgetName),
2254
- NewAction: output.NewAction != null ? de_Action(output.NewAction, context) : undefined,
2255
- OldAction: output.OldAction != null ? de_Action(output.OldAction, context) : undefined,
2256
- };
2257
- };
2258
- const de_UpdateBudgetResponse = (output, context) => {
2259
- return {};
2260
- };
2261
- const de_UpdateNotificationResponse = (output, context) => {
2262
- return {};
2263
- };
2264
- const de_UpdateSubscriberResponse = (output, context) => {
2265
- return {};
2266
- };
2267
- const de_Users = (output, context) => {
2268
- const retVal = (output || [])
2269
- .filter((e) => e != null)
2270
- .map((entry) => {
2271
- if (entry === null) {
2272
- return null;
2273
- }
2274
- return (0, smithy_client_1.expectString)(entry);
1741
+ return (0, smithy_client_1.take)(output, {
1742
+ AccountId: smithy_client_1.expectString,
1743
+ BudgetName: smithy_client_1.expectString,
1744
+ NewAction: (_) => de_Action(_, context),
1745
+ OldAction: (_) => de_Action(_, context),
2275
1746
  });
2276
- return retVal;
2277
1747
  };
2278
1748
  const deserializeMetadata = (output) => ({
2279
1749
  httpStatusCode: output.statusCode,
@@ -2288,6 +1758,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
2288
1758
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2289
1759
  };
2290
1760
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1761
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(BudgetsServiceException_1.BudgetsServiceException);
2291
1762
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2292
1763
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2293
1764
  const contents = {