@aws-sdk/client-billingconductor 3.489.0 → 3.495.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist-cjs/Billingconductor.js +1 -75
  2. package/dist-cjs/BillingconductorClient.js +1 -43
  3. package/dist-cjs/commands/AssociateAccountsCommand.js +1 -28
  4. package/dist-cjs/commands/AssociatePricingRulesCommand.js +1 -28
  5. package/dist-cjs/commands/BatchAssociateResourcesToCustomLineItemCommand.js +1 -28
  6. package/dist-cjs/commands/BatchDisassociateResourcesFromCustomLineItemCommand.js +1 -28
  7. package/dist-cjs/commands/CreateBillingGroupCommand.js +1 -29
  8. package/dist-cjs/commands/CreateCustomLineItemCommand.js +1 -29
  9. package/dist-cjs/commands/CreatePricingPlanCommand.js +1 -29
  10. package/dist-cjs/commands/CreatePricingRuleCommand.js +1 -29
  11. package/dist-cjs/commands/DeleteBillingGroupCommand.js +1 -28
  12. package/dist-cjs/commands/DeleteCustomLineItemCommand.js +1 -28
  13. package/dist-cjs/commands/DeletePricingPlanCommand.js +1 -28
  14. package/dist-cjs/commands/DeletePricingRuleCommand.js +1 -28
  15. package/dist-cjs/commands/DisassociateAccountsCommand.js +1 -28
  16. package/dist-cjs/commands/DisassociatePricingRulesCommand.js +1 -28
  17. package/dist-cjs/commands/GetBillingGroupCostReportCommand.js +1 -28
  18. package/dist-cjs/commands/ListAccountAssociationsCommand.js +1 -29
  19. package/dist-cjs/commands/ListBillingGroupCostReportsCommand.js +1 -28
  20. package/dist-cjs/commands/ListBillingGroupsCommand.js +1 -29
  21. package/dist-cjs/commands/ListCustomLineItemVersionsCommand.js +1 -29
  22. package/dist-cjs/commands/ListCustomLineItemsCommand.js +1 -29
  23. package/dist-cjs/commands/ListPricingPlansAssociatedWithPricingRuleCommand.js +1 -28
  24. package/dist-cjs/commands/ListPricingPlansCommand.js +1 -29
  25. package/dist-cjs/commands/ListPricingRulesAssociatedToPricingPlanCommand.js +1 -28
  26. package/dist-cjs/commands/ListPricingRulesCommand.js +1 -29
  27. package/dist-cjs/commands/ListResourcesAssociatedToCustomLineItemCommand.js +1 -28
  28. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
  29. package/dist-cjs/commands/TagResourceCommand.js +1 -28
  30. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  31. package/dist-cjs/commands/UpdateBillingGroupCommand.js +1 -29
  32. package/dist-cjs/commands/UpdateCustomLineItemCommand.js +1 -29
  33. package/dist-cjs/commands/UpdatePricingPlanCommand.js +1 -29
  34. package/dist-cjs/commands/UpdatePricingRuleCommand.js +1 -29
  35. package/dist-cjs/commands/index.js +1 -35
  36. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  37. package/dist-cjs/extensionConfiguration.js +1 -2
  38. package/dist-cjs/index.js +3717 -11
  39. package/dist-cjs/models/BillingconductorServiceException.js +1 -12
  40. package/dist-cjs/models/index.js +1 -4
  41. package/dist-cjs/models/models_0.js +1 -392
  42. package/dist-cjs/pagination/GetBillingGroupCostReportPaginator.js +1 -7
  43. package/dist-cjs/pagination/Interfaces.js +1 -2
  44. package/dist-cjs/pagination/ListAccountAssociationsPaginator.js +1 -7
  45. package/dist-cjs/pagination/ListBillingGroupCostReportsPaginator.js +1 -7
  46. package/dist-cjs/pagination/ListBillingGroupsPaginator.js +1 -7
  47. package/dist-cjs/pagination/ListCustomLineItemVersionsPaginator.js +1 -7
  48. package/dist-cjs/pagination/ListCustomLineItemsPaginator.js +1 -7
  49. package/dist-cjs/pagination/ListPricingPlansAssociatedWithPricingRulePaginator.js +1 -7
  50. package/dist-cjs/pagination/ListPricingPlansPaginator.js +1 -7
  51. package/dist-cjs/pagination/ListPricingRulesAssociatedToPricingPlanPaginator.js +1 -7
  52. package/dist-cjs/pagination/ListPricingRulesPaginator.js +1 -7
  53. package/dist-cjs/pagination/ListResourcesAssociatedToCustomLineItemPaginator.js +1 -7
  54. package/dist-cjs/pagination/index.js +1 -15
  55. package/dist-cjs/protocols/Aws_restJson1.js +1 -2390
  56. package/dist-cjs/runtimeExtensions.js +1 -22
  57. package/package.json +40 -40
@@ -1,2390 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_ListBillingGroupsCommand = exports.de_ListBillingGroupCostReportsCommand = exports.de_ListAccountAssociationsCommand = exports.de_GetBillingGroupCostReportCommand = exports.de_DisassociatePricingRulesCommand = exports.de_DisassociateAccountsCommand = exports.de_DeletePricingRuleCommand = exports.de_DeletePricingPlanCommand = exports.de_DeleteCustomLineItemCommand = exports.de_DeleteBillingGroupCommand = exports.de_CreatePricingRuleCommand = exports.de_CreatePricingPlanCommand = exports.de_CreateCustomLineItemCommand = exports.de_CreateBillingGroupCommand = exports.de_BatchDisassociateResourcesFromCustomLineItemCommand = exports.de_BatchAssociateResourcesToCustomLineItemCommand = exports.de_AssociatePricingRulesCommand = exports.de_AssociateAccountsCommand = exports.se_UpdatePricingRuleCommand = exports.se_UpdatePricingPlanCommand = exports.se_UpdateCustomLineItemCommand = exports.se_UpdateBillingGroupCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ListTagsForResourceCommand = exports.se_ListResourcesAssociatedToCustomLineItemCommand = exports.se_ListPricingRulesAssociatedToPricingPlanCommand = exports.se_ListPricingRulesCommand = exports.se_ListPricingPlansAssociatedWithPricingRuleCommand = exports.se_ListPricingPlansCommand = exports.se_ListCustomLineItemVersionsCommand = exports.se_ListCustomLineItemsCommand = exports.se_ListBillingGroupsCommand = exports.se_ListBillingGroupCostReportsCommand = exports.se_ListAccountAssociationsCommand = exports.se_GetBillingGroupCostReportCommand = exports.se_DisassociatePricingRulesCommand = exports.se_DisassociateAccountsCommand = exports.se_DeletePricingRuleCommand = exports.se_DeletePricingPlanCommand = exports.se_DeleteCustomLineItemCommand = exports.se_DeleteBillingGroupCommand = exports.se_CreatePricingRuleCommand = exports.se_CreatePricingPlanCommand = exports.se_CreateCustomLineItemCommand = exports.se_CreateBillingGroupCommand = exports.se_BatchDisassociateResourcesFromCustomLineItemCommand = exports.se_BatchAssociateResourcesToCustomLineItemCommand = exports.se_AssociatePricingRulesCommand = exports.se_AssociateAccountsCommand = void 0;
4
- exports.de_UpdatePricingRuleCommand = exports.de_UpdatePricingPlanCommand = exports.de_UpdateCustomLineItemCommand = exports.de_UpdateBillingGroupCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ListTagsForResourceCommand = exports.de_ListResourcesAssociatedToCustomLineItemCommand = exports.de_ListPricingRulesAssociatedToPricingPlanCommand = exports.de_ListPricingRulesCommand = exports.de_ListPricingPlansAssociatedWithPricingRuleCommand = exports.de_ListPricingPlansCommand = exports.de_ListCustomLineItemVersionsCommand = exports.de_ListCustomLineItemsCommand = void 0;
5
- const core_1 = require("@smithy/core");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- const BillingconductorServiceException_1 = require("../models/BillingconductorServiceException");
8
- const models_0_1 = require("../models/models_0");
9
- const se_AssociateAccountsCommand = async (input, context) => {
10
- const b = (0, core_1.requestBuilder)(input, context);
11
- const headers = {
12
- "content-type": "application/json",
13
- };
14
- b.bp("/associate-accounts");
15
- let body;
16
- body = JSON.stringify((0, smithy_client_1.take)(input, {
17
- AccountIds: (_) => (0, smithy_client_1._json)(_),
18
- Arn: [],
19
- }));
20
- b.m("POST").h(headers).b(body);
21
- return b.build();
22
- };
23
- exports.se_AssociateAccountsCommand = se_AssociateAccountsCommand;
24
- const se_AssociatePricingRulesCommand = async (input, context) => {
25
- const b = (0, core_1.requestBuilder)(input, context);
26
- const headers = {
27
- "content-type": "application/json",
28
- };
29
- b.bp("/associate-pricing-rules");
30
- let body;
31
- body = JSON.stringify((0, smithy_client_1.take)(input, {
32
- Arn: [],
33
- PricingRuleArns: (_) => (0, smithy_client_1._json)(_),
34
- }));
35
- b.m("PUT").h(headers).b(body);
36
- return b.build();
37
- };
38
- exports.se_AssociatePricingRulesCommand = se_AssociatePricingRulesCommand;
39
- const se_BatchAssociateResourcesToCustomLineItemCommand = async (input, context) => {
40
- const b = (0, core_1.requestBuilder)(input, context);
41
- const headers = {
42
- "content-type": "application/json",
43
- };
44
- b.bp("/batch-associate-resources-to-custom-line-item");
45
- let body;
46
- body = JSON.stringify((0, smithy_client_1.take)(input, {
47
- BillingPeriodRange: (_) => (0, smithy_client_1._json)(_),
48
- ResourceArns: (_) => (0, smithy_client_1._json)(_),
49
- TargetArn: [],
50
- }));
51
- b.m("PUT").h(headers).b(body);
52
- return b.build();
53
- };
54
- exports.se_BatchAssociateResourcesToCustomLineItemCommand = se_BatchAssociateResourcesToCustomLineItemCommand;
55
- const se_BatchDisassociateResourcesFromCustomLineItemCommand = async (input, context) => {
56
- const b = (0, core_1.requestBuilder)(input, context);
57
- const headers = {
58
- "content-type": "application/json",
59
- };
60
- b.bp("/batch-disassociate-resources-from-custom-line-item");
61
- let body;
62
- body = JSON.stringify((0, smithy_client_1.take)(input, {
63
- BillingPeriodRange: (_) => (0, smithy_client_1._json)(_),
64
- ResourceArns: (_) => (0, smithy_client_1._json)(_),
65
- TargetArn: [],
66
- }));
67
- b.m("PUT").h(headers).b(body);
68
- return b.build();
69
- };
70
- exports.se_BatchDisassociateResourcesFromCustomLineItemCommand = se_BatchDisassociateResourcesFromCustomLineItemCommand;
71
- const se_CreateBillingGroupCommand = async (input, context) => {
72
- const b = (0, core_1.requestBuilder)(input, context);
73
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
74
- "content-type": "application/json",
75
- [_xact]: input[_CT],
76
- });
77
- b.bp("/create-billing-group");
78
- let body;
79
- body = JSON.stringify((0, smithy_client_1.take)(input, {
80
- AccountGrouping: (_) => (0, smithy_client_1._json)(_),
81
- ComputationPreference: (_) => (0, smithy_client_1._json)(_),
82
- Description: [],
83
- Name: [],
84
- PrimaryAccountId: [],
85
- Tags: (_) => (0, smithy_client_1._json)(_),
86
- }));
87
- b.m("POST").h(headers).b(body);
88
- return b.build();
89
- };
90
- exports.se_CreateBillingGroupCommand = se_CreateBillingGroupCommand;
91
- const se_CreateCustomLineItemCommand = async (input, context) => {
92
- const b = (0, core_1.requestBuilder)(input, context);
93
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
94
- "content-type": "application/json",
95
- [_xact]: input[_CT],
96
- });
97
- b.bp("/create-custom-line-item");
98
- let body;
99
- body = JSON.stringify((0, smithy_client_1.take)(input, {
100
- AccountId: [],
101
- BillingGroupArn: [],
102
- BillingPeriodRange: (_) => (0, smithy_client_1._json)(_),
103
- ChargeDetails: (_) => se_CustomLineItemChargeDetails(_, context),
104
- Description: [],
105
- Name: [],
106
- Tags: (_) => (0, smithy_client_1._json)(_),
107
- }));
108
- b.m("POST").h(headers).b(body);
109
- return b.build();
110
- };
111
- exports.se_CreateCustomLineItemCommand = se_CreateCustomLineItemCommand;
112
- const se_CreatePricingPlanCommand = async (input, context) => {
113
- const b = (0, core_1.requestBuilder)(input, context);
114
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
115
- "content-type": "application/json",
116
- [_xact]: input[_CT],
117
- });
118
- b.bp("/create-pricing-plan");
119
- let body;
120
- body = JSON.stringify((0, smithy_client_1.take)(input, {
121
- Description: [],
122
- Name: [],
123
- PricingRuleArns: (_) => (0, smithy_client_1._json)(_),
124
- Tags: (_) => (0, smithy_client_1._json)(_),
125
- }));
126
- b.m("POST").h(headers).b(body);
127
- return b.build();
128
- };
129
- exports.se_CreatePricingPlanCommand = se_CreatePricingPlanCommand;
130
- const se_CreatePricingRuleCommand = async (input, context) => {
131
- const b = (0, core_1.requestBuilder)(input, context);
132
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
133
- "content-type": "application/json",
134
- [_xact]: input[_CT],
135
- });
136
- b.bp("/create-pricing-rule");
137
- let body;
138
- body = JSON.stringify((0, smithy_client_1.take)(input, {
139
- BillingEntity: [],
140
- Description: [],
141
- ModifierPercentage: (_) => (0, smithy_client_1.serializeFloat)(_),
142
- Name: [],
143
- Operation: [],
144
- Scope: [],
145
- Service: [],
146
- Tags: (_) => (0, smithy_client_1._json)(_),
147
- Tiering: (_) => (0, smithy_client_1._json)(_),
148
- Type: [],
149
- UsageType: [],
150
- }));
151
- b.m("POST").h(headers).b(body);
152
- return b.build();
153
- };
154
- exports.se_CreatePricingRuleCommand = se_CreatePricingRuleCommand;
155
- const se_DeleteBillingGroupCommand = async (input, context) => {
156
- const b = (0, core_1.requestBuilder)(input, context);
157
- const headers = {
158
- "content-type": "application/json",
159
- };
160
- b.bp("/delete-billing-group");
161
- let body;
162
- body = JSON.stringify((0, smithy_client_1.take)(input, {
163
- Arn: [],
164
- }));
165
- b.m("POST").h(headers).b(body);
166
- return b.build();
167
- };
168
- exports.se_DeleteBillingGroupCommand = se_DeleteBillingGroupCommand;
169
- const se_DeleteCustomLineItemCommand = async (input, context) => {
170
- const b = (0, core_1.requestBuilder)(input, context);
171
- const headers = {
172
- "content-type": "application/json",
173
- };
174
- b.bp("/delete-custom-line-item");
175
- let body;
176
- body = JSON.stringify((0, smithy_client_1.take)(input, {
177
- Arn: [],
178
- BillingPeriodRange: (_) => (0, smithy_client_1._json)(_),
179
- }));
180
- b.m("POST").h(headers).b(body);
181
- return b.build();
182
- };
183
- exports.se_DeleteCustomLineItemCommand = se_DeleteCustomLineItemCommand;
184
- const se_DeletePricingPlanCommand = async (input, context) => {
185
- const b = (0, core_1.requestBuilder)(input, context);
186
- const headers = {
187
- "content-type": "application/json",
188
- };
189
- b.bp("/delete-pricing-plan");
190
- let body;
191
- body = JSON.stringify((0, smithy_client_1.take)(input, {
192
- Arn: [],
193
- }));
194
- b.m("POST").h(headers).b(body);
195
- return b.build();
196
- };
197
- exports.se_DeletePricingPlanCommand = se_DeletePricingPlanCommand;
198
- const se_DeletePricingRuleCommand = async (input, context) => {
199
- const b = (0, core_1.requestBuilder)(input, context);
200
- const headers = {
201
- "content-type": "application/json",
202
- };
203
- b.bp("/delete-pricing-rule");
204
- let body;
205
- body = JSON.stringify((0, smithy_client_1.take)(input, {
206
- Arn: [],
207
- }));
208
- b.m("POST").h(headers).b(body);
209
- return b.build();
210
- };
211
- exports.se_DeletePricingRuleCommand = se_DeletePricingRuleCommand;
212
- const se_DisassociateAccountsCommand = async (input, context) => {
213
- const b = (0, core_1.requestBuilder)(input, context);
214
- const headers = {
215
- "content-type": "application/json",
216
- };
217
- b.bp("/disassociate-accounts");
218
- let body;
219
- body = JSON.stringify((0, smithy_client_1.take)(input, {
220
- AccountIds: (_) => (0, smithy_client_1._json)(_),
221
- Arn: [],
222
- }));
223
- b.m("POST").h(headers).b(body);
224
- return b.build();
225
- };
226
- exports.se_DisassociateAccountsCommand = se_DisassociateAccountsCommand;
227
- const se_DisassociatePricingRulesCommand = async (input, context) => {
228
- const b = (0, core_1.requestBuilder)(input, context);
229
- const headers = {
230
- "content-type": "application/json",
231
- };
232
- b.bp("/disassociate-pricing-rules");
233
- let body;
234
- body = JSON.stringify((0, smithy_client_1.take)(input, {
235
- Arn: [],
236
- PricingRuleArns: (_) => (0, smithy_client_1._json)(_),
237
- }));
238
- b.m("PUT").h(headers).b(body);
239
- return b.build();
240
- };
241
- exports.se_DisassociatePricingRulesCommand = se_DisassociatePricingRulesCommand;
242
- const se_GetBillingGroupCostReportCommand = async (input, context) => {
243
- const b = (0, core_1.requestBuilder)(input, context);
244
- const headers = {
245
- "content-type": "application/json",
246
- };
247
- b.bp("/get-billing-group-cost-report");
248
- let body;
249
- body = JSON.stringify((0, smithy_client_1.take)(input, {
250
- Arn: [],
251
- BillingPeriodRange: (_) => (0, smithy_client_1._json)(_),
252
- GroupBy: (_) => (0, smithy_client_1._json)(_),
253
- MaxResults: [],
254
- NextToken: [],
255
- }));
256
- b.m("POST").h(headers).b(body);
257
- return b.build();
258
- };
259
- exports.se_GetBillingGroupCostReportCommand = se_GetBillingGroupCostReportCommand;
260
- const se_ListAccountAssociationsCommand = async (input, context) => {
261
- const b = (0, core_1.requestBuilder)(input, context);
262
- const headers = {
263
- "content-type": "application/json",
264
- };
265
- b.bp("/list-account-associations");
266
- let body;
267
- body = JSON.stringify((0, smithy_client_1.take)(input, {
268
- BillingPeriod: [],
269
- Filters: (_) => (0, smithy_client_1._json)(_),
270
- NextToken: [],
271
- }));
272
- b.m("POST").h(headers).b(body);
273
- return b.build();
274
- };
275
- exports.se_ListAccountAssociationsCommand = se_ListAccountAssociationsCommand;
276
- const se_ListBillingGroupCostReportsCommand = async (input, context) => {
277
- const b = (0, core_1.requestBuilder)(input, context);
278
- const headers = {
279
- "content-type": "application/json",
280
- };
281
- b.bp("/list-billing-group-cost-reports");
282
- let body;
283
- body = JSON.stringify((0, smithy_client_1.take)(input, {
284
- BillingPeriod: [],
285
- Filters: (_) => (0, smithy_client_1._json)(_),
286
- MaxResults: [],
287
- NextToken: [],
288
- }));
289
- b.m("POST").h(headers).b(body);
290
- return b.build();
291
- };
292
- exports.se_ListBillingGroupCostReportsCommand = se_ListBillingGroupCostReportsCommand;
293
- const se_ListBillingGroupsCommand = async (input, context) => {
294
- const b = (0, core_1.requestBuilder)(input, context);
295
- const headers = {
296
- "content-type": "application/json",
297
- };
298
- b.bp("/list-billing-groups");
299
- let body;
300
- body = JSON.stringify((0, smithy_client_1.take)(input, {
301
- BillingPeriod: [],
302
- Filters: (_) => (0, smithy_client_1._json)(_),
303
- MaxResults: [],
304
- NextToken: [],
305
- }));
306
- b.m("POST").h(headers).b(body);
307
- return b.build();
308
- };
309
- exports.se_ListBillingGroupsCommand = se_ListBillingGroupsCommand;
310
- const se_ListCustomLineItemsCommand = async (input, context) => {
311
- const b = (0, core_1.requestBuilder)(input, context);
312
- const headers = {
313
- "content-type": "application/json",
314
- };
315
- b.bp("/list-custom-line-items");
316
- let body;
317
- body = JSON.stringify((0, smithy_client_1.take)(input, {
318
- BillingPeriod: [],
319
- Filters: (_) => (0, smithy_client_1._json)(_),
320
- MaxResults: [],
321
- NextToken: [],
322
- }));
323
- b.m("POST").h(headers).b(body);
324
- return b.build();
325
- };
326
- exports.se_ListCustomLineItemsCommand = se_ListCustomLineItemsCommand;
327
- const se_ListCustomLineItemVersionsCommand = async (input, context) => {
328
- const b = (0, core_1.requestBuilder)(input, context);
329
- const headers = {
330
- "content-type": "application/json",
331
- };
332
- b.bp("/list-custom-line-item-versions");
333
- let body;
334
- body = JSON.stringify((0, smithy_client_1.take)(input, {
335
- Arn: [],
336
- Filters: (_) => (0, smithy_client_1._json)(_),
337
- MaxResults: [],
338
- NextToken: [],
339
- }));
340
- b.m("POST").h(headers).b(body);
341
- return b.build();
342
- };
343
- exports.se_ListCustomLineItemVersionsCommand = se_ListCustomLineItemVersionsCommand;
344
- const se_ListPricingPlansCommand = async (input, context) => {
345
- const b = (0, core_1.requestBuilder)(input, context);
346
- const headers = {
347
- "content-type": "application/json",
348
- };
349
- b.bp("/list-pricing-plans");
350
- let body;
351
- body = JSON.stringify((0, smithy_client_1.take)(input, {
352
- BillingPeriod: [],
353
- Filters: (_) => (0, smithy_client_1._json)(_),
354
- MaxResults: [],
355
- NextToken: [],
356
- }));
357
- b.m("POST").h(headers).b(body);
358
- return b.build();
359
- };
360
- exports.se_ListPricingPlansCommand = se_ListPricingPlansCommand;
361
- const se_ListPricingPlansAssociatedWithPricingRuleCommand = async (input, context) => {
362
- const b = (0, core_1.requestBuilder)(input, context);
363
- const headers = {
364
- "content-type": "application/json",
365
- };
366
- b.bp("/list-pricing-plans-associated-with-pricing-rule");
367
- let body;
368
- body = JSON.stringify((0, smithy_client_1.take)(input, {
369
- BillingPeriod: [],
370
- MaxResults: [],
371
- NextToken: [],
372
- PricingRuleArn: [],
373
- }));
374
- b.m("POST").h(headers).b(body);
375
- return b.build();
376
- };
377
- exports.se_ListPricingPlansAssociatedWithPricingRuleCommand = se_ListPricingPlansAssociatedWithPricingRuleCommand;
378
- const se_ListPricingRulesCommand = async (input, context) => {
379
- const b = (0, core_1.requestBuilder)(input, context);
380
- const headers = {
381
- "content-type": "application/json",
382
- };
383
- b.bp("/list-pricing-rules");
384
- let body;
385
- body = JSON.stringify((0, smithy_client_1.take)(input, {
386
- BillingPeriod: [],
387
- Filters: (_) => (0, smithy_client_1._json)(_),
388
- MaxResults: [],
389
- NextToken: [],
390
- }));
391
- b.m("POST").h(headers).b(body);
392
- return b.build();
393
- };
394
- exports.se_ListPricingRulesCommand = se_ListPricingRulesCommand;
395
- const se_ListPricingRulesAssociatedToPricingPlanCommand = async (input, context) => {
396
- const b = (0, core_1.requestBuilder)(input, context);
397
- const headers = {
398
- "content-type": "application/json",
399
- };
400
- b.bp("/list-pricing-rules-associated-to-pricing-plan");
401
- let body;
402
- body = JSON.stringify((0, smithy_client_1.take)(input, {
403
- BillingPeriod: [],
404
- MaxResults: [],
405
- NextToken: [],
406
- PricingPlanArn: [],
407
- }));
408
- b.m("POST").h(headers).b(body);
409
- return b.build();
410
- };
411
- exports.se_ListPricingRulesAssociatedToPricingPlanCommand = se_ListPricingRulesAssociatedToPricingPlanCommand;
412
- const se_ListResourcesAssociatedToCustomLineItemCommand = async (input, context) => {
413
- const b = (0, core_1.requestBuilder)(input, context);
414
- const headers = {
415
- "content-type": "application/json",
416
- };
417
- b.bp("/list-resources-associated-to-custom-line-item");
418
- let body;
419
- body = JSON.stringify((0, smithy_client_1.take)(input, {
420
- Arn: [],
421
- BillingPeriod: [],
422
- Filters: (_) => (0, smithy_client_1._json)(_),
423
- MaxResults: [],
424
- NextToken: [],
425
- }));
426
- b.m("POST").h(headers).b(body);
427
- return b.build();
428
- };
429
- exports.se_ListResourcesAssociatedToCustomLineItemCommand = se_ListResourcesAssociatedToCustomLineItemCommand;
430
- const se_ListTagsForResourceCommand = async (input, context) => {
431
- const b = (0, core_1.requestBuilder)(input, context);
432
- const headers = {};
433
- b.bp("/tags/{ResourceArn}");
434
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
435
- let body;
436
- b.m("GET").h(headers).b(body);
437
- return b.build();
438
- };
439
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
440
- const se_TagResourceCommand = async (input, context) => {
441
- const b = (0, core_1.requestBuilder)(input, context);
442
- const headers = {
443
- "content-type": "application/json",
444
- };
445
- b.bp("/tags/{ResourceArn}");
446
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
447
- let body;
448
- body = JSON.stringify((0, smithy_client_1.take)(input, {
449
- Tags: (_) => (0, smithy_client_1._json)(_),
450
- }));
451
- b.m("POST").h(headers).b(body);
452
- return b.build();
453
- };
454
- exports.se_TagResourceCommand = se_TagResourceCommand;
455
- const se_UntagResourceCommand = async (input, context) => {
456
- const b = (0, core_1.requestBuilder)(input, context);
457
- const headers = {};
458
- b.bp("/tags/{ResourceArn}");
459
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
460
- const query = (0, smithy_client_1.map)({
461
- [_tK]: [
462
- (0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
463
- () => (input[_TK] || []).map((_entry) => _entry),
464
- ],
465
- });
466
- let body;
467
- b.m("DELETE").h(headers).q(query).b(body);
468
- return b.build();
469
- };
470
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
471
- const se_UpdateBillingGroupCommand = async (input, context) => {
472
- const b = (0, core_1.requestBuilder)(input, context);
473
- const headers = {
474
- "content-type": "application/json",
475
- };
476
- b.bp("/update-billing-group");
477
- let body;
478
- body = JSON.stringify((0, smithy_client_1.take)(input, {
479
- AccountGrouping: (_) => (0, smithy_client_1._json)(_),
480
- Arn: [],
481
- ComputationPreference: (_) => (0, smithy_client_1._json)(_),
482
- Description: [],
483
- Name: [],
484
- Status: [],
485
- }));
486
- b.m("POST").h(headers).b(body);
487
- return b.build();
488
- };
489
- exports.se_UpdateBillingGroupCommand = se_UpdateBillingGroupCommand;
490
- const se_UpdateCustomLineItemCommand = async (input, context) => {
491
- const b = (0, core_1.requestBuilder)(input, context);
492
- const headers = {
493
- "content-type": "application/json",
494
- };
495
- b.bp("/update-custom-line-item");
496
- let body;
497
- body = JSON.stringify((0, smithy_client_1.take)(input, {
498
- Arn: [],
499
- BillingPeriodRange: (_) => (0, smithy_client_1._json)(_),
500
- ChargeDetails: (_) => se_UpdateCustomLineItemChargeDetails(_, context),
501
- Description: [],
502
- Name: [],
503
- }));
504
- b.m("POST").h(headers).b(body);
505
- return b.build();
506
- };
507
- exports.se_UpdateCustomLineItemCommand = se_UpdateCustomLineItemCommand;
508
- const se_UpdatePricingPlanCommand = async (input, context) => {
509
- const b = (0, core_1.requestBuilder)(input, context);
510
- const headers = {
511
- "content-type": "application/json",
512
- };
513
- b.bp("/update-pricing-plan");
514
- let body;
515
- body = JSON.stringify((0, smithy_client_1.take)(input, {
516
- Arn: [],
517
- Description: [],
518
- Name: [],
519
- }));
520
- b.m("PUT").h(headers).b(body);
521
- return b.build();
522
- };
523
- exports.se_UpdatePricingPlanCommand = se_UpdatePricingPlanCommand;
524
- const se_UpdatePricingRuleCommand = async (input, context) => {
525
- const b = (0, core_1.requestBuilder)(input, context);
526
- const headers = {
527
- "content-type": "application/json",
528
- };
529
- b.bp("/update-pricing-rule");
530
- let body;
531
- body = JSON.stringify((0, smithy_client_1.take)(input, {
532
- Arn: [],
533
- Description: [],
534
- ModifierPercentage: (_) => (0, smithy_client_1.serializeFloat)(_),
535
- Name: [],
536
- Tiering: (_) => (0, smithy_client_1._json)(_),
537
- Type: [],
538
- }));
539
- b.m("PUT").h(headers).b(body);
540
- return b.build();
541
- };
542
- exports.se_UpdatePricingRuleCommand = se_UpdatePricingRuleCommand;
543
- const de_AssociateAccountsCommand = async (output, context) => {
544
- if (output.statusCode !== 200 && output.statusCode >= 300) {
545
- return de_AssociateAccountsCommandError(output, context);
546
- }
547
- const contents = (0, smithy_client_1.map)({
548
- $metadata: deserializeMetadata(output),
549
- });
550
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
551
- const doc = (0, smithy_client_1.take)(data, {
552
- Arn: smithy_client_1.expectString,
553
- });
554
- Object.assign(contents, doc);
555
- return contents;
556
- };
557
- exports.de_AssociateAccountsCommand = de_AssociateAccountsCommand;
558
- const de_AssociateAccountsCommandError = async (output, context) => {
559
- const parsedOutput = {
560
- ...output,
561
- body: await parseErrorBody(output.body, context),
562
- };
563
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
564
- switch (errorCode) {
565
- case "AccessDeniedException":
566
- case "com.amazonaws.billingconductor#AccessDeniedException":
567
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
568
- case "ConflictException":
569
- case "com.amazonaws.billingconductor#ConflictException":
570
- throw await de_ConflictExceptionRes(parsedOutput, context);
571
- case "InternalServerException":
572
- case "com.amazonaws.billingconductor#InternalServerException":
573
- throw await de_InternalServerExceptionRes(parsedOutput, context);
574
- case "ResourceNotFoundException":
575
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
576
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
577
- case "ServiceLimitExceededException":
578
- case "com.amazonaws.billingconductor#ServiceLimitExceededException":
579
- throw await de_ServiceLimitExceededExceptionRes(parsedOutput, context);
580
- case "ThrottlingException":
581
- case "com.amazonaws.billingconductor#ThrottlingException":
582
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
583
- case "ValidationException":
584
- case "com.amazonaws.billingconductor#ValidationException":
585
- throw await de_ValidationExceptionRes(parsedOutput, context);
586
- default:
587
- const parsedBody = parsedOutput.body;
588
- return throwDefaultError({
589
- output,
590
- parsedBody,
591
- errorCode,
592
- });
593
- }
594
- };
595
- const de_AssociatePricingRulesCommand = async (output, context) => {
596
- if (output.statusCode !== 200 && output.statusCode >= 300) {
597
- return de_AssociatePricingRulesCommandError(output, context);
598
- }
599
- const contents = (0, smithy_client_1.map)({
600
- $metadata: deserializeMetadata(output),
601
- });
602
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
603
- const doc = (0, smithy_client_1.take)(data, {
604
- Arn: smithy_client_1.expectString,
605
- });
606
- Object.assign(contents, doc);
607
- return contents;
608
- };
609
- exports.de_AssociatePricingRulesCommand = de_AssociatePricingRulesCommand;
610
- const de_AssociatePricingRulesCommandError = async (output, context) => {
611
- const parsedOutput = {
612
- ...output,
613
- body: await parseErrorBody(output.body, context),
614
- };
615
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
616
- switch (errorCode) {
617
- case "AccessDeniedException":
618
- case "com.amazonaws.billingconductor#AccessDeniedException":
619
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
620
- case "ConflictException":
621
- case "com.amazonaws.billingconductor#ConflictException":
622
- throw await de_ConflictExceptionRes(parsedOutput, context);
623
- case "InternalServerException":
624
- case "com.amazonaws.billingconductor#InternalServerException":
625
- throw await de_InternalServerExceptionRes(parsedOutput, context);
626
- case "ResourceNotFoundException":
627
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
628
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
629
- case "ServiceLimitExceededException":
630
- case "com.amazonaws.billingconductor#ServiceLimitExceededException":
631
- throw await de_ServiceLimitExceededExceptionRes(parsedOutput, context);
632
- case "ThrottlingException":
633
- case "com.amazonaws.billingconductor#ThrottlingException":
634
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
635
- case "ValidationException":
636
- case "com.amazonaws.billingconductor#ValidationException":
637
- throw await de_ValidationExceptionRes(parsedOutput, context);
638
- default:
639
- const parsedBody = parsedOutput.body;
640
- return throwDefaultError({
641
- output,
642
- parsedBody,
643
- errorCode,
644
- });
645
- }
646
- };
647
- const de_BatchAssociateResourcesToCustomLineItemCommand = async (output, context) => {
648
- if (output.statusCode !== 200 && output.statusCode >= 300) {
649
- return de_BatchAssociateResourcesToCustomLineItemCommandError(output, context);
650
- }
651
- const contents = (0, smithy_client_1.map)({
652
- $metadata: deserializeMetadata(output),
653
- });
654
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
655
- const doc = (0, smithy_client_1.take)(data, {
656
- FailedAssociatedResources: smithy_client_1._json,
657
- SuccessfullyAssociatedResources: smithy_client_1._json,
658
- });
659
- Object.assign(contents, doc);
660
- return contents;
661
- };
662
- exports.de_BatchAssociateResourcesToCustomLineItemCommand = de_BatchAssociateResourcesToCustomLineItemCommand;
663
- const de_BatchAssociateResourcesToCustomLineItemCommandError = async (output, context) => {
664
- const parsedOutput = {
665
- ...output,
666
- body: await parseErrorBody(output.body, context),
667
- };
668
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
669
- switch (errorCode) {
670
- case "AccessDeniedException":
671
- case "com.amazonaws.billingconductor#AccessDeniedException":
672
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
673
- case "ConflictException":
674
- case "com.amazonaws.billingconductor#ConflictException":
675
- throw await de_ConflictExceptionRes(parsedOutput, context);
676
- case "InternalServerException":
677
- case "com.amazonaws.billingconductor#InternalServerException":
678
- throw await de_InternalServerExceptionRes(parsedOutput, context);
679
- case "ResourceNotFoundException":
680
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
681
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
682
- case "ServiceLimitExceededException":
683
- case "com.amazonaws.billingconductor#ServiceLimitExceededException":
684
- throw await de_ServiceLimitExceededExceptionRes(parsedOutput, context);
685
- case "ThrottlingException":
686
- case "com.amazonaws.billingconductor#ThrottlingException":
687
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
688
- case "ValidationException":
689
- case "com.amazonaws.billingconductor#ValidationException":
690
- throw await de_ValidationExceptionRes(parsedOutput, context);
691
- default:
692
- const parsedBody = parsedOutput.body;
693
- return throwDefaultError({
694
- output,
695
- parsedBody,
696
- errorCode,
697
- });
698
- }
699
- };
700
- const de_BatchDisassociateResourcesFromCustomLineItemCommand = async (output, context) => {
701
- if (output.statusCode !== 200 && output.statusCode >= 300) {
702
- return de_BatchDisassociateResourcesFromCustomLineItemCommandError(output, context);
703
- }
704
- const contents = (0, smithy_client_1.map)({
705
- $metadata: deserializeMetadata(output),
706
- });
707
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
708
- const doc = (0, smithy_client_1.take)(data, {
709
- FailedDisassociatedResources: smithy_client_1._json,
710
- SuccessfullyDisassociatedResources: smithy_client_1._json,
711
- });
712
- Object.assign(contents, doc);
713
- return contents;
714
- };
715
- exports.de_BatchDisassociateResourcesFromCustomLineItemCommand = de_BatchDisassociateResourcesFromCustomLineItemCommand;
716
- const de_BatchDisassociateResourcesFromCustomLineItemCommandError = async (output, context) => {
717
- const parsedOutput = {
718
- ...output,
719
- body: await parseErrorBody(output.body, context),
720
- };
721
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
722
- switch (errorCode) {
723
- case "AccessDeniedException":
724
- case "com.amazonaws.billingconductor#AccessDeniedException":
725
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
726
- case "ConflictException":
727
- case "com.amazonaws.billingconductor#ConflictException":
728
- throw await de_ConflictExceptionRes(parsedOutput, context);
729
- case "InternalServerException":
730
- case "com.amazonaws.billingconductor#InternalServerException":
731
- throw await de_InternalServerExceptionRes(parsedOutput, context);
732
- case "ResourceNotFoundException":
733
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
734
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
735
- case "ThrottlingException":
736
- case "com.amazonaws.billingconductor#ThrottlingException":
737
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
738
- case "ValidationException":
739
- case "com.amazonaws.billingconductor#ValidationException":
740
- throw await de_ValidationExceptionRes(parsedOutput, context);
741
- default:
742
- const parsedBody = parsedOutput.body;
743
- return throwDefaultError({
744
- output,
745
- parsedBody,
746
- errorCode,
747
- });
748
- }
749
- };
750
- const de_CreateBillingGroupCommand = async (output, context) => {
751
- if (output.statusCode !== 200 && output.statusCode >= 300) {
752
- return de_CreateBillingGroupCommandError(output, context);
753
- }
754
- const contents = (0, smithy_client_1.map)({
755
- $metadata: deserializeMetadata(output),
756
- });
757
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
758
- const doc = (0, smithy_client_1.take)(data, {
759
- Arn: smithy_client_1.expectString,
760
- });
761
- Object.assign(contents, doc);
762
- return contents;
763
- };
764
- exports.de_CreateBillingGroupCommand = de_CreateBillingGroupCommand;
765
- const de_CreateBillingGroupCommandError = async (output, context) => {
766
- const parsedOutput = {
767
- ...output,
768
- body: await parseErrorBody(output.body, context),
769
- };
770
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
771
- switch (errorCode) {
772
- case "AccessDeniedException":
773
- case "com.amazonaws.billingconductor#AccessDeniedException":
774
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
775
- case "ConflictException":
776
- case "com.amazonaws.billingconductor#ConflictException":
777
- throw await de_ConflictExceptionRes(parsedOutput, context);
778
- case "InternalServerException":
779
- case "com.amazonaws.billingconductor#InternalServerException":
780
- throw await de_InternalServerExceptionRes(parsedOutput, context);
781
- case "ServiceLimitExceededException":
782
- case "com.amazonaws.billingconductor#ServiceLimitExceededException":
783
- throw await de_ServiceLimitExceededExceptionRes(parsedOutput, context);
784
- case "ThrottlingException":
785
- case "com.amazonaws.billingconductor#ThrottlingException":
786
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
787
- case "ValidationException":
788
- case "com.amazonaws.billingconductor#ValidationException":
789
- throw await de_ValidationExceptionRes(parsedOutput, context);
790
- default:
791
- const parsedBody = parsedOutput.body;
792
- return throwDefaultError({
793
- output,
794
- parsedBody,
795
- errorCode,
796
- });
797
- }
798
- };
799
- const de_CreateCustomLineItemCommand = async (output, context) => {
800
- if (output.statusCode !== 200 && output.statusCode >= 300) {
801
- return de_CreateCustomLineItemCommandError(output, context);
802
- }
803
- const contents = (0, smithy_client_1.map)({
804
- $metadata: deserializeMetadata(output),
805
- });
806
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
807
- const doc = (0, smithy_client_1.take)(data, {
808
- Arn: smithy_client_1.expectString,
809
- });
810
- Object.assign(contents, doc);
811
- return contents;
812
- };
813
- exports.de_CreateCustomLineItemCommand = de_CreateCustomLineItemCommand;
814
- const de_CreateCustomLineItemCommandError = async (output, context) => {
815
- const parsedOutput = {
816
- ...output,
817
- body: await parseErrorBody(output.body, context),
818
- };
819
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
820
- switch (errorCode) {
821
- case "AccessDeniedException":
822
- case "com.amazonaws.billingconductor#AccessDeniedException":
823
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
824
- case "ConflictException":
825
- case "com.amazonaws.billingconductor#ConflictException":
826
- throw await de_ConflictExceptionRes(parsedOutput, context);
827
- case "InternalServerException":
828
- case "com.amazonaws.billingconductor#InternalServerException":
829
- throw await de_InternalServerExceptionRes(parsedOutput, context);
830
- case "ServiceLimitExceededException":
831
- case "com.amazonaws.billingconductor#ServiceLimitExceededException":
832
- throw await de_ServiceLimitExceededExceptionRes(parsedOutput, context);
833
- case "ThrottlingException":
834
- case "com.amazonaws.billingconductor#ThrottlingException":
835
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
836
- case "ValidationException":
837
- case "com.amazonaws.billingconductor#ValidationException":
838
- throw await de_ValidationExceptionRes(parsedOutput, context);
839
- default:
840
- const parsedBody = parsedOutput.body;
841
- return throwDefaultError({
842
- output,
843
- parsedBody,
844
- errorCode,
845
- });
846
- }
847
- };
848
- const de_CreatePricingPlanCommand = async (output, context) => {
849
- if (output.statusCode !== 200 && output.statusCode >= 300) {
850
- return de_CreatePricingPlanCommandError(output, context);
851
- }
852
- const contents = (0, smithy_client_1.map)({
853
- $metadata: deserializeMetadata(output),
854
- });
855
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
856
- const doc = (0, smithy_client_1.take)(data, {
857
- Arn: smithy_client_1.expectString,
858
- });
859
- Object.assign(contents, doc);
860
- return contents;
861
- };
862
- exports.de_CreatePricingPlanCommand = de_CreatePricingPlanCommand;
863
- const de_CreatePricingPlanCommandError = async (output, context) => {
864
- const parsedOutput = {
865
- ...output,
866
- body: await parseErrorBody(output.body, context),
867
- };
868
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
869
- switch (errorCode) {
870
- case "AccessDeniedException":
871
- case "com.amazonaws.billingconductor#AccessDeniedException":
872
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
873
- case "ConflictException":
874
- case "com.amazonaws.billingconductor#ConflictException":
875
- throw await de_ConflictExceptionRes(parsedOutput, context);
876
- case "InternalServerException":
877
- case "com.amazonaws.billingconductor#InternalServerException":
878
- throw await de_InternalServerExceptionRes(parsedOutput, context);
879
- case "ResourceNotFoundException":
880
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
881
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
882
- case "ServiceLimitExceededException":
883
- case "com.amazonaws.billingconductor#ServiceLimitExceededException":
884
- throw await de_ServiceLimitExceededExceptionRes(parsedOutput, context);
885
- case "ThrottlingException":
886
- case "com.amazonaws.billingconductor#ThrottlingException":
887
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
888
- case "ValidationException":
889
- case "com.amazonaws.billingconductor#ValidationException":
890
- throw await de_ValidationExceptionRes(parsedOutput, context);
891
- default:
892
- const parsedBody = parsedOutput.body;
893
- return throwDefaultError({
894
- output,
895
- parsedBody,
896
- errorCode,
897
- });
898
- }
899
- };
900
- const de_CreatePricingRuleCommand = async (output, context) => {
901
- if (output.statusCode !== 200 && output.statusCode >= 300) {
902
- return de_CreatePricingRuleCommandError(output, context);
903
- }
904
- const contents = (0, smithy_client_1.map)({
905
- $metadata: deserializeMetadata(output),
906
- });
907
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
908
- const doc = (0, smithy_client_1.take)(data, {
909
- Arn: smithy_client_1.expectString,
910
- });
911
- Object.assign(contents, doc);
912
- return contents;
913
- };
914
- exports.de_CreatePricingRuleCommand = de_CreatePricingRuleCommand;
915
- const de_CreatePricingRuleCommandError = async (output, context) => {
916
- const parsedOutput = {
917
- ...output,
918
- body: await parseErrorBody(output.body, context),
919
- };
920
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
921
- switch (errorCode) {
922
- case "AccessDeniedException":
923
- case "com.amazonaws.billingconductor#AccessDeniedException":
924
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
925
- case "ConflictException":
926
- case "com.amazonaws.billingconductor#ConflictException":
927
- throw await de_ConflictExceptionRes(parsedOutput, context);
928
- case "InternalServerException":
929
- case "com.amazonaws.billingconductor#InternalServerException":
930
- throw await de_InternalServerExceptionRes(parsedOutput, context);
931
- case "ServiceLimitExceededException":
932
- case "com.amazonaws.billingconductor#ServiceLimitExceededException":
933
- throw await de_ServiceLimitExceededExceptionRes(parsedOutput, context);
934
- case "ThrottlingException":
935
- case "com.amazonaws.billingconductor#ThrottlingException":
936
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
937
- case "ValidationException":
938
- case "com.amazonaws.billingconductor#ValidationException":
939
- throw await de_ValidationExceptionRes(parsedOutput, context);
940
- default:
941
- const parsedBody = parsedOutput.body;
942
- return throwDefaultError({
943
- output,
944
- parsedBody,
945
- errorCode,
946
- });
947
- }
948
- };
949
- const de_DeleteBillingGroupCommand = async (output, context) => {
950
- if (output.statusCode !== 200 && output.statusCode >= 300) {
951
- return de_DeleteBillingGroupCommandError(output, context);
952
- }
953
- const contents = (0, smithy_client_1.map)({
954
- $metadata: deserializeMetadata(output),
955
- });
956
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
957
- const doc = (0, smithy_client_1.take)(data, {
958
- Arn: smithy_client_1.expectString,
959
- });
960
- Object.assign(contents, doc);
961
- return contents;
962
- };
963
- exports.de_DeleteBillingGroupCommand = de_DeleteBillingGroupCommand;
964
- const de_DeleteBillingGroupCommandError = async (output, context) => {
965
- const parsedOutput = {
966
- ...output,
967
- body: await parseErrorBody(output.body, context),
968
- };
969
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
970
- switch (errorCode) {
971
- case "AccessDeniedException":
972
- case "com.amazonaws.billingconductor#AccessDeniedException":
973
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
974
- case "InternalServerException":
975
- case "com.amazonaws.billingconductor#InternalServerException":
976
- throw await de_InternalServerExceptionRes(parsedOutput, context);
977
- case "ThrottlingException":
978
- case "com.amazonaws.billingconductor#ThrottlingException":
979
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
980
- case "ValidationException":
981
- case "com.amazonaws.billingconductor#ValidationException":
982
- throw await de_ValidationExceptionRes(parsedOutput, context);
983
- default:
984
- const parsedBody = parsedOutput.body;
985
- return throwDefaultError({
986
- output,
987
- parsedBody,
988
- errorCode,
989
- });
990
- }
991
- };
992
- const de_DeleteCustomLineItemCommand = async (output, context) => {
993
- if (output.statusCode !== 200 && output.statusCode >= 300) {
994
- return de_DeleteCustomLineItemCommandError(output, context);
995
- }
996
- const contents = (0, smithy_client_1.map)({
997
- $metadata: deserializeMetadata(output),
998
- });
999
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1000
- const doc = (0, smithy_client_1.take)(data, {
1001
- Arn: smithy_client_1.expectString,
1002
- });
1003
- Object.assign(contents, doc);
1004
- return contents;
1005
- };
1006
- exports.de_DeleteCustomLineItemCommand = de_DeleteCustomLineItemCommand;
1007
- const de_DeleteCustomLineItemCommandError = async (output, context) => {
1008
- const parsedOutput = {
1009
- ...output,
1010
- body: await parseErrorBody(output.body, context),
1011
- };
1012
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1013
- switch (errorCode) {
1014
- case "AccessDeniedException":
1015
- case "com.amazonaws.billingconductor#AccessDeniedException":
1016
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1017
- case "ConflictException":
1018
- case "com.amazonaws.billingconductor#ConflictException":
1019
- throw await de_ConflictExceptionRes(parsedOutput, context);
1020
- case "InternalServerException":
1021
- case "com.amazonaws.billingconductor#InternalServerException":
1022
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1023
- case "ThrottlingException":
1024
- case "com.amazonaws.billingconductor#ThrottlingException":
1025
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1026
- case "ValidationException":
1027
- case "com.amazonaws.billingconductor#ValidationException":
1028
- throw await de_ValidationExceptionRes(parsedOutput, context);
1029
- default:
1030
- const parsedBody = parsedOutput.body;
1031
- return throwDefaultError({
1032
- output,
1033
- parsedBody,
1034
- errorCode,
1035
- });
1036
- }
1037
- };
1038
- const de_DeletePricingPlanCommand = async (output, context) => {
1039
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1040
- return de_DeletePricingPlanCommandError(output, context);
1041
- }
1042
- const contents = (0, smithy_client_1.map)({
1043
- $metadata: deserializeMetadata(output),
1044
- });
1045
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1046
- const doc = (0, smithy_client_1.take)(data, {
1047
- Arn: smithy_client_1.expectString,
1048
- });
1049
- Object.assign(contents, doc);
1050
- return contents;
1051
- };
1052
- exports.de_DeletePricingPlanCommand = de_DeletePricingPlanCommand;
1053
- const de_DeletePricingPlanCommandError = async (output, context) => {
1054
- const parsedOutput = {
1055
- ...output,
1056
- body: await parseErrorBody(output.body, context),
1057
- };
1058
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1059
- switch (errorCode) {
1060
- case "AccessDeniedException":
1061
- case "com.amazonaws.billingconductor#AccessDeniedException":
1062
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1063
- case "ConflictException":
1064
- case "com.amazonaws.billingconductor#ConflictException":
1065
- throw await de_ConflictExceptionRes(parsedOutput, context);
1066
- case "InternalServerException":
1067
- case "com.amazonaws.billingconductor#InternalServerException":
1068
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1069
- case "ThrottlingException":
1070
- case "com.amazonaws.billingconductor#ThrottlingException":
1071
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1072
- case "ValidationException":
1073
- case "com.amazonaws.billingconductor#ValidationException":
1074
- throw await de_ValidationExceptionRes(parsedOutput, context);
1075
- default:
1076
- const parsedBody = parsedOutput.body;
1077
- return throwDefaultError({
1078
- output,
1079
- parsedBody,
1080
- errorCode,
1081
- });
1082
- }
1083
- };
1084
- const de_DeletePricingRuleCommand = async (output, context) => {
1085
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1086
- return de_DeletePricingRuleCommandError(output, context);
1087
- }
1088
- const contents = (0, smithy_client_1.map)({
1089
- $metadata: deserializeMetadata(output),
1090
- });
1091
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1092
- const doc = (0, smithy_client_1.take)(data, {
1093
- Arn: smithy_client_1.expectString,
1094
- });
1095
- Object.assign(contents, doc);
1096
- return contents;
1097
- };
1098
- exports.de_DeletePricingRuleCommand = de_DeletePricingRuleCommand;
1099
- const de_DeletePricingRuleCommandError = async (output, context) => {
1100
- const parsedOutput = {
1101
- ...output,
1102
- body: await parseErrorBody(output.body, context),
1103
- };
1104
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1105
- switch (errorCode) {
1106
- case "AccessDeniedException":
1107
- case "com.amazonaws.billingconductor#AccessDeniedException":
1108
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1109
- case "ConflictException":
1110
- case "com.amazonaws.billingconductor#ConflictException":
1111
- throw await de_ConflictExceptionRes(parsedOutput, context);
1112
- case "InternalServerException":
1113
- case "com.amazonaws.billingconductor#InternalServerException":
1114
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1115
- case "ThrottlingException":
1116
- case "com.amazonaws.billingconductor#ThrottlingException":
1117
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1118
- case "ValidationException":
1119
- case "com.amazonaws.billingconductor#ValidationException":
1120
- throw await de_ValidationExceptionRes(parsedOutput, context);
1121
- default:
1122
- const parsedBody = parsedOutput.body;
1123
- return throwDefaultError({
1124
- output,
1125
- parsedBody,
1126
- errorCode,
1127
- });
1128
- }
1129
- };
1130
- const de_DisassociateAccountsCommand = async (output, context) => {
1131
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1132
- return de_DisassociateAccountsCommandError(output, context);
1133
- }
1134
- const contents = (0, smithy_client_1.map)({
1135
- $metadata: deserializeMetadata(output),
1136
- });
1137
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1138
- const doc = (0, smithy_client_1.take)(data, {
1139
- Arn: smithy_client_1.expectString,
1140
- });
1141
- Object.assign(contents, doc);
1142
- return contents;
1143
- };
1144
- exports.de_DisassociateAccountsCommand = de_DisassociateAccountsCommand;
1145
- const de_DisassociateAccountsCommandError = async (output, context) => {
1146
- const parsedOutput = {
1147
- ...output,
1148
- body: await parseErrorBody(output.body, context),
1149
- };
1150
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1151
- switch (errorCode) {
1152
- case "AccessDeniedException":
1153
- case "com.amazonaws.billingconductor#AccessDeniedException":
1154
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1155
- case "ConflictException":
1156
- case "com.amazonaws.billingconductor#ConflictException":
1157
- throw await de_ConflictExceptionRes(parsedOutput, context);
1158
- case "InternalServerException":
1159
- case "com.amazonaws.billingconductor#InternalServerException":
1160
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1161
- case "ResourceNotFoundException":
1162
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1163
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1164
- case "ThrottlingException":
1165
- case "com.amazonaws.billingconductor#ThrottlingException":
1166
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1167
- case "ValidationException":
1168
- case "com.amazonaws.billingconductor#ValidationException":
1169
- throw await de_ValidationExceptionRes(parsedOutput, context);
1170
- default:
1171
- const parsedBody = parsedOutput.body;
1172
- return throwDefaultError({
1173
- output,
1174
- parsedBody,
1175
- errorCode,
1176
- });
1177
- }
1178
- };
1179
- const de_DisassociatePricingRulesCommand = async (output, context) => {
1180
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1181
- return de_DisassociatePricingRulesCommandError(output, context);
1182
- }
1183
- const contents = (0, smithy_client_1.map)({
1184
- $metadata: deserializeMetadata(output),
1185
- });
1186
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1187
- const doc = (0, smithy_client_1.take)(data, {
1188
- Arn: smithy_client_1.expectString,
1189
- });
1190
- Object.assign(contents, doc);
1191
- return contents;
1192
- };
1193
- exports.de_DisassociatePricingRulesCommand = de_DisassociatePricingRulesCommand;
1194
- const de_DisassociatePricingRulesCommandError = async (output, context) => {
1195
- const parsedOutput = {
1196
- ...output,
1197
- body: await parseErrorBody(output.body, context),
1198
- };
1199
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1200
- switch (errorCode) {
1201
- case "AccessDeniedException":
1202
- case "com.amazonaws.billingconductor#AccessDeniedException":
1203
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1204
- case "ConflictException":
1205
- case "com.amazonaws.billingconductor#ConflictException":
1206
- throw await de_ConflictExceptionRes(parsedOutput, context);
1207
- case "InternalServerException":
1208
- case "com.amazonaws.billingconductor#InternalServerException":
1209
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1210
- case "ResourceNotFoundException":
1211
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1212
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1213
- case "ThrottlingException":
1214
- case "com.amazonaws.billingconductor#ThrottlingException":
1215
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1216
- case "ValidationException":
1217
- case "com.amazonaws.billingconductor#ValidationException":
1218
- throw await de_ValidationExceptionRes(parsedOutput, context);
1219
- default:
1220
- const parsedBody = parsedOutput.body;
1221
- return throwDefaultError({
1222
- output,
1223
- parsedBody,
1224
- errorCode,
1225
- });
1226
- }
1227
- };
1228
- const de_GetBillingGroupCostReportCommand = async (output, context) => {
1229
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1230
- return de_GetBillingGroupCostReportCommandError(output, context);
1231
- }
1232
- const contents = (0, smithy_client_1.map)({
1233
- $metadata: deserializeMetadata(output),
1234
- });
1235
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1236
- const doc = (0, smithy_client_1.take)(data, {
1237
- BillingGroupCostReportResults: smithy_client_1._json,
1238
- NextToken: smithy_client_1.expectString,
1239
- });
1240
- Object.assign(contents, doc);
1241
- return contents;
1242
- };
1243
- exports.de_GetBillingGroupCostReportCommand = de_GetBillingGroupCostReportCommand;
1244
- const de_GetBillingGroupCostReportCommandError = async (output, context) => {
1245
- const parsedOutput = {
1246
- ...output,
1247
- body: await parseErrorBody(output.body, context),
1248
- };
1249
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1250
- switch (errorCode) {
1251
- case "AccessDeniedException":
1252
- case "com.amazonaws.billingconductor#AccessDeniedException":
1253
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1254
- case "InternalServerException":
1255
- case "com.amazonaws.billingconductor#InternalServerException":
1256
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1257
- case "ResourceNotFoundException":
1258
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1259
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1260
- case "ThrottlingException":
1261
- case "com.amazonaws.billingconductor#ThrottlingException":
1262
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1263
- case "ValidationException":
1264
- case "com.amazonaws.billingconductor#ValidationException":
1265
- throw await de_ValidationExceptionRes(parsedOutput, context);
1266
- default:
1267
- const parsedBody = parsedOutput.body;
1268
- return throwDefaultError({
1269
- output,
1270
- parsedBody,
1271
- errorCode,
1272
- });
1273
- }
1274
- };
1275
- const de_ListAccountAssociationsCommand = async (output, context) => {
1276
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1277
- return de_ListAccountAssociationsCommandError(output, context);
1278
- }
1279
- const contents = (0, smithy_client_1.map)({
1280
- $metadata: deserializeMetadata(output),
1281
- });
1282
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1283
- const doc = (0, smithy_client_1.take)(data, {
1284
- LinkedAccounts: smithy_client_1._json,
1285
- NextToken: smithy_client_1.expectString,
1286
- });
1287
- Object.assign(contents, doc);
1288
- return contents;
1289
- };
1290
- exports.de_ListAccountAssociationsCommand = de_ListAccountAssociationsCommand;
1291
- const de_ListAccountAssociationsCommandError = async (output, context) => {
1292
- const parsedOutput = {
1293
- ...output,
1294
- body: await parseErrorBody(output.body, context),
1295
- };
1296
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1297
- switch (errorCode) {
1298
- case "AccessDeniedException":
1299
- case "com.amazonaws.billingconductor#AccessDeniedException":
1300
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1301
- case "InternalServerException":
1302
- case "com.amazonaws.billingconductor#InternalServerException":
1303
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1304
- case "ResourceNotFoundException":
1305
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1306
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1307
- case "ThrottlingException":
1308
- case "com.amazonaws.billingconductor#ThrottlingException":
1309
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1310
- case "ValidationException":
1311
- case "com.amazonaws.billingconductor#ValidationException":
1312
- throw await de_ValidationExceptionRes(parsedOutput, context);
1313
- default:
1314
- const parsedBody = parsedOutput.body;
1315
- return throwDefaultError({
1316
- output,
1317
- parsedBody,
1318
- errorCode,
1319
- });
1320
- }
1321
- };
1322
- const de_ListBillingGroupCostReportsCommand = async (output, context) => {
1323
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1324
- return de_ListBillingGroupCostReportsCommandError(output, context);
1325
- }
1326
- const contents = (0, smithy_client_1.map)({
1327
- $metadata: deserializeMetadata(output),
1328
- });
1329
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1330
- const doc = (0, smithy_client_1.take)(data, {
1331
- BillingGroupCostReports: smithy_client_1._json,
1332
- NextToken: smithy_client_1.expectString,
1333
- });
1334
- Object.assign(contents, doc);
1335
- return contents;
1336
- };
1337
- exports.de_ListBillingGroupCostReportsCommand = de_ListBillingGroupCostReportsCommand;
1338
- const de_ListBillingGroupCostReportsCommandError = async (output, context) => {
1339
- const parsedOutput = {
1340
- ...output,
1341
- body: await parseErrorBody(output.body, context),
1342
- };
1343
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1344
- switch (errorCode) {
1345
- case "AccessDeniedException":
1346
- case "com.amazonaws.billingconductor#AccessDeniedException":
1347
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1348
- case "InternalServerException":
1349
- case "com.amazonaws.billingconductor#InternalServerException":
1350
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1351
- case "ResourceNotFoundException":
1352
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1353
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1354
- case "ThrottlingException":
1355
- case "com.amazonaws.billingconductor#ThrottlingException":
1356
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1357
- case "ValidationException":
1358
- case "com.amazonaws.billingconductor#ValidationException":
1359
- throw await de_ValidationExceptionRes(parsedOutput, context);
1360
- default:
1361
- const parsedBody = parsedOutput.body;
1362
- return throwDefaultError({
1363
- output,
1364
- parsedBody,
1365
- errorCode,
1366
- });
1367
- }
1368
- };
1369
- const de_ListBillingGroupsCommand = async (output, context) => {
1370
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1371
- return de_ListBillingGroupsCommandError(output, context);
1372
- }
1373
- const contents = (0, smithy_client_1.map)({
1374
- $metadata: deserializeMetadata(output),
1375
- });
1376
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1377
- const doc = (0, smithy_client_1.take)(data, {
1378
- BillingGroups: smithy_client_1._json,
1379
- NextToken: smithy_client_1.expectString,
1380
- });
1381
- Object.assign(contents, doc);
1382
- return contents;
1383
- };
1384
- exports.de_ListBillingGroupsCommand = de_ListBillingGroupsCommand;
1385
- const de_ListBillingGroupsCommandError = async (output, context) => {
1386
- const parsedOutput = {
1387
- ...output,
1388
- body: await parseErrorBody(output.body, context),
1389
- };
1390
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1391
- switch (errorCode) {
1392
- case "AccessDeniedException":
1393
- case "com.amazonaws.billingconductor#AccessDeniedException":
1394
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1395
- case "InternalServerException":
1396
- case "com.amazonaws.billingconductor#InternalServerException":
1397
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1398
- case "ResourceNotFoundException":
1399
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1400
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1401
- case "ThrottlingException":
1402
- case "com.amazonaws.billingconductor#ThrottlingException":
1403
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1404
- case "ValidationException":
1405
- case "com.amazonaws.billingconductor#ValidationException":
1406
- throw await de_ValidationExceptionRes(parsedOutput, context);
1407
- default:
1408
- const parsedBody = parsedOutput.body;
1409
- return throwDefaultError({
1410
- output,
1411
- parsedBody,
1412
- errorCode,
1413
- });
1414
- }
1415
- };
1416
- const de_ListCustomLineItemsCommand = async (output, context) => {
1417
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1418
- return de_ListCustomLineItemsCommandError(output, context);
1419
- }
1420
- const contents = (0, smithy_client_1.map)({
1421
- $metadata: deserializeMetadata(output),
1422
- });
1423
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1424
- const doc = (0, smithy_client_1.take)(data, {
1425
- CustomLineItems: (_) => de_CustomLineItemList(_, context),
1426
- NextToken: smithy_client_1.expectString,
1427
- });
1428
- Object.assign(contents, doc);
1429
- return contents;
1430
- };
1431
- exports.de_ListCustomLineItemsCommand = de_ListCustomLineItemsCommand;
1432
- const de_ListCustomLineItemsCommandError = async (output, context) => {
1433
- const parsedOutput = {
1434
- ...output,
1435
- body: await parseErrorBody(output.body, context),
1436
- };
1437
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1438
- switch (errorCode) {
1439
- case "AccessDeniedException":
1440
- case "com.amazonaws.billingconductor#AccessDeniedException":
1441
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1442
- case "InternalServerException":
1443
- case "com.amazonaws.billingconductor#InternalServerException":
1444
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1445
- case "ResourceNotFoundException":
1446
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1447
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1448
- case "ThrottlingException":
1449
- case "com.amazonaws.billingconductor#ThrottlingException":
1450
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1451
- case "ValidationException":
1452
- case "com.amazonaws.billingconductor#ValidationException":
1453
- throw await de_ValidationExceptionRes(parsedOutput, context);
1454
- default:
1455
- const parsedBody = parsedOutput.body;
1456
- return throwDefaultError({
1457
- output,
1458
- parsedBody,
1459
- errorCode,
1460
- });
1461
- }
1462
- };
1463
- const de_ListCustomLineItemVersionsCommand = async (output, context) => {
1464
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1465
- return de_ListCustomLineItemVersionsCommandError(output, context);
1466
- }
1467
- const contents = (0, smithy_client_1.map)({
1468
- $metadata: deserializeMetadata(output),
1469
- });
1470
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1471
- const doc = (0, smithy_client_1.take)(data, {
1472
- CustomLineItemVersions: (_) => de_CustomLineItemVersionList(_, context),
1473
- NextToken: smithy_client_1.expectString,
1474
- });
1475
- Object.assign(contents, doc);
1476
- return contents;
1477
- };
1478
- exports.de_ListCustomLineItemVersionsCommand = de_ListCustomLineItemVersionsCommand;
1479
- const de_ListCustomLineItemVersionsCommandError = async (output, context) => {
1480
- const parsedOutput = {
1481
- ...output,
1482
- body: await parseErrorBody(output.body, context),
1483
- };
1484
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1485
- switch (errorCode) {
1486
- case "AccessDeniedException":
1487
- case "com.amazonaws.billingconductor#AccessDeniedException":
1488
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1489
- case "InternalServerException":
1490
- case "com.amazonaws.billingconductor#InternalServerException":
1491
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1492
- case "ThrottlingException":
1493
- case "com.amazonaws.billingconductor#ThrottlingException":
1494
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1495
- case "ValidationException":
1496
- case "com.amazonaws.billingconductor#ValidationException":
1497
- throw await de_ValidationExceptionRes(parsedOutput, context);
1498
- default:
1499
- const parsedBody = parsedOutput.body;
1500
- return throwDefaultError({
1501
- output,
1502
- parsedBody,
1503
- errorCode,
1504
- });
1505
- }
1506
- };
1507
- const de_ListPricingPlansCommand = async (output, context) => {
1508
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1509
- return de_ListPricingPlansCommandError(output, context);
1510
- }
1511
- const contents = (0, smithy_client_1.map)({
1512
- $metadata: deserializeMetadata(output),
1513
- });
1514
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1515
- const doc = (0, smithy_client_1.take)(data, {
1516
- BillingPeriod: smithy_client_1.expectString,
1517
- NextToken: smithy_client_1.expectString,
1518
- PricingPlans: smithy_client_1._json,
1519
- });
1520
- Object.assign(contents, doc);
1521
- return contents;
1522
- };
1523
- exports.de_ListPricingPlansCommand = de_ListPricingPlansCommand;
1524
- const de_ListPricingPlansCommandError = async (output, context) => {
1525
- const parsedOutput = {
1526
- ...output,
1527
- body: await parseErrorBody(output.body, context),
1528
- };
1529
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1530
- switch (errorCode) {
1531
- case "AccessDeniedException":
1532
- case "com.amazonaws.billingconductor#AccessDeniedException":
1533
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1534
- case "InternalServerException":
1535
- case "com.amazonaws.billingconductor#InternalServerException":
1536
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1537
- case "ThrottlingException":
1538
- case "com.amazonaws.billingconductor#ThrottlingException":
1539
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1540
- case "ValidationException":
1541
- case "com.amazonaws.billingconductor#ValidationException":
1542
- throw await de_ValidationExceptionRes(parsedOutput, context);
1543
- default:
1544
- const parsedBody = parsedOutput.body;
1545
- return throwDefaultError({
1546
- output,
1547
- parsedBody,
1548
- errorCode,
1549
- });
1550
- }
1551
- };
1552
- const de_ListPricingPlansAssociatedWithPricingRuleCommand = async (output, context) => {
1553
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1554
- return de_ListPricingPlansAssociatedWithPricingRuleCommandError(output, context);
1555
- }
1556
- const contents = (0, smithy_client_1.map)({
1557
- $metadata: deserializeMetadata(output),
1558
- });
1559
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1560
- const doc = (0, smithy_client_1.take)(data, {
1561
- BillingPeriod: smithy_client_1.expectString,
1562
- NextToken: smithy_client_1.expectString,
1563
- PricingPlanArns: smithy_client_1._json,
1564
- PricingRuleArn: smithy_client_1.expectString,
1565
- });
1566
- Object.assign(contents, doc);
1567
- return contents;
1568
- };
1569
- exports.de_ListPricingPlansAssociatedWithPricingRuleCommand = de_ListPricingPlansAssociatedWithPricingRuleCommand;
1570
- const de_ListPricingPlansAssociatedWithPricingRuleCommandError = async (output, context) => {
1571
- const parsedOutput = {
1572
- ...output,
1573
- body: await parseErrorBody(output.body, context),
1574
- };
1575
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1576
- switch (errorCode) {
1577
- case "AccessDeniedException":
1578
- case "com.amazonaws.billingconductor#AccessDeniedException":
1579
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1580
- case "InternalServerException":
1581
- case "com.amazonaws.billingconductor#InternalServerException":
1582
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1583
- case "ResourceNotFoundException":
1584
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1585
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1586
- case "ThrottlingException":
1587
- case "com.amazonaws.billingconductor#ThrottlingException":
1588
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1589
- case "ValidationException":
1590
- case "com.amazonaws.billingconductor#ValidationException":
1591
- throw await de_ValidationExceptionRes(parsedOutput, context);
1592
- default:
1593
- const parsedBody = parsedOutput.body;
1594
- return throwDefaultError({
1595
- output,
1596
- parsedBody,
1597
- errorCode,
1598
- });
1599
- }
1600
- };
1601
- const de_ListPricingRulesCommand = async (output, context) => {
1602
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1603
- return de_ListPricingRulesCommandError(output, context);
1604
- }
1605
- const contents = (0, smithy_client_1.map)({
1606
- $metadata: deserializeMetadata(output),
1607
- });
1608
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1609
- const doc = (0, smithy_client_1.take)(data, {
1610
- BillingPeriod: smithy_client_1.expectString,
1611
- NextToken: smithy_client_1.expectString,
1612
- PricingRules: (_) => de_PricingRuleList(_, context),
1613
- });
1614
- Object.assign(contents, doc);
1615
- return contents;
1616
- };
1617
- exports.de_ListPricingRulesCommand = de_ListPricingRulesCommand;
1618
- const de_ListPricingRulesCommandError = async (output, context) => {
1619
- const parsedOutput = {
1620
- ...output,
1621
- body: await parseErrorBody(output.body, context),
1622
- };
1623
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1624
- switch (errorCode) {
1625
- case "AccessDeniedException":
1626
- case "com.amazonaws.billingconductor#AccessDeniedException":
1627
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1628
- case "InternalServerException":
1629
- case "com.amazonaws.billingconductor#InternalServerException":
1630
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1631
- case "ThrottlingException":
1632
- case "com.amazonaws.billingconductor#ThrottlingException":
1633
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1634
- case "ValidationException":
1635
- case "com.amazonaws.billingconductor#ValidationException":
1636
- throw await de_ValidationExceptionRes(parsedOutput, context);
1637
- default:
1638
- const parsedBody = parsedOutput.body;
1639
- return throwDefaultError({
1640
- output,
1641
- parsedBody,
1642
- errorCode,
1643
- });
1644
- }
1645
- };
1646
- const de_ListPricingRulesAssociatedToPricingPlanCommand = async (output, context) => {
1647
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1648
- return de_ListPricingRulesAssociatedToPricingPlanCommandError(output, context);
1649
- }
1650
- const contents = (0, smithy_client_1.map)({
1651
- $metadata: deserializeMetadata(output),
1652
- });
1653
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1654
- const doc = (0, smithy_client_1.take)(data, {
1655
- BillingPeriod: smithy_client_1.expectString,
1656
- NextToken: smithy_client_1.expectString,
1657
- PricingPlanArn: smithy_client_1.expectString,
1658
- PricingRuleArns: smithy_client_1._json,
1659
- });
1660
- Object.assign(contents, doc);
1661
- return contents;
1662
- };
1663
- exports.de_ListPricingRulesAssociatedToPricingPlanCommand = de_ListPricingRulesAssociatedToPricingPlanCommand;
1664
- const de_ListPricingRulesAssociatedToPricingPlanCommandError = async (output, context) => {
1665
- const parsedOutput = {
1666
- ...output,
1667
- body: await parseErrorBody(output.body, context),
1668
- };
1669
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1670
- switch (errorCode) {
1671
- case "AccessDeniedException":
1672
- case "com.amazonaws.billingconductor#AccessDeniedException":
1673
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1674
- case "InternalServerException":
1675
- case "com.amazonaws.billingconductor#InternalServerException":
1676
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1677
- case "ResourceNotFoundException":
1678
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1679
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1680
- case "ThrottlingException":
1681
- case "com.amazonaws.billingconductor#ThrottlingException":
1682
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1683
- case "ValidationException":
1684
- case "com.amazonaws.billingconductor#ValidationException":
1685
- throw await de_ValidationExceptionRes(parsedOutput, context);
1686
- default:
1687
- const parsedBody = parsedOutput.body;
1688
- return throwDefaultError({
1689
- output,
1690
- parsedBody,
1691
- errorCode,
1692
- });
1693
- }
1694
- };
1695
- const de_ListResourcesAssociatedToCustomLineItemCommand = async (output, context) => {
1696
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1697
- return de_ListResourcesAssociatedToCustomLineItemCommandError(output, context);
1698
- }
1699
- const contents = (0, smithy_client_1.map)({
1700
- $metadata: deserializeMetadata(output),
1701
- });
1702
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1703
- const doc = (0, smithy_client_1.take)(data, {
1704
- Arn: smithy_client_1.expectString,
1705
- AssociatedResources: smithy_client_1._json,
1706
- NextToken: smithy_client_1.expectString,
1707
- });
1708
- Object.assign(contents, doc);
1709
- return contents;
1710
- };
1711
- exports.de_ListResourcesAssociatedToCustomLineItemCommand = de_ListResourcesAssociatedToCustomLineItemCommand;
1712
- const de_ListResourcesAssociatedToCustomLineItemCommandError = async (output, context) => {
1713
- const parsedOutput = {
1714
- ...output,
1715
- body: await parseErrorBody(output.body, context),
1716
- };
1717
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1718
- switch (errorCode) {
1719
- case "AccessDeniedException":
1720
- case "com.amazonaws.billingconductor#AccessDeniedException":
1721
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1722
- case "InternalServerException":
1723
- case "com.amazonaws.billingconductor#InternalServerException":
1724
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1725
- case "ResourceNotFoundException":
1726
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1727
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1728
- case "ThrottlingException":
1729
- case "com.amazonaws.billingconductor#ThrottlingException":
1730
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1731
- case "ValidationException":
1732
- case "com.amazonaws.billingconductor#ValidationException":
1733
- throw await de_ValidationExceptionRes(parsedOutput, context);
1734
- default:
1735
- const parsedBody = parsedOutput.body;
1736
- return throwDefaultError({
1737
- output,
1738
- parsedBody,
1739
- errorCode,
1740
- });
1741
- }
1742
- };
1743
- const de_ListTagsForResourceCommand = async (output, context) => {
1744
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1745
- return de_ListTagsForResourceCommandError(output, context);
1746
- }
1747
- const contents = (0, smithy_client_1.map)({
1748
- $metadata: deserializeMetadata(output),
1749
- });
1750
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1751
- const doc = (0, smithy_client_1.take)(data, {
1752
- Tags: smithy_client_1._json,
1753
- });
1754
- Object.assign(contents, doc);
1755
- return contents;
1756
- };
1757
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
1758
- const de_ListTagsForResourceCommandError = async (output, context) => {
1759
- const parsedOutput = {
1760
- ...output,
1761
- body: await parseErrorBody(output.body, context),
1762
- };
1763
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1764
- switch (errorCode) {
1765
- case "AccessDeniedException":
1766
- case "com.amazonaws.billingconductor#AccessDeniedException":
1767
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1768
- case "InternalServerException":
1769
- case "com.amazonaws.billingconductor#InternalServerException":
1770
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1771
- case "ResourceNotFoundException":
1772
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1773
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1774
- case "ThrottlingException":
1775
- case "com.amazonaws.billingconductor#ThrottlingException":
1776
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1777
- case "ValidationException":
1778
- case "com.amazonaws.billingconductor#ValidationException":
1779
- throw await de_ValidationExceptionRes(parsedOutput, context);
1780
- default:
1781
- const parsedBody = parsedOutput.body;
1782
- return throwDefaultError({
1783
- output,
1784
- parsedBody,
1785
- errorCode,
1786
- });
1787
- }
1788
- };
1789
- const de_TagResourceCommand = async (output, context) => {
1790
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1791
- return de_TagResourceCommandError(output, context);
1792
- }
1793
- const contents = (0, smithy_client_1.map)({
1794
- $metadata: deserializeMetadata(output),
1795
- });
1796
- await (0, smithy_client_1.collectBody)(output.body, context);
1797
- return contents;
1798
- };
1799
- exports.de_TagResourceCommand = de_TagResourceCommand;
1800
- const de_TagResourceCommandError = async (output, context) => {
1801
- const parsedOutput = {
1802
- ...output,
1803
- body: await parseErrorBody(output.body, context),
1804
- };
1805
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1806
- switch (errorCode) {
1807
- case "AccessDeniedException":
1808
- case "com.amazonaws.billingconductor#AccessDeniedException":
1809
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1810
- case "InternalServerException":
1811
- case "com.amazonaws.billingconductor#InternalServerException":
1812
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1813
- case "ResourceNotFoundException":
1814
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1815
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1816
- case "ThrottlingException":
1817
- case "com.amazonaws.billingconductor#ThrottlingException":
1818
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1819
- case "ValidationException":
1820
- case "com.amazonaws.billingconductor#ValidationException":
1821
- throw await de_ValidationExceptionRes(parsedOutput, context);
1822
- default:
1823
- const parsedBody = parsedOutput.body;
1824
- return throwDefaultError({
1825
- output,
1826
- parsedBody,
1827
- errorCode,
1828
- });
1829
- }
1830
- };
1831
- const de_UntagResourceCommand = async (output, context) => {
1832
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1833
- return de_UntagResourceCommandError(output, context);
1834
- }
1835
- const contents = (0, smithy_client_1.map)({
1836
- $metadata: deserializeMetadata(output),
1837
- });
1838
- await (0, smithy_client_1.collectBody)(output.body, context);
1839
- return contents;
1840
- };
1841
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
1842
- const de_UntagResourceCommandError = async (output, context) => {
1843
- const parsedOutput = {
1844
- ...output,
1845
- body: await parseErrorBody(output.body, context),
1846
- };
1847
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1848
- switch (errorCode) {
1849
- case "AccessDeniedException":
1850
- case "com.amazonaws.billingconductor#AccessDeniedException":
1851
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1852
- case "InternalServerException":
1853
- case "com.amazonaws.billingconductor#InternalServerException":
1854
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1855
- case "ResourceNotFoundException":
1856
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1857
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1858
- case "ThrottlingException":
1859
- case "com.amazonaws.billingconductor#ThrottlingException":
1860
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1861
- case "ValidationException":
1862
- case "com.amazonaws.billingconductor#ValidationException":
1863
- throw await de_ValidationExceptionRes(parsedOutput, context);
1864
- default:
1865
- const parsedBody = parsedOutput.body;
1866
- return throwDefaultError({
1867
- output,
1868
- parsedBody,
1869
- errorCode,
1870
- });
1871
- }
1872
- };
1873
- const de_UpdateBillingGroupCommand = async (output, context) => {
1874
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1875
- return de_UpdateBillingGroupCommandError(output, context);
1876
- }
1877
- const contents = (0, smithy_client_1.map)({
1878
- $metadata: deserializeMetadata(output),
1879
- });
1880
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1881
- const doc = (0, smithy_client_1.take)(data, {
1882
- AccountGrouping: smithy_client_1._json,
1883
- Arn: smithy_client_1.expectString,
1884
- Description: smithy_client_1.expectString,
1885
- LastModifiedTime: smithy_client_1.expectLong,
1886
- Name: smithy_client_1.expectString,
1887
- PricingPlanArn: smithy_client_1.expectString,
1888
- PrimaryAccountId: smithy_client_1.expectString,
1889
- Size: smithy_client_1.expectLong,
1890
- Status: smithy_client_1.expectString,
1891
- StatusReason: smithy_client_1.expectString,
1892
- });
1893
- Object.assign(contents, doc);
1894
- return contents;
1895
- };
1896
- exports.de_UpdateBillingGroupCommand = de_UpdateBillingGroupCommand;
1897
- const de_UpdateBillingGroupCommandError = async (output, context) => {
1898
- const parsedOutput = {
1899
- ...output,
1900
- body: await parseErrorBody(output.body, context),
1901
- };
1902
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1903
- switch (errorCode) {
1904
- case "AccessDeniedException":
1905
- case "com.amazonaws.billingconductor#AccessDeniedException":
1906
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1907
- case "ConflictException":
1908
- case "com.amazonaws.billingconductor#ConflictException":
1909
- throw await de_ConflictExceptionRes(parsedOutput, context);
1910
- case "InternalServerException":
1911
- case "com.amazonaws.billingconductor#InternalServerException":
1912
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1913
- case "ResourceNotFoundException":
1914
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1915
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1916
- case "ThrottlingException":
1917
- case "com.amazonaws.billingconductor#ThrottlingException":
1918
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1919
- case "ValidationException":
1920
- case "com.amazonaws.billingconductor#ValidationException":
1921
- throw await de_ValidationExceptionRes(parsedOutput, context);
1922
- default:
1923
- const parsedBody = parsedOutput.body;
1924
- return throwDefaultError({
1925
- output,
1926
- parsedBody,
1927
- errorCode,
1928
- });
1929
- }
1930
- };
1931
- const de_UpdateCustomLineItemCommand = async (output, context) => {
1932
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1933
- return de_UpdateCustomLineItemCommandError(output, context);
1934
- }
1935
- const contents = (0, smithy_client_1.map)({
1936
- $metadata: deserializeMetadata(output),
1937
- });
1938
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1939
- const doc = (0, smithy_client_1.take)(data, {
1940
- Arn: smithy_client_1.expectString,
1941
- AssociationSize: smithy_client_1.expectLong,
1942
- BillingGroupArn: smithy_client_1.expectString,
1943
- ChargeDetails: (_) => de_ListCustomLineItemChargeDetails(_, context),
1944
- Description: smithy_client_1.expectString,
1945
- LastModifiedTime: smithy_client_1.expectLong,
1946
- Name: smithy_client_1.expectString,
1947
- });
1948
- Object.assign(contents, doc);
1949
- return contents;
1950
- };
1951
- exports.de_UpdateCustomLineItemCommand = de_UpdateCustomLineItemCommand;
1952
- const de_UpdateCustomLineItemCommandError = async (output, context) => {
1953
- const parsedOutput = {
1954
- ...output,
1955
- body: await parseErrorBody(output.body, context),
1956
- };
1957
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1958
- switch (errorCode) {
1959
- case "AccessDeniedException":
1960
- case "com.amazonaws.billingconductor#AccessDeniedException":
1961
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1962
- case "InternalServerException":
1963
- case "com.amazonaws.billingconductor#InternalServerException":
1964
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1965
- case "ResourceNotFoundException":
1966
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1967
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1968
- case "ThrottlingException":
1969
- case "com.amazonaws.billingconductor#ThrottlingException":
1970
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1971
- case "ValidationException":
1972
- case "com.amazonaws.billingconductor#ValidationException":
1973
- throw await de_ValidationExceptionRes(parsedOutput, context);
1974
- default:
1975
- const parsedBody = parsedOutput.body;
1976
- return throwDefaultError({
1977
- output,
1978
- parsedBody,
1979
- errorCode,
1980
- });
1981
- }
1982
- };
1983
- const de_UpdatePricingPlanCommand = async (output, context) => {
1984
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1985
- return de_UpdatePricingPlanCommandError(output, context);
1986
- }
1987
- const contents = (0, smithy_client_1.map)({
1988
- $metadata: deserializeMetadata(output),
1989
- });
1990
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1991
- const doc = (0, smithy_client_1.take)(data, {
1992
- Arn: smithy_client_1.expectString,
1993
- Description: smithy_client_1.expectString,
1994
- LastModifiedTime: smithy_client_1.expectLong,
1995
- Name: smithy_client_1.expectString,
1996
- Size: smithy_client_1.expectLong,
1997
- });
1998
- Object.assign(contents, doc);
1999
- return contents;
2000
- };
2001
- exports.de_UpdatePricingPlanCommand = de_UpdatePricingPlanCommand;
2002
- const de_UpdatePricingPlanCommandError = async (output, context) => {
2003
- const parsedOutput = {
2004
- ...output,
2005
- body: await parseErrorBody(output.body, context),
2006
- };
2007
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2008
- switch (errorCode) {
2009
- case "AccessDeniedException":
2010
- case "com.amazonaws.billingconductor#AccessDeniedException":
2011
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2012
- case "ConflictException":
2013
- case "com.amazonaws.billingconductor#ConflictException":
2014
- throw await de_ConflictExceptionRes(parsedOutput, context);
2015
- case "InternalServerException":
2016
- case "com.amazonaws.billingconductor#InternalServerException":
2017
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2018
- case "ResourceNotFoundException":
2019
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
2020
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2021
- case "ThrottlingException":
2022
- case "com.amazonaws.billingconductor#ThrottlingException":
2023
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2024
- case "ValidationException":
2025
- case "com.amazonaws.billingconductor#ValidationException":
2026
- throw await de_ValidationExceptionRes(parsedOutput, context);
2027
- default:
2028
- const parsedBody = parsedOutput.body;
2029
- return throwDefaultError({
2030
- output,
2031
- parsedBody,
2032
- errorCode,
2033
- });
2034
- }
2035
- };
2036
- const de_UpdatePricingRuleCommand = async (output, context) => {
2037
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2038
- return de_UpdatePricingRuleCommandError(output, context);
2039
- }
2040
- const contents = (0, smithy_client_1.map)({
2041
- $metadata: deserializeMetadata(output),
2042
- });
2043
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2044
- const doc = (0, smithy_client_1.take)(data, {
2045
- Arn: smithy_client_1.expectString,
2046
- AssociatedPricingPlanCount: smithy_client_1.expectLong,
2047
- BillingEntity: smithy_client_1.expectString,
2048
- Description: smithy_client_1.expectString,
2049
- LastModifiedTime: smithy_client_1.expectLong,
2050
- ModifierPercentage: smithy_client_1.limitedParseDouble,
2051
- Name: smithy_client_1.expectString,
2052
- Operation: smithy_client_1.expectString,
2053
- Scope: smithy_client_1.expectString,
2054
- Service: smithy_client_1.expectString,
2055
- Tiering: smithy_client_1._json,
2056
- Type: smithy_client_1.expectString,
2057
- UsageType: smithy_client_1.expectString,
2058
- });
2059
- Object.assign(contents, doc);
2060
- return contents;
2061
- };
2062
- exports.de_UpdatePricingRuleCommand = de_UpdatePricingRuleCommand;
2063
- const de_UpdatePricingRuleCommandError = async (output, context) => {
2064
- const parsedOutput = {
2065
- ...output,
2066
- body: await parseErrorBody(output.body, context),
2067
- };
2068
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2069
- switch (errorCode) {
2070
- case "AccessDeniedException":
2071
- case "com.amazonaws.billingconductor#AccessDeniedException":
2072
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2073
- case "ConflictException":
2074
- case "com.amazonaws.billingconductor#ConflictException":
2075
- throw await de_ConflictExceptionRes(parsedOutput, context);
2076
- case "InternalServerException":
2077
- case "com.amazonaws.billingconductor#InternalServerException":
2078
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2079
- case "ResourceNotFoundException":
2080
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
2081
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2082
- case "ThrottlingException":
2083
- case "com.amazonaws.billingconductor#ThrottlingException":
2084
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2085
- case "ValidationException":
2086
- case "com.amazonaws.billingconductor#ValidationException":
2087
- throw await de_ValidationExceptionRes(parsedOutput, context);
2088
- default:
2089
- const parsedBody = parsedOutput.body;
2090
- return throwDefaultError({
2091
- output,
2092
- parsedBody,
2093
- errorCode,
2094
- });
2095
- }
2096
- };
2097
- const throwDefaultError = (0, smithy_client_1.withBaseException)(BillingconductorServiceException_1.BillingconductorServiceException);
2098
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2099
- const contents = (0, smithy_client_1.map)({});
2100
- const data = parsedOutput.body;
2101
- const doc = (0, smithy_client_1.take)(data, {
2102
- Message: smithy_client_1.expectString,
2103
- });
2104
- Object.assign(contents, doc);
2105
- const exception = new models_0_1.AccessDeniedException({
2106
- $metadata: deserializeMetadata(parsedOutput),
2107
- ...contents,
2108
- });
2109
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2110
- };
2111
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
2112
- const contents = (0, smithy_client_1.map)({});
2113
- const data = parsedOutput.body;
2114
- const doc = (0, smithy_client_1.take)(data, {
2115
- Message: smithy_client_1.expectString,
2116
- Reason: smithy_client_1.expectString,
2117
- ResourceId: smithy_client_1.expectString,
2118
- ResourceType: smithy_client_1.expectString,
2119
- });
2120
- Object.assign(contents, doc);
2121
- const exception = new models_0_1.ConflictException({
2122
- $metadata: deserializeMetadata(parsedOutput),
2123
- ...contents,
2124
- });
2125
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2126
- };
2127
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2128
- const contents = (0, smithy_client_1.map)({
2129
- [_RAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
2130
- });
2131
- const data = parsedOutput.body;
2132
- const doc = (0, smithy_client_1.take)(data, {
2133
- Message: smithy_client_1.expectString,
2134
- });
2135
- Object.assign(contents, doc);
2136
- const exception = new models_0_1.InternalServerException({
2137
- $metadata: deserializeMetadata(parsedOutput),
2138
- ...contents,
2139
- });
2140
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2141
- };
2142
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2143
- const contents = (0, smithy_client_1.map)({});
2144
- const data = parsedOutput.body;
2145
- const doc = (0, smithy_client_1.take)(data, {
2146
- Message: smithy_client_1.expectString,
2147
- ResourceId: smithy_client_1.expectString,
2148
- ResourceType: smithy_client_1.expectString,
2149
- });
2150
- Object.assign(contents, doc);
2151
- const exception = new models_0_1.ResourceNotFoundException({
2152
- $metadata: deserializeMetadata(parsedOutput),
2153
- ...contents,
2154
- });
2155
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2156
- };
2157
- const de_ServiceLimitExceededExceptionRes = async (parsedOutput, context) => {
2158
- const contents = (0, smithy_client_1.map)({});
2159
- const data = parsedOutput.body;
2160
- const doc = (0, smithy_client_1.take)(data, {
2161
- LimitCode: smithy_client_1.expectString,
2162
- Message: smithy_client_1.expectString,
2163
- ResourceId: smithy_client_1.expectString,
2164
- ResourceType: smithy_client_1.expectString,
2165
- ServiceCode: smithy_client_1.expectString,
2166
- });
2167
- Object.assign(contents, doc);
2168
- const exception = new models_0_1.ServiceLimitExceededException({
2169
- $metadata: deserializeMetadata(parsedOutput),
2170
- ...contents,
2171
- });
2172
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2173
- };
2174
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2175
- const contents = (0, smithy_client_1.map)({
2176
- [_RAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
2177
- });
2178
- const data = parsedOutput.body;
2179
- const doc = (0, smithy_client_1.take)(data, {
2180
- Message: smithy_client_1.expectString,
2181
- });
2182
- Object.assign(contents, doc);
2183
- const exception = new models_0_1.ThrottlingException({
2184
- $metadata: deserializeMetadata(parsedOutput),
2185
- ...contents,
2186
- });
2187
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2188
- };
2189
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
2190
- const contents = (0, smithy_client_1.map)({});
2191
- const data = parsedOutput.body;
2192
- const doc = (0, smithy_client_1.take)(data, {
2193
- Fields: smithy_client_1._json,
2194
- Message: smithy_client_1.expectString,
2195
- Reason: smithy_client_1.expectString,
2196
- });
2197
- Object.assign(contents, doc);
2198
- const exception = new models_0_1.ValidationException({
2199
- $metadata: deserializeMetadata(parsedOutput),
2200
- ...contents,
2201
- });
2202
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2203
- };
2204
- const se_CustomLineItemChargeDetails = (input, context) => {
2205
- return (0, smithy_client_1.take)(input, {
2206
- Flat: (_) => se_CustomLineItemFlatChargeDetails(_, context),
2207
- LineItemFilters: smithy_client_1._json,
2208
- Percentage: (_) => se_CustomLineItemPercentageChargeDetails(_, context),
2209
- Type: [],
2210
- });
2211
- };
2212
- const se_CustomLineItemFlatChargeDetails = (input, context) => {
2213
- return (0, smithy_client_1.take)(input, {
2214
- ChargeValue: smithy_client_1.serializeFloat,
2215
- });
2216
- };
2217
- const se_CustomLineItemPercentageChargeDetails = (input, context) => {
2218
- return (0, smithy_client_1.take)(input, {
2219
- AssociatedValues: smithy_client_1._json,
2220
- PercentageValue: smithy_client_1.serializeFloat,
2221
- });
2222
- };
2223
- const se_UpdateCustomLineItemChargeDetails = (input, context) => {
2224
- return (0, smithy_client_1.take)(input, {
2225
- Flat: (_) => se_UpdateCustomLineItemFlatChargeDetails(_, context),
2226
- LineItemFilters: smithy_client_1._json,
2227
- Percentage: (_) => se_UpdateCustomLineItemPercentageChargeDetails(_, context),
2228
- });
2229
- };
2230
- const se_UpdateCustomLineItemFlatChargeDetails = (input, context) => {
2231
- return (0, smithy_client_1.take)(input, {
2232
- ChargeValue: smithy_client_1.serializeFloat,
2233
- });
2234
- };
2235
- const se_UpdateCustomLineItemPercentageChargeDetails = (input, context) => {
2236
- return (0, smithy_client_1.take)(input, {
2237
- PercentageValue: smithy_client_1.serializeFloat,
2238
- });
2239
- };
2240
- const de_CustomLineItemList = (output, context) => {
2241
- const retVal = (output || [])
2242
- .filter((e) => e != null)
2243
- .map((entry) => {
2244
- return de_CustomLineItemListElement(entry, context);
2245
- });
2246
- return retVal;
2247
- };
2248
- const de_CustomLineItemListElement = (output, context) => {
2249
- return (0, smithy_client_1.take)(output, {
2250
- AccountId: smithy_client_1.expectString,
2251
- Arn: smithy_client_1.expectString,
2252
- AssociationSize: smithy_client_1.expectLong,
2253
- BillingGroupArn: smithy_client_1.expectString,
2254
- ChargeDetails: (_) => de_ListCustomLineItemChargeDetails(_, context),
2255
- CreationTime: smithy_client_1.expectLong,
2256
- CurrencyCode: smithy_client_1.expectString,
2257
- Description: smithy_client_1.expectString,
2258
- LastModifiedTime: smithy_client_1.expectLong,
2259
- Name: smithy_client_1.expectString,
2260
- ProductCode: smithy_client_1.expectString,
2261
- });
2262
- };
2263
- const de_CustomLineItemVersionList = (output, context) => {
2264
- const retVal = (output || [])
2265
- .filter((e) => e != null)
2266
- .map((entry) => {
2267
- return de_CustomLineItemVersionListElement(entry, context);
2268
- });
2269
- return retVal;
2270
- };
2271
- const de_CustomLineItemVersionListElement = (output, context) => {
2272
- return (0, smithy_client_1.take)(output, {
2273
- AccountId: smithy_client_1.expectString,
2274
- Arn: smithy_client_1.expectString,
2275
- AssociationSize: smithy_client_1.expectLong,
2276
- BillingGroupArn: smithy_client_1.expectString,
2277
- ChargeDetails: (_) => de_ListCustomLineItemChargeDetails(_, context),
2278
- CreationTime: smithy_client_1.expectLong,
2279
- CurrencyCode: smithy_client_1.expectString,
2280
- Description: smithy_client_1.expectString,
2281
- EndBillingPeriod: smithy_client_1.expectString,
2282
- LastModifiedTime: smithy_client_1.expectLong,
2283
- Name: smithy_client_1.expectString,
2284
- ProductCode: smithy_client_1.expectString,
2285
- StartBillingPeriod: smithy_client_1.expectString,
2286
- StartTime: smithy_client_1.expectLong,
2287
- });
2288
- };
2289
- const de_ListCustomLineItemChargeDetails = (output, context) => {
2290
- return (0, smithy_client_1.take)(output, {
2291
- Flat: (_) => de_ListCustomLineItemFlatChargeDetails(_, context),
2292
- LineItemFilters: smithy_client_1._json,
2293
- Percentage: (_) => de_ListCustomLineItemPercentageChargeDetails(_, context),
2294
- Type: smithy_client_1.expectString,
2295
- });
2296
- };
2297
- const de_ListCustomLineItemFlatChargeDetails = (output, context) => {
2298
- return (0, smithy_client_1.take)(output, {
2299
- ChargeValue: smithy_client_1.limitedParseDouble,
2300
- });
2301
- };
2302
- const de_ListCustomLineItemPercentageChargeDetails = (output, context) => {
2303
- return (0, smithy_client_1.take)(output, {
2304
- PercentageValue: smithy_client_1.limitedParseDouble,
2305
- });
2306
- };
2307
- const de_PricingRuleList = (output, context) => {
2308
- const retVal = (output || [])
2309
- .filter((e) => e != null)
2310
- .map((entry) => {
2311
- return de_PricingRuleListElement(entry, context);
2312
- });
2313
- return retVal;
2314
- };
2315
- const de_PricingRuleListElement = (output, context) => {
2316
- return (0, smithy_client_1.take)(output, {
2317
- Arn: smithy_client_1.expectString,
2318
- AssociatedPricingPlanCount: smithy_client_1.expectLong,
2319
- BillingEntity: smithy_client_1.expectString,
2320
- CreationTime: smithy_client_1.expectLong,
2321
- Description: smithy_client_1.expectString,
2322
- LastModifiedTime: smithy_client_1.expectLong,
2323
- ModifierPercentage: smithy_client_1.limitedParseDouble,
2324
- Name: smithy_client_1.expectString,
2325
- Operation: smithy_client_1.expectString,
2326
- Scope: smithy_client_1.expectString,
2327
- Service: smithy_client_1.expectString,
2328
- Tiering: smithy_client_1._json,
2329
- Type: smithy_client_1.expectString,
2330
- UsageType: smithy_client_1.expectString,
2331
- });
2332
- };
2333
- const deserializeMetadata = (output) => ({
2334
- httpStatusCode: output.statusCode,
2335
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
2336
- extendedRequestId: output.headers["x-amz-id-2"],
2337
- cfId: output.headers["x-amz-cf-id"],
2338
- });
2339
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
2340
- const isSerializableHeaderValue = (value) => value !== undefined &&
2341
- value !== null &&
2342
- value !== "" &&
2343
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2344
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2345
- const _CT = "ClientToken";
2346
- const _RAS = "RetryAfterSeconds";
2347
- const _TK = "TagKeys";
2348
- const _ra = "retry-after";
2349
- const _tK = "tagKeys";
2350
- const _xact = "x-amzn-client-token";
2351
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2352
- if (encoded.length) {
2353
- return JSON.parse(encoded);
2354
- }
2355
- return {};
2356
- });
2357
- const parseErrorBody = async (errorBody, context) => {
2358
- const value = await parseBody(errorBody, context);
2359
- value.message = value.message ?? value.Message;
2360
- return value;
2361
- };
2362
- const loadRestJsonErrorCode = (output, data) => {
2363
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2364
- const sanitizeErrorCode = (rawValue) => {
2365
- let cleanValue = rawValue;
2366
- if (typeof cleanValue === "number") {
2367
- cleanValue = cleanValue.toString();
2368
- }
2369
- if (cleanValue.indexOf(",") >= 0) {
2370
- cleanValue = cleanValue.split(",")[0];
2371
- }
2372
- if (cleanValue.indexOf(":") >= 0) {
2373
- cleanValue = cleanValue.split(":")[0];
2374
- }
2375
- if (cleanValue.indexOf("#") >= 0) {
2376
- cleanValue = cleanValue.split("#")[1];
2377
- }
2378
- return cleanValue;
2379
- };
2380
- const headerKey = findKey(output.headers, "x-amzn-errortype");
2381
- if (headerKey !== undefined) {
2382
- return sanitizeErrorCode(output.headers[headerKey]);
2383
- }
2384
- if (data.code !== undefined) {
2385
- return sanitizeErrorCode(data.code);
2386
- }
2387
- if (data["__type"] !== undefined) {
2388
- return sanitizeErrorCode(data["__type"]);
2389
- }
2390
- };
1
+ module.exports = require("../index.js");