@aws-sdk/client-billingconductor 3.928.0 → 3.930.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 (56) hide show
  1. package/dist-cjs/index.js +1531 -1689
  2. package/dist-cjs/runtimeConfig.shared.js +2 -0
  3. package/dist-es/BillingconductorClient.js +2 -0
  4. package/dist-es/commands/AssociateAccountsCommand.js +3 -9
  5. package/dist-es/commands/AssociatePricingRulesCommand.js +3 -9
  6. package/dist-es/commands/BatchAssociateResourcesToCustomLineItemCommand.js +3 -9
  7. package/dist-es/commands/BatchDisassociateResourcesFromCustomLineItemCommand.js +3 -9
  8. package/dist-es/commands/CreateBillingGroupCommand.js +3 -10
  9. package/dist-es/commands/CreateCustomLineItemCommand.js +3 -10
  10. package/dist-es/commands/CreatePricingPlanCommand.js +3 -10
  11. package/dist-es/commands/CreatePricingRuleCommand.js +3 -10
  12. package/dist-es/commands/DeleteBillingGroupCommand.js +3 -9
  13. package/dist-es/commands/DeleteCustomLineItemCommand.js +3 -9
  14. package/dist-es/commands/DeletePricingPlanCommand.js +3 -9
  15. package/dist-es/commands/DeletePricingRuleCommand.js +3 -9
  16. package/dist-es/commands/DisassociateAccountsCommand.js +3 -9
  17. package/dist-es/commands/DisassociatePricingRulesCommand.js +3 -9
  18. package/dist-es/commands/GetBillingGroupCostReportCommand.js +3 -9
  19. package/dist-es/commands/ListAccountAssociationsCommand.js +3 -10
  20. package/dist-es/commands/ListBillingGroupCostReportsCommand.js +3 -9
  21. package/dist-es/commands/ListBillingGroupsCommand.js +3 -10
  22. package/dist-es/commands/ListCustomLineItemVersionsCommand.js +3 -10
  23. package/dist-es/commands/ListCustomLineItemsCommand.js +3 -10
  24. package/dist-es/commands/ListPricingPlansAssociatedWithPricingRuleCommand.js +3 -9
  25. package/dist-es/commands/ListPricingPlansCommand.js +3 -10
  26. package/dist-es/commands/ListPricingRulesAssociatedToPricingPlanCommand.js +3 -9
  27. package/dist-es/commands/ListPricingRulesCommand.js +3 -10
  28. package/dist-es/commands/ListResourcesAssociatedToCustomLineItemCommand.js +3 -9
  29. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  30. package/dist-es/commands/TagResourceCommand.js +3 -9
  31. package/dist-es/commands/UntagResourceCommand.js +3 -9
  32. package/dist-es/commands/UpdateBillingGroupCommand.js +3 -10
  33. package/dist-es/commands/UpdateCustomLineItemCommand.js +3 -10
  34. package/dist-es/commands/UpdatePricingPlanCommand.js +3 -10
  35. package/dist-es/commands/UpdatePricingRuleCommand.js +3 -10
  36. package/dist-es/models/models_0.js +0 -135
  37. package/dist-es/runtimeConfig.shared.js +2 -0
  38. package/dist-es/schemas/schemas_0.js +1464 -0
  39. package/dist-types/BillingconductorClient.d.ts +10 -1
  40. package/dist-types/models/models_0.d.ts +0 -104
  41. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  42. package/dist-types/runtimeConfig.d.ts +1 -0
  43. package/dist-types/runtimeConfig.native.d.ts +1 -0
  44. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  45. package/dist-types/schemas/schemas_0.d.ts +193 -0
  46. package/dist-types/ts3.4/BillingconductorClient.d.ts +4 -0
  47. package/dist-types/ts3.4/models/models_0.d.ts +0 -78
  48. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  49. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  50. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  51. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  52. package/dist-types/ts3.4/schemas/schemas_0.d.ts +199 -0
  53. package/package.json +33 -34
  54. package/dist-es/protocols/Aws_restJson1.js +0 -1288
  55. package/dist-types/protocols/Aws_restJson1.d.ts +0 -290
  56. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -389
@@ -1,1288 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { requestBuilder as rb } from "@smithy/core";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, isSerializableHeaderValue, limitedParseDouble as __limitedParseDouble, map, serializeFloat as __serializeFloat, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
4
- import { v4 as generateIdempotencyToken } from "@smithy/uuid";
5
- import { BillingconductorServiceException as __BaseException } from "../models/BillingconductorServiceException";
6
- import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceLimitExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
7
- export const se_AssociateAccountsCommand = async (input, context) => {
8
- const b = rb(input, context);
9
- const headers = {
10
- "content-type": "application/json",
11
- };
12
- b.bp("/associate-accounts");
13
- let body;
14
- body = JSON.stringify(take(input, {
15
- AccountIds: (_) => _json(_),
16
- Arn: [],
17
- }));
18
- b.m("POST").h(headers).b(body);
19
- return b.build();
20
- };
21
- export const se_AssociatePricingRulesCommand = async (input, context) => {
22
- const b = rb(input, context);
23
- const headers = {
24
- "content-type": "application/json",
25
- };
26
- b.bp("/associate-pricing-rules");
27
- let body;
28
- body = JSON.stringify(take(input, {
29
- Arn: [],
30
- PricingRuleArns: (_) => _json(_),
31
- }));
32
- b.m("PUT").h(headers).b(body);
33
- return b.build();
34
- };
35
- export const se_BatchAssociateResourcesToCustomLineItemCommand = async (input, context) => {
36
- const b = rb(input, context);
37
- const headers = {
38
- "content-type": "application/json",
39
- };
40
- b.bp("/batch-associate-resources-to-custom-line-item");
41
- let body;
42
- body = JSON.stringify(take(input, {
43
- BillingPeriodRange: (_) => _json(_),
44
- ResourceArns: (_) => _json(_),
45
- TargetArn: [],
46
- }));
47
- b.m("PUT").h(headers).b(body);
48
- return b.build();
49
- };
50
- export const se_BatchDisassociateResourcesFromCustomLineItemCommand = async (input, context) => {
51
- const b = rb(input, context);
52
- const headers = {
53
- "content-type": "application/json",
54
- };
55
- b.bp("/batch-disassociate-resources-from-custom-line-item");
56
- let body;
57
- body = JSON.stringify(take(input, {
58
- BillingPeriodRange: (_) => _json(_),
59
- ResourceArns: (_) => _json(_),
60
- TargetArn: [],
61
- }));
62
- b.m("PUT").h(headers).b(body);
63
- return b.build();
64
- };
65
- export const se_CreateBillingGroupCommand = async (input, context) => {
66
- const b = rb(input, context);
67
- const headers = map({}, isSerializableHeaderValue, {
68
- "content-type": "application/json",
69
- [_xact]: input[_CT] ?? generateIdempotencyToken(),
70
- });
71
- b.bp("/create-billing-group");
72
- let body;
73
- body = JSON.stringify(take(input, {
74
- AccountGrouping: (_) => _json(_),
75
- ComputationPreference: (_) => _json(_),
76
- Description: [],
77
- Name: [],
78
- PrimaryAccountId: [],
79
- Tags: (_) => _json(_),
80
- }));
81
- b.m("POST").h(headers).b(body);
82
- return b.build();
83
- };
84
- export const se_CreateCustomLineItemCommand = async (input, context) => {
85
- const b = rb(input, context);
86
- const headers = map({}, isSerializableHeaderValue, {
87
- "content-type": "application/json",
88
- [_xact]: input[_CT] ?? generateIdempotencyToken(),
89
- });
90
- b.bp("/create-custom-line-item");
91
- let body;
92
- body = JSON.stringify(take(input, {
93
- AccountId: [],
94
- BillingGroupArn: [],
95
- BillingPeriodRange: (_) => _json(_),
96
- ChargeDetails: (_) => se_CustomLineItemChargeDetails(_, context),
97
- ComputationRule: [],
98
- Description: [],
99
- Name: [],
100
- PresentationDetails: (_) => _json(_),
101
- Tags: (_) => _json(_),
102
- }));
103
- b.m("POST").h(headers).b(body);
104
- return b.build();
105
- };
106
- export const se_CreatePricingPlanCommand = async (input, context) => {
107
- const b = rb(input, context);
108
- const headers = map({}, isSerializableHeaderValue, {
109
- "content-type": "application/json",
110
- [_xact]: input[_CT] ?? generateIdempotencyToken(),
111
- });
112
- b.bp("/create-pricing-plan");
113
- let body;
114
- body = JSON.stringify(take(input, {
115
- Description: [],
116
- Name: [],
117
- PricingRuleArns: (_) => _json(_),
118
- Tags: (_) => _json(_),
119
- }));
120
- b.m("POST").h(headers).b(body);
121
- return b.build();
122
- };
123
- export const se_CreatePricingRuleCommand = async (input, context) => {
124
- const b = rb(input, context);
125
- const headers = map({}, isSerializableHeaderValue, {
126
- "content-type": "application/json",
127
- [_xact]: input[_CT] ?? generateIdempotencyToken(),
128
- });
129
- b.bp("/create-pricing-rule");
130
- let body;
131
- body = JSON.stringify(take(input, {
132
- BillingEntity: [],
133
- Description: [],
134
- ModifierPercentage: (_) => __serializeFloat(_),
135
- Name: [],
136
- Operation: [],
137
- Scope: [],
138
- Service: [],
139
- Tags: (_) => _json(_),
140
- Tiering: (_) => _json(_),
141
- Type: [],
142
- UsageType: [],
143
- }));
144
- b.m("POST").h(headers).b(body);
145
- return b.build();
146
- };
147
- export const se_DeleteBillingGroupCommand = async (input, context) => {
148
- const b = rb(input, context);
149
- const headers = {
150
- "content-type": "application/json",
151
- };
152
- b.bp("/delete-billing-group");
153
- let body;
154
- body = JSON.stringify(take(input, {
155
- Arn: [],
156
- }));
157
- b.m("POST").h(headers).b(body);
158
- return b.build();
159
- };
160
- export const se_DeleteCustomLineItemCommand = async (input, context) => {
161
- const b = rb(input, context);
162
- const headers = {
163
- "content-type": "application/json",
164
- };
165
- b.bp("/delete-custom-line-item");
166
- let body;
167
- body = JSON.stringify(take(input, {
168
- Arn: [],
169
- BillingPeriodRange: (_) => _json(_),
170
- }));
171
- b.m("POST").h(headers).b(body);
172
- return b.build();
173
- };
174
- export const se_DeletePricingPlanCommand = async (input, context) => {
175
- const b = rb(input, context);
176
- const headers = {
177
- "content-type": "application/json",
178
- };
179
- b.bp("/delete-pricing-plan");
180
- let body;
181
- body = JSON.stringify(take(input, {
182
- Arn: [],
183
- }));
184
- b.m("POST").h(headers).b(body);
185
- return b.build();
186
- };
187
- export const se_DeletePricingRuleCommand = async (input, context) => {
188
- const b = rb(input, context);
189
- const headers = {
190
- "content-type": "application/json",
191
- };
192
- b.bp("/delete-pricing-rule");
193
- let body;
194
- body = JSON.stringify(take(input, {
195
- Arn: [],
196
- }));
197
- b.m("POST").h(headers).b(body);
198
- return b.build();
199
- };
200
- export const se_DisassociateAccountsCommand = async (input, context) => {
201
- const b = rb(input, context);
202
- const headers = {
203
- "content-type": "application/json",
204
- };
205
- b.bp("/disassociate-accounts");
206
- let body;
207
- body = JSON.stringify(take(input, {
208
- AccountIds: (_) => _json(_),
209
- Arn: [],
210
- }));
211
- b.m("POST").h(headers).b(body);
212
- return b.build();
213
- };
214
- export const se_DisassociatePricingRulesCommand = async (input, context) => {
215
- const b = rb(input, context);
216
- const headers = {
217
- "content-type": "application/json",
218
- };
219
- b.bp("/disassociate-pricing-rules");
220
- let body;
221
- body = JSON.stringify(take(input, {
222
- Arn: [],
223
- PricingRuleArns: (_) => _json(_),
224
- }));
225
- b.m("PUT").h(headers).b(body);
226
- return b.build();
227
- };
228
- export const se_GetBillingGroupCostReportCommand = async (input, context) => {
229
- const b = rb(input, context);
230
- const headers = {
231
- "content-type": "application/json",
232
- };
233
- b.bp("/get-billing-group-cost-report");
234
- let body;
235
- body = JSON.stringify(take(input, {
236
- Arn: [],
237
- BillingPeriodRange: (_) => _json(_),
238
- GroupBy: (_) => _json(_),
239
- MaxResults: [],
240
- NextToken: [],
241
- }));
242
- b.m("POST").h(headers).b(body);
243
- return b.build();
244
- };
245
- export const se_ListAccountAssociationsCommand = async (input, context) => {
246
- const b = rb(input, context);
247
- const headers = {
248
- "content-type": "application/json",
249
- };
250
- b.bp("/list-account-associations");
251
- let body;
252
- body = JSON.stringify(take(input, {
253
- BillingPeriod: [],
254
- Filters: (_) => _json(_),
255
- NextToken: [],
256
- }));
257
- b.m("POST").h(headers).b(body);
258
- return b.build();
259
- };
260
- export const se_ListBillingGroupCostReportsCommand = async (input, context) => {
261
- const b = rb(input, context);
262
- const headers = {
263
- "content-type": "application/json",
264
- };
265
- b.bp("/list-billing-group-cost-reports");
266
- let body;
267
- body = JSON.stringify(take(input, {
268
- BillingPeriod: [],
269
- Filters: (_) => _json(_),
270
- MaxResults: [],
271
- NextToken: [],
272
- }));
273
- b.m("POST").h(headers).b(body);
274
- return b.build();
275
- };
276
- export const se_ListBillingGroupsCommand = async (input, context) => {
277
- const b = rb(input, context);
278
- const headers = {
279
- "content-type": "application/json",
280
- };
281
- b.bp("/list-billing-groups");
282
- let body;
283
- body = JSON.stringify(take(input, {
284
- BillingPeriod: [],
285
- Filters: (_) => _json(_),
286
- MaxResults: [],
287
- NextToken: [],
288
- }));
289
- b.m("POST").h(headers).b(body);
290
- return b.build();
291
- };
292
- export const se_ListCustomLineItemsCommand = async (input, context) => {
293
- const b = rb(input, context);
294
- const headers = {
295
- "content-type": "application/json",
296
- };
297
- b.bp("/list-custom-line-items");
298
- let body;
299
- body = JSON.stringify(take(input, {
300
- BillingPeriod: [],
301
- Filters: (_) => _json(_),
302
- MaxResults: [],
303
- NextToken: [],
304
- }));
305
- b.m("POST").h(headers).b(body);
306
- return b.build();
307
- };
308
- export const se_ListCustomLineItemVersionsCommand = async (input, context) => {
309
- const b = rb(input, context);
310
- const headers = {
311
- "content-type": "application/json",
312
- };
313
- b.bp("/list-custom-line-item-versions");
314
- let body;
315
- body = JSON.stringify(take(input, {
316
- Arn: [],
317
- Filters: (_) => _json(_),
318
- MaxResults: [],
319
- NextToken: [],
320
- }));
321
- b.m("POST").h(headers).b(body);
322
- return b.build();
323
- };
324
- export const se_ListPricingPlansCommand = async (input, context) => {
325
- const b = rb(input, context);
326
- const headers = {
327
- "content-type": "application/json",
328
- };
329
- b.bp("/list-pricing-plans");
330
- let body;
331
- body = JSON.stringify(take(input, {
332
- BillingPeriod: [],
333
- Filters: (_) => _json(_),
334
- MaxResults: [],
335
- NextToken: [],
336
- }));
337
- b.m("POST").h(headers).b(body);
338
- return b.build();
339
- };
340
- export const se_ListPricingPlansAssociatedWithPricingRuleCommand = async (input, context) => {
341
- const b = rb(input, context);
342
- const headers = {
343
- "content-type": "application/json",
344
- };
345
- b.bp("/list-pricing-plans-associated-with-pricing-rule");
346
- let body;
347
- body = JSON.stringify(take(input, {
348
- BillingPeriod: [],
349
- MaxResults: [],
350
- NextToken: [],
351
- PricingRuleArn: [],
352
- }));
353
- b.m("POST").h(headers).b(body);
354
- return b.build();
355
- };
356
- export const se_ListPricingRulesCommand = async (input, context) => {
357
- const b = rb(input, context);
358
- const headers = {
359
- "content-type": "application/json",
360
- };
361
- b.bp("/list-pricing-rules");
362
- let body;
363
- body = JSON.stringify(take(input, {
364
- BillingPeriod: [],
365
- Filters: (_) => _json(_),
366
- MaxResults: [],
367
- NextToken: [],
368
- }));
369
- b.m("POST").h(headers).b(body);
370
- return b.build();
371
- };
372
- export const se_ListPricingRulesAssociatedToPricingPlanCommand = async (input, context) => {
373
- const b = rb(input, context);
374
- const headers = {
375
- "content-type": "application/json",
376
- };
377
- b.bp("/list-pricing-rules-associated-to-pricing-plan");
378
- let body;
379
- body = JSON.stringify(take(input, {
380
- BillingPeriod: [],
381
- MaxResults: [],
382
- NextToken: [],
383
- PricingPlanArn: [],
384
- }));
385
- b.m("POST").h(headers).b(body);
386
- return b.build();
387
- };
388
- export const se_ListResourcesAssociatedToCustomLineItemCommand = async (input, context) => {
389
- const b = rb(input, context);
390
- const headers = {
391
- "content-type": "application/json",
392
- };
393
- b.bp("/list-resources-associated-to-custom-line-item");
394
- let body;
395
- body = JSON.stringify(take(input, {
396
- Arn: [],
397
- BillingPeriod: [],
398
- Filters: (_) => _json(_),
399
- MaxResults: [],
400
- NextToken: [],
401
- }));
402
- b.m("POST").h(headers).b(body);
403
- return b.build();
404
- };
405
- export const se_ListTagsForResourceCommand = async (input, context) => {
406
- const b = rb(input, context);
407
- const headers = {};
408
- b.bp("/tags/{ResourceArn}");
409
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
410
- let body;
411
- b.m("GET").h(headers).b(body);
412
- return b.build();
413
- };
414
- export const se_TagResourceCommand = async (input, context) => {
415
- const b = rb(input, context);
416
- const headers = {
417
- "content-type": "application/json",
418
- };
419
- b.bp("/tags/{ResourceArn}");
420
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
421
- let body;
422
- body = JSON.stringify(take(input, {
423
- Tags: (_) => _json(_),
424
- }));
425
- b.m("POST").h(headers).b(body);
426
- return b.build();
427
- };
428
- export const se_UntagResourceCommand = async (input, context) => {
429
- const b = rb(input, context);
430
- const headers = {};
431
- b.bp("/tags/{ResourceArn}");
432
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
433
- const query = map({
434
- [_tK]: [__expectNonNull(input.TagKeys, `TagKeys`) != null, () => input[_TK] || []],
435
- });
436
- let body;
437
- b.m("DELETE").h(headers).q(query).b(body);
438
- return b.build();
439
- };
440
- export const se_UpdateBillingGroupCommand = async (input, context) => {
441
- const b = rb(input, context);
442
- const headers = {
443
- "content-type": "application/json",
444
- };
445
- b.bp("/update-billing-group");
446
- let body;
447
- body = JSON.stringify(take(input, {
448
- AccountGrouping: (_) => _json(_),
449
- Arn: [],
450
- ComputationPreference: (_) => _json(_),
451
- Description: [],
452
- Name: [],
453
- Status: [],
454
- }));
455
- b.m("POST").h(headers).b(body);
456
- return b.build();
457
- };
458
- export const se_UpdateCustomLineItemCommand = async (input, context) => {
459
- const b = rb(input, context);
460
- const headers = {
461
- "content-type": "application/json",
462
- };
463
- b.bp("/update-custom-line-item");
464
- let body;
465
- body = JSON.stringify(take(input, {
466
- Arn: [],
467
- BillingPeriodRange: (_) => _json(_),
468
- ChargeDetails: (_) => se_UpdateCustomLineItemChargeDetails(_, context),
469
- Description: [],
470
- Name: [],
471
- }));
472
- b.m("POST").h(headers).b(body);
473
- return b.build();
474
- };
475
- export const se_UpdatePricingPlanCommand = async (input, context) => {
476
- const b = rb(input, context);
477
- const headers = {
478
- "content-type": "application/json",
479
- };
480
- b.bp("/update-pricing-plan");
481
- let body;
482
- body = JSON.stringify(take(input, {
483
- Arn: [],
484
- Description: [],
485
- Name: [],
486
- }));
487
- b.m("PUT").h(headers).b(body);
488
- return b.build();
489
- };
490
- export const se_UpdatePricingRuleCommand = async (input, context) => {
491
- const b = rb(input, context);
492
- const headers = {
493
- "content-type": "application/json",
494
- };
495
- b.bp("/update-pricing-rule");
496
- let body;
497
- body = JSON.stringify(take(input, {
498
- Arn: [],
499
- Description: [],
500
- ModifierPercentage: (_) => __serializeFloat(_),
501
- Name: [],
502
- Tiering: (_) => _json(_),
503
- Type: [],
504
- }));
505
- b.m("PUT").h(headers).b(body);
506
- return b.build();
507
- };
508
- export const de_AssociateAccountsCommand = async (output, context) => {
509
- if (output.statusCode !== 200 && output.statusCode >= 300) {
510
- return de_CommandError(output, context);
511
- }
512
- const contents = map({
513
- $metadata: deserializeMetadata(output),
514
- });
515
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
516
- const doc = take(data, {
517
- Arn: __expectString,
518
- });
519
- Object.assign(contents, doc);
520
- return contents;
521
- };
522
- export const de_AssociatePricingRulesCommand = async (output, context) => {
523
- if (output.statusCode !== 200 && output.statusCode >= 300) {
524
- return de_CommandError(output, context);
525
- }
526
- const contents = map({
527
- $metadata: deserializeMetadata(output),
528
- });
529
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
530
- const doc = take(data, {
531
- Arn: __expectString,
532
- });
533
- Object.assign(contents, doc);
534
- return contents;
535
- };
536
- export const de_BatchAssociateResourcesToCustomLineItemCommand = async (output, context) => {
537
- if (output.statusCode !== 200 && output.statusCode >= 300) {
538
- return de_CommandError(output, context);
539
- }
540
- const contents = map({
541
- $metadata: deserializeMetadata(output),
542
- });
543
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
544
- const doc = take(data, {
545
- FailedAssociatedResources: _json,
546
- SuccessfullyAssociatedResources: _json,
547
- });
548
- Object.assign(contents, doc);
549
- return contents;
550
- };
551
- export const de_BatchDisassociateResourcesFromCustomLineItemCommand = async (output, context) => {
552
- if (output.statusCode !== 200 && output.statusCode >= 300) {
553
- return de_CommandError(output, context);
554
- }
555
- const contents = map({
556
- $metadata: deserializeMetadata(output),
557
- });
558
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
559
- const doc = take(data, {
560
- FailedDisassociatedResources: _json,
561
- SuccessfullyDisassociatedResources: _json,
562
- });
563
- Object.assign(contents, doc);
564
- return contents;
565
- };
566
- export const de_CreateBillingGroupCommand = async (output, context) => {
567
- if (output.statusCode !== 200 && output.statusCode >= 300) {
568
- return de_CommandError(output, context);
569
- }
570
- const contents = map({
571
- $metadata: deserializeMetadata(output),
572
- });
573
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
574
- const doc = take(data, {
575
- Arn: __expectString,
576
- });
577
- Object.assign(contents, doc);
578
- return contents;
579
- };
580
- export const de_CreateCustomLineItemCommand = async (output, context) => {
581
- if (output.statusCode !== 200 && output.statusCode >= 300) {
582
- return de_CommandError(output, context);
583
- }
584
- const contents = map({
585
- $metadata: deserializeMetadata(output),
586
- });
587
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
588
- const doc = take(data, {
589
- Arn: __expectString,
590
- });
591
- Object.assign(contents, doc);
592
- return contents;
593
- };
594
- export const de_CreatePricingPlanCommand = async (output, context) => {
595
- if (output.statusCode !== 200 && output.statusCode >= 300) {
596
- return de_CommandError(output, context);
597
- }
598
- const contents = map({
599
- $metadata: deserializeMetadata(output),
600
- });
601
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
602
- const doc = take(data, {
603
- Arn: __expectString,
604
- });
605
- Object.assign(contents, doc);
606
- return contents;
607
- };
608
- export const de_CreatePricingRuleCommand = async (output, context) => {
609
- if (output.statusCode !== 200 && output.statusCode >= 300) {
610
- return de_CommandError(output, context);
611
- }
612
- const contents = map({
613
- $metadata: deserializeMetadata(output),
614
- });
615
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
616
- const doc = take(data, {
617
- Arn: __expectString,
618
- });
619
- Object.assign(contents, doc);
620
- return contents;
621
- };
622
- export const de_DeleteBillingGroupCommand = async (output, context) => {
623
- if (output.statusCode !== 200 && output.statusCode >= 300) {
624
- return de_CommandError(output, context);
625
- }
626
- const contents = map({
627
- $metadata: deserializeMetadata(output),
628
- });
629
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
630
- const doc = take(data, {
631
- Arn: __expectString,
632
- });
633
- Object.assign(contents, doc);
634
- return contents;
635
- };
636
- export const de_DeleteCustomLineItemCommand = async (output, context) => {
637
- if (output.statusCode !== 200 && output.statusCode >= 300) {
638
- return de_CommandError(output, context);
639
- }
640
- const contents = map({
641
- $metadata: deserializeMetadata(output),
642
- });
643
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
644
- const doc = take(data, {
645
- Arn: __expectString,
646
- });
647
- Object.assign(contents, doc);
648
- return contents;
649
- };
650
- export const de_DeletePricingPlanCommand = async (output, context) => {
651
- if (output.statusCode !== 200 && output.statusCode >= 300) {
652
- return de_CommandError(output, context);
653
- }
654
- const contents = map({
655
- $metadata: deserializeMetadata(output),
656
- });
657
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
658
- const doc = take(data, {
659
- Arn: __expectString,
660
- });
661
- Object.assign(contents, doc);
662
- return contents;
663
- };
664
- export const de_DeletePricingRuleCommand = async (output, context) => {
665
- if (output.statusCode !== 200 && output.statusCode >= 300) {
666
- return de_CommandError(output, context);
667
- }
668
- const contents = map({
669
- $metadata: deserializeMetadata(output),
670
- });
671
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
672
- const doc = take(data, {
673
- Arn: __expectString,
674
- });
675
- Object.assign(contents, doc);
676
- return contents;
677
- };
678
- export const de_DisassociateAccountsCommand = async (output, context) => {
679
- if (output.statusCode !== 200 && output.statusCode >= 300) {
680
- return de_CommandError(output, context);
681
- }
682
- const contents = map({
683
- $metadata: deserializeMetadata(output),
684
- });
685
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
686
- const doc = take(data, {
687
- Arn: __expectString,
688
- });
689
- Object.assign(contents, doc);
690
- return contents;
691
- };
692
- export const de_DisassociatePricingRulesCommand = async (output, context) => {
693
- if (output.statusCode !== 200 && output.statusCode >= 300) {
694
- return de_CommandError(output, context);
695
- }
696
- const contents = map({
697
- $metadata: deserializeMetadata(output),
698
- });
699
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
700
- const doc = take(data, {
701
- Arn: __expectString,
702
- });
703
- Object.assign(contents, doc);
704
- return contents;
705
- };
706
- export const de_GetBillingGroupCostReportCommand = async (output, context) => {
707
- if (output.statusCode !== 200 && output.statusCode >= 300) {
708
- return de_CommandError(output, context);
709
- }
710
- const contents = map({
711
- $metadata: deserializeMetadata(output),
712
- });
713
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
714
- const doc = take(data, {
715
- BillingGroupCostReportResults: _json,
716
- NextToken: __expectString,
717
- });
718
- Object.assign(contents, doc);
719
- return contents;
720
- };
721
- export const de_ListAccountAssociationsCommand = async (output, context) => {
722
- if (output.statusCode !== 200 && output.statusCode >= 300) {
723
- return de_CommandError(output, context);
724
- }
725
- const contents = map({
726
- $metadata: deserializeMetadata(output),
727
- });
728
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
729
- const doc = take(data, {
730
- LinkedAccounts: _json,
731
- NextToken: __expectString,
732
- });
733
- Object.assign(contents, doc);
734
- return contents;
735
- };
736
- export const de_ListBillingGroupCostReportsCommand = async (output, context) => {
737
- if (output.statusCode !== 200 && output.statusCode >= 300) {
738
- return de_CommandError(output, context);
739
- }
740
- const contents = map({
741
- $metadata: deserializeMetadata(output),
742
- });
743
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
744
- const doc = take(data, {
745
- BillingGroupCostReports: _json,
746
- NextToken: __expectString,
747
- });
748
- Object.assign(contents, doc);
749
- return contents;
750
- };
751
- export const de_ListBillingGroupsCommand = async (output, context) => {
752
- if (output.statusCode !== 200 && output.statusCode >= 300) {
753
- return de_CommandError(output, context);
754
- }
755
- const contents = map({
756
- $metadata: deserializeMetadata(output),
757
- });
758
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
759
- const doc = take(data, {
760
- BillingGroups: _json,
761
- NextToken: __expectString,
762
- });
763
- Object.assign(contents, doc);
764
- return contents;
765
- };
766
- export const de_ListCustomLineItemsCommand = async (output, context) => {
767
- if (output.statusCode !== 200 && output.statusCode >= 300) {
768
- return de_CommandError(output, context);
769
- }
770
- const contents = map({
771
- $metadata: deserializeMetadata(output),
772
- });
773
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
774
- const doc = take(data, {
775
- CustomLineItems: (_) => de_CustomLineItemList(_, context),
776
- NextToken: __expectString,
777
- });
778
- Object.assign(contents, doc);
779
- return contents;
780
- };
781
- export const de_ListCustomLineItemVersionsCommand = async (output, context) => {
782
- if (output.statusCode !== 200 && output.statusCode >= 300) {
783
- return de_CommandError(output, context);
784
- }
785
- const contents = map({
786
- $metadata: deserializeMetadata(output),
787
- });
788
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
789
- const doc = take(data, {
790
- CustomLineItemVersions: (_) => de_CustomLineItemVersionList(_, context),
791
- NextToken: __expectString,
792
- });
793
- Object.assign(contents, doc);
794
- return contents;
795
- };
796
- export const de_ListPricingPlansCommand = async (output, context) => {
797
- if (output.statusCode !== 200 && output.statusCode >= 300) {
798
- return de_CommandError(output, context);
799
- }
800
- const contents = map({
801
- $metadata: deserializeMetadata(output),
802
- });
803
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
804
- const doc = take(data, {
805
- BillingPeriod: __expectString,
806
- NextToken: __expectString,
807
- PricingPlans: _json,
808
- });
809
- Object.assign(contents, doc);
810
- return contents;
811
- };
812
- export const de_ListPricingPlansAssociatedWithPricingRuleCommand = async (output, context) => {
813
- if (output.statusCode !== 200 && output.statusCode >= 300) {
814
- return de_CommandError(output, context);
815
- }
816
- const contents = map({
817
- $metadata: deserializeMetadata(output),
818
- });
819
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
820
- const doc = take(data, {
821
- BillingPeriod: __expectString,
822
- NextToken: __expectString,
823
- PricingPlanArns: _json,
824
- PricingRuleArn: __expectString,
825
- });
826
- Object.assign(contents, doc);
827
- return contents;
828
- };
829
- export const de_ListPricingRulesCommand = async (output, context) => {
830
- if (output.statusCode !== 200 && output.statusCode >= 300) {
831
- return de_CommandError(output, context);
832
- }
833
- const contents = map({
834
- $metadata: deserializeMetadata(output),
835
- });
836
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
837
- const doc = take(data, {
838
- BillingPeriod: __expectString,
839
- NextToken: __expectString,
840
- PricingRules: (_) => de_PricingRuleList(_, context),
841
- });
842
- Object.assign(contents, doc);
843
- return contents;
844
- };
845
- export const de_ListPricingRulesAssociatedToPricingPlanCommand = async (output, context) => {
846
- if (output.statusCode !== 200 && output.statusCode >= 300) {
847
- return de_CommandError(output, context);
848
- }
849
- const contents = map({
850
- $metadata: deserializeMetadata(output),
851
- });
852
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
853
- const doc = take(data, {
854
- BillingPeriod: __expectString,
855
- NextToken: __expectString,
856
- PricingPlanArn: __expectString,
857
- PricingRuleArns: _json,
858
- });
859
- Object.assign(contents, doc);
860
- return contents;
861
- };
862
- export const de_ListResourcesAssociatedToCustomLineItemCommand = async (output, context) => {
863
- if (output.statusCode !== 200 && output.statusCode >= 300) {
864
- return de_CommandError(output, context);
865
- }
866
- const contents = map({
867
- $metadata: deserializeMetadata(output),
868
- });
869
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
870
- const doc = take(data, {
871
- Arn: __expectString,
872
- AssociatedResources: _json,
873
- NextToken: __expectString,
874
- });
875
- Object.assign(contents, doc);
876
- return contents;
877
- };
878
- export const de_ListTagsForResourceCommand = async (output, context) => {
879
- if (output.statusCode !== 204 && output.statusCode >= 300) {
880
- return de_CommandError(output, context);
881
- }
882
- const contents = map({
883
- $metadata: deserializeMetadata(output),
884
- });
885
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
886
- const doc = take(data, {
887
- Tags: _json,
888
- });
889
- Object.assign(contents, doc);
890
- return contents;
891
- };
892
- export const de_TagResourceCommand = async (output, context) => {
893
- if (output.statusCode !== 204 && output.statusCode >= 300) {
894
- return de_CommandError(output, context);
895
- }
896
- const contents = map({
897
- $metadata: deserializeMetadata(output),
898
- });
899
- await collectBody(output.body, context);
900
- return contents;
901
- };
902
- export const de_UntagResourceCommand = async (output, context) => {
903
- if (output.statusCode !== 204 && output.statusCode >= 300) {
904
- return de_CommandError(output, context);
905
- }
906
- const contents = map({
907
- $metadata: deserializeMetadata(output),
908
- });
909
- await collectBody(output.body, context);
910
- return contents;
911
- };
912
- export const de_UpdateBillingGroupCommand = async (output, context) => {
913
- if (output.statusCode !== 200 && output.statusCode >= 300) {
914
- return de_CommandError(output, context);
915
- }
916
- const contents = map({
917
- $metadata: deserializeMetadata(output),
918
- });
919
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
920
- const doc = take(data, {
921
- AccountGrouping: _json,
922
- Arn: __expectString,
923
- Description: __expectString,
924
- LastModifiedTime: __expectLong,
925
- Name: __expectString,
926
- PricingPlanArn: __expectString,
927
- PrimaryAccountId: __expectString,
928
- Size: __expectLong,
929
- Status: __expectString,
930
- StatusReason: __expectString,
931
- });
932
- Object.assign(contents, doc);
933
- return contents;
934
- };
935
- export const de_UpdateCustomLineItemCommand = async (output, context) => {
936
- if (output.statusCode !== 200 && output.statusCode >= 300) {
937
- return de_CommandError(output, context);
938
- }
939
- const contents = map({
940
- $metadata: deserializeMetadata(output),
941
- });
942
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
943
- const doc = take(data, {
944
- Arn: __expectString,
945
- AssociationSize: __expectLong,
946
- BillingGroupArn: __expectString,
947
- ChargeDetails: (_) => de_ListCustomLineItemChargeDetails(_, context),
948
- Description: __expectString,
949
- LastModifiedTime: __expectLong,
950
- Name: __expectString,
951
- });
952
- Object.assign(contents, doc);
953
- return contents;
954
- };
955
- export const de_UpdatePricingPlanCommand = async (output, context) => {
956
- if (output.statusCode !== 200 && output.statusCode >= 300) {
957
- return de_CommandError(output, context);
958
- }
959
- const contents = map({
960
- $metadata: deserializeMetadata(output),
961
- });
962
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
963
- const doc = take(data, {
964
- Arn: __expectString,
965
- Description: __expectString,
966
- LastModifiedTime: __expectLong,
967
- Name: __expectString,
968
- Size: __expectLong,
969
- });
970
- Object.assign(contents, doc);
971
- return contents;
972
- };
973
- export const de_UpdatePricingRuleCommand = async (output, context) => {
974
- if (output.statusCode !== 200 && output.statusCode >= 300) {
975
- return de_CommandError(output, context);
976
- }
977
- const contents = map({
978
- $metadata: deserializeMetadata(output),
979
- });
980
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
981
- const doc = take(data, {
982
- Arn: __expectString,
983
- AssociatedPricingPlanCount: __expectLong,
984
- BillingEntity: __expectString,
985
- Description: __expectString,
986
- LastModifiedTime: __expectLong,
987
- ModifierPercentage: __limitedParseDouble,
988
- Name: __expectString,
989
- Operation: __expectString,
990
- Scope: __expectString,
991
- Service: __expectString,
992
- Tiering: _json,
993
- Type: __expectString,
994
- UsageType: __expectString,
995
- });
996
- Object.assign(contents, doc);
997
- return contents;
998
- };
999
- const de_CommandError = async (output, context) => {
1000
- const parsedOutput = {
1001
- ...output,
1002
- body: await parseErrorBody(output.body, context),
1003
- };
1004
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1005
- switch (errorCode) {
1006
- case "AccessDeniedException":
1007
- case "com.amazonaws.billingconductor#AccessDeniedException":
1008
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1009
- case "ConflictException":
1010
- case "com.amazonaws.billingconductor#ConflictException":
1011
- throw await de_ConflictExceptionRes(parsedOutput, context);
1012
- case "InternalServerException":
1013
- case "com.amazonaws.billingconductor#InternalServerException":
1014
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1015
- case "ResourceNotFoundException":
1016
- case "com.amazonaws.billingconductor#ResourceNotFoundException":
1017
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1018
- case "ServiceLimitExceededException":
1019
- case "com.amazonaws.billingconductor#ServiceLimitExceededException":
1020
- throw await de_ServiceLimitExceededExceptionRes(parsedOutput, context);
1021
- case "ThrottlingException":
1022
- case "com.amazonaws.billingconductor#ThrottlingException":
1023
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1024
- case "ValidationException":
1025
- case "com.amazonaws.billingconductor#ValidationException":
1026
- throw await de_ValidationExceptionRes(parsedOutput, context);
1027
- default:
1028
- const parsedBody = parsedOutput.body;
1029
- return throwDefaultError({
1030
- output,
1031
- parsedBody,
1032
- errorCode,
1033
- });
1034
- }
1035
- };
1036
- const throwDefaultError = withBaseException(__BaseException);
1037
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1038
- const contents = map({});
1039
- const data = parsedOutput.body;
1040
- const doc = take(data, {
1041
- Message: __expectString,
1042
- });
1043
- Object.assign(contents, doc);
1044
- const exception = new AccessDeniedException({
1045
- $metadata: deserializeMetadata(parsedOutput),
1046
- ...contents,
1047
- });
1048
- return __decorateServiceException(exception, parsedOutput.body);
1049
- };
1050
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
1051
- const contents = map({});
1052
- const data = parsedOutput.body;
1053
- const doc = take(data, {
1054
- Message: __expectString,
1055
- Reason: __expectString,
1056
- ResourceId: __expectString,
1057
- ResourceType: __expectString,
1058
- });
1059
- Object.assign(contents, doc);
1060
- const exception = new ConflictException({
1061
- $metadata: deserializeMetadata(parsedOutput),
1062
- ...contents,
1063
- });
1064
- return __decorateServiceException(exception, parsedOutput.body);
1065
- };
1066
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1067
- const contents = map({
1068
- [_RAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
1069
- });
1070
- const data = parsedOutput.body;
1071
- const doc = take(data, {
1072
- Message: __expectString,
1073
- });
1074
- Object.assign(contents, doc);
1075
- const exception = new InternalServerException({
1076
- $metadata: deserializeMetadata(parsedOutput),
1077
- ...contents,
1078
- });
1079
- return __decorateServiceException(exception, parsedOutput.body);
1080
- };
1081
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1082
- const contents = map({});
1083
- const data = parsedOutput.body;
1084
- const doc = take(data, {
1085
- Message: __expectString,
1086
- ResourceId: __expectString,
1087
- ResourceType: __expectString,
1088
- });
1089
- Object.assign(contents, doc);
1090
- const exception = new ResourceNotFoundException({
1091
- $metadata: deserializeMetadata(parsedOutput),
1092
- ...contents,
1093
- });
1094
- return __decorateServiceException(exception, parsedOutput.body);
1095
- };
1096
- const de_ServiceLimitExceededExceptionRes = async (parsedOutput, context) => {
1097
- const contents = map({});
1098
- const data = parsedOutput.body;
1099
- const doc = take(data, {
1100
- LimitCode: __expectString,
1101
- Message: __expectString,
1102
- ResourceId: __expectString,
1103
- ResourceType: __expectString,
1104
- ServiceCode: __expectString,
1105
- });
1106
- Object.assign(contents, doc);
1107
- const exception = new ServiceLimitExceededException({
1108
- $metadata: deserializeMetadata(parsedOutput),
1109
- ...contents,
1110
- });
1111
- return __decorateServiceException(exception, parsedOutput.body);
1112
- };
1113
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1114
- const contents = map({
1115
- [_RAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
1116
- });
1117
- const data = parsedOutput.body;
1118
- const doc = take(data, {
1119
- Message: __expectString,
1120
- });
1121
- Object.assign(contents, doc);
1122
- const exception = new ThrottlingException({
1123
- $metadata: deserializeMetadata(parsedOutput),
1124
- ...contents,
1125
- });
1126
- return __decorateServiceException(exception, parsedOutput.body);
1127
- };
1128
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
1129
- const contents = map({});
1130
- const data = parsedOutput.body;
1131
- const doc = take(data, {
1132
- Fields: _json,
1133
- Message: __expectString,
1134
- Reason: __expectString,
1135
- });
1136
- Object.assign(contents, doc);
1137
- const exception = new ValidationException({
1138
- $metadata: deserializeMetadata(parsedOutput),
1139
- ...contents,
1140
- });
1141
- return __decorateServiceException(exception, parsedOutput.body);
1142
- };
1143
- const se_CustomLineItemChargeDetails = (input, context) => {
1144
- return take(input, {
1145
- Flat: (_) => se_CustomLineItemFlatChargeDetails(_, context),
1146
- LineItemFilters: _json,
1147
- Percentage: (_) => se_CustomLineItemPercentageChargeDetails(_, context),
1148
- Type: [],
1149
- });
1150
- };
1151
- const se_CustomLineItemFlatChargeDetails = (input, context) => {
1152
- return take(input, {
1153
- ChargeValue: __serializeFloat,
1154
- });
1155
- };
1156
- const se_CustomLineItemPercentageChargeDetails = (input, context) => {
1157
- return take(input, {
1158
- AssociatedValues: _json,
1159
- PercentageValue: __serializeFloat,
1160
- });
1161
- };
1162
- const se_UpdateCustomLineItemChargeDetails = (input, context) => {
1163
- return take(input, {
1164
- Flat: (_) => se_UpdateCustomLineItemFlatChargeDetails(_, context),
1165
- LineItemFilters: _json,
1166
- Percentage: (_) => se_UpdateCustomLineItemPercentageChargeDetails(_, context),
1167
- });
1168
- };
1169
- const se_UpdateCustomLineItemFlatChargeDetails = (input, context) => {
1170
- return take(input, {
1171
- ChargeValue: __serializeFloat,
1172
- });
1173
- };
1174
- const se_UpdateCustomLineItemPercentageChargeDetails = (input, context) => {
1175
- return take(input, {
1176
- PercentageValue: __serializeFloat,
1177
- });
1178
- };
1179
- const de_CustomLineItemList = (output, context) => {
1180
- const retVal = (output || [])
1181
- .filter((e) => e != null)
1182
- .map((entry) => {
1183
- return de_CustomLineItemListElement(entry, context);
1184
- });
1185
- return retVal;
1186
- };
1187
- const de_CustomLineItemListElement = (output, context) => {
1188
- return take(output, {
1189
- AccountId: __expectString,
1190
- Arn: __expectString,
1191
- AssociationSize: __expectLong,
1192
- BillingGroupArn: __expectString,
1193
- ChargeDetails: (_) => de_ListCustomLineItemChargeDetails(_, context),
1194
- ComputationRule: __expectString,
1195
- CreationTime: __expectLong,
1196
- CurrencyCode: __expectString,
1197
- Description: __expectString,
1198
- LastModifiedTime: __expectLong,
1199
- Name: __expectString,
1200
- PresentationDetails: _json,
1201
- ProductCode: __expectString,
1202
- });
1203
- };
1204
- const de_CustomLineItemVersionList = (output, context) => {
1205
- const retVal = (output || [])
1206
- .filter((e) => e != null)
1207
- .map((entry) => {
1208
- return de_CustomLineItemVersionListElement(entry, context);
1209
- });
1210
- return retVal;
1211
- };
1212
- const de_CustomLineItemVersionListElement = (output, context) => {
1213
- return take(output, {
1214
- AccountId: __expectString,
1215
- Arn: __expectString,
1216
- AssociationSize: __expectLong,
1217
- BillingGroupArn: __expectString,
1218
- ChargeDetails: (_) => de_ListCustomLineItemChargeDetails(_, context),
1219
- ComputationRule: __expectString,
1220
- CreationTime: __expectLong,
1221
- CurrencyCode: __expectString,
1222
- Description: __expectString,
1223
- EndBillingPeriod: __expectString,
1224
- LastModifiedTime: __expectLong,
1225
- Name: __expectString,
1226
- PresentationDetails: _json,
1227
- ProductCode: __expectString,
1228
- StartBillingPeriod: __expectString,
1229
- StartTime: __expectLong,
1230
- });
1231
- };
1232
- const de_ListCustomLineItemChargeDetails = (output, context) => {
1233
- return take(output, {
1234
- Flat: (_) => de_ListCustomLineItemFlatChargeDetails(_, context),
1235
- LineItemFilters: _json,
1236
- Percentage: (_) => de_ListCustomLineItemPercentageChargeDetails(_, context),
1237
- Type: __expectString,
1238
- });
1239
- };
1240
- const de_ListCustomLineItemFlatChargeDetails = (output, context) => {
1241
- return take(output, {
1242
- ChargeValue: __limitedParseDouble,
1243
- });
1244
- };
1245
- const de_ListCustomLineItemPercentageChargeDetails = (output, context) => {
1246
- return take(output, {
1247
- PercentageValue: __limitedParseDouble,
1248
- });
1249
- };
1250
- const de_PricingRuleList = (output, context) => {
1251
- const retVal = (output || [])
1252
- .filter((e) => e != null)
1253
- .map((entry) => {
1254
- return de_PricingRuleListElement(entry, context);
1255
- });
1256
- return retVal;
1257
- };
1258
- const de_PricingRuleListElement = (output, context) => {
1259
- return take(output, {
1260
- Arn: __expectString,
1261
- AssociatedPricingPlanCount: __expectLong,
1262
- BillingEntity: __expectString,
1263
- CreationTime: __expectLong,
1264
- Description: __expectString,
1265
- LastModifiedTime: __expectLong,
1266
- ModifierPercentage: __limitedParseDouble,
1267
- Name: __expectString,
1268
- Operation: __expectString,
1269
- Scope: __expectString,
1270
- Service: __expectString,
1271
- Tiering: _json,
1272
- Type: __expectString,
1273
- UsageType: __expectString,
1274
- });
1275
- };
1276
- const deserializeMetadata = (output) => ({
1277
- httpStatusCode: output.statusCode,
1278
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1279
- extendedRequestId: output.headers["x-amz-id-2"],
1280
- cfId: output.headers["x-amz-cf-id"],
1281
- });
1282
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1283
- const _CT = "ClientToken";
1284
- const _RAS = "RetryAfterSeconds";
1285
- const _TK = "TagKeys";
1286
- const _ra = "retry-after";
1287
- const _tK = "tagKeys";
1288
- const _xact = "x-amzn-client-token";