@aws-sdk/client-migration-hub-refactor-spaces 3.476.0 → 3.478.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,16 +1,15 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { MigrationHubRefactorSpacesServiceException as __BaseException } from "../models/MigrationHubRefactorSpacesServiceException";
5
5
  import { AccessDeniedException, ConflictException, InternalServerException, InvalidResourcePolicyException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
6
  export const se_CreateApplicationCommand = async (input, context) => {
7
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
+ const b = rb(input, context);
8
8
  const headers = {
9
9
  "content-type": "application/json",
10
10
  };
11
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
12
- "/environments/{EnvironmentIdentifier}/applications";
13
- resolvedPath = __resolvedPath(resolvedPath, input, "EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
11
+ b.bp("/environments/{EnvironmentIdentifier}/applications");
12
+ b.p("EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
14
13
  let body;
15
14
  body = JSON.stringify(take(input, {
16
15
  ApiGatewayProxy: (_) => _json(_),
@@ -20,22 +19,15 @@ export const se_CreateApplicationCommand = async (input, context) => {
20
19
  Tags: (_) => _json(_),
21
20
  VpcId: [],
22
21
  }));
23
- return new __HttpRequest({
24
- protocol,
25
- hostname,
26
- port,
27
- method: "POST",
28
- headers,
29
- path: resolvedPath,
30
- body,
31
- });
22
+ b.m("POST").h(headers).b(body);
23
+ return b.build();
32
24
  };
33
25
  export const se_CreateEnvironmentCommand = async (input, context) => {
34
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
26
+ const b = rb(input, context);
35
27
  const headers = {
36
28
  "content-type": "application/json",
37
29
  };
38
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments";
30
+ b.bp("/environments");
39
31
  let body;
40
32
  body = JSON.stringify(take(input, {
41
33
  ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -44,25 +36,17 @@ export const se_CreateEnvironmentCommand = async (input, context) => {
44
36
  NetworkFabricType: [],
45
37
  Tags: (_) => _json(_),
46
38
  }));
47
- return new __HttpRequest({
48
- protocol,
49
- hostname,
50
- port,
51
- method: "POST",
52
- headers,
53
- path: resolvedPath,
54
- body,
55
- });
39
+ b.m("POST").h(headers).b(body);
40
+ return b.build();
56
41
  };
57
42
  export const se_CreateRouteCommand = async (input, context) => {
58
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
43
+ const b = rb(input, context);
59
44
  const headers = {
60
45
  "content-type": "application/json",
61
46
  };
62
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
63
- "/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/routes";
64
- resolvedPath = __resolvedPath(resolvedPath, input, "EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
65
- resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationIdentifier", () => input.ApplicationIdentifier, "{ApplicationIdentifier}", false);
47
+ b.bp("/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/routes");
48
+ b.p("EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
49
+ b.p("ApplicationIdentifier", () => input.ApplicationIdentifier, "{ApplicationIdentifier}", false);
66
50
  let body;
67
51
  body = JSON.stringify(take(input, {
68
52
  ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -72,25 +56,17 @@ export const se_CreateRouteCommand = async (input, context) => {
72
56
  Tags: (_) => _json(_),
73
57
  UriPathRoute: (_) => _json(_),
74
58
  }));
75
- return new __HttpRequest({
76
- protocol,
77
- hostname,
78
- port,
79
- method: "POST",
80
- headers,
81
- path: resolvedPath,
82
- body,
83
- });
59
+ b.m("POST").h(headers).b(body);
60
+ return b.build();
84
61
  };
85
62
  export const se_CreateServiceCommand = async (input, context) => {
86
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
63
+ const b = rb(input, context);
87
64
  const headers = {
88
65
  "content-type": "application/json",
89
66
  };
90
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
91
- "/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/services";
92
- resolvedPath = __resolvedPath(resolvedPath, input, "EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
93
- resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationIdentifier", () => input.ApplicationIdentifier, "{ApplicationIdentifier}", false);
67
+ b.bp("/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/services");
68
+ b.p("EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
69
+ b.p("ApplicationIdentifier", () => input.ApplicationIdentifier, "{ApplicationIdentifier}", false);
94
70
  let body;
95
71
  body = JSON.stringify(take(input, {
96
72
  ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -102,406 +78,242 @@ export const se_CreateServiceCommand = async (input, context) => {
102
78
  UrlEndpoint: (_) => _json(_),
103
79
  VpcId: [],
104
80
  }));
105
- return new __HttpRequest({
106
- protocol,
107
- hostname,
108
- port,
109
- method: "POST",
110
- headers,
111
- path: resolvedPath,
112
- body,
113
- });
81
+ b.m("POST").h(headers).b(body);
82
+ return b.build();
114
83
  };
115
84
  export const se_DeleteApplicationCommand = async (input, context) => {
116
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
85
+ const b = rb(input, context);
117
86
  const headers = {};
118
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
119
- "/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}";
120
- resolvedPath = __resolvedPath(resolvedPath, input, "EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
121
- resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationIdentifier", () => input.ApplicationIdentifier, "{ApplicationIdentifier}", false);
87
+ b.bp("/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}");
88
+ b.p("EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
89
+ b.p("ApplicationIdentifier", () => input.ApplicationIdentifier, "{ApplicationIdentifier}", false);
122
90
  let body;
123
- return new __HttpRequest({
124
- protocol,
125
- hostname,
126
- port,
127
- method: "DELETE",
128
- headers,
129
- path: resolvedPath,
130
- body,
131
- });
91
+ b.m("DELETE").h(headers).b(body);
92
+ return b.build();
132
93
  };
133
94
  export const se_DeleteEnvironmentCommand = async (input, context) => {
134
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
95
+ const b = rb(input, context);
135
96
  const headers = {};
136
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments/{EnvironmentIdentifier}";
137
- resolvedPath = __resolvedPath(resolvedPath, input, "EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
97
+ b.bp("/environments/{EnvironmentIdentifier}");
98
+ b.p("EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
138
99
  let body;
139
- return new __HttpRequest({
140
- protocol,
141
- hostname,
142
- port,
143
- method: "DELETE",
144
- headers,
145
- path: resolvedPath,
146
- body,
147
- });
100
+ b.m("DELETE").h(headers).b(body);
101
+ return b.build();
148
102
  };
149
103
  export const se_DeleteResourcePolicyCommand = async (input, context) => {
150
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
104
+ const b = rb(input, context);
151
105
  const headers = {};
152
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resourcepolicy/{Identifier}";
153
- resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", () => input.Identifier, "{Identifier}", false);
106
+ b.bp("/resourcepolicy/{Identifier}");
107
+ b.p("Identifier", () => input.Identifier, "{Identifier}", false);
154
108
  let body;
155
- return new __HttpRequest({
156
- protocol,
157
- hostname,
158
- port,
159
- method: "DELETE",
160
- headers,
161
- path: resolvedPath,
162
- body,
163
- });
109
+ b.m("DELETE").h(headers).b(body);
110
+ return b.build();
164
111
  };
165
112
  export const se_DeleteRouteCommand = async (input, context) => {
166
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
113
+ const b = rb(input, context);
167
114
  const headers = {};
168
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
169
- "/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/routes/{RouteIdentifier}";
170
- resolvedPath = __resolvedPath(resolvedPath, input, "EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
171
- resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationIdentifier", () => input.ApplicationIdentifier, "{ApplicationIdentifier}", false);
172
- resolvedPath = __resolvedPath(resolvedPath, input, "RouteIdentifier", () => input.RouteIdentifier, "{RouteIdentifier}", false);
115
+ b.bp("/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/routes/{RouteIdentifier}");
116
+ b.p("EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
117
+ b.p("ApplicationIdentifier", () => input.ApplicationIdentifier, "{ApplicationIdentifier}", false);
118
+ b.p("RouteIdentifier", () => input.RouteIdentifier, "{RouteIdentifier}", false);
173
119
  let body;
174
- return new __HttpRequest({
175
- protocol,
176
- hostname,
177
- port,
178
- method: "DELETE",
179
- headers,
180
- path: resolvedPath,
181
- body,
182
- });
120
+ b.m("DELETE").h(headers).b(body);
121
+ return b.build();
183
122
  };
184
123
  export const se_DeleteServiceCommand = async (input, context) => {
185
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
124
+ const b = rb(input, context);
186
125
  const headers = {};
187
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
188
- "/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/services/{ServiceIdentifier}";
189
- resolvedPath = __resolvedPath(resolvedPath, input, "EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
190
- resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationIdentifier", () => input.ApplicationIdentifier, "{ApplicationIdentifier}", false);
191
- resolvedPath = __resolvedPath(resolvedPath, input, "ServiceIdentifier", () => input.ServiceIdentifier, "{ServiceIdentifier}", false);
126
+ b.bp("/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/services/{ServiceIdentifier}");
127
+ b.p("EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
128
+ b.p("ApplicationIdentifier", () => input.ApplicationIdentifier, "{ApplicationIdentifier}", false);
129
+ b.p("ServiceIdentifier", () => input.ServiceIdentifier, "{ServiceIdentifier}", false);
192
130
  let body;
193
- return new __HttpRequest({
194
- protocol,
195
- hostname,
196
- port,
197
- method: "DELETE",
198
- headers,
199
- path: resolvedPath,
200
- body,
201
- });
131
+ b.m("DELETE").h(headers).b(body);
132
+ return b.build();
202
133
  };
203
134
  export const se_GetApplicationCommand = async (input, context) => {
204
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
135
+ const b = rb(input, context);
205
136
  const headers = {};
206
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
207
- "/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}";
208
- resolvedPath = __resolvedPath(resolvedPath, input, "EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
209
- resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationIdentifier", () => input.ApplicationIdentifier, "{ApplicationIdentifier}", false);
137
+ b.bp("/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}");
138
+ b.p("EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
139
+ b.p("ApplicationIdentifier", () => input.ApplicationIdentifier, "{ApplicationIdentifier}", false);
210
140
  let body;
211
- return new __HttpRequest({
212
- protocol,
213
- hostname,
214
- port,
215
- method: "GET",
216
- headers,
217
- path: resolvedPath,
218
- body,
219
- });
141
+ b.m("GET").h(headers).b(body);
142
+ return b.build();
220
143
  };
221
144
  export const se_GetEnvironmentCommand = async (input, context) => {
222
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
145
+ const b = rb(input, context);
223
146
  const headers = {};
224
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments/{EnvironmentIdentifier}";
225
- resolvedPath = __resolvedPath(resolvedPath, input, "EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
147
+ b.bp("/environments/{EnvironmentIdentifier}");
148
+ b.p("EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
226
149
  let body;
227
- return new __HttpRequest({
228
- protocol,
229
- hostname,
230
- port,
231
- method: "GET",
232
- headers,
233
- path: resolvedPath,
234
- body,
235
- });
150
+ b.m("GET").h(headers).b(body);
151
+ return b.build();
236
152
  };
237
153
  export const se_GetResourcePolicyCommand = async (input, context) => {
238
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
154
+ const b = rb(input, context);
239
155
  const headers = {};
240
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resourcepolicy/{Identifier}";
241
- resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", () => input.Identifier, "{Identifier}", false);
156
+ b.bp("/resourcepolicy/{Identifier}");
157
+ b.p("Identifier", () => input.Identifier, "{Identifier}", false);
242
158
  let body;
243
- return new __HttpRequest({
244
- protocol,
245
- hostname,
246
- port,
247
- method: "GET",
248
- headers,
249
- path: resolvedPath,
250
- body,
251
- });
159
+ b.m("GET").h(headers).b(body);
160
+ return b.build();
252
161
  };
253
162
  export const se_GetRouteCommand = async (input, context) => {
254
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
163
+ const b = rb(input, context);
255
164
  const headers = {};
256
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
257
- "/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/routes/{RouteIdentifier}";
258
- resolvedPath = __resolvedPath(resolvedPath, input, "EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
259
- resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationIdentifier", () => input.ApplicationIdentifier, "{ApplicationIdentifier}", false);
260
- resolvedPath = __resolvedPath(resolvedPath, input, "RouteIdentifier", () => input.RouteIdentifier, "{RouteIdentifier}", false);
165
+ b.bp("/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/routes/{RouteIdentifier}");
166
+ b.p("EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
167
+ b.p("ApplicationIdentifier", () => input.ApplicationIdentifier, "{ApplicationIdentifier}", false);
168
+ b.p("RouteIdentifier", () => input.RouteIdentifier, "{RouteIdentifier}", false);
261
169
  let body;
262
- return new __HttpRequest({
263
- protocol,
264
- hostname,
265
- port,
266
- method: "GET",
267
- headers,
268
- path: resolvedPath,
269
- body,
270
- });
170
+ b.m("GET").h(headers).b(body);
171
+ return b.build();
271
172
  };
272
173
  export const se_GetServiceCommand = async (input, context) => {
273
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
174
+ const b = rb(input, context);
274
175
  const headers = {};
275
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
276
- "/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/services/{ServiceIdentifier}";
277
- resolvedPath = __resolvedPath(resolvedPath, input, "EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
278
- resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationIdentifier", () => input.ApplicationIdentifier, "{ApplicationIdentifier}", false);
279
- resolvedPath = __resolvedPath(resolvedPath, input, "ServiceIdentifier", () => input.ServiceIdentifier, "{ServiceIdentifier}", false);
176
+ b.bp("/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/services/{ServiceIdentifier}");
177
+ b.p("EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
178
+ b.p("ApplicationIdentifier", () => input.ApplicationIdentifier, "{ApplicationIdentifier}", false);
179
+ b.p("ServiceIdentifier", () => input.ServiceIdentifier, "{ServiceIdentifier}", false);
280
180
  let body;
281
- return new __HttpRequest({
282
- protocol,
283
- hostname,
284
- port,
285
- method: "GET",
286
- headers,
287
- path: resolvedPath,
288
- body,
289
- });
181
+ b.m("GET").h(headers).b(body);
182
+ return b.build();
290
183
  };
291
184
  export const se_ListApplicationsCommand = async (input, context) => {
292
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
185
+ const b = rb(input, context);
293
186
  const headers = {};
294
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
295
- "/environments/{EnvironmentIdentifier}/applications";
296
- resolvedPath = __resolvedPath(resolvedPath, input, "EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
187
+ b.bp("/environments/{EnvironmentIdentifier}/applications");
188
+ b.p("EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
297
189
  const query = map({
298
- nextToken: [, input.NextToken],
299
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
190
+ [_nT]: [, input[_NT]],
191
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
300
192
  });
301
193
  let body;
302
- return new __HttpRequest({
303
- protocol,
304
- hostname,
305
- port,
306
- method: "GET",
307
- headers,
308
- path: resolvedPath,
309
- query,
310
- body,
311
- });
194
+ b.m("GET").h(headers).q(query).b(body);
195
+ return b.build();
312
196
  };
313
197
  export const se_ListEnvironmentsCommand = async (input, context) => {
314
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
198
+ const b = rb(input, context);
315
199
  const headers = {};
316
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments";
200
+ b.bp("/environments");
317
201
  const query = map({
318
- nextToken: [, input.NextToken],
319
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
202
+ [_nT]: [, input[_NT]],
203
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
320
204
  });
321
205
  let body;
322
- return new __HttpRequest({
323
- protocol,
324
- hostname,
325
- port,
326
- method: "GET",
327
- headers,
328
- path: resolvedPath,
329
- query,
330
- body,
331
- });
206
+ b.m("GET").h(headers).q(query).b(body);
207
+ return b.build();
332
208
  };
333
209
  export const se_ListEnvironmentVpcsCommand = async (input, context) => {
334
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
210
+ const b = rb(input, context);
335
211
  const headers = {};
336
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
337
- "/environments/{EnvironmentIdentifier}/vpcs";
338
- resolvedPath = __resolvedPath(resolvedPath, input, "EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
212
+ b.bp("/environments/{EnvironmentIdentifier}/vpcs");
213
+ b.p("EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
339
214
  const query = map({
340
- nextToken: [, input.NextToken],
341
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
215
+ [_nT]: [, input[_NT]],
216
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
342
217
  });
343
218
  let body;
344
- return new __HttpRequest({
345
- protocol,
346
- hostname,
347
- port,
348
- method: "GET",
349
- headers,
350
- path: resolvedPath,
351
- query,
352
- body,
353
- });
219
+ b.m("GET").h(headers).q(query).b(body);
220
+ return b.build();
354
221
  };
355
222
  export const se_ListRoutesCommand = async (input, context) => {
356
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
223
+ const b = rb(input, context);
357
224
  const headers = {};
358
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
359
- "/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/routes";
360
- resolvedPath = __resolvedPath(resolvedPath, input, "EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
361
- resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationIdentifier", () => input.ApplicationIdentifier, "{ApplicationIdentifier}", false);
225
+ b.bp("/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/routes");
226
+ b.p("EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
227
+ b.p("ApplicationIdentifier", () => input.ApplicationIdentifier, "{ApplicationIdentifier}", false);
362
228
  const query = map({
363
- nextToken: [, input.NextToken],
364
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
229
+ [_nT]: [, input[_NT]],
230
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
365
231
  });
366
232
  let body;
367
- return new __HttpRequest({
368
- protocol,
369
- hostname,
370
- port,
371
- method: "GET",
372
- headers,
373
- path: resolvedPath,
374
- query,
375
- body,
376
- });
233
+ b.m("GET").h(headers).q(query).b(body);
234
+ return b.build();
377
235
  };
378
236
  export const se_ListServicesCommand = async (input, context) => {
379
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
237
+ const b = rb(input, context);
380
238
  const headers = {};
381
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
382
- "/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/services";
383
- resolvedPath = __resolvedPath(resolvedPath, input, "EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
384
- resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationIdentifier", () => input.ApplicationIdentifier, "{ApplicationIdentifier}", false);
239
+ b.bp("/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/services");
240
+ b.p("EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
241
+ b.p("ApplicationIdentifier", () => input.ApplicationIdentifier, "{ApplicationIdentifier}", false);
385
242
  const query = map({
386
- nextToken: [, input.NextToken],
387
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
243
+ [_nT]: [, input[_NT]],
244
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
388
245
  });
389
246
  let body;
390
- return new __HttpRequest({
391
- protocol,
392
- hostname,
393
- port,
394
- method: "GET",
395
- headers,
396
- path: resolvedPath,
397
- query,
398
- body,
399
- });
247
+ b.m("GET").h(headers).q(query).b(body);
248
+ return b.build();
400
249
  };
401
250
  export const se_ListTagsForResourceCommand = async (input, context) => {
402
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
251
+ const b = rb(input, context);
403
252
  const headers = {};
404
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
405
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
253
+ b.bp("/tags/{ResourceArn}");
254
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
406
255
  let body;
407
- return new __HttpRequest({
408
- protocol,
409
- hostname,
410
- port,
411
- method: "GET",
412
- headers,
413
- path: resolvedPath,
414
- body,
415
- });
256
+ b.m("GET").h(headers).b(body);
257
+ return b.build();
416
258
  };
417
259
  export const se_PutResourcePolicyCommand = async (input, context) => {
418
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
260
+ const b = rb(input, context);
419
261
  const headers = {
420
262
  "content-type": "application/json",
421
263
  };
422
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resourcepolicy";
264
+ b.bp("/resourcepolicy");
423
265
  let body;
424
266
  body = JSON.stringify(take(input, {
425
267
  Policy: [],
426
268
  ResourceArn: [],
427
269
  }));
428
- return new __HttpRequest({
429
- protocol,
430
- hostname,
431
- port,
432
- method: "PUT",
433
- headers,
434
- path: resolvedPath,
435
- body,
436
- });
270
+ b.m("PUT").h(headers).b(body);
271
+ return b.build();
437
272
  };
438
273
  export const se_TagResourceCommand = async (input, context) => {
439
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
274
+ const b = rb(input, context);
440
275
  const headers = {
441
276
  "content-type": "application/json",
442
277
  };
443
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
444
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
278
+ b.bp("/tags/{ResourceArn}");
279
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
445
280
  let body;
446
281
  body = JSON.stringify(take(input, {
447
282
  Tags: (_) => _json(_),
448
283
  }));
449
- return new __HttpRequest({
450
- protocol,
451
- hostname,
452
- port,
453
- method: "POST",
454
- headers,
455
- path: resolvedPath,
456
- body,
457
- });
284
+ b.m("POST").h(headers).b(body);
285
+ return b.build();
458
286
  };
459
287
  export const se_UntagResourceCommand = async (input, context) => {
460
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
288
+ const b = rb(input, context);
461
289
  const headers = {};
462
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
463
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
290
+ b.bp("/tags/{ResourceArn}");
291
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
464
292
  const query = map({
465
- tagKeys: [
293
+ [_tK]: [
466
294
  __expectNonNull(input.TagKeys, `TagKeys`) != null,
467
- () => (input.TagKeys || []).map((_entry) => _entry),
295
+ () => (input[_TK] || []).map((_entry) => _entry),
468
296
  ],
469
297
  });
470
298
  let body;
471
- return new __HttpRequest({
472
- protocol,
473
- hostname,
474
- port,
475
- method: "DELETE",
476
- headers,
477
- path: resolvedPath,
478
- query,
479
- body,
480
- });
299
+ b.m("DELETE").h(headers).q(query).b(body);
300
+ return b.build();
481
301
  };
482
302
  export const se_UpdateRouteCommand = async (input, context) => {
483
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
303
+ const b = rb(input, context);
484
304
  const headers = {
485
305
  "content-type": "application/json",
486
306
  };
487
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
488
- "/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/routes/{RouteIdentifier}";
489
- resolvedPath = __resolvedPath(resolvedPath, input, "EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
490
- resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationIdentifier", () => input.ApplicationIdentifier, "{ApplicationIdentifier}", false);
491
- resolvedPath = __resolvedPath(resolvedPath, input, "RouteIdentifier", () => input.RouteIdentifier, "{RouteIdentifier}", false);
307
+ b.bp("/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/routes/{RouteIdentifier}");
308
+ b.p("EnvironmentIdentifier", () => input.EnvironmentIdentifier, "{EnvironmentIdentifier}", false);
309
+ b.p("ApplicationIdentifier", () => input.ApplicationIdentifier, "{ApplicationIdentifier}", false);
310
+ b.p("RouteIdentifier", () => input.RouteIdentifier, "{RouteIdentifier}", false);
492
311
  let body;
493
312
  body = JSON.stringify(take(input, {
494
313
  ActivationState: [],
495
314
  }));
496
- return new __HttpRequest({
497
- protocol,
498
- hostname,
499
- port,
500
- method: "PATCH",
501
- headers,
502
- path: resolvedPath,
503
- body,
504
- });
315
+ b.m("PATCH").h(headers).b(body);
316
+ return b.build();
505
317
  };
506
318
  export const de_CreateApplicationCommand = async (output, context) => {
507
319
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1829,10 +1641,7 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1829
1641
  };
1830
1642
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1831
1643
  const contents = map({
1832
- RetryAfterSeconds: [
1833
- () => void 0 !== parsedOutput.headers["retry-after"],
1834
- () => __strictParseInt32(parsedOutput.headers["retry-after"]),
1835
- ],
1644
+ [_RAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
1836
1645
  });
1837
1646
  const data = parsedOutput.body;
1838
1647
  const doc = take(data, {
@@ -2000,6 +1809,14 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
2000
1809
  value !== "" &&
2001
1810
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2002
1811
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1812
+ const _MR = "MaxResults";
1813
+ const _NT = "NextToken";
1814
+ const _RAS = "RetryAfterSeconds";
1815
+ const _TK = "TagKeys";
1816
+ const _mR = "maxResults";
1817
+ const _nT = "nextToken";
1818
+ const _ra = "retry-after";
1819
+ const _tK = "tagKeys";
2003
1820
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2004
1821
  if (encoded.length) {
2005
1822
  return JSON.parse(encoded);