@aws-sdk/client-inspector2 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,196 +1,132 @@
1
1
  import { awsExpectUnion as __expectUnion } from "@aws-sdk/core";
2
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
2
+ import { requestBuilder as rb } from "@smithy/core";
3
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
4
4
  import { v4 as generateIdempotencyToken } from "uuid";
5
5
  import { Inspector2ServiceException as __BaseException } from "../models/Inspector2ServiceException";
6
6
  import { AccessDeniedException, BadRequestException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
7
7
  export const se_AssociateMemberCommand = async (input, context) => {
8
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
8
+ const b = rb(input, context);
9
9
  const headers = {
10
10
  "content-type": "application/json",
11
11
  };
12
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/members/associate";
12
+ b.bp("/members/associate");
13
13
  let body;
14
14
  body = JSON.stringify(take(input, {
15
15
  accountId: [],
16
16
  }));
17
- return new __HttpRequest({
18
- protocol,
19
- hostname,
20
- port,
21
- method: "POST",
22
- headers,
23
- path: resolvedPath,
24
- body,
25
- });
17
+ b.m("POST").h(headers).b(body);
18
+ return b.build();
26
19
  };
27
20
  export const se_BatchGetAccountStatusCommand = async (input, context) => {
28
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
21
+ const b = rb(input, context);
29
22
  const headers = {
30
23
  "content-type": "application/json",
31
24
  };
32
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/status/batch/get";
25
+ b.bp("/status/batch/get");
33
26
  let body;
34
27
  body = JSON.stringify(take(input, {
35
28
  accountIds: (_) => _json(_),
36
29
  }));
37
- return new __HttpRequest({
38
- protocol,
39
- hostname,
40
- port,
41
- method: "POST",
42
- headers,
43
- path: resolvedPath,
44
- body,
45
- });
30
+ b.m("POST").h(headers).b(body);
31
+ return b.build();
46
32
  };
47
33
  export const se_BatchGetCodeSnippetCommand = 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 || ""}` + "/codesnippet/batchget";
38
+ b.bp("/codesnippet/batchget");
53
39
  let body;
54
40
  body = JSON.stringify(take(input, {
55
41
  findingArns: (_) => _json(_),
56
42
  }));
57
- return new __HttpRequest({
58
- protocol,
59
- hostname,
60
- port,
61
- method: "POST",
62
- headers,
63
- path: resolvedPath,
64
- body,
65
- });
43
+ b.m("POST").h(headers).b(body);
44
+ return b.build();
66
45
  };
67
46
  export const se_BatchGetFindingDetailsCommand = async (input, context) => {
68
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
47
+ const b = rb(input, context);
69
48
  const headers = {
70
49
  "content-type": "application/json",
71
50
  };
72
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/findings/details/batch/get";
51
+ b.bp("/findings/details/batch/get");
73
52
  let body;
74
53
  body = JSON.stringify(take(input, {
75
54
  findingArns: (_) => _json(_),
76
55
  }));
77
- return new __HttpRequest({
78
- protocol,
79
- hostname,
80
- port,
81
- method: "POST",
82
- headers,
83
- path: resolvedPath,
84
- body,
85
- });
56
+ b.m("POST").h(headers).b(body);
57
+ return b.build();
86
58
  };
87
59
  export const se_BatchGetFreeTrialInfoCommand = async (input, context) => {
88
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
60
+ const b = rb(input, context);
89
61
  const headers = {
90
62
  "content-type": "application/json",
91
63
  };
92
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/freetrialinfo/batchget";
64
+ b.bp("/freetrialinfo/batchget");
93
65
  let body;
94
66
  body = JSON.stringify(take(input, {
95
67
  accountIds: (_) => _json(_),
96
68
  }));
97
- return new __HttpRequest({
98
- protocol,
99
- hostname,
100
- port,
101
- method: "POST",
102
- headers,
103
- path: resolvedPath,
104
- body,
105
- });
69
+ b.m("POST").h(headers).b(body);
70
+ return b.build();
106
71
  };
107
72
  export const se_BatchGetMemberEc2DeepInspectionStatusCommand = async (input, context) => {
108
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
73
+ const b = rb(input, context);
109
74
  const headers = {
110
75
  "content-type": "application/json",
111
76
  };
112
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ec2deepinspectionstatus/member/batch/get";
77
+ b.bp("/ec2deepinspectionstatus/member/batch/get");
113
78
  let body;
114
79
  body = JSON.stringify(take(input, {
115
80
  accountIds: (_) => _json(_),
116
81
  }));
117
- return new __HttpRequest({
118
- protocol,
119
- hostname,
120
- port,
121
- method: "POST",
122
- headers,
123
- path: resolvedPath,
124
- body,
125
- });
82
+ b.m("POST").h(headers).b(body);
83
+ return b.build();
126
84
  };
127
85
  export const se_BatchUpdateMemberEc2DeepInspectionStatusCommand = async (input, context) => {
128
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
86
+ const b = rb(input, context);
129
87
  const headers = {
130
88
  "content-type": "application/json",
131
89
  };
132
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
133
- "/ec2deepinspectionstatus/member/batch/update";
90
+ b.bp("/ec2deepinspectionstatus/member/batch/update");
134
91
  let body;
135
92
  body = JSON.stringify(take(input, {
136
93
  accountIds: (_) => _json(_),
137
94
  }));
138
- return new __HttpRequest({
139
- protocol,
140
- hostname,
141
- port,
142
- method: "POST",
143
- headers,
144
- path: resolvedPath,
145
- body,
146
- });
95
+ b.m("POST").h(headers).b(body);
96
+ return b.build();
147
97
  };
148
98
  export const se_CancelFindingsReportCommand = async (input, context) => {
149
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
99
+ const b = rb(input, context);
150
100
  const headers = {
151
101
  "content-type": "application/json",
152
102
  };
153
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reporting/cancel";
103
+ b.bp("/reporting/cancel");
154
104
  let body;
155
105
  body = JSON.stringify(take(input, {
156
106
  reportId: [],
157
107
  }));
158
- return new __HttpRequest({
159
- protocol,
160
- hostname,
161
- port,
162
- method: "POST",
163
- headers,
164
- path: resolvedPath,
165
- body,
166
- });
108
+ b.m("POST").h(headers).b(body);
109
+ return b.build();
167
110
  };
168
111
  export const se_CancelSbomExportCommand = async (input, context) => {
169
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
112
+ const b = rb(input, context);
170
113
  const headers = {
171
114
  "content-type": "application/json",
172
115
  };
173
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sbomexport/cancel";
116
+ b.bp("/sbomexport/cancel");
174
117
  let body;
175
118
  body = JSON.stringify(take(input, {
176
119
  reportId: [],
177
120
  }));
178
- return new __HttpRequest({
179
- protocol,
180
- hostname,
181
- port,
182
- method: "POST",
183
- headers,
184
- path: resolvedPath,
185
- body,
186
- });
121
+ b.m("POST").h(headers).b(body);
122
+ return b.build();
187
123
  };
188
124
  export const se_CreateFilterCommand = async (input, context) => {
189
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
125
+ const b = rb(input, context);
190
126
  const headers = {
191
127
  "content-type": "application/json",
192
128
  };
193
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/filters/create";
129
+ b.bp("/filters/create");
194
130
  let body;
195
131
  body = JSON.stringify(take(input, {
196
132
  action: [],
@@ -200,429 +136,281 @@ export const se_CreateFilterCommand = async (input, context) => {
200
136
  reason: [],
201
137
  tags: (_) => _json(_),
202
138
  }));
203
- return new __HttpRequest({
204
- protocol,
205
- hostname,
206
- port,
207
- method: "POST",
208
- headers,
209
- path: resolvedPath,
210
- body,
211
- });
139
+ b.m("POST").h(headers).b(body);
140
+ return b.build();
212
141
  };
213
142
  export const se_CreateFindingsReportCommand = async (input, context) => {
214
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
143
+ const b = rb(input, context);
215
144
  const headers = {
216
145
  "content-type": "application/json",
217
146
  };
218
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reporting/create";
147
+ b.bp("/reporting/create");
219
148
  let body;
220
149
  body = JSON.stringify(take(input, {
221
150
  filterCriteria: (_) => se_FilterCriteria(_, context),
222
151
  reportFormat: [],
223
152
  s3Destination: (_) => _json(_),
224
153
  }));
225
- return new __HttpRequest({
226
- protocol,
227
- hostname,
228
- port,
229
- method: "POST",
230
- headers,
231
- path: resolvedPath,
232
- body,
233
- });
154
+ b.m("POST").h(headers).b(body);
155
+ return b.build();
234
156
  };
235
157
  export const se_CreateSbomExportCommand = async (input, context) => {
236
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
158
+ const b = rb(input, context);
237
159
  const headers = {
238
160
  "content-type": "application/json",
239
161
  };
240
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sbomexport/create";
162
+ b.bp("/sbomexport/create");
241
163
  let body;
242
164
  body = JSON.stringify(take(input, {
243
165
  reportFormat: [],
244
166
  resourceFilterCriteria: (_) => _json(_),
245
167
  s3Destination: (_) => _json(_),
246
168
  }));
247
- return new __HttpRequest({
248
- protocol,
249
- hostname,
250
- port,
251
- method: "POST",
252
- headers,
253
- path: resolvedPath,
254
- body,
255
- });
169
+ b.m("POST").h(headers).b(body);
170
+ return b.build();
256
171
  };
257
172
  export const se_DeleteFilterCommand = async (input, context) => {
258
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
173
+ const b = rb(input, context);
259
174
  const headers = {
260
175
  "content-type": "application/json",
261
176
  };
262
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/filters/delete";
177
+ b.bp("/filters/delete");
263
178
  let body;
264
179
  body = JSON.stringify(take(input, {
265
180
  arn: [],
266
181
  }));
267
- return new __HttpRequest({
268
- protocol,
269
- hostname,
270
- port,
271
- method: "POST",
272
- headers,
273
- path: resolvedPath,
274
- body,
275
- });
182
+ b.m("POST").h(headers).b(body);
183
+ return b.build();
276
184
  };
277
185
  export const se_DescribeOrganizationConfigurationCommand = async (input, context) => {
278
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
186
+ const b = rb(input, context);
279
187
  const headers = {
280
188
  "content-type": "application/json",
281
189
  };
282
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organizationconfiguration/describe";
190
+ b.bp("/organizationconfiguration/describe");
283
191
  let body;
284
192
  body = "";
285
- return new __HttpRequest({
286
- protocol,
287
- hostname,
288
- port,
289
- method: "POST",
290
- headers,
291
- path: resolvedPath,
292
- body,
293
- });
193
+ b.m("POST").h(headers).b(body);
194
+ return b.build();
294
195
  };
295
196
  export const se_DisableCommand = async (input, context) => {
296
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
197
+ const b = rb(input, context);
297
198
  const headers = {
298
199
  "content-type": "application/json",
299
200
  };
300
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/disable";
201
+ b.bp("/disable");
301
202
  let body;
302
203
  body = JSON.stringify(take(input, {
303
204
  accountIds: (_) => _json(_),
304
205
  resourceTypes: (_) => _json(_),
305
206
  }));
306
- return new __HttpRequest({
307
- protocol,
308
- hostname,
309
- port,
310
- method: "POST",
311
- headers,
312
- path: resolvedPath,
313
- body,
314
- });
207
+ b.m("POST").h(headers).b(body);
208
+ return b.build();
315
209
  };
316
210
  export const se_DisableDelegatedAdminAccountCommand = async (input, context) => {
317
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
211
+ const b = rb(input, context);
318
212
  const headers = {
319
213
  "content-type": "application/json",
320
214
  };
321
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delegatedadminaccounts/disable";
215
+ b.bp("/delegatedadminaccounts/disable");
322
216
  let body;
323
217
  body = JSON.stringify(take(input, {
324
218
  delegatedAdminAccountId: [],
325
219
  }));
326
- return new __HttpRequest({
327
- protocol,
328
- hostname,
329
- port,
330
- method: "POST",
331
- headers,
332
- path: resolvedPath,
333
- body,
334
- });
220
+ b.m("POST").h(headers).b(body);
221
+ return b.build();
335
222
  };
336
223
  export const se_DisassociateMemberCommand = async (input, context) => {
337
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
224
+ const b = rb(input, context);
338
225
  const headers = {
339
226
  "content-type": "application/json",
340
227
  };
341
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/members/disassociate";
228
+ b.bp("/members/disassociate");
342
229
  let body;
343
230
  body = JSON.stringify(take(input, {
344
231
  accountId: [],
345
232
  }));
346
- return new __HttpRequest({
347
- protocol,
348
- hostname,
349
- port,
350
- method: "POST",
351
- headers,
352
- path: resolvedPath,
353
- body,
354
- });
233
+ b.m("POST").h(headers).b(body);
234
+ return b.build();
355
235
  };
356
236
  export const se_EnableCommand = async (input, context) => {
357
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
237
+ const b = rb(input, context);
358
238
  const headers = {
359
239
  "content-type": "application/json",
360
240
  };
361
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/enable";
241
+ b.bp("/enable");
362
242
  let body;
363
243
  body = JSON.stringify(take(input, {
364
244
  accountIds: (_) => _json(_),
365
245
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
366
246
  resourceTypes: (_) => _json(_),
367
247
  }));
368
- return new __HttpRequest({
369
- protocol,
370
- hostname,
371
- port,
372
- method: "POST",
373
- headers,
374
- path: resolvedPath,
375
- body,
376
- });
248
+ b.m("POST").h(headers).b(body);
249
+ return b.build();
377
250
  };
378
251
  export const se_EnableDelegatedAdminAccountCommand = async (input, context) => {
379
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
252
+ const b = rb(input, context);
380
253
  const headers = {
381
254
  "content-type": "application/json",
382
255
  };
383
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delegatedadminaccounts/enable";
256
+ b.bp("/delegatedadminaccounts/enable");
384
257
  let body;
385
258
  body = JSON.stringify(take(input, {
386
259
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
387
260
  delegatedAdminAccountId: [],
388
261
  }));
389
- return new __HttpRequest({
390
- protocol,
391
- hostname,
392
- port,
393
- method: "POST",
394
- headers,
395
- path: resolvedPath,
396
- body,
397
- });
262
+ b.m("POST").h(headers).b(body);
263
+ return b.build();
398
264
  };
399
265
  export const se_GetConfigurationCommand = async (input, context) => {
400
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
266
+ const b = rb(input, context);
401
267
  const headers = {
402
268
  "content-type": "application/json",
403
269
  };
404
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/configuration/get";
270
+ b.bp("/configuration/get");
405
271
  let body;
406
272
  body = "";
407
- return new __HttpRequest({
408
- protocol,
409
- hostname,
410
- port,
411
- method: "POST",
412
- headers,
413
- path: resolvedPath,
414
- body,
415
- });
273
+ b.m("POST").h(headers).b(body);
274
+ return b.build();
416
275
  };
417
276
  export const se_GetDelegatedAdminAccountCommand = async (input, context) => {
418
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
277
+ const b = rb(input, context);
419
278
  const headers = {
420
279
  "content-type": "application/json",
421
280
  };
422
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delegatedadminaccounts/get";
281
+ b.bp("/delegatedadminaccounts/get");
423
282
  let body;
424
283
  body = "";
425
- return new __HttpRequest({
426
- protocol,
427
- hostname,
428
- port,
429
- method: "POST",
430
- headers,
431
- path: resolvedPath,
432
- body,
433
- });
284
+ b.m("POST").h(headers).b(body);
285
+ return b.build();
434
286
  };
435
287
  export const se_GetEc2DeepInspectionConfigurationCommand = async (input, context) => {
436
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
288
+ const b = rb(input, context);
437
289
  const headers = {
438
290
  "content-type": "application/json",
439
291
  };
440
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ec2deepinspectionconfiguration/get";
292
+ b.bp("/ec2deepinspectionconfiguration/get");
441
293
  let body;
442
294
  body = "";
443
- return new __HttpRequest({
444
- protocol,
445
- hostname,
446
- port,
447
- method: "POST",
448
- headers,
449
- path: resolvedPath,
450
- body,
451
- });
295
+ b.m("POST").h(headers).b(body);
296
+ return b.build();
452
297
  };
453
298
  export const se_GetEncryptionKeyCommand = async (input, context) => {
454
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
299
+ const b = rb(input, context);
455
300
  const headers = {};
456
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/encryptionkey/get";
301
+ b.bp("/encryptionkey/get");
457
302
  const query = map({
458
- scanType: [, __expectNonNull(input.scanType, `scanType`)],
459
- resourceType: [, __expectNonNull(input.resourceType, `resourceType`)],
303
+ [_sT]: [, __expectNonNull(input[_sT], `scanType`)],
304
+ [_rT]: [, __expectNonNull(input[_rT], `resourceType`)],
460
305
  });
461
306
  let body;
462
- return new __HttpRequest({
463
- protocol,
464
- hostname,
465
- port,
466
- method: "GET",
467
- headers,
468
- path: resolvedPath,
469
- query,
470
- body,
471
- });
307
+ b.m("GET").h(headers).q(query).b(body);
308
+ return b.build();
472
309
  };
473
310
  export const se_GetFindingsReportStatusCommand = async (input, context) => {
474
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
311
+ const b = rb(input, context);
475
312
  const headers = {
476
313
  "content-type": "application/json",
477
314
  };
478
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reporting/status/get";
315
+ b.bp("/reporting/status/get");
479
316
  let body;
480
317
  body = JSON.stringify(take(input, {
481
318
  reportId: [],
482
319
  }));
483
- return new __HttpRequest({
484
- protocol,
485
- hostname,
486
- port,
487
- method: "POST",
488
- headers,
489
- path: resolvedPath,
490
- body,
491
- });
320
+ b.m("POST").h(headers).b(body);
321
+ return b.build();
492
322
  };
493
323
  export const se_GetMemberCommand = async (input, context) => {
494
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
324
+ const b = rb(input, context);
495
325
  const headers = {
496
326
  "content-type": "application/json",
497
327
  };
498
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/members/get";
328
+ b.bp("/members/get");
499
329
  let body;
500
330
  body = JSON.stringify(take(input, {
501
331
  accountId: [],
502
332
  }));
503
- return new __HttpRequest({
504
- protocol,
505
- hostname,
506
- port,
507
- method: "POST",
508
- headers,
509
- path: resolvedPath,
510
- body,
511
- });
333
+ b.m("POST").h(headers).b(body);
334
+ return b.build();
512
335
  };
513
336
  export const se_GetSbomExportCommand = async (input, context) => {
514
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
337
+ const b = rb(input, context);
515
338
  const headers = {
516
339
  "content-type": "application/json",
517
340
  };
518
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sbomexport/get";
341
+ b.bp("/sbomexport/get");
519
342
  let body;
520
343
  body = JSON.stringify(take(input, {
521
344
  reportId: [],
522
345
  }));
523
- return new __HttpRequest({
524
- protocol,
525
- hostname,
526
- port,
527
- method: "POST",
528
- headers,
529
- path: resolvedPath,
530
- body,
531
- });
346
+ b.m("POST").h(headers).b(body);
347
+ return b.build();
532
348
  };
533
349
  export const se_ListAccountPermissionsCommand = async (input, context) => {
534
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
350
+ const b = rb(input, context);
535
351
  const headers = {
536
352
  "content-type": "application/json",
537
353
  };
538
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accountpermissions/list";
354
+ b.bp("/accountpermissions/list");
539
355
  let body;
540
356
  body = JSON.stringify(take(input, {
541
357
  maxResults: [],
542
358
  nextToken: [],
543
359
  service: [],
544
360
  }));
545
- return new __HttpRequest({
546
- protocol,
547
- hostname,
548
- port,
549
- method: "POST",
550
- headers,
551
- path: resolvedPath,
552
- body,
553
- });
361
+ b.m("POST").h(headers).b(body);
362
+ return b.build();
554
363
  };
555
364
  export const se_ListCoverageCommand = async (input, context) => {
556
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
365
+ const b = rb(input, context);
557
366
  const headers = {
558
367
  "content-type": "application/json",
559
368
  };
560
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/coverage/list";
369
+ b.bp("/coverage/list");
561
370
  let body;
562
371
  body = JSON.stringify(take(input, {
563
372
  filterCriteria: (_) => se_CoverageFilterCriteria(_, context),
564
373
  maxResults: [],
565
374
  nextToken: [],
566
375
  }));
567
- return new __HttpRequest({
568
- protocol,
569
- hostname,
570
- port,
571
- method: "POST",
572
- headers,
573
- path: resolvedPath,
574
- body,
575
- });
376
+ b.m("POST").h(headers).b(body);
377
+ return b.build();
576
378
  };
577
379
  export const se_ListCoverageStatisticsCommand = async (input, context) => {
578
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
380
+ const b = rb(input, context);
579
381
  const headers = {
580
382
  "content-type": "application/json",
581
383
  };
582
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/coverage/statistics/list";
384
+ b.bp("/coverage/statistics/list");
583
385
  let body;
584
386
  body = JSON.stringify(take(input, {
585
387
  filterCriteria: (_) => se_CoverageFilterCriteria(_, context),
586
388
  groupBy: [],
587
389
  nextToken: [],
588
390
  }));
589
- return new __HttpRequest({
590
- protocol,
591
- hostname,
592
- port,
593
- method: "POST",
594
- headers,
595
- path: resolvedPath,
596
- body,
597
- });
391
+ b.m("POST").h(headers).b(body);
392
+ return b.build();
598
393
  };
599
394
  export const se_ListDelegatedAdminAccountsCommand = async (input, context) => {
600
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
395
+ const b = rb(input, context);
601
396
  const headers = {
602
397
  "content-type": "application/json",
603
398
  };
604
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delegatedadminaccounts/list";
399
+ b.bp("/delegatedadminaccounts/list");
605
400
  let body;
606
401
  body = JSON.stringify(take(input, {
607
402
  maxResults: [],
608
403
  nextToken: [],
609
404
  }));
610
- return new __HttpRequest({
611
- protocol,
612
- hostname,
613
- port,
614
- method: "POST",
615
- headers,
616
- path: resolvedPath,
617
- body,
618
- });
405
+ b.m("POST").h(headers).b(body);
406
+ return b.build();
619
407
  };
620
408
  export const se_ListFiltersCommand = async (input, context) => {
621
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
409
+ const b = rb(input, context);
622
410
  const headers = {
623
411
  "content-type": "application/json",
624
412
  };
625
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/filters/list";
413
+ b.bp("/filters/list");
626
414
  let body;
627
415
  body = JSON.stringify(take(input, {
628
416
  action: [],
@@ -630,22 +418,15 @@ export const se_ListFiltersCommand = async (input, context) => {
630
418
  maxResults: [],
631
419
  nextToken: [],
632
420
  }));
633
- return new __HttpRequest({
634
- protocol,
635
- hostname,
636
- port,
637
- method: "POST",
638
- headers,
639
- path: resolvedPath,
640
- body,
641
- });
421
+ b.m("POST").h(headers).b(body);
422
+ return b.build();
642
423
  };
643
424
  export const se_ListFindingAggregationsCommand = async (input, context) => {
644
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
425
+ const b = rb(input, context);
645
426
  const headers = {
646
427
  "content-type": "application/json",
647
428
  };
648
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/findings/aggregation/list";
429
+ b.bp("/findings/aggregation/list");
649
430
  let body;
650
431
  body = JSON.stringify(take(input, {
651
432
  accountIds: (_) => _json(_),
@@ -654,22 +435,15 @@ export const se_ListFindingAggregationsCommand = async (input, context) => {
654
435
  maxResults: [],
655
436
  nextToken: [],
656
437
  }));
657
- return new __HttpRequest({
658
- protocol,
659
- hostname,
660
- port,
661
- method: "POST",
662
- headers,
663
- path: resolvedPath,
664
- body,
665
- });
438
+ b.m("POST").h(headers).b(body);
439
+ return b.build();
666
440
  };
667
441
  export const se_ListFindingsCommand = async (input, context) => {
668
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
442
+ const b = rb(input, context);
669
443
  const headers = {
670
444
  "content-type": "application/json",
671
445
  };
672
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/findings/list";
446
+ b.bp("/findings/list");
673
447
  let body;
674
448
  body = JSON.stringify(take(input, {
675
449
  filterCriteria: (_) => se_FilterCriteria(_, context),
@@ -677,231 +451,153 @@ export const se_ListFindingsCommand = async (input, context) => {
677
451
  nextToken: [],
678
452
  sortCriteria: (_) => _json(_),
679
453
  }));
680
- return new __HttpRequest({
681
- protocol,
682
- hostname,
683
- port,
684
- method: "POST",
685
- headers,
686
- path: resolvedPath,
687
- body,
688
- });
454
+ b.m("POST").h(headers).b(body);
455
+ return b.build();
689
456
  };
690
457
  export const se_ListMembersCommand = async (input, context) => {
691
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
458
+ const b = rb(input, context);
692
459
  const headers = {
693
460
  "content-type": "application/json",
694
461
  };
695
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/members/list";
462
+ b.bp("/members/list");
696
463
  let body;
697
464
  body = JSON.stringify(take(input, {
698
465
  maxResults: [],
699
466
  nextToken: [],
700
467
  onlyAssociated: [],
701
468
  }));
702
- return new __HttpRequest({
703
- protocol,
704
- hostname,
705
- port,
706
- method: "POST",
707
- headers,
708
- path: resolvedPath,
709
- body,
710
- });
469
+ b.m("POST").h(headers).b(body);
470
+ return b.build();
711
471
  };
712
472
  export const se_ListTagsForResourceCommand = async (input, context) => {
713
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
473
+ const b = rb(input, context);
714
474
  const headers = {};
715
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
716
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
475
+ b.bp("/tags/{resourceArn}");
476
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
717
477
  let body;
718
- return new __HttpRequest({
719
- protocol,
720
- hostname,
721
- port,
722
- method: "GET",
723
- headers,
724
- path: resolvedPath,
725
- body,
726
- });
478
+ b.m("GET").h(headers).b(body);
479
+ return b.build();
727
480
  };
728
481
  export const se_ListUsageTotalsCommand = async (input, context) => {
729
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
482
+ const b = rb(input, context);
730
483
  const headers = {
731
484
  "content-type": "application/json",
732
485
  };
733
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/usage/list";
486
+ b.bp("/usage/list");
734
487
  let body;
735
488
  body = JSON.stringify(take(input, {
736
489
  accountIds: (_) => _json(_),
737
490
  maxResults: [],
738
491
  nextToken: [],
739
492
  }));
740
- return new __HttpRequest({
741
- protocol,
742
- hostname,
743
- port,
744
- method: "POST",
745
- headers,
746
- path: resolvedPath,
747
- body,
748
- });
493
+ b.m("POST").h(headers).b(body);
494
+ return b.build();
749
495
  };
750
496
  export const se_ResetEncryptionKeyCommand = async (input, context) => {
751
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
497
+ const b = rb(input, context);
752
498
  const headers = {
753
499
  "content-type": "application/json",
754
500
  };
755
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/encryptionkey/reset";
501
+ b.bp("/encryptionkey/reset");
756
502
  let body;
757
503
  body = JSON.stringify(take(input, {
758
504
  resourceType: [],
759
505
  scanType: [],
760
506
  }));
761
- return new __HttpRequest({
762
- protocol,
763
- hostname,
764
- port,
765
- method: "PUT",
766
- headers,
767
- path: resolvedPath,
768
- body,
769
- });
507
+ b.m("PUT").h(headers).b(body);
508
+ return b.build();
770
509
  };
771
510
  export const se_SearchVulnerabilitiesCommand = async (input, context) => {
772
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
511
+ const b = rb(input, context);
773
512
  const headers = {
774
513
  "content-type": "application/json",
775
514
  };
776
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/vulnerabilities/search";
515
+ b.bp("/vulnerabilities/search");
777
516
  let body;
778
517
  body = JSON.stringify(take(input, {
779
518
  filterCriteria: (_) => _json(_),
780
519
  nextToken: [],
781
520
  }));
782
- return new __HttpRequest({
783
- protocol,
784
- hostname,
785
- port,
786
- method: "POST",
787
- headers,
788
- path: resolvedPath,
789
- body,
790
- });
521
+ b.m("POST").h(headers).b(body);
522
+ return b.build();
791
523
  };
792
524
  export const se_TagResourceCommand = async (input, context) => {
793
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
525
+ const b = rb(input, context);
794
526
  const headers = {
795
527
  "content-type": "application/json",
796
528
  };
797
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
798
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
529
+ b.bp("/tags/{resourceArn}");
530
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
799
531
  let body;
800
532
  body = JSON.stringify(take(input, {
801
533
  tags: (_) => _json(_),
802
534
  }));
803
- return new __HttpRequest({
804
- protocol,
805
- hostname,
806
- port,
807
- method: "POST",
808
- headers,
809
- path: resolvedPath,
810
- body,
811
- });
535
+ b.m("POST").h(headers).b(body);
536
+ return b.build();
812
537
  };
813
538
  export const se_UntagResourceCommand = async (input, context) => {
814
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
539
+ const b = rb(input, context);
815
540
  const headers = {};
816
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
817
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
541
+ b.bp("/tags/{resourceArn}");
542
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
818
543
  const query = map({
819
- tagKeys: [
544
+ [_tK]: [
820
545
  __expectNonNull(input.tagKeys, `tagKeys`) != null,
821
- () => (input.tagKeys || []).map((_entry) => _entry),
546
+ () => (input[_tK] || []).map((_entry) => _entry),
822
547
  ],
823
548
  });
824
549
  let body;
825
- return new __HttpRequest({
826
- protocol,
827
- hostname,
828
- port,
829
- method: "DELETE",
830
- headers,
831
- path: resolvedPath,
832
- query,
833
- body,
834
- });
550
+ b.m("DELETE").h(headers).q(query).b(body);
551
+ return b.build();
835
552
  };
836
553
  export const se_UpdateConfigurationCommand = async (input, context) => {
837
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
554
+ const b = rb(input, context);
838
555
  const headers = {
839
556
  "content-type": "application/json",
840
557
  };
841
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/configuration/update";
558
+ b.bp("/configuration/update");
842
559
  let body;
843
560
  body = JSON.stringify(take(input, {
844
561
  ecrConfiguration: (_) => _json(_),
845
562
  }));
846
- return new __HttpRequest({
847
- protocol,
848
- hostname,
849
- port,
850
- method: "POST",
851
- headers,
852
- path: resolvedPath,
853
- body,
854
- });
563
+ b.m("POST").h(headers).b(body);
564
+ return b.build();
855
565
  };
856
566
  export const se_UpdateEc2DeepInspectionConfigurationCommand = async (input, context) => {
857
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
567
+ const b = rb(input, context);
858
568
  const headers = {
859
569
  "content-type": "application/json",
860
570
  };
861
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ec2deepinspectionconfiguration/update";
571
+ b.bp("/ec2deepinspectionconfiguration/update");
862
572
  let body;
863
573
  body = JSON.stringify(take(input, {
864
574
  activateDeepInspection: [],
865
575
  packagePaths: (_) => _json(_),
866
576
  }));
867
- return new __HttpRequest({
868
- protocol,
869
- hostname,
870
- port,
871
- method: "POST",
872
- headers,
873
- path: resolvedPath,
874
- body,
875
- });
577
+ b.m("POST").h(headers).b(body);
578
+ return b.build();
876
579
  };
877
580
  export const se_UpdateEncryptionKeyCommand = async (input, context) => {
878
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
581
+ const b = rb(input, context);
879
582
  const headers = {
880
583
  "content-type": "application/json",
881
584
  };
882
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/encryptionkey/update";
585
+ b.bp("/encryptionkey/update");
883
586
  let body;
884
587
  body = JSON.stringify(take(input, {
885
588
  kmsKeyId: [],
886
589
  resourceType: [],
887
590
  scanType: [],
888
591
  }));
889
- return new __HttpRequest({
890
- protocol,
891
- hostname,
892
- port,
893
- method: "PUT",
894
- headers,
895
- path: resolvedPath,
896
- body,
897
- });
592
+ b.m("PUT").h(headers).b(body);
593
+ return b.build();
898
594
  };
899
595
  export const se_UpdateFilterCommand = async (input, context) => {
900
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
596
+ const b = rb(input, context);
901
597
  const headers = {
902
598
  "content-type": "application/json",
903
599
  };
904
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/filters/update";
600
+ b.bp("/filters/update");
905
601
  let body;
906
602
  body = JSON.stringify(take(input, {
907
603
  action: [],
@@ -911,56 +607,34 @@ export const se_UpdateFilterCommand = async (input, context) => {
911
607
  name: [],
912
608
  reason: [],
913
609
  }));
914
- return new __HttpRequest({
915
- protocol,
916
- hostname,
917
- port,
918
- method: "POST",
919
- headers,
920
- path: resolvedPath,
921
- body,
922
- });
610
+ b.m("POST").h(headers).b(body);
611
+ return b.build();
923
612
  };
924
613
  export const se_UpdateOrganizationConfigurationCommand = async (input, context) => {
925
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
614
+ const b = rb(input, context);
926
615
  const headers = {
927
616
  "content-type": "application/json",
928
617
  };
929
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organizationconfiguration/update";
618
+ b.bp("/organizationconfiguration/update");
930
619
  let body;
931
620
  body = JSON.stringify(take(input, {
932
621
  autoEnable: (_) => _json(_),
933
622
  }));
934
- return new __HttpRequest({
935
- protocol,
936
- hostname,
937
- port,
938
- method: "POST",
939
- headers,
940
- path: resolvedPath,
941
- body,
942
- });
623
+ b.m("POST").h(headers).b(body);
624
+ return b.build();
943
625
  };
944
626
  export const se_UpdateOrgEc2DeepInspectionConfigurationCommand = async (input, context) => {
945
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
627
+ const b = rb(input, context);
946
628
  const headers = {
947
629
  "content-type": "application/json",
948
630
  };
949
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
950
- "/ec2deepinspectionconfiguration/org/update";
631
+ b.bp("/ec2deepinspectionconfiguration/org/update");
951
632
  let body;
952
633
  body = JSON.stringify(take(input, {
953
634
  orgPackagePaths: (_) => _json(_),
954
635
  }));
955
- return new __HttpRequest({
956
- protocol,
957
- hostname,
958
- port,
959
- method: "POST",
960
- headers,
961
- path: resolvedPath,
962
- body,
963
- });
636
+ b.m("POST").h(headers).b(body);
637
+ return b.build();
964
638
  };
965
639
  export const de_AssociateMemberCommand = async (output, context) => {
966
640
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -3006,10 +2680,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
3006
2680
  };
3007
2681
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
3008
2682
  const contents = map({
3009
- retryAfterSeconds: [
3010
- () => void 0 !== parsedOutput.headers["retry-after"],
3011
- () => __strictParseInt32(parsedOutput.headers["retry-after"]),
3012
- ],
2683
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
3013
2684
  });
3014
2685
  const data = parsedOutput.body;
3015
2686
  const doc = take(data, {
@@ -3051,10 +2722,7 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
3051
2722
  };
3052
2723
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
3053
2724
  const contents = map({
3054
- retryAfterSeconds: [
3055
- () => void 0 !== parsedOutput.headers["retry-after"],
3056
- () => __strictParseInt32(parsedOutput.headers["retry-after"]),
3057
- ],
2725
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
3058
2726
  });
3059
2727
  const data = parsedOutput.body;
3060
2728
  const doc = take(data, {
@@ -3755,6 +3423,11 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
3755
3423
  value !== "" &&
3756
3424
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
3757
3425
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
3426
+ const _rAS = "retryAfterSeconds";
3427
+ const _rT = "resourceType";
3428
+ const _ra = "retry-after";
3429
+ const _sT = "scanType";
3430
+ const _tK = "tagKeys";
3758
3431
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
3759
3432
  if (encoded.length) {
3760
3433
  return JSON.parse(encoded);