@aws-sdk/client-amplify 3.476.0 → 3.477.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
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, 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, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { AmplifyServiceException as __BaseException } from "../models/AmplifyServiceException";
4
4
  import { BadRequestException, DependentServiceFailureException, InternalFailureException, LimitExceededException, NotFoundException, ResourceNotFoundException, UnauthorizedException, } from "../models/models_0";
5
5
  export const se_CreateAppCommand = 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 || ""}` + "/apps";
10
+ b.bp("/apps");
11
11
  let body;
12
12
  body = JSON.stringify(take(input, {
13
13
  accessToken: [],
@@ -30,46 +30,32 @@ export const se_CreateAppCommand = async (input, context) => {
30
30
  repository: [],
31
31
  tags: (_) => _json(_),
32
32
  }));
33
- return new __HttpRequest({
34
- protocol,
35
- hostname,
36
- port,
37
- method: "POST",
38
- headers,
39
- path: resolvedPath,
40
- body,
41
- });
33
+ b.m("POST").h(headers).b(body);
34
+ return b.build();
42
35
  };
43
36
  export const se_CreateBackendEnvironmentCommand = async (input, context) => {
44
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
37
+ const b = rb(input, context);
45
38
  const headers = {
46
39
  "content-type": "application/json",
47
40
  };
48
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/backendenvironments";
49
- resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
41
+ b.bp("/apps/{appId}/backendenvironments");
42
+ b.p("appId", () => input.appId, "{appId}", false);
50
43
  let body;
51
44
  body = JSON.stringify(take(input, {
52
45
  deploymentArtifacts: [],
53
46
  environmentName: [],
54
47
  stackName: [],
55
48
  }));
56
- return new __HttpRequest({
57
- protocol,
58
- hostname,
59
- port,
60
- method: "POST",
61
- headers,
62
- path: resolvedPath,
63
- body,
64
- });
49
+ b.m("POST").h(headers).b(body);
50
+ return b.build();
65
51
  };
66
52
  export const se_CreateBranchCommand = async (input, context) => {
67
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
53
+ const b = rb(input, context);
68
54
  const headers = {
69
55
  "content-type": "application/json",
70
56
  };
71
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/branches";
72
- resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
57
+ b.bp("/apps/{appId}/branches");
58
+ b.p("appId", () => input.appId, "{appId}", false);
73
59
  let body;
74
60
  body = JSON.stringify(take(input, {
75
61
  backend: (_) => _json(_),
@@ -91,46 +77,31 @@ export const se_CreateBranchCommand = async (input, context) => {
91
77
  tags: (_) => _json(_),
92
78
  ttl: [],
93
79
  }));
94
- return new __HttpRequest({
95
- protocol,
96
- hostname,
97
- port,
98
- method: "POST",
99
- headers,
100
- path: resolvedPath,
101
- body,
102
- });
80
+ b.m("POST").h(headers).b(body);
81
+ return b.build();
103
82
  };
104
83
  export const se_CreateDeploymentCommand = async (input, context) => {
105
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
84
+ const b = rb(input, context);
106
85
  const headers = {
107
86
  "content-type": "application/json",
108
87
  };
109
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
110
- "/apps/{appId}/branches/{branchName}/deployments";
111
- resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
112
- resolvedPath = __resolvedPath(resolvedPath, input, "branchName", () => input.branchName, "{branchName}", false);
88
+ b.bp("/apps/{appId}/branches/{branchName}/deployments");
89
+ b.p("appId", () => input.appId, "{appId}", false);
90
+ b.p("branchName", () => input.branchName, "{branchName}", false);
113
91
  let body;
114
92
  body = JSON.stringify(take(input, {
115
93
  fileMap: (_) => _json(_),
116
94
  }));
117
- return new __HttpRequest({
118
- protocol,
119
- hostname,
120
- port,
121
- method: "POST",
122
- headers,
123
- path: resolvedPath,
124
- body,
125
- });
95
+ b.m("POST").h(headers).b(body);
96
+ return b.build();
126
97
  };
127
98
  export const se_CreateDomainAssociationCommand = async (input, context) => {
128
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
99
+ const b = rb(input, context);
129
100
  const headers = {
130
101
  "content-type": "application/json",
131
102
  };
132
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/domains";
133
- resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
103
+ b.bp("/apps/{appId}/domains");
104
+ b.p("appId", () => input.appId, "{appId}", false);
134
105
  let body;
135
106
  body = JSON.stringify(take(input, {
136
107
  autoSubDomainCreationPatterns: (_) => _json(_),
@@ -139,482 +110,294 @@ export const se_CreateDomainAssociationCommand = async (input, context) => {
139
110
  enableAutoSubDomain: [],
140
111
  subDomainSettings: (_) => _json(_),
141
112
  }));
142
- return new __HttpRequest({
143
- protocol,
144
- hostname,
145
- port,
146
- method: "POST",
147
- headers,
148
- path: resolvedPath,
149
- body,
150
- });
113
+ b.m("POST").h(headers).b(body);
114
+ return b.build();
151
115
  };
152
116
  export const se_CreateWebhookCommand = async (input, context) => {
153
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
117
+ const b = rb(input, context);
154
118
  const headers = {
155
119
  "content-type": "application/json",
156
120
  };
157
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/webhooks";
158
- resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
121
+ b.bp("/apps/{appId}/webhooks");
122
+ b.p("appId", () => input.appId, "{appId}", false);
159
123
  let body;
160
124
  body = JSON.stringify(take(input, {
161
125
  branchName: [],
162
126
  description: [],
163
127
  }));
164
- return new __HttpRequest({
165
- protocol,
166
- hostname,
167
- port,
168
- method: "POST",
169
- headers,
170
- path: resolvedPath,
171
- body,
172
- });
128
+ b.m("POST").h(headers).b(body);
129
+ return b.build();
173
130
  };
174
131
  export const se_DeleteAppCommand = async (input, context) => {
175
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
132
+ const b = rb(input, context);
176
133
  const headers = {};
177
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}";
178
- resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
134
+ b.bp("/apps/{appId}");
135
+ b.p("appId", () => input.appId, "{appId}", false);
179
136
  let body;
180
- return new __HttpRequest({
181
- protocol,
182
- hostname,
183
- port,
184
- method: "DELETE",
185
- headers,
186
- path: resolvedPath,
187
- body,
188
- });
137
+ b.m("DELETE").h(headers).b(body);
138
+ return b.build();
189
139
  };
190
140
  export const se_DeleteBackendEnvironmentCommand = async (input, context) => {
191
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
141
+ const b = rb(input, context);
192
142
  const headers = {};
193
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
194
- "/apps/{appId}/backendenvironments/{environmentName}";
195
- resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
196
- resolvedPath = __resolvedPath(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
143
+ b.bp("/apps/{appId}/backendenvironments/{environmentName}");
144
+ b.p("appId", () => input.appId, "{appId}", false);
145
+ b.p("environmentName", () => input.environmentName, "{environmentName}", false);
197
146
  let body;
198
- return new __HttpRequest({
199
- protocol,
200
- hostname,
201
- port,
202
- method: "DELETE",
203
- headers,
204
- path: resolvedPath,
205
- body,
206
- });
147
+ b.m("DELETE").h(headers).b(body);
148
+ return b.build();
207
149
  };
208
150
  export const se_DeleteBranchCommand = async (input, context) => {
209
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
151
+ const b = rb(input, context);
210
152
  const headers = {};
211
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/branches/{branchName}";
212
- resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
213
- resolvedPath = __resolvedPath(resolvedPath, input, "branchName", () => input.branchName, "{branchName}", false);
153
+ b.bp("/apps/{appId}/branches/{branchName}");
154
+ b.p("appId", () => input.appId, "{appId}", false);
155
+ b.p("branchName", () => input.branchName, "{branchName}", false);
214
156
  let body;
215
- return new __HttpRequest({
216
- protocol,
217
- hostname,
218
- port,
219
- method: "DELETE",
220
- headers,
221
- path: resolvedPath,
222
- body,
223
- });
157
+ b.m("DELETE").h(headers).b(body);
158
+ return b.build();
224
159
  };
225
160
  export const se_DeleteDomainAssociationCommand = async (input, context) => {
226
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
161
+ const b = rb(input, context);
227
162
  const headers = {};
228
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/domains/{domainName}";
229
- resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
230
- resolvedPath = __resolvedPath(resolvedPath, input, "domainName", () => input.domainName, "{domainName}", false);
163
+ b.bp("/apps/{appId}/domains/{domainName}");
164
+ b.p("appId", () => input.appId, "{appId}", false);
165
+ b.p("domainName", () => input.domainName, "{domainName}", false);
231
166
  let body;
232
- return new __HttpRequest({
233
- protocol,
234
- hostname,
235
- port,
236
- method: "DELETE",
237
- headers,
238
- path: resolvedPath,
239
- body,
240
- });
167
+ b.m("DELETE").h(headers).b(body);
168
+ return b.build();
241
169
  };
242
170
  export const se_DeleteJobCommand = async (input, context) => {
243
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
171
+ const b = rb(input, context);
244
172
  const headers = {};
245
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
246
- "/apps/{appId}/branches/{branchName}/jobs/{jobId}";
247
- resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
248
- resolvedPath = __resolvedPath(resolvedPath, input, "branchName", () => input.branchName, "{branchName}", false);
249
- resolvedPath = __resolvedPath(resolvedPath, input, "jobId", () => input.jobId, "{jobId}", false);
173
+ b.bp("/apps/{appId}/branches/{branchName}/jobs/{jobId}");
174
+ b.p("appId", () => input.appId, "{appId}", false);
175
+ b.p("branchName", () => input.branchName, "{branchName}", false);
176
+ b.p("jobId", () => input.jobId, "{jobId}", false);
250
177
  let body;
251
- return new __HttpRequest({
252
- protocol,
253
- hostname,
254
- port,
255
- method: "DELETE",
256
- headers,
257
- path: resolvedPath,
258
- body,
259
- });
178
+ b.m("DELETE").h(headers).b(body);
179
+ return b.build();
260
180
  };
261
181
  export const se_DeleteWebhookCommand = async (input, context) => {
262
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
182
+ const b = rb(input, context);
263
183
  const headers = {};
264
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/webhooks/{webhookId}";
265
- resolvedPath = __resolvedPath(resolvedPath, input, "webhookId", () => input.webhookId, "{webhookId}", false);
184
+ b.bp("/webhooks/{webhookId}");
185
+ b.p("webhookId", () => input.webhookId, "{webhookId}", false);
266
186
  let body;
267
- return new __HttpRequest({
268
- protocol,
269
- hostname,
270
- port,
271
- method: "DELETE",
272
- headers,
273
- path: resolvedPath,
274
- body,
275
- });
187
+ b.m("DELETE").h(headers).b(body);
188
+ return b.build();
276
189
  };
277
190
  export const se_GenerateAccessLogsCommand = async (input, context) => {
278
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
191
+ const b = rb(input, context);
279
192
  const headers = {
280
193
  "content-type": "application/json",
281
194
  };
282
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/accesslogs";
283
- resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
195
+ b.bp("/apps/{appId}/accesslogs");
196
+ b.p("appId", () => input.appId, "{appId}", false);
284
197
  let body;
285
198
  body = JSON.stringify(take(input, {
286
199
  domainName: [],
287
200
  endTime: (_) => Math.round(_.getTime() / 1000),
288
201
  startTime: (_) => Math.round(_.getTime() / 1000),
289
202
  }));
290
- return new __HttpRequest({
291
- protocol,
292
- hostname,
293
- port,
294
- method: "POST",
295
- headers,
296
- path: resolvedPath,
297
- body,
298
- });
203
+ b.m("POST").h(headers).b(body);
204
+ return b.build();
299
205
  };
300
206
  export const se_GetAppCommand = async (input, context) => {
301
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
207
+ const b = rb(input, context);
302
208
  const headers = {};
303
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}";
304
- resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
209
+ b.bp("/apps/{appId}");
210
+ b.p("appId", () => input.appId, "{appId}", false);
305
211
  let body;
306
- return new __HttpRequest({
307
- protocol,
308
- hostname,
309
- port,
310
- method: "GET",
311
- headers,
312
- path: resolvedPath,
313
- body,
314
- });
212
+ b.m("GET").h(headers).b(body);
213
+ return b.build();
315
214
  };
316
215
  export const se_GetArtifactUrlCommand = async (input, context) => {
317
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
216
+ const b = rb(input, context);
318
217
  const headers = {};
319
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/artifacts/{artifactId}";
320
- resolvedPath = __resolvedPath(resolvedPath, input, "artifactId", () => input.artifactId, "{artifactId}", false);
218
+ b.bp("/artifacts/{artifactId}");
219
+ b.p("artifactId", () => input.artifactId, "{artifactId}", false);
321
220
  let body;
322
- return new __HttpRequest({
323
- protocol,
324
- hostname,
325
- port,
326
- method: "GET",
327
- headers,
328
- path: resolvedPath,
329
- body,
330
- });
221
+ b.m("GET").h(headers).b(body);
222
+ return b.build();
331
223
  };
332
224
  export const se_GetBackendEnvironmentCommand = async (input, context) => {
333
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
225
+ const b = rb(input, context);
334
226
  const headers = {};
335
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
336
- "/apps/{appId}/backendenvironments/{environmentName}";
337
- resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
338
- resolvedPath = __resolvedPath(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
227
+ b.bp("/apps/{appId}/backendenvironments/{environmentName}");
228
+ b.p("appId", () => input.appId, "{appId}", false);
229
+ b.p("environmentName", () => input.environmentName, "{environmentName}", false);
339
230
  let body;
340
- return new __HttpRequest({
341
- protocol,
342
- hostname,
343
- port,
344
- method: "GET",
345
- headers,
346
- path: resolvedPath,
347
- body,
348
- });
231
+ b.m("GET").h(headers).b(body);
232
+ return b.build();
349
233
  };
350
234
  export const se_GetBranchCommand = async (input, context) => {
351
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
235
+ const b = rb(input, context);
352
236
  const headers = {};
353
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/branches/{branchName}";
354
- resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
355
- resolvedPath = __resolvedPath(resolvedPath, input, "branchName", () => input.branchName, "{branchName}", false);
237
+ b.bp("/apps/{appId}/branches/{branchName}");
238
+ b.p("appId", () => input.appId, "{appId}", false);
239
+ b.p("branchName", () => input.branchName, "{branchName}", false);
356
240
  let body;
357
- return new __HttpRequest({
358
- protocol,
359
- hostname,
360
- port,
361
- method: "GET",
362
- headers,
363
- path: resolvedPath,
364
- body,
365
- });
241
+ b.m("GET").h(headers).b(body);
242
+ return b.build();
366
243
  };
367
244
  export const se_GetDomainAssociationCommand = async (input, context) => {
368
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
245
+ const b = rb(input, context);
369
246
  const headers = {};
370
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/domains/{domainName}";
371
- resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
372
- resolvedPath = __resolvedPath(resolvedPath, input, "domainName", () => input.domainName, "{domainName}", false);
247
+ b.bp("/apps/{appId}/domains/{domainName}");
248
+ b.p("appId", () => input.appId, "{appId}", false);
249
+ b.p("domainName", () => input.domainName, "{domainName}", false);
373
250
  let body;
374
- return new __HttpRequest({
375
- protocol,
376
- hostname,
377
- port,
378
- method: "GET",
379
- headers,
380
- path: resolvedPath,
381
- body,
382
- });
251
+ b.m("GET").h(headers).b(body);
252
+ return b.build();
383
253
  };
384
254
  export const se_GetJobCommand = async (input, context) => {
385
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
255
+ const b = rb(input, context);
386
256
  const headers = {};
387
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
388
- "/apps/{appId}/branches/{branchName}/jobs/{jobId}";
389
- resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
390
- resolvedPath = __resolvedPath(resolvedPath, input, "branchName", () => input.branchName, "{branchName}", false);
391
- resolvedPath = __resolvedPath(resolvedPath, input, "jobId", () => input.jobId, "{jobId}", false);
257
+ b.bp("/apps/{appId}/branches/{branchName}/jobs/{jobId}");
258
+ b.p("appId", () => input.appId, "{appId}", false);
259
+ b.p("branchName", () => input.branchName, "{branchName}", false);
260
+ b.p("jobId", () => input.jobId, "{jobId}", false);
392
261
  let body;
393
- return new __HttpRequest({
394
- protocol,
395
- hostname,
396
- port,
397
- method: "GET",
398
- headers,
399
- path: resolvedPath,
400
- body,
401
- });
262
+ b.m("GET").h(headers).b(body);
263
+ return b.build();
402
264
  };
403
265
  export const se_GetWebhookCommand = async (input, context) => {
404
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
266
+ const b = rb(input, context);
405
267
  const headers = {};
406
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/webhooks/{webhookId}";
407
- resolvedPath = __resolvedPath(resolvedPath, input, "webhookId", () => input.webhookId, "{webhookId}", false);
268
+ b.bp("/webhooks/{webhookId}");
269
+ b.p("webhookId", () => input.webhookId, "{webhookId}", false);
408
270
  let body;
409
- return new __HttpRequest({
410
- protocol,
411
- hostname,
412
- port,
413
- method: "GET",
414
- headers,
415
- path: resolvedPath,
416
- body,
417
- });
271
+ b.m("GET").h(headers).b(body);
272
+ return b.build();
418
273
  };
419
274
  export const se_ListAppsCommand = async (input, context) => {
420
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
275
+ const b = rb(input, context);
421
276
  const headers = {};
422
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps";
277
+ b.bp("/apps");
423
278
  const query = map({
424
- nextToken: [, input.nextToken],
425
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
279
+ [_nT]: [, input[_nT]],
280
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
426
281
  });
427
282
  let body;
428
- return new __HttpRequest({
429
- protocol,
430
- hostname,
431
- port,
432
- method: "GET",
433
- headers,
434
- path: resolvedPath,
435
- query,
436
- body,
437
- });
283
+ b.m("GET").h(headers).q(query).b(body);
284
+ return b.build();
438
285
  };
439
286
  export const se_ListArtifactsCommand = async (input, context) => {
440
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
287
+ const b = rb(input, context);
441
288
  const headers = {};
442
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
443
- "/apps/{appId}/branches/{branchName}/jobs/{jobId}/artifacts";
444
- resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
445
- resolvedPath = __resolvedPath(resolvedPath, input, "branchName", () => input.branchName, "{branchName}", false);
446
- resolvedPath = __resolvedPath(resolvedPath, input, "jobId", () => input.jobId, "{jobId}", false);
289
+ b.bp("/apps/{appId}/branches/{branchName}/jobs/{jobId}/artifacts");
290
+ b.p("appId", () => input.appId, "{appId}", false);
291
+ b.p("branchName", () => input.branchName, "{branchName}", false);
292
+ b.p("jobId", () => input.jobId, "{jobId}", false);
447
293
  const query = map({
448
- nextToken: [, input.nextToken],
449
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
294
+ [_nT]: [, input[_nT]],
295
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
450
296
  });
451
297
  let body;
452
- return new __HttpRequest({
453
- protocol,
454
- hostname,
455
- port,
456
- method: "GET",
457
- headers,
458
- path: resolvedPath,
459
- query,
460
- body,
461
- });
298
+ b.m("GET").h(headers).q(query).b(body);
299
+ return b.build();
462
300
  };
463
301
  export const se_ListBackendEnvironmentsCommand = async (input, context) => {
464
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
302
+ const b = rb(input, context);
465
303
  const headers = {};
466
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/backendenvironments";
467
- resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
304
+ b.bp("/apps/{appId}/backendenvironments");
305
+ b.p("appId", () => input.appId, "{appId}", false);
468
306
  const query = map({
469
- environmentName: [, input.environmentName],
470
- nextToken: [, input.nextToken],
471
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
307
+ [_eN]: [, input[_eN]],
308
+ [_nT]: [, input[_nT]],
309
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
472
310
  });
473
311
  let body;
474
- return new __HttpRequest({
475
- protocol,
476
- hostname,
477
- port,
478
- method: "GET",
479
- headers,
480
- path: resolvedPath,
481
- query,
482
- body,
483
- });
312
+ b.m("GET").h(headers).q(query).b(body);
313
+ return b.build();
484
314
  };
485
315
  export const se_ListBranchesCommand = async (input, context) => {
486
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
316
+ const b = rb(input, context);
487
317
  const headers = {};
488
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/branches";
489
- resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
318
+ b.bp("/apps/{appId}/branches");
319
+ b.p("appId", () => input.appId, "{appId}", false);
490
320
  const query = map({
491
- nextToken: [, input.nextToken],
492
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
321
+ [_nT]: [, input[_nT]],
322
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
493
323
  });
494
324
  let body;
495
- return new __HttpRequest({
496
- protocol,
497
- hostname,
498
- port,
499
- method: "GET",
500
- headers,
501
- path: resolvedPath,
502
- query,
503
- body,
504
- });
325
+ b.m("GET").h(headers).q(query).b(body);
326
+ return b.build();
505
327
  };
506
328
  export const se_ListDomainAssociationsCommand = async (input, context) => {
507
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
329
+ const b = rb(input, context);
508
330
  const headers = {};
509
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/domains";
510
- resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
331
+ b.bp("/apps/{appId}/domains");
332
+ b.p("appId", () => input.appId, "{appId}", false);
511
333
  const query = map({
512
- nextToken: [, input.nextToken],
513
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
334
+ [_nT]: [, input[_nT]],
335
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
514
336
  });
515
337
  let body;
516
- return new __HttpRequest({
517
- protocol,
518
- hostname,
519
- port,
520
- method: "GET",
521
- headers,
522
- path: resolvedPath,
523
- query,
524
- body,
525
- });
338
+ b.m("GET").h(headers).q(query).b(body);
339
+ return b.build();
526
340
  };
527
341
  export const se_ListJobsCommand = async (input, context) => {
528
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
342
+ const b = rb(input, context);
529
343
  const headers = {};
530
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/branches/{branchName}/jobs";
531
- resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
532
- resolvedPath = __resolvedPath(resolvedPath, input, "branchName", () => input.branchName, "{branchName}", false);
344
+ b.bp("/apps/{appId}/branches/{branchName}/jobs");
345
+ b.p("appId", () => input.appId, "{appId}", false);
346
+ b.p("branchName", () => input.branchName, "{branchName}", false);
533
347
  const query = map({
534
- nextToken: [, input.nextToken],
535
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
348
+ [_nT]: [, input[_nT]],
349
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
536
350
  });
537
351
  let body;
538
- return new __HttpRequest({
539
- protocol,
540
- hostname,
541
- port,
542
- method: "GET",
543
- headers,
544
- path: resolvedPath,
545
- query,
546
- body,
547
- });
352
+ b.m("GET").h(headers).q(query).b(body);
353
+ return b.build();
548
354
  };
549
355
  export const se_ListTagsForResourceCommand = async (input, context) => {
550
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
356
+ const b = rb(input, context);
551
357
  const headers = {};
552
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
553
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
358
+ b.bp("/tags/{resourceArn}");
359
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
554
360
  let body;
555
- return new __HttpRequest({
556
- protocol,
557
- hostname,
558
- port,
559
- method: "GET",
560
- headers,
561
- path: resolvedPath,
562
- body,
563
- });
361
+ b.m("GET").h(headers).b(body);
362
+ return b.build();
564
363
  };
565
364
  export const se_ListWebhooksCommand = async (input, context) => {
566
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
365
+ const b = rb(input, context);
567
366
  const headers = {};
568
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/webhooks";
569
- resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
367
+ b.bp("/apps/{appId}/webhooks");
368
+ b.p("appId", () => input.appId, "{appId}", false);
570
369
  const query = map({
571
- nextToken: [, input.nextToken],
572
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
370
+ [_nT]: [, input[_nT]],
371
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
573
372
  });
574
373
  let body;
575
- return new __HttpRequest({
576
- protocol,
577
- hostname,
578
- port,
579
- method: "GET",
580
- headers,
581
- path: resolvedPath,
582
- query,
583
- body,
584
- });
374
+ b.m("GET").h(headers).q(query).b(body);
375
+ return b.build();
585
376
  };
586
377
  export const se_StartDeploymentCommand = async (input, context) => {
587
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
378
+ const b = rb(input, context);
588
379
  const headers = {
589
380
  "content-type": "application/json",
590
381
  };
591
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
592
- "/apps/{appId}/branches/{branchName}/deployments/start";
593
- resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
594
- resolvedPath = __resolvedPath(resolvedPath, input, "branchName", () => input.branchName, "{branchName}", false);
382
+ b.bp("/apps/{appId}/branches/{branchName}/deployments/start");
383
+ b.p("appId", () => input.appId, "{appId}", false);
384
+ b.p("branchName", () => input.branchName, "{branchName}", false);
595
385
  let body;
596
386
  body = JSON.stringify(take(input, {
597
387
  jobId: [],
598
388
  sourceUrl: [],
599
389
  }));
600
- return new __HttpRequest({
601
- protocol,
602
- hostname,
603
- port,
604
- method: "POST",
605
- headers,
606
- path: resolvedPath,
607
- body,
608
- });
390
+ b.m("POST").h(headers).b(body);
391
+ return b.build();
609
392
  };
610
393
  export const se_StartJobCommand = async (input, context) => {
611
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
394
+ const b = rb(input, context);
612
395
  const headers = {
613
396
  "content-type": "application/json",
614
397
  };
615
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/branches/{branchName}/jobs";
616
- resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
617
- resolvedPath = __resolvedPath(resolvedPath, input, "branchName", () => input.branchName, "{branchName}", false);
398
+ b.bp("/apps/{appId}/branches/{branchName}/jobs");
399
+ b.p("appId", () => input.appId, "{appId}", false);
400
+ b.p("branchName", () => input.branchName, "{branchName}", false);
618
401
  let body;
619
402
  body = JSON.stringify(take(input, {
620
403
  commitId: [],
@@ -624,86 +407,56 @@ export const se_StartJobCommand = async (input, context) => {
624
407
  jobReason: [],
625
408
  jobType: [],
626
409
  }));
627
- return new __HttpRequest({
628
- protocol,
629
- hostname,
630
- port,
631
- method: "POST",
632
- headers,
633
- path: resolvedPath,
634
- body,
635
- });
410
+ b.m("POST").h(headers).b(body);
411
+ return b.build();
636
412
  };
637
413
  export const se_StopJobCommand = async (input, context) => {
638
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
414
+ const b = rb(input, context);
639
415
  const headers = {};
640
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
641
- "/apps/{appId}/branches/{branchName}/jobs/{jobId}/stop";
642
- resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
643
- resolvedPath = __resolvedPath(resolvedPath, input, "branchName", () => input.branchName, "{branchName}", false);
644
- resolvedPath = __resolvedPath(resolvedPath, input, "jobId", () => input.jobId, "{jobId}", false);
416
+ b.bp("/apps/{appId}/branches/{branchName}/jobs/{jobId}/stop");
417
+ b.p("appId", () => input.appId, "{appId}", false);
418
+ b.p("branchName", () => input.branchName, "{branchName}", false);
419
+ b.p("jobId", () => input.jobId, "{jobId}", false);
645
420
  let body;
646
- return new __HttpRequest({
647
- protocol,
648
- hostname,
649
- port,
650
- method: "DELETE",
651
- headers,
652
- path: resolvedPath,
653
- body,
654
- });
421
+ b.m("DELETE").h(headers).b(body);
422
+ return b.build();
655
423
  };
656
424
  export const se_TagResourceCommand = async (input, context) => {
657
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
425
+ const b = rb(input, context);
658
426
  const headers = {
659
427
  "content-type": "application/json",
660
428
  };
661
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
662
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
429
+ b.bp("/tags/{resourceArn}");
430
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
663
431
  let body;
664
432
  body = JSON.stringify(take(input, {
665
433
  tags: (_) => _json(_),
666
434
  }));
667
- return new __HttpRequest({
668
- protocol,
669
- hostname,
670
- port,
671
- method: "POST",
672
- headers,
673
- path: resolvedPath,
674
- body,
675
- });
435
+ b.m("POST").h(headers).b(body);
436
+ return b.build();
676
437
  };
677
438
  export const se_UntagResourceCommand = async (input, context) => {
678
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
439
+ const b = rb(input, context);
679
440
  const headers = {};
680
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
681
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
441
+ b.bp("/tags/{resourceArn}");
442
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
682
443
  const query = map({
683
- tagKeys: [
444
+ [_tK]: [
684
445
  __expectNonNull(input.tagKeys, `tagKeys`) != null,
685
- () => (input.tagKeys || []).map((_entry) => _entry),
446
+ () => (input[_tK] || []).map((_entry) => _entry),
686
447
  ],
687
448
  });
688
449
  let body;
689
- return new __HttpRequest({
690
- protocol,
691
- hostname,
692
- port,
693
- method: "DELETE",
694
- headers,
695
- path: resolvedPath,
696
- query,
697
- body,
698
- });
450
+ b.m("DELETE").h(headers).q(query).b(body);
451
+ return b.build();
699
452
  };
700
453
  export const se_UpdateAppCommand = async (input, context) => {
701
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
454
+ const b = rb(input, context);
702
455
  const headers = {
703
456
  "content-type": "application/json",
704
457
  };
705
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}";
706
- resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
458
+ b.bp("/apps/{appId}");
459
+ b.p("appId", () => input.appId, "{appId}", false);
707
460
  let body;
708
461
  body = JSON.stringify(take(input, {
709
462
  accessToken: [],
@@ -725,24 +478,17 @@ export const se_UpdateAppCommand = async (input, context) => {
725
478
  platform: [],
726
479
  repository: [],
727
480
  }));
728
- return new __HttpRequest({
729
- protocol,
730
- hostname,
731
- port,
732
- method: "POST",
733
- headers,
734
- path: resolvedPath,
735
- body,
736
- });
481
+ b.m("POST").h(headers).b(body);
482
+ return b.build();
737
483
  };
738
484
  export const se_UpdateBranchCommand = async (input, context) => {
739
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
485
+ const b = rb(input, context);
740
486
  const headers = {
741
487
  "content-type": "application/json",
742
488
  };
743
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/branches/{branchName}";
744
- resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
745
- resolvedPath = __resolvedPath(resolvedPath, input, "branchName", () => input.branchName, "{branchName}", false);
489
+ b.bp("/apps/{appId}/branches/{branchName}");
490
+ b.p("appId", () => input.appId, "{appId}", false);
491
+ b.p("branchName", () => input.branchName, "{branchName}", false);
746
492
  let body;
747
493
  body = JSON.stringify(take(input, {
748
494
  backend: (_) => _json(_),
@@ -762,24 +508,17 @@ export const se_UpdateBranchCommand = async (input, context) => {
762
508
  stage: [],
763
509
  ttl: [],
764
510
  }));
765
- return new __HttpRequest({
766
- protocol,
767
- hostname,
768
- port,
769
- method: "POST",
770
- headers,
771
- path: resolvedPath,
772
- body,
773
- });
511
+ b.m("POST").h(headers).b(body);
512
+ return b.build();
774
513
  };
775
514
  export const se_UpdateDomainAssociationCommand = async (input, context) => {
776
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
515
+ const b = rb(input, context);
777
516
  const headers = {
778
517
  "content-type": "application/json",
779
518
  };
780
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/domains/{domainName}";
781
- resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
782
- resolvedPath = __resolvedPath(resolvedPath, input, "domainName", () => input.domainName, "{domainName}", false);
519
+ b.bp("/apps/{appId}/domains/{domainName}");
520
+ b.p("appId", () => input.appId, "{appId}", false);
521
+ b.p("domainName", () => input.domainName, "{domainName}", false);
783
522
  let body;
784
523
  body = JSON.stringify(take(input, {
785
524
  autoSubDomainCreationPatterns: (_) => _json(_),
@@ -787,37 +526,23 @@ export const se_UpdateDomainAssociationCommand = async (input, context) => {
787
526
  enableAutoSubDomain: [],
788
527
  subDomainSettings: (_) => _json(_),
789
528
  }));
790
- return new __HttpRequest({
791
- protocol,
792
- hostname,
793
- port,
794
- method: "POST",
795
- headers,
796
- path: resolvedPath,
797
- body,
798
- });
529
+ b.m("POST").h(headers).b(body);
530
+ return b.build();
799
531
  };
800
532
  export const se_UpdateWebhookCommand = async (input, context) => {
801
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
533
+ const b = rb(input, context);
802
534
  const headers = {
803
535
  "content-type": "application/json",
804
536
  };
805
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/webhooks/{webhookId}";
806
- resolvedPath = __resolvedPath(resolvedPath, input, "webhookId", () => input.webhookId, "{webhookId}", false);
537
+ b.bp("/webhooks/{webhookId}");
538
+ b.p("webhookId", () => input.webhookId, "{webhookId}", false);
807
539
  let body;
808
540
  body = JSON.stringify(take(input, {
809
541
  branchName: [],
810
542
  description: [],
811
543
  }));
812
- return new __HttpRequest({
813
- protocol,
814
- hostname,
815
- port,
816
- method: "POST",
817
- headers,
818
- path: resolvedPath,
819
- body,
820
- });
544
+ b.m("POST").h(headers).b(body);
545
+ return b.build();
821
546
  };
822
547
  export const de_CreateAppCommand = async (output, context) => {
823
548
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2699,6 +2424,10 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
2699
2424
  value !== "" &&
2700
2425
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2701
2426
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2427
+ const _eN = "environmentName";
2428
+ const _mR = "maxResults";
2429
+ const _nT = "nextToken";
2430
+ const _tK = "tagKeys";
2702
2431
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2703
2432
  if (encoded.length) {
2704
2433
  return JSON.parse(encoded);