@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.
@@ -2,109 +2,79 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_ListBillingGroupsCommand = exports.de_ListBillingGroupCostReportsCommand = exports.de_ListAccountAssociationsCommand = exports.de_GetBillingGroupCostReportCommand = exports.de_DisassociatePricingRulesCommand = exports.de_DisassociateAccountsCommand = exports.de_DeletePricingRuleCommand = exports.de_DeletePricingPlanCommand = exports.de_DeleteCustomLineItemCommand = exports.de_DeleteBillingGroupCommand = exports.de_CreatePricingRuleCommand = exports.de_CreatePricingPlanCommand = exports.de_CreateCustomLineItemCommand = exports.de_CreateBillingGroupCommand = exports.de_BatchDisassociateResourcesFromCustomLineItemCommand = exports.de_BatchAssociateResourcesToCustomLineItemCommand = exports.de_AssociatePricingRulesCommand = exports.de_AssociateAccountsCommand = exports.se_UpdatePricingRuleCommand = exports.se_UpdatePricingPlanCommand = exports.se_UpdateCustomLineItemCommand = exports.se_UpdateBillingGroupCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ListTagsForResourceCommand = exports.se_ListResourcesAssociatedToCustomLineItemCommand = exports.se_ListPricingRulesAssociatedToPricingPlanCommand = exports.se_ListPricingRulesCommand = exports.se_ListPricingPlansAssociatedWithPricingRuleCommand = exports.se_ListPricingPlansCommand = exports.se_ListCustomLineItemVersionsCommand = exports.se_ListCustomLineItemsCommand = exports.se_ListBillingGroupsCommand = exports.se_ListBillingGroupCostReportsCommand = exports.se_ListAccountAssociationsCommand = exports.se_GetBillingGroupCostReportCommand = exports.se_DisassociatePricingRulesCommand = exports.se_DisassociateAccountsCommand = exports.se_DeletePricingRuleCommand = exports.se_DeletePricingPlanCommand = exports.se_DeleteCustomLineItemCommand = exports.se_DeleteBillingGroupCommand = exports.se_CreatePricingRuleCommand = exports.se_CreatePricingPlanCommand = exports.se_CreateCustomLineItemCommand = exports.se_CreateBillingGroupCommand = exports.se_BatchDisassociateResourcesFromCustomLineItemCommand = exports.se_BatchAssociateResourcesToCustomLineItemCommand = exports.se_AssociatePricingRulesCommand = exports.se_AssociateAccountsCommand = void 0;
4
4
  exports.de_UpdatePricingRuleCommand = exports.de_UpdatePricingPlanCommand = exports.de_UpdateCustomLineItemCommand = exports.de_UpdateBillingGroupCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ListTagsForResourceCommand = exports.de_ListResourcesAssociatedToCustomLineItemCommand = exports.de_ListPricingRulesAssociatedToPricingPlanCommand = exports.de_ListPricingRulesCommand = exports.de_ListPricingPlansAssociatedWithPricingRuleCommand = exports.de_ListPricingPlansCommand = exports.de_ListCustomLineItemVersionsCommand = exports.de_ListCustomLineItemsCommand = void 0;
5
- const protocol_http_1 = require("@smithy/protocol-http");
5
+ const core_1 = require("@smithy/core");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  const BillingconductorServiceException_1 = require("../models/BillingconductorServiceException");
8
8
  const models_0_1 = require("../models/models_0");
9
9
  const se_AssociateAccountsCommand = async (input, context) => {
10
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
+ const b = (0, core_1.requestBuilder)(input, context);
11
11
  const headers = {
12
12
  "content-type": "application/json",
13
13
  };
14
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/associate-accounts";
14
+ b.bp("/associate-accounts");
15
15
  let body;
16
16
  body = JSON.stringify((0, smithy_client_1.take)(input, {
17
17
  AccountIds: (_) => (0, smithy_client_1._json)(_),
18
18
  Arn: [],
19
19
  }));
20
- return new protocol_http_1.HttpRequest({
21
- protocol,
22
- hostname,
23
- port,
24
- method: "POST",
25
- headers,
26
- path: resolvedPath,
27
- body,
28
- });
20
+ b.m("POST").h(headers).b(body);
21
+ return b.build();
29
22
  };
30
23
  exports.se_AssociateAccountsCommand = se_AssociateAccountsCommand;
31
24
  const se_AssociatePricingRulesCommand = async (input, context) => {
32
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
25
+ const b = (0, core_1.requestBuilder)(input, context);
33
26
  const headers = {
34
27
  "content-type": "application/json",
35
28
  };
36
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/associate-pricing-rules";
29
+ b.bp("/associate-pricing-rules");
37
30
  let body;
38
31
  body = JSON.stringify((0, smithy_client_1.take)(input, {
39
32
  Arn: [],
40
33
  PricingRuleArns: (_) => (0, smithy_client_1._json)(_),
41
34
  }));
42
- return new protocol_http_1.HttpRequest({
43
- protocol,
44
- hostname,
45
- port,
46
- method: "PUT",
47
- headers,
48
- path: resolvedPath,
49
- body,
50
- });
35
+ b.m("PUT").h(headers).b(body);
36
+ return b.build();
51
37
  };
52
38
  exports.se_AssociatePricingRulesCommand = se_AssociatePricingRulesCommand;
53
39
  const se_BatchAssociateResourcesToCustomLineItemCommand = async (input, context) => {
54
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
40
+ const b = (0, core_1.requestBuilder)(input, context);
55
41
  const headers = {
56
42
  "content-type": "application/json",
57
43
  };
58
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
59
- "/batch-associate-resources-to-custom-line-item";
44
+ b.bp("/batch-associate-resources-to-custom-line-item");
60
45
  let body;
61
46
  body = JSON.stringify((0, smithy_client_1.take)(input, {
62
47
  BillingPeriodRange: (_) => (0, smithy_client_1._json)(_),
63
48
  ResourceArns: (_) => (0, smithy_client_1._json)(_),
64
49
  TargetArn: [],
65
50
  }));
66
- return new protocol_http_1.HttpRequest({
67
- protocol,
68
- hostname,
69
- port,
70
- method: "PUT",
71
- headers,
72
- path: resolvedPath,
73
- body,
74
- });
51
+ b.m("PUT").h(headers).b(body);
52
+ return b.build();
75
53
  };
76
54
  exports.se_BatchAssociateResourcesToCustomLineItemCommand = se_BatchAssociateResourcesToCustomLineItemCommand;
77
55
  const se_BatchDisassociateResourcesFromCustomLineItemCommand = async (input, context) => {
78
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
56
+ const b = (0, core_1.requestBuilder)(input, context);
79
57
  const headers = {
80
58
  "content-type": "application/json",
81
59
  };
82
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
83
- "/batch-disassociate-resources-from-custom-line-item";
60
+ b.bp("/batch-disassociate-resources-from-custom-line-item");
84
61
  let body;
85
62
  body = JSON.stringify((0, smithy_client_1.take)(input, {
86
63
  BillingPeriodRange: (_) => (0, smithy_client_1._json)(_),
87
64
  ResourceArns: (_) => (0, smithy_client_1._json)(_),
88
65
  TargetArn: [],
89
66
  }));
90
- return new protocol_http_1.HttpRequest({
91
- protocol,
92
- hostname,
93
- port,
94
- method: "PUT",
95
- headers,
96
- path: resolvedPath,
97
- body,
98
- });
67
+ b.m("PUT").h(headers).b(body);
68
+ return b.build();
99
69
  };
100
70
  exports.se_BatchDisassociateResourcesFromCustomLineItemCommand = se_BatchDisassociateResourcesFromCustomLineItemCommand;
101
71
  const se_CreateBillingGroupCommand = async (input, context) => {
102
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
72
+ const b = (0, core_1.requestBuilder)(input, context);
103
73
  const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
104
74
  "content-type": "application/json",
105
- "x-amzn-client-token": input.ClientToken,
75
+ [_xact]: input[_CT],
106
76
  });
107
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/create-billing-group";
77
+ b.bp("/create-billing-group");
108
78
  let body;
109
79
  body = JSON.stringify((0, smithy_client_1.take)(input, {
110
80
  AccountGrouping: (_) => (0, smithy_client_1._json)(_),
@@ -114,24 +84,17 @@ const se_CreateBillingGroupCommand = async (input, context) => {
114
84
  PrimaryAccountId: [],
115
85
  Tags: (_) => (0, smithy_client_1._json)(_),
116
86
  }));
117
- return new protocol_http_1.HttpRequest({
118
- protocol,
119
- hostname,
120
- port,
121
- method: "POST",
122
- headers,
123
- path: resolvedPath,
124
- body,
125
- });
87
+ b.m("POST").h(headers).b(body);
88
+ return b.build();
126
89
  };
127
90
  exports.se_CreateBillingGroupCommand = se_CreateBillingGroupCommand;
128
91
  const se_CreateCustomLineItemCommand = async (input, context) => {
129
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
92
+ const b = (0, core_1.requestBuilder)(input, context);
130
93
  const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
131
94
  "content-type": "application/json",
132
- "x-amzn-client-token": input.ClientToken,
95
+ [_xact]: input[_CT],
133
96
  });
134
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/create-custom-line-item";
97
+ b.bp("/create-custom-line-item");
135
98
  let body;
136
99
  body = JSON.stringify((0, smithy_client_1.take)(input, {
137
100
  AccountId: [],
@@ -142,24 +105,17 @@ const se_CreateCustomLineItemCommand = async (input, context) => {
142
105
  Name: [],
143
106
  Tags: (_) => (0, smithy_client_1._json)(_),
144
107
  }));
145
- return new protocol_http_1.HttpRequest({
146
- protocol,
147
- hostname,
148
- port,
149
- method: "POST",
150
- headers,
151
- path: resolvedPath,
152
- body,
153
- });
108
+ b.m("POST").h(headers).b(body);
109
+ return b.build();
154
110
  };
155
111
  exports.se_CreateCustomLineItemCommand = se_CreateCustomLineItemCommand;
156
112
  const se_CreatePricingPlanCommand = async (input, context) => {
157
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
113
+ const b = (0, core_1.requestBuilder)(input, context);
158
114
  const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
159
115
  "content-type": "application/json",
160
- "x-amzn-client-token": input.ClientToken,
116
+ [_xact]: input[_CT],
161
117
  });
162
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/create-pricing-plan";
118
+ b.bp("/create-pricing-plan");
163
119
  let body;
164
120
  body = JSON.stringify((0, smithy_client_1.take)(input, {
165
121
  Description: [],
@@ -167,24 +123,17 @@ const se_CreatePricingPlanCommand = async (input, context) => {
167
123
  PricingRuleArns: (_) => (0, smithy_client_1._json)(_),
168
124
  Tags: (_) => (0, smithy_client_1._json)(_),
169
125
  }));
170
- return new protocol_http_1.HttpRequest({
171
- protocol,
172
- hostname,
173
- port,
174
- method: "POST",
175
- headers,
176
- path: resolvedPath,
177
- body,
178
- });
126
+ b.m("POST").h(headers).b(body);
127
+ return b.build();
179
128
  };
180
129
  exports.se_CreatePricingPlanCommand = se_CreatePricingPlanCommand;
181
130
  const se_CreatePricingRuleCommand = async (input, context) => {
182
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
131
+ const b = (0, core_1.requestBuilder)(input, context);
183
132
  const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
184
133
  "content-type": "application/json",
185
- "x-amzn-client-token": input.ClientToken,
134
+ [_xact]: input[_CT],
186
135
  });
187
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/create-pricing-rule";
136
+ b.bp("/create-pricing-rule");
188
137
  let body;
189
138
  body = JSON.stringify((0, smithy_client_1.take)(input, {
190
139
  BillingEntity: [],
@@ -199,152 +148,103 @@ const se_CreatePricingRuleCommand = async (input, context) => {
199
148
  Type: [],
200
149
  UsageType: [],
201
150
  }));
202
- return new protocol_http_1.HttpRequest({
203
- protocol,
204
- hostname,
205
- port,
206
- method: "POST",
207
- headers,
208
- path: resolvedPath,
209
- body,
210
- });
151
+ b.m("POST").h(headers).b(body);
152
+ return b.build();
211
153
  };
212
154
  exports.se_CreatePricingRuleCommand = se_CreatePricingRuleCommand;
213
155
  const se_DeleteBillingGroupCommand = async (input, context) => {
214
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
156
+ const b = (0, core_1.requestBuilder)(input, context);
215
157
  const headers = {
216
158
  "content-type": "application/json",
217
159
  };
218
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-billing-group";
160
+ b.bp("/delete-billing-group");
219
161
  let body;
220
162
  body = JSON.stringify((0, smithy_client_1.take)(input, {
221
163
  Arn: [],
222
164
  }));
223
- return new protocol_http_1.HttpRequest({
224
- protocol,
225
- hostname,
226
- port,
227
- method: "POST",
228
- headers,
229
- path: resolvedPath,
230
- body,
231
- });
165
+ b.m("POST").h(headers).b(body);
166
+ return b.build();
232
167
  };
233
168
  exports.se_DeleteBillingGroupCommand = se_DeleteBillingGroupCommand;
234
169
  const se_DeleteCustomLineItemCommand = async (input, context) => {
235
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
170
+ const b = (0, core_1.requestBuilder)(input, context);
236
171
  const headers = {
237
172
  "content-type": "application/json",
238
173
  };
239
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-custom-line-item";
174
+ b.bp("/delete-custom-line-item");
240
175
  let body;
241
176
  body = JSON.stringify((0, smithy_client_1.take)(input, {
242
177
  Arn: [],
243
178
  BillingPeriodRange: (_) => (0, smithy_client_1._json)(_),
244
179
  }));
245
- return new protocol_http_1.HttpRequest({
246
- protocol,
247
- hostname,
248
- port,
249
- method: "POST",
250
- headers,
251
- path: resolvedPath,
252
- body,
253
- });
180
+ b.m("POST").h(headers).b(body);
181
+ return b.build();
254
182
  };
255
183
  exports.se_DeleteCustomLineItemCommand = se_DeleteCustomLineItemCommand;
256
184
  const se_DeletePricingPlanCommand = async (input, context) => {
257
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
185
+ const b = (0, core_1.requestBuilder)(input, context);
258
186
  const headers = {
259
187
  "content-type": "application/json",
260
188
  };
261
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-pricing-plan";
189
+ b.bp("/delete-pricing-plan");
262
190
  let body;
263
191
  body = JSON.stringify((0, smithy_client_1.take)(input, {
264
192
  Arn: [],
265
193
  }));
266
- return new protocol_http_1.HttpRequest({
267
- protocol,
268
- hostname,
269
- port,
270
- method: "POST",
271
- headers,
272
- path: resolvedPath,
273
- body,
274
- });
194
+ b.m("POST").h(headers).b(body);
195
+ return b.build();
275
196
  };
276
197
  exports.se_DeletePricingPlanCommand = se_DeletePricingPlanCommand;
277
198
  const se_DeletePricingRuleCommand = async (input, context) => {
278
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
199
+ const b = (0, core_1.requestBuilder)(input, context);
279
200
  const headers = {
280
201
  "content-type": "application/json",
281
202
  };
282
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-pricing-rule";
203
+ b.bp("/delete-pricing-rule");
283
204
  let body;
284
205
  body = JSON.stringify((0, smithy_client_1.take)(input, {
285
206
  Arn: [],
286
207
  }));
287
- return new protocol_http_1.HttpRequest({
288
- protocol,
289
- hostname,
290
- port,
291
- method: "POST",
292
- headers,
293
- path: resolvedPath,
294
- body,
295
- });
208
+ b.m("POST").h(headers).b(body);
209
+ return b.build();
296
210
  };
297
211
  exports.se_DeletePricingRuleCommand = se_DeletePricingRuleCommand;
298
212
  const se_DisassociateAccountsCommand = async (input, context) => {
299
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
213
+ const b = (0, core_1.requestBuilder)(input, context);
300
214
  const headers = {
301
215
  "content-type": "application/json",
302
216
  };
303
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/disassociate-accounts";
217
+ b.bp("/disassociate-accounts");
304
218
  let body;
305
219
  body = JSON.stringify((0, smithy_client_1.take)(input, {
306
220
  AccountIds: (_) => (0, smithy_client_1._json)(_),
307
221
  Arn: [],
308
222
  }));
309
- return new protocol_http_1.HttpRequest({
310
- protocol,
311
- hostname,
312
- port,
313
- method: "POST",
314
- headers,
315
- path: resolvedPath,
316
- body,
317
- });
223
+ b.m("POST").h(headers).b(body);
224
+ return b.build();
318
225
  };
319
226
  exports.se_DisassociateAccountsCommand = se_DisassociateAccountsCommand;
320
227
  const se_DisassociatePricingRulesCommand = async (input, context) => {
321
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
228
+ const b = (0, core_1.requestBuilder)(input, context);
322
229
  const headers = {
323
230
  "content-type": "application/json",
324
231
  };
325
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/disassociate-pricing-rules";
232
+ b.bp("/disassociate-pricing-rules");
326
233
  let body;
327
234
  body = JSON.stringify((0, smithy_client_1.take)(input, {
328
235
  Arn: [],
329
236
  PricingRuleArns: (_) => (0, smithy_client_1._json)(_),
330
237
  }));
331
- return new protocol_http_1.HttpRequest({
332
- protocol,
333
- hostname,
334
- port,
335
- method: "PUT",
336
- headers,
337
- path: resolvedPath,
338
- body,
339
- });
238
+ b.m("PUT").h(headers).b(body);
239
+ return b.build();
340
240
  };
341
241
  exports.se_DisassociatePricingRulesCommand = se_DisassociatePricingRulesCommand;
342
242
  const se_GetBillingGroupCostReportCommand = async (input, context) => {
343
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
243
+ const b = (0, core_1.requestBuilder)(input, context);
344
244
  const headers = {
345
245
  "content-type": "application/json",
346
246
  };
347
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-billing-group-cost-report";
247
+ b.bp("/get-billing-group-cost-report");
348
248
  let body;
349
249
  body = JSON.stringify((0, smithy_client_1.take)(input, {
350
250
  Arn: [],
@@ -353,46 +253,32 @@ const se_GetBillingGroupCostReportCommand = async (input, context) => {
353
253
  MaxResults: [],
354
254
  NextToken: [],
355
255
  }));
356
- return new protocol_http_1.HttpRequest({
357
- protocol,
358
- hostname,
359
- port,
360
- method: "POST",
361
- headers,
362
- path: resolvedPath,
363
- body,
364
- });
256
+ b.m("POST").h(headers).b(body);
257
+ return b.build();
365
258
  };
366
259
  exports.se_GetBillingGroupCostReportCommand = se_GetBillingGroupCostReportCommand;
367
260
  const se_ListAccountAssociationsCommand = async (input, context) => {
368
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
261
+ const b = (0, core_1.requestBuilder)(input, context);
369
262
  const headers = {
370
263
  "content-type": "application/json",
371
264
  };
372
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-account-associations";
265
+ b.bp("/list-account-associations");
373
266
  let body;
374
267
  body = JSON.stringify((0, smithy_client_1.take)(input, {
375
268
  BillingPeriod: [],
376
269
  Filters: (_) => (0, smithy_client_1._json)(_),
377
270
  NextToken: [],
378
271
  }));
379
- return new protocol_http_1.HttpRequest({
380
- protocol,
381
- hostname,
382
- port,
383
- method: "POST",
384
- headers,
385
- path: resolvedPath,
386
- body,
387
- });
272
+ b.m("POST").h(headers).b(body);
273
+ return b.build();
388
274
  };
389
275
  exports.se_ListAccountAssociationsCommand = se_ListAccountAssociationsCommand;
390
276
  const se_ListBillingGroupCostReportsCommand = async (input, context) => {
391
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
277
+ const b = (0, core_1.requestBuilder)(input, context);
392
278
  const headers = {
393
279
  "content-type": "application/json",
394
280
  };
395
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-billing-group-cost-reports";
281
+ b.bp("/list-billing-group-cost-reports");
396
282
  let body;
397
283
  body = JSON.stringify((0, smithy_client_1.take)(input, {
398
284
  BillingPeriod: [],
@@ -400,23 +286,16 @@ const se_ListBillingGroupCostReportsCommand = async (input, context) => {
400
286
  MaxResults: [],
401
287
  NextToken: [],
402
288
  }));
403
- return new protocol_http_1.HttpRequest({
404
- protocol,
405
- hostname,
406
- port,
407
- method: "POST",
408
- headers,
409
- path: resolvedPath,
410
- body,
411
- });
289
+ b.m("POST").h(headers).b(body);
290
+ return b.build();
412
291
  };
413
292
  exports.se_ListBillingGroupCostReportsCommand = se_ListBillingGroupCostReportsCommand;
414
293
  const se_ListBillingGroupsCommand = async (input, context) => {
415
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
294
+ const b = (0, core_1.requestBuilder)(input, context);
416
295
  const headers = {
417
296
  "content-type": "application/json",
418
297
  };
419
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-billing-groups";
298
+ b.bp("/list-billing-groups");
420
299
  let body;
421
300
  body = JSON.stringify((0, smithy_client_1.take)(input, {
422
301
  BillingPeriod: [],
@@ -424,23 +303,16 @@ const se_ListBillingGroupsCommand = async (input, context) => {
424
303
  MaxResults: [],
425
304
  NextToken: [],
426
305
  }));
427
- return new protocol_http_1.HttpRequest({
428
- protocol,
429
- hostname,
430
- port,
431
- method: "POST",
432
- headers,
433
- path: resolvedPath,
434
- body,
435
- });
306
+ b.m("POST").h(headers).b(body);
307
+ return b.build();
436
308
  };
437
309
  exports.se_ListBillingGroupsCommand = se_ListBillingGroupsCommand;
438
310
  const se_ListCustomLineItemsCommand = async (input, context) => {
439
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
311
+ const b = (0, core_1.requestBuilder)(input, context);
440
312
  const headers = {
441
313
  "content-type": "application/json",
442
314
  };
443
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-custom-line-items";
315
+ b.bp("/list-custom-line-items");
444
316
  let body;
445
317
  body = JSON.stringify((0, smithy_client_1.take)(input, {
446
318
  BillingPeriod: [],
@@ -448,23 +320,16 @@ const se_ListCustomLineItemsCommand = async (input, context) => {
448
320
  MaxResults: [],
449
321
  NextToken: [],
450
322
  }));
451
- return new protocol_http_1.HttpRequest({
452
- protocol,
453
- hostname,
454
- port,
455
- method: "POST",
456
- headers,
457
- path: resolvedPath,
458
- body,
459
- });
323
+ b.m("POST").h(headers).b(body);
324
+ return b.build();
460
325
  };
461
326
  exports.se_ListCustomLineItemsCommand = se_ListCustomLineItemsCommand;
462
327
  const se_ListCustomLineItemVersionsCommand = async (input, context) => {
463
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
328
+ const b = (0, core_1.requestBuilder)(input, context);
464
329
  const headers = {
465
330
  "content-type": "application/json",
466
331
  };
467
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-custom-line-item-versions";
332
+ b.bp("/list-custom-line-item-versions");
468
333
  let body;
469
334
  body = JSON.stringify((0, smithy_client_1.take)(input, {
470
335
  Arn: [],
@@ -472,23 +337,16 @@ const se_ListCustomLineItemVersionsCommand = async (input, context) => {
472
337
  MaxResults: [],
473
338
  NextToken: [],
474
339
  }));
475
- return new protocol_http_1.HttpRequest({
476
- protocol,
477
- hostname,
478
- port,
479
- method: "POST",
480
- headers,
481
- path: resolvedPath,
482
- body,
483
- });
340
+ b.m("POST").h(headers).b(body);
341
+ return b.build();
484
342
  };
485
343
  exports.se_ListCustomLineItemVersionsCommand = se_ListCustomLineItemVersionsCommand;
486
344
  const se_ListPricingPlansCommand = async (input, context) => {
487
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
345
+ const b = (0, core_1.requestBuilder)(input, context);
488
346
  const headers = {
489
347
  "content-type": "application/json",
490
348
  };
491
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-pricing-plans";
349
+ b.bp("/list-pricing-plans");
492
350
  let body;
493
351
  body = JSON.stringify((0, smithy_client_1.take)(input, {
494
352
  BillingPeriod: [],
@@ -496,24 +354,16 @@ const se_ListPricingPlansCommand = async (input, context) => {
496
354
  MaxResults: [],
497
355
  NextToken: [],
498
356
  }));
499
- return new protocol_http_1.HttpRequest({
500
- protocol,
501
- hostname,
502
- port,
503
- method: "POST",
504
- headers,
505
- path: resolvedPath,
506
- body,
507
- });
357
+ b.m("POST").h(headers).b(body);
358
+ return b.build();
508
359
  };
509
360
  exports.se_ListPricingPlansCommand = se_ListPricingPlansCommand;
510
361
  const se_ListPricingPlansAssociatedWithPricingRuleCommand = async (input, context) => {
511
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
362
+ const b = (0, core_1.requestBuilder)(input, context);
512
363
  const headers = {
513
364
  "content-type": "application/json",
514
365
  };
515
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
516
- "/list-pricing-plans-associated-with-pricing-rule";
366
+ b.bp("/list-pricing-plans-associated-with-pricing-rule");
517
367
  let body;
518
368
  body = JSON.stringify((0, smithy_client_1.take)(input, {
519
369
  BillingPeriod: [],
@@ -521,23 +371,16 @@ const se_ListPricingPlansAssociatedWithPricingRuleCommand = async (input, contex
521
371
  NextToken: [],
522
372
  PricingRuleArn: [],
523
373
  }));
524
- return new protocol_http_1.HttpRequest({
525
- protocol,
526
- hostname,
527
- port,
528
- method: "POST",
529
- headers,
530
- path: resolvedPath,
531
- body,
532
- });
374
+ b.m("POST").h(headers).b(body);
375
+ return b.build();
533
376
  };
534
377
  exports.se_ListPricingPlansAssociatedWithPricingRuleCommand = se_ListPricingPlansAssociatedWithPricingRuleCommand;
535
378
  const se_ListPricingRulesCommand = async (input, context) => {
536
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
379
+ const b = (0, core_1.requestBuilder)(input, context);
537
380
  const headers = {
538
381
  "content-type": "application/json",
539
382
  };
540
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-pricing-rules";
383
+ b.bp("/list-pricing-rules");
541
384
  let body;
542
385
  body = JSON.stringify((0, smithy_client_1.take)(input, {
543
386
  BillingPeriod: [],
@@ -545,24 +388,16 @@ const se_ListPricingRulesCommand = async (input, context) => {
545
388
  MaxResults: [],
546
389
  NextToken: [],
547
390
  }));
548
- return new protocol_http_1.HttpRequest({
549
- protocol,
550
- hostname,
551
- port,
552
- method: "POST",
553
- headers,
554
- path: resolvedPath,
555
- body,
556
- });
391
+ b.m("POST").h(headers).b(body);
392
+ return b.build();
557
393
  };
558
394
  exports.se_ListPricingRulesCommand = se_ListPricingRulesCommand;
559
395
  const se_ListPricingRulesAssociatedToPricingPlanCommand = async (input, context) => {
560
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
396
+ const b = (0, core_1.requestBuilder)(input, context);
561
397
  const headers = {
562
398
  "content-type": "application/json",
563
399
  };
564
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
565
- "/list-pricing-rules-associated-to-pricing-plan";
400
+ b.bp("/list-pricing-rules-associated-to-pricing-plan");
566
401
  let body;
567
402
  body = JSON.stringify((0, smithy_client_1.take)(input, {
568
403
  BillingPeriod: [],
@@ -570,24 +405,16 @@ const se_ListPricingRulesAssociatedToPricingPlanCommand = async (input, context)
570
405
  NextToken: [],
571
406
  PricingPlanArn: [],
572
407
  }));
573
- return new protocol_http_1.HttpRequest({
574
- protocol,
575
- hostname,
576
- port,
577
- method: "POST",
578
- headers,
579
- path: resolvedPath,
580
- body,
581
- });
408
+ b.m("POST").h(headers).b(body);
409
+ return b.build();
582
410
  };
583
411
  exports.se_ListPricingRulesAssociatedToPricingPlanCommand = se_ListPricingRulesAssociatedToPricingPlanCommand;
584
412
  const se_ListResourcesAssociatedToCustomLineItemCommand = async (input, context) => {
585
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
413
+ const b = (0, core_1.requestBuilder)(input, context);
586
414
  const headers = {
587
415
  "content-type": "application/json",
588
416
  };
589
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
590
- "/list-resources-associated-to-custom-line-item";
417
+ b.bp("/list-resources-associated-to-custom-line-item");
591
418
  let body;
592
419
  body = JSON.stringify((0, smithy_client_1.take)(input, {
593
420
  Arn: [],
@@ -596,86 +423,57 @@ const se_ListResourcesAssociatedToCustomLineItemCommand = async (input, context)
596
423
  MaxResults: [],
597
424
  NextToken: [],
598
425
  }));
599
- return new protocol_http_1.HttpRequest({
600
- protocol,
601
- hostname,
602
- port,
603
- method: "POST",
604
- headers,
605
- path: resolvedPath,
606
- body,
607
- });
426
+ b.m("POST").h(headers).b(body);
427
+ return b.build();
608
428
  };
609
429
  exports.se_ListResourcesAssociatedToCustomLineItemCommand = se_ListResourcesAssociatedToCustomLineItemCommand;
610
430
  const se_ListTagsForResourceCommand = async (input, context) => {
611
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
431
+ const b = (0, core_1.requestBuilder)(input, context);
612
432
  const headers = {};
613
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
614
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
433
+ b.bp("/tags/{ResourceArn}");
434
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
615
435
  let body;
616
- return new protocol_http_1.HttpRequest({
617
- protocol,
618
- hostname,
619
- port,
620
- method: "GET",
621
- headers,
622
- path: resolvedPath,
623
- body,
624
- });
436
+ b.m("GET").h(headers).b(body);
437
+ return b.build();
625
438
  };
626
439
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
627
440
  const se_TagResourceCommand = async (input, context) => {
628
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
441
+ const b = (0, core_1.requestBuilder)(input, context);
629
442
  const headers = {
630
443
  "content-type": "application/json",
631
444
  };
632
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
633
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
445
+ b.bp("/tags/{ResourceArn}");
446
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
634
447
  let body;
635
448
  body = JSON.stringify((0, smithy_client_1.take)(input, {
636
449
  Tags: (_) => (0, smithy_client_1._json)(_),
637
450
  }));
638
- return new protocol_http_1.HttpRequest({
639
- protocol,
640
- hostname,
641
- port,
642
- method: "POST",
643
- headers,
644
- path: resolvedPath,
645
- body,
646
- });
451
+ b.m("POST").h(headers).b(body);
452
+ return b.build();
647
453
  };
648
454
  exports.se_TagResourceCommand = se_TagResourceCommand;
649
455
  const se_UntagResourceCommand = async (input, context) => {
650
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
456
+ const b = (0, core_1.requestBuilder)(input, context);
651
457
  const headers = {};
652
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
653
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
458
+ b.bp("/tags/{ResourceArn}");
459
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
654
460
  const query = (0, smithy_client_1.map)({
655
- tagKeys: [
461
+ [_tK]: [
656
462
  (0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
657
- () => (input.TagKeys || []).map((_entry) => _entry),
463
+ () => (input[_TK] || []).map((_entry) => _entry),
658
464
  ],
659
465
  });
660
466
  let body;
661
- return new protocol_http_1.HttpRequest({
662
- protocol,
663
- hostname,
664
- port,
665
- method: "DELETE",
666
- headers,
667
- path: resolvedPath,
668
- query,
669
- body,
670
- });
467
+ b.m("DELETE").h(headers).q(query).b(body);
468
+ return b.build();
671
469
  };
672
470
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
673
471
  const se_UpdateBillingGroupCommand = async (input, context) => {
674
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
472
+ const b = (0, core_1.requestBuilder)(input, context);
675
473
  const headers = {
676
474
  "content-type": "application/json",
677
475
  };
678
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-billing-group";
476
+ b.bp("/update-billing-group");
679
477
  let body;
680
478
  body = JSON.stringify((0, smithy_client_1.take)(input, {
681
479
  AccountGrouping: (_) => (0, smithy_client_1._json)(_),
@@ -685,23 +483,16 @@ const se_UpdateBillingGroupCommand = async (input, context) => {
685
483
  Name: [],
686
484
  Status: [],
687
485
  }));
688
- return new protocol_http_1.HttpRequest({
689
- protocol,
690
- hostname,
691
- port,
692
- method: "POST",
693
- headers,
694
- path: resolvedPath,
695
- body,
696
- });
486
+ b.m("POST").h(headers).b(body);
487
+ return b.build();
697
488
  };
698
489
  exports.se_UpdateBillingGroupCommand = se_UpdateBillingGroupCommand;
699
490
  const se_UpdateCustomLineItemCommand = async (input, context) => {
700
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
491
+ const b = (0, core_1.requestBuilder)(input, context);
701
492
  const headers = {
702
493
  "content-type": "application/json",
703
494
  };
704
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-custom-line-item";
495
+ b.bp("/update-custom-line-item");
705
496
  let body;
706
497
  body = JSON.stringify((0, smithy_client_1.take)(input, {
707
498
  Arn: [],
@@ -710,46 +501,32 @@ const se_UpdateCustomLineItemCommand = async (input, context) => {
710
501
  Description: [],
711
502
  Name: [],
712
503
  }));
713
- return new protocol_http_1.HttpRequest({
714
- protocol,
715
- hostname,
716
- port,
717
- method: "POST",
718
- headers,
719
- path: resolvedPath,
720
- body,
721
- });
504
+ b.m("POST").h(headers).b(body);
505
+ return b.build();
722
506
  };
723
507
  exports.se_UpdateCustomLineItemCommand = se_UpdateCustomLineItemCommand;
724
508
  const se_UpdatePricingPlanCommand = async (input, context) => {
725
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
509
+ const b = (0, core_1.requestBuilder)(input, context);
726
510
  const headers = {
727
511
  "content-type": "application/json",
728
512
  };
729
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-pricing-plan";
513
+ b.bp("/update-pricing-plan");
730
514
  let body;
731
515
  body = JSON.stringify((0, smithy_client_1.take)(input, {
732
516
  Arn: [],
733
517
  Description: [],
734
518
  Name: [],
735
519
  }));
736
- return new protocol_http_1.HttpRequest({
737
- protocol,
738
- hostname,
739
- port,
740
- method: "PUT",
741
- headers,
742
- path: resolvedPath,
743
- body,
744
- });
520
+ b.m("PUT").h(headers).b(body);
521
+ return b.build();
745
522
  };
746
523
  exports.se_UpdatePricingPlanCommand = se_UpdatePricingPlanCommand;
747
524
  const se_UpdatePricingRuleCommand = async (input, context) => {
748
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
525
+ const b = (0, core_1.requestBuilder)(input, context);
749
526
  const headers = {
750
527
  "content-type": "application/json",
751
528
  };
752
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-pricing-rule";
529
+ b.bp("/update-pricing-rule");
753
530
  let body;
754
531
  body = JSON.stringify((0, smithy_client_1.take)(input, {
755
532
  Arn: [],
@@ -759,15 +536,8 @@ const se_UpdatePricingRuleCommand = async (input, context) => {
759
536
  Tiering: (_) => (0, smithy_client_1._json)(_),
760
537
  Type: [],
761
538
  }));
762
- return new protocol_http_1.HttpRequest({
763
- protocol,
764
- hostname,
765
- port,
766
- method: "PUT",
767
- headers,
768
- path: resolvedPath,
769
- body,
770
- });
539
+ b.m("PUT").h(headers).b(body);
540
+ return b.build();
771
541
  };
772
542
  exports.se_UpdatePricingRuleCommand = se_UpdatePricingRuleCommand;
773
543
  const de_AssociateAccountsCommand = async (output, context) => {
@@ -2356,10 +2126,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
2356
2126
  };
2357
2127
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2358
2128
  const contents = (0, smithy_client_1.map)({
2359
- RetryAfterSeconds: [
2360
- () => void 0 !== parsedOutput.headers["retry-after"],
2361
- () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]),
2362
- ],
2129
+ [_RAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
2363
2130
  });
2364
2131
  const data = parsedOutput.body;
2365
2132
  const doc = (0, smithy_client_1.take)(data, {
@@ -2406,10 +2173,7 @@ const de_ServiceLimitExceededExceptionRes = async (parsedOutput, context) => {
2406
2173
  };
2407
2174
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2408
2175
  const contents = (0, smithy_client_1.map)({
2409
- RetryAfterSeconds: [
2410
- () => void 0 !== parsedOutput.headers["retry-after"],
2411
- () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]),
2412
- ],
2176
+ [_RAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
2413
2177
  });
2414
2178
  const data = parsedOutput.body;
2415
2179
  const doc = (0, smithy_client_1.take)(data, {
@@ -2578,6 +2342,12 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
2578
2342
  value !== "" &&
2579
2343
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2580
2344
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2345
+ const _CT = "ClientToken";
2346
+ const _RAS = "RetryAfterSeconds";
2347
+ const _TK = "TagKeys";
2348
+ const _ra = "retry-after";
2349
+ const _tK = "tagKeys";
2350
+ const _xact = "x-amzn-client-token";
2581
2351
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2582
2352
  if (encoded.length) {
2583
2353
  return JSON.parse(encoded);