@aws-sdk/client-emr-containers 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.
@@ -2,36 +2,28 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StartJobRunCommand = exports.de_ListVirtualClustersCommand = exports.de_ListTagsForResourceCommand = exports.de_ListManagedEndpointsCommand = exports.de_ListJobTemplatesCommand = exports.de_ListJobRunsCommand = exports.de_GetManagedEndpointSessionCredentialsCommand = exports.de_DescribeVirtualClusterCommand = exports.de_DescribeManagedEndpointCommand = exports.de_DescribeJobTemplateCommand = exports.de_DescribeJobRunCommand = exports.de_DeleteVirtualClusterCommand = exports.de_DeleteManagedEndpointCommand = exports.de_DeleteJobTemplateCommand = exports.de_CreateVirtualClusterCommand = exports.de_CreateManagedEndpointCommand = exports.de_CreateJobTemplateCommand = exports.de_CancelJobRunCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StartJobRunCommand = exports.se_ListVirtualClustersCommand = exports.se_ListTagsForResourceCommand = exports.se_ListManagedEndpointsCommand = exports.se_ListJobTemplatesCommand = exports.se_ListJobRunsCommand = exports.se_GetManagedEndpointSessionCredentialsCommand = exports.se_DescribeVirtualClusterCommand = exports.se_DescribeManagedEndpointCommand = exports.se_DescribeJobTemplateCommand = exports.se_DescribeJobRunCommand = exports.se_DeleteVirtualClusterCommand = exports.se_DeleteManagedEndpointCommand = exports.se_DeleteJobTemplateCommand = exports.se_CreateVirtualClusterCommand = exports.se_CreateManagedEndpointCommand = exports.se_CreateJobTemplateCommand = exports.se_CancelJobRunCommand = void 0;
4
4
  const core_1 = require("@aws-sdk/core");
5
- const protocol_http_1 = require("@smithy/protocol-http");
5
+ const core_2 = require("@smithy/core");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  const uuid_1 = require("uuid");
8
8
  const EMRContainersServiceException_1 = require("../models/EMRContainersServiceException");
9
9
  const models_0_1 = require("../models/models_0");
10
10
  const se_CancelJobRunCommand = async (input, context) => {
11
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
11
+ const b = (0, core_2.requestBuilder)(input, context);
12
12
  const headers = {};
13
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
14
- "/virtualclusters/{virtualClusterId}/jobruns/{id}";
15
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
16
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
13
+ b.bp("/virtualclusters/{virtualClusterId}/jobruns/{id}");
14
+ b.p("id", () => input.id, "{id}", false);
15
+ b.p("virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
17
16
  let body;
18
- return new protocol_http_1.HttpRequest({
19
- protocol,
20
- hostname,
21
- port,
22
- method: "DELETE",
23
- headers,
24
- path: resolvedPath,
25
- body,
26
- });
17
+ b.m("DELETE").h(headers).b(body);
18
+ return b.build();
27
19
  };
28
20
  exports.se_CancelJobRunCommand = se_CancelJobRunCommand;
29
21
  const se_CreateJobTemplateCommand = async (input, context) => {
30
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
22
+ const b = (0, core_2.requestBuilder)(input, context);
31
23
  const headers = {
32
24
  "content-type": "application/json",
33
25
  };
34
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobtemplates";
26
+ b.bp("/jobtemplates");
35
27
  let body;
36
28
  body = JSON.stringify((0, smithy_client_1.take)(input, {
37
29
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
@@ -40,25 +32,17 @@ const se_CreateJobTemplateCommand = async (input, context) => {
40
32
  name: [],
41
33
  tags: (_) => (0, smithy_client_1._json)(_),
42
34
  }));
43
- return new protocol_http_1.HttpRequest({
44
- protocol,
45
- hostname,
46
- port,
47
- method: "POST",
48
- headers,
49
- path: resolvedPath,
50
- body,
51
- });
35
+ b.m("POST").h(headers).b(body);
36
+ return b.build();
52
37
  };
53
38
  exports.se_CreateJobTemplateCommand = se_CreateJobTemplateCommand;
54
39
  const se_CreateManagedEndpointCommand = async (input, context) => {
55
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
40
+ const b = (0, core_2.requestBuilder)(input, context);
56
41
  const headers = {
57
42
  "content-type": "application/json",
58
43
  };
59
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
60
- "/virtualclusters/{virtualClusterId}/endpoints";
61
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
44
+ b.bp("/virtualclusters/{virtualClusterId}/endpoints");
45
+ b.p("virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
62
46
  let body;
63
47
  body = JSON.stringify((0, smithy_client_1.take)(input, {
64
48
  certificateArn: [],
@@ -70,23 +54,16 @@ const se_CreateManagedEndpointCommand = async (input, context) => {
70
54
  tags: (_) => (0, smithy_client_1._json)(_),
71
55
  type: [],
72
56
  }));
73
- return new protocol_http_1.HttpRequest({
74
- protocol,
75
- hostname,
76
- port,
77
- method: "POST",
78
- headers,
79
- path: resolvedPath,
80
- body,
81
- });
57
+ b.m("POST").h(headers).b(body);
58
+ return b.build();
82
59
  };
83
60
  exports.se_CreateManagedEndpointCommand = se_CreateManagedEndpointCommand;
84
61
  const se_CreateVirtualClusterCommand = async (input, context) => {
85
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
62
+ const b = (0, core_2.requestBuilder)(input, context);
86
63
  const headers = {
87
64
  "content-type": "application/json",
88
65
  };
89
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/virtualclusters";
66
+ b.bp("/virtualclusters");
90
67
  let body;
91
68
  body = JSON.stringify((0, smithy_client_1.take)(input, {
92
69
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
@@ -94,151 +71,91 @@ const se_CreateVirtualClusterCommand = async (input, context) => {
94
71
  name: [],
95
72
  tags: (_) => (0, smithy_client_1._json)(_),
96
73
  }));
97
- return new protocol_http_1.HttpRequest({
98
- protocol,
99
- hostname,
100
- port,
101
- method: "POST",
102
- headers,
103
- path: resolvedPath,
104
- body,
105
- });
74
+ b.m("POST").h(headers).b(body);
75
+ return b.build();
106
76
  };
107
77
  exports.se_CreateVirtualClusterCommand = se_CreateVirtualClusterCommand;
108
78
  const se_DeleteJobTemplateCommand = async (input, context) => {
109
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
79
+ const b = (0, core_2.requestBuilder)(input, context);
110
80
  const headers = {};
111
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobtemplates/{id}";
112
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
81
+ b.bp("/jobtemplates/{id}");
82
+ b.p("id", () => input.id, "{id}", false);
113
83
  let body;
114
- return new protocol_http_1.HttpRequest({
115
- protocol,
116
- hostname,
117
- port,
118
- method: "DELETE",
119
- headers,
120
- path: resolvedPath,
121
- body,
122
- });
84
+ b.m("DELETE").h(headers).b(body);
85
+ return b.build();
123
86
  };
124
87
  exports.se_DeleteJobTemplateCommand = se_DeleteJobTemplateCommand;
125
88
  const se_DeleteManagedEndpointCommand = async (input, context) => {
126
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
89
+ const b = (0, core_2.requestBuilder)(input, context);
127
90
  const headers = {};
128
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
129
- "/virtualclusters/{virtualClusterId}/endpoints/{id}";
130
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
131
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
91
+ b.bp("/virtualclusters/{virtualClusterId}/endpoints/{id}");
92
+ b.p("id", () => input.id, "{id}", false);
93
+ b.p("virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
132
94
  let body;
133
- return new protocol_http_1.HttpRequest({
134
- protocol,
135
- hostname,
136
- port,
137
- method: "DELETE",
138
- headers,
139
- path: resolvedPath,
140
- body,
141
- });
95
+ b.m("DELETE").h(headers).b(body);
96
+ return b.build();
142
97
  };
143
98
  exports.se_DeleteManagedEndpointCommand = se_DeleteManagedEndpointCommand;
144
99
  const se_DeleteVirtualClusterCommand = async (input, context) => {
145
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
100
+ const b = (0, core_2.requestBuilder)(input, context);
146
101
  const headers = {};
147
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/virtualclusters/{id}";
148
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
102
+ b.bp("/virtualclusters/{id}");
103
+ b.p("id", () => input.id, "{id}", false);
149
104
  let body;
150
- return new protocol_http_1.HttpRequest({
151
- protocol,
152
- hostname,
153
- port,
154
- method: "DELETE",
155
- headers,
156
- path: resolvedPath,
157
- body,
158
- });
105
+ b.m("DELETE").h(headers).b(body);
106
+ return b.build();
159
107
  };
160
108
  exports.se_DeleteVirtualClusterCommand = se_DeleteVirtualClusterCommand;
161
109
  const se_DescribeJobRunCommand = async (input, context) => {
162
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
110
+ const b = (0, core_2.requestBuilder)(input, context);
163
111
  const headers = {};
164
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
165
- "/virtualclusters/{virtualClusterId}/jobruns/{id}";
166
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
167
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
112
+ b.bp("/virtualclusters/{virtualClusterId}/jobruns/{id}");
113
+ b.p("id", () => input.id, "{id}", false);
114
+ b.p("virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
168
115
  let body;
169
- return new protocol_http_1.HttpRequest({
170
- protocol,
171
- hostname,
172
- port,
173
- method: "GET",
174
- headers,
175
- path: resolvedPath,
176
- body,
177
- });
116
+ b.m("GET").h(headers).b(body);
117
+ return b.build();
178
118
  };
179
119
  exports.se_DescribeJobRunCommand = se_DescribeJobRunCommand;
180
120
  const se_DescribeJobTemplateCommand = async (input, context) => {
181
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
121
+ const b = (0, core_2.requestBuilder)(input, context);
182
122
  const headers = {};
183
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobtemplates/{id}";
184
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
123
+ b.bp("/jobtemplates/{id}");
124
+ b.p("id", () => input.id, "{id}", false);
185
125
  let body;
186
- return new protocol_http_1.HttpRequest({
187
- protocol,
188
- hostname,
189
- port,
190
- method: "GET",
191
- headers,
192
- path: resolvedPath,
193
- body,
194
- });
126
+ b.m("GET").h(headers).b(body);
127
+ return b.build();
195
128
  };
196
129
  exports.se_DescribeJobTemplateCommand = se_DescribeJobTemplateCommand;
197
130
  const se_DescribeManagedEndpointCommand = async (input, context) => {
198
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
131
+ const b = (0, core_2.requestBuilder)(input, context);
199
132
  const headers = {};
200
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
201
- "/virtualclusters/{virtualClusterId}/endpoints/{id}";
202
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
203
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
133
+ b.bp("/virtualclusters/{virtualClusterId}/endpoints/{id}");
134
+ b.p("id", () => input.id, "{id}", false);
135
+ b.p("virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
204
136
  let body;
205
- return new protocol_http_1.HttpRequest({
206
- protocol,
207
- hostname,
208
- port,
209
- method: "GET",
210
- headers,
211
- path: resolvedPath,
212
- body,
213
- });
137
+ b.m("GET").h(headers).b(body);
138
+ return b.build();
214
139
  };
215
140
  exports.se_DescribeManagedEndpointCommand = se_DescribeManagedEndpointCommand;
216
141
  const se_DescribeVirtualClusterCommand = async (input, context) => {
217
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
142
+ const b = (0, core_2.requestBuilder)(input, context);
218
143
  const headers = {};
219
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/virtualclusters/{id}";
220
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
144
+ b.bp("/virtualclusters/{id}");
145
+ b.p("id", () => input.id, "{id}", false);
221
146
  let body;
222
- return new protocol_http_1.HttpRequest({
223
- protocol,
224
- hostname,
225
- port,
226
- method: "GET",
227
- headers,
228
- path: resolvedPath,
229
- body,
230
- });
147
+ b.m("GET").h(headers).b(body);
148
+ return b.build();
231
149
  };
232
150
  exports.se_DescribeVirtualClusterCommand = se_DescribeVirtualClusterCommand;
233
151
  const se_GetManagedEndpointSessionCredentialsCommand = async (input, context) => {
234
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
152
+ const b = (0, core_2.requestBuilder)(input, context);
235
153
  const headers = {
236
154
  "content-type": "application/json",
237
155
  };
238
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
239
- "/virtualclusters/{virtualClusterIdentifier}/endpoints/{endpointIdentifier}/credentials";
240
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "endpointIdentifier", () => input.endpointIdentifier, "{endpointIdentifier}", false);
241
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "virtualClusterIdentifier", () => input.virtualClusterIdentifier, "{virtualClusterIdentifier}", false);
156
+ b.bp("/virtualclusters/{virtualClusterIdentifier}/endpoints/{endpointIdentifier}/credentials");
157
+ b.p("endpointIdentifier", () => input.endpointIdentifier, "{endpointIdentifier}", false);
158
+ b.p("virtualClusterIdentifier", () => input.virtualClusterIdentifier, "{virtualClusterIdentifier}", false);
242
159
  let body;
243
160
  body = JSON.stringify((0, smithy_client_1.take)(input, {
244
161
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
@@ -247,169 +164,96 @@ const se_GetManagedEndpointSessionCredentialsCommand = async (input, context) =>
247
164
  executionRoleArn: [],
248
165
  logContext: [],
249
166
  }));
250
- return new protocol_http_1.HttpRequest({
251
- protocol,
252
- hostname,
253
- port,
254
- method: "POST",
255
- headers,
256
- path: resolvedPath,
257
- body,
258
- });
167
+ b.m("POST").h(headers).b(body);
168
+ return b.build();
259
169
  };
260
170
  exports.se_GetManagedEndpointSessionCredentialsCommand = se_GetManagedEndpointSessionCredentialsCommand;
261
171
  const se_ListJobRunsCommand = async (input, context) => {
262
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
172
+ const b = (0, core_2.requestBuilder)(input, context);
263
173
  const headers = {};
264
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
265
- "/virtualclusters/{virtualClusterId}/jobruns";
266
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
174
+ b.bp("/virtualclusters/{virtualClusterId}/jobruns");
175
+ b.p("virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
267
176
  const query = (0, smithy_client_1.map)({
268
- createdBefore: [
269
- () => input.createdBefore !== void 0,
270
- () => (input.createdBefore.toISOString().split(".")[0] + "Z").toString(),
271
- ],
272
- createdAfter: [
273
- () => input.createdAfter !== void 0,
274
- () => (input.createdAfter.toISOString().split(".")[0] + "Z").toString(),
275
- ],
276
- name: [, input.name],
277
- states: [() => input.states !== void 0, () => (input.states || []).map((_entry) => _entry)],
278
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
279
- nextToken: [, input.nextToken],
177
+ [_cB]: [() => input.createdBefore !== void 0, () => (input[_cB].toISOString().split(".")[0] + "Z").toString()],
178
+ [_cA]: [() => input.createdAfter !== void 0, () => (input[_cA].toISOString().split(".")[0] + "Z").toString()],
179
+ [_n]: [, input[_n]],
180
+ [_s]: [() => input.states !== void 0, () => (input[_s] || []).map((_entry) => _entry)],
181
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
182
+ [_nT]: [, input[_nT]],
280
183
  });
281
184
  let body;
282
- return new protocol_http_1.HttpRequest({
283
- protocol,
284
- hostname,
285
- port,
286
- method: "GET",
287
- headers,
288
- path: resolvedPath,
289
- query,
290
- body,
291
- });
185
+ b.m("GET").h(headers).q(query).b(body);
186
+ return b.build();
292
187
  };
293
188
  exports.se_ListJobRunsCommand = se_ListJobRunsCommand;
294
189
  const se_ListJobTemplatesCommand = async (input, context) => {
295
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
190
+ const b = (0, core_2.requestBuilder)(input, context);
296
191
  const headers = {};
297
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobtemplates";
192
+ b.bp("/jobtemplates");
298
193
  const query = (0, smithy_client_1.map)({
299
- createdAfter: [
300
- () => input.createdAfter !== void 0,
301
- () => (input.createdAfter.toISOString().split(".")[0] + "Z").toString(),
302
- ],
303
- createdBefore: [
304
- () => input.createdBefore !== void 0,
305
- () => (input.createdBefore.toISOString().split(".")[0] + "Z").toString(),
306
- ],
307
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
308
- nextToken: [, input.nextToken],
194
+ [_cA]: [() => input.createdAfter !== void 0, () => (input[_cA].toISOString().split(".")[0] + "Z").toString()],
195
+ [_cB]: [() => input.createdBefore !== void 0, () => (input[_cB].toISOString().split(".")[0] + "Z").toString()],
196
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
197
+ [_nT]: [, input[_nT]],
309
198
  });
310
199
  let body;
311
- return new protocol_http_1.HttpRequest({
312
- protocol,
313
- hostname,
314
- port,
315
- method: "GET",
316
- headers,
317
- path: resolvedPath,
318
- query,
319
- body,
320
- });
200
+ b.m("GET").h(headers).q(query).b(body);
201
+ return b.build();
321
202
  };
322
203
  exports.se_ListJobTemplatesCommand = se_ListJobTemplatesCommand;
323
204
  const se_ListManagedEndpointsCommand = async (input, context) => {
324
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
205
+ const b = (0, core_2.requestBuilder)(input, context);
325
206
  const headers = {};
326
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
327
- "/virtualclusters/{virtualClusterId}/endpoints";
328
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
207
+ b.bp("/virtualclusters/{virtualClusterId}/endpoints");
208
+ b.p("virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
329
209
  const query = (0, smithy_client_1.map)({
330
- createdBefore: [
331
- () => input.createdBefore !== void 0,
332
- () => (input.createdBefore.toISOString().split(".")[0] + "Z").toString(),
333
- ],
334
- createdAfter: [
335
- () => input.createdAfter !== void 0,
336
- () => (input.createdAfter.toISOString().split(".")[0] + "Z").toString(),
337
- ],
338
- types: [() => input.types !== void 0, () => (input.types || []).map((_entry) => _entry)],
339
- states: [() => input.states !== void 0, () => (input.states || []).map((_entry) => _entry)],
340
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
341
- nextToken: [, input.nextToken],
210
+ [_cB]: [() => input.createdBefore !== void 0, () => (input[_cB].toISOString().split(".")[0] + "Z").toString()],
211
+ [_cA]: [() => input.createdAfter !== void 0, () => (input[_cA].toISOString().split(".")[0] + "Z").toString()],
212
+ [_t]: [() => input.types !== void 0, () => (input[_t] || []).map((_entry) => _entry)],
213
+ [_s]: [() => input.states !== void 0, () => (input[_s] || []).map((_entry) => _entry)],
214
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
215
+ [_nT]: [, input[_nT]],
342
216
  });
343
217
  let body;
344
- return new protocol_http_1.HttpRequest({
345
- protocol,
346
- hostname,
347
- port,
348
- method: "GET",
349
- headers,
350
- path: resolvedPath,
351
- query,
352
- body,
353
- });
218
+ b.m("GET").h(headers).q(query).b(body);
219
+ return b.build();
354
220
  };
355
221
  exports.se_ListManagedEndpointsCommand = se_ListManagedEndpointsCommand;
356
222
  const se_ListTagsForResourceCommand = async (input, context) => {
357
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
223
+ const b = (0, core_2.requestBuilder)(input, context);
358
224
  const headers = {};
359
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
360
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
225
+ b.bp("/tags/{resourceArn}");
226
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
361
227
  let body;
362
- return new protocol_http_1.HttpRequest({
363
- protocol,
364
- hostname,
365
- port,
366
- method: "GET",
367
- headers,
368
- path: resolvedPath,
369
- body,
370
- });
228
+ b.m("GET").h(headers).b(body);
229
+ return b.build();
371
230
  };
372
231
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
373
232
  const se_ListVirtualClustersCommand = async (input, context) => {
374
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
233
+ const b = (0, core_2.requestBuilder)(input, context);
375
234
  const headers = {};
376
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/virtualclusters";
235
+ b.bp("/virtualclusters");
377
236
  const query = (0, smithy_client_1.map)({
378
- containerProviderId: [, input.containerProviderId],
379
- containerProviderType: [, input.containerProviderType],
380
- createdAfter: [
381
- () => input.createdAfter !== void 0,
382
- () => (input.createdAfter.toISOString().split(".")[0] + "Z").toString(),
383
- ],
384
- createdBefore: [
385
- () => input.createdBefore !== void 0,
386
- () => (input.createdBefore.toISOString().split(".")[0] + "Z").toString(),
387
- ],
388
- states: [() => input.states !== void 0, () => (input.states || []).map((_entry) => _entry)],
389
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
390
- nextToken: [, input.nextToken],
237
+ [_cPI]: [, input[_cPI]],
238
+ [_cPT]: [, input[_cPT]],
239
+ [_cA]: [() => input.createdAfter !== void 0, () => (input[_cA].toISOString().split(".")[0] + "Z").toString()],
240
+ [_cB]: [() => input.createdBefore !== void 0, () => (input[_cB].toISOString().split(".")[0] + "Z").toString()],
241
+ [_s]: [() => input.states !== void 0, () => (input[_s] || []).map((_entry) => _entry)],
242
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
243
+ [_nT]: [, input[_nT]],
391
244
  });
392
245
  let body;
393
- return new protocol_http_1.HttpRequest({
394
- protocol,
395
- hostname,
396
- port,
397
- method: "GET",
398
- headers,
399
- path: resolvedPath,
400
- query,
401
- body,
402
- });
246
+ b.m("GET").h(headers).q(query).b(body);
247
+ return b.build();
403
248
  };
404
249
  exports.se_ListVirtualClustersCommand = se_ListVirtualClustersCommand;
405
250
  const se_StartJobRunCommand = async (input, context) => {
406
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
251
+ const b = (0, core_2.requestBuilder)(input, context);
407
252
  const headers = {
408
253
  "content-type": "application/json",
409
254
  };
410
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
411
- "/virtualclusters/{virtualClusterId}/jobruns";
412
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
255
+ b.bp("/virtualclusters/{virtualClusterId}/jobruns");
256
+ b.p("virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
413
257
  let body;
414
258
  body = JSON.stringify((0, smithy_client_1.take)(input, {
415
259
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
@@ -423,61 +267,39 @@ const se_StartJobRunCommand = async (input, context) => {
423
267
  retryPolicyConfiguration: (_) => (0, smithy_client_1._json)(_),
424
268
  tags: (_) => (0, smithy_client_1._json)(_),
425
269
  }));
426
- return new protocol_http_1.HttpRequest({
427
- protocol,
428
- hostname,
429
- port,
430
- method: "POST",
431
- headers,
432
- path: resolvedPath,
433
- body,
434
- });
270
+ b.m("POST").h(headers).b(body);
271
+ return b.build();
435
272
  };
436
273
  exports.se_StartJobRunCommand = se_StartJobRunCommand;
437
274
  const se_TagResourceCommand = async (input, context) => {
438
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
275
+ const b = (0, core_2.requestBuilder)(input, context);
439
276
  const headers = {
440
277
  "content-type": "application/json",
441
278
  };
442
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
443
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
279
+ b.bp("/tags/{resourceArn}");
280
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
444
281
  let body;
445
282
  body = JSON.stringify((0, smithy_client_1.take)(input, {
446
283
  tags: (_) => (0, smithy_client_1._json)(_),
447
284
  }));
448
- return new protocol_http_1.HttpRequest({
449
- protocol,
450
- hostname,
451
- port,
452
- method: "POST",
453
- headers,
454
- path: resolvedPath,
455
- body,
456
- });
285
+ b.m("POST").h(headers).b(body);
286
+ return b.build();
457
287
  };
458
288
  exports.se_TagResourceCommand = se_TagResourceCommand;
459
289
  const se_UntagResourceCommand = async (input, context) => {
460
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
290
+ const b = (0, core_2.requestBuilder)(input, context);
461
291
  const headers = {};
462
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
463
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
292
+ b.bp("/tags/{resourceArn}");
293
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
464
294
  const query = (0, smithy_client_1.map)({
465
- tagKeys: [
295
+ [_tK]: [
466
296
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
467
- () => (input.tagKeys || []).map((_entry) => _entry),
297
+ () => (input[_tK] || []).map((_entry) => _entry),
468
298
  ],
469
299
  });
470
300
  let body;
471
- return new protocol_http_1.HttpRequest({
472
- protocol,
473
- hostname,
474
- port,
475
- method: "DELETE",
476
- headers,
477
- path: resolvedPath,
478
- query,
479
- body,
480
- });
301
+ b.m("DELETE").h(headers).q(query).b(body);
302
+ return b.build();
481
303
  };
482
304
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
483
305
  const de_CancelJobRunCommand = async (output, context) => {
@@ -1508,6 +1330,16 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1508
1330
  value !== "" &&
1509
1331
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1510
1332
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1333
+ const _cA = "createdAfter";
1334
+ const _cB = "createdBefore";
1335
+ const _cPI = "containerProviderId";
1336
+ const _cPT = "containerProviderType";
1337
+ const _mR = "maxResults";
1338
+ const _n = "name";
1339
+ const _nT = "nextToken";
1340
+ const _s = "states";
1341
+ const _t = "types";
1342
+ const _tK = "tagKeys";
1511
1343
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1512
1344
  if (encoded.length) {
1513
1345
  return JSON.parse(encoded);
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListJobRunsCommand } from "../commands/ListJobRunsCommand";
2
3
  import { EMRContainersClient } from "../EMRContainersClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListJobRunsCommand(input), ...args);
5
- };
6
- export async function* paginateListJobRuns(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.nextToken = token;
12
- input["maxResults"] = config.pageSize;
13
- if (config.client instanceof EMRContainersClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected EMRContainers | EMRContainersClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.nextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListJobRuns = createPaginator(EMRContainersClient, ListJobRunsCommand, "nextToken", "nextToken", "maxResults");