@aws-sdk/client-route53-recovery-readiness 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,99 +1,71 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ThrottlingException, ValidationException, } from "../models/models_0";
4
4
  import { Route53RecoveryReadinessServiceException as __BaseException } from "../models/Route53RecoveryReadinessServiceException";
5
5
  export const se_CreateCellCommand = async (input, context) => {
6
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
6
+ const b = rb(input, context);
7
7
  const headers = {
8
8
  "content-type": "application/json",
9
9
  };
10
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cells";
10
+ b.bp("/cells");
11
11
  let body;
12
12
  body = JSON.stringify(take(input, {
13
13
  cellName: [, , `CellName`],
14
14
  cells: [, (_) => _json(_), `Cells`],
15
15
  tags: [, (_) => _json(_), `Tags`],
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_CreateCrossAccountAuthorizationCommand = 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 || ""}` + "/crossaccountauthorizations";
25
+ b.bp("/crossaccountauthorizations");
33
26
  let body;
34
27
  body = JSON.stringify(take(input, {
35
28
  crossAccountAuthorization: [, , `CrossAccountAuthorization`],
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_CreateReadinessCheckCommand = 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 || ""}` + "/readinesschecks";
38
+ b.bp("/readinesschecks");
53
39
  let body;
54
40
  body = JSON.stringify(take(input, {
55
41
  readinessCheckName: [, , `ReadinessCheckName`],
56
42
  resourceSetName: [, , `ResourceSetName`],
57
43
  tags: [, (_) => _json(_), `Tags`],
58
44
  }));
59
- return new __HttpRequest({
60
- protocol,
61
- hostname,
62
- port,
63
- method: "POST",
64
- headers,
65
- path: resolvedPath,
66
- body,
67
- });
45
+ b.m("POST").h(headers).b(body);
46
+ return b.build();
68
47
  };
69
48
  export const se_CreateRecoveryGroupCommand = async (input, context) => {
70
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
49
+ const b = rb(input, context);
71
50
  const headers = {
72
51
  "content-type": "application/json",
73
52
  };
74
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/recoverygroups";
53
+ b.bp("/recoverygroups");
75
54
  let body;
76
55
  body = JSON.stringify(take(input, {
77
56
  cells: [, (_) => _json(_), `Cells`],
78
57
  recoveryGroupName: [, , `RecoveryGroupName`],
79
58
  tags: [, (_) => _json(_), `Tags`],
80
59
  }));
81
- return new __HttpRequest({
82
- protocol,
83
- hostname,
84
- port,
85
- method: "POST",
86
- headers,
87
- path: resolvedPath,
88
- body,
89
- });
60
+ b.m("POST").h(headers).b(body);
61
+ return b.build();
90
62
  };
91
63
  export const se_CreateResourceSetCommand = async (input, context) => {
92
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
64
+ const b = rb(input, context);
93
65
  const headers = {
94
66
  "content-type": "application/json",
95
67
  };
96
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resourcesets";
68
+ b.bp("/resourcesets");
97
69
  let body;
98
70
  body = JSON.stringify(take(input, {
99
71
  resourceSetName: [, , `ResourceSetName`],
@@ -101,536 +73,323 @@ export const se_CreateResourceSetCommand = async (input, context) => {
101
73
  resources: [, (_) => se___listOfResource(_, context), `Resources`],
102
74
  tags: [, (_) => _json(_), `Tags`],
103
75
  }));
104
- return new __HttpRequest({
105
- protocol,
106
- hostname,
107
- port,
108
- method: "POST",
109
- headers,
110
- path: resolvedPath,
111
- body,
112
- });
76
+ b.m("POST").h(headers).b(body);
77
+ return b.build();
113
78
  };
114
79
  export const se_DeleteCellCommand = async (input, context) => {
115
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
80
+ const b = rb(input, context);
116
81
  const headers = {};
117
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cells/{CellName}";
118
- resolvedPath = __resolvedPath(resolvedPath, input, "CellName", () => input.CellName, "{CellName}", false);
82
+ b.bp("/cells/{CellName}");
83
+ b.p("CellName", () => input.CellName, "{CellName}", false);
119
84
  let body;
120
- return new __HttpRequest({
121
- protocol,
122
- hostname,
123
- port,
124
- method: "DELETE",
125
- headers,
126
- path: resolvedPath,
127
- body,
128
- });
85
+ b.m("DELETE").h(headers).b(body);
86
+ return b.build();
129
87
  };
130
88
  export const se_DeleteCrossAccountAuthorizationCommand = async (input, context) => {
131
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
89
+ const b = rb(input, context);
132
90
  const headers = {};
133
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
134
- "/crossaccountauthorizations/{CrossAccountAuthorization}";
135
- resolvedPath = __resolvedPath(resolvedPath, input, "CrossAccountAuthorization", () => input.CrossAccountAuthorization, "{CrossAccountAuthorization}", false);
91
+ b.bp("/crossaccountauthorizations/{CrossAccountAuthorization}");
92
+ b.p("CrossAccountAuthorization", () => input.CrossAccountAuthorization, "{CrossAccountAuthorization}", false);
136
93
  let body;
137
- return new __HttpRequest({
138
- protocol,
139
- hostname,
140
- port,
141
- method: "DELETE",
142
- headers,
143
- path: resolvedPath,
144
- body,
145
- });
94
+ b.m("DELETE").h(headers).b(body);
95
+ return b.build();
146
96
  };
147
97
  export const se_DeleteReadinessCheckCommand = async (input, context) => {
148
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
98
+ const b = rb(input, context);
149
99
  const headers = {};
150
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/readinesschecks/{ReadinessCheckName}";
151
- resolvedPath = __resolvedPath(resolvedPath, input, "ReadinessCheckName", () => input.ReadinessCheckName, "{ReadinessCheckName}", false);
100
+ b.bp("/readinesschecks/{ReadinessCheckName}");
101
+ b.p("ReadinessCheckName", () => input.ReadinessCheckName, "{ReadinessCheckName}", false);
152
102
  let body;
153
- return new __HttpRequest({
154
- protocol,
155
- hostname,
156
- port,
157
- method: "DELETE",
158
- headers,
159
- path: resolvedPath,
160
- body,
161
- });
103
+ b.m("DELETE").h(headers).b(body);
104
+ return b.build();
162
105
  };
163
106
  export const se_DeleteRecoveryGroupCommand = async (input, context) => {
164
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
107
+ const b = rb(input, context);
165
108
  const headers = {};
166
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/recoverygroups/{RecoveryGroupName}";
167
- resolvedPath = __resolvedPath(resolvedPath, input, "RecoveryGroupName", () => input.RecoveryGroupName, "{RecoveryGroupName}", false);
109
+ b.bp("/recoverygroups/{RecoveryGroupName}");
110
+ b.p("RecoveryGroupName", () => input.RecoveryGroupName, "{RecoveryGroupName}", false);
168
111
  let body;
169
- return new __HttpRequest({
170
- protocol,
171
- hostname,
172
- port,
173
- method: "DELETE",
174
- headers,
175
- path: resolvedPath,
176
- body,
177
- });
112
+ b.m("DELETE").h(headers).b(body);
113
+ return b.build();
178
114
  };
179
115
  export const se_DeleteResourceSetCommand = async (input, context) => {
180
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
116
+ const b = rb(input, context);
181
117
  const headers = {};
182
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resourcesets/{ResourceSetName}";
183
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceSetName", () => input.ResourceSetName, "{ResourceSetName}", false);
118
+ b.bp("/resourcesets/{ResourceSetName}");
119
+ b.p("ResourceSetName", () => input.ResourceSetName, "{ResourceSetName}", false);
184
120
  let body;
185
- return new __HttpRequest({
186
- protocol,
187
- hostname,
188
- port,
189
- method: "DELETE",
190
- headers,
191
- path: resolvedPath,
192
- body,
193
- });
121
+ b.m("DELETE").h(headers).b(body);
122
+ return b.build();
194
123
  };
195
124
  export const se_GetArchitectureRecommendationsCommand = async (input, context) => {
196
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
125
+ const b = rb(input, context);
197
126
  const headers = {};
198
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
199
- "/recoverygroups/{RecoveryGroupName}/architectureRecommendations";
200
- resolvedPath = __resolvedPath(resolvedPath, input, "RecoveryGroupName", () => input.RecoveryGroupName, "{RecoveryGroupName}", false);
127
+ b.bp("/recoverygroups/{RecoveryGroupName}/architectureRecommendations");
128
+ b.p("RecoveryGroupName", () => input.RecoveryGroupName, "{RecoveryGroupName}", false);
201
129
  const query = map({
202
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
203
- nextToken: [, input.NextToken],
130
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
131
+ [_nT]: [, input[_NT]],
204
132
  });
205
133
  let body;
206
- return new __HttpRequest({
207
- protocol,
208
- hostname,
209
- port,
210
- method: "GET",
211
- headers,
212
- path: resolvedPath,
213
- query,
214
- body,
215
- });
134
+ b.m("GET").h(headers).q(query).b(body);
135
+ return b.build();
216
136
  };
217
137
  export const se_GetCellCommand = async (input, context) => {
218
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
138
+ const b = rb(input, context);
219
139
  const headers = {};
220
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cells/{CellName}";
221
- resolvedPath = __resolvedPath(resolvedPath, input, "CellName", () => input.CellName, "{CellName}", false);
140
+ b.bp("/cells/{CellName}");
141
+ b.p("CellName", () => input.CellName, "{CellName}", false);
222
142
  let body;
223
- return new __HttpRequest({
224
- protocol,
225
- hostname,
226
- port,
227
- method: "GET",
228
- headers,
229
- path: resolvedPath,
230
- body,
231
- });
143
+ b.m("GET").h(headers).b(body);
144
+ return b.build();
232
145
  };
233
146
  export const se_GetCellReadinessSummaryCommand = async (input, context) => {
234
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
147
+ const b = rb(input, context);
235
148
  const headers = {};
236
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cellreadiness/{CellName}";
237
- resolvedPath = __resolvedPath(resolvedPath, input, "CellName", () => input.CellName, "{CellName}", false);
149
+ b.bp("/cellreadiness/{CellName}");
150
+ b.p("CellName", () => input.CellName, "{CellName}", false);
238
151
  const query = map({
239
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
240
- nextToken: [, input.NextToken],
152
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
153
+ [_nT]: [, input[_NT]],
241
154
  });
242
155
  let body;
243
- return new __HttpRequest({
244
- protocol,
245
- hostname,
246
- port,
247
- method: "GET",
248
- headers,
249
- path: resolvedPath,
250
- query,
251
- body,
252
- });
156
+ b.m("GET").h(headers).q(query).b(body);
157
+ return b.build();
253
158
  };
254
159
  export const se_GetReadinessCheckCommand = async (input, context) => {
255
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
160
+ const b = rb(input, context);
256
161
  const headers = {};
257
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/readinesschecks/{ReadinessCheckName}";
258
- resolvedPath = __resolvedPath(resolvedPath, input, "ReadinessCheckName", () => input.ReadinessCheckName, "{ReadinessCheckName}", false);
162
+ b.bp("/readinesschecks/{ReadinessCheckName}");
163
+ b.p("ReadinessCheckName", () => input.ReadinessCheckName, "{ReadinessCheckName}", false);
259
164
  let body;
260
- return new __HttpRequest({
261
- protocol,
262
- hostname,
263
- port,
264
- method: "GET",
265
- headers,
266
- path: resolvedPath,
267
- body,
268
- });
165
+ b.m("GET").h(headers).b(body);
166
+ return b.build();
269
167
  };
270
168
  export const se_GetReadinessCheckResourceStatusCommand = async (input, context) => {
271
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
169
+ const b = rb(input, context);
272
170
  const headers = {};
273
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
274
- "/readinesschecks/{ReadinessCheckName}/resource/{ResourceIdentifier}/status";
275
- resolvedPath = __resolvedPath(resolvedPath, input, "ReadinessCheckName", () => input.ReadinessCheckName, "{ReadinessCheckName}", false);
276
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceIdentifier", () => input.ResourceIdentifier, "{ResourceIdentifier}", false);
171
+ b.bp("/readinesschecks/{ReadinessCheckName}/resource/{ResourceIdentifier}/status");
172
+ b.p("ReadinessCheckName", () => input.ReadinessCheckName, "{ReadinessCheckName}", false);
173
+ b.p("ResourceIdentifier", () => input.ResourceIdentifier, "{ResourceIdentifier}", false);
277
174
  const query = map({
278
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
279
- nextToken: [, input.NextToken],
175
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
176
+ [_nT]: [, input[_NT]],
280
177
  });
281
178
  let body;
282
- return new __HttpRequest({
283
- protocol,
284
- hostname,
285
- port,
286
- method: "GET",
287
- headers,
288
- path: resolvedPath,
289
- query,
290
- body,
291
- });
179
+ b.m("GET").h(headers).q(query).b(body);
180
+ return b.build();
292
181
  };
293
182
  export const se_GetReadinessCheckStatusCommand = async (input, context) => {
294
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
183
+ const b = rb(input, context);
295
184
  const headers = {};
296
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
297
- "/readinesschecks/{ReadinessCheckName}/status";
298
- resolvedPath = __resolvedPath(resolvedPath, input, "ReadinessCheckName", () => input.ReadinessCheckName, "{ReadinessCheckName}", false);
185
+ b.bp("/readinesschecks/{ReadinessCheckName}/status");
186
+ b.p("ReadinessCheckName", () => input.ReadinessCheckName, "{ReadinessCheckName}", false);
299
187
  const query = map({
300
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
301
- nextToken: [, input.NextToken],
188
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
189
+ [_nT]: [, input[_NT]],
302
190
  });
303
191
  let body;
304
- return new __HttpRequest({
305
- protocol,
306
- hostname,
307
- port,
308
- method: "GET",
309
- headers,
310
- path: resolvedPath,
311
- query,
312
- body,
313
- });
192
+ b.m("GET").h(headers).q(query).b(body);
193
+ return b.build();
314
194
  };
315
195
  export const se_GetRecoveryGroupCommand = async (input, context) => {
316
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
196
+ const b = rb(input, context);
317
197
  const headers = {};
318
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/recoverygroups/{RecoveryGroupName}";
319
- resolvedPath = __resolvedPath(resolvedPath, input, "RecoveryGroupName", () => input.RecoveryGroupName, "{RecoveryGroupName}", false);
198
+ b.bp("/recoverygroups/{RecoveryGroupName}");
199
+ b.p("RecoveryGroupName", () => input.RecoveryGroupName, "{RecoveryGroupName}", false);
320
200
  let body;
321
- return new __HttpRequest({
322
- protocol,
323
- hostname,
324
- port,
325
- method: "GET",
326
- headers,
327
- path: resolvedPath,
328
- body,
329
- });
201
+ b.m("GET").h(headers).b(body);
202
+ return b.build();
330
203
  };
331
204
  export const se_GetRecoveryGroupReadinessSummaryCommand = async (input, context) => {
332
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
205
+ const b = rb(input, context);
333
206
  const headers = {};
334
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
335
- "/recoverygroupreadiness/{RecoveryGroupName}";
336
- resolvedPath = __resolvedPath(resolvedPath, input, "RecoveryGroupName", () => input.RecoveryGroupName, "{RecoveryGroupName}", false);
207
+ b.bp("/recoverygroupreadiness/{RecoveryGroupName}");
208
+ b.p("RecoveryGroupName", () => input.RecoveryGroupName, "{RecoveryGroupName}", false);
337
209
  const query = map({
338
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
339
- nextToken: [, input.NextToken],
210
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
211
+ [_nT]: [, input[_NT]],
340
212
  });
341
213
  let body;
342
- return new __HttpRequest({
343
- protocol,
344
- hostname,
345
- port,
346
- method: "GET",
347
- headers,
348
- path: resolvedPath,
349
- query,
350
- body,
351
- });
214
+ b.m("GET").h(headers).q(query).b(body);
215
+ return b.build();
352
216
  };
353
217
  export const se_GetResourceSetCommand = async (input, context) => {
354
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
218
+ const b = rb(input, context);
355
219
  const headers = {};
356
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resourcesets/{ResourceSetName}";
357
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceSetName", () => input.ResourceSetName, "{ResourceSetName}", false);
220
+ b.bp("/resourcesets/{ResourceSetName}");
221
+ b.p("ResourceSetName", () => input.ResourceSetName, "{ResourceSetName}", false);
358
222
  let body;
359
- return new __HttpRequest({
360
- protocol,
361
- hostname,
362
- port,
363
- method: "GET",
364
- headers,
365
- path: resolvedPath,
366
- body,
367
- });
223
+ b.m("GET").h(headers).b(body);
224
+ return b.build();
368
225
  };
369
226
  export const se_ListCellsCommand = async (input, context) => {
370
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
227
+ const b = rb(input, context);
371
228
  const headers = {};
372
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cells";
229
+ b.bp("/cells");
373
230
  const query = map({
374
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
375
- nextToken: [, input.NextToken],
231
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
232
+ [_nT]: [, input[_NT]],
376
233
  });
377
234
  let body;
378
- return new __HttpRequest({
379
- protocol,
380
- hostname,
381
- port,
382
- method: "GET",
383
- headers,
384
- path: resolvedPath,
385
- query,
386
- body,
387
- });
235
+ b.m("GET").h(headers).q(query).b(body);
236
+ return b.build();
388
237
  };
389
238
  export const se_ListCrossAccountAuthorizationsCommand = async (input, context) => {
390
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
239
+ const b = rb(input, context);
391
240
  const headers = {};
392
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/crossaccountauthorizations";
241
+ b.bp("/crossaccountauthorizations");
393
242
  const query = map({
394
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
395
- nextToken: [, input.NextToken],
243
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
244
+ [_nT]: [, input[_NT]],
396
245
  });
397
246
  let body;
398
- return new __HttpRequest({
399
- protocol,
400
- hostname,
401
- port,
402
- method: "GET",
403
- headers,
404
- path: resolvedPath,
405
- query,
406
- body,
407
- });
247
+ b.m("GET").h(headers).q(query).b(body);
248
+ return b.build();
408
249
  };
409
250
  export const se_ListReadinessChecksCommand = async (input, context) => {
410
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
251
+ const b = rb(input, context);
411
252
  const headers = {};
412
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/readinesschecks";
253
+ b.bp("/readinesschecks");
413
254
  const query = map({
414
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
415
- nextToken: [, input.NextToken],
255
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
256
+ [_nT]: [, input[_NT]],
416
257
  });
417
258
  let body;
418
- return new __HttpRequest({
419
- protocol,
420
- hostname,
421
- port,
422
- method: "GET",
423
- headers,
424
- path: resolvedPath,
425
- query,
426
- body,
427
- });
259
+ b.m("GET").h(headers).q(query).b(body);
260
+ return b.build();
428
261
  };
429
262
  export const se_ListRecoveryGroupsCommand = async (input, context) => {
430
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
263
+ const b = rb(input, context);
431
264
  const headers = {};
432
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/recoverygroups";
265
+ b.bp("/recoverygroups");
433
266
  const query = map({
434
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
435
- nextToken: [, input.NextToken],
267
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
268
+ [_nT]: [, input[_NT]],
436
269
  });
437
270
  let body;
438
- return new __HttpRequest({
439
- protocol,
440
- hostname,
441
- port,
442
- method: "GET",
443
- headers,
444
- path: resolvedPath,
445
- query,
446
- body,
447
- });
271
+ b.m("GET").h(headers).q(query).b(body);
272
+ return b.build();
448
273
  };
449
274
  export const se_ListResourceSetsCommand = async (input, context) => {
450
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
275
+ const b = rb(input, context);
451
276
  const headers = {};
452
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resourcesets";
277
+ b.bp("/resourcesets");
453
278
  const query = map({
454
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
455
- nextToken: [, input.NextToken],
279
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
280
+ [_nT]: [, input[_NT]],
456
281
  });
457
282
  let body;
458
- return new __HttpRequest({
459
- protocol,
460
- hostname,
461
- port,
462
- method: "GET",
463
- headers,
464
- path: resolvedPath,
465
- query,
466
- body,
467
- });
283
+ b.m("GET").h(headers).q(query).b(body);
284
+ return b.build();
468
285
  };
469
286
  export const se_ListRulesCommand = async (input, context) => {
470
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
287
+ const b = rb(input, context);
471
288
  const headers = {};
472
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/rules";
289
+ b.bp("/rules");
473
290
  const query = map({
474
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
475
- nextToken: [, input.NextToken],
476
- resourceType: [, input.ResourceType],
291
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
292
+ [_nT]: [, input[_NT]],
293
+ [_rT]: [, input[_RT]],
477
294
  });
478
295
  let body;
479
- return new __HttpRequest({
480
- protocol,
481
- hostname,
482
- port,
483
- method: "GET",
484
- headers,
485
- path: resolvedPath,
486
- query,
487
- body,
488
- });
296
+ b.m("GET").h(headers).q(query).b(body);
297
+ return b.build();
489
298
  };
490
299
  export const se_ListTagsForResourcesCommand = async (input, context) => {
491
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
300
+ const b = rb(input, context);
492
301
  const headers = {};
493
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
494
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
302
+ b.bp("/tags/{ResourceArn}");
303
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
495
304
  let body;
496
- return new __HttpRequest({
497
- protocol,
498
- hostname,
499
- port,
500
- method: "GET",
501
- headers,
502
- path: resolvedPath,
503
- body,
504
- });
305
+ b.m("GET").h(headers).b(body);
306
+ return b.build();
505
307
  };
506
308
  export const se_TagResourceCommand = async (input, context) => {
507
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
309
+ const b = rb(input, context);
508
310
  const headers = {
509
311
  "content-type": "application/json",
510
312
  };
511
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
512
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
313
+ b.bp("/tags/{ResourceArn}");
314
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
513
315
  let body;
514
316
  body = JSON.stringify(take(input, {
515
317
  tags: [, (_) => _json(_), `Tags`],
516
318
  }));
517
- return new __HttpRequest({
518
- protocol,
519
- hostname,
520
- port,
521
- method: "POST",
522
- headers,
523
- path: resolvedPath,
524
- body,
525
- });
319
+ b.m("POST").h(headers).b(body);
320
+ return b.build();
526
321
  };
527
322
  export const se_UntagResourceCommand = async (input, context) => {
528
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
323
+ const b = rb(input, context);
529
324
  const headers = {};
530
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
531
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
325
+ b.bp("/tags/{ResourceArn}");
326
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
532
327
  const query = map({
533
- tagKeys: [
328
+ [_tK]: [
534
329
  __expectNonNull(input.TagKeys, `TagKeys`) != null,
535
- () => (input.TagKeys || []).map((_entry) => _entry),
330
+ () => (input[_TK] || []).map((_entry) => _entry),
536
331
  ],
537
332
  });
538
333
  let body;
539
- return new __HttpRequest({
540
- protocol,
541
- hostname,
542
- port,
543
- method: "DELETE",
544
- headers,
545
- path: resolvedPath,
546
- query,
547
- body,
548
- });
334
+ b.m("DELETE").h(headers).q(query).b(body);
335
+ return b.build();
549
336
  };
550
337
  export const se_UpdateCellCommand = async (input, context) => {
551
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
338
+ const b = rb(input, context);
552
339
  const headers = {
553
340
  "content-type": "application/json",
554
341
  };
555
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cells/{CellName}";
556
- resolvedPath = __resolvedPath(resolvedPath, input, "CellName", () => input.CellName, "{CellName}", false);
342
+ b.bp("/cells/{CellName}");
343
+ b.p("CellName", () => input.CellName, "{CellName}", false);
557
344
  let body;
558
345
  body = JSON.stringify(take(input, {
559
346
  cells: [, (_) => _json(_), `Cells`],
560
347
  }));
561
- return new __HttpRequest({
562
- protocol,
563
- hostname,
564
- port,
565
- method: "PUT",
566
- headers,
567
- path: resolvedPath,
568
- body,
569
- });
348
+ b.m("PUT").h(headers).b(body);
349
+ return b.build();
570
350
  };
571
351
  export const se_UpdateReadinessCheckCommand = async (input, context) => {
572
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
352
+ const b = rb(input, context);
573
353
  const headers = {
574
354
  "content-type": "application/json",
575
355
  };
576
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/readinesschecks/{ReadinessCheckName}";
577
- resolvedPath = __resolvedPath(resolvedPath, input, "ReadinessCheckName", () => input.ReadinessCheckName, "{ReadinessCheckName}", false);
356
+ b.bp("/readinesschecks/{ReadinessCheckName}");
357
+ b.p("ReadinessCheckName", () => input.ReadinessCheckName, "{ReadinessCheckName}", false);
578
358
  let body;
579
359
  body = JSON.stringify(take(input, {
580
360
  resourceSetName: [, , `ResourceSetName`],
581
361
  }));
582
- return new __HttpRequest({
583
- protocol,
584
- hostname,
585
- port,
586
- method: "PUT",
587
- headers,
588
- path: resolvedPath,
589
- body,
590
- });
362
+ b.m("PUT").h(headers).b(body);
363
+ return b.build();
591
364
  };
592
365
  export const se_UpdateRecoveryGroupCommand = async (input, context) => {
593
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
366
+ const b = rb(input, context);
594
367
  const headers = {
595
368
  "content-type": "application/json",
596
369
  };
597
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/recoverygroups/{RecoveryGroupName}";
598
- resolvedPath = __resolvedPath(resolvedPath, input, "RecoveryGroupName", () => input.RecoveryGroupName, "{RecoveryGroupName}", false);
370
+ b.bp("/recoverygroups/{RecoveryGroupName}");
371
+ b.p("RecoveryGroupName", () => input.RecoveryGroupName, "{RecoveryGroupName}", false);
599
372
  let body;
600
373
  body = JSON.stringify(take(input, {
601
374
  cells: [, (_) => _json(_), `Cells`],
602
375
  }));
603
- return new __HttpRequest({
604
- protocol,
605
- hostname,
606
- port,
607
- method: "PUT",
608
- headers,
609
- path: resolvedPath,
610
- body,
611
- });
376
+ b.m("PUT").h(headers).b(body);
377
+ return b.build();
612
378
  };
613
379
  export const se_UpdateResourceSetCommand = async (input, context) => {
614
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
380
+ const b = rb(input, context);
615
381
  const headers = {
616
382
  "content-type": "application/json",
617
383
  };
618
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resourcesets/{ResourceSetName}";
619
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceSetName", () => input.ResourceSetName, "{ResourceSetName}", false);
384
+ b.bp("/resourcesets/{ResourceSetName}");
385
+ b.p("ResourceSetName", () => input.ResourceSetName, "{ResourceSetName}", false);
620
386
  let body;
621
387
  body = JSON.stringify(take(input, {
622
388
  resourceSetType: [, , `ResourceSetType`],
623
389
  resources: [, (_) => se___listOfResource(_, context), `Resources`],
624
390
  }));
625
- return new __HttpRequest({
626
- protocol,
627
- hostname,
628
- port,
629
- method: "PUT",
630
- headers,
631
- path: resolvedPath,
632
- body,
633
- });
391
+ b.m("PUT").h(headers).b(body);
392
+ return b.build();
634
393
  };
635
394
  export const de_CreateCellCommand = async (output, context) => {
636
395
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2391,6 +2150,14 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
2391
2150
  value !== "" &&
2392
2151
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2393
2152
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2153
+ const _MR = "MaxResults";
2154
+ const _NT = "NextToken";
2155
+ const _RT = "ResourceType";
2156
+ const _TK = "TagKeys";
2157
+ const _mR = "maxResults";
2158
+ const _nT = "nextToken";
2159
+ const _rT = "resourceType";
2160
+ const _tK = "tagKeys";
2394
2161
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2395
2162
  if (encoded.length) {
2396
2163
  return JSON.parse(encoded);