@aws-sdk/client-batch 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.
Files changed (23) hide show
  1. package/dist-cjs/pagination/DescribeComputeEnvironmentsPaginator.js +2 -24
  2. package/dist-cjs/pagination/DescribeJobDefinitionsPaginator.js +2 -24
  3. package/dist-cjs/pagination/DescribeJobQueuesPaginator.js +2 -24
  4. package/dist-cjs/pagination/ListJobsPaginator.js +2 -24
  5. package/dist-cjs/pagination/ListSchedulingPoliciesPaginator.js +2 -24
  6. package/dist-cjs/protocols/Aws_restJson1.js +103 -271
  7. package/dist-es/pagination/DescribeComputeEnvironmentsPaginator.js +2 -23
  8. package/dist-es/pagination/DescribeJobDefinitionsPaginator.js +2 -23
  9. package/dist-es/pagination/DescribeJobQueuesPaginator.js +2 -23
  10. package/dist-es/pagination/ListJobsPaginator.js +2 -23
  11. package/dist-es/pagination/ListSchedulingPoliciesPaginator.js +2 -23
  12. package/dist-es/protocols/Aws_restJson1.js +104 -272
  13. package/dist-types/pagination/DescribeComputeEnvironmentsPaginator.d.ts +1 -1
  14. package/dist-types/pagination/DescribeJobDefinitionsPaginator.d.ts +1 -1
  15. package/dist-types/pagination/DescribeJobQueuesPaginator.d.ts +1 -1
  16. package/dist-types/pagination/ListJobsPaginator.d.ts +1 -1
  17. package/dist-types/pagination/ListSchedulingPoliciesPaginator.d.ts +1 -1
  18. package/dist-types/ts3.4/pagination/DescribeComputeEnvironmentsPaginator.d.ts +3 -3
  19. package/dist-types/ts3.4/pagination/DescribeJobDefinitionsPaginator.d.ts +3 -3
  20. package/dist-types/ts3.4/pagination/DescribeJobQueuesPaginator.d.ts +3 -3
  21. package/dist-types/ts3.4/pagination/ListJobsPaginator.d.ts +3 -3
  22. package/dist-types/ts3.4/pagination/ListSchedulingPoliciesPaginator.d.ts +3 -3
  23. package/package.json +7 -6
@@ -1,38 +1,31 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UpdateSchedulingPolicyCommand = exports.de_UpdateJobQueueCommand = exports.de_UpdateComputeEnvironmentCommand = exports.de_UntagResourceCommand = exports.de_TerminateJobCommand = exports.de_TagResourceCommand = exports.de_SubmitJobCommand = exports.de_RegisterJobDefinitionCommand = exports.de_ListTagsForResourceCommand = exports.de_ListSchedulingPoliciesCommand = exports.de_ListJobsCommand = exports.de_DescribeSchedulingPoliciesCommand = exports.de_DescribeJobsCommand = exports.de_DescribeJobQueuesCommand = exports.de_DescribeJobDefinitionsCommand = exports.de_DescribeComputeEnvironmentsCommand = exports.de_DeregisterJobDefinitionCommand = exports.de_DeleteSchedulingPolicyCommand = exports.de_DeleteJobQueueCommand = exports.de_DeleteComputeEnvironmentCommand = exports.de_CreateSchedulingPolicyCommand = exports.de_CreateJobQueueCommand = exports.de_CreateComputeEnvironmentCommand = exports.de_CancelJobCommand = exports.se_UpdateSchedulingPolicyCommand = exports.se_UpdateJobQueueCommand = exports.se_UpdateComputeEnvironmentCommand = exports.se_UntagResourceCommand = exports.se_TerminateJobCommand = exports.se_TagResourceCommand = exports.se_SubmitJobCommand = exports.se_RegisterJobDefinitionCommand = exports.se_ListTagsForResourceCommand = exports.se_ListSchedulingPoliciesCommand = exports.se_ListJobsCommand = exports.se_DescribeSchedulingPoliciesCommand = exports.se_DescribeJobsCommand = exports.se_DescribeJobQueuesCommand = exports.se_DescribeJobDefinitionsCommand = exports.se_DescribeComputeEnvironmentsCommand = exports.se_DeregisterJobDefinitionCommand = exports.se_DeleteSchedulingPolicyCommand = exports.se_DeleteJobQueueCommand = exports.se_DeleteComputeEnvironmentCommand = exports.se_CreateSchedulingPolicyCommand = exports.se_CreateJobQueueCommand = exports.se_CreateComputeEnvironmentCommand = exports.se_CancelJobCommand = void 0;
4
- const protocol_http_1 = require("@smithy/protocol-http");
4
+ const core_1 = require("@smithy/core");
5
5
  const smithy_client_1 = require("@smithy/smithy-client");
6
6
  const BatchServiceException_1 = require("../models/BatchServiceException");
7
7
  const models_0_1 = require("../models/models_0");
8
8
  const se_CancelJobCommand = async (input, context) => {
9
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
9
+ const b = (0, core_1.requestBuilder)(input, context);
10
10
  const headers = {
11
11
  "content-type": "application/json",
12
12
  };
13
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/canceljob";
13
+ b.bp("/v1/canceljob");
14
14
  let body;
15
15
  body = JSON.stringify((0, smithy_client_1.take)(input, {
16
16
  jobId: [],
17
17
  reason: [],
18
18
  }));
19
- return new protocol_http_1.HttpRequest({
20
- protocol,
21
- hostname,
22
- port,
23
- method: "POST",
24
- headers,
25
- path: resolvedPath,
26
- body,
27
- });
19
+ b.m("POST").h(headers).b(body);
20
+ return b.build();
28
21
  };
29
22
  exports.se_CancelJobCommand = se_CancelJobCommand;
30
23
  const se_CreateComputeEnvironmentCommand = async (input, context) => {
31
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
24
+ const b = (0, core_1.requestBuilder)(input, context);
32
25
  const headers = {
33
26
  "content-type": "application/json",
34
27
  };
35
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/createcomputeenvironment";
28
+ b.bp("/v1/createcomputeenvironment");
36
29
  let body;
37
30
  body = JSON.stringify((0, smithy_client_1.take)(input, {
38
31
  computeEnvironmentName: [],
@@ -44,23 +37,16 @@ const se_CreateComputeEnvironmentCommand = async (input, context) => {
44
37
  type: [],
45
38
  unmanagedvCpus: [],
46
39
  }));
47
- return new protocol_http_1.HttpRequest({
48
- protocol,
49
- hostname,
50
- port,
51
- method: "POST",
52
- headers,
53
- path: resolvedPath,
54
- body,
55
- });
40
+ b.m("POST").h(headers).b(body);
41
+ return b.build();
56
42
  };
57
43
  exports.se_CreateComputeEnvironmentCommand = se_CreateComputeEnvironmentCommand;
58
44
  const se_CreateJobQueueCommand = async (input, context) => {
59
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
45
+ const b = (0, core_1.requestBuilder)(input, context);
60
46
  const headers = {
61
47
  "content-type": "application/json",
62
48
  };
63
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/createjobqueue";
49
+ b.bp("/v1/createjobqueue");
64
50
  let body;
65
51
  body = JSON.stringify((0, smithy_client_1.take)(input, {
66
52
  computeEnvironmentOrder: (_) => (0, smithy_client_1._json)(_),
@@ -70,153 +56,104 @@ const se_CreateJobQueueCommand = async (input, context) => {
70
56
  state: [],
71
57
  tags: (_) => (0, smithy_client_1._json)(_),
72
58
  }));
73
- return new protocol_http_1.HttpRequest({
74
- protocol,
75
- hostname,
76
- port,
77
- method: "POST",
78
- headers,
79
- path: resolvedPath,
80
- body,
81
- });
59
+ b.m("POST").h(headers).b(body);
60
+ return b.build();
82
61
  };
83
62
  exports.se_CreateJobQueueCommand = se_CreateJobQueueCommand;
84
63
  const se_CreateSchedulingPolicyCommand = async (input, context) => {
85
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
64
+ const b = (0, core_1.requestBuilder)(input, context);
86
65
  const headers = {
87
66
  "content-type": "application/json",
88
67
  };
89
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/createschedulingpolicy";
68
+ b.bp("/v1/createschedulingpolicy");
90
69
  let body;
91
70
  body = JSON.stringify((0, smithy_client_1.take)(input, {
92
71
  fairsharePolicy: (_) => se_FairsharePolicy(_, context),
93
72
  name: [],
94
73
  tags: (_) => (0, smithy_client_1._json)(_),
95
74
  }));
96
- return new protocol_http_1.HttpRequest({
97
- protocol,
98
- hostname,
99
- port,
100
- method: "POST",
101
- headers,
102
- path: resolvedPath,
103
- body,
104
- });
75
+ b.m("POST").h(headers).b(body);
76
+ return b.build();
105
77
  };
106
78
  exports.se_CreateSchedulingPolicyCommand = se_CreateSchedulingPolicyCommand;
107
79
  const se_DeleteComputeEnvironmentCommand = async (input, context) => {
108
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
80
+ const b = (0, core_1.requestBuilder)(input, context);
109
81
  const headers = {
110
82
  "content-type": "application/json",
111
83
  };
112
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/deletecomputeenvironment";
84
+ b.bp("/v1/deletecomputeenvironment");
113
85
  let body;
114
86
  body = JSON.stringify((0, smithy_client_1.take)(input, {
115
87
  computeEnvironment: [],
116
88
  }));
117
- return new protocol_http_1.HttpRequest({
118
- protocol,
119
- hostname,
120
- port,
121
- method: "POST",
122
- headers,
123
- path: resolvedPath,
124
- body,
125
- });
89
+ b.m("POST").h(headers).b(body);
90
+ return b.build();
126
91
  };
127
92
  exports.se_DeleteComputeEnvironmentCommand = se_DeleteComputeEnvironmentCommand;
128
93
  const se_DeleteJobQueueCommand = async (input, context) => {
129
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
94
+ const b = (0, core_1.requestBuilder)(input, context);
130
95
  const headers = {
131
96
  "content-type": "application/json",
132
97
  };
133
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/deletejobqueue";
98
+ b.bp("/v1/deletejobqueue");
134
99
  let body;
135
100
  body = JSON.stringify((0, smithy_client_1.take)(input, {
136
101
  jobQueue: [],
137
102
  }));
138
- return new protocol_http_1.HttpRequest({
139
- protocol,
140
- hostname,
141
- port,
142
- method: "POST",
143
- headers,
144
- path: resolvedPath,
145
- body,
146
- });
103
+ b.m("POST").h(headers).b(body);
104
+ return b.build();
147
105
  };
148
106
  exports.se_DeleteJobQueueCommand = se_DeleteJobQueueCommand;
149
107
  const se_DeleteSchedulingPolicyCommand = async (input, context) => {
150
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
108
+ const b = (0, core_1.requestBuilder)(input, context);
151
109
  const headers = {
152
110
  "content-type": "application/json",
153
111
  };
154
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/deleteschedulingpolicy";
112
+ b.bp("/v1/deleteschedulingpolicy");
155
113
  let body;
156
114
  body = JSON.stringify((0, smithy_client_1.take)(input, {
157
115
  arn: [],
158
116
  }));
159
- return new protocol_http_1.HttpRequest({
160
- protocol,
161
- hostname,
162
- port,
163
- method: "POST",
164
- headers,
165
- path: resolvedPath,
166
- body,
167
- });
117
+ b.m("POST").h(headers).b(body);
118
+ return b.build();
168
119
  };
169
120
  exports.se_DeleteSchedulingPolicyCommand = se_DeleteSchedulingPolicyCommand;
170
121
  const se_DeregisterJobDefinitionCommand = async (input, context) => {
171
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
122
+ const b = (0, core_1.requestBuilder)(input, context);
172
123
  const headers = {
173
124
  "content-type": "application/json",
174
125
  };
175
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/deregisterjobdefinition";
126
+ b.bp("/v1/deregisterjobdefinition");
176
127
  let body;
177
128
  body = JSON.stringify((0, smithy_client_1.take)(input, {
178
129
  jobDefinition: [],
179
130
  }));
180
- return new protocol_http_1.HttpRequest({
181
- protocol,
182
- hostname,
183
- port,
184
- method: "POST",
185
- headers,
186
- path: resolvedPath,
187
- body,
188
- });
131
+ b.m("POST").h(headers).b(body);
132
+ return b.build();
189
133
  };
190
134
  exports.se_DeregisterJobDefinitionCommand = se_DeregisterJobDefinitionCommand;
191
135
  const se_DescribeComputeEnvironmentsCommand = async (input, context) => {
192
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
136
+ const b = (0, core_1.requestBuilder)(input, context);
193
137
  const headers = {
194
138
  "content-type": "application/json",
195
139
  };
196
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/describecomputeenvironments";
140
+ b.bp("/v1/describecomputeenvironments");
197
141
  let body;
198
142
  body = JSON.stringify((0, smithy_client_1.take)(input, {
199
143
  computeEnvironments: (_) => (0, smithy_client_1._json)(_),
200
144
  maxResults: [],
201
145
  nextToken: [],
202
146
  }));
203
- return new protocol_http_1.HttpRequest({
204
- protocol,
205
- hostname,
206
- port,
207
- method: "POST",
208
- headers,
209
- path: resolvedPath,
210
- body,
211
- });
147
+ b.m("POST").h(headers).b(body);
148
+ return b.build();
212
149
  };
213
150
  exports.se_DescribeComputeEnvironmentsCommand = se_DescribeComputeEnvironmentsCommand;
214
151
  const se_DescribeJobDefinitionsCommand = async (input, context) => {
215
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
152
+ const b = (0, core_1.requestBuilder)(input, context);
216
153
  const headers = {
217
154
  "content-type": "application/json",
218
155
  };
219
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/describejobdefinitions";
156
+ b.bp("/v1/describejobdefinitions");
220
157
  let body;
221
158
  body = JSON.stringify((0, smithy_client_1.take)(input, {
222
159
  jobDefinitionName: [],
@@ -225,88 +162,60 @@ const se_DescribeJobDefinitionsCommand = async (input, context) => {
225
162
  nextToken: [],
226
163
  status: [],
227
164
  }));
228
- return new protocol_http_1.HttpRequest({
229
- protocol,
230
- hostname,
231
- port,
232
- method: "POST",
233
- headers,
234
- path: resolvedPath,
235
- body,
236
- });
165
+ b.m("POST").h(headers).b(body);
166
+ return b.build();
237
167
  };
238
168
  exports.se_DescribeJobDefinitionsCommand = se_DescribeJobDefinitionsCommand;
239
169
  const se_DescribeJobQueuesCommand = async (input, context) => {
240
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
170
+ const b = (0, core_1.requestBuilder)(input, context);
241
171
  const headers = {
242
172
  "content-type": "application/json",
243
173
  };
244
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/describejobqueues";
174
+ b.bp("/v1/describejobqueues");
245
175
  let body;
246
176
  body = JSON.stringify((0, smithy_client_1.take)(input, {
247
177
  jobQueues: (_) => (0, smithy_client_1._json)(_),
248
178
  maxResults: [],
249
179
  nextToken: [],
250
180
  }));
251
- return new protocol_http_1.HttpRequest({
252
- protocol,
253
- hostname,
254
- port,
255
- method: "POST",
256
- headers,
257
- path: resolvedPath,
258
- body,
259
- });
181
+ b.m("POST").h(headers).b(body);
182
+ return b.build();
260
183
  };
261
184
  exports.se_DescribeJobQueuesCommand = se_DescribeJobQueuesCommand;
262
185
  const se_DescribeJobsCommand = async (input, context) => {
263
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
186
+ const b = (0, core_1.requestBuilder)(input, context);
264
187
  const headers = {
265
188
  "content-type": "application/json",
266
189
  };
267
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/describejobs";
190
+ b.bp("/v1/describejobs");
268
191
  let body;
269
192
  body = JSON.stringify((0, smithy_client_1.take)(input, {
270
193
  jobs: (_) => (0, smithy_client_1._json)(_),
271
194
  }));
272
- return new protocol_http_1.HttpRequest({
273
- protocol,
274
- hostname,
275
- port,
276
- method: "POST",
277
- headers,
278
- path: resolvedPath,
279
- body,
280
- });
195
+ b.m("POST").h(headers).b(body);
196
+ return b.build();
281
197
  };
282
198
  exports.se_DescribeJobsCommand = se_DescribeJobsCommand;
283
199
  const se_DescribeSchedulingPoliciesCommand = async (input, context) => {
284
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
200
+ const b = (0, core_1.requestBuilder)(input, context);
285
201
  const headers = {
286
202
  "content-type": "application/json",
287
203
  };
288
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/describeschedulingpolicies";
204
+ b.bp("/v1/describeschedulingpolicies");
289
205
  let body;
290
206
  body = JSON.stringify((0, smithy_client_1.take)(input, {
291
207
  arns: (_) => (0, smithy_client_1._json)(_),
292
208
  }));
293
- return new protocol_http_1.HttpRequest({
294
- protocol,
295
- hostname,
296
- port,
297
- method: "POST",
298
- headers,
299
- path: resolvedPath,
300
- body,
301
- });
209
+ b.m("POST").h(headers).b(body);
210
+ return b.build();
302
211
  };
303
212
  exports.se_DescribeSchedulingPoliciesCommand = se_DescribeSchedulingPoliciesCommand;
304
213
  const se_ListJobsCommand = async (input, context) => {
305
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
214
+ const b = (0, core_1.requestBuilder)(input, context);
306
215
  const headers = {
307
216
  "content-type": "application/json",
308
217
  };
309
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/listjobs";
218
+ b.bp("/v1/listjobs");
310
219
  let body;
311
220
  body = JSON.stringify((0, smithy_client_1.take)(input, {
312
221
  arrayJobId: [],
@@ -317,62 +226,41 @@ const se_ListJobsCommand = async (input, context) => {
317
226
  multiNodeJobId: [],
318
227
  nextToken: [],
319
228
  }));
320
- return new protocol_http_1.HttpRequest({
321
- protocol,
322
- hostname,
323
- port,
324
- method: "POST",
325
- headers,
326
- path: resolvedPath,
327
- body,
328
- });
229
+ b.m("POST").h(headers).b(body);
230
+ return b.build();
329
231
  };
330
232
  exports.se_ListJobsCommand = se_ListJobsCommand;
331
233
  const se_ListSchedulingPoliciesCommand = async (input, context) => {
332
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
234
+ const b = (0, core_1.requestBuilder)(input, context);
333
235
  const headers = {
334
236
  "content-type": "application/json",
335
237
  };
336
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/listschedulingpolicies";
238
+ b.bp("/v1/listschedulingpolicies");
337
239
  let body;
338
240
  body = JSON.stringify((0, smithy_client_1.take)(input, {
339
241
  maxResults: [],
340
242
  nextToken: [],
341
243
  }));
342
- return new protocol_http_1.HttpRequest({
343
- protocol,
344
- hostname,
345
- port,
346
- method: "POST",
347
- headers,
348
- path: resolvedPath,
349
- body,
350
- });
244
+ b.m("POST").h(headers).b(body);
245
+ return b.build();
351
246
  };
352
247
  exports.se_ListSchedulingPoliciesCommand = se_ListSchedulingPoliciesCommand;
353
248
  const se_ListTagsForResourceCommand = async (input, context) => {
354
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
249
+ const b = (0, core_1.requestBuilder)(input, context);
355
250
  const headers = {};
356
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{resourceArn}";
357
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
251
+ b.bp("/v1/tags/{resourceArn}");
252
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
358
253
  let body;
359
- return new protocol_http_1.HttpRequest({
360
- protocol,
361
- hostname,
362
- port,
363
- method: "GET",
364
- headers,
365
- path: resolvedPath,
366
- body,
367
- });
254
+ b.m("GET").h(headers).b(body);
255
+ return b.build();
368
256
  };
369
257
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
370
258
  const se_RegisterJobDefinitionCommand = async (input, context) => {
371
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
259
+ const b = (0, core_1.requestBuilder)(input, context);
372
260
  const headers = {
373
261
  "content-type": "application/json",
374
262
  };
375
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/registerjobdefinition";
263
+ b.bp("/v1/registerjobdefinition");
376
264
  let body;
377
265
  body = JSON.stringify((0, smithy_client_1.take)(input, {
378
266
  containerProperties: (_) => (0, smithy_client_1._json)(_),
@@ -388,23 +276,16 @@ const se_RegisterJobDefinitionCommand = async (input, context) => {
388
276
  timeout: (_) => (0, smithy_client_1._json)(_),
389
277
  type: [],
390
278
  }));
391
- return new protocol_http_1.HttpRequest({
392
- protocol,
393
- hostname,
394
- port,
395
- method: "POST",
396
- headers,
397
- path: resolvedPath,
398
- body,
399
- });
279
+ b.m("POST").h(headers).b(body);
280
+ return b.build();
400
281
  };
401
282
  exports.se_RegisterJobDefinitionCommand = se_RegisterJobDefinitionCommand;
402
283
  const se_SubmitJobCommand = async (input, context) => {
403
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
284
+ const b = (0, core_1.requestBuilder)(input, context);
404
285
  const headers = {
405
286
  "content-type": "application/json",
406
287
  };
407
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/submitjob";
288
+ b.bp("/v1/submitjob");
408
289
  let body;
409
290
  body = JSON.stringify((0, smithy_client_1.take)(input, {
410
291
  arrayProperties: (_) => (0, smithy_client_1._json)(_),
@@ -423,91 +304,62 @@ const se_SubmitJobCommand = async (input, context) => {
423
304
  tags: (_) => (0, smithy_client_1._json)(_),
424
305
  timeout: (_) => (0, smithy_client_1._json)(_),
425
306
  }));
426
- return new protocol_http_1.HttpRequest({
427
- protocol,
428
- hostname,
429
- port,
430
- method: "POST",
431
- headers,
432
- path: resolvedPath,
433
- body,
434
- });
307
+ b.m("POST").h(headers).b(body);
308
+ return b.build();
435
309
  };
436
310
  exports.se_SubmitJobCommand = se_SubmitJobCommand;
437
311
  const se_TagResourceCommand = async (input, context) => {
438
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
312
+ const b = (0, core_1.requestBuilder)(input, context);
439
313
  const headers = {
440
314
  "content-type": "application/json",
441
315
  };
442
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{resourceArn}";
443
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
316
+ b.bp("/v1/tags/{resourceArn}");
317
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
444
318
  let body;
445
319
  body = JSON.stringify((0, smithy_client_1.take)(input, {
446
320
  tags: (_) => (0, smithy_client_1._json)(_),
447
321
  }));
448
- return new protocol_http_1.HttpRequest({
449
- protocol,
450
- hostname,
451
- port,
452
- method: "POST",
453
- headers,
454
- path: resolvedPath,
455
- body,
456
- });
322
+ b.m("POST").h(headers).b(body);
323
+ return b.build();
457
324
  };
458
325
  exports.se_TagResourceCommand = se_TagResourceCommand;
459
326
  const se_TerminateJobCommand = async (input, context) => {
460
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
327
+ const b = (0, core_1.requestBuilder)(input, context);
461
328
  const headers = {
462
329
  "content-type": "application/json",
463
330
  };
464
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/terminatejob";
331
+ b.bp("/v1/terminatejob");
465
332
  let body;
466
333
  body = JSON.stringify((0, smithy_client_1.take)(input, {
467
334
  jobId: [],
468
335
  reason: [],
469
336
  }));
470
- return new protocol_http_1.HttpRequest({
471
- protocol,
472
- hostname,
473
- port,
474
- method: "POST",
475
- headers,
476
- path: resolvedPath,
477
- body,
478
- });
337
+ b.m("POST").h(headers).b(body);
338
+ return b.build();
479
339
  };
480
340
  exports.se_TerminateJobCommand = se_TerminateJobCommand;
481
341
  const se_UntagResourceCommand = async (input, context) => {
482
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
342
+ const b = (0, core_1.requestBuilder)(input, context);
483
343
  const headers = {};
484
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{resourceArn}";
485
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
344
+ b.bp("/v1/tags/{resourceArn}");
345
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
486
346
  const query = (0, smithy_client_1.map)({
487
- tagKeys: [
347
+ [_tK]: [
488
348
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
489
- () => (input.tagKeys || []).map((_entry) => _entry),
349
+ () => (input[_tK] || []).map((_entry) => _entry),
490
350
  ],
491
351
  });
492
352
  let body;
493
- return new protocol_http_1.HttpRequest({
494
- protocol,
495
- hostname,
496
- port,
497
- method: "DELETE",
498
- headers,
499
- path: resolvedPath,
500
- query,
501
- body,
502
- });
353
+ b.m("DELETE").h(headers).q(query).b(body);
354
+ return b.build();
503
355
  };
504
356
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
505
357
  const se_UpdateComputeEnvironmentCommand = async (input, context) => {
506
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
358
+ const b = (0, core_1.requestBuilder)(input, context);
507
359
  const headers = {
508
360
  "content-type": "application/json",
509
361
  };
510
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/updatecomputeenvironment";
362
+ b.bp("/v1/updatecomputeenvironment");
511
363
  let body;
512
364
  body = JSON.stringify((0, smithy_client_1.take)(input, {
513
365
  computeEnvironment: [],
@@ -517,23 +369,16 @@ const se_UpdateComputeEnvironmentCommand = async (input, context) => {
517
369
  unmanagedvCpus: [],
518
370
  updatePolicy: (_) => (0, smithy_client_1._json)(_),
519
371
  }));
520
- return new protocol_http_1.HttpRequest({
521
- protocol,
522
- hostname,
523
- port,
524
- method: "POST",
525
- headers,
526
- path: resolvedPath,
527
- body,
528
- });
372
+ b.m("POST").h(headers).b(body);
373
+ return b.build();
529
374
  };
530
375
  exports.se_UpdateComputeEnvironmentCommand = se_UpdateComputeEnvironmentCommand;
531
376
  const se_UpdateJobQueueCommand = async (input, context) => {
532
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
377
+ const b = (0, core_1.requestBuilder)(input, context);
533
378
  const headers = {
534
379
  "content-type": "application/json",
535
380
  };
536
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/updatejobqueue";
381
+ b.bp("/v1/updatejobqueue");
537
382
  let body;
538
383
  body = JSON.stringify((0, smithy_client_1.take)(input, {
539
384
  computeEnvironmentOrder: (_) => (0, smithy_client_1._json)(_),
@@ -542,37 +387,23 @@ const se_UpdateJobQueueCommand = async (input, context) => {
542
387
  schedulingPolicyArn: [],
543
388
  state: [],
544
389
  }));
545
- return new protocol_http_1.HttpRequest({
546
- protocol,
547
- hostname,
548
- port,
549
- method: "POST",
550
- headers,
551
- path: resolvedPath,
552
- body,
553
- });
390
+ b.m("POST").h(headers).b(body);
391
+ return b.build();
554
392
  };
555
393
  exports.se_UpdateJobQueueCommand = se_UpdateJobQueueCommand;
556
394
  const se_UpdateSchedulingPolicyCommand = async (input, context) => {
557
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
395
+ const b = (0, core_1.requestBuilder)(input, context);
558
396
  const headers = {
559
397
  "content-type": "application/json",
560
398
  };
561
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/updateschedulingpolicy";
399
+ b.bp("/v1/updateschedulingpolicy");
562
400
  let body;
563
401
  body = JSON.stringify((0, smithy_client_1.take)(input, {
564
402
  arn: [],
565
403
  fairsharePolicy: (_) => se_FairsharePolicy(_, context),
566
404
  }));
567
- return new protocol_http_1.HttpRequest({
568
- protocol,
569
- hostname,
570
- port,
571
- method: "POST",
572
- headers,
573
- path: resolvedPath,
574
- body,
575
- });
405
+ b.m("POST").h(headers).b(body);
406
+ return b.build();
576
407
  };
577
408
  exports.se_UpdateSchedulingPolicyCommand = se_UpdateSchedulingPolicyCommand;
578
409
  const de_CancelJobCommand = async (output, context) => {
@@ -1537,6 +1368,7 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1537
1368
  value !== "" &&
1538
1369
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1539
1370
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1371
+ const _tK = "tagKeys";
1540
1372
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1541
1373
  if (encoded.length) {
1542
1374
  return JSON.parse(encoded);