@aws-sdk/client-simspaceweaver 3.474.0 → 3.477.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,184 +1,122 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopSimulationCommand = exports.de_StopClockCommand = exports.de_StopAppCommand = exports.de_StartSimulationCommand = exports.de_StartClockCommand = exports.de_StartAppCommand = exports.de_ListTagsForResourceCommand = exports.de_ListSimulationsCommand = exports.de_ListAppsCommand = exports.de_DescribeSimulationCommand = exports.de_DescribeAppCommand = exports.de_DeleteSimulationCommand = exports.de_DeleteAppCommand = exports.de_CreateSnapshotCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopSimulationCommand = exports.se_StopClockCommand = exports.se_StopAppCommand = exports.se_StartSimulationCommand = exports.se_StartClockCommand = exports.se_StartAppCommand = exports.se_ListTagsForResourceCommand = exports.se_ListSimulationsCommand = exports.se_ListAppsCommand = exports.se_DescribeSimulationCommand = exports.se_DescribeAppCommand = exports.se_DeleteSimulationCommand = exports.se_DeleteAppCommand = exports.se_CreateSnapshotCommand = 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 uuid_1 = require("uuid");
7
7
  const models_0_1 = require("../models/models_0");
8
8
  const SimSpaceWeaverServiceException_1 = require("../models/SimSpaceWeaverServiceException");
9
9
  const se_CreateSnapshotCommand = async (input, context) => {
10
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
+ const b = (0, core_1.requestBuilder)(input, context);
11
11
  const headers = {
12
12
  "content-type": "application/json",
13
13
  };
14
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createsnapshot";
14
+ b.bp("/createsnapshot");
15
15
  let body;
16
16
  body = JSON.stringify((0, smithy_client_1.take)(input, {
17
17
  Destination: (_) => (0, smithy_client_1._json)(_),
18
18
  Simulation: [],
19
19
  }));
20
- return new protocol_http_1.HttpRequest({
21
- protocol,
22
- hostname,
23
- port,
24
- method: "POST",
25
- headers,
26
- path: resolvedPath,
27
- body,
28
- });
20
+ b.m("POST").h(headers).b(body);
21
+ return b.build();
29
22
  };
30
23
  exports.se_CreateSnapshotCommand = se_CreateSnapshotCommand;
31
24
  const se_DeleteAppCommand = async (input, context) => {
32
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
25
+ const b = (0, core_1.requestBuilder)(input, context);
33
26
  const headers = {};
34
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteapp";
27
+ b.bp("/deleteapp");
35
28
  const query = (0, smithy_client_1.map)({
36
- simulation: [, (0, smithy_client_1.expectNonNull)(input.Simulation, `Simulation`)],
37
- domain: [, (0, smithy_client_1.expectNonNull)(input.Domain, `Domain`)],
38
- app: [, (0, smithy_client_1.expectNonNull)(input.App, `App`)],
29
+ [_s]: [, (0, smithy_client_1.expectNonNull)(input[_S], `Simulation`)],
30
+ [_d]: [, (0, smithy_client_1.expectNonNull)(input[_D], `Domain`)],
31
+ [_a]: [, (0, smithy_client_1.expectNonNull)(input[_A], `App`)],
39
32
  });
40
33
  let body;
41
- return new protocol_http_1.HttpRequest({
42
- protocol,
43
- hostname,
44
- port,
45
- method: "DELETE",
46
- headers,
47
- path: resolvedPath,
48
- query,
49
- body,
50
- });
34
+ b.m("DELETE").h(headers).q(query).b(body);
35
+ return b.build();
51
36
  };
52
37
  exports.se_DeleteAppCommand = se_DeleteAppCommand;
53
38
  const se_DeleteSimulationCommand = async (input, context) => {
54
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
39
+ const b = (0, core_1.requestBuilder)(input, context);
55
40
  const headers = {};
56
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deletesimulation";
41
+ b.bp("/deletesimulation");
57
42
  const query = (0, smithy_client_1.map)({
58
- simulation: [, (0, smithy_client_1.expectNonNull)(input.Simulation, `Simulation`)],
43
+ [_s]: [, (0, smithy_client_1.expectNonNull)(input[_S], `Simulation`)],
59
44
  });
60
45
  let body;
61
- return new protocol_http_1.HttpRequest({
62
- protocol,
63
- hostname,
64
- port,
65
- method: "DELETE",
66
- headers,
67
- path: resolvedPath,
68
- query,
69
- body,
70
- });
46
+ b.m("DELETE").h(headers).q(query).b(body);
47
+ return b.build();
71
48
  };
72
49
  exports.se_DeleteSimulationCommand = se_DeleteSimulationCommand;
73
50
  const se_DescribeAppCommand = async (input, context) => {
74
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
51
+ const b = (0, core_1.requestBuilder)(input, context);
75
52
  const headers = {};
76
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeapp";
53
+ b.bp("/describeapp");
77
54
  const query = (0, smithy_client_1.map)({
78
- simulation: [, (0, smithy_client_1.expectNonNull)(input.Simulation, `Simulation`)],
79
- domain: [, (0, smithy_client_1.expectNonNull)(input.Domain, `Domain`)],
80
- app: [, (0, smithy_client_1.expectNonNull)(input.App, `App`)],
55
+ [_s]: [, (0, smithy_client_1.expectNonNull)(input[_S], `Simulation`)],
56
+ [_d]: [, (0, smithy_client_1.expectNonNull)(input[_D], `Domain`)],
57
+ [_a]: [, (0, smithy_client_1.expectNonNull)(input[_A], `App`)],
81
58
  });
82
59
  let body;
83
- return new protocol_http_1.HttpRequest({
84
- protocol,
85
- hostname,
86
- port,
87
- method: "GET",
88
- headers,
89
- path: resolvedPath,
90
- query,
91
- body,
92
- });
60
+ b.m("GET").h(headers).q(query).b(body);
61
+ return b.build();
93
62
  };
94
63
  exports.se_DescribeAppCommand = se_DescribeAppCommand;
95
64
  const se_DescribeSimulationCommand = async (input, context) => {
96
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
65
+ const b = (0, core_1.requestBuilder)(input, context);
97
66
  const headers = {};
98
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describesimulation";
67
+ b.bp("/describesimulation");
99
68
  const query = (0, smithy_client_1.map)({
100
- simulation: [, (0, smithy_client_1.expectNonNull)(input.Simulation, `Simulation`)],
69
+ [_s]: [, (0, smithy_client_1.expectNonNull)(input[_S], `Simulation`)],
101
70
  });
102
71
  let body;
103
- return new protocol_http_1.HttpRequest({
104
- protocol,
105
- hostname,
106
- port,
107
- method: "GET",
108
- headers,
109
- path: resolvedPath,
110
- query,
111
- body,
112
- });
72
+ b.m("GET").h(headers).q(query).b(body);
73
+ return b.build();
113
74
  };
114
75
  exports.se_DescribeSimulationCommand = se_DescribeSimulationCommand;
115
76
  const se_ListAppsCommand = async (input, context) => {
116
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
77
+ const b = (0, core_1.requestBuilder)(input, context);
117
78
  const headers = {};
118
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listapps";
79
+ b.bp("/listapps");
119
80
  const query = (0, smithy_client_1.map)({
120
- simulation: [, (0, smithy_client_1.expectNonNull)(input.Simulation, `Simulation`)],
121
- domain: [, input.Domain],
122
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
123
- nextToken: [, input.NextToken],
81
+ [_s]: [, (0, smithy_client_1.expectNonNull)(input[_S], `Simulation`)],
82
+ [_d]: [, input[_D]],
83
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
84
+ [_nT]: [, input[_NT]],
124
85
  });
125
86
  let body;
126
- return new protocol_http_1.HttpRequest({
127
- protocol,
128
- hostname,
129
- port,
130
- method: "GET",
131
- headers,
132
- path: resolvedPath,
133
- query,
134
- body,
135
- });
87
+ b.m("GET").h(headers).q(query).b(body);
88
+ return b.build();
136
89
  };
137
90
  exports.se_ListAppsCommand = se_ListAppsCommand;
138
91
  const se_ListSimulationsCommand = async (input, context) => {
139
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
92
+ const b = (0, core_1.requestBuilder)(input, context);
140
93
  const headers = {};
141
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listsimulations";
94
+ b.bp("/listsimulations");
142
95
  const query = (0, smithy_client_1.map)({
143
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
144
- nextToken: [, input.NextToken],
96
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
97
+ [_nT]: [, input[_NT]],
145
98
  });
146
99
  let body;
147
- return new protocol_http_1.HttpRequest({
148
- protocol,
149
- hostname,
150
- port,
151
- method: "GET",
152
- headers,
153
- path: resolvedPath,
154
- query,
155
- body,
156
- });
100
+ b.m("GET").h(headers).q(query).b(body);
101
+ return b.build();
157
102
  };
158
103
  exports.se_ListSimulationsCommand = se_ListSimulationsCommand;
159
104
  const se_ListTagsForResourceCommand = async (input, context) => {
160
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
105
+ const b = (0, core_1.requestBuilder)(input, context);
161
106
  const headers = {};
162
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
163
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
107
+ b.bp("/tags/{ResourceArn}");
108
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
164
109
  let body;
165
- return new protocol_http_1.HttpRequest({
166
- protocol,
167
- hostname,
168
- port,
169
- method: "GET",
170
- headers,
171
- path: resolvedPath,
172
- body,
173
- });
110
+ b.m("GET").h(headers).b(body);
111
+ return b.build();
174
112
  };
175
113
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
176
114
  const se_StartAppCommand = async (input, context) => {
177
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
115
+ const b = (0, core_1.requestBuilder)(input, context);
178
116
  const headers = {
179
117
  "content-type": "application/json",
180
118
  };
181
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/startapp";
119
+ b.bp("/startapp");
182
120
  let body;
183
121
  body = JSON.stringify((0, smithy_client_1.take)(input, {
184
122
  ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
@@ -188,44 +126,30 @@ const se_StartAppCommand = async (input, context) => {
188
126
  Name: [],
189
127
  Simulation: [],
190
128
  }));
191
- return new protocol_http_1.HttpRequest({
192
- protocol,
193
- hostname,
194
- port,
195
- method: "POST",
196
- headers,
197
- path: resolvedPath,
198
- body,
199
- });
129
+ b.m("POST").h(headers).b(body);
130
+ return b.build();
200
131
  };
201
132
  exports.se_StartAppCommand = se_StartAppCommand;
202
133
  const se_StartClockCommand = async (input, context) => {
203
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
134
+ const b = (0, core_1.requestBuilder)(input, context);
204
135
  const headers = {
205
136
  "content-type": "application/json",
206
137
  };
207
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/startclock";
138
+ b.bp("/startclock");
208
139
  let body;
209
140
  body = JSON.stringify((0, smithy_client_1.take)(input, {
210
141
  Simulation: [],
211
142
  }));
212
- return new protocol_http_1.HttpRequest({
213
- protocol,
214
- hostname,
215
- port,
216
- method: "POST",
217
- headers,
218
- path: resolvedPath,
219
- body,
220
- });
143
+ b.m("POST").h(headers).b(body);
144
+ return b.build();
221
145
  };
222
146
  exports.se_StartClockCommand = se_StartClockCommand;
223
147
  const se_StartSimulationCommand = async (input, context) => {
224
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
148
+ const b = (0, core_1.requestBuilder)(input, context);
225
149
  const headers = {
226
150
  "content-type": "application/json",
227
151
  };
228
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/startsimulation";
152
+ b.bp("/startsimulation");
229
153
  let body;
230
154
  body = JSON.stringify((0, smithy_client_1.take)(input, {
231
155
  ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
@@ -237,126 +161,83 @@ const se_StartSimulationCommand = async (input, context) => {
237
161
  SnapshotS3Location: (_) => (0, smithy_client_1._json)(_),
238
162
  Tags: (_) => (0, smithy_client_1._json)(_),
239
163
  }));
240
- return new protocol_http_1.HttpRequest({
241
- protocol,
242
- hostname,
243
- port,
244
- method: "POST",
245
- headers,
246
- path: resolvedPath,
247
- body,
248
- });
164
+ b.m("POST").h(headers).b(body);
165
+ return b.build();
249
166
  };
250
167
  exports.se_StartSimulationCommand = se_StartSimulationCommand;
251
168
  const se_StopAppCommand = async (input, context) => {
252
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
169
+ const b = (0, core_1.requestBuilder)(input, context);
253
170
  const headers = {
254
171
  "content-type": "application/json",
255
172
  };
256
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/stopapp";
173
+ b.bp("/stopapp");
257
174
  let body;
258
175
  body = JSON.stringify((0, smithy_client_1.take)(input, {
259
176
  App: [],
260
177
  Domain: [],
261
178
  Simulation: [],
262
179
  }));
263
- return new protocol_http_1.HttpRequest({
264
- protocol,
265
- hostname,
266
- port,
267
- method: "POST",
268
- headers,
269
- path: resolvedPath,
270
- body,
271
- });
180
+ b.m("POST").h(headers).b(body);
181
+ return b.build();
272
182
  };
273
183
  exports.se_StopAppCommand = se_StopAppCommand;
274
184
  const se_StopClockCommand = async (input, context) => {
275
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
185
+ const b = (0, core_1.requestBuilder)(input, context);
276
186
  const headers = {
277
187
  "content-type": "application/json",
278
188
  };
279
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/stopclock";
189
+ b.bp("/stopclock");
280
190
  let body;
281
191
  body = JSON.stringify((0, smithy_client_1.take)(input, {
282
192
  Simulation: [],
283
193
  }));
284
- return new protocol_http_1.HttpRequest({
285
- protocol,
286
- hostname,
287
- port,
288
- method: "POST",
289
- headers,
290
- path: resolvedPath,
291
- body,
292
- });
194
+ b.m("POST").h(headers).b(body);
195
+ return b.build();
293
196
  };
294
197
  exports.se_StopClockCommand = se_StopClockCommand;
295
198
  const se_StopSimulationCommand = async (input, context) => {
296
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
199
+ const b = (0, core_1.requestBuilder)(input, context);
297
200
  const headers = {
298
201
  "content-type": "application/json",
299
202
  };
300
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/stopsimulation";
203
+ b.bp("/stopsimulation");
301
204
  let body;
302
205
  body = JSON.stringify((0, smithy_client_1.take)(input, {
303
206
  Simulation: [],
304
207
  }));
305
- return new protocol_http_1.HttpRequest({
306
- protocol,
307
- hostname,
308
- port,
309
- method: "POST",
310
- headers,
311
- path: resolvedPath,
312
- body,
313
- });
208
+ b.m("POST").h(headers).b(body);
209
+ return b.build();
314
210
  };
315
211
  exports.se_StopSimulationCommand = se_StopSimulationCommand;
316
212
  const se_TagResourceCommand = async (input, context) => {
317
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
213
+ const b = (0, core_1.requestBuilder)(input, context);
318
214
  const headers = {
319
215
  "content-type": "application/json",
320
216
  };
321
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
322
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
217
+ b.bp("/tags/{ResourceArn}");
218
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
323
219
  let body;
324
220
  body = JSON.stringify((0, smithy_client_1.take)(input, {
325
221
  Tags: (_) => (0, smithy_client_1._json)(_),
326
222
  }));
327
- return new protocol_http_1.HttpRequest({
328
- protocol,
329
- hostname,
330
- port,
331
- method: "POST",
332
- headers,
333
- path: resolvedPath,
334
- body,
335
- });
223
+ b.m("POST").h(headers).b(body);
224
+ return b.build();
336
225
  };
337
226
  exports.se_TagResourceCommand = se_TagResourceCommand;
338
227
  const se_UntagResourceCommand = async (input, context) => {
339
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
228
+ const b = (0, core_1.requestBuilder)(input, context);
340
229
  const headers = {};
341
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
342
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
230
+ b.bp("/tags/{ResourceArn}");
231
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
343
232
  const query = (0, smithy_client_1.map)({
344
- tagKeys: [
233
+ [_tK]: [
345
234
  (0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
346
- () => (input.TagKeys || []).map((_entry) => _entry),
235
+ () => (input[_TK] || []).map((_entry) => _entry),
347
236
  ],
348
237
  });
349
238
  let body;
350
- return new protocol_http_1.HttpRequest({
351
- protocol,
352
- hostname,
353
- port,
354
- method: "DELETE",
355
- headers,
356
- path: resolvedPath,
357
- query,
358
- body,
359
- });
239
+ b.m("DELETE").h(headers).q(query).b(body);
240
+ return b.build();
360
241
  };
361
242
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
362
243
  const de_CreateSnapshotCommand = async (output, context) => {
@@ -1168,6 +1049,18 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1168
1049
  value !== "" &&
1169
1050
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1170
1051
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1052
+ const _A = "App";
1053
+ const _D = "Domain";
1054
+ const _MR = "MaxResults";
1055
+ const _NT = "NextToken";
1056
+ const _S = "Simulation";
1057
+ const _TK = "TagKeys";
1058
+ const _a = "app";
1059
+ const _d = "domain";
1060
+ const _mR = "maxResults";
1061
+ const _nT = "nextToken";
1062
+ const _s = "simulation";
1063
+ const _tK = "tagKeys";
1171
1064
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1172
1065
  if (encoded.length) {
1173
1066
  return JSON.parse(encoded);
@@ -1,173 +1,111 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, 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, 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 { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, TooManyTagsException, ValidationException, } from "../models/models_0";
5
5
  import { SimSpaceWeaverServiceException as __BaseException } from "../models/SimSpaceWeaverServiceException";
6
6
  export const se_CreateSnapshotCommand = async (input, context) => {
7
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
+ const b = rb(input, context);
8
8
  const headers = {
9
9
  "content-type": "application/json",
10
10
  };
11
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createsnapshot";
11
+ b.bp("/createsnapshot");
12
12
  let body;
13
13
  body = JSON.stringify(take(input, {
14
14
  Destination: (_) => _json(_),
15
15
  Simulation: [],
16
16
  }));
17
- return new __HttpRequest({
18
- protocol,
19
- hostname,
20
- port,
21
- method: "POST",
22
- headers,
23
- path: resolvedPath,
24
- body,
25
- });
17
+ b.m("POST").h(headers).b(body);
18
+ return b.build();
26
19
  };
27
20
  export const se_DeleteAppCommand = async (input, context) => {
28
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
21
+ const b = rb(input, context);
29
22
  const headers = {};
30
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteapp";
23
+ b.bp("/deleteapp");
31
24
  const query = map({
32
- simulation: [, __expectNonNull(input.Simulation, `Simulation`)],
33
- domain: [, __expectNonNull(input.Domain, `Domain`)],
34
- app: [, __expectNonNull(input.App, `App`)],
25
+ [_s]: [, __expectNonNull(input[_S], `Simulation`)],
26
+ [_d]: [, __expectNonNull(input[_D], `Domain`)],
27
+ [_a]: [, __expectNonNull(input[_A], `App`)],
35
28
  });
36
29
  let body;
37
- return new __HttpRequest({
38
- protocol,
39
- hostname,
40
- port,
41
- method: "DELETE",
42
- headers,
43
- path: resolvedPath,
44
- query,
45
- body,
46
- });
30
+ b.m("DELETE").h(headers).q(query).b(body);
31
+ return b.build();
47
32
  };
48
33
  export const se_DeleteSimulationCommand = async (input, context) => {
49
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
34
+ const b = rb(input, context);
50
35
  const headers = {};
51
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deletesimulation";
36
+ b.bp("/deletesimulation");
52
37
  const query = map({
53
- simulation: [, __expectNonNull(input.Simulation, `Simulation`)],
38
+ [_s]: [, __expectNonNull(input[_S], `Simulation`)],
54
39
  });
55
40
  let body;
56
- return new __HttpRequest({
57
- protocol,
58
- hostname,
59
- port,
60
- method: "DELETE",
61
- headers,
62
- path: resolvedPath,
63
- query,
64
- body,
65
- });
41
+ b.m("DELETE").h(headers).q(query).b(body);
42
+ return b.build();
66
43
  };
67
44
  export const se_DescribeAppCommand = async (input, context) => {
68
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
45
+ const b = rb(input, context);
69
46
  const headers = {};
70
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeapp";
47
+ b.bp("/describeapp");
71
48
  const query = map({
72
- simulation: [, __expectNonNull(input.Simulation, `Simulation`)],
73
- domain: [, __expectNonNull(input.Domain, `Domain`)],
74
- app: [, __expectNonNull(input.App, `App`)],
49
+ [_s]: [, __expectNonNull(input[_S], `Simulation`)],
50
+ [_d]: [, __expectNonNull(input[_D], `Domain`)],
51
+ [_a]: [, __expectNonNull(input[_A], `App`)],
75
52
  });
76
53
  let body;
77
- return new __HttpRequest({
78
- protocol,
79
- hostname,
80
- port,
81
- method: "GET",
82
- headers,
83
- path: resolvedPath,
84
- query,
85
- body,
86
- });
54
+ b.m("GET").h(headers).q(query).b(body);
55
+ return b.build();
87
56
  };
88
57
  export const se_DescribeSimulationCommand = async (input, context) => {
89
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
58
+ const b = rb(input, context);
90
59
  const headers = {};
91
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describesimulation";
60
+ b.bp("/describesimulation");
92
61
  const query = map({
93
- simulation: [, __expectNonNull(input.Simulation, `Simulation`)],
62
+ [_s]: [, __expectNonNull(input[_S], `Simulation`)],
94
63
  });
95
64
  let body;
96
- return new __HttpRequest({
97
- protocol,
98
- hostname,
99
- port,
100
- method: "GET",
101
- headers,
102
- path: resolvedPath,
103
- query,
104
- body,
105
- });
65
+ b.m("GET").h(headers).q(query).b(body);
66
+ return b.build();
106
67
  };
107
68
  export const se_ListAppsCommand = async (input, context) => {
108
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
69
+ const b = rb(input, context);
109
70
  const headers = {};
110
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listapps";
71
+ b.bp("/listapps");
111
72
  const query = map({
112
- simulation: [, __expectNonNull(input.Simulation, `Simulation`)],
113
- domain: [, input.Domain],
114
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
115
- nextToken: [, input.NextToken],
73
+ [_s]: [, __expectNonNull(input[_S], `Simulation`)],
74
+ [_d]: [, input[_D]],
75
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
76
+ [_nT]: [, input[_NT]],
116
77
  });
117
78
  let body;
118
- return new __HttpRequest({
119
- protocol,
120
- hostname,
121
- port,
122
- method: "GET",
123
- headers,
124
- path: resolvedPath,
125
- query,
126
- body,
127
- });
79
+ b.m("GET").h(headers).q(query).b(body);
80
+ return b.build();
128
81
  };
129
82
  export const se_ListSimulationsCommand = async (input, context) => {
130
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
83
+ const b = rb(input, context);
131
84
  const headers = {};
132
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listsimulations";
85
+ b.bp("/listsimulations");
133
86
  const query = map({
134
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
135
- nextToken: [, input.NextToken],
87
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
88
+ [_nT]: [, input[_NT]],
136
89
  });
137
90
  let body;
138
- return new __HttpRequest({
139
- protocol,
140
- hostname,
141
- port,
142
- method: "GET",
143
- headers,
144
- path: resolvedPath,
145
- query,
146
- body,
147
- });
91
+ b.m("GET").h(headers).q(query).b(body);
92
+ return b.build();
148
93
  };
149
94
  export const se_ListTagsForResourceCommand = async (input, context) => {
150
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
95
+ const b = rb(input, context);
151
96
  const headers = {};
152
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
153
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
97
+ b.bp("/tags/{ResourceArn}");
98
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
154
99
  let body;
155
- return new __HttpRequest({
156
- protocol,
157
- hostname,
158
- port,
159
- method: "GET",
160
- headers,
161
- path: resolvedPath,
162
- body,
163
- });
100
+ b.m("GET").h(headers).b(body);
101
+ return b.build();
164
102
  };
165
103
  export const se_StartAppCommand = async (input, context) => {
166
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
104
+ const b = rb(input, context);
167
105
  const headers = {
168
106
  "content-type": "application/json",
169
107
  };
170
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/startapp";
108
+ b.bp("/startapp");
171
109
  let body;
172
110
  body = JSON.stringify(take(input, {
173
111
  ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -177,42 +115,28 @@ export const se_StartAppCommand = async (input, context) => {
177
115
  Name: [],
178
116
  Simulation: [],
179
117
  }));
180
- return new __HttpRequest({
181
- protocol,
182
- hostname,
183
- port,
184
- method: "POST",
185
- headers,
186
- path: resolvedPath,
187
- body,
188
- });
118
+ b.m("POST").h(headers).b(body);
119
+ return b.build();
189
120
  };
190
121
  export const se_StartClockCommand = async (input, context) => {
191
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
122
+ const b = rb(input, context);
192
123
  const headers = {
193
124
  "content-type": "application/json",
194
125
  };
195
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/startclock";
126
+ b.bp("/startclock");
196
127
  let body;
197
128
  body = JSON.stringify(take(input, {
198
129
  Simulation: [],
199
130
  }));
200
- return new __HttpRequest({
201
- protocol,
202
- hostname,
203
- port,
204
- method: "POST",
205
- headers,
206
- path: resolvedPath,
207
- body,
208
- });
131
+ b.m("POST").h(headers).b(body);
132
+ return b.build();
209
133
  };
210
134
  export const se_StartSimulationCommand = async (input, context) => {
211
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
135
+ const b = rb(input, context);
212
136
  const headers = {
213
137
  "content-type": "application/json",
214
138
  };
215
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/startsimulation";
139
+ b.bp("/startsimulation");
216
140
  let body;
217
141
  body = JSON.stringify(take(input, {
218
142
  ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -224,121 +148,78 @@ export const se_StartSimulationCommand = async (input, context) => {
224
148
  SnapshotS3Location: (_) => _json(_),
225
149
  Tags: (_) => _json(_),
226
150
  }));
227
- return new __HttpRequest({
228
- protocol,
229
- hostname,
230
- port,
231
- method: "POST",
232
- headers,
233
- path: resolvedPath,
234
- body,
235
- });
151
+ b.m("POST").h(headers).b(body);
152
+ return b.build();
236
153
  };
237
154
  export const se_StopAppCommand = async (input, context) => {
238
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
155
+ const b = rb(input, context);
239
156
  const headers = {
240
157
  "content-type": "application/json",
241
158
  };
242
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/stopapp";
159
+ b.bp("/stopapp");
243
160
  let body;
244
161
  body = JSON.stringify(take(input, {
245
162
  App: [],
246
163
  Domain: [],
247
164
  Simulation: [],
248
165
  }));
249
- return new __HttpRequest({
250
- protocol,
251
- hostname,
252
- port,
253
- method: "POST",
254
- headers,
255
- path: resolvedPath,
256
- body,
257
- });
166
+ b.m("POST").h(headers).b(body);
167
+ return b.build();
258
168
  };
259
169
  export const se_StopClockCommand = async (input, context) => {
260
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
170
+ const b = rb(input, context);
261
171
  const headers = {
262
172
  "content-type": "application/json",
263
173
  };
264
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/stopclock";
174
+ b.bp("/stopclock");
265
175
  let body;
266
176
  body = JSON.stringify(take(input, {
267
177
  Simulation: [],
268
178
  }));
269
- return new __HttpRequest({
270
- protocol,
271
- hostname,
272
- port,
273
- method: "POST",
274
- headers,
275
- path: resolvedPath,
276
- body,
277
- });
179
+ b.m("POST").h(headers).b(body);
180
+ return b.build();
278
181
  };
279
182
  export const se_StopSimulationCommand = async (input, context) => {
280
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
183
+ const b = rb(input, context);
281
184
  const headers = {
282
185
  "content-type": "application/json",
283
186
  };
284
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/stopsimulation";
187
+ b.bp("/stopsimulation");
285
188
  let body;
286
189
  body = JSON.stringify(take(input, {
287
190
  Simulation: [],
288
191
  }));
289
- return new __HttpRequest({
290
- protocol,
291
- hostname,
292
- port,
293
- method: "POST",
294
- headers,
295
- path: resolvedPath,
296
- body,
297
- });
192
+ b.m("POST").h(headers).b(body);
193
+ return b.build();
298
194
  };
299
195
  export const se_TagResourceCommand = async (input, context) => {
300
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
196
+ const b = rb(input, context);
301
197
  const headers = {
302
198
  "content-type": "application/json",
303
199
  };
304
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
305
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
200
+ b.bp("/tags/{ResourceArn}");
201
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
306
202
  let body;
307
203
  body = JSON.stringify(take(input, {
308
204
  Tags: (_) => _json(_),
309
205
  }));
310
- return new __HttpRequest({
311
- protocol,
312
- hostname,
313
- port,
314
- method: "POST",
315
- headers,
316
- path: resolvedPath,
317
- body,
318
- });
206
+ b.m("POST").h(headers).b(body);
207
+ return b.build();
319
208
  };
320
209
  export const se_UntagResourceCommand = async (input, context) => {
321
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
210
+ const b = rb(input, context);
322
211
  const headers = {};
323
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
324
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
212
+ b.bp("/tags/{ResourceArn}");
213
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
325
214
  const query = map({
326
- tagKeys: [
215
+ [_tK]: [
327
216
  __expectNonNull(input.TagKeys, `TagKeys`) != null,
328
- () => (input.TagKeys || []).map((_entry) => _entry),
217
+ () => (input[_TK] || []).map((_entry) => _entry),
329
218
  ],
330
219
  });
331
220
  let body;
332
- return new __HttpRequest({
333
- protocol,
334
- hostname,
335
- port,
336
- method: "DELETE",
337
- headers,
338
- path: resolvedPath,
339
- query,
340
- body,
341
- });
221
+ b.m("DELETE").h(headers).q(query).b(body);
222
+ return b.build();
342
223
  };
343
224
  export const de_CreateSnapshotCommand = async (output, context) => {
344
225
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1133,6 +1014,18 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1133
1014
  value !== "" &&
1134
1015
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1135
1016
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1017
+ const _A = "App";
1018
+ const _D = "Domain";
1019
+ const _MR = "MaxResults";
1020
+ const _NT = "NextToken";
1021
+ const _S = "Simulation";
1022
+ const _TK = "TagKeys";
1023
+ const _a = "app";
1024
+ const _d = "domain";
1025
+ const _mR = "maxResults";
1026
+ const _nT = "nextToken";
1027
+ const _s = "simulation";
1028
+ const _tK = "tagKeys";
1136
1029
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1137
1030
  if (encoded.length) {
1138
1031
  return JSON.parse(encoded);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-simspaceweaver",
3
3
  "description": "AWS SDK for JavaScript Simspaceweaver Client for Node.js, Browser and React Native",
4
- "version": "3.474.0",
4
+ "version": "3.477.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.474.0",
24
- "@aws-sdk/core": "3.474.0",
25
- "@aws-sdk/credential-provider-node": "3.474.0",
23
+ "@aws-sdk/client-sts": "3.477.0",
24
+ "@aws-sdk/core": "3.477.0",
25
+ "@aws-sdk/credential-provider-node": "3.477.0",
26
26
  "@aws-sdk/middleware-host-header": "3.468.0",
27
27
  "@aws-sdk/middleware-logger": "3.468.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.468.0",
@@ -34,6 +34,7 @@
34
34
  "@aws-sdk/util-user-agent-browser": "3.468.0",
35
35
  "@aws-sdk/util-user-agent-node": "3.470.0",
36
36
  "@smithy/config-resolver": "^2.0.21",
37
+ "@smithy/core": "^1.2.0",
37
38
  "@smithy/fetch-http-handler": "^2.3.1",
38
39
  "@smithy/hash-node": "^2.0.17",
39
40
  "@smithy/invalid-dependency": "^2.0.15",