@aws-sdk/client-billingconductor 3.476.0 → 3.477.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,102 +1,72 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, serializeFloat as __serializeFloat, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { BillingconductorServiceException as __BaseException } from "../models/BillingconductorServiceException";
4
4
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceLimitExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
5
5
  export const se_AssociateAccountsCommand = async (input, context) => {
6
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
6
+ const b = rb(input, context);
7
7
  const headers = {
8
8
  "content-type": "application/json",
9
9
  };
10
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/associate-accounts";
10
+ b.bp("/associate-accounts");
11
11
  let body;
12
12
  body = JSON.stringify(take(input, {
13
13
  AccountIds: (_) => _json(_),
14
14
  Arn: [],
15
15
  }));
16
- return new __HttpRequest({
17
- protocol,
18
- hostname,
19
- port,
20
- method: "POST",
21
- headers,
22
- path: resolvedPath,
23
- body,
24
- });
16
+ b.m("POST").h(headers).b(body);
17
+ return b.build();
25
18
  };
26
19
  export const se_AssociatePricingRulesCommand = async (input, context) => {
27
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
20
+ const b = rb(input, context);
28
21
  const headers = {
29
22
  "content-type": "application/json",
30
23
  };
31
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/associate-pricing-rules";
24
+ b.bp("/associate-pricing-rules");
32
25
  let body;
33
26
  body = JSON.stringify(take(input, {
34
27
  Arn: [],
35
28
  PricingRuleArns: (_) => _json(_),
36
29
  }));
37
- return new __HttpRequest({
38
- protocol,
39
- hostname,
40
- port,
41
- method: "PUT",
42
- headers,
43
- path: resolvedPath,
44
- body,
45
- });
30
+ b.m("PUT").h(headers).b(body);
31
+ return b.build();
46
32
  };
47
33
  export const se_BatchAssociateResourcesToCustomLineItemCommand = async (input, context) => {
48
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
34
+ const b = rb(input, context);
49
35
  const headers = {
50
36
  "content-type": "application/json",
51
37
  };
52
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
53
- "/batch-associate-resources-to-custom-line-item";
38
+ b.bp("/batch-associate-resources-to-custom-line-item");
54
39
  let body;
55
40
  body = JSON.stringify(take(input, {
56
41
  BillingPeriodRange: (_) => _json(_),
57
42
  ResourceArns: (_) => _json(_),
58
43
  TargetArn: [],
59
44
  }));
60
- return new __HttpRequest({
61
- protocol,
62
- hostname,
63
- port,
64
- method: "PUT",
65
- headers,
66
- path: resolvedPath,
67
- body,
68
- });
45
+ b.m("PUT").h(headers).b(body);
46
+ return b.build();
69
47
  };
70
48
  export const se_BatchDisassociateResourcesFromCustomLineItemCommand = async (input, context) => {
71
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
49
+ const b = rb(input, context);
72
50
  const headers = {
73
51
  "content-type": "application/json",
74
52
  };
75
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
76
- "/batch-disassociate-resources-from-custom-line-item";
53
+ b.bp("/batch-disassociate-resources-from-custom-line-item");
77
54
  let body;
78
55
  body = JSON.stringify(take(input, {
79
56
  BillingPeriodRange: (_) => _json(_),
80
57
  ResourceArns: (_) => _json(_),
81
58
  TargetArn: [],
82
59
  }));
83
- return new __HttpRequest({
84
- protocol,
85
- hostname,
86
- port,
87
- method: "PUT",
88
- headers,
89
- path: resolvedPath,
90
- body,
91
- });
60
+ b.m("PUT").h(headers).b(body);
61
+ return b.build();
92
62
  };
93
63
  export const se_CreateBillingGroupCommand = async (input, context) => {
94
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
64
+ const b = rb(input, context);
95
65
  const headers = map({}, isSerializableHeaderValue, {
96
66
  "content-type": "application/json",
97
- "x-amzn-client-token": input.ClientToken,
67
+ [_xact]: input[_CT],
98
68
  });
99
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/create-billing-group";
69
+ b.bp("/create-billing-group");
100
70
  let body;
101
71
  body = JSON.stringify(take(input, {
102
72
  AccountGrouping: (_) => _json(_),
@@ -106,23 +76,16 @@ export const se_CreateBillingGroupCommand = async (input, context) => {
106
76
  PrimaryAccountId: [],
107
77
  Tags: (_) => _json(_),
108
78
  }));
109
- return new __HttpRequest({
110
- protocol,
111
- hostname,
112
- port,
113
- method: "POST",
114
- headers,
115
- path: resolvedPath,
116
- body,
117
- });
79
+ b.m("POST").h(headers).b(body);
80
+ return b.build();
118
81
  };
119
82
  export const se_CreateCustomLineItemCommand = async (input, context) => {
120
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
83
+ const b = rb(input, context);
121
84
  const headers = map({}, isSerializableHeaderValue, {
122
85
  "content-type": "application/json",
123
- "x-amzn-client-token": input.ClientToken,
86
+ [_xact]: input[_CT],
124
87
  });
125
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/create-custom-line-item";
88
+ b.bp("/create-custom-line-item");
126
89
  let body;
127
90
  body = JSON.stringify(take(input, {
128
91
  AccountId: [],
@@ -133,23 +96,16 @@ export const se_CreateCustomLineItemCommand = async (input, context) => {
133
96
  Name: [],
134
97
  Tags: (_) => _json(_),
135
98
  }));
136
- return new __HttpRequest({
137
- protocol,
138
- hostname,
139
- port,
140
- method: "POST",
141
- headers,
142
- path: resolvedPath,
143
- body,
144
- });
99
+ b.m("POST").h(headers).b(body);
100
+ return b.build();
145
101
  };
146
102
  export const se_CreatePricingPlanCommand = async (input, context) => {
147
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
103
+ const b = rb(input, context);
148
104
  const headers = map({}, isSerializableHeaderValue, {
149
105
  "content-type": "application/json",
150
- "x-amzn-client-token": input.ClientToken,
106
+ [_xact]: input[_CT],
151
107
  });
152
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/create-pricing-plan";
108
+ b.bp("/create-pricing-plan");
153
109
  let body;
154
110
  body = JSON.stringify(take(input, {
155
111
  Description: [],
@@ -157,23 +113,16 @@ export const se_CreatePricingPlanCommand = async (input, context) => {
157
113
  PricingRuleArns: (_) => _json(_),
158
114
  Tags: (_) => _json(_),
159
115
  }));
160
- return new __HttpRequest({
161
- protocol,
162
- hostname,
163
- port,
164
- method: "POST",
165
- headers,
166
- path: resolvedPath,
167
- body,
168
- });
116
+ b.m("POST").h(headers).b(body);
117
+ return b.build();
169
118
  };
170
119
  export const se_CreatePricingRuleCommand = async (input, context) => {
171
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
120
+ const b = rb(input, context);
172
121
  const headers = map({}, isSerializableHeaderValue, {
173
122
  "content-type": "application/json",
174
- "x-amzn-client-token": input.ClientToken,
123
+ [_xact]: input[_CT],
175
124
  });
176
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/create-pricing-rule";
125
+ b.bp("/create-pricing-rule");
177
126
  let body;
178
127
  body = JSON.stringify(take(input, {
179
128
  BillingEntity: [],
@@ -188,145 +137,96 @@ export const se_CreatePricingRuleCommand = async (input, context) => {
188
137
  Type: [],
189
138
  UsageType: [],
190
139
  }));
191
- return new __HttpRequest({
192
- protocol,
193
- hostname,
194
- port,
195
- method: "POST",
196
- headers,
197
- path: resolvedPath,
198
- body,
199
- });
140
+ b.m("POST").h(headers).b(body);
141
+ return b.build();
200
142
  };
201
143
  export const se_DeleteBillingGroupCommand = async (input, context) => {
202
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
144
+ const b = rb(input, context);
203
145
  const headers = {
204
146
  "content-type": "application/json",
205
147
  };
206
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-billing-group";
148
+ b.bp("/delete-billing-group");
207
149
  let body;
208
150
  body = JSON.stringify(take(input, {
209
151
  Arn: [],
210
152
  }));
211
- return new __HttpRequest({
212
- protocol,
213
- hostname,
214
- port,
215
- method: "POST",
216
- headers,
217
- path: resolvedPath,
218
- body,
219
- });
153
+ b.m("POST").h(headers).b(body);
154
+ return b.build();
220
155
  };
221
156
  export const se_DeleteCustomLineItemCommand = async (input, context) => {
222
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
157
+ const b = rb(input, context);
223
158
  const headers = {
224
159
  "content-type": "application/json",
225
160
  };
226
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-custom-line-item";
161
+ b.bp("/delete-custom-line-item");
227
162
  let body;
228
163
  body = JSON.stringify(take(input, {
229
164
  Arn: [],
230
165
  BillingPeriodRange: (_) => _json(_),
231
166
  }));
232
- return new __HttpRequest({
233
- protocol,
234
- hostname,
235
- port,
236
- method: "POST",
237
- headers,
238
- path: resolvedPath,
239
- body,
240
- });
167
+ b.m("POST").h(headers).b(body);
168
+ return b.build();
241
169
  };
242
170
  export const se_DeletePricingPlanCommand = async (input, context) => {
243
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
171
+ const b = rb(input, context);
244
172
  const headers = {
245
173
  "content-type": "application/json",
246
174
  };
247
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-pricing-plan";
175
+ b.bp("/delete-pricing-plan");
248
176
  let body;
249
177
  body = JSON.stringify(take(input, {
250
178
  Arn: [],
251
179
  }));
252
- return new __HttpRequest({
253
- protocol,
254
- hostname,
255
- port,
256
- method: "POST",
257
- headers,
258
- path: resolvedPath,
259
- body,
260
- });
180
+ b.m("POST").h(headers).b(body);
181
+ return b.build();
261
182
  };
262
183
  export const se_DeletePricingRuleCommand = async (input, context) => {
263
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
184
+ const b = rb(input, context);
264
185
  const headers = {
265
186
  "content-type": "application/json",
266
187
  };
267
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-pricing-rule";
188
+ b.bp("/delete-pricing-rule");
268
189
  let body;
269
190
  body = JSON.stringify(take(input, {
270
191
  Arn: [],
271
192
  }));
272
- return new __HttpRequest({
273
- protocol,
274
- hostname,
275
- port,
276
- method: "POST",
277
- headers,
278
- path: resolvedPath,
279
- body,
280
- });
193
+ b.m("POST").h(headers).b(body);
194
+ return b.build();
281
195
  };
282
196
  export const se_DisassociateAccountsCommand = async (input, context) => {
283
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
197
+ const b = rb(input, context);
284
198
  const headers = {
285
199
  "content-type": "application/json",
286
200
  };
287
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/disassociate-accounts";
201
+ b.bp("/disassociate-accounts");
288
202
  let body;
289
203
  body = JSON.stringify(take(input, {
290
204
  AccountIds: (_) => _json(_),
291
205
  Arn: [],
292
206
  }));
293
- return new __HttpRequest({
294
- protocol,
295
- hostname,
296
- port,
297
- method: "POST",
298
- headers,
299
- path: resolvedPath,
300
- body,
301
- });
207
+ b.m("POST").h(headers).b(body);
208
+ return b.build();
302
209
  };
303
210
  export const se_DisassociatePricingRulesCommand = async (input, context) => {
304
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
211
+ const b = rb(input, context);
305
212
  const headers = {
306
213
  "content-type": "application/json",
307
214
  };
308
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/disassociate-pricing-rules";
215
+ b.bp("/disassociate-pricing-rules");
309
216
  let body;
310
217
  body = JSON.stringify(take(input, {
311
218
  Arn: [],
312
219
  PricingRuleArns: (_) => _json(_),
313
220
  }));
314
- return new __HttpRequest({
315
- protocol,
316
- hostname,
317
- port,
318
- method: "PUT",
319
- headers,
320
- path: resolvedPath,
321
- body,
322
- });
221
+ b.m("PUT").h(headers).b(body);
222
+ return b.build();
323
223
  };
324
224
  export const se_GetBillingGroupCostReportCommand = async (input, context) => {
325
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
225
+ const b = rb(input, context);
326
226
  const headers = {
327
227
  "content-type": "application/json",
328
228
  };
329
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-billing-group-cost-report";
229
+ b.bp("/get-billing-group-cost-report");
330
230
  let body;
331
231
  body = JSON.stringify(take(input, {
332
232
  Arn: [],
@@ -335,44 +235,30 @@ export const se_GetBillingGroupCostReportCommand = async (input, context) => {
335
235
  MaxResults: [],
336
236
  NextToken: [],
337
237
  }));
338
- return new __HttpRequest({
339
- protocol,
340
- hostname,
341
- port,
342
- method: "POST",
343
- headers,
344
- path: resolvedPath,
345
- body,
346
- });
238
+ b.m("POST").h(headers).b(body);
239
+ return b.build();
347
240
  };
348
241
  export const se_ListAccountAssociationsCommand = async (input, context) => {
349
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
242
+ const b = rb(input, context);
350
243
  const headers = {
351
244
  "content-type": "application/json",
352
245
  };
353
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-account-associations";
246
+ b.bp("/list-account-associations");
354
247
  let body;
355
248
  body = JSON.stringify(take(input, {
356
249
  BillingPeriod: [],
357
250
  Filters: (_) => _json(_),
358
251
  NextToken: [],
359
252
  }));
360
- return new __HttpRequest({
361
- protocol,
362
- hostname,
363
- port,
364
- method: "POST",
365
- headers,
366
- path: resolvedPath,
367
- body,
368
- });
253
+ b.m("POST").h(headers).b(body);
254
+ return b.build();
369
255
  };
370
256
  export const se_ListBillingGroupCostReportsCommand = async (input, context) => {
371
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
257
+ const b = rb(input, context);
372
258
  const headers = {
373
259
  "content-type": "application/json",
374
260
  };
375
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-billing-group-cost-reports";
261
+ b.bp("/list-billing-group-cost-reports");
376
262
  let body;
377
263
  body = JSON.stringify(take(input, {
378
264
  BillingPeriod: [],
@@ -380,22 +266,15 @@ export const se_ListBillingGroupCostReportsCommand = async (input, context) => {
380
266
  MaxResults: [],
381
267
  NextToken: [],
382
268
  }));
383
- return new __HttpRequest({
384
- protocol,
385
- hostname,
386
- port,
387
- method: "POST",
388
- headers,
389
- path: resolvedPath,
390
- body,
391
- });
269
+ b.m("POST").h(headers).b(body);
270
+ return b.build();
392
271
  };
393
272
  export const se_ListBillingGroupsCommand = async (input, context) => {
394
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
273
+ const b = rb(input, context);
395
274
  const headers = {
396
275
  "content-type": "application/json",
397
276
  };
398
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-billing-groups";
277
+ b.bp("/list-billing-groups");
399
278
  let body;
400
279
  body = JSON.stringify(take(input, {
401
280
  BillingPeriod: [],
@@ -403,22 +282,15 @@ export const se_ListBillingGroupsCommand = async (input, context) => {
403
282
  MaxResults: [],
404
283
  NextToken: [],
405
284
  }));
406
- return new __HttpRequest({
407
- protocol,
408
- hostname,
409
- port,
410
- method: "POST",
411
- headers,
412
- path: resolvedPath,
413
- body,
414
- });
285
+ b.m("POST").h(headers).b(body);
286
+ return b.build();
415
287
  };
416
288
  export const se_ListCustomLineItemsCommand = async (input, context) => {
417
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
289
+ const b = rb(input, context);
418
290
  const headers = {
419
291
  "content-type": "application/json",
420
292
  };
421
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-custom-line-items";
293
+ b.bp("/list-custom-line-items");
422
294
  let body;
423
295
  body = JSON.stringify(take(input, {
424
296
  BillingPeriod: [],
@@ -426,22 +298,15 @@ export const se_ListCustomLineItemsCommand = async (input, context) => {
426
298
  MaxResults: [],
427
299
  NextToken: [],
428
300
  }));
429
- return new __HttpRequest({
430
- protocol,
431
- hostname,
432
- port,
433
- method: "POST",
434
- headers,
435
- path: resolvedPath,
436
- body,
437
- });
301
+ b.m("POST").h(headers).b(body);
302
+ return b.build();
438
303
  };
439
304
  export const se_ListCustomLineItemVersionsCommand = async (input, context) => {
440
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
305
+ const b = rb(input, context);
441
306
  const headers = {
442
307
  "content-type": "application/json",
443
308
  };
444
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-custom-line-item-versions";
309
+ b.bp("/list-custom-line-item-versions");
445
310
  let body;
446
311
  body = JSON.stringify(take(input, {
447
312
  Arn: [],
@@ -449,22 +314,15 @@ export const se_ListCustomLineItemVersionsCommand = async (input, context) => {
449
314
  MaxResults: [],
450
315
  NextToken: [],
451
316
  }));
452
- return new __HttpRequest({
453
- protocol,
454
- hostname,
455
- port,
456
- method: "POST",
457
- headers,
458
- path: resolvedPath,
459
- body,
460
- });
317
+ b.m("POST").h(headers).b(body);
318
+ return b.build();
461
319
  };
462
320
  export const se_ListPricingPlansCommand = async (input, context) => {
463
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
321
+ const b = rb(input, context);
464
322
  const headers = {
465
323
  "content-type": "application/json",
466
324
  };
467
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-pricing-plans";
325
+ b.bp("/list-pricing-plans");
468
326
  let body;
469
327
  body = JSON.stringify(take(input, {
470
328
  BillingPeriod: [],
@@ -472,23 +330,15 @@ export const se_ListPricingPlansCommand = async (input, context) => {
472
330
  MaxResults: [],
473
331
  NextToken: [],
474
332
  }));
475
- return new __HttpRequest({
476
- protocol,
477
- hostname,
478
- port,
479
- method: "POST",
480
- headers,
481
- path: resolvedPath,
482
- body,
483
- });
333
+ b.m("POST").h(headers).b(body);
334
+ return b.build();
484
335
  };
485
336
  export const se_ListPricingPlansAssociatedWithPricingRuleCommand = async (input, context) => {
486
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
337
+ const b = rb(input, context);
487
338
  const headers = {
488
339
  "content-type": "application/json",
489
340
  };
490
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
491
- "/list-pricing-plans-associated-with-pricing-rule";
341
+ b.bp("/list-pricing-plans-associated-with-pricing-rule");
492
342
  let body;
493
343
  body = JSON.stringify(take(input, {
494
344
  BillingPeriod: [],
@@ -496,22 +346,15 @@ export const se_ListPricingPlansAssociatedWithPricingRuleCommand = async (input,
496
346
  NextToken: [],
497
347
  PricingRuleArn: [],
498
348
  }));
499
- return new __HttpRequest({
500
- protocol,
501
- hostname,
502
- port,
503
- method: "POST",
504
- headers,
505
- path: resolvedPath,
506
- body,
507
- });
349
+ b.m("POST").h(headers).b(body);
350
+ return b.build();
508
351
  };
509
352
  export const se_ListPricingRulesCommand = async (input, context) => {
510
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
353
+ const b = rb(input, context);
511
354
  const headers = {
512
355
  "content-type": "application/json",
513
356
  };
514
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-pricing-rules";
357
+ b.bp("/list-pricing-rules");
515
358
  let body;
516
359
  body = JSON.stringify(take(input, {
517
360
  BillingPeriod: [],
@@ -519,23 +362,15 @@ export const se_ListPricingRulesCommand = async (input, context) => {
519
362
  MaxResults: [],
520
363
  NextToken: [],
521
364
  }));
522
- return new __HttpRequest({
523
- protocol,
524
- hostname,
525
- port,
526
- method: "POST",
527
- headers,
528
- path: resolvedPath,
529
- body,
530
- });
365
+ b.m("POST").h(headers).b(body);
366
+ return b.build();
531
367
  };
532
368
  export const se_ListPricingRulesAssociatedToPricingPlanCommand = async (input, context) => {
533
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
369
+ const b = rb(input, context);
534
370
  const headers = {
535
371
  "content-type": "application/json",
536
372
  };
537
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
538
- "/list-pricing-rules-associated-to-pricing-plan";
373
+ b.bp("/list-pricing-rules-associated-to-pricing-plan");
539
374
  let body;
540
375
  body = JSON.stringify(take(input, {
541
376
  BillingPeriod: [],
@@ -543,23 +378,15 @@ export const se_ListPricingRulesAssociatedToPricingPlanCommand = async (input, c
543
378
  NextToken: [],
544
379
  PricingPlanArn: [],
545
380
  }));
546
- return new __HttpRequest({
547
- protocol,
548
- hostname,
549
- port,
550
- method: "POST",
551
- headers,
552
- path: resolvedPath,
553
- body,
554
- });
381
+ b.m("POST").h(headers).b(body);
382
+ return b.build();
555
383
  };
556
384
  export const se_ListResourcesAssociatedToCustomLineItemCommand = async (input, context) => {
557
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
385
+ const b = rb(input, context);
558
386
  const headers = {
559
387
  "content-type": "application/json",
560
388
  };
561
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
562
- "/list-resources-associated-to-custom-line-item";
389
+ b.bp("/list-resources-associated-to-custom-line-item");
563
390
  let body;
564
391
  body = JSON.stringify(take(input, {
565
392
  Arn: [],
@@ -568,82 +395,53 @@ export const se_ListResourcesAssociatedToCustomLineItemCommand = async (input, c
568
395
  MaxResults: [],
569
396
  NextToken: [],
570
397
  }));
571
- return new __HttpRequest({
572
- protocol,
573
- hostname,
574
- port,
575
- method: "POST",
576
- headers,
577
- path: resolvedPath,
578
- body,
579
- });
398
+ b.m("POST").h(headers).b(body);
399
+ return b.build();
580
400
  };
581
401
  export const se_ListTagsForResourceCommand = async (input, context) => {
582
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
402
+ const b = rb(input, context);
583
403
  const headers = {};
584
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
585
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
404
+ b.bp("/tags/{ResourceArn}");
405
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
586
406
  let body;
587
- return new __HttpRequest({
588
- protocol,
589
- hostname,
590
- port,
591
- method: "GET",
592
- headers,
593
- path: resolvedPath,
594
- body,
595
- });
407
+ b.m("GET").h(headers).b(body);
408
+ return b.build();
596
409
  };
597
410
  export const se_TagResourceCommand = async (input, context) => {
598
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
411
+ const b = rb(input, context);
599
412
  const headers = {
600
413
  "content-type": "application/json",
601
414
  };
602
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
603
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
415
+ b.bp("/tags/{ResourceArn}");
416
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
604
417
  let body;
605
418
  body = JSON.stringify(take(input, {
606
419
  Tags: (_) => _json(_),
607
420
  }));
608
- return new __HttpRequest({
609
- protocol,
610
- hostname,
611
- port,
612
- method: "POST",
613
- headers,
614
- path: resolvedPath,
615
- body,
616
- });
421
+ b.m("POST").h(headers).b(body);
422
+ return b.build();
617
423
  };
618
424
  export const se_UntagResourceCommand = async (input, context) => {
619
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
425
+ const b = rb(input, context);
620
426
  const headers = {};
621
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
622
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
427
+ b.bp("/tags/{ResourceArn}");
428
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
623
429
  const query = map({
624
- tagKeys: [
430
+ [_tK]: [
625
431
  __expectNonNull(input.TagKeys, `TagKeys`) != null,
626
- () => (input.TagKeys || []).map((_entry) => _entry),
432
+ () => (input[_TK] || []).map((_entry) => _entry),
627
433
  ],
628
434
  });
629
435
  let body;
630
- return new __HttpRequest({
631
- protocol,
632
- hostname,
633
- port,
634
- method: "DELETE",
635
- headers,
636
- path: resolvedPath,
637
- query,
638
- body,
639
- });
436
+ b.m("DELETE").h(headers).q(query).b(body);
437
+ return b.build();
640
438
  };
641
439
  export const se_UpdateBillingGroupCommand = async (input, context) => {
642
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
440
+ const b = rb(input, context);
643
441
  const headers = {
644
442
  "content-type": "application/json",
645
443
  };
646
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-billing-group";
444
+ b.bp("/update-billing-group");
647
445
  let body;
648
446
  body = JSON.stringify(take(input, {
649
447
  AccountGrouping: (_) => _json(_),
@@ -653,22 +451,15 @@ export const se_UpdateBillingGroupCommand = async (input, context) => {
653
451
  Name: [],
654
452
  Status: [],
655
453
  }));
656
- return new __HttpRequest({
657
- protocol,
658
- hostname,
659
- port,
660
- method: "POST",
661
- headers,
662
- path: resolvedPath,
663
- body,
664
- });
454
+ b.m("POST").h(headers).b(body);
455
+ return b.build();
665
456
  };
666
457
  export const se_UpdateCustomLineItemCommand = async (input, context) => {
667
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
458
+ const b = rb(input, context);
668
459
  const headers = {
669
460
  "content-type": "application/json",
670
461
  };
671
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-custom-line-item";
462
+ b.bp("/update-custom-line-item");
672
463
  let body;
673
464
  body = JSON.stringify(take(input, {
674
465
  Arn: [],
@@ -677,44 +468,30 @@ export const se_UpdateCustomLineItemCommand = async (input, context) => {
677
468
  Description: [],
678
469
  Name: [],
679
470
  }));
680
- return new __HttpRequest({
681
- protocol,
682
- hostname,
683
- port,
684
- method: "POST",
685
- headers,
686
- path: resolvedPath,
687
- body,
688
- });
471
+ b.m("POST").h(headers).b(body);
472
+ return b.build();
689
473
  };
690
474
  export const se_UpdatePricingPlanCommand = async (input, context) => {
691
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
475
+ const b = rb(input, context);
692
476
  const headers = {
693
477
  "content-type": "application/json",
694
478
  };
695
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-pricing-plan";
479
+ b.bp("/update-pricing-plan");
696
480
  let body;
697
481
  body = JSON.stringify(take(input, {
698
482
  Arn: [],
699
483
  Description: [],
700
484
  Name: [],
701
485
  }));
702
- return new __HttpRequest({
703
- protocol,
704
- hostname,
705
- port,
706
- method: "PUT",
707
- headers,
708
- path: resolvedPath,
709
- body,
710
- });
486
+ b.m("PUT").h(headers).b(body);
487
+ return b.build();
711
488
  };
712
489
  export const se_UpdatePricingRuleCommand = async (input, context) => {
713
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
490
+ const b = rb(input, context);
714
491
  const headers = {
715
492
  "content-type": "application/json",
716
493
  };
717
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-pricing-rule";
494
+ b.bp("/update-pricing-rule");
718
495
  let body;
719
496
  body = JSON.stringify(take(input, {
720
497
  Arn: [],
@@ -724,15 +501,8 @@ export const se_UpdatePricingRuleCommand = async (input, context) => {
724
501
  Tiering: (_) => _json(_),
725
502
  Type: [],
726
503
  }));
727
- return new __HttpRequest({
728
- protocol,
729
- hostname,
730
- port,
731
- method: "PUT",
732
- headers,
733
- path: resolvedPath,
734
- body,
735
- });
504
+ b.m("PUT").h(headers).b(body);
505
+ return b.build();
736
506
  };
737
507
  export const de_AssociateAccountsCommand = async (output, context) => {
738
508
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2288,10 +2058,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
2288
2058
  };
2289
2059
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2290
2060
  const contents = map({
2291
- RetryAfterSeconds: [
2292
- () => void 0 !== parsedOutput.headers["retry-after"],
2293
- () => __strictParseInt32(parsedOutput.headers["retry-after"]),
2294
- ],
2061
+ [_RAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
2295
2062
  });
2296
2063
  const data = parsedOutput.body;
2297
2064
  const doc = take(data, {
@@ -2338,10 +2105,7 @@ const de_ServiceLimitExceededExceptionRes = async (parsedOutput, context) => {
2338
2105
  };
2339
2106
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2340
2107
  const contents = map({
2341
- RetryAfterSeconds: [
2342
- () => void 0 !== parsedOutput.headers["retry-after"],
2343
- () => __strictParseInt32(parsedOutput.headers["retry-after"]),
2344
- ],
2108
+ [_RAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
2345
2109
  });
2346
2110
  const data = parsedOutput.body;
2347
2111
  const doc = take(data, {
@@ -2510,6 +2274,12 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
2510
2274
  value !== "" &&
2511
2275
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2512
2276
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2277
+ const _CT = "ClientToken";
2278
+ const _RAS = "RetryAfterSeconds";
2279
+ const _TK = "TagKeys";
2280
+ const _ra = "retry-after";
2281
+ const _tK = "tagKeys";
2282
+ const _xact = "x-amzn-client-token";
2513
2283
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2514
2284
  if (encoded.length) {
2515
2285
  return JSON.parse(encoded);