@aws-sdk/client-ssm-incidents 3.474.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,58 +1,44 @@
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, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, 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, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
4
4
  import { v4 as generateIdempotencyToken } from "uuid";
5
5
  import { AccessDeniedException, Condition, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
6
  import { SSMIncidentsServiceException as __BaseException } from "../models/SSMIncidentsServiceException";
7
7
  export const se_BatchGetIncidentFindingsCommand = 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 || ""}` + "/batchGetIncidentFindings";
12
+ b.bp("/batchGetIncidentFindings");
13
13
  let body;
14
14
  body = JSON.stringify(take(input, {
15
15
  findingIds: (_) => _json(_),
16
16
  incidentRecordArn: [],
17
17
  }));
18
- return new __HttpRequest({
19
- protocol,
20
- hostname,
21
- port,
22
- method: "POST",
23
- headers,
24
- path: resolvedPath,
25
- body,
26
- });
18
+ b.m("POST").h(headers).b(body);
19
+ return b.build();
27
20
  };
28
21
  export const se_CreateReplicationSetCommand = async (input, context) => {
29
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
22
+ const b = rb(input, context);
30
23
  const headers = {
31
24
  "content-type": "application/json",
32
25
  };
33
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createReplicationSet";
26
+ b.bp("/createReplicationSet");
34
27
  let body;
35
28
  body = JSON.stringify(take(input, {
36
29
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
37
30
  regions: (_) => _json(_),
38
31
  tags: (_) => _json(_),
39
32
  }));
40
- return new __HttpRequest({
41
- protocol,
42
- hostname,
43
- port,
44
- method: "POST",
45
- headers,
46
- path: resolvedPath,
47
- body,
48
- });
33
+ b.m("POST").h(headers).b(body);
34
+ return b.build();
49
35
  };
50
36
  export const se_CreateResponsePlanCommand = async (input, context) => {
51
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
37
+ const b = rb(input, context);
52
38
  const headers = {
53
39
  "content-type": "application/json",
54
40
  };
55
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createResponsePlan";
41
+ b.bp("/createResponsePlan");
56
42
  let body;
57
43
  body = JSON.stringify(take(input, {
58
44
  actions: (_) => _json(_),
@@ -65,22 +51,15 @@ export const se_CreateResponsePlanCommand = async (input, context) => {
65
51
  name: [],
66
52
  tags: (_) => _json(_),
67
53
  }));
68
- return new __HttpRequest({
69
- protocol,
70
- hostname,
71
- port,
72
- method: "POST",
73
- headers,
74
- path: resolvedPath,
75
- body,
76
- });
54
+ b.m("POST").h(headers).b(body);
55
+ return b.build();
77
56
  };
78
57
  export const se_CreateTimelineEventCommand = async (input, context) => {
79
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
58
+ const b = rb(input, context);
80
59
  const headers = {
81
60
  "content-type": "application/json",
82
61
  };
83
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createTimelineEvent";
62
+ b.bp("/createTimelineEvent");
84
63
  let body;
85
64
  body = JSON.stringify(take(input, {
86
65
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -90,349 +69,224 @@ export const se_CreateTimelineEventCommand = async (input, context) => {
90
69
  eventType: [],
91
70
  incidentRecordArn: [],
92
71
  }));
93
- return new __HttpRequest({
94
- protocol,
95
- hostname,
96
- port,
97
- method: "POST",
98
- headers,
99
- path: resolvedPath,
100
- body,
101
- });
72
+ b.m("POST").h(headers).b(body);
73
+ return b.build();
102
74
  };
103
75
  export const se_DeleteIncidentRecordCommand = async (input, context) => {
104
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
76
+ const b = rb(input, context);
105
77
  const headers = {
106
78
  "content-type": "application/json",
107
79
  };
108
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteIncidentRecord";
80
+ b.bp("/deleteIncidentRecord");
109
81
  let body;
110
82
  body = JSON.stringify(take(input, {
111
83
  arn: [],
112
84
  }));
113
- return new __HttpRequest({
114
- protocol,
115
- hostname,
116
- port,
117
- method: "POST",
118
- headers,
119
- path: resolvedPath,
120
- body,
121
- });
85
+ b.m("POST").h(headers).b(body);
86
+ return b.build();
122
87
  };
123
88
  export const se_DeleteReplicationSetCommand = async (input, context) => {
124
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
89
+ const b = rb(input, context);
125
90
  const headers = {};
126
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteReplicationSet";
91
+ b.bp("/deleteReplicationSet");
127
92
  const query = map({
128
- arn: [, __expectNonNull(input.arn, `arn`)],
93
+ [_a]: [, __expectNonNull(input[_a], `arn`)],
129
94
  });
130
95
  let body;
131
- return new __HttpRequest({
132
- protocol,
133
- hostname,
134
- port,
135
- method: "POST",
136
- headers,
137
- path: resolvedPath,
138
- query,
139
- body,
140
- });
96
+ b.m("POST").h(headers).q(query).b(body);
97
+ return b.build();
141
98
  };
142
99
  export const se_DeleteResourcePolicyCommand = async (input, context) => {
143
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
100
+ const b = rb(input, context);
144
101
  const headers = {
145
102
  "content-type": "application/json",
146
103
  };
147
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteResourcePolicy";
104
+ b.bp("/deleteResourcePolicy");
148
105
  let body;
149
106
  body = JSON.stringify(take(input, {
150
107
  policyId: [],
151
108
  resourceArn: [],
152
109
  }));
153
- return new __HttpRequest({
154
- protocol,
155
- hostname,
156
- port,
157
- method: "POST",
158
- headers,
159
- path: resolvedPath,
160
- body,
161
- });
110
+ b.m("POST").h(headers).b(body);
111
+ return b.build();
162
112
  };
163
113
  export const se_DeleteResponsePlanCommand = async (input, context) => {
164
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
114
+ const b = rb(input, context);
165
115
  const headers = {
166
116
  "content-type": "application/json",
167
117
  };
168
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteResponsePlan";
118
+ b.bp("/deleteResponsePlan");
169
119
  let body;
170
120
  body = JSON.stringify(take(input, {
171
121
  arn: [],
172
122
  }));
173
- return new __HttpRequest({
174
- protocol,
175
- hostname,
176
- port,
177
- method: "POST",
178
- headers,
179
- path: resolvedPath,
180
- body,
181
- });
123
+ b.m("POST").h(headers).b(body);
124
+ return b.build();
182
125
  };
183
126
  export const se_DeleteTimelineEventCommand = async (input, context) => {
184
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
127
+ const b = rb(input, context);
185
128
  const headers = {
186
129
  "content-type": "application/json",
187
130
  };
188
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteTimelineEvent";
131
+ b.bp("/deleteTimelineEvent");
189
132
  let body;
190
133
  body = JSON.stringify(take(input, {
191
134
  eventId: [],
192
135
  incidentRecordArn: [],
193
136
  }));
194
- return new __HttpRequest({
195
- protocol,
196
- hostname,
197
- port,
198
- method: "POST",
199
- headers,
200
- path: resolvedPath,
201
- body,
202
- });
137
+ b.m("POST").h(headers).b(body);
138
+ return b.build();
203
139
  };
204
140
  export const se_GetIncidentRecordCommand = async (input, context) => {
205
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
141
+ const b = rb(input, context);
206
142
  const headers = {};
207
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getIncidentRecord";
143
+ b.bp("/getIncidentRecord");
208
144
  const query = map({
209
- arn: [, __expectNonNull(input.arn, `arn`)],
145
+ [_a]: [, __expectNonNull(input[_a], `arn`)],
210
146
  });
211
147
  let body;
212
- return new __HttpRequest({
213
- protocol,
214
- hostname,
215
- port,
216
- method: "GET",
217
- headers,
218
- path: resolvedPath,
219
- query,
220
- body,
221
- });
148
+ b.m("GET").h(headers).q(query).b(body);
149
+ return b.build();
222
150
  };
223
151
  export const se_GetReplicationSetCommand = async (input, context) => {
224
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
152
+ const b = rb(input, context);
225
153
  const headers = {};
226
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getReplicationSet";
154
+ b.bp("/getReplicationSet");
227
155
  const query = map({
228
- arn: [, __expectNonNull(input.arn, `arn`)],
156
+ [_a]: [, __expectNonNull(input[_a], `arn`)],
229
157
  });
230
158
  let body;
231
- return new __HttpRequest({
232
- protocol,
233
- hostname,
234
- port,
235
- method: "GET",
236
- headers,
237
- path: resolvedPath,
238
- query,
239
- body,
240
- });
159
+ b.m("GET").h(headers).q(query).b(body);
160
+ return b.build();
241
161
  };
242
162
  export const se_GetResourcePoliciesCommand = async (input, context) => {
243
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
163
+ const b = rb(input, context);
244
164
  const headers = {
245
165
  "content-type": "application/json",
246
166
  };
247
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getResourcePolicies";
167
+ b.bp("/getResourcePolicies");
248
168
  const query = map({
249
- resourceArn: [, __expectNonNull(input.resourceArn, `resourceArn`)],
169
+ [_rA]: [, __expectNonNull(input[_rA], `resourceArn`)],
250
170
  });
251
171
  let body;
252
172
  body = JSON.stringify(take(input, {
253
173
  maxResults: [],
254
174
  nextToken: [],
255
175
  }));
256
- return new __HttpRequest({
257
- protocol,
258
- hostname,
259
- port,
260
- method: "POST",
261
- headers,
262
- path: resolvedPath,
263
- query,
264
- body,
265
- });
176
+ b.m("POST").h(headers).q(query).b(body);
177
+ return b.build();
266
178
  };
267
179
  export const se_GetResponsePlanCommand = async (input, context) => {
268
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
180
+ const b = rb(input, context);
269
181
  const headers = {};
270
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getResponsePlan";
182
+ b.bp("/getResponsePlan");
271
183
  const query = map({
272
- arn: [, __expectNonNull(input.arn, `arn`)],
184
+ [_a]: [, __expectNonNull(input[_a], `arn`)],
273
185
  });
274
186
  let body;
275
- return new __HttpRequest({
276
- protocol,
277
- hostname,
278
- port,
279
- method: "GET",
280
- headers,
281
- path: resolvedPath,
282
- query,
283
- body,
284
- });
187
+ b.m("GET").h(headers).q(query).b(body);
188
+ return b.build();
285
189
  };
286
190
  export const se_GetTimelineEventCommand = async (input, context) => {
287
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
191
+ const b = rb(input, context);
288
192
  const headers = {};
289
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getTimelineEvent";
193
+ b.bp("/getTimelineEvent");
290
194
  const query = map({
291
- incidentRecordArn: [, __expectNonNull(input.incidentRecordArn, `incidentRecordArn`)],
292
- eventId: [, __expectNonNull(input.eventId, `eventId`)],
195
+ [_iRA]: [, __expectNonNull(input[_iRA], `incidentRecordArn`)],
196
+ [_eI]: [, __expectNonNull(input[_eI], `eventId`)],
293
197
  });
294
198
  let body;
295
- return new __HttpRequest({
296
- protocol,
297
- hostname,
298
- port,
299
- method: "GET",
300
- headers,
301
- path: resolvedPath,
302
- query,
303
- body,
304
- });
199
+ b.m("GET").h(headers).q(query).b(body);
200
+ return b.build();
305
201
  };
306
202
  export const se_ListIncidentFindingsCommand = async (input, context) => {
307
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
203
+ const b = rb(input, context);
308
204
  const headers = {
309
205
  "content-type": "application/json",
310
206
  };
311
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listIncidentFindings";
207
+ b.bp("/listIncidentFindings");
312
208
  let body;
313
209
  body = JSON.stringify(take(input, {
314
210
  incidentRecordArn: [],
315
211
  maxResults: [],
316
212
  nextToken: [],
317
213
  }));
318
- return new __HttpRequest({
319
- protocol,
320
- hostname,
321
- port,
322
- method: "POST",
323
- headers,
324
- path: resolvedPath,
325
- body,
326
- });
214
+ b.m("POST").h(headers).b(body);
215
+ return b.build();
327
216
  };
328
217
  export const se_ListIncidentRecordsCommand = async (input, context) => {
329
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
218
+ const b = rb(input, context);
330
219
  const headers = {
331
220
  "content-type": "application/json",
332
221
  };
333
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listIncidentRecords";
222
+ b.bp("/listIncidentRecords");
334
223
  let body;
335
224
  body = JSON.stringify(take(input, {
336
225
  filters: (_) => se_FilterList(_, context),
337
226
  maxResults: [],
338
227
  nextToken: [],
339
228
  }));
340
- return new __HttpRequest({
341
- protocol,
342
- hostname,
343
- port,
344
- method: "POST",
345
- headers,
346
- path: resolvedPath,
347
- body,
348
- });
229
+ b.m("POST").h(headers).b(body);
230
+ return b.build();
349
231
  };
350
232
  export const se_ListRelatedItemsCommand = async (input, context) => {
351
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
233
+ const b = rb(input, context);
352
234
  const headers = {
353
235
  "content-type": "application/json",
354
236
  };
355
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listRelatedItems";
237
+ b.bp("/listRelatedItems");
356
238
  let body;
357
239
  body = JSON.stringify(take(input, {
358
240
  incidentRecordArn: [],
359
241
  maxResults: [],
360
242
  nextToken: [],
361
243
  }));
362
- return new __HttpRequest({
363
- protocol,
364
- hostname,
365
- port,
366
- method: "POST",
367
- headers,
368
- path: resolvedPath,
369
- body,
370
- });
244
+ b.m("POST").h(headers).b(body);
245
+ return b.build();
371
246
  };
372
247
  export const se_ListReplicationSetsCommand = async (input, context) => {
373
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
248
+ const b = rb(input, context);
374
249
  const headers = {
375
250
  "content-type": "application/json",
376
251
  };
377
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listReplicationSets";
252
+ b.bp("/listReplicationSets");
378
253
  let body;
379
254
  body = JSON.stringify(take(input, {
380
255
  maxResults: [],
381
256
  nextToken: [],
382
257
  }));
383
- return new __HttpRequest({
384
- protocol,
385
- hostname,
386
- port,
387
- method: "POST",
388
- headers,
389
- path: resolvedPath,
390
- body,
391
- });
258
+ b.m("POST").h(headers).b(body);
259
+ return b.build();
392
260
  };
393
261
  export const se_ListResponsePlansCommand = async (input, context) => {
394
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
262
+ const b = rb(input, context);
395
263
  const headers = {
396
264
  "content-type": "application/json",
397
265
  };
398
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listResponsePlans";
266
+ b.bp("/listResponsePlans");
399
267
  let body;
400
268
  body = JSON.stringify(take(input, {
401
269
  maxResults: [],
402
270
  nextToken: [],
403
271
  }));
404
- return new __HttpRequest({
405
- protocol,
406
- hostname,
407
- port,
408
- method: "POST",
409
- headers,
410
- path: resolvedPath,
411
- body,
412
- });
272
+ b.m("POST").h(headers).b(body);
273
+ return b.build();
413
274
  };
414
275
  export const se_ListTagsForResourceCommand = async (input, context) => {
415
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
276
+ const b = rb(input, context);
416
277
  const headers = {};
417
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
418
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
278
+ b.bp("/tags/{resourceArn}");
279
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
419
280
  let body;
420
- return new __HttpRequest({
421
- protocol,
422
- hostname,
423
- port,
424
- method: "GET",
425
- headers,
426
- path: resolvedPath,
427
- body,
428
- });
281
+ b.m("GET").h(headers).b(body);
282
+ return b.build();
429
283
  };
430
284
  export const se_ListTimelineEventsCommand = async (input, context) => {
431
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
285
+ const b = rb(input, context);
432
286
  const headers = {
433
287
  "content-type": "application/json",
434
288
  };
435
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listTimelineEvents";
289
+ b.bp("/listTimelineEvents");
436
290
  let body;
437
291
  body = JSON.stringify(take(input, {
438
292
  filters: (_) => se_FilterList(_, context),
@@ -442,43 +296,29 @@ export const se_ListTimelineEventsCommand = async (input, context) => {
442
296
  sortBy: [],
443
297
  sortOrder: [],
444
298
  }));
445
- return new __HttpRequest({
446
- protocol,
447
- hostname,
448
- port,
449
- method: "POST",
450
- headers,
451
- path: resolvedPath,
452
- body,
453
- });
299
+ b.m("POST").h(headers).b(body);
300
+ return b.build();
454
301
  };
455
302
  export const se_PutResourcePolicyCommand = async (input, context) => {
456
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
303
+ const b = rb(input, context);
457
304
  const headers = {
458
305
  "content-type": "application/json",
459
306
  };
460
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/putResourcePolicy";
307
+ b.bp("/putResourcePolicy");
461
308
  let body;
462
309
  body = JSON.stringify(take(input, {
463
310
  policy: [],
464
311
  resourceArn: [],
465
312
  }));
466
- return new __HttpRequest({
467
- protocol,
468
- hostname,
469
- port,
470
- method: "POST",
471
- headers,
472
- path: resolvedPath,
473
- body,
474
- });
313
+ b.m("POST").h(headers).b(body);
314
+ return b.build();
475
315
  };
476
316
  export const se_StartIncidentCommand = async (input, context) => {
477
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
317
+ const b = rb(input, context);
478
318
  const headers = {
479
319
  "content-type": "application/json",
480
320
  };
481
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/startIncident";
321
+ b.bp("/startIncident");
482
322
  let body;
483
323
  body = JSON.stringify(take(input, {
484
324
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -488,88 +328,59 @@ export const se_StartIncidentCommand = async (input, context) => {
488
328
  title: [],
489
329
  triggerDetails: (_) => se_TriggerDetails(_, context),
490
330
  }));
491
- return new __HttpRequest({
492
- protocol,
493
- hostname,
494
- port,
495
- method: "POST",
496
- headers,
497
- path: resolvedPath,
498
- body,
499
- });
331
+ b.m("POST").h(headers).b(body);
332
+ return b.build();
500
333
  };
501
334
  export const se_TagResourceCommand = async (input, context) => {
502
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
335
+ const b = rb(input, context);
503
336
  const headers = {
504
337
  "content-type": "application/json",
505
338
  };
506
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
507
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
339
+ b.bp("/tags/{resourceArn}");
340
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
508
341
  let body;
509
342
  body = JSON.stringify(take(input, {
510
343
  tags: (_) => _json(_),
511
344
  }));
512
- return new __HttpRequest({
513
- protocol,
514
- hostname,
515
- port,
516
- method: "POST",
517
- headers,
518
- path: resolvedPath,
519
- body,
520
- });
345
+ b.m("POST").h(headers).b(body);
346
+ return b.build();
521
347
  };
522
348
  export const se_UntagResourceCommand = async (input, context) => {
523
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
349
+ const b = rb(input, context);
524
350
  const headers = {};
525
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
526
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
351
+ b.bp("/tags/{resourceArn}");
352
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
527
353
  const query = map({
528
- tagKeys: [
354
+ [_tK]: [
529
355
  __expectNonNull(input.tagKeys, `tagKeys`) != null,
530
- () => (input.tagKeys || []).map((_entry) => _entry),
356
+ () => (input[_tK] || []).map((_entry) => _entry),
531
357
  ],
532
358
  });
533
359
  let body;
534
- return new __HttpRequest({
535
- protocol,
536
- hostname,
537
- port,
538
- method: "DELETE",
539
- headers,
540
- path: resolvedPath,
541
- query,
542
- body,
543
- });
360
+ b.m("DELETE").h(headers).q(query).b(body);
361
+ return b.build();
544
362
  };
545
363
  export const se_UpdateDeletionProtectionCommand = async (input, context) => {
546
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
364
+ const b = rb(input, context);
547
365
  const headers = {
548
366
  "content-type": "application/json",
549
367
  };
550
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateDeletionProtection";
368
+ b.bp("/updateDeletionProtection");
551
369
  let body;
552
370
  body = JSON.stringify(take(input, {
553
371
  arn: [],
554
372
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
555
373
  deletionProtected: [],
556
374
  }));
557
- return new __HttpRequest({
558
- protocol,
559
- hostname,
560
- port,
561
- method: "POST",
562
- headers,
563
- path: resolvedPath,
564
- body,
565
- });
375
+ b.m("POST").h(headers).b(body);
376
+ return b.build();
566
377
  };
567
378
  export const se_UpdateIncidentRecordCommand = async (input, context) => {
568
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
379
+ const b = rb(input, context);
569
380
  const headers = {
570
381
  "content-type": "application/json",
571
382
  };
572
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateIncidentRecord";
383
+ b.bp("/updateIncidentRecord");
573
384
  let body;
574
385
  body = JSON.stringify(take(input, {
575
386
  arn: [],
@@ -581,66 +392,45 @@ export const se_UpdateIncidentRecordCommand = async (input, context) => {
581
392
  summary: [],
582
393
  title: [],
583
394
  }));
584
- return new __HttpRequest({
585
- protocol,
586
- hostname,
587
- port,
588
- method: "POST",
589
- headers,
590
- path: resolvedPath,
591
- body,
592
- });
395
+ b.m("POST").h(headers).b(body);
396
+ return b.build();
593
397
  };
594
398
  export const se_UpdateRelatedItemsCommand = async (input, context) => {
595
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
399
+ const b = rb(input, context);
596
400
  const headers = {
597
401
  "content-type": "application/json",
598
402
  };
599
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateRelatedItems";
403
+ b.bp("/updateRelatedItems");
600
404
  let body;
601
405
  body = JSON.stringify(take(input, {
602
406
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
603
407
  incidentRecordArn: [],
604
408
  relatedItemsUpdate: (_) => _json(_),
605
409
  }));
606
- return new __HttpRequest({
607
- protocol,
608
- hostname,
609
- port,
610
- method: "POST",
611
- headers,
612
- path: resolvedPath,
613
- body,
614
- });
410
+ b.m("POST").h(headers).b(body);
411
+ return b.build();
615
412
  };
616
413
  export const se_UpdateReplicationSetCommand = async (input, context) => {
617
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
414
+ const b = rb(input, context);
618
415
  const headers = {
619
416
  "content-type": "application/json",
620
417
  };
621
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateReplicationSet";
418
+ b.bp("/updateReplicationSet");
622
419
  let body;
623
420
  body = JSON.stringify(take(input, {
624
421
  actions: (_) => _json(_),
625
422
  arn: [],
626
423
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
627
424
  }));
628
- return new __HttpRequest({
629
- protocol,
630
- hostname,
631
- port,
632
- method: "POST",
633
- headers,
634
- path: resolvedPath,
635
- body,
636
- });
425
+ b.m("POST").h(headers).b(body);
426
+ return b.build();
637
427
  };
638
428
  export const se_UpdateResponsePlanCommand = async (input, context) => {
639
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
429
+ const b = rb(input, context);
640
430
  const headers = {
641
431
  "content-type": "application/json",
642
432
  };
643
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateResponsePlan";
433
+ b.bp("/updateResponsePlan");
644
434
  let body;
645
435
  body = JSON.stringify(take(input, {
646
436
  actions: (_) => _json(_),
@@ -657,22 +447,15 @@ export const se_UpdateResponsePlanCommand = async (input, context) => {
657
447
  incidentTemplateTitle: [],
658
448
  integrations: (_) => _json(_),
659
449
  }));
660
- return new __HttpRequest({
661
- protocol,
662
- hostname,
663
- port,
664
- method: "POST",
665
- headers,
666
- path: resolvedPath,
667
- body,
668
- });
450
+ b.m("POST").h(headers).b(body);
451
+ return b.build();
669
452
  };
670
453
  export const se_UpdateTimelineEventCommand = async (input, context) => {
671
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
454
+ const b = rb(input, context);
672
455
  const headers = {
673
456
  "content-type": "application/json",
674
457
  };
675
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateTimelineEvent";
458
+ b.bp("/updateTimelineEvent");
676
459
  let body;
677
460
  body = JSON.stringify(take(input, {
678
461
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -683,15 +466,8 @@ export const se_UpdateTimelineEventCommand = async (input, context) => {
683
466
  eventType: [],
684
467
  incidentRecordArn: [],
685
468
  }));
686
- return new __HttpRequest({
687
- protocol,
688
- hostname,
689
- port,
690
- method: "POST",
691
- headers,
692
- path: resolvedPath,
693
- body,
694
- });
469
+ b.m("POST").h(headers).b(body);
470
+ return b.build();
695
471
  };
696
472
  export const de_BatchGetIncidentFindingsCommand = async (output, context) => {
697
473
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2361,6 +2137,11 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
2361
2137
  value !== "" &&
2362
2138
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2363
2139
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2140
+ const _a = "arn";
2141
+ const _eI = "eventId";
2142
+ const _iRA = "incidentRecordArn";
2143
+ const _rA = "resourceArn";
2144
+ const _tK = "tagKeys";
2364
2145
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2365
2146
  if (encoded.length) {
2366
2147
  return JSON.parse(encoded);