@aws-sdk/client-billingconductor 3.118.0 → 3.127.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.
@@ -14,9 +14,8 @@ const serializeAws_restJson1AssociateAccountsCommand = async (input, context) =>
14
14
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/associate-accounts";
15
15
  let body;
16
16
  body = JSON.stringify({
17
- ...(input.AccountIds !== undefined &&
18
- input.AccountIds !== null && { AccountIds: serializeAws_restJson1AccountIdList(input.AccountIds, context) }),
19
- ...(input.Arn !== undefined && input.Arn !== null && { Arn: input.Arn }),
17
+ ...(input.AccountIds != null && { AccountIds: serializeAws_restJson1AccountIdList(input.AccountIds, context) }),
18
+ ...(input.Arn != null && { Arn: input.Arn }),
20
19
  });
21
20
  return new protocol_http_1.HttpRequest({
22
21
  protocol,
@@ -37,9 +36,8 @@ const serializeAws_restJson1AssociatePricingRulesCommand = async (input, context
37
36
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/associate-pricing-rules";
38
37
  let body;
39
38
  body = JSON.stringify({
40
- ...(input.Arn !== undefined && input.Arn !== null && { Arn: input.Arn }),
41
- ...(input.PricingRuleArns !== undefined &&
42
- input.PricingRuleArns !== null && {
39
+ ...(input.Arn != null && { Arn: input.Arn }),
40
+ ...(input.PricingRuleArns != null && {
43
41
  PricingRuleArns: serializeAws_restJson1PricingRuleArnsNonEmptyInput(input.PricingRuleArns, context),
44
42
  }),
45
43
  });
@@ -63,15 +61,13 @@ const serializeAws_restJson1BatchAssociateResourcesToCustomLineItemCommand = asy
63
61
  "/batch-associate-resources-to-custom-line-item";
64
62
  let body;
65
63
  body = JSON.stringify({
66
- ...(input.BillingPeriodRange !== undefined &&
67
- input.BillingPeriodRange !== null && {
64
+ ...(input.BillingPeriodRange != null && {
68
65
  BillingPeriodRange: serializeAws_restJson1CustomLineItemBillingPeriodRange(input.BillingPeriodRange, context),
69
66
  }),
70
- ...(input.ResourceArns !== undefined &&
71
- input.ResourceArns !== null && {
67
+ ...(input.ResourceArns != null && {
72
68
  ResourceArns: serializeAws_restJson1CustomLineItemBatchAssociationsList(input.ResourceArns, context),
73
69
  }),
74
- ...(input.TargetArn !== undefined && input.TargetArn !== null && { TargetArn: input.TargetArn }),
70
+ ...(input.TargetArn != null && { TargetArn: input.TargetArn }),
75
71
  });
76
72
  return new protocol_http_1.HttpRequest({
77
73
  protocol,
@@ -93,15 +89,13 @@ const serializeAws_restJson1BatchDisassociateResourcesFromCustomLineItemCommand
93
89
  "/batch-disassociate-resources-from-custom-line-item";
94
90
  let body;
95
91
  body = JSON.stringify({
96
- ...(input.BillingPeriodRange !== undefined &&
97
- input.BillingPeriodRange !== null && {
92
+ ...(input.BillingPeriodRange != null && {
98
93
  BillingPeriodRange: serializeAws_restJson1CustomLineItemBillingPeriodRange(input.BillingPeriodRange, context),
99
94
  }),
100
- ...(input.ResourceArns !== undefined &&
101
- input.ResourceArns !== null && {
95
+ ...(input.ResourceArns != null && {
102
96
  ResourceArns: serializeAws_restJson1CustomLineItemBatchDisassociationsList(input.ResourceArns, context),
103
97
  }),
104
- ...(input.TargetArn !== undefined && input.TargetArn !== null && { TargetArn: input.TargetArn }),
98
+ ...(input.TargetArn != null && { TargetArn: input.TargetArn }),
105
99
  });
106
100
  return new protocol_http_1.HttpRequest({
107
101
  protocol,
@@ -123,19 +117,16 @@ const serializeAws_restJson1CreateBillingGroupCommand = async (input, context) =
123
117
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/create-billing-group";
124
118
  let body;
125
119
  body = JSON.stringify({
126
- ...(input.AccountGrouping !== undefined &&
127
- input.AccountGrouping !== null && {
120
+ ...(input.AccountGrouping != null && {
128
121
  AccountGrouping: serializeAws_restJson1AccountGrouping(input.AccountGrouping, context),
129
122
  }),
130
- ...(input.ComputationPreference !== undefined &&
131
- input.ComputationPreference !== null && {
123
+ ...(input.ComputationPreference != null && {
132
124
  ComputationPreference: serializeAws_restJson1ComputationPreference(input.ComputationPreference, context),
133
125
  }),
134
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
135
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
136
- ...(input.PrimaryAccountId !== undefined &&
137
- input.PrimaryAccountId !== null && { PrimaryAccountId: input.PrimaryAccountId }),
138
- ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
126
+ ...(input.Description != null && { Description: input.Description }),
127
+ ...(input.Name != null && { Name: input.Name }),
128
+ ...(input.PrimaryAccountId != null && { PrimaryAccountId: input.PrimaryAccountId }),
129
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
139
130
  });
140
131
  return new protocol_http_1.HttpRequest({
141
132
  protocol,
@@ -157,19 +148,16 @@ const serializeAws_restJson1CreateCustomLineItemCommand = async (input, context)
157
148
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/create-custom-line-item";
158
149
  let body;
159
150
  body = JSON.stringify({
160
- ...(input.BillingGroupArn !== undefined &&
161
- input.BillingGroupArn !== null && { BillingGroupArn: input.BillingGroupArn }),
162
- ...(input.BillingPeriodRange !== undefined &&
163
- input.BillingPeriodRange !== null && {
151
+ ...(input.BillingGroupArn != null && { BillingGroupArn: input.BillingGroupArn }),
152
+ ...(input.BillingPeriodRange != null && {
164
153
  BillingPeriodRange: serializeAws_restJson1CustomLineItemBillingPeriodRange(input.BillingPeriodRange, context),
165
154
  }),
166
- ...(input.ChargeDetails !== undefined &&
167
- input.ChargeDetails !== null && {
155
+ ...(input.ChargeDetails != null && {
168
156
  ChargeDetails: serializeAws_restJson1CustomLineItemChargeDetails(input.ChargeDetails, context),
169
157
  }),
170
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
171
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
172
- ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
158
+ ...(input.Description != null && { Description: input.Description }),
159
+ ...(input.Name != null && { Name: input.Name }),
160
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
173
161
  });
174
162
  return new protocol_http_1.HttpRequest({
175
163
  protocol,
@@ -191,13 +179,12 @@ const serializeAws_restJson1CreatePricingPlanCommand = async (input, context) =>
191
179
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/create-pricing-plan";
192
180
  let body;
193
181
  body = JSON.stringify({
194
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
195
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
196
- ...(input.PricingRuleArns !== undefined &&
197
- input.PricingRuleArns !== null && {
182
+ ...(input.Description != null && { Description: input.Description }),
183
+ ...(input.Name != null && { Name: input.Name }),
184
+ ...(input.PricingRuleArns != null && {
198
185
  PricingRuleArns: serializeAws_restJson1PricingRuleArnsInput(input.PricingRuleArns, context),
199
186
  }),
200
- ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
187
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
201
188
  });
202
189
  return new protocol_http_1.HttpRequest({
203
190
  protocol,
@@ -219,14 +206,13 @@ const serializeAws_restJson1CreatePricingRuleCommand = async (input, context) =>
219
206
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/create-pricing-rule";
220
207
  let body;
221
208
  body = JSON.stringify({
222
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
223
- ...(input.ModifierPercentage !== undefined &&
224
- input.ModifierPercentage !== null && { ModifierPercentage: (0, smithy_client_1.serializeFloat)(input.ModifierPercentage) }),
225
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
226
- ...(input.Scope !== undefined && input.Scope !== null && { Scope: input.Scope }),
227
- ...(input.Service !== undefined && input.Service !== null && { Service: input.Service }),
228
- ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
229
- ...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
209
+ ...(input.Description != null && { Description: input.Description }),
210
+ ...(input.ModifierPercentage != null && { ModifierPercentage: (0, smithy_client_1.serializeFloat)(input.ModifierPercentage) }),
211
+ ...(input.Name != null && { Name: input.Name }),
212
+ ...(input.Scope != null && { Scope: input.Scope }),
213
+ ...(input.Service != null && { Service: input.Service }),
214
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
215
+ ...(input.Type != null && { Type: input.Type }),
230
216
  });
231
217
  return new protocol_http_1.HttpRequest({
232
218
  protocol,
@@ -247,7 +233,7 @@ const serializeAws_restJson1DeleteBillingGroupCommand = async (input, context) =
247
233
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/delete-billing-group";
248
234
  let body;
249
235
  body = JSON.stringify({
250
- ...(input.Arn !== undefined && input.Arn !== null && { Arn: input.Arn }),
236
+ ...(input.Arn != null && { Arn: input.Arn }),
251
237
  });
252
238
  return new protocol_http_1.HttpRequest({
253
239
  protocol,
@@ -268,9 +254,8 @@ const serializeAws_restJson1DeleteCustomLineItemCommand = async (input, context)
268
254
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/delete-custom-line-item";
269
255
  let body;
270
256
  body = JSON.stringify({
271
- ...(input.Arn !== undefined && input.Arn !== null && { Arn: input.Arn }),
272
- ...(input.BillingPeriodRange !== undefined &&
273
- input.BillingPeriodRange !== null && {
257
+ ...(input.Arn != null && { Arn: input.Arn }),
258
+ ...(input.BillingPeriodRange != null && {
274
259
  BillingPeriodRange: serializeAws_restJson1CustomLineItemBillingPeriodRange(input.BillingPeriodRange, context),
275
260
  }),
276
261
  });
@@ -293,7 +278,7 @@ const serializeAws_restJson1DeletePricingPlanCommand = async (input, context) =>
293
278
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/delete-pricing-plan";
294
279
  let body;
295
280
  body = JSON.stringify({
296
- ...(input.Arn !== undefined && input.Arn !== null && { Arn: input.Arn }),
281
+ ...(input.Arn != null && { Arn: input.Arn }),
297
282
  });
298
283
  return new protocol_http_1.HttpRequest({
299
284
  protocol,
@@ -314,7 +299,7 @@ const serializeAws_restJson1DeletePricingRuleCommand = async (input, context) =>
314
299
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/delete-pricing-rule";
315
300
  let body;
316
301
  body = JSON.stringify({
317
- ...(input.Arn !== undefined && input.Arn !== null && { Arn: input.Arn }),
302
+ ...(input.Arn != null && { Arn: input.Arn }),
318
303
  });
319
304
  return new protocol_http_1.HttpRequest({
320
305
  protocol,
@@ -335,9 +320,8 @@ const serializeAws_restJson1DisassociateAccountsCommand = async (input, context)
335
320
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/disassociate-accounts";
336
321
  let body;
337
322
  body = JSON.stringify({
338
- ...(input.AccountIds !== undefined &&
339
- input.AccountIds !== null && { AccountIds: serializeAws_restJson1AccountIdList(input.AccountIds, context) }),
340
- ...(input.Arn !== undefined && input.Arn !== null && { Arn: input.Arn }),
323
+ ...(input.AccountIds != null && { AccountIds: serializeAws_restJson1AccountIdList(input.AccountIds, context) }),
324
+ ...(input.Arn != null && { Arn: input.Arn }),
341
325
  });
342
326
  return new protocol_http_1.HttpRequest({
343
327
  protocol,
@@ -358,9 +342,8 @@ const serializeAws_restJson1DisassociatePricingRulesCommand = async (input, cont
358
342
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/disassociate-pricing-rules";
359
343
  let body;
360
344
  body = JSON.stringify({
361
- ...(input.Arn !== undefined && input.Arn !== null && { Arn: input.Arn }),
362
- ...(input.PricingRuleArns !== undefined &&
363
- input.PricingRuleArns !== null && {
345
+ ...(input.Arn != null && { Arn: input.Arn }),
346
+ ...(input.PricingRuleArns != null && {
364
347
  PricingRuleArns: serializeAws_restJson1PricingRuleArnsNonEmptyInput(input.PricingRuleArns, context),
365
348
  }),
366
349
  });
@@ -383,12 +366,11 @@ const serializeAws_restJson1ListAccountAssociationsCommand = async (input, conte
383
366
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/list-account-associations";
384
367
  let body;
385
368
  body = JSON.stringify({
386
- ...(input.BillingPeriod !== undefined && input.BillingPeriod !== null && { BillingPeriod: input.BillingPeriod }),
387
- ...(input.Filters !== undefined &&
388
- input.Filters !== null && {
369
+ ...(input.BillingPeriod != null && { BillingPeriod: input.BillingPeriod }),
370
+ ...(input.Filters != null && {
389
371
  Filters: serializeAws_restJson1ListAccountAssociationsFilter(input.Filters, context),
390
372
  }),
391
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
373
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
392
374
  });
393
375
  return new protocol_http_1.HttpRequest({
394
376
  protocol,
@@ -409,13 +391,12 @@ const serializeAws_restJson1ListBillingGroupCostReportsCommand = async (input, c
409
391
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/list-billing-group-cost-reports";
410
392
  let body;
411
393
  body = JSON.stringify({
412
- ...(input.BillingPeriod !== undefined && input.BillingPeriod !== null && { BillingPeriod: input.BillingPeriod }),
413
- ...(input.Filters !== undefined &&
414
- input.Filters !== null && {
394
+ ...(input.BillingPeriod != null && { BillingPeriod: input.BillingPeriod }),
395
+ ...(input.Filters != null && {
415
396
  Filters: serializeAws_restJson1ListBillingGroupCostReportsFilter(input.Filters, context),
416
397
  }),
417
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
418
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
398
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
399
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
419
400
  });
420
401
  return new protocol_http_1.HttpRequest({
421
402
  protocol,
@@ -436,11 +417,10 @@ const serializeAws_restJson1ListBillingGroupsCommand = async (input, context) =>
436
417
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/list-billing-groups";
437
418
  let body;
438
419
  body = JSON.stringify({
439
- ...(input.BillingPeriod !== undefined && input.BillingPeriod !== null && { BillingPeriod: input.BillingPeriod }),
440
- ...(input.Filters !== undefined &&
441
- input.Filters !== null && { Filters: serializeAws_restJson1ListBillingGroupsFilter(input.Filters, context) }),
442
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
443
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
420
+ ...(input.BillingPeriod != null && { BillingPeriod: input.BillingPeriod }),
421
+ ...(input.Filters != null && { Filters: serializeAws_restJson1ListBillingGroupsFilter(input.Filters, context) }),
422
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
423
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
444
424
  });
445
425
  return new protocol_http_1.HttpRequest({
446
426
  protocol,
@@ -461,11 +441,10 @@ const serializeAws_restJson1ListCustomLineItemsCommand = async (input, context)
461
441
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/list-custom-line-items";
462
442
  let body;
463
443
  body = JSON.stringify({
464
- ...(input.BillingPeriod !== undefined && input.BillingPeriod !== null && { BillingPeriod: input.BillingPeriod }),
465
- ...(input.Filters !== undefined &&
466
- input.Filters !== null && { Filters: serializeAws_restJson1ListCustomLineItemsFilter(input.Filters, context) }),
467
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
468
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
444
+ ...(input.BillingPeriod != null && { BillingPeriod: input.BillingPeriod }),
445
+ ...(input.Filters != null && { Filters: serializeAws_restJson1ListCustomLineItemsFilter(input.Filters, context) }),
446
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
447
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
469
448
  });
470
449
  return new protocol_http_1.HttpRequest({
471
450
  protocol,
@@ -486,11 +465,10 @@ const serializeAws_restJson1ListPricingPlansCommand = async (input, context) =>
486
465
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/list-pricing-plans";
487
466
  let body;
488
467
  body = JSON.stringify({
489
- ...(input.BillingPeriod !== undefined && input.BillingPeriod !== null && { BillingPeriod: input.BillingPeriod }),
490
- ...(input.Filters !== undefined &&
491
- input.Filters !== null && { Filters: serializeAws_restJson1ListPricingPlansFilter(input.Filters, context) }),
492
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
493
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
468
+ ...(input.BillingPeriod != null && { BillingPeriod: input.BillingPeriod }),
469
+ ...(input.Filters != null && { Filters: serializeAws_restJson1ListPricingPlansFilter(input.Filters, context) }),
470
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
471
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
494
472
  });
495
473
  return new protocol_http_1.HttpRequest({
496
474
  protocol,
@@ -512,11 +490,10 @@ const serializeAws_restJson1ListPricingPlansAssociatedWithPricingRuleCommand = a
512
490
  "/list-pricing-plans-associated-with-pricing-rule";
513
491
  let body;
514
492
  body = JSON.stringify({
515
- ...(input.BillingPeriod !== undefined && input.BillingPeriod !== null && { BillingPeriod: input.BillingPeriod }),
516
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
517
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
518
- ...(input.PricingRuleArn !== undefined &&
519
- input.PricingRuleArn !== null && { PricingRuleArn: input.PricingRuleArn }),
493
+ ...(input.BillingPeriod != null && { BillingPeriod: input.BillingPeriod }),
494
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
495
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
496
+ ...(input.PricingRuleArn != null && { PricingRuleArn: input.PricingRuleArn }),
520
497
  });
521
498
  return new protocol_http_1.HttpRequest({
522
499
  protocol,
@@ -537,11 +514,10 @@ const serializeAws_restJson1ListPricingRulesCommand = async (input, context) =>
537
514
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/list-pricing-rules";
538
515
  let body;
539
516
  body = JSON.stringify({
540
- ...(input.BillingPeriod !== undefined && input.BillingPeriod !== null && { BillingPeriod: input.BillingPeriod }),
541
- ...(input.Filters !== undefined &&
542
- input.Filters !== null && { Filters: serializeAws_restJson1ListPricingRulesFilter(input.Filters, context) }),
543
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
544
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
517
+ ...(input.BillingPeriod != null && { BillingPeriod: input.BillingPeriod }),
518
+ ...(input.Filters != null && { Filters: serializeAws_restJson1ListPricingRulesFilter(input.Filters, context) }),
519
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
520
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
545
521
  });
546
522
  return new protocol_http_1.HttpRequest({
547
523
  protocol,
@@ -563,11 +539,10 @@ const serializeAws_restJson1ListPricingRulesAssociatedToPricingPlanCommand = asy
563
539
  "/list-pricing-rules-associated-to-pricing-plan";
564
540
  let body;
565
541
  body = JSON.stringify({
566
- ...(input.BillingPeriod !== undefined && input.BillingPeriod !== null && { BillingPeriod: input.BillingPeriod }),
567
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
568
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
569
- ...(input.PricingPlanArn !== undefined &&
570
- input.PricingPlanArn !== null && { PricingPlanArn: input.PricingPlanArn }),
542
+ ...(input.BillingPeriod != null && { BillingPeriod: input.BillingPeriod }),
543
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
544
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
545
+ ...(input.PricingPlanArn != null && { PricingPlanArn: input.PricingPlanArn }),
571
546
  });
572
547
  return new protocol_http_1.HttpRequest({
573
548
  protocol,
@@ -589,14 +564,13 @@ const serializeAws_restJson1ListResourcesAssociatedToCustomLineItemCommand = asy
589
564
  "/list-resources-associated-to-custom-line-item";
590
565
  let body;
591
566
  body = JSON.stringify({
592
- ...(input.Arn !== undefined && input.Arn !== null && { Arn: input.Arn }),
593
- ...(input.BillingPeriod !== undefined && input.BillingPeriod !== null && { BillingPeriod: input.BillingPeriod }),
594
- ...(input.Filters !== undefined &&
595
- input.Filters !== null && {
567
+ ...(input.Arn != null && { Arn: input.Arn }),
568
+ ...(input.BillingPeriod != null && { BillingPeriod: input.BillingPeriod }),
569
+ ...(input.Filters != null && {
596
570
  Filters: serializeAws_restJson1ListResourcesAssociatedToCustomLineItemFilter(input.Filters, context),
597
571
  }),
598
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
599
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
572
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
573
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
600
574
  });
601
575
  return new protocol_http_1.HttpRequest({
602
576
  protocol,
@@ -653,7 +627,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
653
627
  }
654
628
  let body;
655
629
  body = JSON.stringify({
656
- ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
630
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
657
631
  });
658
632
  return new protocol_http_1.HttpRequest({
659
633
  protocol,
@@ -704,14 +678,13 @@ const serializeAws_restJson1UpdateBillingGroupCommand = async (input, context) =
704
678
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/update-billing-group";
705
679
  let body;
706
680
  body = JSON.stringify({
707
- ...(input.Arn !== undefined && input.Arn !== null && { Arn: input.Arn }),
708
- ...(input.ComputationPreference !== undefined &&
709
- input.ComputationPreference !== null && {
681
+ ...(input.Arn != null && { Arn: input.Arn }),
682
+ ...(input.ComputationPreference != null && {
710
683
  ComputationPreference: serializeAws_restJson1ComputationPreference(input.ComputationPreference, context),
711
684
  }),
712
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
713
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
714
- ...(input.Status !== undefined && input.Status !== null && { Status: input.Status }),
685
+ ...(input.Description != null && { Description: input.Description }),
686
+ ...(input.Name != null && { Name: input.Name }),
687
+ ...(input.Status != null && { Status: input.Status }),
715
688
  });
716
689
  return new protocol_http_1.HttpRequest({
717
690
  protocol,
@@ -732,17 +705,15 @@ const serializeAws_restJson1UpdateCustomLineItemCommand = async (input, context)
732
705
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/update-custom-line-item";
733
706
  let body;
734
707
  body = JSON.stringify({
735
- ...(input.Arn !== undefined && input.Arn !== null && { Arn: input.Arn }),
736
- ...(input.BillingPeriodRange !== undefined &&
737
- input.BillingPeriodRange !== null && {
708
+ ...(input.Arn != null && { Arn: input.Arn }),
709
+ ...(input.BillingPeriodRange != null && {
738
710
  BillingPeriodRange: serializeAws_restJson1CustomLineItemBillingPeriodRange(input.BillingPeriodRange, context),
739
711
  }),
740
- ...(input.ChargeDetails !== undefined &&
741
- input.ChargeDetails !== null && {
712
+ ...(input.ChargeDetails != null && {
742
713
  ChargeDetails: serializeAws_restJson1UpdateCustomLineItemChargeDetails(input.ChargeDetails, context),
743
714
  }),
744
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
745
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
715
+ ...(input.Description != null && { Description: input.Description }),
716
+ ...(input.Name != null && { Name: input.Name }),
746
717
  });
747
718
  return new protocol_http_1.HttpRequest({
748
719
  protocol,
@@ -763,9 +734,9 @@ const serializeAws_restJson1UpdatePricingPlanCommand = async (input, context) =>
763
734
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/update-pricing-plan";
764
735
  let body;
765
736
  body = JSON.stringify({
766
- ...(input.Arn !== undefined && input.Arn !== null && { Arn: input.Arn }),
767
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
768
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
737
+ ...(input.Arn != null && { Arn: input.Arn }),
738
+ ...(input.Description != null && { Description: input.Description }),
739
+ ...(input.Name != null && { Name: input.Name }),
769
740
  });
770
741
  return new protocol_http_1.HttpRequest({
771
742
  protocol,
@@ -786,12 +757,11 @@ const serializeAws_restJson1UpdatePricingRuleCommand = async (input, context) =>
786
757
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/update-pricing-rule";
787
758
  let body;
788
759
  body = JSON.stringify({
789
- ...(input.Arn !== undefined && input.Arn !== null && { Arn: input.Arn }),
790
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
791
- ...(input.ModifierPercentage !== undefined &&
792
- input.ModifierPercentage !== null && { ModifierPercentage: (0, smithy_client_1.serializeFloat)(input.ModifierPercentage) }),
793
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
794
- ...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
760
+ ...(input.Arn != null && { Arn: input.Arn }),
761
+ ...(input.Description != null && { Description: input.Description }),
762
+ ...(input.ModifierPercentage != null && { ModifierPercentage: (0, smithy_client_1.serializeFloat)(input.ModifierPercentage) }),
763
+ ...(input.Name != null && { Name: input.Name }),
764
+ ...(input.Type != null && { Type: input.Type }),
795
765
  });
796
766
  return new protocol_http_1.HttpRequest({
797
767
  protocol,
@@ -825,8 +795,7 @@ const deserializeAws_restJson1AssociateAccountsCommandError = async (output, con
825
795
  body: await parseBody(output.body, context),
826
796
  };
827
797
  let response;
828
- let errorCode = "UnknownError";
829
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
798
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
830
799
  switch (errorCode) {
831
800
  case "AccessDeniedException":
832
801
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -851,10 +820,12 @@ const deserializeAws_restJson1AssociateAccountsCommandError = async (output, con
851
820
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
852
821
  default:
853
822
  const parsedBody = parsedOutput.body;
823
+ const $metadata = deserializeMetadata(output);
824
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
854
825
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
855
- name: parsedBody.code || parsedBody.Code || errorCode,
826
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
856
827
  $fault: "client",
857
- $metadata: deserializeMetadata(output),
828
+ $metadata,
858
829
  });
859
830
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
860
831
  }
@@ -880,8 +851,7 @@ const deserializeAws_restJson1AssociatePricingRulesCommandError = async (output,
880
851
  body: await parseBody(output.body, context),
881
852
  };
882
853
  let response;
883
- let errorCode = "UnknownError";
884
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
854
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
885
855
  switch (errorCode) {
886
856
  case "AccessDeniedException":
887
857
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -906,10 +876,12 @@ const deserializeAws_restJson1AssociatePricingRulesCommandError = async (output,
906
876
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
907
877
  default:
908
878
  const parsedBody = parsedOutput.body;
879
+ const $metadata = deserializeMetadata(output);
880
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
909
881
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
910
- name: parsedBody.code || parsedBody.Code || errorCode,
882
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
911
883
  $fault: "client",
912
- $metadata: deserializeMetadata(output),
884
+ $metadata,
913
885
  });
914
886
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
915
887
  }
@@ -939,8 +911,7 @@ const deserializeAws_restJson1BatchAssociateResourcesToCustomLineItemCommandErro
939
911
  body: await parseBody(output.body, context),
940
912
  };
941
913
  let response;
942
- let errorCode = "UnknownError";
943
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
914
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
944
915
  switch (errorCode) {
945
916
  case "AccessDeniedException":
946
917
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -965,10 +936,12 @@ const deserializeAws_restJson1BatchAssociateResourcesToCustomLineItemCommandErro
965
936
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
966
937
  default:
967
938
  const parsedBody = parsedOutput.body;
939
+ const $metadata = deserializeMetadata(output);
940
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
968
941
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
969
- name: parsedBody.code || parsedBody.Code || errorCode,
942
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
970
943
  $fault: "client",
971
- $metadata: deserializeMetadata(output),
944
+ $metadata,
972
945
  });
973
946
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
974
947
  }
@@ -998,8 +971,7 @@ const deserializeAws_restJson1BatchDisassociateResourcesFromCustomLineItemComman
998
971
  body: await parseBody(output.body, context),
999
972
  };
1000
973
  let response;
1001
- let errorCode = "UnknownError";
1002
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
974
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1003
975
  switch (errorCode) {
1004
976
  case "AccessDeniedException":
1005
977
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -1021,10 +993,12 @@ const deserializeAws_restJson1BatchDisassociateResourcesFromCustomLineItemComman
1021
993
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1022
994
  default:
1023
995
  const parsedBody = parsedOutput.body;
996
+ const $metadata = deserializeMetadata(output);
997
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1024
998
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
1025
- name: parsedBody.code || parsedBody.Code || errorCode,
999
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1026
1000
  $fault: "client",
1027
- $metadata: deserializeMetadata(output),
1001
+ $metadata,
1028
1002
  });
1029
1003
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1030
1004
  }
@@ -1050,8 +1024,7 @@ const deserializeAws_restJson1CreateBillingGroupCommandError = async (output, co
1050
1024
  body: await parseBody(output.body, context),
1051
1025
  };
1052
1026
  let response;
1053
- let errorCode = "UnknownError";
1054
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1027
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1055
1028
  switch (errorCode) {
1056
1029
  case "AccessDeniedException":
1057
1030
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -1073,10 +1046,12 @@ const deserializeAws_restJson1CreateBillingGroupCommandError = async (output, co
1073
1046
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1074
1047
  default:
1075
1048
  const parsedBody = parsedOutput.body;
1049
+ const $metadata = deserializeMetadata(output);
1050
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1076
1051
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
1077
- name: parsedBody.code || parsedBody.Code || errorCode,
1052
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1078
1053
  $fault: "client",
1079
- $metadata: deserializeMetadata(output),
1054
+ $metadata,
1080
1055
  });
1081
1056
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1082
1057
  }
@@ -1102,8 +1077,7 @@ const deserializeAws_restJson1CreateCustomLineItemCommandError = async (output,
1102
1077
  body: await parseBody(output.body, context),
1103
1078
  };
1104
1079
  let response;
1105
- let errorCode = "UnknownError";
1106
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1080
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1107
1081
  switch (errorCode) {
1108
1082
  case "AccessDeniedException":
1109
1083
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -1125,10 +1099,12 @@ const deserializeAws_restJson1CreateCustomLineItemCommandError = async (output,
1125
1099
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1126
1100
  default:
1127
1101
  const parsedBody = parsedOutput.body;
1102
+ const $metadata = deserializeMetadata(output);
1103
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1128
1104
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
1129
- name: parsedBody.code || parsedBody.Code || errorCode,
1105
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1130
1106
  $fault: "client",
1131
- $metadata: deserializeMetadata(output),
1107
+ $metadata,
1132
1108
  });
1133
1109
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1134
1110
  }
@@ -1154,8 +1130,7 @@ const deserializeAws_restJson1CreatePricingPlanCommandError = async (output, con
1154
1130
  body: await parseBody(output.body, context),
1155
1131
  };
1156
1132
  let response;
1157
- let errorCode = "UnknownError";
1158
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1133
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1159
1134
  switch (errorCode) {
1160
1135
  case "AccessDeniedException":
1161
1136
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -1180,10 +1155,12 @@ const deserializeAws_restJson1CreatePricingPlanCommandError = async (output, con
1180
1155
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1181
1156
  default:
1182
1157
  const parsedBody = parsedOutput.body;
1158
+ const $metadata = deserializeMetadata(output);
1159
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1183
1160
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
1184
- name: parsedBody.code || parsedBody.Code || errorCode,
1161
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1185
1162
  $fault: "client",
1186
- $metadata: deserializeMetadata(output),
1163
+ $metadata,
1187
1164
  });
1188
1165
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1189
1166
  }
@@ -1209,8 +1186,7 @@ const deserializeAws_restJson1CreatePricingRuleCommandError = async (output, con
1209
1186
  body: await parseBody(output.body, context),
1210
1187
  };
1211
1188
  let response;
1212
- let errorCode = "UnknownError";
1213
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1189
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1214
1190
  switch (errorCode) {
1215
1191
  case "AccessDeniedException":
1216
1192
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -1232,10 +1208,12 @@ const deserializeAws_restJson1CreatePricingRuleCommandError = async (output, con
1232
1208
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1233
1209
  default:
1234
1210
  const parsedBody = parsedOutput.body;
1211
+ const $metadata = deserializeMetadata(output);
1212
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1235
1213
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
1236
- name: parsedBody.code || parsedBody.Code || errorCode,
1214
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1237
1215
  $fault: "client",
1238
- $metadata: deserializeMetadata(output),
1216
+ $metadata,
1239
1217
  });
1240
1218
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1241
1219
  }
@@ -1261,8 +1239,7 @@ const deserializeAws_restJson1DeleteBillingGroupCommandError = async (output, co
1261
1239
  body: await parseBody(output.body, context),
1262
1240
  };
1263
1241
  let response;
1264
- let errorCode = "UnknownError";
1265
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1242
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1266
1243
  switch (errorCode) {
1267
1244
  case "AccessDeniedException":
1268
1245
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -1278,10 +1255,12 @@ const deserializeAws_restJson1DeleteBillingGroupCommandError = async (output, co
1278
1255
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1279
1256
  default:
1280
1257
  const parsedBody = parsedOutput.body;
1258
+ const $metadata = deserializeMetadata(output);
1259
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1281
1260
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
1282
- name: parsedBody.code || parsedBody.Code || errorCode,
1261
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1283
1262
  $fault: "client",
1284
- $metadata: deserializeMetadata(output),
1263
+ $metadata,
1285
1264
  });
1286
1265
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1287
1266
  }
@@ -1307,8 +1286,7 @@ const deserializeAws_restJson1DeleteCustomLineItemCommandError = async (output,
1307
1286
  body: await parseBody(output.body, context),
1308
1287
  };
1309
1288
  let response;
1310
- let errorCode = "UnknownError";
1311
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1289
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1312
1290
  switch (errorCode) {
1313
1291
  case "AccessDeniedException":
1314
1292
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -1327,10 +1305,12 @@ const deserializeAws_restJson1DeleteCustomLineItemCommandError = async (output,
1327
1305
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1328
1306
  default:
1329
1307
  const parsedBody = parsedOutput.body;
1308
+ const $metadata = deserializeMetadata(output);
1309
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1330
1310
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
1331
- name: parsedBody.code || parsedBody.Code || errorCode,
1311
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1332
1312
  $fault: "client",
1333
- $metadata: deserializeMetadata(output),
1313
+ $metadata,
1334
1314
  });
1335
1315
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1336
1316
  }
@@ -1356,8 +1336,7 @@ const deserializeAws_restJson1DeletePricingPlanCommandError = async (output, con
1356
1336
  body: await parseBody(output.body, context),
1357
1337
  };
1358
1338
  let response;
1359
- let errorCode = "UnknownError";
1360
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1339
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1361
1340
  switch (errorCode) {
1362
1341
  case "AccessDeniedException":
1363
1342
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -1376,10 +1355,12 @@ const deserializeAws_restJson1DeletePricingPlanCommandError = async (output, con
1376
1355
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1377
1356
  default:
1378
1357
  const parsedBody = parsedOutput.body;
1358
+ const $metadata = deserializeMetadata(output);
1359
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1379
1360
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
1380
- name: parsedBody.code || parsedBody.Code || errorCode,
1361
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1381
1362
  $fault: "client",
1382
- $metadata: deserializeMetadata(output),
1363
+ $metadata,
1383
1364
  });
1384
1365
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1385
1366
  }
@@ -1405,8 +1386,7 @@ const deserializeAws_restJson1DeletePricingRuleCommandError = async (output, con
1405
1386
  body: await parseBody(output.body, context),
1406
1387
  };
1407
1388
  let response;
1408
- let errorCode = "UnknownError";
1409
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1389
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1410
1390
  switch (errorCode) {
1411
1391
  case "AccessDeniedException":
1412
1392
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -1425,10 +1405,12 @@ const deserializeAws_restJson1DeletePricingRuleCommandError = async (output, con
1425
1405
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1426
1406
  default:
1427
1407
  const parsedBody = parsedOutput.body;
1408
+ const $metadata = deserializeMetadata(output);
1409
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1428
1410
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
1429
- name: parsedBody.code || parsedBody.Code || errorCode,
1411
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1430
1412
  $fault: "client",
1431
- $metadata: deserializeMetadata(output),
1413
+ $metadata,
1432
1414
  });
1433
1415
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1434
1416
  }
@@ -1454,8 +1436,7 @@ const deserializeAws_restJson1DisassociateAccountsCommandError = async (output,
1454
1436
  body: await parseBody(output.body, context),
1455
1437
  };
1456
1438
  let response;
1457
- let errorCode = "UnknownError";
1458
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1439
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1459
1440
  switch (errorCode) {
1460
1441
  case "AccessDeniedException":
1461
1442
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -1477,10 +1458,12 @@ const deserializeAws_restJson1DisassociateAccountsCommandError = async (output,
1477
1458
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1478
1459
  default:
1479
1460
  const parsedBody = parsedOutput.body;
1461
+ const $metadata = deserializeMetadata(output);
1462
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1480
1463
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
1481
- name: parsedBody.code || parsedBody.Code || errorCode,
1464
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1482
1465
  $fault: "client",
1483
- $metadata: deserializeMetadata(output),
1466
+ $metadata,
1484
1467
  });
1485
1468
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1486
1469
  }
@@ -1506,8 +1489,7 @@ const deserializeAws_restJson1DisassociatePricingRulesCommandError = async (outp
1506
1489
  body: await parseBody(output.body, context),
1507
1490
  };
1508
1491
  let response;
1509
- let errorCode = "UnknownError";
1510
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1492
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1511
1493
  switch (errorCode) {
1512
1494
  case "AccessDeniedException":
1513
1495
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -1529,10 +1511,12 @@ const deserializeAws_restJson1DisassociatePricingRulesCommandError = async (outp
1529
1511
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1530
1512
  default:
1531
1513
  const parsedBody = parsedOutput.body;
1514
+ const $metadata = deserializeMetadata(output);
1515
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1532
1516
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
1533
- name: parsedBody.code || parsedBody.Code || errorCode,
1517
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1534
1518
  $fault: "client",
1535
- $metadata: deserializeMetadata(output),
1519
+ $metadata,
1536
1520
  });
1537
1521
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1538
1522
  }
@@ -1562,8 +1546,7 @@ const deserializeAws_restJson1ListAccountAssociationsCommandError = async (outpu
1562
1546
  body: await parseBody(output.body, context),
1563
1547
  };
1564
1548
  let response;
1565
- let errorCode = "UnknownError";
1566
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1549
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1567
1550
  switch (errorCode) {
1568
1551
  case "AccessDeniedException":
1569
1552
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -1582,10 +1565,12 @@ const deserializeAws_restJson1ListAccountAssociationsCommandError = async (outpu
1582
1565
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1583
1566
  default:
1584
1567
  const parsedBody = parsedOutput.body;
1568
+ const $metadata = deserializeMetadata(output);
1569
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1585
1570
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
1586
- name: parsedBody.code || parsedBody.Code || errorCode,
1571
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1587
1572
  $fault: "client",
1588
- $metadata: deserializeMetadata(output),
1573
+ $metadata,
1589
1574
  });
1590
1575
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1591
1576
  }
@@ -1615,8 +1600,7 @@ const deserializeAws_restJson1ListBillingGroupCostReportsCommandError = async (o
1615
1600
  body: await parseBody(output.body, context),
1616
1601
  };
1617
1602
  let response;
1618
- let errorCode = "UnknownError";
1619
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1603
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1620
1604
  switch (errorCode) {
1621
1605
  case "AccessDeniedException":
1622
1606
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -1635,10 +1619,12 @@ const deserializeAws_restJson1ListBillingGroupCostReportsCommandError = async (o
1635
1619
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1636
1620
  default:
1637
1621
  const parsedBody = parsedOutput.body;
1622
+ const $metadata = deserializeMetadata(output);
1623
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1638
1624
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
1639
- name: parsedBody.code || parsedBody.Code || errorCode,
1625
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1640
1626
  $fault: "client",
1641
- $metadata: deserializeMetadata(output),
1627
+ $metadata,
1642
1628
  });
1643
1629
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1644
1630
  }
@@ -1668,8 +1654,7 @@ const deserializeAws_restJson1ListBillingGroupsCommandError = async (output, con
1668
1654
  body: await parseBody(output.body, context),
1669
1655
  };
1670
1656
  let response;
1671
- let errorCode = "UnknownError";
1672
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1657
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1673
1658
  switch (errorCode) {
1674
1659
  case "AccessDeniedException":
1675
1660
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -1688,10 +1673,12 @@ const deserializeAws_restJson1ListBillingGroupsCommandError = async (output, con
1688
1673
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1689
1674
  default:
1690
1675
  const parsedBody = parsedOutput.body;
1676
+ const $metadata = deserializeMetadata(output);
1677
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1691
1678
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
1692
- name: parsedBody.code || parsedBody.Code || errorCode,
1679
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1693
1680
  $fault: "client",
1694
- $metadata: deserializeMetadata(output),
1681
+ $metadata,
1695
1682
  });
1696
1683
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1697
1684
  }
@@ -1721,8 +1708,7 @@ const deserializeAws_restJson1ListCustomLineItemsCommandError = async (output, c
1721
1708
  body: await parseBody(output.body, context),
1722
1709
  };
1723
1710
  let response;
1724
- let errorCode = "UnknownError";
1725
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1711
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1726
1712
  switch (errorCode) {
1727
1713
  case "AccessDeniedException":
1728
1714
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -1741,10 +1727,12 @@ const deserializeAws_restJson1ListCustomLineItemsCommandError = async (output, c
1741
1727
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1742
1728
  default:
1743
1729
  const parsedBody = parsedOutput.body;
1730
+ const $metadata = deserializeMetadata(output);
1731
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1744
1732
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
1745
- name: parsedBody.code || parsedBody.Code || errorCode,
1733
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1746
1734
  $fault: "client",
1747
- $metadata: deserializeMetadata(output),
1735
+ $metadata,
1748
1736
  });
1749
1737
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1750
1738
  }
@@ -1778,8 +1766,7 @@ const deserializeAws_restJson1ListPricingPlansCommandError = async (output, cont
1778
1766
  body: await parseBody(output.body, context),
1779
1767
  };
1780
1768
  let response;
1781
- let errorCode = "UnknownError";
1782
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1769
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1783
1770
  switch (errorCode) {
1784
1771
  case "AccessDeniedException":
1785
1772
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -1795,10 +1782,12 @@ const deserializeAws_restJson1ListPricingPlansCommandError = async (output, cont
1795
1782
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1796
1783
  default:
1797
1784
  const parsedBody = parsedOutput.body;
1785
+ const $metadata = deserializeMetadata(output);
1786
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1798
1787
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
1799
- name: parsedBody.code || parsedBody.Code || errorCode,
1788
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1800
1789
  $fault: "client",
1801
- $metadata: deserializeMetadata(output),
1790
+ $metadata,
1802
1791
  });
1803
1792
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1804
1793
  }
@@ -1836,8 +1825,7 @@ const deserializeAws_restJson1ListPricingPlansAssociatedWithPricingRuleCommandEr
1836
1825
  body: await parseBody(output.body, context),
1837
1826
  };
1838
1827
  let response;
1839
- let errorCode = "UnknownError";
1840
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1828
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1841
1829
  switch (errorCode) {
1842
1830
  case "AccessDeniedException":
1843
1831
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -1856,10 +1844,12 @@ const deserializeAws_restJson1ListPricingPlansAssociatedWithPricingRuleCommandEr
1856
1844
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1857
1845
  default:
1858
1846
  const parsedBody = parsedOutput.body;
1847
+ const $metadata = deserializeMetadata(output);
1848
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1859
1849
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
1860
- name: parsedBody.code || parsedBody.Code || errorCode,
1850
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1861
1851
  $fault: "client",
1862
- $metadata: deserializeMetadata(output),
1852
+ $metadata,
1863
1853
  });
1864
1854
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1865
1855
  }
@@ -1893,8 +1883,7 @@ const deserializeAws_restJson1ListPricingRulesCommandError = async (output, cont
1893
1883
  body: await parseBody(output.body, context),
1894
1884
  };
1895
1885
  let response;
1896
- let errorCode = "UnknownError";
1897
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1886
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1898
1887
  switch (errorCode) {
1899
1888
  case "AccessDeniedException":
1900
1889
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -1910,10 +1899,12 @@ const deserializeAws_restJson1ListPricingRulesCommandError = async (output, cont
1910
1899
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1911
1900
  default:
1912
1901
  const parsedBody = parsedOutput.body;
1902
+ const $metadata = deserializeMetadata(output);
1903
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1913
1904
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
1914
- name: parsedBody.code || parsedBody.Code || errorCode,
1905
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1915
1906
  $fault: "client",
1916
- $metadata: deserializeMetadata(output),
1907
+ $metadata,
1917
1908
  });
1918
1909
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1919
1910
  }
@@ -1951,8 +1942,7 @@ const deserializeAws_restJson1ListPricingRulesAssociatedToPricingPlanCommandErro
1951
1942
  body: await parseBody(output.body, context),
1952
1943
  };
1953
1944
  let response;
1954
- let errorCode = "UnknownError";
1955
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1945
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1956
1946
  switch (errorCode) {
1957
1947
  case "AccessDeniedException":
1958
1948
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -1971,10 +1961,12 @@ const deserializeAws_restJson1ListPricingRulesAssociatedToPricingPlanCommandErro
1971
1961
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1972
1962
  default:
1973
1963
  const parsedBody = parsedOutput.body;
1964
+ const $metadata = deserializeMetadata(output);
1965
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1974
1966
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
1975
- name: parsedBody.code || parsedBody.Code || errorCode,
1967
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1976
1968
  $fault: "client",
1977
- $metadata: deserializeMetadata(output),
1969
+ $metadata,
1978
1970
  });
1979
1971
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1980
1972
  }
@@ -2008,8 +2000,7 @@ const deserializeAws_restJson1ListResourcesAssociatedToCustomLineItemCommandErro
2008
2000
  body: await parseBody(output.body, context),
2009
2001
  };
2010
2002
  let response;
2011
- let errorCode = "UnknownError";
2012
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2003
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2013
2004
  switch (errorCode) {
2014
2005
  case "AccessDeniedException":
2015
2006
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -2028,10 +2019,12 @@ const deserializeAws_restJson1ListResourcesAssociatedToCustomLineItemCommandErro
2028
2019
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2029
2020
  default:
2030
2021
  const parsedBody = parsedOutput.body;
2022
+ const $metadata = deserializeMetadata(output);
2023
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2031
2024
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
2032
- name: parsedBody.code || parsedBody.Code || errorCode,
2025
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2033
2026
  $fault: "client",
2034
- $metadata: deserializeMetadata(output),
2027
+ $metadata,
2035
2028
  });
2036
2029
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2037
2030
  }
@@ -2057,8 +2050,7 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
2057
2050
  body: await parseBody(output.body, context),
2058
2051
  };
2059
2052
  let response;
2060
- let errorCode = "UnknownError";
2061
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2053
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2062
2054
  switch (errorCode) {
2063
2055
  case "AccessDeniedException":
2064
2056
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -2077,10 +2069,12 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
2077
2069
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2078
2070
  default:
2079
2071
  const parsedBody = parsedOutput.body;
2072
+ const $metadata = deserializeMetadata(output);
2073
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2080
2074
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
2081
- name: parsedBody.code || parsedBody.Code || errorCode,
2075
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2082
2076
  $fault: "client",
2083
- $metadata: deserializeMetadata(output),
2077
+ $metadata,
2084
2078
  });
2085
2079
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2086
2080
  }
@@ -2102,8 +2096,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
2102
2096
  body: await parseBody(output.body, context),
2103
2097
  };
2104
2098
  let response;
2105
- let errorCode = "UnknownError";
2106
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2099
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2107
2100
  switch (errorCode) {
2108
2101
  case "AccessDeniedException":
2109
2102
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -2122,10 +2115,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
2122
2115
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2123
2116
  default:
2124
2117
  const parsedBody = parsedOutput.body;
2118
+ const $metadata = deserializeMetadata(output);
2119
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2125
2120
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
2126
- name: parsedBody.code || parsedBody.Code || errorCode,
2121
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2127
2122
  $fault: "client",
2128
- $metadata: deserializeMetadata(output),
2123
+ $metadata,
2129
2124
  });
2130
2125
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2131
2126
  }
@@ -2147,8 +2142,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
2147
2142
  body: await parseBody(output.body, context),
2148
2143
  };
2149
2144
  let response;
2150
- let errorCode = "UnknownError";
2151
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2145
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2152
2146
  switch (errorCode) {
2153
2147
  case "AccessDeniedException":
2154
2148
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -2167,10 +2161,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
2167
2161
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2168
2162
  default:
2169
2163
  const parsedBody = parsedOutput.body;
2164
+ const $metadata = deserializeMetadata(output);
2165
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2170
2166
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
2171
- name: parsedBody.code || parsedBody.Code || errorCode,
2167
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2172
2168
  $fault: "client",
2173
- $metadata: deserializeMetadata(output),
2169
+ $metadata,
2174
2170
  });
2175
2171
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2176
2172
  }
@@ -2228,8 +2224,7 @@ const deserializeAws_restJson1UpdateBillingGroupCommandError = async (output, co
2228
2224
  body: await parseBody(output.body, context),
2229
2225
  };
2230
2226
  let response;
2231
- let errorCode = "UnknownError";
2232
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2227
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2233
2228
  switch (errorCode) {
2234
2229
  case "AccessDeniedException":
2235
2230
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -2251,10 +2246,12 @@ const deserializeAws_restJson1UpdateBillingGroupCommandError = async (output, co
2251
2246
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2252
2247
  default:
2253
2248
  const parsedBody = parsedOutput.body;
2249
+ const $metadata = deserializeMetadata(output);
2250
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2254
2251
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
2255
- name: parsedBody.code || parsedBody.Code || errorCode,
2252
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2256
2253
  $fault: "client",
2257
- $metadata: deserializeMetadata(output),
2254
+ $metadata,
2258
2255
  });
2259
2256
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2260
2257
  }
@@ -2304,8 +2301,7 @@ const deserializeAws_restJson1UpdateCustomLineItemCommandError = async (output,
2304
2301
  body: await parseBody(output.body, context),
2305
2302
  };
2306
2303
  let response;
2307
- let errorCode = "UnknownError";
2308
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2304
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2309
2305
  switch (errorCode) {
2310
2306
  case "AccessDeniedException":
2311
2307
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -2324,10 +2320,12 @@ const deserializeAws_restJson1UpdateCustomLineItemCommandError = async (output,
2324
2320
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2325
2321
  default:
2326
2322
  const parsedBody = parsedOutput.body;
2323
+ const $metadata = deserializeMetadata(output);
2324
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2327
2325
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
2328
- name: parsedBody.code || parsedBody.Code || errorCode,
2326
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2329
2327
  $fault: "client",
2330
- $metadata: deserializeMetadata(output),
2328
+ $metadata,
2331
2329
  });
2332
2330
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2333
2331
  }
@@ -2369,8 +2367,7 @@ const deserializeAws_restJson1UpdatePricingPlanCommandError = async (output, con
2369
2367
  body: await parseBody(output.body, context),
2370
2368
  };
2371
2369
  let response;
2372
- let errorCode = "UnknownError";
2373
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2370
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2374
2371
  switch (errorCode) {
2375
2372
  case "AccessDeniedException":
2376
2373
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -2392,10 +2389,12 @@ const deserializeAws_restJson1UpdatePricingPlanCommandError = async (output, con
2392
2389
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2393
2390
  default:
2394
2391
  const parsedBody = parsedOutput.body;
2392
+ const $metadata = deserializeMetadata(output);
2393
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2395
2394
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
2396
- name: parsedBody.code || parsedBody.Code || errorCode,
2395
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2397
2396
  $fault: "client",
2398
- $metadata: deserializeMetadata(output),
2397
+ $metadata,
2399
2398
  });
2400
2399
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2401
2400
  }
@@ -2453,8 +2452,7 @@ const deserializeAws_restJson1UpdatePricingRuleCommandError = async (output, con
2453
2452
  body: await parseBody(output.body, context),
2454
2453
  };
2455
2454
  let response;
2456
- let errorCode = "UnknownError";
2457
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2455
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2458
2456
  switch (errorCode) {
2459
2457
  case "AccessDeniedException":
2460
2458
  case "com.amazonaws.billingconductor#AccessDeniedException":
@@ -2476,10 +2474,12 @@ const deserializeAws_restJson1UpdatePricingRuleCommandError = async (output, con
2476
2474
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2477
2475
  default:
2478
2476
  const parsedBody = parsedOutput.body;
2477
+ const $metadata = deserializeMetadata(output);
2478
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2479
2479
  response = new BillingconductorServiceException_1.BillingconductorServiceException({
2480
- name: parsedBody.code || parsedBody.Code || errorCode,
2480
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2481
2481
  $fault: "client",
2482
- $metadata: deserializeMetadata(output),
2482
+ $metadata,
2483
2483
  });
2484
2484
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2485
2485
  }
@@ -2606,8 +2606,7 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
2606
2606
  };
2607
2607
  const serializeAws_restJson1AccountGrouping = (input, context) => {
2608
2608
  return {
2609
- ...(input.LinkedAccountIds !== undefined &&
2610
- input.LinkedAccountIds !== null && {
2609
+ ...(input.LinkedAccountIds != null && {
2611
2610
  LinkedAccountIds: serializeAws_restJson1AccountIdList(input.LinkedAccountIds, context),
2612
2611
  }),
2613
2612
  };
@@ -2634,8 +2633,7 @@ const serializeAws_restJson1BillingGroupArnList = (input, context) => {
2634
2633
  };
2635
2634
  const serializeAws_restJson1ComputationPreference = (input, context) => {
2636
2635
  return {
2637
- ...(input.PricingPlanArn !== undefined &&
2638
- input.PricingPlanArn !== null && { PricingPlanArn: input.PricingPlanArn }),
2636
+ ...(input.PricingPlanArn != null && { PricingPlanArn: input.PricingPlanArn }),
2639
2637
  };
2640
2638
  };
2641
2639
  const serializeAws_restJson1CustomLineItemArns = (input, context) => {
@@ -2680,27 +2678,24 @@ const serializeAws_restJson1CustomLineItemBatchDisassociationsList = (input, con
2680
2678
  };
2681
2679
  const serializeAws_restJson1CustomLineItemBillingPeriodRange = (input, context) => {
2682
2680
  return {
2683
- ...(input.ExclusiveEndBillingPeriod !== undefined &&
2684
- input.ExclusiveEndBillingPeriod !== null && { ExclusiveEndBillingPeriod: input.ExclusiveEndBillingPeriod }),
2685
- ...(input.InclusiveStartBillingPeriod !== undefined &&
2686
- input.InclusiveStartBillingPeriod !== null && { InclusiveStartBillingPeriod: input.InclusiveStartBillingPeriod }),
2681
+ ...(input.ExclusiveEndBillingPeriod != null && { ExclusiveEndBillingPeriod: input.ExclusiveEndBillingPeriod }),
2682
+ ...(input.InclusiveStartBillingPeriod != null && {
2683
+ InclusiveStartBillingPeriod: input.InclusiveStartBillingPeriod,
2684
+ }),
2687
2685
  };
2688
2686
  };
2689
2687
  const serializeAws_restJson1CustomLineItemChargeDetails = (input, context) => {
2690
2688
  return {
2691
- ...(input.Flat !== undefined &&
2692
- input.Flat !== null && { Flat: serializeAws_restJson1CustomLineItemFlatChargeDetails(input.Flat, context) }),
2693
- ...(input.Percentage !== undefined &&
2694
- input.Percentage !== null && {
2689
+ ...(input.Flat != null && { Flat: serializeAws_restJson1CustomLineItemFlatChargeDetails(input.Flat, context) }),
2690
+ ...(input.Percentage != null && {
2695
2691
  Percentage: serializeAws_restJson1CustomLineItemPercentageChargeDetails(input.Percentage, context),
2696
2692
  }),
2697
- ...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
2693
+ ...(input.Type != null && { Type: input.Type }),
2698
2694
  };
2699
2695
  };
2700
2696
  const serializeAws_restJson1CustomLineItemFlatChargeDetails = (input, context) => {
2701
2697
  return {
2702
- ...(input.ChargeValue !== undefined &&
2703
- input.ChargeValue !== null && { ChargeValue: (0, smithy_client_1.serializeFloat)(input.ChargeValue) }),
2698
+ ...(input.ChargeValue != null && { ChargeValue: (0, smithy_client_1.serializeFloat)(input.ChargeValue) }),
2704
2699
  };
2705
2700
  };
2706
2701
  const serializeAws_restJson1CustomLineItemNameList = (input, context) => {
@@ -2715,62 +2710,53 @@ const serializeAws_restJson1CustomLineItemNameList = (input, context) => {
2715
2710
  };
2716
2711
  const serializeAws_restJson1CustomLineItemPercentageChargeDetails = (input, context) => {
2717
2712
  return {
2718
- ...(input.AssociatedValues !== undefined &&
2719
- input.AssociatedValues !== null && {
2713
+ ...(input.AssociatedValues != null && {
2720
2714
  AssociatedValues: serializeAws_restJson1CustomLineItemAssociationsList(input.AssociatedValues, context),
2721
2715
  }),
2722
- ...(input.PercentageValue !== undefined &&
2723
- input.PercentageValue !== null && { PercentageValue: (0, smithy_client_1.serializeFloat)(input.PercentageValue) }),
2716
+ ...(input.PercentageValue != null && { PercentageValue: (0, smithy_client_1.serializeFloat)(input.PercentageValue) }),
2724
2717
  };
2725
2718
  };
2726
2719
  const serializeAws_restJson1ListAccountAssociationsFilter = (input, context) => {
2727
2720
  return {
2728
- ...(input.AccountId !== undefined && input.AccountId !== null && { AccountId: input.AccountId }),
2729
- ...(input.Association !== undefined && input.Association !== null && { Association: input.Association }),
2721
+ ...(input.AccountId != null && { AccountId: input.AccountId }),
2722
+ ...(input.Association != null && { Association: input.Association }),
2730
2723
  };
2731
2724
  };
2732
2725
  const serializeAws_restJson1ListBillingGroupCostReportsFilter = (input, context) => {
2733
2726
  return {
2734
- ...(input.BillingGroupArns !== undefined &&
2735
- input.BillingGroupArns !== null && {
2727
+ ...(input.BillingGroupArns != null && {
2736
2728
  BillingGroupArns: serializeAws_restJson1BillingGroupArnList(input.BillingGroupArns, context),
2737
2729
  }),
2738
2730
  };
2739
2731
  };
2740
2732
  const serializeAws_restJson1ListBillingGroupsFilter = (input, context) => {
2741
2733
  return {
2742
- ...(input.Arns !== undefined &&
2743
- input.Arns !== null && { Arns: serializeAws_restJson1BillingGroupArnList(input.Arns, context) }),
2744
- ...(input.PricingPlan !== undefined && input.PricingPlan !== null && { PricingPlan: input.PricingPlan }),
2734
+ ...(input.Arns != null && { Arns: serializeAws_restJson1BillingGroupArnList(input.Arns, context) }),
2735
+ ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }),
2745
2736
  };
2746
2737
  };
2747
2738
  const serializeAws_restJson1ListCustomLineItemsFilter = (input, context) => {
2748
2739
  return {
2749
- ...(input.Arns !== undefined &&
2750
- input.Arns !== null && { Arns: serializeAws_restJson1CustomLineItemArns(input.Arns, context) }),
2751
- ...(input.BillingGroups !== undefined &&
2752
- input.BillingGroups !== null && {
2740
+ ...(input.Arns != null && { Arns: serializeAws_restJson1CustomLineItemArns(input.Arns, context) }),
2741
+ ...(input.BillingGroups != null && {
2753
2742
  BillingGroups: serializeAws_restJson1BillingGroupArnList(input.BillingGroups, context),
2754
2743
  }),
2755
- ...(input.Names !== undefined &&
2756
- input.Names !== null && { Names: serializeAws_restJson1CustomLineItemNameList(input.Names, context) }),
2744
+ ...(input.Names != null && { Names: serializeAws_restJson1CustomLineItemNameList(input.Names, context) }),
2757
2745
  };
2758
2746
  };
2759
2747
  const serializeAws_restJson1ListPricingPlansFilter = (input, context) => {
2760
2748
  return {
2761
- ...(input.Arns !== undefined &&
2762
- input.Arns !== null && { Arns: serializeAws_restJson1PricingPlanArns(input.Arns, context) }),
2749
+ ...(input.Arns != null && { Arns: serializeAws_restJson1PricingPlanArns(input.Arns, context) }),
2763
2750
  };
2764
2751
  };
2765
2752
  const serializeAws_restJson1ListPricingRulesFilter = (input, context) => {
2766
2753
  return {
2767
- ...(input.Arns !== undefined &&
2768
- input.Arns !== null && { Arns: serializeAws_restJson1PricingRuleArns(input.Arns, context) }),
2754
+ ...(input.Arns != null && { Arns: serializeAws_restJson1PricingRuleArns(input.Arns, context) }),
2769
2755
  };
2770
2756
  };
2771
2757
  const serializeAws_restJson1ListResourcesAssociatedToCustomLineItemFilter = (input, context) => {
2772
2758
  return {
2773
- ...(input.Relationship !== undefined && input.Relationship !== null && { Relationship: input.Relationship }),
2759
+ ...(input.Relationship != null && { Relationship: input.Relationship }),
2774
2760
  };
2775
2761
  };
2776
2762
  const serializeAws_restJson1PricingPlanArns = (input, context) => {
@@ -2826,26 +2812,22 @@ const serializeAws_restJson1TagMap = (input, context) => {
2826
2812
  };
2827
2813
  const serializeAws_restJson1UpdateCustomLineItemChargeDetails = (input, context) => {
2828
2814
  return {
2829
- ...(input.Flat !== undefined &&
2830
- input.Flat !== null && {
2815
+ ...(input.Flat != null && {
2831
2816
  Flat: serializeAws_restJson1UpdateCustomLineItemFlatChargeDetails(input.Flat, context),
2832
2817
  }),
2833
- ...(input.Percentage !== undefined &&
2834
- input.Percentage !== null && {
2818
+ ...(input.Percentage != null && {
2835
2819
  Percentage: serializeAws_restJson1UpdateCustomLineItemPercentageChargeDetails(input.Percentage, context),
2836
2820
  }),
2837
2821
  };
2838
2822
  };
2839
2823
  const serializeAws_restJson1UpdateCustomLineItemFlatChargeDetails = (input, context) => {
2840
2824
  return {
2841
- ...(input.ChargeValue !== undefined &&
2842
- input.ChargeValue !== null && { ChargeValue: (0, smithy_client_1.serializeFloat)(input.ChargeValue) }),
2825
+ ...(input.ChargeValue != null && { ChargeValue: (0, smithy_client_1.serializeFloat)(input.ChargeValue) }),
2843
2826
  };
2844
2827
  };
2845
2828
  const serializeAws_restJson1UpdateCustomLineItemPercentageChargeDetails = (input, context) => {
2846
2829
  return {
2847
- ...(input.PercentageValue !== undefined &&
2848
- input.PercentageValue !== null && { PercentageValue: (0, smithy_client_1.serializeFloat)(input.PercentageValue) }),
2830
+ ...(input.PercentageValue != null && { PercentageValue: (0, smithy_client_1.serializeFloat)(input.PercentageValue) }),
2849
2831
  };
2850
2832
  };
2851
2833
  const deserializeAws_restJson1AccountAssociationsList = (output, context) => {
@@ -2876,9 +2858,7 @@ const deserializeAws_restJson1AssociateResourceError = (output, context) => {
2876
2858
  const deserializeAws_restJson1AssociateResourceResponseElement = (output, context) => {
2877
2859
  return {
2878
2860
  Arn: (0, smithy_client_1.expectString)(output.Arn),
2879
- Error: output.Error !== undefined && output.Error !== null
2880
- ? deserializeAws_restJson1AssociateResourceError(output.Error, context)
2881
- : undefined,
2861
+ Error: output.Error != null ? deserializeAws_restJson1AssociateResourceError(output.Error, context) : undefined,
2882
2862
  };
2883
2863
  };
2884
2864
  const deserializeAws_restJson1AssociateResourcesResponseList = (output, context) => {
@@ -2927,7 +2907,7 @@ const deserializeAws_restJson1BillingGroupList = (output, context) => {
2927
2907
  const deserializeAws_restJson1BillingGroupListElement = (output, context) => {
2928
2908
  return {
2929
2909
  Arn: (0, smithy_client_1.expectString)(output.Arn),
2930
- ComputationPreference: output.ComputationPreference !== undefined && output.ComputationPreference !== null
2910
+ ComputationPreference: output.ComputationPreference != null
2931
2911
  ? deserializeAws_restJson1ComputationPreference(output.ComputationPreference, context)
2932
2912
  : undefined,
2933
2913
  CreationTime: (0, smithy_client_1.expectLong)(output.CreationTime),
@@ -2961,7 +2941,7 @@ const deserializeAws_restJson1CustomLineItemListElement = (output, context) => {
2961
2941
  Arn: (0, smithy_client_1.expectString)(output.Arn),
2962
2942
  AssociationSize: (0, smithy_client_1.expectLong)(output.AssociationSize),
2963
2943
  BillingGroupArn: (0, smithy_client_1.expectString)(output.BillingGroupArn),
2964
- ChargeDetails: output.ChargeDetails !== undefined && output.ChargeDetails !== null
2944
+ ChargeDetails: output.ChargeDetails != null
2965
2945
  ? deserializeAws_restJson1ListCustomLineItemChargeDetails(output.ChargeDetails, context)
2966
2946
  : undefined,
2967
2947
  CreationTime: (0, smithy_client_1.expectLong)(output.CreationTime),
@@ -2975,9 +2955,7 @@ const deserializeAws_restJson1CustomLineItemListElement = (output, context) => {
2975
2955
  const deserializeAws_restJson1DisassociateResourceResponseElement = (output, context) => {
2976
2956
  return {
2977
2957
  Arn: (0, smithy_client_1.expectString)(output.Arn),
2978
- Error: output.Error !== undefined && output.Error !== null
2979
- ? deserializeAws_restJson1AssociateResourceError(output.Error, context)
2980
- : undefined,
2958
+ Error: output.Error != null ? deserializeAws_restJson1AssociateResourceError(output.Error, context) : undefined,
2981
2959
  };
2982
2960
  };
2983
2961
  const deserializeAws_restJson1DisassociateResourcesResponseList = (output, context) => {
@@ -2993,10 +2971,10 @@ const deserializeAws_restJson1DisassociateResourcesResponseList = (output, conte
2993
2971
  };
2994
2972
  const deserializeAws_restJson1ListCustomLineItemChargeDetails = (output, context) => {
2995
2973
  return {
2996
- Flat: output.Flat !== undefined && output.Flat !== null
2974
+ Flat: output.Flat != null
2997
2975
  ? deserializeAws_restJson1ListCustomLineItemFlatChargeDetails(output.Flat, context)
2998
2976
  : undefined,
2999
- Percentage: output.Percentage !== undefined && output.Percentage !== null
2977
+ Percentage: output.Percentage != null
3000
2978
  ? deserializeAws_restJson1ListCustomLineItemPercentageChargeDetails(output.Percentage, context)
3001
2979
  : undefined,
3002
2980
  Type: (0, smithy_client_1.expectString)(output.Type),
@@ -3174,5 +3152,4 @@ const loadRestJsonErrorCode = (output, data) => {
3174
3152
  if (data["__type"] !== undefined) {
3175
3153
  return sanitizeErrorCode(data["__type"]);
3176
3154
  }
3177
- return "";
3178
3155
  };