@aws-sdk/client-simspaceweaver 3.490.0 → 3.495.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.
- package/dist-cjs/SimSpaceWeaver.js +1 -43
- package/dist-cjs/SimSpaceWeaverClient.js +1 -43
- package/dist-cjs/commands/CreateSnapshotCommand.js +1 -28
- package/dist-cjs/commands/DeleteAppCommand.js +1 -28
- package/dist-cjs/commands/DeleteSimulationCommand.js +1 -28
- package/dist-cjs/commands/DescribeAppCommand.js +1 -28
- package/dist-cjs/commands/DescribeSimulationCommand.js +1 -28
- package/dist-cjs/commands/ListAppsCommand.js +1 -28
- package/dist-cjs/commands/ListSimulationsCommand.js +1 -28
- package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
- package/dist-cjs/commands/StartAppCommand.js +1 -29
- package/dist-cjs/commands/StartClockCommand.js +1 -28
- package/dist-cjs/commands/StartSimulationCommand.js +1 -29
- package/dist-cjs/commands/StopAppCommand.js +1 -28
- package/dist-cjs/commands/StopClockCommand.js +1 -28
- package/dist-cjs/commands/StopSimulationCommand.js +1 -28
- package/dist-cjs/commands/TagResourceCommand.js +1 -28
- package/dist-cjs/commands/UntagResourceCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -19
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +1781 -11
- package/dist-cjs/models/SimSpaceWeaverServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -161
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListAppsPaginator.js +1 -7
- package/dist-cjs/pagination/ListSimulationsPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -6
- package/dist-cjs/protocols/Aws_restJson1.js +1 -1103
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,1103 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopSimulationCommand = exports.de_StopClockCommand = exports.de_StopAppCommand = exports.de_StartSimulationCommand = exports.de_StartClockCommand = exports.de_StartAppCommand = exports.de_ListTagsForResourceCommand = exports.de_ListSimulationsCommand = exports.de_ListAppsCommand = exports.de_DescribeSimulationCommand = exports.de_DescribeAppCommand = exports.de_DeleteSimulationCommand = exports.de_DeleteAppCommand = exports.de_CreateSnapshotCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopSimulationCommand = exports.se_StopClockCommand = exports.se_StopAppCommand = exports.se_StartSimulationCommand = exports.se_StartClockCommand = exports.se_StartAppCommand = exports.se_ListTagsForResourceCommand = exports.se_ListSimulationsCommand = exports.se_ListAppsCommand = exports.se_DescribeSimulationCommand = exports.se_DescribeAppCommand = exports.se_DeleteSimulationCommand = exports.se_DeleteAppCommand = exports.se_CreateSnapshotCommand = void 0;
|
|
4
|
-
const core_1 = require("@smithy/core");
|
|
5
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
-
const uuid_1 = require("uuid");
|
|
7
|
-
const models_0_1 = require("../models/models_0");
|
|
8
|
-
const SimSpaceWeaverServiceException_1 = require("../models/SimSpaceWeaverServiceException");
|
|
9
|
-
const se_CreateSnapshotCommand = async (input, context) => {
|
|
10
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
11
|
-
const headers = {
|
|
12
|
-
"content-type": "application/json",
|
|
13
|
-
};
|
|
14
|
-
b.bp("/createsnapshot");
|
|
15
|
-
let body;
|
|
16
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
17
|
-
Destination: (_) => (0, smithy_client_1._json)(_),
|
|
18
|
-
Simulation: [],
|
|
19
|
-
}));
|
|
20
|
-
b.m("POST").h(headers).b(body);
|
|
21
|
-
return b.build();
|
|
22
|
-
};
|
|
23
|
-
exports.se_CreateSnapshotCommand = se_CreateSnapshotCommand;
|
|
24
|
-
const se_DeleteAppCommand = async (input, context) => {
|
|
25
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
26
|
-
const headers = {};
|
|
27
|
-
b.bp("/deleteapp");
|
|
28
|
-
const query = (0, smithy_client_1.map)({
|
|
29
|
-
[_s]: [, (0, smithy_client_1.expectNonNull)(input[_S], `Simulation`)],
|
|
30
|
-
[_d]: [, (0, smithy_client_1.expectNonNull)(input[_D], `Domain`)],
|
|
31
|
-
[_a]: [, (0, smithy_client_1.expectNonNull)(input[_A], `App`)],
|
|
32
|
-
});
|
|
33
|
-
let body;
|
|
34
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
35
|
-
return b.build();
|
|
36
|
-
};
|
|
37
|
-
exports.se_DeleteAppCommand = se_DeleteAppCommand;
|
|
38
|
-
const se_DeleteSimulationCommand = async (input, context) => {
|
|
39
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
40
|
-
const headers = {};
|
|
41
|
-
b.bp("/deletesimulation");
|
|
42
|
-
const query = (0, smithy_client_1.map)({
|
|
43
|
-
[_s]: [, (0, smithy_client_1.expectNonNull)(input[_S], `Simulation`)],
|
|
44
|
-
});
|
|
45
|
-
let body;
|
|
46
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
47
|
-
return b.build();
|
|
48
|
-
};
|
|
49
|
-
exports.se_DeleteSimulationCommand = se_DeleteSimulationCommand;
|
|
50
|
-
const se_DescribeAppCommand = async (input, context) => {
|
|
51
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
52
|
-
const headers = {};
|
|
53
|
-
b.bp("/describeapp");
|
|
54
|
-
const query = (0, smithy_client_1.map)({
|
|
55
|
-
[_s]: [, (0, smithy_client_1.expectNonNull)(input[_S], `Simulation`)],
|
|
56
|
-
[_d]: [, (0, smithy_client_1.expectNonNull)(input[_D], `Domain`)],
|
|
57
|
-
[_a]: [, (0, smithy_client_1.expectNonNull)(input[_A], `App`)],
|
|
58
|
-
});
|
|
59
|
-
let body;
|
|
60
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
61
|
-
return b.build();
|
|
62
|
-
};
|
|
63
|
-
exports.se_DescribeAppCommand = se_DescribeAppCommand;
|
|
64
|
-
const se_DescribeSimulationCommand = async (input, context) => {
|
|
65
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
66
|
-
const headers = {};
|
|
67
|
-
b.bp("/describesimulation");
|
|
68
|
-
const query = (0, smithy_client_1.map)({
|
|
69
|
-
[_s]: [, (0, smithy_client_1.expectNonNull)(input[_S], `Simulation`)],
|
|
70
|
-
});
|
|
71
|
-
let body;
|
|
72
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
73
|
-
return b.build();
|
|
74
|
-
};
|
|
75
|
-
exports.se_DescribeSimulationCommand = se_DescribeSimulationCommand;
|
|
76
|
-
const se_ListAppsCommand = async (input, context) => {
|
|
77
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
78
|
-
const headers = {};
|
|
79
|
-
b.bp("/listapps");
|
|
80
|
-
const query = (0, smithy_client_1.map)({
|
|
81
|
-
[_s]: [, (0, smithy_client_1.expectNonNull)(input[_S], `Simulation`)],
|
|
82
|
-
[_d]: [, input[_D]],
|
|
83
|
-
[_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
84
|
-
[_nT]: [, input[_NT]],
|
|
85
|
-
});
|
|
86
|
-
let body;
|
|
87
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
88
|
-
return b.build();
|
|
89
|
-
};
|
|
90
|
-
exports.se_ListAppsCommand = se_ListAppsCommand;
|
|
91
|
-
const se_ListSimulationsCommand = async (input, context) => {
|
|
92
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
93
|
-
const headers = {};
|
|
94
|
-
b.bp("/listsimulations");
|
|
95
|
-
const query = (0, smithy_client_1.map)({
|
|
96
|
-
[_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
97
|
-
[_nT]: [, input[_NT]],
|
|
98
|
-
});
|
|
99
|
-
let body;
|
|
100
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
101
|
-
return b.build();
|
|
102
|
-
};
|
|
103
|
-
exports.se_ListSimulationsCommand = se_ListSimulationsCommand;
|
|
104
|
-
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
105
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
106
|
-
const headers = {};
|
|
107
|
-
b.bp("/tags/{ResourceArn}");
|
|
108
|
-
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
109
|
-
let body;
|
|
110
|
-
b.m("GET").h(headers).b(body);
|
|
111
|
-
return b.build();
|
|
112
|
-
};
|
|
113
|
-
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
114
|
-
const se_StartAppCommand = async (input, context) => {
|
|
115
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
116
|
-
const headers = {
|
|
117
|
-
"content-type": "application/json",
|
|
118
|
-
};
|
|
119
|
-
b.bp("/startapp");
|
|
120
|
-
let body;
|
|
121
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
122
|
-
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
123
|
-
Description: [],
|
|
124
|
-
Domain: [],
|
|
125
|
-
LaunchOverrides: (_) => (0, smithy_client_1._json)(_),
|
|
126
|
-
Name: [],
|
|
127
|
-
Simulation: [],
|
|
128
|
-
}));
|
|
129
|
-
b.m("POST").h(headers).b(body);
|
|
130
|
-
return b.build();
|
|
131
|
-
};
|
|
132
|
-
exports.se_StartAppCommand = se_StartAppCommand;
|
|
133
|
-
const se_StartClockCommand = async (input, context) => {
|
|
134
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
135
|
-
const headers = {
|
|
136
|
-
"content-type": "application/json",
|
|
137
|
-
};
|
|
138
|
-
b.bp("/startclock");
|
|
139
|
-
let body;
|
|
140
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
141
|
-
Simulation: [],
|
|
142
|
-
}));
|
|
143
|
-
b.m("POST").h(headers).b(body);
|
|
144
|
-
return b.build();
|
|
145
|
-
};
|
|
146
|
-
exports.se_StartClockCommand = se_StartClockCommand;
|
|
147
|
-
const se_StartSimulationCommand = async (input, context) => {
|
|
148
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
149
|
-
const headers = {
|
|
150
|
-
"content-type": "application/json",
|
|
151
|
-
};
|
|
152
|
-
b.bp("/startsimulation");
|
|
153
|
-
let body;
|
|
154
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
155
|
-
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
156
|
-
Description: [],
|
|
157
|
-
MaximumDuration: [],
|
|
158
|
-
Name: [],
|
|
159
|
-
RoleArn: [],
|
|
160
|
-
SchemaS3Location: (_) => (0, smithy_client_1._json)(_),
|
|
161
|
-
SnapshotS3Location: (_) => (0, smithy_client_1._json)(_),
|
|
162
|
-
Tags: (_) => (0, smithy_client_1._json)(_),
|
|
163
|
-
}));
|
|
164
|
-
b.m("POST").h(headers).b(body);
|
|
165
|
-
return b.build();
|
|
166
|
-
};
|
|
167
|
-
exports.se_StartSimulationCommand = se_StartSimulationCommand;
|
|
168
|
-
const se_StopAppCommand = async (input, context) => {
|
|
169
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
170
|
-
const headers = {
|
|
171
|
-
"content-type": "application/json",
|
|
172
|
-
};
|
|
173
|
-
b.bp("/stopapp");
|
|
174
|
-
let body;
|
|
175
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
176
|
-
App: [],
|
|
177
|
-
Domain: [],
|
|
178
|
-
Simulation: [],
|
|
179
|
-
}));
|
|
180
|
-
b.m("POST").h(headers).b(body);
|
|
181
|
-
return b.build();
|
|
182
|
-
};
|
|
183
|
-
exports.se_StopAppCommand = se_StopAppCommand;
|
|
184
|
-
const se_StopClockCommand = async (input, context) => {
|
|
185
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
186
|
-
const headers = {
|
|
187
|
-
"content-type": "application/json",
|
|
188
|
-
};
|
|
189
|
-
b.bp("/stopclock");
|
|
190
|
-
let body;
|
|
191
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
192
|
-
Simulation: [],
|
|
193
|
-
}));
|
|
194
|
-
b.m("POST").h(headers).b(body);
|
|
195
|
-
return b.build();
|
|
196
|
-
};
|
|
197
|
-
exports.se_StopClockCommand = se_StopClockCommand;
|
|
198
|
-
const se_StopSimulationCommand = async (input, context) => {
|
|
199
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
200
|
-
const headers = {
|
|
201
|
-
"content-type": "application/json",
|
|
202
|
-
};
|
|
203
|
-
b.bp("/stopsimulation");
|
|
204
|
-
let body;
|
|
205
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
206
|
-
Simulation: [],
|
|
207
|
-
}));
|
|
208
|
-
b.m("POST").h(headers).b(body);
|
|
209
|
-
return b.build();
|
|
210
|
-
};
|
|
211
|
-
exports.se_StopSimulationCommand = se_StopSimulationCommand;
|
|
212
|
-
const se_TagResourceCommand = async (input, context) => {
|
|
213
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
214
|
-
const headers = {
|
|
215
|
-
"content-type": "application/json",
|
|
216
|
-
};
|
|
217
|
-
b.bp("/tags/{ResourceArn}");
|
|
218
|
-
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
219
|
-
let body;
|
|
220
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
221
|
-
Tags: (_) => (0, smithy_client_1._json)(_),
|
|
222
|
-
}));
|
|
223
|
-
b.m("POST").h(headers).b(body);
|
|
224
|
-
return b.build();
|
|
225
|
-
};
|
|
226
|
-
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
227
|
-
const se_UntagResourceCommand = async (input, context) => {
|
|
228
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
229
|
-
const headers = {};
|
|
230
|
-
b.bp("/tags/{ResourceArn}");
|
|
231
|
-
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
232
|
-
const query = (0, smithy_client_1.map)({
|
|
233
|
-
[_tK]: [
|
|
234
|
-
(0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
|
|
235
|
-
() => (input[_TK] || []).map((_entry) => _entry),
|
|
236
|
-
],
|
|
237
|
-
});
|
|
238
|
-
let body;
|
|
239
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
240
|
-
return b.build();
|
|
241
|
-
};
|
|
242
|
-
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
243
|
-
const de_CreateSnapshotCommand = async (output, context) => {
|
|
244
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
245
|
-
return de_CreateSnapshotCommandError(output, context);
|
|
246
|
-
}
|
|
247
|
-
const contents = (0, smithy_client_1.map)({
|
|
248
|
-
$metadata: deserializeMetadata(output),
|
|
249
|
-
});
|
|
250
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
251
|
-
return contents;
|
|
252
|
-
};
|
|
253
|
-
exports.de_CreateSnapshotCommand = de_CreateSnapshotCommand;
|
|
254
|
-
const de_CreateSnapshotCommandError = async (output, context) => {
|
|
255
|
-
const parsedOutput = {
|
|
256
|
-
...output,
|
|
257
|
-
body: await parseErrorBody(output.body, context),
|
|
258
|
-
};
|
|
259
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
260
|
-
switch (errorCode) {
|
|
261
|
-
case "AccessDeniedException":
|
|
262
|
-
case "com.amazonaws.simspaceweaver#AccessDeniedException":
|
|
263
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
264
|
-
case "ConflictException":
|
|
265
|
-
case "com.amazonaws.simspaceweaver#ConflictException":
|
|
266
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
267
|
-
case "InternalServerException":
|
|
268
|
-
case "com.amazonaws.simspaceweaver#InternalServerException":
|
|
269
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
270
|
-
case "ResourceNotFoundException":
|
|
271
|
-
case "com.amazonaws.simspaceweaver#ResourceNotFoundException":
|
|
272
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
273
|
-
case "ValidationException":
|
|
274
|
-
case "com.amazonaws.simspaceweaver#ValidationException":
|
|
275
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
276
|
-
default:
|
|
277
|
-
const parsedBody = parsedOutput.body;
|
|
278
|
-
return throwDefaultError({
|
|
279
|
-
output,
|
|
280
|
-
parsedBody,
|
|
281
|
-
errorCode,
|
|
282
|
-
});
|
|
283
|
-
}
|
|
284
|
-
};
|
|
285
|
-
const de_DeleteAppCommand = async (output, context) => {
|
|
286
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
287
|
-
return de_DeleteAppCommandError(output, context);
|
|
288
|
-
}
|
|
289
|
-
const contents = (0, smithy_client_1.map)({
|
|
290
|
-
$metadata: deserializeMetadata(output),
|
|
291
|
-
});
|
|
292
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
293
|
-
return contents;
|
|
294
|
-
};
|
|
295
|
-
exports.de_DeleteAppCommand = de_DeleteAppCommand;
|
|
296
|
-
const de_DeleteAppCommandError = async (output, context) => {
|
|
297
|
-
const parsedOutput = {
|
|
298
|
-
...output,
|
|
299
|
-
body: await parseErrorBody(output.body, context),
|
|
300
|
-
};
|
|
301
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
302
|
-
switch (errorCode) {
|
|
303
|
-
case "AccessDeniedException":
|
|
304
|
-
case "com.amazonaws.simspaceweaver#AccessDeniedException":
|
|
305
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
306
|
-
case "ConflictException":
|
|
307
|
-
case "com.amazonaws.simspaceweaver#ConflictException":
|
|
308
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
309
|
-
case "InternalServerException":
|
|
310
|
-
case "com.amazonaws.simspaceweaver#InternalServerException":
|
|
311
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
312
|
-
case "ResourceNotFoundException":
|
|
313
|
-
case "com.amazonaws.simspaceweaver#ResourceNotFoundException":
|
|
314
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
315
|
-
case "ValidationException":
|
|
316
|
-
case "com.amazonaws.simspaceweaver#ValidationException":
|
|
317
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
318
|
-
default:
|
|
319
|
-
const parsedBody = parsedOutput.body;
|
|
320
|
-
return throwDefaultError({
|
|
321
|
-
output,
|
|
322
|
-
parsedBody,
|
|
323
|
-
errorCode,
|
|
324
|
-
});
|
|
325
|
-
}
|
|
326
|
-
};
|
|
327
|
-
const de_DeleteSimulationCommand = async (output, context) => {
|
|
328
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
329
|
-
return de_DeleteSimulationCommandError(output, context);
|
|
330
|
-
}
|
|
331
|
-
const contents = (0, smithy_client_1.map)({
|
|
332
|
-
$metadata: deserializeMetadata(output),
|
|
333
|
-
});
|
|
334
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
335
|
-
return contents;
|
|
336
|
-
};
|
|
337
|
-
exports.de_DeleteSimulationCommand = de_DeleteSimulationCommand;
|
|
338
|
-
const de_DeleteSimulationCommandError = async (output, context) => {
|
|
339
|
-
const parsedOutput = {
|
|
340
|
-
...output,
|
|
341
|
-
body: await parseErrorBody(output.body, context),
|
|
342
|
-
};
|
|
343
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
344
|
-
switch (errorCode) {
|
|
345
|
-
case "AccessDeniedException":
|
|
346
|
-
case "com.amazonaws.simspaceweaver#AccessDeniedException":
|
|
347
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
348
|
-
case "ConflictException":
|
|
349
|
-
case "com.amazonaws.simspaceweaver#ConflictException":
|
|
350
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
351
|
-
case "InternalServerException":
|
|
352
|
-
case "com.amazonaws.simspaceweaver#InternalServerException":
|
|
353
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
354
|
-
case "ResourceNotFoundException":
|
|
355
|
-
case "com.amazonaws.simspaceweaver#ResourceNotFoundException":
|
|
356
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
357
|
-
case "ValidationException":
|
|
358
|
-
case "com.amazonaws.simspaceweaver#ValidationException":
|
|
359
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
360
|
-
default:
|
|
361
|
-
const parsedBody = parsedOutput.body;
|
|
362
|
-
return throwDefaultError({
|
|
363
|
-
output,
|
|
364
|
-
parsedBody,
|
|
365
|
-
errorCode,
|
|
366
|
-
});
|
|
367
|
-
}
|
|
368
|
-
};
|
|
369
|
-
const de_DescribeAppCommand = async (output, context) => {
|
|
370
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
371
|
-
return de_DescribeAppCommandError(output, context);
|
|
372
|
-
}
|
|
373
|
-
const contents = (0, smithy_client_1.map)({
|
|
374
|
-
$metadata: deserializeMetadata(output),
|
|
375
|
-
});
|
|
376
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
377
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
378
|
-
Description: smithy_client_1.expectString,
|
|
379
|
-
Domain: smithy_client_1.expectString,
|
|
380
|
-
EndpointInfo: smithy_client_1._json,
|
|
381
|
-
LaunchOverrides: smithy_client_1._json,
|
|
382
|
-
Name: smithy_client_1.expectString,
|
|
383
|
-
Simulation: smithy_client_1.expectString,
|
|
384
|
-
Status: smithy_client_1.expectString,
|
|
385
|
-
TargetStatus: smithy_client_1.expectString,
|
|
386
|
-
});
|
|
387
|
-
Object.assign(contents, doc);
|
|
388
|
-
return contents;
|
|
389
|
-
};
|
|
390
|
-
exports.de_DescribeAppCommand = de_DescribeAppCommand;
|
|
391
|
-
const de_DescribeAppCommandError = async (output, context) => {
|
|
392
|
-
const parsedOutput = {
|
|
393
|
-
...output,
|
|
394
|
-
body: await parseErrorBody(output.body, context),
|
|
395
|
-
};
|
|
396
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
397
|
-
switch (errorCode) {
|
|
398
|
-
case "AccessDeniedException":
|
|
399
|
-
case "com.amazonaws.simspaceweaver#AccessDeniedException":
|
|
400
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
401
|
-
case "InternalServerException":
|
|
402
|
-
case "com.amazonaws.simspaceweaver#InternalServerException":
|
|
403
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
404
|
-
case "ResourceNotFoundException":
|
|
405
|
-
case "com.amazonaws.simspaceweaver#ResourceNotFoundException":
|
|
406
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
407
|
-
case "ValidationException":
|
|
408
|
-
case "com.amazonaws.simspaceweaver#ValidationException":
|
|
409
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
410
|
-
default:
|
|
411
|
-
const parsedBody = parsedOutput.body;
|
|
412
|
-
return throwDefaultError({
|
|
413
|
-
output,
|
|
414
|
-
parsedBody,
|
|
415
|
-
errorCode,
|
|
416
|
-
});
|
|
417
|
-
}
|
|
418
|
-
};
|
|
419
|
-
const de_DescribeSimulationCommand = async (output, context) => {
|
|
420
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
421
|
-
return de_DescribeSimulationCommandError(output, context);
|
|
422
|
-
}
|
|
423
|
-
const contents = (0, smithy_client_1.map)({
|
|
424
|
-
$metadata: deserializeMetadata(output),
|
|
425
|
-
});
|
|
426
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
427
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
428
|
-
Arn: smithy_client_1.expectString,
|
|
429
|
-
CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
430
|
-
Description: smithy_client_1.expectString,
|
|
431
|
-
ExecutionId: smithy_client_1.expectString,
|
|
432
|
-
LiveSimulationState: smithy_client_1._json,
|
|
433
|
-
LoggingConfiguration: smithy_client_1._json,
|
|
434
|
-
MaximumDuration: smithy_client_1.expectString,
|
|
435
|
-
Name: smithy_client_1.expectString,
|
|
436
|
-
RoleArn: smithy_client_1.expectString,
|
|
437
|
-
SchemaError: smithy_client_1.expectString,
|
|
438
|
-
SchemaS3Location: smithy_client_1._json,
|
|
439
|
-
SnapshotS3Location: smithy_client_1._json,
|
|
440
|
-
StartError: smithy_client_1.expectString,
|
|
441
|
-
Status: smithy_client_1.expectString,
|
|
442
|
-
TargetStatus: smithy_client_1.expectString,
|
|
443
|
-
});
|
|
444
|
-
Object.assign(contents, doc);
|
|
445
|
-
return contents;
|
|
446
|
-
};
|
|
447
|
-
exports.de_DescribeSimulationCommand = de_DescribeSimulationCommand;
|
|
448
|
-
const de_DescribeSimulationCommandError = async (output, context) => {
|
|
449
|
-
const parsedOutput = {
|
|
450
|
-
...output,
|
|
451
|
-
body: await parseErrorBody(output.body, context),
|
|
452
|
-
};
|
|
453
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
454
|
-
switch (errorCode) {
|
|
455
|
-
case "AccessDeniedException":
|
|
456
|
-
case "com.amazonaws.simspaceweaver#AccessDeniedException":
|
|
457
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
458
|
-
case "InternalServerException":
|
|
459
|
-
case "com.amazonaws.simspaceweaver#InternalServerException":
|
|
460
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
461
|
-
case "ResourceNotFoundException":
|
|
462
|
-
case "com.amazonaws.simspaceweaver#ResourceNotFoundException":
|
|
463
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
464
|
-
case "ValidationException":
|
|
465
|
-
case "com.amazonaws.simspaceweaver#ValidationException":
|
|
466
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
467
|
-
default:
|
|
468
|
-
const parsedBody = parsedOutput.body;
|
|
469
|
-
return throwDefaultError({
|
|
470
|
-
output,
|
|
471
|
-
parsedBody,
|
|
472
|
-
errorCode,
|
|
473
|
-
});
|
|
474
|
-
}
|
|
475
|
-
};
|
|
476
|
-
const de_ListAppsCommand = async (output, context) => {
|
|
477
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
478
|
-
return de_ListAppsCommandError(output, context);
|
|
479
|
-
}
|
|
480
|
-
const contents = (0, smithy_client_1.map)({
|
|
481
|
-
$metadata: deserializeMetadata(output),
|
|
482
|
-
});
|
|
483
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
484
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
485
|
-
Apps: smithy_client_1._json,
|
|
486
|
-
NextToken: smithy_client_1.expectString,
|
|
487
|
-
});
|
|
488
|
-
Object.assign(contents, doc);
|
|
489
|
-
return contents;
|
|
490
|
-
};
|
|
491
|
-
exports.de_ListAppsCommand = de_ListAppsCommand;
|
|
492
|
-
const de_ListAppsCommandError = async (output, context) => {
|
|
493
|
-
const parsedOutput = {
|
|
494
|
-
...output,
|
|
495
|
-
body: await parseErrorBody(output.body, context),
|
|
496
|
-
};
|
|
497
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
498
|
-
switch (errorCode) {
|
|
499
|
-
case "AccessDeniedException":
|
|
500
|
-
case "com.amazonaws.simspaceweaver#AccessDeniedException":
|
|
501
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
502
|
-
case "InternalServerException":
|
|
503
|
-
case "com.amazonaws.simspaceweaver#InternalServerException":
|
|
504
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
505
|
-
case "ResourceNotFoundException":
|
|
506
|
-
case "com.amazonaws.simspaceweaver#ResourceNotFoundException":
|
|
507
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
508
|
-
case "ValidationException":
|
|
509
|
-
case "com.amazonaws.simspaceweaver#ValidationException":
|
|
510
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
511
|
-
default:
|
|
512
|
-
const parsedBody = parsedOutput.body;
|
|
513
|
-
return throwDefaultError({
|
|
514
|
-
output,
|
|
515
|
-
parsedBody,
|
|
516
|
-
errorCode,
|
|
517
|
-
});
|
|
518
|
-
}
|
|
519
|
-
};
|
|
520
|
-
const de_ListSimulationsCommand = async (output, context) => {
|
|
521
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
522
|
-
return de_ListSimulationsCommandError(output, context);
|
|
523
|
-
}
|
|
524
|
-
const contents = (0, smithy_client_1.map)({
|
|
525
|
-
$metadata: deserializeMetadata(output),
|
|
526
|
-
});
|
|
527
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
528
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
529
|
-
NextToken: smithy_client_1.expectString,
|
|
530
|
-
Simulations: (_) => de_SimulationList(_, context),
|
|
531
|
-
});
|
|
532
|
-
Object.assign(contents, doc);
|
|
533
|
-
return contents;
|
|
534
|
-
};
|
|
535
|
-
exports.de_ListSimulationsCommand = de_ListSimulationsCommand;
|
|
536
|
-
const de_ListSimulationsCommandError = async (output, context) => {
|
|
537
|
-
const parsedOutput = {
|
|
538
|
-
...output,
|
|
539
|
-
body: await parseErrorBody(output.body, context),
|
|
540
|
-
};
|
|
541
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
542
|
-
switch (errorCode) {
|
|
543
|
-
case "AccessDeniedException":
|
|
544
|
-
case "com.amazonaws.simspaceweaver#AccessDeniedException":
|
|
545
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
546
|
-
case "InternalServerException":
|
|
547
|
-
case "com.amazonaws.simspaceweaver#InternalServerException":
|
|
548
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
549
|
-
case "ValidationException":
|
|
550
|
-
case "com.amazonaws.simspaceweaver#ValidationException":
|
|
551
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
552
|
-
default:
|
|
553
|
-
const parsedBody = parsedOutput.body;
|
|
554
|
-
return throwDefaultError({
|
|
555
|
-
output,
|
|
556
|
-
parsedBody,
|
|
557
|
-
errorCode,
|
|
558
|
-
});
|
|
559
|
-
}
|
|
560
|
-
};
|
|
561
|
-
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
562
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
563
|
-
return de_ListTagsForResourceCommandError(output, context);
|
|
564
|
-
}
|
|
565
|
-
const contents = (0, smithy_client_1.map)({
|
|
566
|
-
$metadata: deserializeMetadata(output),
|
|
567
|
-
});
|
|
568
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
569
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
570
|
-
Tags: smithy_client_1._json,
|
|
571
|
-
});
|
|
572
|
-
Object.assign(contents, doc);
|
|
573
|
-
return contents;
|
|
574
|
-
};
|
|
575
|
-
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
576
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
577
|
-
const parsedOutput = {
|
|
578
|
-
...output,
|
|
579
|
-
body: await parseErrorBody(output.body, context),
|
|
580
|
-
};
|
|
581
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
582
|
-
switch (errorCode) {
|
|
583
|
-
case "ResourceNotFoundException":
|
|
584
|
-
case "com.amazonaws.simspaceweaver#ResourceNotFoundException":
|
|
585
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
586
|
-
case "ValidationException":
|
|
587
|
-
case "com.amazonaws.simspaceweaver#ValidationException":
|
|
588
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
589
|
-
default:
|
|
590
|
-
const parsedBody = parsedOutput.body;
|
|
591
|
-
return throwDefaultError({
|
|
592
|
-
output,
|
|
593
|
-
parsedBody,
|
|
594
|
-
errorCode,
|
|
595
|
-
});
|
|
596
|
-
}
|
|
597
|
-
};
|
|
598
|
-
const de_StartAppCommand = async (output, context) => {
|
|
599
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
600
|
-
return de_StartAppCommandError(output, context);
|
|
601
|
-
}
|
|
602
|
-
const contents = (0, smithy_client_1.map)({
|
|
603
|
-
$metadata: deserializeMetadata(output),
|
|
604
|
-
});
|
|
605
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
606
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
607
|
-
Domain: smithy_client_1.expectString,
|
|
608
|
-
Name: smithy_client_1.expectString,
|
|
609
|
-
Simulation: smithy_client_1.expectString,
|
|
610
|
-
});
|
|
611
|
-
Object.assign(contents, doc);
|
|
612
|
-
return contents;
|
|
613
|
-
};
|
|
614
|
-
exports.de_StartAppCommand = de_StartAppCommand;
|
|
615
|
-
const de_StartAppCommandError = async (output, context) => {
|
|
616
|
-
const parsedOutput = {
|
|
617
|
-
...output,
|
|
618
|
-
body: await parseErrorBody(output.body, context),
|
|
619
|
-
};
|
|
620
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
621
|
-
switch (errorCode) {
|
|
622
|
-
case "AccessDeniedException":
|
|
623
|
-
case "com.amazonaws.simspaceweaver#AccessDeniedException":
|
|
624
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
625
|
-
case "ConflictException":
|
|
626
|
-
case "com.amazonaws.simspaceweaver#ConflictException":
|
|
627
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
628
|
-
case "InternalServerException":
|
|
629
|
-
case "com.amazonaws.simspaceweaver#InternalServerException":
|
|
630
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
631
|
-
case "ServiceQuotaExceededException":
|
|
632
|
-
case "com.amazonaws.simspaceweaver#ServiceQuotaExceededException":
|
|
633
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
634
|
-
case "ValidationException":
|
|
635
|
-
case "com.amazonaws.simspaceweaver#ValidationException":
|
|
636
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
637
|
-
default:
|
|
638
|
-
const parsedBody = parsedOutput.body;
|
|
639
|
-
return throwDefaultError({
|
|
640
|
-
output,
|
|
641
|
-
parsedBody,
|
|
642
|
-
errorCode,
|
|
643
|
-
});
|
|
644
|
-
}
|
|
645
|
-
};
|
|
646
|
-
const de_StartClockCommand = async (output, context) => {
|
|
647
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
648
|
-
return de_StartClockCommandError(output, context);
|
|
649
|
-
}
|
|
650
|
-
const contents = (0, smithy_client_1.map)({
|
|
651
|
-
$metadata: deserializeMetadata(output),
|
|
652
|
-
});
|
|
653
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
654
|
-
return contents;
|
|
655
|
-
};
|
|
656
|
-
exports.de_StartClockCommand = de_StartClockCommand;
|
|
657
|
-
const de_StartClockCommandError = async (output, context) => {
|
|
658
|
-
const parsedOutput = {
|
|
659
|
-
...output,
|
|
660
|
-
body: await parseErrorBody(output.body, context),
|
|
661
|
-
};
|
|
662
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
663
|
-
switch (errorCode) {
|
|
664
|
-
case "AccessDeniedException":
|
|
665
|
-
case "com.amazonaws.simspaceweaver#AccessDeniedException":
|
|
666
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
667
|
-
case "ConflictException":
|
|
668
|
-
case "com.amazonaws.simspaceweaver#ConflictException":
|
|
669
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
670
|
-
case "InternalServerException":
|
|
671
|
-
case "com.amazonaws.simspaceweaver#InternalServerException":
|
|
672
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
673
|
-
case "ResourceNotFoundException":
|
|
674
|
-
case "com.amazonaws.simspaceweaver#ResourceNotFoundException":
|
|
675
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
676
|
-
case "ValidationException":
|
|
677
|
-
case "com.amazonaws.simspaceweaver#ValidationException":
|
|
678
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
679
|
-
default:
|
|
680
|
-
const parsedBody = parsedOutput.body;
|
|
681
|
-
return throwDefaultError({
|
|
682
|
-
output,
|
|
683
|
-
parsedBody,
|
|
684
|
-
errorCode,
|
|
685
|
-
});
|
|
686
|
-
}
|
|
687
|
-
};
|
|
688
|
-
const de_StartSimulationCommand = async (output, context) => {
|
|
689
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
690
|
-
return de_StartSimulationCommandError(output, context);
|
|
691
|
-
}
|
|
692
|
-
const contents = (0, smithy_client_1.map)({
|
|
693
|
-
$metadata: deserializeMetadata(output),
|
|
694
|
-
});
|
|
695
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
696
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
697
|
-
Arn: smithy_client_1.expectString,
|
|
698
|
-
CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
699
|
-
ExecutionId: smithy_client_1.expectString,
|
|
700
|
-
});
|
|
701
|
-
Object.assign(contents, doc);
|
|
702
|
-
return contents;
|
|
703
|
-
};
|
|
704
|
-
exports.de_StartSimulationCommand = de_StartSimulationCommand;
|
|
705
|
-
const de_StartSimulationCommandError = async (output, context) => {
|
|
706
|
-
const parsedOutput = {
|
|
707
|
-
...output,
|
|
708
|
-
body: await parseErrorBody(output.body, context),
|
|
709
|
-
};
|
|
710
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
711
|
-
switch (errorCode) {
|
|
712
|
-
case "AccessDeniedException":
|
|
713
|
-
case "com.amazonaws.simspaceweaver#AccessDeniedException":
|
|
714
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
715
|
-
case "ConflictException":
|
|
716
|
-
case "com.amazonaws.simspaceweaver#ConflictException":
|
|
717
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
718
|
-
case "InternalServerException":
|
|
719
|
-
case "com.amazonaws.simspaceweaver#InternalServerException":
|
|
720
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
721
|
-
case "ServiceQuotaExceededException":
|
|
722
|
-
case "com.amazonaws.simspaceweaver#ServiceQuotaExceededException":
|
|
723
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
724
|
-
case "ValidationException":
|
|
725
|
-
case "com.amazonaws.simspaceweaver#ValidationException":
|
|
726
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
727
|
-
default:
|
|
728
|
-
const parsedBody = parsedOutput.body;
|
|
729
|
-
return throwDefaultError({
|
|
730
|
-
output,
|
|
731
|
-
parsedBody,
|
|
732
|
-
errorCode,
|
|
733
|
-
});
|
|
734
|
-
}
|
|
735
|
-
};
|
|
736
|
-
const de_StopAppCommand = async (output, context) => {
|
|
737
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
738
|
-
return de_StopAppCommandError(output, context);
|
|
739
|
-
}
|
|
740
|
-
const contents = (0, smithy_client_1.map)({
|
|
741
|
-
$metadata: deserializeMetadata(output),
|
|
742
|
-
});
|
|
743
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
744
|
-
return contents;
|
|
745
|
-
};
|
|
746
|
-
exports.de_StopAppCommand = de_StopAppCommand;
|
|
747
|
-
const de_StopAppCommandError = async (output, context) => {
|
|
748
|
-
const parsedOutput = {
|
|
749
|
-
...output,
|
|
750
|
-
body: await parseErrorBody(output.body, context),
|
|
751
|
-
};
|
|
752
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
753
|
-
switch (errorCode) {
|
|
754
|
-
case "AccessDeniedException":
|
|
755
|
-
case "com.amazonaws.simspaceweaver#AccessDeniedException":
|
|
756
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
757
|
-
case "ConflictException":
|
|
758
|
-
case "com.amazonaws.simspaceweaver#ConflictException":
|
|
759
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
760
|
-
case "InternalServerException":
|
|
761
|
-
case "com.amazonaws.simspaceweaver#InternalServerException":
|
|
762
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
763
|
-
case "ResourceNotFoundException":
|
|
764
|
-
case "com.amazonaws.simspaceweaver#ResourceNotFoundException":
|
|
765
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
766
|
-
case "ValidationException":
|
|
767
|
-
case "com.amazonaws.simspaceweaver#ValidationException":
|
|
768
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
769
|
-
default:
|
|
770
|
-
const parsedBody = parsedOutput.body;
|
|
771
|
-
return throwDefaultError({
|
|
772
|
-
output,
|
|
773
|
-
parsedBody,
|
|
774
|
-
errorCode,
|
|
775
|
-
});
|
|
776
|
-
}
|
|
777
|
-
};
|
|
778
|
-
const de_StopClockCommand = async (output, context) => {
|
|
779
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
780
|
-
return de_StopClockCommandError(output, context);
|
|
781
|
-
}
|
|
782
|
-
const contents = (0, smithy_client_1.map)({
|
|
783
|
-
$metadata: deserializeMetadata(output),
|
|
784
|
-
});
|
|
785
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
786
|
-
return contents;
|
|
787
|
-
};
|
|
788
|
-
exports.de_StopClockCommand = de_StopClockCommand;
|
|
789
|
-
const de_StopClockCommandError = async (output, context) => {
|
|
790
|
-
const parsedOutput = {
|
|
791
|
-
...output,
|
|
792
|
-
body: await parseErrorBody(output.body, context),
|
|
793
|
-
};
|
|
794
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
795
|
-
switch (errorCode) {
|
|
796
|
-
case "AccessDeniedException":
|
|
797
|
-
case "com.amazonaws.simspaceweaver#AccessDeniedException":
|
|
798
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
799
|
-
case "ConflictException":
|
|
800
|
-
case "com.amazonaws.simspaceweaver#ConflictException":
|
|
801
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
802
|
-
case "InternalServerException":
|
|
803
|
-
case "com.amazonaws.simspaceweaver#InternalServerException":
|
|
804
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
805
|
-
case "ResourceNotFoundException":
|
|
806
|
-
case "com.amazonaws.simspaceweaver#ResourceNotFoundException":
|
|
807
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
808
|
-
case "ValidationException":
|
|
809
|
-
case "com.amazonaws.simspaceweaver#ValidationException":
|
|
810
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
811
|
-
default:
|
|
812
|
-
const parsedBody = parsedOutput.body;
|
|
813
|
-
return throwDefaultError({
|
|
814
|
-
output,
|
|
815
|
-
parsedBody,
|
|
816
|
-
errorCode,
|
|
817
|
-
});
|
|
818
|
-
}
|
|
819
|
-
};
|
|
820
|
-
const de_StopSimulationCommand = async (output, context) => {
|
|
821
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
822
|
-
return de_StopSimulationCommandError(output, context);
|
|
823
|
-
}
|
|
824
|
-
const contents = (0, smithy_client_1.map)({
|
|
825
|
-
$metadata: deserializeMetadata(output),
|
|
826
|
-
});
|
|
827
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
828
|
-
return contents;
|
|
829
|
-
};
|
|
830
|
-
exports.de_StopSimulationCommand = de_StopSimulationCommand;
|
|
831
|
-
const de_StopSimulationCommandError = async (output, context) => {
|
|
832
|
-
const parsedOutput = {
|
|
833
|
-
...output,
|
|
834
|
-
body: await parseErrorBody(output.body, context),
|
|
835
|
-
};
|
|
836
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
837
|
-
switch (errorCode) {
|
|
838
|
-
case "AccessDeniedException":
|
|
839
|
-
case "com.amazonaws.simspaceweaver#AccessDeniedException":
|
|
840
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
841
|
-
case "ConflictException":
|
|
842
|
-
case "com.amazonaws.simspaceweaver#ConflictException":
|
|
843
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
844
|
-
case "InternalServerException":
|
|
845
|
-
case "com.amazonaws.simspaceweaver#InternalServerException":
|
|
846
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
847
|
-
case "ResourceNotFoundException":
|
|
848
|
-
case "com.amazonaws.simspaceweaver#ResourceNotFoundException":
|
|
849
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
850
|
-
case "ValidationException":
|
|
851
|
-
case "com.amazonaws.simspaceweaver#ValidationException":
|
|
852
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
853
|
-
default:
|
|
854
|
-
const parsedBody = parsedOutput.body;
|
|
855
|
-
return throwDefaultError({
|
|
856
|
-
output,
|
|
857
|
-
parsedBody,
|
|
858
|
-
errorCode,
|
|
859
|
-
});
|
|
860
|
-
}
|
|
861
|
-
};
|
|
862
|
-
const de_TagResourceCommand = async (output, context) => {
|
|
863
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
864
|
-
return de_TagResourceCommandError(output, context);
|
|
865
|
-
}
|
|
866
|
-
const contents = (0, smithy_client_1.map)({
|
|
867
|
-
$metadata: deserializeMetadata(output),
|
|
868
|
-
});
|
|
869
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
870
|
-
return contents;
|
|
871
|
-
};
|
|
872
|
-
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
873
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
874
|
-
const parsedOutput = {
|
|
875
|
-
...output,
|
|
876
|
-
body: await parseErrorBody(output.body, context),
|
|
877
|
-
};
|
|
878
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
879
|
-
switch (errorCode) {
|
|
880
|
-
case "ResourceNotFoundException":
|
|
881
|
-
case "com.amazonaws.simspaceweaver#ResourceNotFoundException":
|
|
882
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
883
|
-
case "TooManyTagsException":
|
|
884
|
-
case "com.amazonaws.simspaceweaver#TooManyTagsException":
|
|
885
|
-
throw await de_TooManyTagsExceptionRes(parsedOutput, context);
|
|
886
|
-
case "ValidationException":
|
|
887
|
-
case "com.amazonaws.simspaceweaver#ValidationException":
|
|
888
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
889
|
-
default:
|
|
890
|
-
const parsedBody = parsedOutput.body;
|
|
891
|
-
return throwDefaultError({
|
|
892
|
-
output,
|
|
893
|
-
parsedBody,
|
|
894
|
-
errorCode,
|
|
895
|
-
});
|
|
896
|
-
}
|
|
897
|
-
};
|
|
898
|
-
const de_UntagResourceCommand = async (output, context) => {
|
|
899
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
900
|
-
return de_UntagResourceCommandError(output, context);
|
|
901
|
-
}
|
|
902
|
-
const contents = (0, smithy_client_1.map)({
|
|
903
|
-
$metadata: deserializeMetadata(output),
|
|
904
|
-
});
|
|
905
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
906
|
-
return contents;
|
|
907
|
-
};
|
|
908
|
-
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
909
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
910
|
-
const parsedOutput = {
|
|
911
|
-
...output,
|
|
912
|
-
body: await parseErrorBody(output.body, context),
|
|
913
|
-
};
|
|
914
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
915
|
-
switch (errorCode) {
|
|
916
|
-
case "ResourceNotFoundException":
|
|
917
|
-
case "com.amazonaws.simspaceweaver#ResourceNotFoundException":
|
|
918
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
919
|
-
case "ValidationException":
|
|
920
|
-
case "com.amazonaws.simspaceweaver#ValidationException":
|
|
921
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
922
|
-
default:
|
|
923
|
-
const parsedBody = parsedOutput.body;
|
|
924
|
-
return throwDefaultError({
|
|
925
|
-
output,
|
|
926
|
-
parsedBody,
|
|
927
|
-
errorCode,
|
|
928
|
-
});
|
|
929
|
-
}
|
|
930
|
-
};
|
|
931
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(SimSpaceWeaverServiceException_1.SimSpaceWeaverServiceException);
|
|
932
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
933
|
-
const contents = (0, smithy_client_1.map)({});
|
|
934
|
-
const data = parsedOutput.body;
|
|
935
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
936
|
-
Message: smithy_client_1.expectString,
|
|
937
|
-
});
|
|
938
|
-
Object.assign(contents, doc);
|
|
939
|
-
const exception = new models_0_1.AccessDeniedException({
|
|
940
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
941
|
-
...contents,
|
|
942
|
-
});
|
|
943
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
944
|
-
};
|
|
945
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
946
|
-
const contents = (0, smithy_client_1.map)({});
|
|
947
|
-
const data = parsedOutput.body;
|
|
948
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
949
|
-
Message: smithy_client_1.expectString,
|
|
950
|
-
});
|
|
951
|
-
Object.assign(contents, doc);
|
|
952
|
-
const exception = new models_0_1.ConflictException({
|
|
953
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
954
|
-
...contents,
|
|
955
|
-
});
|
|
956
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
957
|
-
};
|
|
958
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
959
|
-
const contents = (0, smithy_client_1.map)({});
|
|
960
|
-
const data = parsedOutput.body;
|
|
961
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
962
|
-
Message: smithy_client_1.expectString,
|
|
963
|
-
});
|
|
964
|
-
Object.assign(contents, doc);
|
|
965
|
-
const exception = new models_0_1.InternalServerException({
|
|
966
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
967
|
-
...contents,
|
|
968
|
-
});
|
|
969
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
970
|
-
};
|
|
971
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
972
|
-
const contents = (0, smithy_client_1.map)({});
|
|
973
|
-
const data = parsedOutput.body;
|
|
974
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
975
|
-
Message: smithy_client_1.expectString,
|
|
976
|
-
});
|
|
977
|
-
Object.assign(contents, doc);
|
|
978
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
979
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
980
|
-
...contents,
|
|
981
|
-
});
|
|
982
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
983
|
-
};
|
|
984
|
-
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
985
|
-
const contents = (0, smithy_client_1.map)({});
|
|
986
|
-
const data = parsedOutput.body;
|
|
987
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
988
|
-
Message: smithy_client_1.expectString,
|
|
989
|
-
});
|
|
990
|
-
Object.assign(contents, doc);
|
|
991
|
-
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
992
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
993
|
-
...contents,
|
|
994
|
-
});
|
|
995
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
996
|
-
};
|
|
997
|
-
const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
|
|
998
|
-
const contents = (0, smithy_client_1.map)({});
|
|
999
|
-
const data = parsedOutput.body;
|
|
1000
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1001
|
-
Message: smithy_client_1.expectString,
|
|
1002
|
-
});
|
|
1003
|
-
Object.assign(contents, doc);
|
|
1004
|
-
const exception = new models_0_1.TooManyTagsException({
|
|
1005
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1006
|
-
...contents,
|
|
1007
|
-
});
|
|
1008
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1009
|
-
};
|
|
1010
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
1011
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1012
|
-
const data = parsedOutput.body;
|
|
1013
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1014
|
-
Message: smithy_client_1.expectString,
|
|
1015
|
-
});
|
|
1016
|
-
Object.assign(contents, doc);
|
|
1017
|
-
const exception = new models_0_1.ValidationException({
|
|
1018
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1019
|
-
...contents,
|
|
1020
|
-
});
|
|
1021
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1022
|
-
};
|
|
1023
|
-
const de_SimulationList = (output, context) => {
|
|
1024
|
-
const retVal = (output || [])
|
|
1025
|
-
.filter((e) => e != null)
|
|
1026
|
-
.map((entry) => {
|
|
1027
|
-
return de_SimulationMetadata(entry, context);
|
|
1028
|
-
});
|
|
1029
|
-
return retVal;
|
|
1030
|
-
};
|
|
1031
|
-
const de_SimulationMetadata = (output, context) => {
|
|
1032
|
-
return (0, smithy_client_1.take)(output, {
|
|
1033
|
-
Arn: smithy_client_1.expectString,
|
|
1034
|
-
CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1035
|
-
Name: smithy_client_1.expectString,
|
|
1036
|
-
Status: smithy_client_1.expectString,
|
|
1037
|
-
TargetStatus: smithy_client_1.expectString,
|
|
1038
|
-
});
|
|
1039
|
-
};
|
|
1040
|
-
const deserializeMetadata = (output) => ({
|
|
1041
|
-
httpStatusCode: output.statusCode,
|
|
1042
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1043
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1044
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
1045
|
-
});
|
|
1046
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1047
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1048
|
-
value !== null &&
|
|
1049
|
-
value !== "" &&
|
|
1050
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1051
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1052
|
-
const _A = "App";
|
|
1053
|
-
const _D = "Domain";
|
|
1054
|
-
const _MR = "MaxResults";
|
|
1055
|
-
const _NT = "NextToken";
|
|
1056
|
-
const _S = "Simulation";
|
|
1057
|
-
const _TK = "TagKeys";
|
|
1058
|
-
const _a = "app";
|
|
1059
|
-
const _d = "domain";
|
|
1060
|
-
const _mR = "maxResults";
|
|
1061
|
-
const _nT = "nextToken";
|
|
1062
|
-
const _s = "simulation";
|
|
1063
|
-
const _tK = "tagKeys";
|
|
1064
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1065
|
-
if (encoded.length) {
|
|
1066
|
-
return JSON.parse(encoded);
|
|
1067
|
-
}
|
|
1068
|
-
return {};
|
|
1069
|
-
});
|
|
1070
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1071
|
-
const value = await parseBody(errorBody, context);
|
|
1072
|
-
value.message = value.message ?? value.Message;
|
|
1073
|
-
return value;
|
|
1074
|
-
};
|
|
1075
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
1076
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1077
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
1078
|
-
let cleanValue = rawValue;
|
|
1079
|
-
if (typeof cleanValue === "number") {
|
|
1080
|
-
cleanValue = cleanValue.toString();
|
|
1081
|
-
}
|
|
1082
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1083
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1084
|
-
}
|
|
1085
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1086
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1087
|
-
}
|
|
1088
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1089
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1090
|
-
}
|
|
1091
|
-
return cleanValue;
|
|
1092
|
-
};
|
|
1093
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1094
|
-
if (headerKey !== undefined) {
|
|
1095
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1096
|
-
}
|
|
1097
|
-
if (data.code !== undefined) {
|
|
1098
|
-
return sanitizeErrorCode(data.code);
|
|
1099
|
-
}
|
|
1100
|
-
if (data["__type"] !== undefined) {
|
|
1101
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1102
|
-
}
|
|
1103
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|