@aws-sdk/client-simspaceweaver 3.901.0 → 3.907.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 (2) hide show
  1. package/dist-cjs/index.js +1159 -1305
  2. package/package.json +6 -6
package/dist-cjs/index.js CHANGED
@@ -1,1359 +1,1213 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
1
+ 'use strict';
2
+
3
+ var middlewareHostHeader = require('@aws-sdk/middleware-host-header');
4
+ var middlewareLogger = require('@aws-sdk/middleware-logger');
5
+ var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');
6
+ var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
7
+ var configResolver = require('@smithy/config-resolver');
8
+ var core = require('@smithy/core');
9
+ var middlewareContentLength = require('@smithy/middleware-content-length');
10
+ var middlewareEndpoint = require('@smithy/middleware-endpoint');
11
+ var middlewareRetry = require('@smithy/middleware-retry');
12
+ var smithyClient = require('@smithy/smithy-client');
13
+ var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
14
+ var runtimeConfig = require('./runtimeConfig');
15
+ var regionConfigResolver = require('@aws-sdk/region-config-resolver');
16
+ var protocolHttp = require('@smithy/protocol-http');
17
+ var middlewareSerde = require('@smithy/middleware-serde');
18
+ var core$1 = require('@aws-sdk/core');
19
+ var uuid = require('@smithy/uuid');
20
+
21
+ const resolveClientEndpointParameters = (options) => {
22
+ return Object.assign(options, {
23
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
24
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
25
+ defaultSigningName: "simspaceweaver",
26
+ });
10
27
  };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
28
+ const commonParams = {
29
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
30
+ Endpoint: { type: "builtInParams", name: "endpoint" },
31
+ Region: { type: "builtInParams", name: "region" },
32
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
18
33
  };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/index.ts
22
- var index_exports = {};
23
- __export(index_exports, {
24
- AccessDeniedException: () => AccessDeniedException,
25
- ClockStatus: () => ClockStatus,
26
- ClockTargetStatus: () => ClockTargetStatus,
27
- ConflictException: () => ConflictException,
28
- CreateSnapshotCommand: () => CreateSnapshotCommand,
29
- DeleteAppCommand: () => DeleteAppCommand,
30
- DeleteSimulationCommand: () => DeleteSimulationCommand,
31
- DescribeAppCommand: () => DescribeAppCommand,
32
- DescribeSimulationCommand: () => DescribeSimulationCommand,
33
- InternalServerException: () => InternalServerException,
34
- LifecycleManagementStrategy: () => LifecycleManagementStrategy,
35
- ListAppsCommand: () => ListAppsCommand,
36
- ListSimulationsCommand: () => ListSimulationsCommand,
37
- ListTagsForResourceCommand: () => ListTagsForResourceCommand,
38
- ResourceNotFoundException: () => ResourceNotFoundException,
39
- ServiceQuotaExceededException: () => ServiceQuotaExceededException,
40
- SimSpaceWeaver: () => SimSpaceWeaver,
41
- SimSpaceWeaverClient: () => SimSpaceWeaverClient,
42
- SimSpaceWeaverServiceException: () => SimSpaceWeaverServiceException,
43
- SimulationAppStatus: () => SimulationAppStatus,
44
- SimulationAppTargetStatus: () => SimulationAppTargetStatus,
45
- SimulationStatus: () => SimulationStatus,
46
- SimulationTargetStatus: () => SimulationTargetStatus,
47
- StartAppCommand: () => StartAppCommand,
48
- StartAppInputFilterSensitiveLog: () => StartAppInputFilterSensitiveLog,
49
- StartClockCommand: () => StartClockCommand,
50
- StartSimulationCommand: () => StartSimulationCommand,
51
- StartSimulationInputFilterSensitiveLog: () => StartSimulationInputFilterSensitiveLog,
52
- StopAppCommand: () => StopAppCommand,
53
- StopClockCommand: () => StopClockCommand,
54
- StopSimulationCommand: () => StopSimulationCommand,
55
- TagResourceCommand: () => TagResourceCommand,
56
- TooManyTagsException: () => TooManyTagsException,
57
- UntagResourceCommand: () => UntagResourceCommand,
58
- ValidationException: () => ValidationException,
59
- __Client: () => import_smithy_client.Client,
60
- paginateListApps: () => paginateListApps,
61
- paginateListSimulations: () => paginateListSimulations
62
- });
63
- module.exports = __toCommonJS(index_exports);
64
34
 
65
- // src/SimSpaceWeaverClient.ts
66
- var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
67
- var import_middleware_logger = require("@aws-sdk/middleware-logger");
68
- var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
69
- var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
70
- var import_config_resolver = require("@smithy/config-resolver");
71
- var import_core = require("@smithy/core");
72
- var import_middleware_content_length = require("@smithy/middleware-content-length");
73
- var import_middleware_endpoint = require("@smithy/middleware-endpoint");
74
- var import_middleware_retry = require("@smithy/middleware-retry");
75
-
76
- var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
77
-
78
- // src/endpoint/EndpointParameters.ts
79
- var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
80
- return Object.assign(options, {
81
- useDualstackEndpoint: options.useDualstackEndpoint ?? false,
82
- useFipsEndpoint: options.useFipsEndpoint ?? false,
83
- defaultSigningName: "simspaceweaver"
84
- });
85
- }, "resolveClientEndpointParameters");
86
- var commonParams = {
87
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
88
- Endpoint: { type: "builtInParams", name: "endpoint" },
89
- Region: { type: "builtInParams", name: "region" },
90
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
35
+ const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
36
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
37
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
38
+ let _credentials = runtimeConfig.credentials;
39
+ return {
40
+ setHttpAuthScheme(httpAuthScheme) {
41
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
42
+ if (index === -1) {
43
+ _httpAuthSchemes.push(httpAuthScheme);
44
+ }
45
+ else {
46
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
47
+ }
48
+ },
49
+ httpAuthSchemes() {
50
+ return _httpAuthSchemes;
51
+ },
52
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
53
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
54
+ },
55
+ httpAuthSchemeProvider() {
56
+ return _httpAuthSchemeProvider;
57
+ },
58
+ setCredentials(credentials) {
59
+ _credentials = credentials;
60
+ },
61
+ credentials() {
62
+ return _credentials;
63
+ },
64
+ };
65
+ };
66
+ const resolveHttpAuthRuntimeConfig = (config) => {
67
+ return {
68
+ httpAuthSchemes: config.httpAuthSchemes(),
69
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
70
+ credentials: config.credentials(),
71
+ };
91
72
  };
92
73
 
93
- // src/SimSpaceWeaverClient.ts
94
- var import_runtimeConfig = require("././runtimeConfig");
95
-
96
- // src/runtimeExtensions.ts
97
- var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
98
- var import_protocol_http = require("@smithy/protocol-http");
99
- var import_smithy_client = require("@smithy/smithy-client");
74
+ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
75
+ const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
76
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
77
+ return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
78
+ };
100
79
 
101
- // src/auth/httpAuthExtensionConfiguration.ts
102
- var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
103
- const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
104
- let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
105
- let _credentials = runtimeConfig.credentials;
106
- return {
107
- setHttpAuthScheme(httpAuthScheme) {
108
- const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
109
- if (index === -1) {
110
- _httpAuthSchemes.push(httpAuthScheme);
111
- } else {
112
- _httpAuthSchemes.splice(index, 1, httpAuthScheme);
113
- }
114
- },
115
- httpAuthSchemes() {
116
- return _httpAuthSchemes;
117
- },
118
- setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
119
- _httpAuthSchemeProvider = httpAuthSchemeProvider;
120
- },
121
- httpAuthSchemeProvider() {
122
- return _httpAuthSchemeProvider;
123
- },
124
- setCredentials(credentials) {
125
- _credentials = credentials;
126
- },
127
- credentials() {
128
- return _credentials;
80
+ class SimSpaceWeaverClient extends smithyClient.Client {
81
+ config;
82
+ constructor(...[configuration]) {
83
+ const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
84
+ super(_config_0);
85
+ this.initConfig = _config_0;
86
+ const _config_1 = resolveClientEndpointParameters(_config_0);
87
+ const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
88
+ const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
89
+ const _config_4 = configResolver.resolveRegionConfig(_config_3);
90
+ const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
91
+ const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
92
+ const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
93
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
94
+ this.config = _config_8;
95
+ this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
96
+ this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
97
+ this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
98
+ this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
99
+ this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
100
+ this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
101
+ this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
102
+ httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultSimSpaceWeaverHttpAuthSchemeParametersProvider,
103
+ identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
104
+ "aws.auth#sigv4": config.credentials,
105
+ }),
106
+ }));
107
+ this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
129
108
  }
130
- };
131
- }, "getHttpAuthExtensionConfiguration");
132
- var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
133
- return {
134
- httpAuthSchemes: config.httpAuthSchemes(),
135
- httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
136
- credentials: config.credentials()
137
- };
138
- }, "resolveHttpAuthRuntimeConfig");
139
-
140
- // src/runtimeExtensions.ts
141
- var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
142
- const extensionConfiguration = Object.assign(
143
- (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
144
- (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
145
- (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
146
- getHttpAuthExtensionConfiguration(runtimeConfig)
147
- );
148
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
149
- return Object.assign(
150
- runtimeConfig,
151
- (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
152
- (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
153
- (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
154
- resolveHttpAuthRuntimeConfig(extensionConfiguration)
155
- );
156
- }, "resolveRuntimeExtensions");
109
+ destroy() {
110
+ super.destroy();
111
+ }
112
+ }
157
113
 
158
- // src/SimSpaceWeaverClient.ts
159
- var SimSpaceWeaverClient = class extends import_smithy_client.Client {
160
- static {
161
- __name(this, "SimSpaceWeaverClient");
162
- }
163
- /**
164
- * The resolved configuration of SimSpaceWeaverClient class. This is resolved and normalized from the {@link SimSpaceWeaverClientConfig | constructor configuration interface}.
165
- */
166
- config;
167
- constructor(...[configuration]) {
168
- const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
169
- super(_config_0);
170
- this.initConfig = _config_0;
171
- const _config_1 = resolveClientEndpointParameters(_config_0);
172
- const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
173
- const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
174
- const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
175
- const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
176
- const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
177
- const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
178
- const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
179
- this.config = _config_8;
180
- this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
181
- this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
182
- this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
183
- this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
184
- this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
185
- this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
186
- this.middlewareStack.use(
187
- (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
188
- httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultSimSpaceWeaverHttpAuthSchemeParametersProvider,
189
- identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
190
- "aws.auth#sigv4": config.credentials
191
- }), "identityProviderConfigProvider")
192
- })
193
- );
194
- this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
195
- }
196
- /**
197
- * Destroy underlying resources, like sockets. It's usually not necessary to do this.
198
- * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
199
- * Otherwise, sockets might stay open for quite a long time before the server terminates them.
200
- */
201
- destroy() {
202
- super.destroy();
203
- }
114
+ class SimSpaceWeaverServiceException extends smithyClient.ServiceException {
115
+ constructor(options) {
116
+ super(options);
117
+ Object.setPrototypeOf(this, SimSpaceWeaverServiceException.prototype);
118
+ }
119
+ }
120
+
121
+ class AccessDeniedException extends SimSpaceWeaverServiceException {
122
+ name = "AccessDeniedException";
123
+ $fault = "client";
124
+ Message;
125
+ constructor(opts) {
126
+ super({
127
+ name: "AccessDeniedException",
128
+ $fault: "client",
129
+ ...opts,
130
+ });
131
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
132
+ this.Message = opts.Message;
133
+ }
134
+ }
135
+ const ClockStatus = {
136
+ STARTED: "STARTED",
137
+ STARTING: "STARTING",
138
+ STOPPED: "STOPPED",
139
+ STOPPING: "STOPPING",
140
+ UNKNOWN: "UNKNOWN",
204
141
  };
205
-
206
- // src/SimSpaceWeaver.ts
207
-
208
-
209
- // src/commands/CreateSnapshotCommand.ts
210
-
211
- var import_middleware_serde = require("@smithy/middleware-serde");
212
-
213
-
214
- // src/protocols/Aws_restJson1.ts
215
- var import_core2 = require("@aws-sdk/core");
216
-
217
-
218
- var import_uuid = require("@smithy/uuid");
219
-
220
- // src/models/models_0.ts
221
-
222
-
223
- // src/models/SimSpaceWeaverServiceException.ts
224
-
225
- var SimSpaceWeaverServiceException = class _SimSpaceWeaverServiceException extends import_smithy_client.ServiceException {
226
- static {
227
- __name(this, "SimSpaceWeaverServiceException");
228
- }
229
- /**
230
- * @internal
231
- */
232
- constructor(options) {
233
- super(options);
234
- Object.setPrototypeOf(this, _SimSpaceWeaverServiceException.prototype);
235
- }
142
+ const ClockTargetStatus = {
143
+ STARTED: "STARTED",
144
+ STOPPED: "STOPPED",
145
+ UNKNOWN: "UNKNOWN",
146
+ };
147
+ class ConflictException extends SimSpaceWeaverServiceException {
148
+ name = "ConflictException";
149
+ $fault = "client";
150
+ Message;
151
+ constructor(opts) {
152
+ super({
153
+ name: "ConflictException",
154
+ $fault: "client",
155
+ ...opts,
156
+ });
157
+ Object.setPrototypeOf(this, ConflictException.prototype);
158
+ this.Message = opts.Message;
159
+ }
160
+ }
161
+ class InternalServerException extends SimSpaceWeaverServiceException {
162
+ name = "InternalServerException";
163
+ $fault = "server";
164
+ Message;
165
+ constructor(opts) {
166
+ super({
167
+ name: "InternalServerException",
168
+ $fault: "server",
169
+ ...opts,
170
+ });
171
+ Object.setPrototypeOf(this, InternalServerException.prototype);
172
+ this.Message = opts.Message;
173
+ }
174
+ }
175
+ class ResourceNotFoundException extends SimSpaceWeaverServiceException {
176
+ name = "ResourceNotFoundException";
177
+ $fault = "client";
178
+ Message;
179
+ constructor(opts) {
180
+ super({
181
+ name: "ResourceNotFoundException",
182
+ $fault: "client",
183
+ ...opts,
184
+ });
185
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
186
+ this.Message = opts.Message;
187
+ }
188
+ }
189
+ class ValidationException extends SimSpaceWeaverServiceException {
190
+ name = "ValidationException";
191
+ $fault = "client";
192
+ Message;
193
+ constructor(opts) {
194
+ super({
195
+ name: "ValidationException",
196
+ $fault: "client",
197
+ ...opts,
198
+ });
199
+ Object.setPrototypeOf(this, ValidationException.prototype);
200
+ this.Message = opts.Message;
201
+ }
202
+ }
203
+ const SimulationAppStatus = {
204
+ ERROR: "ERROR",
205
+ STARTED: "STARTED",
206
+ STARTING: "STARTING",
207
+ STOPPED: "STOPPED",
208
+ STOPPING: "STOPPING",
209
+ UNKNOWN: "UNKNOWN",
210
+ };
211
+ const SimulationAppTargetStatus = {
212
+ STARTED: "STARTED",
213
+ STOPPED: "STOPPED",
214
+ UNKNOWN: "UNKNOWN",
215
+ };
216
+ const LifecycleManagementStrategy = {
217
+ ByRequest: "ByRequest",
218
+ BySpatialSubdivision: "BySpatialSubdivision",
219
+ PerWorker: "PerWorker",
220
+ Unknown: "Unknown",
221
+ };
222
+ const SimulationStatus = {
223
+ DELETED: "DELETED",
224
+ DELETING: "DELETING",
225
+ FAILED: "FAILED",
226
+ SNAPSHOT_IN_PROGRESS: "SNAPSHOT_IN_PROGRESS",
227
+ STARTED: "STARTED",
228
+ STARTING: "STARTING",
229
+ STOPPED: "STOPPED",
230
+ STOPPING: "STOPPING",
231
+ UNKNOWN: "UNKNOWN",
232
+ };
233
+ const SimulationTargetStatus = {
234
+ DELETED: "DELETED",
235
+ STARTED: "STARTED",
236
+ STOPPED: "STOPPED",
237
+ UNKNOWN: "UNKNOWN",
236
238
  };
239
+ class ServiceQuotaExceededException extends SimSpaceWeaverServiceException {
240
+ name = "ServiceQuotaExceededException";
241
+ $fault = "client";
242
+ Message;
243
+ constructor(opts) {
244
+ super({
245
+ name: "ServiceQuotaExceededException",
246
+ $fault: "client",
247
+ ...opts,
248
+ });
249
+ Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
250
+ this.Message = opts.Message;
251
+ }
252
+ }
253
+ class TooManyTagsException extends SimSpaceWeaverServiceException {
254
+ name = "TooManyTagsException";
255
+ $fault = "client";
256
+ Message;
257
+ constructor(opts) {
258
+ super({
259
+ name: "TooManyTagsException",
260
+ $fault: "client",
261
+ ...opts,
262
+ });
263
+ Object.setPrototypeOf(this, TooManyTagsException.prototype);
264
+ this.Message = opts.Message;
265
+ }
266
+ }
267
+ const StartAppInputFilterSensitiveLog = (obj) => ({
268
+ ...obj,
269
+ ...(obj.ClientToken && { ClientToken: smithyClient.SENSITIVE_STRING }),
270
+ });
271
+ const StartSimulationInputFilterSensitiveLog = (obj) => ({
272
+ ...obj,
273
+ ...(obj.ClientToken && { ClientToken: smithyClient.SENSITIVE_STRING }),
274
+ });
237
275
 
238
- // src/models/models_0.ts
239
- var AccessDeniedException = class _AccessDeniedException extends SimSpaceWeaverServiceException {
240
- static {
241
- __name(this, "AccessDeniedException");
242
- }
243
- name = "AccessDeniedException";
244
- $fault = "client";
245
- Message;
246
- /**
247
- * @internal
248
- */
249
- constructor(opts) {
250
- super({
251
- name: "AccessDeniedException",
252
- $fault: "client",
253
- ...opts
276
+ const se_CreateSnapshotCommand = async (input, context) => {
277
+ const b = core.requestBuilder(input, context);
278
+ const headers = {
279
+ "content-type": "application/json",
280
+ };
281
+ b.bp("/createsnapshot");
282
+ let body;
283
+ body = JSON.stringify(smithyClient.take(input, {
284
+ Destination: (_) => smithyClient._json(_),
285
+ Simulation: [],
286
+ }));
287
+ b.m("POST").h(headers).b(body);
288
+ return b.build();
289
+ };
290
+ const se_DeleteAppCommand = async (input, context) => {
291
+ const b = core.requestBuilder(input, context);
292
+ const headers = {};
293
+ b.bp("/deleteapp");
294
+ const query = smithyClient.map({
295
+ [_s]: [, smithyClient.expectNonNull(input[_S], `Simulation`)],
296
+ [_d]: [, smithyClient.expectNonNull(input[_D], `Domain`)],
297
+ [_a]: [, smithyClient.expectNonNull(input[_A], `App`)],
254
298
  });
255
- Object.setPrototypeOf(this, _AccessDeniedException.prototype);
256
- this.Message = opts.Message;
257
- }
299
+ let body;
300
+ b.m("DELETE").h(headers).q(query).b(body);
301
+ return b.build();
258
302
  };
259
- var ClockStatus = {
260
- STARTED: "STARTED",
261
- STARTING: "STARTING",
262
- STOPPED: "STOPPED",
263
- STOPPING: "STOPPING",
264
- UNKNOWN: "UNKNOWN"
303
+ const se_DeleteSimulationCommand = async (input, context) => {
304
+ const b = core.requestBuilder(input, context);
305
+ const headers = {};
306
+ b.bp("/deletesimulation");
307
+ const query = smithyClient.map({
308
+ [_s]: [, smithyClient.expectNonNull(input[_S], `Simulation`)],
309
+ });
310
+ let body;
311
+ b.m("DELETE").h(headers).q(query).b(body);
312
+ return b.build();
265
313
  };
266
- var ClockTargetStatus = {
267
- STARTED: "STARTED",
268
- STOPPED: "STOPPED",
269
- UNKNOWN: "UNKNOWN"
314
+ const se_DescribeAppCommand = async (input, context) => {
315
+ const b = core.requestBuilder(input, context);
316
+ const headers = {};
317
+ b.bp("/describeapp");
318
+ const query = smithyClient.map({
319
+ [_s]: [, smithyClient.expectNonNull(input[_S], `Simulation`)],
320
+ [_d]: [, smithyClient.expectNonNull(input[_D], `Domain`)],
321
+ [_a]: [, smithyClient.expectNonNull(input[_A], `App`)],
322
+ });
323
+ let body;
324
+ b.m("GET").h(headers).q(query).b(body);
325
+ return b.build();
270
326
  };
271
- var ConflictException = class _ConflictException extends SimSpaceWeaverServiceException {
272
- static {
273
- __name(this, "ConflictException");
274
- }
275
- name = "ConflictException";
276
- $fault = "client";
277
- Message;
278
- /**
279
- * @internal
280
- */
281
- constructor(opts) {
282
- super({
283
- name: "ConflictException",
284
- $fault: "client",
285
- ...opts
327
+ const se_DescribeSimulationCommand = async (input, context) => {
328
+ const b = core.requestBuilder(input, context);
329
+ const headers = {};
330
+ b.bp("/describesimulation");
331
+ const query = smithyClient.map({
332
+ [_s]: [, smithyClient.expectNonNull(input[_S], `Simulation`)],
286
333
  });
287
- Object.setPrototypeOf(this, _ConflictException.prototype);
288
- this.Message = opts.Message;
289
- }
334
+ let body;
335
+ b.m("GET").h(headers).q(query).b(body);
336
+ return b.build();
290
337
  };
291
- var InternalServerException = class _InternalServerException extends SimSpaceWeaverServiceException {
292
- static {
293
- __name(this, "InternalServerException");
294
- }
295
- name = "InternalServerException";
296
- $fault = "server";
297
- Message;
298
- /**
299
- * @internal
300
- */
301
- constructor(opts) {
302
- super({
303
- name: "InternalServerException",
304
- $fault: "server",
305
- ...opts
338
+ const se_ListAppsCommand = async (input, context) => {
339
+ const b = core.requestBuilder(input, context);
340
+ const headers = {};
341
+ b.bp("/listapps");
342
+ const query = smithyClient.map({
343
+ [_s]: [, smithyClient.expectNonNull(input[_S], `Simulation`)],
344
+ [_d]: [, input[_D]],
345
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
346
+ [_nT]: [, input[_NT]],
306
347
  });
307
- Object.setPrototypeOf(this, _InternalServerException.prototype);
308
- this.Message = opts.Message;
309
- }
348
+ let body;
349
+ b.m("GET").h(headers).q(query).b(body);
350
+ return b.build();
310
351
  };
311
- var ResourceNotFoundException = class _ResourceNotFoundException extends SimSpaceWeaverServiceException {
312
- static {
313
- __name(this, "ResourceNotFoundException");
314
- }
315
- name = "ResourceNotFoundException";
316
- $fault = "client";
317
- Message;
318
- /**
319
- * @internal
320
- */
321
- constructor(opts) {
322
- super({
323
- name: "ResourceNotFoundException",
324
- $fault: "client",
325
- ...opts
352
+ const se_ListSimulationsCommand = async (input, context) => {
353
+ const b = core.requestBuilder(input, context);
354
+ const headers = {};
355
+ b.bp("/listsimulations");
356
+ const query = smithyClient.map({
357
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
358
+ [_nT]: [, input[_NT]],
326
359
  });
327
- Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
328
- this.Message = opts.Message;
329
- }
360
+ let body;
361
+ b.m("GET").h(headers).q(query).b(body);
362
+ return b.build();
363
+ };
364
+ const se_ListTagsForResourceCommand = async (input, context) => {
365
+ const b = core.requestBuilder(input, context);
366
+ const headers = {};
367
+ b.bp("/tags/{ResourceArn}");
368
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
369
+ let body;
370
+ b.m("GET").h(headers).b(body);
371
+ return b.build();
372
+ };
373
+ const se_StartAppCommand = async (input, context) => {
374
+ const b = core.requestBuilder(input, context);
375
+ const headers = {
376
+ "content-type": "application/json",
377
+ };
378
+ b.bp("/startapp");
379
+ let body;
380
+ body = JSON.stringify(smithyClient.take(input, {
381
+ ClientToken: [true, (_) => _ ?? uuid.v4()],
382
+ Description: [],
383
+ Domain: [],
384
+ LaunchOverrides: (_) => smithyClient._json(_),
385
+ Name: [],
386
+ Simulation: [],
387
+ }));
388
+ b.m("POST").h(headers).b(body);
389
+ return b.build();
390
+ };
391
+ const se_StartClockCommand = async (input, context) => {
392
+ const b = core.requestBuilder(input, context);
393
+ const headers = {
394
+ "content-type": "application/json",
395
+ };
396
+ b.bp("/startclock");
397
+ let body;
398
+ body = JSON.stringify(smithyClient.take(input, {
399
+ Simulation: [],
400
+ }));
401
+ b.m("POST").h(headers).b(body);
402
+ return b.build();
330
403
  };
331
- var ValidationException = class _ValidationException extends SimSpaceWeaverServiceException {
332
- static {
333
- __name(this, "ValidationException");
334
- }
335
- name = "ValidationException";
336
- $fault = "client";
337
- Message;
338
- /**
339
- * @internal
340
- */
341
- constructor(opts) {
342
- super({
343
- name: "ValidationException",
344
- $fault: "client",
345
- ...opts
404
+ const se_StartSimulationCommand = async (input, context) => {
405
+ const b = core.requestBuilder(input, context);
406
+ const headers = {
407
+ "content-type": "application/json",
408
+ };
409
+ b.bp("/startsimulation");
410
+ let body;
411
+ body = JSON.stringify(smithyClient.take(input, {
412
+ ClientToken: [true, (_) => _ ?? uuid.v4()],
413
+ Description: [],
414
+ MaximumDuration: [],
415
+ Name: [],
416
+ RoleArn: [],
417
+ SchemaS3Location: (_) => smithyClient._json(_),
418
+ SnapshotS3Location: (_) => smithyClient._json(_),
419
+ Tags: (_) => smithyClient._json(_),
420
+ }));
421
+ b.m("POST").h(headers).b(body);
422
+ return b.build();
423
+ };
424
+ const se_StopAppCommand = async (input, context) => {
425
+ const b = core.requestBuilder(input, context);
426
+ const headers = {
427
+ "content-type": "application/json",
428
+ };
429
+ b.bp("/stopapp");
430
+ let body;
431
+ body = JSON.stringify(smithyClient.take(input, {
432
+ App: [],
433
+ Domain: [],
434
+ Simulation: [],
435
+ }));
436
+ b.m("POST").h(headers).b(body);
437
+ return b.build();
438
+ };
439
+ const se_StopClockCommand = async (input, context) => {
440
+ const b = core.requestBuilder(input, context);
441
+ const headers = {
442
+ "content-type": "application/json",
443
+ };
444
+ b.bp("/stopclock");
445
+ let body;
446
+ body = JSON.stringify(smithyClient.take(input, {
447
+ Simulation: [],
448
+ }));
449
+ b.m("POST").h(headers).b(body);
450
+ return b.build();
451
+ };
452
+ const se_StopSimulationCommand = async (input, context) => {
453
+ const b = core.requestBuilder(input, context);
454
+ const headers = {
455
+ "content-type": "application/json",
456
+ };
457
+ b.bp("/stopsimulation");
458
+ let body;
459
+ body = JSON.stringify(smithyClient.take(input, {
460
+ Simulation: [],
461
+ }));
462
+ b.m("POST").h(headers).b(body);
463
+ return b.build();
464
+ };
465
+ const se_TagResourceCommand = async (input, context) => {
466
+ const b = core.requestBuilder(input, context);
467
+ const headers = {
468
+ "content-type": "application/json",
469
+ };
470
+ b.bp("/tags/{ResourceArn}");
471
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
472
+ let body;
473
+ body = JSON.stringify(smithyClient.take(input, {
474
+ Tags: (_) => smithyClient._json(_),
475
+ }));
476
+ b.m("POST").h(headers).b(body);
477
+ return b.build();
478
+ };
479
+ const se_UntagResourceCommand = async (input, context) => {
480
+ const b = core.requestBuilder(input, context);
481
+ const headers = {};
482
+ b.bp("/tags/{ResourceArn}");
483
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
484
+ const query = smithyClient.map({
485
+ [_tK]: [smithyClient.expectNonNull(input.TagKeys, `TagKeys`) != null, () => input[_TK] || []],
346
486
  });
347
- Object.setPrototypeOf(this, _ValidationException.prototype);
348
- this.Message = opts.Message;
349
- }
487
+ let body;
488
+ b.m("DELETE").h(headers).q(query).b(body);
489
+ return b.build();
350
490
  };
351
- var SimulationAppStatus = {
352
- ERROR: "ERROR",
353
- STARTED: "STARTED",
354
- STARTING: "STARTING",
355
- STOPPED: "STOPPED",
356
- STOPPING: "STOPPING",
357
- UNKNOWN: "UNKNOWN"
491
+ const de_CreateSnapshotCommand = async (output, context) => {
492
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
493
+ return de_CommandError(output, context);
494
+ }
495
+ const contents = smithyClient.map({
496
+ $metadata: deserializeMetadata(output),
497
+ });
498
+ await smithyClient.collectBody(output.body, context);
499
+ return contents;
358
500
  };
359
- var SimulationAppTargetStatus = {
360
- STARTED: "STARTED",
361
- STOPPED: "STOPPED",
362
- UNKNOWN: "UNKNOWN"
501
+ const de_DeleteAppCommand = async (output, context) => {
502
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
503
+ return de_CommandError(output, context);
504
+ }
505
+ const contents = smithyClient.map({
506
+ $metadata: deserializeMetadata(output),
507
+ });
508
+ await smithyClient.collectBody(output.body, context);
509
+ return contents;
363
510
  };
364
- var LifecycleManagementStrategy = {
365
- ByRequest: "ByRequest",
366
- BySpatialSubdivision: "BySpatialSubdivision",
367
- PerWorker: "PerWorker",
368
- Unknown: "Unknown"
511
+ const de_DeleteSimulationCommand = async (output, context) => {
512
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
513
+ return de_CommandError(output, context);
514
+ }
515
+ const contents = smithyClient.map({
516
+ $metadata: deserializeMetadata(output),
517
+ });
518
+ await smithyClient.collectBody(output.body, context);
519
+ return contents;
369
520
  };
370
- var SimulationStatus = {
371
- DELETED: "DELETED",
372
- DELETING: "DELETING",
373
- FAILED: "FAILED",
374
- SNAPSHOT_IN_PROGRESS: "SNAPSHOT_IN_PROGRESS",
375
- STARTED: "STARTED",
376
- STARTING: "STARTING",
377
- STOPPED: "STOPPED",
378
- STOPPING: "STOPPING",
379
- UNKNOWN: "UNKNOWN"
521
+ const de_DescribeAppCommand = async (output, context) => {
522
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
523
+ return de_CommandError(output, context);
524
+ }
525
+ const contents = smithyClient.map({
526
+ $metadata: deserializeMetadata(output),
527
+ });
528
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
529
+ const doc = smithyClient.take(data, {
530
+ Description: smithyClient.expectString,
531
+ Domain: smithyClient.expectString,
532
+ EndpointInfo: smithyClient._json,
533
+ LaunchOverrides: smithyClient._json,
534
+ Name: smithyClient.expectString,
535
+ Simulation: smithyClient.expectString,
536
+ Status: smithyClient.expectString,
537
+ TargetStatus: smithyClient.expectString,
538
+ });
539
+ Object.assign(contents, doc);
540
+ return contents;
380
541
  };
381
- var SimulationTargetStatus = {
382
- DELETED: "DELETED",
383
- STARTED: "STARTED",
384
- STOPPED: "STOPPED",
385
- UNKNOWN: "UNKNOWN"
542
+ const de_DescribeSimulationCommand = async (output, context) => {
543
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
544
+ return de_CommandError(output, context);
545
+ }
546
+ const contents = smithyClient.map({
547
+ $metadata: deserializeMetadata(output),
548
+ });
549
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
550
+ const doc = smithyClient.take(data, {
551
+ Arn: smithyClient.expectString,
552
+ CreationTime: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
553
+ Description: smithyClient.expectString,
554
+ ExecutionId: smithyClient.expectString,
555
+ LiveSimulationState: smithyClient._json,
556
+ LoggingConfiguration: smithyClient._json,
557
+ MaximumDuration: smithyClient.expectString,
558
+ Name: smithyClient.expectString,
559
+ RoleArn: smithyClient.expectString,
560
+ SchemaError: smithyClient.expectString,
561
+ SchemaS3Location: smithyClient._json,
562
+ SnapshotS3Location: smithyClient._json,
563
+ StartError: smithyClient.expectString,
564
+ Status: smithyClient.expectString,
565
+ TargetStatus: smithyClient.expectString,
566
+ });
567
+ Object.assign(contents, doc);
568
+ return contents;
386
569
  };
387
- var ServiceQuotaExceededException = class _ServiceQuotaExceededException extends SimSpaceWeaverServiceException {
388
- static {
389
- __name(this, "ServiceQuotaExceededException");
390
- }
391
- name = "ServiceQuotaExceededException";
392
- $fault = "client";
393
- Message;
394
- /**
395
- * @internal
396
- */
397
- constructor(opts) {
398
- super({
399
- name: "ServiceQuotaExceededException",
400
- $fault: "client",
401
- ...opts
570
+ const de_ListAppsCommand = async (output, context) => {
571
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
572
+ return de_CommandError(output, context);
573
+ }
574
+ const contents = smithyClient.map({
575
+ $metadata: deserializeMetadata(output),
576
+ });
577
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
578
+ const doc = smithyClient.take(data, {
579
+ Apps: smithyClient._json,
580
+ NextToken: smithyClient.expectString,
402
581
  });
403
- Object.setPrototypeOf(this, _ServiceQuotaExceededException.prototype);
404
- this.Message = opts.Message;
405
- }
582
+ Object.assign(contents, doc);
583
+ return contents;
406
584
  };
407
- var TooManyTagsException = class _TooManyTagsException extends SimSpaceWeaverServiceException {
408
- static {
409
- __name(this, "TooManyTagsException");
410
- }
411
- name = "TooManyTagsException";
412
- $fault = "client";
413
- Message;
414
- /**
415
- * @internal
416
- */
417
- constructor(opts) {
418
- super({
419
- name: "TooManyTagsException",
420
- $fault: "client",
421
- ...opts
585
+ const de_ListSimulationsCommand = async (output, context) => {
586
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
587
+ return de_CommandError(output, context);
588
+ }
589
+ const contents = smithyClient.map({
590
+ $metadata: deserializeMetadata(output),
422
591
  });
423
- Object.setPrototypeOf(this, _TooManyTagsException.prototype);
424
- this.Message = opts.Message;
425
- }
592
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
593
+ const doc = smithyClient.take(data, {
594
+ NextToken: smithyClient.expectString,
595
+ Simulations: (_) => de_SimulationList(_),
596
+ });
597
+ Object.assign(contents, doc);
598
+ return contents;
426
599
  };
427
- var StartAppInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
428
- ...obj,
429
- ...obj.ClientToken && { ClientToken: import_smithy_client.SENSITIVE_STRING }
430
- }), "StartAppInputFilterSensitiveLog");
431
- var StartSimulationInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
432
- ...obj,
433
- ...obj.ClientToken && { ClientToken: import_smithy_client.SENSITIVE_STRING }
434
- }), "StartSimulationInputFilterSensitiveLog");
435
-
436
- // src/protocols/Aws_restJson1.ts
437
- var se_CreateSnapshotCommand = /* @__PURE__ */ __name(async (input, context) => {
438
- const b = (0, import_core.requestBuilder)(input, context);
439
- const headers = {
440
- "content-type": "application/json"
441
- };
442
- b.bp("/createsnapshot");
443
- let body;
444
- body = JSON.stringify(
445
- (0, import_smithy_client.take)(input, {
446
- Destination: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "Destination"),
447
- Simulation: []
448
- })
449
- );
450
- b.m("POST").h(headers).b(body);
451
- return b.build();
452
- }, "se_CreateSnapshotCommand");
453
- var se_DeleteAppCommand = /* @__PURE__ */ __name(async (input, context) => {
454
- const b = (0, import_core.requestBuilder)(input, context);
455
- const headers = {};
456
- b.bp("/deleteapp");
457
- const query = (0, import_smithy_client.map)({
458
- [_s]: [, (0, import_smithy_client.expectNonNull)(input[_S], `Simulation`)],
459
- [_d]: [, (0, import_smithy_client.expectNonNull)(input[_D], `Domain`)],
460
- [_a]: [, (0, import_smithy_client.expectNonNull)(input[_A], `App`)]
461
- });
462
- let body;
463
- b.m("DELETE").h(headers).q(query).b(body);
464
- return b.build();
465
- }, "se_DeleteAppCommand");
466
- var se_DeleteSimulationCommand = /* @__PURE__ */ __name(async (input, context) => {
467
- const b = (0, import_core.requestBuilder)(input, context);
468
- const headers = {};
469
- b.bp("/deletesimulation");
470
- const query = (0, import_smithy_client.map)({
471
- [_s]: [, (0, import_smithy_client.expectNonNull)(input[_S], `Simulation`)]
472
- });
473
- let body;
474
- b.m("DELETE").h(headers).q(query).b(body);
475
- return b.build();
476
- }, "se_DeleteSimulationCommand");
477
- var se_DescribeAppCommand = /* @__PURE__ */ __name(async (input, context) => {
478
- const b = (0, import_core.requestBuilder)(input, context);
479
- const headers = {};
480
- b.bp("/describeapp");
481
- const query = (0, import_smithy_client.map)({
482
- [_s]: [, (0, import_smithy_client.expectNonNull)(input[_S], `Simulation`)],
483
- [_d]: [, (0, import_smithy_client.expectNonNull)(input[_D], `Domain`)],
484
- [_a]: [, (0, import_smithy_client.expectNonNull)(input[_A], `App`)]
485
- });
486
- let body;
487
- b.m("GET").h(headers).q(query).b(body);
488
- return b.build();
489
- }, "se_DescribeAppCommand");
490
- var se_DescribeSimulationCommand = /* @__PURE__ */ __name(async (input, context) => {
491
- const b = (0, import_core.requestBuilder)(input, context);
492
- const headers = {};
493
- b.bp("/describesimulation");
494
- const query = (0, import_smithy_client.map)({
495
- [_s]: [, (0, import_smithy_client.expectNonNull)(input[_S], `Simulation`)]
496
- });
497
- let body;
498
- b.m("GET").h(headers).q(query).b(body);
499
- return b.build();
500
- }, "se_DescribeSimulationCommand");
501
- var se_ListAppsCommand = /* @__PURE__ */ __name(async (input, context) => {
502
- const b = (0, import_core.requestBuilder)(input, context);
503
- const headers = {};
504
- b.bp("/listapps");
505
- const query = (0, import_smithy_client.map)({
506
- [_s]: [, (0, import_smithy_client.expectNonNull)(input[_S], `Simulation`)],
507
- [_d]: [, input[_D]],
508
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
509
- [_nT]: [, input[_NT]]
510
- });
511
- let body;
512
- b.m("GET").h(headers).q(query).b(body);
513
- return b.build();
514
- }, "se_ListAppsCommand");
515
- var se_ListSimulationsCommand = /* @__PURE__ */ __name(async (input, context) => {
516
- const b = (0, import_core.requestBuilder)(input, context);
517
- const headers = {};
518
- b.bp("/listsimulations");
519
- const query = (0, import_smithy_client.map)({
520
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
521
- [_nT]: [, input[_NT]]
522
- });
523
- let body;
524
- b.m("GET").h(headers).q(query).b(body);
525
- return b.build();
526
- }, "se_ListSimulationsCommand");
527
- var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
528
- const b = (0, import_core.requestBuilder)(input, context);
529
- const headers = {};
530
- b.bp("/tags/{ResourceArn}");
531
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
532
- let body;
533
- b.m("GET").h(headers).b(body);
534
- return b.build();
535
- }, "se_ListTagsForResourceCommand");
536
- var se_StartAppCommand = /* @__PURE__ */ __name(async (input, context) => {
537
- const b = (0, import_core.requestBuilder)(input, context);
538
- const headers = {
539
- "content-type": "application/json"
540
- };
541
- b.bp("/startapp");
542
- let body;
543
- body = JSON.stringify(
544
- (0, import_smithy_client.take)(input, {
545
- ClientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
546
- Description: [],
547
- Domain: [],
548
- LaunchOverrides: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "LaunchOverrides"),
549
- Name: [],
550
- Simulation: []
551
- })
552
- );
553
- b.m("POST").h(headers).b(body);
554
- return b.build();
555
- }, "se_StartAppCommand");
556
- var se_StartClockCommand = /* @__PURE__ */ __name(async (input, context) => {
557
- const b = (0, import_core.requestBuilder)(input, context);
558
- const headers = {
559
- "content-type": "application/json"
560
- };
561
- b.bp("/startclock");
562
- let body;
563
- body = JSON.stringify(
564
- (0, import_smithy_client.take)(input, {
565
- Simulation: []
566
- })
567
- );
568
- b.m("POST").h(headers).b(body);
569
- return b.build();
570
- }, "se_StartClockCommand");
571
- var se_StartSimulationCommand = /* @__PURE__ */ __name(async (input, context) => {
572
- const b = (0, import_core.requestBuilder)(input, context);
573
- const headers = {
574
- "content-type": "application/json"
575
- };
576
- b.bp("/startsimulation");
577
- let body;
578
- body = JSON.stringify(
579
- (0, import_smithy_client.take)(input, {
580
- ClientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
581
- Description: [],
582
- MaximumDuration: [],
583
- Name: [],
584
- RoleArn: [],
585
- SchemaS3Location: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "SchemaS3Location"),
586
- SnapshotS3Location: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "SnapshotS3Location"),
587
- Tags: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "Tags")
588
- })
589
- );
590
- b.m("POST").h(headers).b(body);
591
- return b.build();
592
- }, "se_StartSimulationCommand");
593
- var se_StopAppCommand = /* @__PURE__ */ __name(async (input, context) => {
594
- const b = (0, import_core.requestBuilder)(input, context);
595
- const headers = {
596
- "content-type": "application/json"
597
- };
598
- b.bp("/stopapp");
599
- let body;
600
- body = JSON.stringify(
601
- (0, import_smithy_client.take)(input, {
602
- App: [],
603
- Domain: [],
604
- Simulation: []
605
- })
606
- );
607
- b.m("POST").h(headers).b(body);
608
- return b.build();
609
- }, "se_StopAppCommand");
610
- var se_StopClockCommand = /* @__PURE__ */ __name(async (input, context) => {
611
- const b = (0, import_core.requestBuilder)(input, context);
612
- const headers = {
613
- "content-type": "application/json"
614
- };
615
- b.bp("/stopclock");
616
- let body;
617
- body = JSON.stringify(
618
- (0, import_smithy_client.take)(input, {
619
- Simulation: []
620
- })
621
- );
622
- b.m("POST").h(headers).b(body);
623
- return b.build();
624
- }, "se_StopClockCommand");
625
- var se_StopSimulationCommand = /* @__PURE__ */ __name(async (input, context) => {
626
- const b = (0, import_core.requestBuilder)(input, context);
627
- const headers = {
628
- "content-type": "application/json"
629
- };
630
- b.bp("/stopsimulation");
631
- let body;
632
- body = JSON.stringify(
633
- (0, import_smithy_client.take)(input, {
634
- Simulation: []
635
- })
636
- );
637
- b.m("POST").h(headers).b(body);
638
- return b.build();
639
- }, "se_StopSimulationCommand");
640
- var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
641
- const b = (0, import_core.requestBuilder)(input, context);
642
- const headers = {
643
- "content-type": "application/json"
644
- };
645
- b.bp("/tags/{ResourceArn}");
646
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
647
- let body;
648
- body = JSON.stringify(
649
- (0, import_smithy_client.take)(input, {
650
- Tags: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "Tags")
651
- })
652
- );
653
- b.m("POST").h(headers).b(body);
654
- return b.build();
655
- }, "se_TagResourceCommand");
656
- var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
657
- const b = (0, import_core.requestBuilder)(input, context);
658
- const headers = {};
659
- b.bp("/tags/{ResourceArn}");
660
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
661
- const query = (0, import_smithy_client.map)({
662
- [_tK]: [(0, import_smithy_client.expectNonNull)(input.TagKeys, `TagKeys`) != null, () => input[_TK] || []]
663
- });
664
- let body;
665
- b.m("DELETE").h(headers).q(query).b(body);
666
- return b.build();
667
- }, "se_UntagResourceCommand");
668
- var de_CreateSnapshotCommand = /* @__PURE__ */ __name(async (output, context) => {
669
- if (output.statusCode !== 200 && output.statusCode >= 300) {
670
- return de_CommandError(output, context);
671
- }
672
- const contents = (0, import_smithy_client.map)({
673
- $metadata: deserializeMetadata(output)
674
- });
675
- await (0, import_smithy_client.collectBody)(output.body, context);
676
- return contents;
677
- }, "de_CreateSnapshotCommand");
678
- var de_DeleteAppCommand = /* @__PURE__ */ __name(async (output, context) => {
679
- if (output.statusCode !== 200 && output.statusCode >= 300) {
680
- return de_CommandError(output, context);
681
- }
682
- const contents = (0, import_smithy_client.map)({
683
- $metadata: deserializeMetadata(output)
684
- });
685
- await (0, import_smithy_client.collectBody)(output.body, context);
686
- return contents;
687
- }, "de_DeleteAppCommand");
688
- var de_DeleteSimulationCommand = /* @__PURE__ */ __name(async (output, context) => {
689
- if (output.statusCode !== 200 && output.statusCode >= 300) {
690
- return de_CommandError(output, context);
691
- }
692
- const contents = (0, import_smithy_client.map)({
693
- $metadata: deserializeMetadata(output)
694
- });
695
- await (0, import_smithy_client.collectBody)(output.body, context);
696
- return contents;
697
- }, "de_DeleteSimulationCommand");
698
- var de_DescribeAppCommand = /* @__PURE__ */ __name(async (output, context) => {
699
- if (output.statusCode !== 200 && output.statusCode >= 300) {
700
- return de_CommandError(output, context);
701
- }
702
- const contents = (0, import_smithy_client.map)({
703
- $metadata: deserializeMetadata(output)
704
- });
705
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
706
- const doc = (0, import_smithy_client.take)(data, {
707
- Description: import_smithy_client.expectString,
708
- Domain: import_smithy_client.expectString,
709
- EndpointInfo: import_smithy_client._json,
710
- LaunchOverrides: import_smithy_client._json,
711
- Name: import_smithy_client.expectString,
712
- Simulation: import_smithy_client.expectString,
713
- Status: import_smithy_client.expectString,
714
- TargetStatus: import_smithy_client.expectString
715
- });
716
- Object.assign(contents, doc);
717
- return contents;
718
- }, "de_DescribeAppCommand");
719
- var de_DescribeSimulationCommand = /* @__PURE__ */ __name(async (output, context) => {
720
- if (output.statusCode !== 200 && output.statusCode >= 300) {
721
- return de_CommandError(output, context);
722
- }
723
- const contents = (0, import_smithy_client.map)({
724
- $metadata: deserializeMetadata(output)
725
- });
726
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
727
- const doc = (0, import_smithy_client.take)(data, {
728
- Arn: import_smithy_client.expectString,
729
- CreationTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "CreationTime"),
730
- Description: import_smithy_client.expectString,
731
- ExecutionId: import_smithy_client.expectString,
732
- LiveSimulationState: import_smithy_client._json,
733
- LoggingConfiguration: import_smithy_client._json,
734
- MaximumDuration: import_smithy_client.expectString,
735
- Name: import_smithy_client.expectString,
736
- RoleArn: import_smithy_client.expectString,
737
- SchemaError: import_smithy_client.expectString,
738
- SchemaS3Location: import_smithy_client._json,
739
- SnapshotS3Location: import_smithy_client._json,
740
- StartError: import_smithy_client.expectString,
741
- Status: import_smithy_client.expectString,
742
- TargetStatus: import_smithy_client.expectString
743
- });
744
- Object.assign(contents, doc);
745
- return contents;
746
- }, "de_DescribeSimulationCommand");
747
- var de_ListAppsCommand = /* @__PURE__ */ __name(async (output, context) => {
748
- if (output.statusCode !== 200 && output.statusCode >= 300) {
749
- return de_CommandError(output, context);
750
- }
751
- const contents = (0, import_smithy_client.map)({
752
- $metadata: deserializeMetadata(output)
753
- });
754
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
755
- const doc = (0, import_smithy_client.take)(data, {
756
- Apps: import_smithy_client._json,
757
- NextToken: import_smithy_client.expectString
758
- });
759
- Object.assign(contents, doc);
760
- return contents;
761
- }, "de_ListAppsCommand");
762
- var de_ListSimulationsCommand = /* @__PURE__ */ __name(async (output, context) => {
763
- if (output.statusCode !== 200 && output.statusCode >= 300) {
764
- return de_CommandError(output, context);
765
- }
766
- const contents = (0, import_smithy_client.map)({
767
- $metadata: deserializeMetadata(output)
768
- });
769
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
770
- const doc = (0, import_smithy_client.take)(data, {
771
- NextToken: import_smithy_client.expectString,
772
- Simulations: /* @__PURE__ */ __name((_) => de_SimulationList(_, context), "Simulations")
773
- });
774
- Object.assign(contents, doc);
775
- return contents;
776
- }, "de_ListSimulationsCommand");
777
- var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
778
- if (output.statusCode !== 200 && output.statusCode >= 300) {
779
- return de_CommandError(output, context);
780
- }
781
- const contents = (0, import_smithy_client.map)({
782
- $metadata: deserializeMetadata(output)
783
- });
784
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
785
- const doc = (0, import_smithy_client.take)(data, {
786
- Tags: import_smithy_client._json
787
- });
788
- Object.assign(contents, doc);
789
- return contents;
790
- }, "de_ListTagsForResourceCommand");
791
- var de_StartAppCommand = /* @__PURE__ */ __name(async (output, context) => {
792
- if (output.statusCode !== 200 && output.statusCode >= 300) {
793
- return de_CommandError(output, context);
794
- }
795
- const contents = (0, import_smithy_client.map)({
796
- $metadata: deserializeMetadata(output)
797
- });
798
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
799
- const doc = (0, import_smithy_client.take)(data, {
800
- Domain: import_smithy_client.expectString,
801
- Name: import_smithy_client.expectString,
802
- Simulation: import_smithy_client.expectString
803
- });
804
- Object.assign(contents, doc);
805
- return contents;
806
- }, "de_StartAppCommand");
807
- var de_StartClockCommand = /* @__PURE__ */ __name(async (output, context) => {
808
- if (output.statusCode !== 200 && output.statusCode >= 300) {
809
- return de_CommandError(output, context);
810
- }
811
- const contents = (0, import_smithy_client.map)({
812
- $metadata: deserializeMetadata(output)
813
- });
814
- await (0, import_smithy_client.collectBody)(output.body, context);
815
- return contents;
816
- }, "de_StartClockCommand");
817
- var de_StartSimulationCommand = /* @__PURE__ */ __name(async (output, context) => {
818
- if (output.statusCode !== 200 && output.statusCode >= 300) {
819
- return de_CommandError(output, context);
820
- }
821
- const contents = (0, import_smithy_client.map)({
822
- $metadata: deserializeMetadata(output)
823
- });
824
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
825
- const doc = (0, import_smithy_client.take)(data, {
826
- Arn: import_smithy_client.expectString,
827
- CreationTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "CreationTime"),
828
- ExecutionId: import_smithy_client.expectString
829
- });
830
- Object.assign(contents, doc);
831
- return contents;
832
- }, "de_StartSimulationCommand");
833
- var de_StopAppCommand = /* @__PURE__ */ __name(async (output, context) => {
834
- if (output.statusCode !== 200 && output.statusCode >= 300) {
835
- return de_CommandError(output, context);
836
- }
837
- const contents = (0, import_smithy_client.map)({
838
- $metadata: deserializeMetadata(output)
839
- });
840
- await (0, import_smithy_client.collectBody)(output.body, context);
841
- return contents;
842
- }, "de_StopAppCommand");
843
- var de_StopClockCommand = /* @__PURE__ */ __name(async (output, context) => {
844
- if (output.statusCode !== 200 && output.statusCode >= 300) {
845
- return de_CommandError(output, context);
846
- }
847
- const contents = (0, import_smithy_client.map)({
848
- $metadata: deserializeMetadata(output)
849
- });
850
- await (0, import_smithy_client.collectBody)(output.body, context);
851
- return contents;
852
- }, "de_StopClockCommand");
853
- var de_StopSimulationCommand = /* @__PURE__ */ __name(async (output, context) => {
854
- if (output.statusCode !== 200 && output.statusCode >= 300) {
855
- return de_CommandError(output, context);
856
- }
857
- const contents = (0, import_smithy_client.map)({
858
- $metadata: deserializeMetadata(output)
859
- });
860
- await (0, import_smithy_client.collectBody)(output.body, context);
861
- return contents;
862
- }, "de_StopSimulationCommand");
863
- var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
864
- if (output.statusCode !== 200 && output.statusCode >= 300) {
865
- return de_CommandError(output, context);
866
- }
867
- const contents = (0, import_smithy_client.map)({
868
- $metadata: deserializeMetadata(output)
869
- });
870
- await (0, import_smithy_client.collectBody)(output.body, context);
871
- return contents;
872
- }, "de_TagResourceCommand");
873
- var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
874
- if (output.statusCode !== 200 && output.statusCode >= 300) {
875
- return de_CommandError(output, context);
876
- }
877
- const contents = (0, import_smithy_client.map)({
878
- $metadata: deserializeMetadata(output)
879
- });
880
- await (0, import_smithy_client.collectBody)(output.body, context);
881
- return contents;
882
- }, "de_UntagResourceCommand");
883
- var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
884
- const parsedOutput = {
885
- ...output,
886
- body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
887
- };
888
- const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
889
- switch (errorCode) {
890
- case "AccessDeniedException":
891
- case "com.amazonaws.simspaceweaver#AccessDeniedException":
892
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
893
- case "ConflictException":
894
- case "com.amazonaws.simspaceweaver#ConflictException":
895
- throw await de_ConflictExceptionRes(parsedOutput, context);
896
- case "InternalServerException":
897
- case "com.amazonaws.simspaceweaver#InternalServerException":
898
- throw await de_InternalServerExceptionRes(parsedOutput, context);
899
- case "ResourceNotFoundException":
900
- case "com.amazonaws.simspaceweaver#ResourceNotFoundException":
901
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
902
- case "ValidationException":
903
- case "com.amazonaws.simspaceweaver#ValidationException":
904
- throw await de_ValidationExceptionRes(parsedOutput, context);
905
- case "ServiceQuotaExceededException":
906
- case "com.amazonaws.simspaceweaver#ServiceQuotaExceededException":
907
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
908
- case "TooManyTagsException":
909
- case "com.amazonaws.simspaceweaver#TooManyTagsException":
910
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
911
- default:
912
- const parsedBody = parsedOutput.body;
913
- return throwDefaultError({
914
- output,
915
- parsedBody,
916
- errorCode
917
- });
918
- }
919
- }, "de_CommandError");
920
- var throwDefaultError = (0, import_smithy_client.withBaseException)(SimSpaceWeaverServiceException);
921
- var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
922
- const contents = (0, import_smithy_client.map)({});
923
- const data = parsedOutput.body;
924
- const doc = (0, import_smithy_client.take)(data, {
925
- Message: import_smithy_client.expectString
926
- });
927
- Object.assign(contents, doc);
928
- const exception = new AccessDeniedException({
929
- $metadata: deserializeMetadata(parsedOutput),
930
- ...contents
931
- });
932
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
933
- }, "de_AccessDeniedExceptionRes");
934
- var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
935
- const contents = (0, import_smithy_client.map)({});
936
- const data = parsedOutput.body;
937
- const doc = (0, import_smithy_client.take)(data, {
938
- Message: import_smithy_client.expectString
939
- });
940
- Object.assign(contents, doc);
941
- const exception = new ConflictException({
942
- $metadata: deserializeMetadata(parsedOutput),
943
- ...contents
944
- });
945
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
946
- }, "de_ConflictExceptionRes");
947
- var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
948
- const contents = (0, import_smithy_client.map)({});
949
- const data = parsedOutput.body;
950
- const doc = (0, import_smithy_client.take)(data, {
951
- Message: import_smithy_client.expectString
952
- });
953
- Object.assign(contents, doc);
954
- const exception = new InternalServerException({
955
- $metadata: deserializeMetadata(parsedOutput),
956
- ...contents
957
- });
958
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
959
- }, "de_InternalServerExceptionRes");
960
- var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
961
- const contents = (0, import_smithy_client.map)({});
962
- const data = parsedOutput.body;
963
- const doc = (0, import_smithy_client.take)(data, {
964
- Message: import_smithy_client.expectString
965
- });
966
- Object.assign(contents, doc);
967
- const exception = new ResourceNotFoundException({
968
- $metadata: deserializeMetadata(parsedOutput),
969
- ...contents
970
- });
971
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
972
- }, "de_ResourceNotFoundExceptionRes");
973
- var de_ServiceQuotaExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
974
- const contents = (0, import_smithy_client.map)({});
975
- const data = parsedOutput.body;
976
- const doc = (0, import_smithy_client.take)(data, {
977
- Message: import_smithy_client.expectString
978
- });
979
- Object.assign(contents, doc);
980
- const exception = new ServiceQuotaExceededException({
981
- $metadata: deserializeMetadata(parsedOutput),
982
- ...contents
983
- });
984
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
985
- }, "de_ServiceQuotaExceededExceptionRes");
986
- var de_TooManyTagsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
987
- const contents = (0, import_smithy_client.map)({});
988
- const data = parsedOutput.body;
989
- const doc = (0, import_smithy_client.take)(data, {
990
- Message: import_smithy_client.expectString
991
- });
992
- Object.assign(contents, doc);
993
- const exception = new TooManyTagsException({
994
- $metadata: deserializeMetadata(parsedOutput),
995
- ...contents
996
- });
997
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
998
- }, "de_TooManyTagsExceptionRes");
999
- var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1000
- const contents = (0, import_smithy_client.map)({});
1001
- const data = parsedOutput.body;
1002
- const doc = (0, import_smithy_client.take)(data, {
1003
- Message: import_smithy_client.expectString
1004
- });
1005
- Object.assign(contents, doc);
1006
- const exception = new ValidationException({
1007
- $metadata: deserializeMetadata(parsedOutput),
1008
- ...contents
1009
- });
1010
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1011
- }, "de_ValidationExceptionRes");
1012
- var de_SimulationList = /* @__PURE__ */ __name((output, context) => {
1013
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
1014
- return de_SimulationMetadata(entry, context);
1015
- });
1016
- return retVal;
1017
- }, "de_SimulationList");
1018
- var de_SimulationMetadata = /* @__PURE__ */ __name((output, context) => {
1019
- return (0, import_smithy_client.take)(output, {
1020
- Arn: import_smithy_client.expectString,
1021
- CreationTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "CreationTime"),
1022
- Name: import_smithy_client.expectString,
1023
- Status: import_smithy_client.expectString,
1024
- TargetStatus: import_smithy_client.expectString
1025
- });
1026
- }, "de_SimulationMetadata");
1027
- var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
1028
- httpStatusCode: output.statusCode,
1029
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1030
- extendedRequestId: output.headers["x-amz-id-2"],
1031
- cfId: output.headers["x-amz-cf-id"]
1032
- }), "deserializeMetadata");
1033
- var _A = "App";
1034
- var _D = "Domain";
1035
- var _MR = "MaxResults";
1036
- var _NT = "NextToken";
1037
- var _S = "Simulation";
1038
- var _TK = "TagKeys";
1039
- var _a = "app";
1040
- var _d = "domain";
1041
- var _mR = "maxResults";
1042
- var _nT = "nextToken";
1043
- var _s = "simulation";
1044
- var _tK = "tagKeys";
1045
-
1046
- // src/commands/CreateSnapshotCommand.ts
1047
- var CreateSnapshotCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1048
- return [
1049
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1050
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1051
- ];
1052
- }).s("SimSpaceWeaver", "CreateSnapshot", {}).n("SimSpaceWeaverClient", "CreateSnapshotCommand").f(void 0, void 0).ser(se_CreateSnapshotCommand).de(de_CreateSnapshotCommand).build() {
1053
- static {
1054
- __name(this, "CreateSnapshotCommand");
1055
- }
600
+ const de_ListTagsForResourceCommand = async (output, context) => {
601
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
602
+ return de_CommandError(output, context);
603
+ }
604
+ const contents = smithyClient.map({
605
+ $metadata: deserializeMetadata(output),
606
+ });
607
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
608
+ const doc = smithyClient.take(data, {
609
+ Tags: smithyClient._json,
610
+ });
611
+ Object.assign(contents, doc);
612
+ return contents;
1056
613
  };
1057
-
1058
- // src/commands/DeleteAppCommand.ts
1059
-
1060
-
1061
-
1062
- var DeleteAppCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1063
- return [
1064
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1065
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1066
- ];
1067
- }).s("SimSpaceWeaver", "DeleteApp", {}).n("SimSpaceWeaverClient", "DeleteAppCommand").f(void 0, void 0).ser(se_DeleteAppCommand).de(de_DeleteAppCommand).build() {
1068
- static {
1069
- __name(this, "DeleteAppCommand");
1070
- }
614
+ const de_StartAppCommand = async (output, context) => {
615
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
616
+ return de_CommandError(output, context);
617
+ }
618
+ const contents = smithyClient.map({
619
+ $metadata: deserializeMetadata(output),
620
+ });
621
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
622
+ const doc = smithyClient.take(data, {
623
+ Domain: smithyClient.expectString,
624
+ Name: smithyClient.expectString,
625
+ Simulation: smithyClient.expectString,
626
+ });
627
+ Object.assign(contents, doc);
628
+ return contents;
1071
629
  };
1072
-
1073
- // src/commands/DeleteSimulationCommand.ts
1074
-
1075
-
1076
-
1077
- var DeleteSimulationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1078
- return [
1079
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1080
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1081
- ];
1082
- }).s("SimSpaceWeaver", "DeleteSimulation", {}).n("SimSpaceWeaverClient", "DeleteSimulationCommand").f(void 0, void 0).ser(se_DeleteSimulationCommand).de(de_DeleteSimulationCommand).build() {
1083
- static {
1084
- __name(this, "DeleteSimulationCommand");
1085
- }
630
+ const de_StartClockCommand = async (output, context) => {
631
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
632
+ return de_CommandError(output, context);
633
+ }
634
+ const contents = smithyClient.map({
635
+ $metadata: deserializeMetadata(output),
636
+ });
637
+ await smithyClient.collectBody(output.body, context);
638
+ return contents;
1086
639
  };
1087
-
1088
- // src/commands/DescribeAppCommand.ts
1089
-
1090
-
1091
-
1092
- var DescribeAppCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1093
- return [
1094
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1095
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1096
- ];
1097
- }).s("SimSpaceWeaver", "DescribeApp", {}).n("SimSpaceWeaverClient", "DescribeAppCommand").f(void 0, void 0).ser(se_DescribeAppCommand).de(de_DescribeAppCommand).build() {
1098
- static {
1099
- __name(this, "DescribeAppCommand");
1100
- }
640
+ const de_StartSimulationCommand = async (output, context) => {
641
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
642
+ return de_CommandError(output, context);
643
+ }
644
+ const contents = smithyClient.map({
645
+ $metadata: deserializeMetadata(output),
646
+ });
647
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
648
+ const doc = smithyClient.take(data, {
649
+ Arn: smithyClient.expectString,
650
+ CreationTime: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
651
+ ExecutionId: smithyClient.expectString,
652
+ });
653
+ Object.assign(contents, doc);
654
+ return contents;
1101
655
  };
1102
-
1103
- // src/commands/DescribeSimulationCommand.ts
1104
-
1105
-
1106
-
1107
- var DescribeSimulationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1108
- return [
1109
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1110
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1111
- ];
1112
- }).s("SimSpaceWeaver", "DescribeSimulation", {}).n("SimSpaceWeaverClient", "DescribeSimulationCommand").f(void 0, void 0).ser(se_DescribeSimulationCommand).de(de_DescribeSimulationCommand).build() {
1113
- static {
1114
- __name(this, "DescribeSimulationCommand");
1115
- }
656
+ const de_StopAppCommand = async (output, context) => {
657
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
658
+ return de_CommandError(output, context);
659
+ }
660
+ const contents = smithyClient.map({
661
+ $metadata: deserializeMetadata(output),
662
+ });
663
+ await smithyClient.collectBody(output.body, context);
664
+ return contents;
1116
665
  };
1117
-
1118
- // src/commands/ListAppsCommand.ts
1119
-
1120
-
1121
-
1122
- var ListAppsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1123
- return [
1124
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1125
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1126
- ];
1127
- }).s("SimSpaceWeaver", "ListApps", {}).n("SimSpaceWeaverClient", "ListAppsCommand").f(void 0, void 0).ser(se_ListAppsCommand).de(de_ListAppsCommand).build() {
1128
- static {
1129
- __name(this, "ListAppsCommand");
1130
- }
666
+ const de_StopClockCommand = async (output, context) => {
667
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
668
+ return de_CommandError(output, context);
669
+ }
670
+ const contents = smithyClient.map({
671
+ $metadata: deserializeMetadata(output),
672
+ });
673
+ await smithyClient.collectBody(output.body, context);
674
+ return contents;
1131
675
  };
1132
-
1133
- // src/commands/ListSimulationsCommand.ts
1134
-
1135
-
1136
-
1137
- var ListSimulationsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1138
- return [
1139
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1140
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1141
- ];
1142
- }).s("SimSpaceWeaver", "ListSimulations", {}).n("SimSpaceWeaverClient", "ListSimulationsCommand").f(void 0, void 0).ser(se_ListSimulationsCommand).de(de_ListSimulationsCommand).build() {
1143
- static {
1144
- __name(this, "ListSimulationsCommand");
1145
- }
676
+ const de_StopSimulationCommand = async (output, context) => {
677
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
678
+ return de_CommandError(output, context);
679
+ }
680
+ const contents = smithyClient.map({
681
+ $metadata: deserializeMetadata(output),
682
+ });
683
+ await smithyClient.collectBody(output.body, context);
684
+ return contents;
1146
685
  };
1147
-
1148
- // src/commands/ListTagsForResourceCommand.ts
1149
-
1150
-
1151
-
1152
- var ListTagsForResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1153
- return [
1154
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1155
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1156
- ];
1157
- }).s("SimSpaceWeaver", "ListTagsForResource", {}).n("SimSpaceWeaverClient", "ListTagsForResourceCommand").f(void 0, void 0).ser(se_ListTagsForResourceCommand).de(de_ListTagsForResourceCommand).build() {
1158
- static {
1159
- __name(this, "ListTagsForResourceCommand");
1160
- }
686
+ const de_TagResourceCommand = async (output, context) => {
687
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
688
+ return de_CommandError(output, context);
689
+ }
690
+ const contents = smithyClient.map({
691
+ $metadata: deserializeMetadata(output),
692
+ });
693
+ await smithyClient.collectBody(output.body, context);
694
+ return contents;
1161
695
  };
1162
-
1163
- // src/commands/StartAppCommand.ts
1164
-
1165
-
1166
-
1167
- var StartAppCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1168
- return [
1169
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1170
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1171
- ];
1172
- }).s("SimSpaceWeaver", "StartApp", {}).n("SimSpaceWeaverClient", "StartAppCommand").f(StartAppInputFilterSensitiveLog, void 0).ser(se_StartAppCommand).de(de_StartAppCommand).build() {
1173
- static {
1174
- __name(this, "StartAppCommand");
1175
- }
696
+ const de_UntagResourceCommand = async (output, context) => {
697
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
698
+ return de_CommandError(output, context);
699
+ }
700
+ const contents = smithyClient.map({
701
+ $metadata: deserializeMetadata(output),
702
+ });
703
+ await smithyClient.collectBody(output.body, context);
704
+ return contents;
1176
705
  };
1177
-
1178
- // src/commands/StartClockCommand.ts
1179
-
1180
-
1181
-
1182
- var StartClockCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1183
- return [
1184
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1185
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1186
- ];
1187
- }).s("SimSpaceWeaver", "StartClock", {}).n("SimSpaceWeaverClient", "StartClockCommand").f(void 0, void 0).ser(se_StartClockCommand).de(de_StartClockCommand).build() {
1188
- static {
1189
- __name(this, "StartClockCommand");
1190
- }
706
+ const de_CommandError = async (output, context) => {
707
+ const parsedOutput = {
708
+ ...output,
709
+ body: await core$1.parseJsonErrorBody(output.body, context),
710
+ };
711
+ const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
712
+ switch (errorCode) {
713
+ case "AccessDeniedException":
714
+ case "com.amazonaws.simspaceweaver#AccessDeniedException":
715
+ throw await de_AccessDeniedExceptionRes(parsedOutput);
716
+ case "ConflictException":
717
+ case "com.amazonaws.simspaceweaver#ConflictException":
718
+ throw await de_ConflictExceptionRes(parsedOutput);
719
+ case "InternalServerException":
720
+ case "com.amazonaws.simspaceweaver#InternalServerException":
721
+ throw await de_InternalServerExceptionRes(parsedOutput);
722
+ case "ResourceNotFoundException":
723
+ case "com.amazonaws.simspaceweaver#ResourceNotFoundException":
724
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput);
725
+ case "ValidationException":
726
+ case "com.amazonaws.simspaceweaver#ValidationException":
727
+ throw await de_ValidationExceptionRes(parsedOutput);
728
+ case "ServiceQuotaExceededException":
729
+ case "com.amazonaws.simspaceweaver#ServiceQuotaExceededException":
730
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput);
731
+ case "TooManyTagsException":
732
+ case "com.amazonaws.simspaceweaver#TooManyTagsException":
733
+ throw await de_TooManyTagsExceptionRes(parsedOutput);
734
+ default:
735
+ const parsedBody = parsedOutput.body;
736
+ return throwDefaultError({
737
+ output,
738
+ parsedBody,
739
+ errorCode,
740
+ });
741
+ }
1191
742
  };
1192
-
1193
- // src/commands/StartSimulationCommand.ts
1194
-
1195
-
1196
-
1197
- var StartSimulationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1198
- return [
1199
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1200
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1201
- ];
1202
- }).s("SimSpaceWeaver", "StartSimulation", {}).n("SimSpaceWeaverClient", "StartSimulationCommand").f(StartSimulationInputFilterSensitiveLog, void 0).ser(se_StartSimulationCommand).de(de_StartSimulationCommand).build() {
1203
- static {
1204
- __name(this, "StartSimulationCommand");
1205
- }
743
+ const throwDefaultError = smithyClient.withBaseException(SimSpaceWeaverServiceException);
744
+ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
745
+ const contents = smithyClient.map({});
746
+ const data = parsedOutput.body;
747
+ const doc = smithyClient.take(data, {
748
+ Message: smithyClient.expectString,
749
+ });
750
+ Object.assign(contents, doc);
751
+ const exception = new AccessDeniedException({
752
+ $metadata: deserializeMetadata(parsedOutput),
753
+ ...contents,
754
+ });
755
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
1206
756
  };
1207
-
1208
- // src/commands/StopAppCommand.ts
1209
-
1210
-
1211
-
1212
- var StopAppCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1213
- return [
1214
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1215
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1216
- ];
1217
- }).s("SimSpaceWeaver", "StopApp", {}).n("SimSpaceWeaverClient", "StopAppCommand").f(void 0, void 0).ser(se_StopAppCommand).de(de_StopAppCommand).build() {
1218
- static {
1219
- __name(this, "StopAppCommand");
1220
- }
757
+ const de_ConflictExceptionRes = async (parsedOutput, context) => {
758
+ const contents = smithyClient.map({});
759
+ const data = parsedOutput.body;
760
+ const doc = smithyClient.take(data, {
761
+ Message: smithyClient.expectString,
762
+ });
763
+ Object.assign(contents, doc);
764
+ const exception = new ConflictException({
765
+ $metadata: deserializeMetadata(parsedOutput),
766
+ ...contents,
767
+ });
768
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
1221
769
  };
1222
-
1223
- // src/commands/StopClockCommand.ts
1224
-
1225
-
1226
-
1227
- var StopClockCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1228
- return [
1229
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1230
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1231
- ];
1232
- }).s("SimSpaceWeaver", "StopClock", {}).n("SimSpaceWeaverClient", "StopClockCommand").f(void 0, void 0).ser(se_StopClockCommand).de(de_StopClockCommand).build() {
1233
- static {
1234
- __name(this, "StopClockCommand");
1235
- }
770
+ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
771
+ const contents = smithyClient.map({});
772
+ const data = parsedOutput.body;
773
+ const doc = smithyClient.take(data, {
774
+ Message: smithyClient.expectString,
775
+ });
776
+ Object.assign(contents, doc);
777
+ const exception = new InternalServerException({
778
+ $metadata: deserializeMetadata(parsedOutput),
779
+ ...contents,
780
+ });
781
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
1236
782
  };
1237
-
1238
- // src/commands/StopSimulationCommand.ts
1239
-
1240
-
1241
-
1242
- var StopSimulationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1243
- return [
1244
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1245
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1246
- ];
1247
- }).s("SimSpaceWeaver", "StopSimulation", {}).n("SimSpaceWeaverClient", "StopSimulationCommand").f(void 0, void 0).ser(se_StopSimulationCommand).de(de_StopSimulationCommand).build() {
1248
- static {
1249
- __name(this, "StopSimulationCommand");
1250
- }
783
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
784
+ const contents = smithyClient.map({});
785
+ const data = parsedOutput.body;
786
+ const doc = smithyClient.take(data, {
787
+ Message: smithyClient.expectString,
788
+ });
789
+ Object.assign(contents, doc);
790
+ const exception = new ResourceNotFoundException({
791
+ $metadata: deserializeMetadata(parsedOutput),
792
+ ...contents,
793
+ });
794
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
1251
795
  };
1252
-
1253
- // src/commands/TagResourceCommand.ts
1254
-
1255
-
1256
-
1257
- var TagResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1258
- return [
1259
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1260
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1261
- ];
1262
- }).s("SimSpaceWeaver", "TagResource", {}).n("SimSpaceWeaverClient", "TagResourceCommand").f(void 0, void 0).ser(se_TagResourceCommand).de(de_TagResourceCommand).build() {
1263
- static {
1264
- __name(this, "TagResourceCommand");
1265
- }
796
+ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
797
+ const contents = smithyClient.map({});
798
+ const data = parsedOutput.body;
799
+ const doc = smithyClient.take(data, {
800
+ Message: smithyClient.expectString,
801
+ });
802
+ Object.assign(contents, doc);
803
+ const exception = new ServiceQuotaExceededException({
804
+ $metadata: deserializeMetadata(parsedOutput),
805
+ ...contents,
806
+ });
807
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
1266
808
  };
1267
-
1268
- // src/commands/UntagResourceCommand.ts
1269
-
1270
-
1271
-
1272
- var UntagResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1273
- return [
1274
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1275
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1276
- ];
1277
- }).s("SimSpaceWeaver", "UntagResource", {}).n("SimSpaceWeaverClient", "UntagResourceCommand").f(void 0, void 0).ser(se_UntagResourceCommand).de(de_UntagResourceCommand).build() {
1278
- static {
1279
- __name(this, "UntagResourceCommand");
1280
- }
809
+ const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
810
+ const contents = smithyClient.map({});
811
+ const data = parsedOutput.body;
812
+ const doc = smithyClient.take(data, {
813
+ Message: smithyClient.expectString,
814
+ });
815
+ Object.assign(contents, doc);
816
+ const exception = new TooManyTagsException({
817
+ $metadata: deserializeMetadata(parsedOutput),
818
+ ...contents,
819
+ });
820
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
1281
821
  };
1282
-
1283
- // src/SimSpaceWeaver.ts
1284
- var commands = {
1285
- CreateSnapshotCommand,
1286
- DeleteAppCommand,
1287
- DeleteSimulationCommand,
1288
- DescribeAppCommand,
1289
- DescribeSimulationCommand,
1290
- ListAppsCommand,
1291
- ListSimulationsCommand,
1292
- ListTagsForResourceCommand,
1293
- StartAppCommand,
1294
- StartClockCommand,
1295
- StartSimulationCommand,
1296
- StopAppCommand,
1297
- StopClockCommand,
1298
- StopSimulationCommand,
1299
- TagResourceCommand,
1300
- UntagResourceCommand
822
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
823
+ const contents = smithyClient.map({});
824
+ const data = parsedOutput.body;
825
+ const doc = smithyClient.take(data, {
826
+ Message: smithyClient.expectString,
827
+ });
828
+ Object.assign(contents, doc);
829
+ const exception = new ValidationException({
830
+ $metadata: deserializeMetadata(parsedOutput),
831
+ ...contents,
832
+ });
833
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
1301
834
  };
1302
- var SimSpaceWeaver = class extends SimSpaceWeaverClient {
1303
- static {
1304
- __name(this, "SimSpaceWeaver");
1305
- }
835
+ const de_SimulationList = (output, context) => {
836
+ const retVal = (output || [])
837
+ .filter((e) => e != null)
838
+ .map((entry) => {
839
+ return de_SimulationMetadata(entry);
840
+ });
841
+ return retVal;
1306
842
  };
1307
- (0, import_smithy_client.createAggregatedClient)(commands, SimSpaceWeaver);
1308
-
1309
- // src/pagination/ListAppsPaginator.ts
1310
-
1311
- var paginateListApps = (0, import_core.createPaginator)(SimSpaceWeaverClient, ListAppsCommand, "NextToken", "NextToken", "MaxResults");
843
+ const de_SimulationMetadata = (output, context) => {
844
+ return smithyClient.take(output, {
845
+ Arn: smithyClient.expectString,
846
+ CreationTime: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
847
+ Name: smithyClient.expectString,
848
+ Status: smithyClient.expectString,
849
+ TargetStatus: smithyClient.expectString,
850
+ });
851
+ };
852
+ const deserializeMetadata = (output) => ({
853
+ httpStatusCode: output.statusCode,
854
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
855
+ extendedRequestId: output.headers["x-amz-id-2"],
856
+ cfId: output.headers["x-amz-cf-id"],
857
+ });
858
+ const _A = "App";
859
+ const _D = "Domain";
860
+ const _MR = "MaxResults";
861
+ const _NT = "NextToken";
862
+ const _S = "Simulation";
863
+ const _TK = "TagKeys";
864
+ const _a = "app";
865
+ const _d = "domain";
866
+ const _mR = "maxResults";
867
+ const _nT = "nextToken";
868
+ const _s = "simulation";
869
+ const _tK = "tagKeys";
870
+
871
+ class CreateSnapshotCommand extends smithyClient.Command
872
+ .classBuilder()
873
+ .ep(commonParams)
874
+ .m(function (Command, cs, config, o) {
875
+ return [
876
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
877
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
878
+ ];
879
+ })
880
+ .s("SimSpaceWeaver", "CreateSnapshot", {})
881
+ .n("SimSpaceWeaverClient", "CreateSnapshotCommand")
882
+ .f(void 0, void 0)
883
+ .ser(se_CreateSnapshotCommand)
884
+ .de(de_CreateSnapshotCommand)
885
+ .build() {
886
+ }
887
+
888
+ class DeleteAppCommand extends smithyClient.Command
889
+ .classBuilder()
890
+ .ep(commonParams)
891
+ .m(function (Command, cs, config, o) {
892
+ return [
893
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
894
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
895
+ ];
896
+ })
897
+ .s("SimSpaceWeaver", "DeleteApp", {})
898
+ .n("SimSpaceWeaverClient", "DeleteAppCommand")
899
+ .f(void 0, void 0)
900
+ .ser(se_DeleteAppCommand)
901
+ .de(de_DeleteAppCommand)
902
+ .build() {
903
+ }
904
+
905
+ class DeleteSimulationCommand extends smithyClient.Command
906
+ .classBuilder()
907
+ .ep(commonParams)
908
+ .m(function (Command, cs, config, o) {
909
+ return [
910
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
911
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
912
+ ];
913
+ })
914
+ .s("SimSpaceWeaver", "DeleteSimulation", {})
915
+ .n("SimSpaceWeaverClient", "DeleteSimulationCommand")
916
+ .f(void 0, void 0)
917
+ .ser(se_DeleteSimulationCommand)
918
+ .de(de_DeleteSimulationCommand)
919
+ .build() {
920
+ }
921
+
922
+ class DescribeAppCommand extends smithyClient.Command
923
+ .classBuilder()
924
+ .ep(commonParams)
925
+ .m(function (Command, cs, config, o) {
926
+ return [
927
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
928
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
929
+ ];
930
+ })
931
+ .s("SimSpaceWeaver", "DescribeApp", {})
932
+ .n("SimSpaceWeaverClient", "DescribeAppCommand")
933
+ .f(void 0, void 0)
934
+ .ser(se_DescribeAppCommand)
935
+ .de(de_DescribeAppCommand)
936
+ .build() {
937
+ }
938
+
939
+ class DescribeSimulationCommand extends smithyClient.Command
940
+ .classBuilder()
941
+ .ep(commonParams)
942
+ .m(function (Command, cs, config, o) {
943
+ return [
944
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
945
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
946
+ ];
947
+ })
948
+ .s("SimSpaceWeaver", "DescribeSimulation", {})
949
+ .n("SimSpaceWeaverClient", "DescribeSimulationCommand")
950
+ .f(void 0, void 0)
951
+ .ser(se_DescribeSimulationCommand)
952
+ .de(de_DescribeSimulationCommand)
953
+ .build() {
954
+ }
955
+
956
+ class ListAppsCommand extends smithyClient.Command
957
+ .classBuilder()
958
+ .ep(commonParams)
959
+ .m(function (Command, cs, config, o) {
960
+ return [
961
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
962
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
963
+ ];
964
+ })
965
+ .s("SimSpaceWeaver", "ListApps", {})
966
+ .n("SimSpaceWeaverClient", "ListAppsCommand")
967
+ .f(void 0, void 0)
968
+ .ser(se_ListAppsCommand)
969
+ .de(de_ListAppsCommand)
970
+ .build() {
971
+ }
972
+
973
+ class ListSimulationsCommand extends smithyClient.Command
974
+ .classBuilder()
975
+ .ep(commonParams)
976
+ .m(function (Command, cs, config, o) {
977
+ return [
978
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
979
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
980
+ ];
981
+ })
982
+ .s("SimSpaceWeaver", "ListSimulations", {})
983
+ .n("SimSpaceWeaverClient", "ListSimulationsCommand")
984
+ .f(void 0, void 0)
985
+ .ser(se_ListSimulationsCommand)
986
+ .de(de_ListSimulationsCommand)
987
+ .build() {
988
+ }
989
+
990
+ class ListTagsForResourceCommand extends smithyClient.Command
991
+ .classBuilder()
992
+ .ep(commonParams)
993
+ .m(function (Command, cs, config, o) {
994
+ return [
995
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
996
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
997
+ ];
998
+ })
999
+ .s("SimSpaceWeaver", "ListTagsForResource", {})
1000
+ .n("SimSpaceWeaverClient", "ListTagsForResourceCommand")
1001
+ .f(void 0, void 0)
1002
+ .ser(se_ListTagsForResourceCommand)
1003
+ .de(de_ListTagsForResourceCommand)
1004
+ .build() {
1005
+ }
1006
+
1007
+ class StartAppCommand extends smithyClient.Command
1008
+ .classBuilder()
1009
+ .ep(commonParams)
1010
+ .m(function (Command, cs, config, o) {
1011
+ return [
1012
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1013
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1014
+ ];
1015
+ })
1016
+ .s("SimSpaceWeaver", "StartApp", {})
1017
+ .n("SimSpaceWeaverClient", "StartAppCommand")
1018
+ .f(StartAppInputFilterSensitiveLog, void 0)
1019
+ .ser(se_StartAppCommand)
1020
+ .de(de_StartAppCommand)
1021
+ .build() {
1022
+ }
1023
+
1024
+ class StartClockCommand extends smithyClient.Command
1025
+ .classBuilder()
1026
+ .ep(commonParams)
1027
+ .m(function (Command, cs, config, o) {
1028
+ return [
1029
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1030
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1031
+ ];
1032
+ })
1033
+ .s("SimSpaceWeaver", "StartClock", {})
1034
+ .n("SimSpaceWeaverClient", "StartClockCommand")
1035
+ .f(void 0, void 0)
1036
+ .ser(se_StartClockCommand)
1037
+ .de(de_StartClockCommand)
1038
+ .build() {
1039
+ }
1040
+
1041
+ class StartSimulationCommand extends smithyClient.Command
1042
+ .classBuilder()
1043
+ .ep(commonParams)
1044
+ .m(function (Command, cs, config, o) {
1045
+ return [
1046
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1047
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1048
+ ];
1049
+ })
1050
+ .s("SimSpaceWeaver", "StartSimulation", {})
1051
+ .n("SimSpaceWeaverClient", "StartSimulationCommand")
1052
+ .f(StartSimulationInputFilterSensitiveLog, void 0)
1053
+ .ser(se_StartSimulationCommand)
1054
+ .de(de_StartSimulationCommand)
1055
+ .build() {
1056
+ }
1057
+
1058
+ class StopAppCommand extends smithyClient.Command
1059
+ .classBuilder()
1060
+ .ep(commonParams)
1061
+ .m(function (Command, cs, config, o) {
1062
+ return [
1063
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1064
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1065
+ ];
1066
+ })
1067
+ .s("SimSpaceWeaver", "StopApp", {})
1068
+ .n("SimSpaceWeaverClient", "StopAppCommand")
1069
+ .f(void 0, void 0)
1070
+ .ser(se_StopAppCommand)
1071
+ .de(de_StopAppCommand)
1072
+ .build() {
1073
+ }
1074
+
1075
+ class StopClockCommand extends smithyClient.Command
1076
+ .classBuilder()
1077
+ .ep(commonParams)
1078
+ .m(function (Command, cs, config, o) {
1079
+ return [
1080
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1081
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1082
+ ];
1083
+ })
1084
+ .s("SimSpaceWeaver", "StopClock", {})
1085
+ .n("SimSpaceWeaverClient", "StopClockCommand")
1086
+ .f(void 0, void 0)
1087
+ .ser(se_StopClockCommand)
1088
+ .de(de_StopClockCommand)
1089
+ .build() {
1090
+ }
1091
+
1092
+ class StopSimulationCommand extends smithyClient.Command
1093
+ .classBuilder()
1094
+ .ep(commonParams)
1095
+ .m(function (Command, cs, config, o) {
1096
+ return [
1097
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1098
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1099
+ ];
1100
+ })
1101
+ .s("SimSpaceWeaver", "StopSimulation", {})
1102
+ .n("SimSpaceWeaverClient", "StopSimulationCommand")
1103
+ .f(void 0, void 0)
1104
+ .ser(se_StopSimulationCommand)
1105
+ .de(de_StopSimulationCommand)
1106
+ .build() {
1107
+ }
1108
+
1109
+ class TagResourceCommand extends smithyClient.Command
1110
+ .classBuilder()
1111
+ .ep(commonParams)
1112
+ .m(function (Command, cs, config, o) {
1113
+ return [
1114
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1115
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1116
+ ];
1117
+ })
1118
+ .s("SimSpaceWeaver", "TagResource", {})
1119
+ .n("SimSpaceWeaverClient", "TagResourceCommand")
1120
+ .f(void 0, void 0)
1121
+ .ser(se_TagResourceCommand)
1122
+ .de(de_TagResourceCommand)
1123
+ .build() {
1124
+ }
1125
+
1126
+ class UntagResourceCommand extends smithyClient.Command
1127
+ .classBuilder()
1128
+ .ep(commonParams)
1129
+ .m(function (Command, cs, config, o) {
1130
+ return [
1131
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1132
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1133
+ ];
1134
+ })
1135
+ .s("SimSpaceWeaver", "UntagResource", {})
1136
+ .n("SimSpaceWeaverClient", "UntagResourceCommand")
1137
+ .f(void 0, void 0)
1138
+ .ser(se_UntagResourceCommand)
1139
+ .de(de_UntagResourceCommand)
1140
+ .build() {
1141
+ }
1142
+
1143
+ const commands = {
1144
+ CreateSnapshotCommand,
1145
+ DeleteAppCommand,
1146
+ DeleteSimulationCommand,
1147
+ DescribeAppCommand,
1148
+ DescribeSimulationCommand,
1149
+ ListAppsCommand,
1150
+ ListSimulationsCommand,
1151
+ ListTagsForResourceCommand,
1152
+ StartAppCommand,
1153
+ StartClockCommand,
1154
+ StartSimulationCommand,
1155
+ StopAppCommand,
1156
+ StopClockCommand,
1157
+ StopSimulationCommand,
1158
+ TagResourceCommand,
1159
+ UntagResourceCommand,
1160
+ };
1161
+ class SimSpaceWeaver extends SimSpaceWeaverClient {
1162
+ }
1163
+ smithyClient.createAggregatedClient(commands, SimSpaceWeaver);
1312
1164
 
1313
- // src/pagination/ListSimulationsPaginator.ts
1165
+ const paginateListApps = core.createPaginator(SimSpaceWeaverClient, ListAppsCommand, "NextToken", "NextToken", "MaxResults");
1314
1166
 
1315
- var paginateListSimulations = (0, import_core.createPaginator)(SimSpaceWeaverClient, ListSimulationsCommand, "NextToken", "NextToken", "MaxResults");
1316
- // Annotate the CommonJS export names for ESM import in node:
1167
+ const paginateListSimulations = core.createPaginator(SimSpaceWeaverClient, ListSimulationsCommand, "NextToken", "NextToken", "MaxResults");
1317
1168
 
1318
- 0 && (module.exports = {
1319
- SimSpaceWeaverServiceException,
1320
- __Client,
1321
- SimSpaceWeaverClient,
1322
- SimSpaceWeaver,
1323
- $Command,
1324
- CreateSnapshotCommand,
1325
- DeleteAppCommand,
1326
- DeleteSimulationCommand,
1327
- DescribeAppCommand,
1328
- DescribeSimulationCommand,
1329
- ListAppsCommand,
1330
- ListSimulationsCommand,
1331
- ListTagsForResourceCommand,
1332
- StartAppCommand,
1333
- StartClockCommand,
1334
- StartSimulationCommand,
1335
- StopAppCommand,
1336
- StopClockCommand,
1337
- StopSimulationCommand,
1338
- TagResourceCommand,
1339
- UntagResourceCommand,
1340
- paginateListApps,
1341
- paginateListSimulations,
1342
- AccessDeniedException,
1343
- ClockStatus,
1344
- ClockTargetStatus,
1345
- ConflictException,
1346
- InternalServerException,
1347
- ResourceNotFoundException,
1348
- ValidationException,
1349
- SimulationAppStatus,
1350
- SimulationAppTargetStatus,
1351
- LifecycleManagementStrategy,
1352
- SimulationStatus,
1353
- SimulationTargetStatus,
1354
- ServiceQuotaExceededException,
1355
- TooManyTagsException,
1356
- StartAppInputFilterSensitiveLog,
1357
- StartSimulationInputFilterSensitiveLog
1169
+ Object.defineProperty(exports, "$Command", {
1170
+ enumerable: true,
1171
+ get: function () { return smithyClient.Command; }
1358
1172
  });
1359
-
1173
+ Object.defineProperty(exports, "__Client", {
1174
+ enumerable: true,
1175
+ get: function () { return smithyClient.Client; }
1176
+ });
1177
+ exports.AccessDeniedException = AccessDeniedException;
1178
+ exports.ClockStatus = ClockStatus;
1179
+ exports.ClockTargetStatus = ClockTargetStatus;
1180
+ exports.ConflictException = ConflictException;
1181
+ exports.CreateSnapshotCommand = CreateSnapshotCommand;
1182
+ exports.DeleteAppCommand = DeleteAppCommand;
1183
+ exports.DeleteSimulationCommand = DeleteSimulationCommand;
1184
+ exports.DescribeAppCommand = DescribeAppCommand;
1185
+ exports.DescribeSimulationCommand = DescribeSimulationCommand;
1186
+ exports.InternalServerException = InternalServerException;
1187
+ exports.LifecycleManagementStrategy = LifecycleManagementStrategy;
1188
+ exports.ListAppsCommand = ListAppsCommand;
1189
+ exports.ListSimulationsCommand = ListSimulationsCommand;
1190
+ exports.ListTagsForResourceCommand = ListTagsForResourceCommand;
1191
+ exports.ResourceNotFoundException = ResourceNotFoundException;
1192
+ exports.ServiceQuotaExceededException = ServiceQuotaExceededException;
1193
+ exports.SimSpaceWeaver = SimSpaceWeaver;
1194
+ exports.SimSpaceWeaverClient = SimSpaceWeaverClient;
1195
+ exports.SimSpaceWeaverServiceException = SimSpaceWeaverServiceException;
1196
+ exports.SimulationAppStatus = SimulationAppStatus;
1197
+ exports.SimulationAppTargetStatus = SimulationAppTargetStatus;
1198
+ exports.SimulationStatus = SimulationStatus;
1199
+ exports.SimulationTargetStatus = SimulationTargetStatus;
1200
+ exports.StartAppCommand = StartAppCommand;
1201
+ exports.StartAppInputFilterSensitiveLog = StartAppInputFilterSensitiveLog;
1202
+ exports.StartClockCommand = StartClockCommand;
1203
+ exports.StartSimulationCommand = StartSimulationCommand;
1204
+ exports.StartSimulationInputFilterSensitiveLog = StartSimulationInputFilterSensitiveLog;
1205
+ exports.StopAppCommand = StopAppCommand;
1206
+ exports.StopClockCommand = StopClockCommand;
1207
+ exports.StopSimulationCommand = StopSimulationCommand;
1208
+ exports.TagResourceCommand = TagResourceCommand;
1209
+ exports.TooManyTagsException = TooManyTagsException;
1210
+ exports.UntagResourceCommand = UntagResourceCommand;
1211
+ exports.ValidationException = ValidationException;
1212
+ exports.paginateListApps = paginateListApps;
1213
+ exports.paginateListSimulations = paginateListSimulations;