@aws-sdk/client-iotthingsgraph 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.
Files changed (59) hide show
  1. package/dist-cjs/IoTThingsGraph.js +1 -81
  2. package/dist-cjs/IoTThingsGraphClient.js +1 -43
  3. package/dist-cjs/commands/AssociateEntityToThingCommand.js +1 -28
  4. package/dist-cjs/commands/CreateFlowTemplateCommand.js +1 -28
  5. package/dist-cjs/commands/CreateSystemInstanceCommand.js +1 -28
  6. package/dist-cjs/commands/CreateSystemTemplateCommand.js +1 -28
  7. package/dist-cjs/commands/DeleteFlowTemplateCommand.js +1 -28
  8. package/dist-cjs/commands/DeleteNamespaceCommand.js +1 -28
  9. package/dist-cjs/commands/DeleteSystemInstanceCommand.js +1 -28
  10. package/dist-cjs/commands/DeleteSystemTemplateCommand.js +1 -28
  11. package/dist-cjs/commands/DeploySystemInstanceCommand.js +1 -28
  12. package/dist-cjs/commands/DeprecateFlowTemplateCommand.js +1 -28
  13. package/dist-cjs/commands/DeprecateSystemTemplateCommand.js +1 -28
  14. package/dist-cjs/commands/DescribeNamespaceCommand.js +1 -28
  15. package/dist-cjs/commands/DissociateEntityFromThingCommand.js +1 -28
  16. package/dist-cjs/commands/GetEntitiesCommand.js +1 -28
  17. package/dist-cjs/commands/GetFlowTemplateCommand.js +1 -28
  18. package/dist-cjs/commands/GetFlowTemplateRevisionsCommand.js +1 -28
  19. package/dist-cjs/commands/GetNamespaceDeletionStatusCommand.js +1 -28
  20. package/dist-cjs/commands/GetSystemInstanceCommand.js +1 -28
  21. package/dist-cjs/commands/GetSystemTemplateCommand.js +1 -28
  22. package/dist-cjs/commands/GetSystemTemplateRevisionsCommand.js +1 -28
  23. package/dist-cjs/commands/GetUploadStatusCommand.js +1 -28
  24. package/dist-cjs/commands/ListFlowExecutionMessagesCommand.js +1 -28
  25. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
  26. package/dist-cjs/commands/SearchEntitiesCommand.js +1 -28
  27. package/dist-cjs/commands/SearchFlowExecutionsCommand.js +1 -28
  28. package/dist-cjs/commands/SearchFlowTemplatesCommand.js +1 -28
  29. package/dist-cjs/commands/SearchSystemInstancesCommand.js +1 -28
  30. package/dist-cjs/commands/SearchSystemTemplatesCommand.js +1 -28
  31. package/dist-cjs/commands/SearchThingsCommand.js +1 -28
  32. package/dist-cjs/commands/TagResourceCommand.js +1 -28
  33. package/dist-cjs/commands/UndeploySystemInstanceCommand.js +1 -28
  34. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  35. package/dist-cjs/commands/UpdateFlowTemplateCommand.js +1 -28
  36. package/dist-cjs/commands/UpdateSystemTemplateCommand.js +1 -28
  37. package/dist-cjs/commands/UploadEntityDefinitionsCommand.js +1 -28
  38. package/dist-cjs/commands/index.js +1 -38
  39. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  40. package/dist-cjs/extensionConfiguration.js +1 -2
  41. package/dist-cjs/index.js +3173 -11
  42. package/dist-cjs/models/IoTThingsGraphServiceException.js +1 -12
  43. package/dist-cjs/models/index.js +1 -4
  44. package/dist-cjs/models/models_0.js +1 -179
  45. package/dist-cjs/pagination/GetFlowTemplateRevisionsPaginator.js +1 -7
  46. package/dist-cjs/pagination/GetSystemTemplateRevisionsPaginator.js +1 -7
  47. package/dist-cjs/pagination/Interfaces.js +1 -2
  48. package/dist-cjs/pagination/ListFlowExecutionMessagesPaginator.js +1 -7
  49. package/dist-cjs/pagination/ListTagsForResourcePaginator.js +1 -7
  50. package/dist-cjs/pagination/SearchEntitiesPaginator.js +1 -7
  51. package/dist-cjs/pagination/SearchFlowExecutionsPaginator.js +1 -7
  52. package/dist-cjs/pagination/SearchFlowTemplatesPaginator.js +1 -7
  53. package/dist-cjs/pagination/SearchSystemInstancesPaginator.js +1 -7
  54. package/dist-cjs/pagination/SearchSystemTemplatesPaginator.js +1 -7
  55. package/dist-cjs/pagination/SearchThingsPaginator.js +1 -7
  56. package/dist-cjs/pagination/index.js +1 -14
  57. package/dist-cjs/protocols/Aws_json1_1.js +1 -2100
  58. package/dist-cjs/runtimeExtensions.js +1 -22
  59. package/package.json +40 -40
@@ -1,2100 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_GetFlowTemplateCommand = exports.de_GetEntitiesCommand = exports.de_DissociateEntityFromThingCommand = exports.de_DescribeNamespaceCommand = exports.de_DeprecateSystemTemplateCommand = exports.de_DeprecateFlowTemplateCommand = exports.de_DeploySystemInstanceCommand = exports.de_DeleteSystemTemplateCommand = exports.de_DeleteSystemInstanceCommand = exports.de_DeleteNamespaceCommand = exports.de_DeleteFlowTemplateCommand = exports.de_CreateSystemTemplateCommand = exports.de_CreateSystemInstanceCommand = exports.de_CreateFlowTemplateCommand = exports.de_AssociateEntityToThingCommand = exports.se_UploadEntityDefinitionsCommand = exports.se_UpdateSystemTemplateCommand = exports.se_UpdateFlowTemplateCommand = exports.se_UntagResourceCommand = exports.se_UndeploySystemInstanceCommand = exports.se_TagResourceCommand = exports.se_SearchThingsCommand = exports.se_SearchSystemTemplatesCommand = exports.se_SearchSystemInstancesCommand = exports.se_SearchFlowTemplatesCommand = exports.se_SearchFlowExecutionsCommand = exports.se_SearchEntitiesCommand = exports.se_ListTagsForResourceCommand = exports.se_ListFlowExecutionMessagesCommand = exports.se_GetUploadStatusCommand = exports.se_GetSystemTemplateRevisionsCommand = exports.se_GetSystemTemplateCommand = exports.se_GetSystemInstanceCommand = exports.se_GetNamespaceDeletionStatusCommand = exports.se_GetFlowTemplateRevisionsCommand = exports.se_GetFlowTemplateCommand = exports.se_GetEntitiesCommand = exports.se_DissociateEntityFromThingCommand = exports.se_DescribeNamespaceCommand = exports.se_DeprecateSystemTemplateCommand = exports.se_DeprecateFlowTemplateCommand = exports.se_DeploySystemInstanceCommand = exports.se_DeleteSystemTemplateCommand = exports.se_DeleteSystemInstanceCommand = exports.se_DeleteNamespaceCommand = exports.se_DeleteFlowTemplateCommand = exports.se_CreateSystemTemplateCommand = exports.se_CreateSystemInstanceCommand = exports.se_CreateFlowTemplateCommand = exports.se_AssociateEntityToThingCommand = void 0;
4
- exports.de_UploadEntityDefinitionsCommand = exports.de_UpdateSystemTemplateCommand = exports.de_UpdateFlowTemplateCommand = exports.de_UntagResourceCommand = exports.de_UndeploySystemInstanceCommand = exports.de_TagResourceCommand = exports.de_SearchThingsCommand = exports.de_SearchSystemTemplatesCommand = exports.de_SearchSystemInstancesCommand = exports.de_SearchFlowTemplatesCommand = exports.de_SearchFlowExecutionsCommand = exports.de_SearchEntitiesCommand = exports.de_ListTagsForResourceCommand = exports.de_ListFlowExecutionMessagesCommand = exports.de_GetUploadStatusCommand = exports.de_GetSystemTemplateRevisionsCommand = exports.de_GetSystemTemplateCommand = exports.de_GetSystemInstanceCommand = exports.de_GetNamespaceDeletionStatusCommand = exports.de_GetFlowTemplateRevisionsCommand = void 0;
5
- const protocol_http_1 = require("@smithy/protocol-http");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- const IoTThingsGraphServiceException_1 = require("../models/IoTThingsGraphServiceException");
8
- const models_0_1 = require("../models/models_0");
9
- const se_AssociateEntityToThingCommand = async (input, context) => {
10
- const headers = sharedHeaders("AssociateEntityToThing");
11
- let body;
12
- body = JSON.stringify((0, smithy_client_1._json)(input));
13
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
14
- };
15
- exports.se_AssociateEntityToThingCommand = se_AssociateEntityToThingCommand;
16
- const se_CreateFlowTemplateCommand = async (input, context) => {
17
- const headers = sharedHeaders("CreateFlowTemplate");
18
- let body;
19
- body = JSON.stringify((0, smithy_client_1._json)(input));
20
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
21
- };
22
- exports.se_CreateFlowTemplateCommand = se_CreateFlowTemplateCommand;
23
- const se_CreateSystemInstanceCommand = async (input, context) => {
24
- const headers = sharedHeaders("CreateSystemInstance");
25
- let body;
26
- body = JSON.stringify((0, smithy_client_1._json)(input));
27
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
- };
29
- exports.se_CreateSystemInstanceCommand = se_CreateSystemInstanceCommand;
30
- const se_CreateSystemTemplateCommand = async (input, context) => {
31
- const headers = sharedHeaders("CreateSystemTemplate");
32
- let body;
33
- body = JSON.stringify((0, smithy_client_1._json)(input));
34
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
- };
36
- exports.se_CreateSystemTemplateCommand = se_CreateSystemTemplateCommand;
37
- const se_DeleteFlowTemplateCommand = async (input, context) => {
38
- const headers = sharedHeaders("DeleteFlowTemplate");
39
- let body;
40
- body = JSON.stringify((0, smithy_client_1._json)(input));
41
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
42
- };
43
- exports.se_DeleteFlowTemplateCommand = se_DeleteFlowTemplateCommand;
44
- const se_DeleteNamespaceCommand = async (input, context) => {
45
- const headers = sharedHeaders("DeleteNamespace");
46
- let body;
47
- body = JSON.stringify((0, smithy_client_1._json)(input));
48
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
- };
50
- exports.se_DeleteNamespaceCommand = se_DeleteNamespaceCommand;
51
- const se_DeleteSystemInstanceCommand = async (input, context) => {
52
- const headers = sharedHeaders("DeleteSystemInstance");
53
- let body;
54
- body = JSON.stringify((0, smithy_client_1._json)(input));
55
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
56
- };
57
- exports.se_DeleteSystemInstanceCommand = se_DeleteSystemInstanceCommand;
58
- const se_DeleteSystemTemplateCommand = async (input, context) => {
59
- const headers = sharedHeaders("DeleteSystemTemplate");
60
- let body;
61
- body = JSON.stringify((0, smithy_client_1._json)(input));
62
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
63
- };
64
- exports.se_DeleteSystemTemplateCommand = se_DeleteSystemTemplateCommand;
65
- const se_DeploySystemInstanceCommand = async (input, context) => {
66
- const headers = sharedHeaders("DeploySystemInstance");
67
- let body;
68
- body = JSON.stringify((0, smithy_client_1._json)(input));
69
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
70
- };
71
- exports.se_DeploySystemInstanceCommand = se_DeploySystemInstanceCommand;
72
- const se_DeprecateFlowTemplateCommand = async (input, context) => {
73
- const headers = sharedHeaders("DeprecateFlowTemplate");
74
- let body;
75
- body = JSON.stringify((0, smithy_client_1._json)(input));
76
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
- };
78
- exports.se_DeprecateFlowTemplateCommand = se_DeprecateFlowTemplateCommand;
79
- const se_DeprecateSystemTemplateCommand = async (input, context) => {
80
- const headers = sharedHeaders("DeprecateSystemTemplate");
81
- let body;
82
- body = JSON.stringify((0, smithy_client_1._json)(input));
83
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
84
- };
85
- exports.se_DeprecateSystemTemplateCommand = se_DeprecateSystemTemplateCommand;
86
- const se_DescribeNamespaceCommand = async (input, context) => {
87
- const headers = sharedHeaders("DescribeNamespace");
88
- let body;
89
- body = JSON.stringify((0, smithy_client_1._json)(input));
90
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
91
- };
92
- exports.se_DescribeNamespaceCommand = se_DescribeNamespaceCommand;
93
- const se_DissociateEntityFromThingCommand = async (input, context) => {
94
- const headers = sharedHeaders("DissociateEntityFromThing");
95
- let body;
96
- body = JSON.stringify((0, smithy_client_1._json)(input));
97
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
98
- };
99
- exports.se_DissociateEntityFromThingCommand = se_DissociateEntityFromThingCommand;
100
- const se_GetEntitiesCommand = async (input, context) => {
101
- const headers = sharedHeaders("GetEntities");
102
- let body;
103
- body = JSON.stringify((0, smithy_client_1._json)(input));
104
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
105
- };
106
- exports.se_GetEntitiesCommand = se_GetEntitiesCommand;
107
- const se_GetFlowTemplateCommand = async (input, context) => {
108
- const headers = sharedHeaders("GetFlowTemplate");
109
- let body;
110
- body = JSON.stringify((0, smithy_client_1._json)(input));
111
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
- };
113
- exports.se_GetFlowTemplateCommand = se_GetFlowTemplateCommand;
114
- const se_GetFlowTemplateRevisionsCommand = async (input, context) => {
115
- const headers = sharedHeaders("GetFlowTemplateRevisions");
116
- let body;
117
- body = JSON.stringify((0, smithy_client_1._json)(input));
118
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
119
- };
120
- exports.se_GetFlowTemplateRevisionsCommand = se_GetFlowTemplateRevisionsCommand;
121
- const se_GetNamespaceDeletionStatusCommand = async (input, context) => {
122
- const headers = sharedHeaders("GetNamespaceDeletionStatus");
123
- let body;
124
- body = JSON.stringify((0, smithy_client_1._json)(input));
125
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
126
- };
127
- exports.se_GetNamespaceDeletionStatusCommand = se_GetNamespaceDeletionStatusCommand;
128
- const se_GetSystemInstanceCommand = async (input, context) => {
129
- const headers = sharedHeaders("GetSystemInstance");
130
- let body;
131
- body = JSON.stringify((0, smithy_client_1._json)(input));
132
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
133
- };
134
- exports.se_GetSystemInstanceCommand = se_GetSystemInstanceCommand;
135
- const se_GetSystemTemplateCommand = async (input, context) => {
136
- const headers = sharedHeaders("GetSystemTemplate");
137
- let body;
138
- body = JSON.stringify((0, smithy_client_1._json)(input));
139
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
140
- };
141
- exports.se_GetSystemTemplateCommand = se_GetSystemTemplateCommand;
142
- const se_GetSystemTemplateRevisionsCommand = async (input, context) => {
143
- const headers = sharedHeaders("GetSystemTemplateRevisions");
144
- let body;
145
- body = JSON.stringify((0, smithy_client_1._json)(input));
146
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
147
- };
148
- exports.se_GetSystemTemplateRevisionsCommand = se_GetSystemTemplateRevisionsCommand;
149
- const se_GetUploadStatusCommand = async (input, context) => {
150
- const headers = sharedHeaders("GetUploadStatus");
151
- let body;
152
- body = JSON.stringify((0, smithy_client_1._json)(input));
153
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
154
- };
155
- exports.se_GetUploadStatusCommand = se_GetUploadStatusCommand;
156
- const se_ListFlowExecutionMessagesCommand = async (input, context) => {
157
- const headers = sharedHeaders("ListFlowExecutionMessages");
158
- let body;
159
- body = JSON.stringify((0, smithy_client_1._json)(input));
160
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
161
- };
162
- exports.se_ListFlowExecutionMessagesCommand = se_ListFlowExecutionMessagesCommand;
163
- const se_ListTagsForResourceCommand = async (input, context) => {
164
- const headers = sharedHeaders("ListTagsForResource");
165
- let body;
166
- body = JSON.stringify((0, smithy_client_1._json)(input));
167
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
168
- };
169
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
170
- const se_SearchEntitiesCommand = async (input, context) => {
171
- const headers = sharedHeaders("SearchEntities");
172
- let body;
173
- body = JSON.stringify((0, smithy_client_1._json)(input));
174
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
175
- };
176
- exports.se_SearchEntitiesCommand = se_SearchEntitiesCommand;
177
- const se_SearchFlowExecutionsCommand = async (input, context) => {
178
- const headers = sharedHeaders("SearchFlowExecutions");
179
- let body;
180
- body = JSON.stringify(se_SearchFlowExecutionsRequest(input, context));
181
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
182
- };
183
- exports.se_SearchFlowExecutionsCommand = se_SearchFlowExecutionsCommand;
184
- const se_SearchFlowTemplatesCommand = async (input, context) => {
185
- const headers = sharedHeaders("SearchFlowTemplates");
186
- let body;
187
- body = JSON.stringify((0, smithy_client_1._json)(input));
188
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
189
- };
190
- exports.se_SearchFlowTemplatesCommand = se_SearchFlowTemplatesCommand;
191
- const se_SearchSystemInstancesCommand = async (input, context) => {
192
- const headers = sharedHeaders("SearchSystemInstances");
193
- let body;
194
- body = JSON.stringify((0, smithy_client_1._json)(input));
195
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
196
- };
197
- exports.se_SearchSystemInstancesCommand = se_SearchSystemInstancesCommand;
198
- const se_SearchSystemTemplatesCommand = async (input, context) => {
199
- const headers = sharedHeaders("SearchSystemTemplates");
200
- let body;
201
- body = JSON.stringify((0, smithy_client_1._json)(input));
202
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
203
- };
204
- exports.se_SearchSystemTemplatesCommand = se_SearchSystemTemplatesCommand;
205
- const se_SearchThingsCommand = async (input, context) => {
206
- const headers = sharedHeaders("SearchThings");
207
- let body;
208
- body = JSON.stringify((0, smithy_client_1._json)(input));
209
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
210
- };
211
- exports.se_SearchThingsCommand = se_SearchThingsCommand;
212
- const se_TagResourceCommand = async (input, context) => {
213
- const headers = sharedHeaders("TagResource");
214
- let body;
215
- body = JSON.stringify((0, smithy_client_1._json)(input));
216
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
217
- };
218
- exports.se_TagResourceCommand = se_TagResourceCommand;
219
- const se_UndeploySystemInstanceCommand = async (input, context) => {
220
- const headers = sharedHeaders("UndeploySystemInstance");
221
- let body;
222
- body = JSON.stringify((0, smithy_client_1._json)(input));
223
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
224
- };
225
- exports.se_UndeploySystemInstanceCommand = se_UndeploySystemInstanceCommand;
226
- const se_UntagResourceCommand = async (input, context) => {
227
- const headers = sharedHeaders("UntagResource");
228
- let body;
229
- body = JSON.stringify((0, smithy_client_1._json)(input));
230
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
231
- };
232
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
233
- const se_UpdateFlowTemplateCommand = async (input, context) => {
234
- const headers = sharedHeaders("UpdateFlowTemplate");
235
- let body;
236
- body = JSON.stringify((0, smithy_client_1._json)(input));
237
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
238
- };
239
- exports.se_UpdateFlowTemplateCommand = se_UpdateFlowTemplateCommand;
240
- const se_UpdateSystemTemplateCommand = async (input, context) => {
241
- const headers = sharedHeaders("UpdateSystemTemplate");
242
- let body;
243
- body = JSON.stringify((0, smithy_client_1._json)(input));
244
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
245
- };
246
- exports.se_UpdateSystemTemplateCommand = se_UpdateSystemTemplateCommand;
247
- const se_UploadEntityDefinitionsCommand = async (input, context) => {
248
- const headers = sharedHeaders("UploadEntityDefinitions");
249
- let body;
250
- body = JSON.stringify((0, smithy_client_1._json)(input));
251
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
252
- };
253
- exports.se_UploadEntityDefinitionsCommand = se_UploadEntityDefinitionsCommand;
254
- const de_AssociateEntityToThingCommand = async (output, context) => {
255
- if (output.statusCode >= 300) {
256
- return de_AssociateEntityToThingCommandError(output, context);
257
- }
258
- const data = await parseBody(output.body, context);
259
- let contents = {};
260
- contents = (0, smithy_client_1._json)(data);
261
- const response = {
262
- $metadata: deserializeMetadata(output),
263
- ...contents,
264
- };
265
- return response;
266
- };
267
- exports.de_AssociateEntityToThingCommand = de_AssociateEntityToThingCommand;
268
- const de_AssociateEntityToThingCommandError = async (output, context) => {
269
- const parsedOutput = {
270
- ...output,
271
- body: await parseErrorBody(output.body, context),
272
- };
273
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
274
- switch (errorCode) {
275
- case "InternalFailureException":
276
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
277
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
278
- case "InvalidRequestException":
279
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
280
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
281
- case "ResourceNotFoundException":
282
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
283
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
284
- case "ThrottlingException":
285
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
286
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
287
- default:
288
- const parsedBody = parsedOutput.body;
289
- return throwDefaultError({
290
- output,
291
- parsedBody,
292
- errorCode,
293
- });
294
- }
295
- };
296
- const de_CreateFlowTemplateCommand = async (output, context) => {
297
- if (output.statusCode >= 300) {
298
- return de_CreateFlowTemplateCommandError(output, context);
299
- }
300
- const data = await parseBody(output.body, context);
301
- let contents = {};
302
- contents = de_CreateFlowTemplateResponse(data, context);
303
- const response = {
304
- $metadata: deserializeMetadata(output),
305
- ...contents,
306
- };
307
- return response;
308
- };
309
- exports.de_CreateFlowTemplateCommand = de_CreateFlowTemplateCommand;
310
- const de_CreateFlowTemplateCommandError = async (output, context) => {
311
- const parsedOutput = {
312
- ...output,
313
- body: await parseErrorBody(output.body, context),
314
- };
315
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
316
- switch (errorCode) {
317
- case "InternalFailureException":
318
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
319
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
320
- case "InvalidRequestException":
321
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
322
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
323
- case "LimitExceededException":
324
- case "com.amazonaws.iotthingsgraph#LimitExceededException":
325
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
326
- case "ResourceAlreadyExistsException":
327
- case "com.amazonaws.iotthingsgraph#ResourceAlreadyExistsException":
328
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
329
- case "ThrottlingException":
330
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
331
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
332
- default:
333
- const parsedBody = parsedOutput.body;
334
- return throwDefaultError({
335
- output,
336
- parsedBody,
337
- errorCode,
338
- });
339
- }
340
- };
341
- const de_CreateSystemInstanceCommand = async (output, context) => {
342
- if (output.statusCode >= 300) {
343
- return de_CreateSystemInstanceCommandError(output, context);
344
- }
345
- const data = await parseBody(output.body, context);
346
- let contents = {};
347
- contents = de_CreateSystemInstanceResponse(data, context);
348
- const response = {
349
- $metadata: deserializeMetadata(output),
350
- ...contents,
351
- };
352
- return response;
353
- };
354
- exports.de_CreateSystemInstanceCommand = de_CreateSystemInstanceCommand;
355
- const de_CreateSystemInstanceCommandError = async (output, context) => {
356
- const parsedOutput = {
357
- ...output,
358
- body: await parseErrorBody(output.body, context),
359
- };
360
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
361
- switch (errorCode) {
362
- case "InternalFailureException":
363
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
364
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
365
- case "InvalidRequestException":
366
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
367
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
368
- case "LimitExceededException":
369
- case "com.amazonaws.iotthingsgraph#LimitExceededException":
370
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
371
- case "ResourceAlreadyExistsException":
372
- case "com.amazonaws.iotthingsgraph#ResourceAlreadyExistsException":
373
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
374
- case "ThrottlingException":
375
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
376
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
377
- default:
378
- const parsedBody = parsedOutput.body;
379
- return throwDefaultError({
380
- output,
381
- parsedBody,
382
- errorCode,
383
- });
384
- }
385
- };
386
- const de_CreateSystemTemplateCommand = async (output, context) => {
387
- if (output.statusCode >= 300) {
388
- return de_CreateSystemTemplateCommandError(output, context);
389
- }
390
- const data = await parseBody(output.body, context);
391
- let contents = {};
392
- contents = de_CreateSystemTemplateResponse(data, context);
393
- const response = {
394
- $metadata: deserializeMetadata(output),
395
- ...contents,
396
- };
397
- return response;
398
- };
399
- exports.de_CreateSystemTemplateCommand = de_CreateSystemTemplateCommand;
400
- const de_CreateSystemTemplateCommandError = async (output, context) => {
401
- const parsedOutput = {
402
- ...output,
403
- body: await parseErrorBody(output.body, context),
404
- };
405
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
406
- switch (errorCode) {
407
- case "InternalFailureException":
408
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
409
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
410
- case "InvalidRequestException":
411
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
412
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
413
- case "ResourceAlreadyExistsException":
414
- case "com.amazonaws.iotthingsgraph#ResourceAlreadyExistsException":
415
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
416
- case "ThrottlingException":
417
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
418
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
419
- default:
420
- const parsedBody = parsedOutput.body;
421
- return throwDefaultError({
422
- output,
423
- parsedBody,
424
- errorCode,
425
- });
426
- }
427
- };
428
- const de_DeleteFlowTemplateCommand = async (output, context) => {
429
- if (output.statusCode >= 300) {
430
- return de_DeleteFlowTemplateCommandError(output, context);
431
- }
432
- const data = await parseBody(output.body, context);
433
- let contents = {};
434
- contents = (0, smithy_client_1._json)(data);
435
- const response = {
436
- $metadata: deserializeMetadata(output),
437
- ...contents,
438
- };
439
- return response;
440
- };
441
- exports.de_DeleteFlowTemplateCommand = de_DeleteFlowTemplateCommand;
442
- const de_DeleteFlowTemplateCommandError = async (output, context) => {
443
- const parsedOutput = {
444
- ...output,
445
- body: await parseErrorBody(output.body, context),
446
- };
447
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
448
- switch (errorCode) {
449
- case "InternalFailureException":
450
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
451
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
452
- case "InvalidRequestException":
453
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
454
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
455
- case "ResourceInUseException":
456
- case "com.amazonaws.iotthingsgraph#ResourceInUseException":
457
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
458
- case "ThrottlingException":
459
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
460
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
461
- default:
462
- const parsedBody = parsedOutput.body;
463
- return throwDefaultError({
464
- output,
465
- parsedBody,
466
- errorCode,
467
- });
468
- }
469
- };
470
- const de_DeleteNamespaceCommand = async (output, context) => {
471
- if (output.statusCode >= 300) {
472
- return de_DeleteNamespaceCommandError(output, context);
473
- }
474
- const data = await parseBody(output.body, context);
475
- let contents = {};
476
- contents = (0, smithy_client_1._json)(data);
477
- const response = {
478
- $metadata: deserializeMetadata(output),
479
- ...contents,
480
- };
481
- return response;
482
- };
483
- exports.de_DeleteNamespaceCommand = de_DeleteNamespaceCommand;
484
- const de_DeleteNamespaceCommandError = async (output, context) => {
485
- const parsedOutput = {
486
- ...output,
487
- body: await parseErrorBody(output.body, context),
488
- };
489
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
490
- switch (errorCode) {
491
- case "InternalFailureException":
492
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
493
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
494
- case "ThrottlingException":
495
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
496
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
497
- default:
498
- const parsedBody = parsedOutput.body;
499
- return throwDefaultError({
500
- output,
501
- parsedBody,
502
- errorCode,
503
- });
504
- }
505
- };
506
- const de_DeleteSystemInstanceCommand = async (output, context) => {
507
- if (output.statusCode >= 300) {
508
- return de_DeleteSystemInstanceCommandError(output, context);
509
- }
510
- const data = await parseBody(output.body, context);
511
- let contents = {};
512
- contents = (0, smithy_client_1._json)(data);
513
- const response = {
514
- $metadata: deserializeMetadata(output),
515
- ...contents,
516
- };
517
- return response;
518
- };
519
- exports.de_DeleteSystemInstanceCommand = de_DeleteSystemInstanceCommand;
520
- const de_DeleteSystemInstanceCommandError = async (output, context) => {
521
- const parsedOutput = {
522
- ...output,
523
- body: await parseErrorBody(output.body, context),
524
- };
525
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
526
- switch (errorCode) {
527
- case "InternalFailureException":
528
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
529
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
530
- case "InvalidRequestException":
531
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
532
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
533
- case "ResourceInUseException":
534
- case "com.amazonaws.iotthingsgraph#ResourceInUseException":
535
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
536
- case "ThrottlingException":
537
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
538
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
539
- default:
540
- const parsedBody = parsedOutput.body;
541
- return throwDefaultError({
542
- output,
543
- parsedBody,
544
- errorCode,
545
- });
546
- }
547
- };
548
- const de_DeleteSystemTemplateCommand = async (output, context) => {
549
- if (output.statusCode >= 300) {
550
- return de_DeleteSystemTemplateCommandError(output, context);
551
- }
552
- const data = await parseBody(output.body, context);
553
- let contents = {};
554
- contents = (0, smithy_client_1._json)(data);
555
- const response = {
556
- $metadata: deserializeMetadata(output),
557
- ...contents,
558
- };
559
- return response;
560
- };
561
- exports.de_DeleteSystemTemplateCommand = de_DeleteSystemTemplateCommand;
562
- const de_DeleteSystemTemplateCommandError = async (output, context) => {
563
- const parsedOutput = {
564
- ...output,
565
- body: await parseErrorBody(output.body, context),
566
- };
567
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
568
- switch (errorCode) {
569
- case "InternalFailureException":
570
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
571
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
572
- case "InvalidRequestException":
573
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
574
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
575
- case "ResourceInUseException":
576
- case "com.amazonaws.iotthingsgraph#ResourceInUseException":
577
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
578
- case "ThrottlingException":
579
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
580
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
581
- default:
582
- const parsedBody = parsedOutput.body;
583
- return throwDefaultError({
584
- output,
585
- parsedBody,
586
- errorCode,
587
- });
588
- }
589
- };
590
- const de_DeploySystemInstanceCommand = async (output, context) => {
591
- if (output.statusCode >= 300) {
592
- return de_DeploySystemInstanceCommandError(output, context);
593
- }
594
- const data = await parseBody(output.body, context);
595
- let contents = {};
596
- contents = de_DeploySystemInstanceResponse(data, context);
597
- const response = {
598
- $metadata: deserializeMetadata(output),
599
- ...contents,
600
- };
601
- return response;
602
- };
603
- exports.de_DeploySystemInstanceCommand = de_DeploySystemInstanceCommand;
604
- const de_DeploySystemInstanceCommandError = async (output, context) => {
605
- const parsedOutput = {
606
- ...output,
607
- body: await parseErrorBody(output.body, context),
608
- };
609
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
610
- switch (errorCode) {
611
- case "InternalFailureException":
612
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
613
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
614
- case "InvalidRequestException":
615
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
616
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
617
- case "ResourceInUseException":
618
- case "com.amazonaws.iotthingsgraph#ResourceInUseException":
619
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
620
- case "ResourceNotFoundException":
621
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
622
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
623
- case "ThrottlingException":
624
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
625
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
626
- default:
627
- const parsedBody = parsedOutput.body;
628
- return throwDefaultError({
629
- output,
630
- parsedBody,
631
- errorCode,
632
- });
633
- }
634
- };
635
- const de_DeprecateFlowTemplateCommand = async (output, context) => {
636
- if (output.statusCode >= 300) {
637
- return de_DeprecateFlowTemplateCommandError(output, context);
638
- }
639
- const data = await parseBody(output.body, context);
640
- let contents = {};
641
- contents = (0, smithy_client_1._json)(data);
642
- const response = {
643
- $metadata: deserializeMetadata(output),
644
- ...contents,
645
- };
646
- return response;
647
- };
648
- exports.de_DeprecateFlowTemplateCommand = de_DeprecateFlowTemplateCommand;
649
- const de_DeprecateFlowTemplateCommandError = async (output, context) => {
650
- const parsedOutput = {
651
- ...output,
652
- body: await parseErrorBody(output.body, context),
653
- };
654
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
655
- switch (errorCode) {
656
- case "InternalFailureException":
657
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
658
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
659
- case "InvalidRequestException":
660
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
661
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
662
- case "ResourceNotFoundException":
663
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
664
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
665
- case "ThrottlingException":
666
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
667
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
668
- default:
669
- const parsedBody = parsedOutput.body;
670
- return throwDefaultError({
671
- output,
672
- parsedBody,
673
- errorCode,
674
- });
675
- }
676
- };
677
- const de_DeprecateSystemTemplateCommand = async (output, context) => {
678
- if (output.statusCode >= 300) {
679
- return de_DeprecateSystemTemplateCommandError(output, context);
680
- }
681
- const data = await parseBody(output.body, context);
682
- let contents = {};
683
- contents = (0, smithy_client_1._json)(data);
684
- const response = {
685
- $metadata: deserializeMetadata(output),
686
- ...contents,
687
- };
688
- return response;
689
- };
690
- exports.de_DeprecateSystemTemplateCommand = de_DeprecateSystemTemplateCommand;
691
- const de_DeprecateSystemTemplateCommandError = async (output, context) => {
692
- const parsedOutput = {
693
- ...output,
694
- body: await parseErrorBody(output.body, context),
695
- };
696
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
697
- switch (errorCode) {
698
- case "InternalFailureException":
699
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
700
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
701
- case "InvalidRequestException":
702
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
703
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
704
- case "ResourceNotFoundException":
705
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
706
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
707
- case "ThrottlingException":
708
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
709
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
710
- default:
711
- const parsedBody = parsedOutput.body;
712
- return throwDefaultError({
713
- output,
714
- parsedBody,
715
- errorCode,
716
- });
717
- }
718
- };
719
- const de_DescribeNamespaceCommand = async (output, context) => {
720
- if (output.statusCode >= 300) {
721
- return de_DescribeNamespaceCommandError(output, context);
722
- }
723
- const data = await parseBody(output.body, context);
724
- let contents = {};
725
- contents = (0, smithy_client_1._json)(data);
726
- const response = {
727
- $metadata: deserializeMetadata(output),
728
- ...contents,
729
- };
730
- return response;
731
- };
732
- exports.de_DescribeNamespaceCommand = de_DescribeNamespaceCommand;
733
- const de_DescribeNamespaceCommandError = async (output, context) => {
734
- const parsedOutput = {
735
- ...output,
736
- body: await parseErrorBody(output.body, context),
737
- };
738
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
739
- switch (errorCode) {
740
- case "InternalFailureException":
741
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
742
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
743
- case "InvalidRequestException":
744
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
745
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
746
- case "ResourceNotFoundException":
747
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
748
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
749
- case "ThrottlingException":
750
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
751
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
752
- default:
753
- const parsedBody = parsedOutput.body;
754
- return throwDefaultError({
755
- output,
756
- parsedBody,
757
- errorCode,
758
- });
759
- }
760
- };
761
- const de_DissociateEntityFromThingCommand = async (output, context) => {
762
- if (output.statusCode >= 300) {
763
- return de_DissociateEntityFromThingCommandError(output, context);
764
- }
765
- const data = await parseBody(output.body, context);
766
- let contents = {};
767
- contents = (0, smithy_client_1._json)(data);
768
- const response = {
769
- $metadata: deserializeMetadata(output),
770
- ...contents,
771
- };
772
- return response;
773
- };
774
- exports.de_DissociateEntityFromThingCommand = de_DissociateEntityFromThingCommand;
775
- const de_DissociateEntityFromThingCommandError = async (output, context) => {
776
- const parsedOutput = {
777
- ...output,
778
- body: await parseErrorBody(output.body, context),
779
- };
780
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
781
- switch (errorCode) {
782
- case "InternalFailureException":
783
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
784
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
785
- case "InvalidRequestException":
786
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
787
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
788
- case "ResourceNotFoundException":
789
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
790
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
791
- case "ThrottlingException":
792
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
793
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
794
- default:
795
- const parsedBody = parsedOutput.body;
796
- return throwDefaultError({
797
- output,
798
- parsedBody,
799
- errorCode,
800
- });
801
- }
802
- };
803
- const de_GetEntitiesCommand = async (output, context) => {
804
- if (output.statusCode >= 300) {
805
- return de_GetEntitiesCommandError(output, context);
806
- }
807
- const data = await parseBody(output.body, context);
808
- let contents = {};
809
- contents = de_GetEntitiesResponse(data, context);
810
- const response = {
811
- $metadata: deserializeMetadata(output),
812
- ...contents,
813
- };
814
- return response;
815
- };
816
- exports.de_GetEntitiesCommand = de_GetEntitiesCommand;
817
- const de_GetEntitiesCommandError = async (output, context) => {
818
- const parsedOutput = {
819
- ...output,
820
- body: await parseErrorBody(output.body, context),
821
- };
822
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
823
- switch (errorCode) {
824
- case "InternalFailureException":
825
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
826
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
827
- case "InvalidRequestException":
828
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
829
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
830
- case "ResourceNotFoundException":
831
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
832
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
833
- case "ThrottlingException":
834
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
835
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
836
- default:
837
- const parsedBody = parsedOutput.body;
838
- return throwDefaultError({
839
- output,
840
- parsedBody,
841
- errorCode,
842
- });
843
- }
844
- };
845
- const de_GetFlowTemplateCommand = async (output, context) => {
846
- if (output.statusCode >= 300) {
847
- return de_GetFlowTemplateCommandError(output, context);
848
- }
849
- const data = await parseBody(output.body, context);
850
- let contents = {};
851
- contents = de_GetFlowTemplateResponse(data, context);
852
- const response = {
853
- $metadata: deserializeMetadata(output),
854
- ...contents,
855
- };
856
- return response;
857
- };
858
- exports.de_GetFlowTemplateCommand = de_GetFlowTemplateCommand;
859
- const de_GetFlowTemplateCommandError = async (output, context) => {
860
- const parsedOutput = {
861
- ...output,
862
- body: await parseErrorBody(output.body, context),
863
- };
864
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
865
- switch (errorCode) {
866
- case "InternalFailureException":
867
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
868
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
869
- case "InvalidRequestException":
870
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
871
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
872
- case "ResourceNotFoundException":
873
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
874
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
875
- case "ThrottlingException":
876
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
877
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
878
- default:
879
- const parsedBody = parsedOutput.body;
880
- return throwDefaultError({
881
- output,
882
- parsedBody,
883
- errorCode,
884
- });
885
- }
886
- };
887
- const de_GetFlowTemplateRevisionsCommand = async (output, context) => {
888
- if (output.statusCode >= 300) {
889
- return de_GetFlowTemplateRevisionsCommandError(output, context);
890
- }
891
- const data = await parseBody(output.body, context);
892
- let contents = {};
893
- contents = de_GetFlowTemplateRevisionsResponse(data, context);
894
- const response = {
895
- $metadata: deserializeMetadata(output),
896
- ...contents,
897
- };
898
- return response;
899
- };
900
- exports.de_GetFlowTemplateRevisionsCommand = de_GetFlowTemplateRevisionsCommand;
901
- const de_GetFlowTemplateRevisionsCommandError = async (output, context) => {
902
- const parsedOutput = {
903
- ...output,
904
- body: await parseErrorBody(output.body, context),
905
- };
906
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
907
- switch (errorCode) {
908
- case "InternalFailureException":
909
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
910
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
911
- case "InvalidRequestException":
912
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
913
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
914
- case "ResourceNotFoundException":
915
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
916
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
917
- case "ThrottlingException":
918
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
919
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
920
- default:
921
- const parsedBody = parsedOutput.body;
922
- return throwDefaultError({
923
- output,
924
- parsedBody,
925
- errorCode,
926
- });
927
- }
928
- };
929
- const de_GetNamespaceDeletionStatusCommand = async (output, context) => {
930
- if (output.statusCode >= 300) {
931
- return de_GetNamespaceDeletionStatusCommandError(output, context);
932
- }
933
- const data = await parseBody(output.body, context);
934
- let contents = {};
935
- contents = (0, smithy_client_1._json)(data);
936
- const response = {
937
- $metadata: deserializeMetadata(output),
938
- ...contents,
939
- };
940
- return response;
941
- };
942
- exports.de_GetNamespaceDeletionStatusCommand = de_GetNamespaceDeletionStatusCommand;
943
- const de_GetNamespaceDeletionStatusCommandError = async (output, context) => {
944
- const parsedOutput = {
945
- ...output,
946
- body: await parseErrorBody(output.body, context),
947
- };
948
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
949
- switch (errorCode) {
950
- case "InternalFailureException":
951
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
952
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
953
- case "InvalidRequestException":
954
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
955
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
956
- case "ThrottlingException":
957
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
958
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
959
- default:
960
- const parsedBody = parsedOutput.body;
961
- return throwDefaultError({
962
- output,
963
- parsedBody,
964
- errorCode,
965
- });
966
- }
967
- };
968
- const de_GetSystemInstanceCommand = async (output, context) => {
969
- if (output.statusCode >= 300) {
970
- return de_GetSystemInstanceCommandError(output, context);
971
- }
972
- const data = await parseBody(output.body, context);
973
- let contents = {};
974
- contents = de_GetSystemInstanceResponse(data, context);
975
- const response = {
976
- $metadata: deserializeMetadata(output),
977
- ...contents,
978
- };
979
- return response;
980
- };
981
- exports.de_GetSystemInstanceCommand = de_GetSystemInstanceCommand;
982
- const de_GetSystemInstanceCommandError = async (output, context) => {
983
- const parsedOutput = {
984
- ...output,
985
- body: await parseErrorBody(output.body, context),
986
- };
987
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
988
- switch (errorCode) {
989
- case "InternalFailureException":
990
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
991
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
992
- case "InvalidRequestException":
993
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
994
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
995
- case "ResourceNotFoundException":
996
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
997
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
998
- case "ThrottlingException":
999
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1000
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1001
- default:
1002
- const parsedBody = parsedOutput.body;
1003
- return throwDefaultError({
1004
- output,
1005
- parsedBody,
1006
- errorCode,
1007
- });
1008
- }
1009
- };
1010
- const de_GetSystemTemplateCommand = async (output, context) => {
1011
- if (output.statusCode >= 300) {
1012
- return de_GetSystemTemplateCommandError(output, context);
1013
- }
1014
- const data = await parseBody(output.body, context);
1015
- let contents = {};
1016
- contents = de_GetSystemTemplateResponse(data, context);
1017
- const response = {
1018
- $metadata: deserializeMetadata(output),
1019
- ...contents,
1020
- };
1021
- return response;
1022
- };
1023
- exports.de_GetSystemTemplateCommand = de_GetSystemTemplateCommand;
1024
- const de_GetSystemTemplateCommandError = async (output, context) => {
1025
- const parsedOutput = {
1026
- ...output,
1027
- body: await parseErrorBody(output.body, context),
1028
- };
1029
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1030
- switch (errorCode) {
1031
- case "InternalFailureException":
1032
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1033
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1034
- case "InvalidRequestException":
1035
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1036
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1037
- case "ResourceNotFoundException":
1038
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
1039
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1040
- case "ThrottlingException":
1041
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1042
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1043
- default:
1044
- const parsedBody = parsedOutput.body;
1045
- return throwDefaultError({
1046
- output,
1047
- parsedBody,
1048
- errorCode,
1049
- });
1050
- }
1051
- };
1052
- const de_GetSystemTemplateRevisionsCommand = async (output, context) => {
1053
- if (output.statusCode >= 300) {
1054
- return de_GetSystemTemplateRevisionsCommandError(output, context);
1055
- }
1056
- const data = await parseBody(output.body, context);
1057
- let contents = {};
1058
- contents = de_GetSystemTemplateRevisionsResponse(data, context);
1059
- const response = {
1060
- $metadata: deserializeMetadata(output),
1061
- ...contents,
1062
- };
1063
- return response;
1064
- };
1065
- exports.de_GetSystemTemplateRevisionsCommand = de_GetSystemTemplateRevisionsCommand;
1066
- const de_GetSystemTemplateRevisionsCommandError = async (output, context) => {
1067
- const parsedOutput = {
1068
- ...output,
1069
- body: await parseErrorBody(output.body, context),
1070
- };
1071
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1072
- switch (errorCode) {
1073
- case "InternalFailureException":
1074
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1075
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1076
- case "InvalidRequestException":
1077
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1078
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1079
- case "ResourceNotFoundException":
1080
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
1081
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1082
- case "ThrottlingException":
1083
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1084
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1085
- default:
1086
- const parsedBody = parsedOutput.body;
1087
- return throwDefaultError({
1088
- output,
1089
- parsedBody,
1090
- errorCode,
1091
- });
1092
- }
1093
- };
1094
- const de_GetUploadStatusCommand = async (output, context) => {
1095
- if (output.statusCode >= 300) {
1096
- return de_GetUploadStatusCommandError(output, context);
1097
- }
1098
- const data = await parseBody(output.body, context);
1099
- let contents = {};
1100
- contents = de_GetUploadStatusResponse(data, context);
1101
- const response = {
1102
- $metadata: deserializeMetadata(output),
1103
- ...contents,
1104
- };
1105
- return response;
1106
- };
1107
- exports.de_GetUploadStatusCommand = de_GetUploadStatusCommand;
1108
- const de_GetUploadStatusCommandError = async (output, context) => {
1109
- const parsedOutput = {
1110
- ...output,
1111
- body: await parseErrorBody(output.body, context),
1112
- };
1113
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1114
- switch (errorCode) {
1115
- case "InternalFailureException":
1116
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1117
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1118
- case "InvalidRequestException":
1119
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1120
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1121
- case "ResourceNotFoundException":
1122
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
1123
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1124
- case "ThrottlingException":
1125
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1126
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1127
- default:
1128
- const parsedBody = parsedOutput.body;
1129
- return throwDefaultError({
1130
- output,
1131
- parsedBody,
1132
- errorCode,
1133
- });
1134
- }
1135
- };
1136
- const de_ListFlowExecutionMessagesCommand = async (output, context) => {
1137
- if (output.statusCode >= 300) {
1138
- return de_ListFlowExecutionMessagesCommandError(output, context);
1139
- }
1140
- const data = await parseBody(output.body, context);
1141
- let contents = {};
1142
- contents = de_ListFlowExecutionMessagesResponse(data, context);
1143
- const response = {
1144
- $metadata: deserializeMetadata(output),
1145
- ...contents,
1146
- };
1147
- return response;
1148
- };
1149
- exports.de_ListFlowExecutionMessagesCommand = de_ListFlowExecutionMessagesCommand;
1150
- const de_ListFlowExecutionMessagesCommandError = async (output, context) => {
1151
- const parsedOutput = {
1152
- ...output,
1153
- body: await parseErrorBody(output.body, context),
1154
- };
1155
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1156
- switch (errorCode) {
1157
- case "InternalFailureException":
1158
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1159
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1160
- case "InvalidRequestException":
1161
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1162
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1163
- case "ResourceNotFoundException":
1164
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
1165
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1166
- case "ThrottlingException":
1167
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1168
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1169
- default:
1170
- const parsedBody = parsedOutput.body;
1171
- return throwDefaultError({
1172
- output,
1173
- parsedBody,
1174
- errorCode,
1175
- });
1176
- }
1177
- };
1178
- const de_ListTagsForResourceCommand = async (output, context) => {
1179
- if (output.statusCode >= 300) {
1180
- return de_ListTagsForResourceCommandError(output, context);
1181
- }
1182
- const data = await parseBody(output.body, context);
1183
- let contents = {};
1184
- contents = (0, smithy_client_1._json)(data);
1185
- const response = {
1186
- $metadata: deserializeMetadata(output),
1187
- ...contents,
1188
- };
1189
- return response;
1190
- };
1191
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
1192
- const de_ListTagsForResourceCommandError = async (output, context) => {
1193
- const parsedOutput = {
1194
- ...output,
1195
- body: await parseErrorBody(output.body, context),
1196
- };
1197
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1198
- switch (errorCode) {
1199
- case "InternalFailureException":
1200
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1201
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1202
- case "InvalidRequestException":
1203
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1204
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1205
- case "ResourceAlreadyExistsException":
1206
- case "com.amazonaws.iotthingsgraph#ResourceAlreadyExistsException":
1207
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
1208
- case "ThrottlingException":
1209
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1210
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1211
- default:
1212
- const parsedBody = parsedOutput.body;
1213
- return throwDefaultError({
1214
- output,
1215
- parsedBody,
1216
- errorCode,
1217
- });
1218
- }
1219
- };
1220
- const de_SearchEntitiesCommand = async (output, context) => {
1221
- if (output.statusCode >= 300) {
1222
- return de_SearchEntitiesCommandError(output, context);
1223
- }
1224
- const data = await parseBody(output.body, context);
1225
- let contents = {};
1226
- contents = de_SearchEntitiesResponse(data, context);
1227
- const response = {
1228
- $metadata: deserializeMetadata(output),
1229
- ...contents,
1230
- };
1231
- return response;
1232
- };
1233
- exports.de_SearchEntitiesCommand = de_SearchEntitiesCommand;
1234
- const de_SearchEntitiesCommandError = async (output, context) => {
1235
- const parsedOutput = {
1236
- ...output,
1237
- body: await parseErrorBody(output.body, context),
1238
- };
1239
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1240
- switch (errorCode) {
1241
- case "InternalFailureException":
1242
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1243
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1244
- case "InvalidRequestException":
1245
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1246
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1247
- case "ThrottlingException":
1248
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1249
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1250
- default:
1251
- const parsedBody = parsedOutput.body;
1252
- return throwDefaultError({
1253
- output,
1254
- parsedBody,
1255
- errorCode,
1256
- });
1257
- }
1258
- };
1259
- const de_SearchFlowExecutionsCommand = async (output, context) => {
1260
- if (output.statusCode >= 300) {
1261
- return de_SearchFlowExecutionsCommandError(output, context);
1262
- }
1263
- const data = await parseBody(output.body, context);
1264
- let contents = {};
1265
- contents = de_SearchFlowExecutionsResponse(data, context);
1266
- const response = {
1267
- $metadata: deserializeMetadata(output),
1268
- ...contents,
1269
- };
1270
- return response;
1271
- };
1272
- exports.de_SearchFlowExecutionsCommand = de_SearchFlowExecutionsCommand;
1273
- const de_SearchFlowExecutionsCommandError = async (output, context) => {
1274
- const parsedOutput = {
1275
- ...output,
1276
- body: await parseErrorBody(output.body, context),
1277
- };
1278
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1279
- switch (errorCode) {
1280
- case "InternalFailureException":
1281
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1282
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1283
- case "InvalidRequestException":
1284
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1285
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1286
- case "ResourceNotFoundException":
1287
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
1288
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1289
- case "ThrottlingException":
1290
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1291
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1292
- default:
1293
- const parsedBody = parsedOutput.body;
1294
- return throwDefaultError({
1295
- output,
1296
- parsedBody,
1297
- errorCode,
1298
- });
1299
- }
1300
- };
1301
- const de_SearchFlowTemplatesCommand = async (output, context) => {
1302
- if (output.statusCode >= 300) {
1303
- return de_SearchFlowTemplatesCommandError(output, context);
1304
- }
1305
- const data = await parseBody(output.body, context);
1306
- let contents = {};
1307
- contents = de_SearchFlowTemplatesResponse(data, context);
1308
- const response = {
1309
- $metadata: deserializeMetadata(output),
1310
- ...contents,
1311
- };
1312
- return response;
1313
- };
1314
- exports.de_SearchFlowTemplatesCommand = de_SearchFlowTemplatesCommand;
1315
- const de_SearchFlowTemplatesCommandError = async (output, context) => {
1316
- const parsedOutput = {
1317
- ...output,
1318
- body: await parseErrorBody(output.body, context),
1319
- };
1320
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1321
- switch (errorCode) {
1322
- case "InternalFailureException":
1323
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1324
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1325
- case "InvalidRequestException":
1326
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1327
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1328
- case "ThrottlingException":
1329
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1330
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1331
- default:
1332
- const parsedBody = parsedOutput.body;
1333
- return throwDefaultError({
1334
- output,
1335
- parsedBody,
1336
- errorCode,
1337
- });
1338
- }
1339
- };
1340
- const de_SearchSystemInstancesCommand = async (output, context) => {
1341
- if (output.statusCode >= 300) {
1342
- return de_SearchSystemInstancesCommandError(output, context);
1343
- }
1344
- const data = await parseBody(output.body, context);
1345
- let contents = {};
1346
- contents = de_SearchSystemInstancesResponse(data, context);
1347
- const response = {
1348
- $metadata: deserializeMetadata(output),
1349
- ...contents,
1350
- };
1351
- return response;
1352
- };
1353
- exports.de_SearchSystemInstancesCommand = de_SearchSystemInstancesCommand;
1354
- const de_SearchSystemInstancesCommandError = async (output, context) => {
1355
- const parsedOutput = {
1356
- ...output,
1357
- body: await parseErrorBody(output.body, context),
1358
- };
1359
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1360
- switch (errorCode) {
1361
- case "InternalFailureException":
1362
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1363
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1364
- case "InvalidRequestException":
1365
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1366
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1367
- case "ThrottlingException":
1368
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1369
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1370
- default:
1371
- const parsedBody = parsedOutput.body;
1372
- return throwDefaultError({
1373
- output,
1374
- parsedBody,
1375
- errorCode,
1376
- });
1377
- }
1378
- };
1379
- const de_SearchSystemTemplatesCommand = async (output, context) => {
1380
- if (output.statusCode >= 300) {
1381
- return de_SearchSystemTemplatesCommandError(output, context);
1382
- }
1383
- const data = await parseBody(output.body, context);
1384
- let contents = {};
1385
- contents = de_SearchSystemTemplatesResponse(data, context);
1386
- const response = {
1387
- $metadata: deserializeMetadata(output),
1388
- ...contents,
1389
- };
1390
- return response;
1391
- };
1392
- exports.de_SearchSystemTemplatesCommand = de_SearchSystemTemplatesCommand;
1393
- const de_SearchSystemTemplatesCommandError = async (output, context) => {
1394
- const parsedOutput = {
1395
- ...output,
1396
- body: await parseErrorBody(output.body, context),
1397
- };
1398
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1399
- switch (errorCode) {
1400
- case "InternalFailureException":
1401
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1402
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1403
- case "InvalidRequestException":
1404
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1405
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1406
- case "ThrottlingException":
1407
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1408
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1409
- default:
1410
- const parsedBody = parsedOutput.body;
1411
- return throwDefaultError({
1412
- output,
1413
- parsedBody,
1414
- errorCode,
1415
- });
1416
- }
1417
- };
1418
- const de_SearchThingsCommand = async (output, context) => {
1419
- if (output.statusCode >= 300) {
1420
- return de_SearchThingsCommandError(output, context);
1421
- }
1422
- const data = await parseBody(output.body, context);
1423
- let contents = {};
1424
- contents = (0, smithy_client_1._json)(data);
1425
- const response = {
1426
- $metadata: deserializeMetadata(output),
1427
- ...contents,
1428
- };
1429
- return response;
1430
- };
1431
- exports.de_SearchThingsCommand = de_SearchThingsCommand;
1432
- const de_SearchThingsCommandError = async (output, context) => {
1433
- const parsedOutput = {
1434
- ...output,
1435
- body: await parseErrorBody(output.body, context),
1436
- };
1437
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1438
- switch (errorCode) {
1439
- case "InternalFailureException":
1440
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1441
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1442
- case "InvalidRequestException":
1443
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1444
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1445
- case "ResourceNotFoundException":
1446
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
1447
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1448
- case "ThrottlingException":
1449
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1450
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1451
- default:
1452
- const parsedBody = parsedOutput.body;
1453
- return throwDefaultError({
1454
- output,
1455
- parsedBody,
1456
- errorCode,
1457
- });
1458
- }
1459
- };
1460
- const de_TagResourceCommand = async (output, context) => {
1461
- if (output.statusCode >= 300) {
1462
- return de_TagResourceCommandError(output, context);
1463
- }
1464
- const data = await parseBody(output.body, context);
1465
- let contents = {};
1466
- contents = (0, smithy_client_1._json)(data);
1467
- const response = {
1468
- $metadata: deserializeMetadata(output),
1469
- ...contents,
1470
- };
1471
- return response;
1472
- };
1473
- exports.de_TagResourceCommand = de_TagResourceCommand;
1474
- const de_TagResourceCommandError = async (output, context) => {
1475
- const parsedOutput = {
1476
- ...output,
1477
- body: await parseErrorBody(output.body, context),
1478
- };
1479
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1480
- switch (errorCode) {
1481
- case "InternalFailureException":
1482
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1483
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1484
- case "InvalidRequestException":
1485
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1486
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1487
- case "ResourceAlreadyExistsException":
1488
- case "com.amazonaws.iotthingsgraph#ResourceAlreadyExistsException":
1489
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
1490
- case "ThrottlingException":
1491
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1492
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1493
- default:
1494
- const parsedBody = parsedOutput.body;
1495
- return throwDefaultError({
1496
- output,
1497
- parsedBody,
1498
- errorCode,
1499
- });
1500
- }
1501
- };
1502
- const de_UndeploySystemInstanceCommand = async (output, context) => {
1503
- if (output.statusCode >= 300) {
1504
- return de_UndeploySystemInstanceCommandError(output, context);
1505
- }
1506
- const data = await parseBody(output.body, context);
1507
- let contents = {};
1508
- contents = de_UndeploySystemInstanceResponse(data, context);
1509
- const response = {
1510
- $metadata: deserializeMetadata(output),
1511
- ...contents,
1512
- };
1513
- return response;
1514
- };
1515
- exports.de_UndeploySystemInstanceCommand = de_UndeploySystemInstanceCommand;
1516
- const de_UndeploySystemInstanceCommandError = async (output, context) => {
1517
- const parsedOutput = {
1518
- ...output,
1519
- body: await parseErrorBody(output.body, context),
1520
- };
1521
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1522
- switch (errorCode) {
1523
- case "InternalFailureException":
1524
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1525
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1526
- case "InvalidRequestException":
1527
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1528
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1529
- case "ResourceInUseException":
1530
- case "com.amazonaws.iotthingsgraph#ResourceInUseException":
1531
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1532
- case "ResourceNotFoundException":
1533
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
1534
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1535
- case "ThrottlingException":
1536
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1537
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1538
- default:
1539
- const parsedBody = parsedOutput.body;
1540
- return throwDefaultError({
1541
- output,
1542
- parsedBody,
1543
- errorCode,
1544
- });
1545
- }
1546
- };
1547
- const de_UntagResourceCommand = async (output, context) => {
1548
- if (output.statusCode >= 300) {
1549
- return de_UntagResourceCommandError(output, context);
1550
- }
1551
- const data = await parseBody(output.body, context);
1552
- let contents = {};
1553
- contents = (0, smithy_client_1._json)(data);
1554
- const response = {
1555
- $metadata: deserializeMetadata(output),
1556
- ...contents,
1557
- };
1558
- return response;
1559
- };
1560
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
1561
- const de_UntagResourceCommandError = async (output, context) => {
1562
- const parsedOutput = {
1563
- ...output,
1564
- body: await parseErrorBody(output.body, context),
1565
- };
1566
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1567
- switch (errorCode) {
1568
- case "InternalFailureException":
1569
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1570
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1571
- case "InvalidRequestException":
1572
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1573
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1574
- case "ResourceAlreadyExistsException":
1575
- case "com.amazonaws.iotthingsgraph#ResourceAlreadyExistsException":
1576
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
1577
- case "ThrottlingException":
1578
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1579
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1580
- default:
1581
- const parsedBody = parsedOutput.body;
1582
- return throwDefaultError({
1583
- output,
1584
- parsedBody,
1585
- errorCode,
1586
- });
1587
- }
1588
- };
1589
- const de_UpdateFlowTemplateCommand = async (output, context) => {
1590
- if (output.statusCode >= 300) {
1591
- return de_UpdateFlowTemplateCommandError(output, context);
1592
- }
1593
- const data = await parseBody(output.body, context);
1594
- let contents = {};
1595
- contents = de_UpdateFlowTemplateResponse(data, context);
1596
- const response = {
1597
- $metadata: deserializeMetadata(output),
1598
- ...contents,
1599
- };
1600
- return response;
1601
- };
1602
- exports.de_UpdateFlowTemplateCommand = de_UpdateFlowTemplateCommand;
1603
- const de_UpdateFlowTemplateCommandError = async (output, context) => {
1604
- const parsedOutput = {
1605
- ...output,
1606
- body: await parseErrorBody(output.body, context),
1607
- };
1608
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1609
- switch (errorCode) {
1610
- case "InternalFailureException":
1611
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1612
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1613
- case "InvalidRequestException":
1614
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1615
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1616
- case "ResourceNotFoundException":
1617
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
1618
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1619
- case "ThrottlingException":
1620
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1621
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1622
- default:
1623
- const parsedBody = parsedOutput.body;
1624
- return throwDefaultError({
1625
- output,
1626
- parsedBody,
1627
- errorCode,
1628
- });
1629
- }
1630
- };
1631
- const de_UpdateSystemTemplateCommand = async (output, context) => {
1632
- if (output.statusCode >= 300) {
1633
- return de_UpdateSystemTemplateCommandError(output, context);
1634
- }
1635
- const data = await parseBody(output.body, context);
1636
- let contents = {};
1637
- contents = de_UpdateSystemTemplateResponse(data, context);
1638
- const response = {
1639
- $metadata: deserializeMetadata(output),
1640
- ...contents,
1641
- };
1642
- return response;
1643
- };
1644
- exports.de_UpdateSystemTemplateCommand = de_UpdateSystemTemplateCommand;
1645
- const de_UpdateSystemTemplateCommandError = async (output, context) => {
1646
- const parsedOutput = {
1647
- ...output,
1648
- body: await parseErrorBody(output.body, context),
1649
- };
1650
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1651
- switch (errorCode) {
1652
- case "InternalFailureException":
1653
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1654
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1655
- case "InvalidRequestException":
1656
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1657
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1658
- case "ResourceNotFoundException":
1659
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
1660
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1661
- case "ThrottlingException":
1662
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1663
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1664
- default:
1665
- const parsedBody = parsedOutput.body;
1666
- return throwDefaultError({
1667
- output,
1668
- parsedBody,
1669
- errorCode,
1670
- });
1671
- }
1672
- };
1673
- const de_UploadEntityDefinitionsCommand = async (output, context) => {
1674
- if (output.statusCode >= 300) {
1675
- return de_UploadEntityDefinitionsCommandError(output, context);
1676
- }
1677
- const data = await parseBody(output.body, context);
1678
- let contents = {};
1679
- contents = (0, smithy_client_1._json)(data);
1680
- const response = {
1681
- $metadata: deserializeMetadata(output),
1682
- ...contents,
1683
- };
1684
- return response;
1685
- };
1686
- exports.de_UploadEntityDefinitionsCommand = de_UploadEntityDefinitionsCommand;
1687
- const de_UploadEntityDefinitionsCommandError = async (output, context) => {
1688
- const parsedOutput = {
1689
- ...output,
1690
- body: await parseErrorBody(output.body, context),
1691
- };
1692
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1693
- switch (errorCode) {
1694
- case "InternalFailureException":
1695
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1696
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1697
- case "InvalidRequestException":
1698
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1699
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1700
- case "ThrottlingException":
1701
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1702
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1703
- default:
1704
- const parsedBody = parsedOutput.body;
1705
- return throwDefaultError({
1706
- output,
1707
- parsedBody,
1708
- errorCode,
1709
- });
1710
- }
1711
- };
1712
- const de_InternalFailureExceptionRes = async (parsedOutput, context) => {
1713
- const body = parsedOutput.body;
1714
- const deserialized = (0, smithy_client_1._json)(body);
1715
- const exception = new models_0_1.InternalFailureException({
1716
- $metadata: deserializeMetadata(parsedOutput),
1717
- ...deserialized,
1718
- });
1719
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1720
- };
1721
- const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
1722
- const body = parsedOutput.body;
1723
- const deserialized = (0, smithy_client_1._json)(body);
1724
- const exception = new models_0_1.InvalidRequestException({
1725
- $metadata: deserializeMetadata(parsedOutput),
1726
- ...deserialized,
1727
- });
1728
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1729
- };
1730
- const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
1731
- const body = parsedOutput.body;
1732
- const deserialized = (0, smithy_client_1._json)(body);
1733
- const exception = new models_0_1.LimitExceededException({
1734
- $metadata: deserializeMetadata(parsedOutput),
1735
- ...deserialized,
1736
- });
1737
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1738
- };
1739
- const de_ResourceAlreadyExistsExceptionRes = async (parsedOutput, context) => {
1740
- const body = parsedOutput.body;
1741
- const deserialized = (0, smithy_client_1._json)(body);
1742
- const exception = new models_0_1.ResourceAlreadyExistsException({
1743
- $metadata: deserializeMetadata(parsedOutput),
1744
- ...deserialized,
1745
- });
1746
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1747
- };
1748
- const de_ResourceInUseExceptionRes = async (parsedOutput, context) => {
1749
- const body = parsedOutput.body;
1750
- const deserialized = (0, smithy_client_1._json)(body);
1751
- const exception = new models_0_1.ResourceInUseException({
1752
- $metadata: deserializeMetadata(parsedOutput),
1753
- ...deserialized,
1754
- });
1755
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1756
- };
1757
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1758
- const body = parsedOutput.body;
1759
- const deserialized = (0, smithy_client_1._json)(body);
1760
- const exception = new models_0_1.ResourceNotFoundException({
1761
- $metadata: deserializeMetadata(parsedOutput),
1762
- ...deserialized,
1763
- });
1764
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1765
- };
1766
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1767
- const body = parsedOutput.body;
1768
- const deserialized = (0, smithy_client_1._json)(body);
1769
- const exception = new models_0_1.ThrottlingException({
1770
- $metadata: deserializeMetadata(parsedOutput),
1771
- ...deserialized,
1772
- });
1773
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1774
- };
1775
- const se_SearchFlowExecutionsRequest = (input, context) => {
1776
- return (0, smithy_client_1.take)(input, {
1777
- endTime: (_) => Math.round(_.getTime() / 1000),
1778
- flowExecutionId: [],
1779
- maxResults: [],
1780
- nextToken: [],
1781
- startTime: (_) => Math.round(_.getTime() / 1000),
1782
- systemInstanceId: [],
1783
- });
1784
- };
1785
- const de_CreateFlowTemplateResponse = (output, context) => {
1786
- return (0, smithy_client_1.take)(output, {
1787
- summary: (_) => de_FlowTemplateSummary(_, context),
1788
- });
1789
- };
1790
- const de_CreateSystemInstanceResponse = (output, context) => {
1791
- return (0, smithy_client_1.take)(output, {
1792
- summary: (_) => de_SystemInstanceSummary(_, context),
1793
- });
1794
- };
1795
- const de_CreateSystemTemplateResponse = (output, context) => {
1796
- return (0, smithy_client_1.take)(output, {
1797
- summary: (_) => de_SystemTemplateSummary(_, context),
1798
- });
1799
- };
1800
- const de_DeploySystemInstanceResponse = (output, context) => {
1801
- return (0, smithy_client_1.take)(output, {
1802
- greengrassDeploymentId: smithy_client_1.expectString,
1803
- summary: (_) => de_SystemInstanceSummary(_, context),
1804
- });
1805
- };
1806
- const de_EntityDescription = (output, context) => {
1807
- return (0, smithy_client_1.take)(output, {
1808
- arn: smithy_client_1.expectString,
1809
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1810
- definition: smithy_client_1._json,
1811
- id: smithy_client_1.expectString,
1812
- type: smithy_client_1.expectString,
1813
- });
1814
- };
1815
- const de_EntityDescriptions = (output, context) => {
1816
- const retVal = (output || [])
1817
- .filter((e) => e != null)
1818
- .map((entry) => {
1819
- return de_EntityDescription(entry, context);
1820
- });
1821
- return retVal;
1822
- };
1823
- const de_FlowExecutionMessage = (output, context) => {
1824
- return (0, smithy_client_1.take)(output, {
1825
- eventType: smithy_client_1.expectString,
1826
- messageId: smithy_client_1.expectString,
1827
- payload: smithy_client_1.expectString,
1828
- timestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1829
- });
1830
- };
1831
- const de_FlowExecutionMessages = (output, context) => {
1832
- const retVal = (output || [])
1833
- .filter((e) => e != null)
1834
- .map((entry) => {
1835
- return de_FlowExecutionMessage(entry, context);
1836
- });
1837
- return retVal;
1838
- };
1839
- const de_FlowExecutionSummaries = (output, context) => {
1840
- const retVal = (output || [])
1841
- .filter((e) => e != null)
1842
- .map((entry) => {
1843
- return de_FlowExecutionSummary(entry, context);
1844
- });
1845
- return retVal;
1846
- };
1847
- const de_FlowExecutionSummary = (output, context) => {
1848
- return (0, smithy_client_1.take)(output, {
1849
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1850
- flowExecutionId: smithy_client_1.expectString,
1851
- flowTemplateId: smithy_client_1.expectString,
1852
- status: smithy_client_1.expectString,
1853
- systemInstanceId: smithy_client_1.expectString,
1854
- updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1855
- });
1856
- };
1857
- const de_FlowTemplateDescription = (output, context) => {
1858
- return (0, smithy_client_1.take)(output, {
1859
- definition: smithy_client_1._json,
1860
- summary: (_) => de_FlowTemplateSummary(_, context),
1861
- validatedNamespaceVersion: smithy_client_1.expectLong,
1862
- });
1863
- };
1864
- const de_FlowTemplateSummaries = (output, context) => {
1865
- const retVal = (output || [])
1866
- .filter((e) => e != null)
1867
- .map((entry) => {
1868
- return de_FlowTemplateSummary(entry, context);
1869
- });
1870
- return retVal;
1871
- };
1872
- const de_FlowTemplateSummary = (output, context) => {
1873
- return (0, smithy_client_1.take)(output, {
1874
- arn: smithy_client_1.expectString,
1875
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1876
- id: smithy_client_1.expectString,
1877
- revisionNumber: smithy_client_1.expectLong,
1878
- });
1879
- };
1880
- const de_GetEntitiesResponse = (output, context) => {
1881
- return (0, smithy_client_1.take)(output, {
1882
- descriptions: (_) => de_EntityDescriptions(_, context),
1883
- });
1884
- };
1885
- const de_GetFlowTemplateResponse = (output, context) => {
1886
- return (0, smithy_client_1.take)(output, {
1887
- description: (_) => de_FlowTemplateDescription(_, context),
1888
- });
1889
- };
1890
- const de_GetFlowTemplateRevisionsResponse = (output, context) => {
1891
- return (0, smithy_client_1.take)(output, {
1892
- nextToken: smithy_client_1.expectString,
1893
- summaries: (_) => de_FlowTemplateSummaries(_, context),
1894
- });
1895
- };
1896
- const de_GetSystemInstanceResponse = (output, context) => {
1897
- return (0, smithy_client_1.take)(output, {
1898
- description: (_) => de_SystemInstanceDescription(_, context),
1899
- });
1900
- };
1901
- const de_GetSystemTemplateResponse = (output, context) => {
1902
- return (0, smithy_client_1.take)(output, {
1903
- description: (_) => de_SystemTemplateDescription(_, context),
1904
- });
1905
- };
1906
- const de_GetSystemTemplateRevisionsResponse = (output, context) => {
1907
- return (0, smithy_client_1.take)(output, {
1908
- nextToken: smithy_client_1.expectString,
1909
- summaries: (_) => de_SystemTemplateSummaries(_, context),
1910
- });
1911
- };
1912
- const de_GetUploadStatusResponse = (output, context) => {
1913
- return (0, smithy_client_1.take)(output, {
1914
- createdDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1915
- failureReason: smithy_client_1._json,
1916
- namespaceArn: smithy_client_1.expectString,
1917
- namespaceName: smithy_client_1.expectString,
1918
- namespaceVersion: smithy_client_1.expectLong,
1919
- uploadId: smithy_client_1.expectString,
1920
- uploadStatus: smithy_client_1.expectString,
1921
- });
1922
- };
1923
- const de_ListFlowExecutionMessagesResponse = (output, context) => {
1924
- return (0, smithy_client_1.take)(output, {
1925
- messages: (_) => de_FlowExecutionMessages(_, context),
1926
- nextToken: smithy_client_1.expectString,
1927
- });
1928
- };
1929
- const de_SearchEntitiesResponse = (output, context) => {
1930
- return (0, smithy_client_1.take)(output, {
1931
- descriptions: (_) => de_EntityDescriptions(_, context),
1932
- nextToken: smithy_client_1.expectString,
1933
- });
1934
- };
1935
- const de_SearchFlowExecutionsResponse = (output, context) => {
1936
- return (0, smithy_client_1.take)(output, {
1937
- nextToken: smithy_client_1.expectString,
1938
- summaries: (_) => de_FlowExecutionSummaries(_, context),
1939
- });
1940
- };
1941
- const de_SearchFlowTemplatesResponse = (output, context) => {
1942
- return (0, smithy_client_1.take)(output, {
1943
- nextToken: smithy_client_1.expectString,
1944
- summaries: (_) => de_FlowTemplateSummaries(_, context),
1945
- });
1946
- };
1947
- const de_SearchSystemInstancesResponse = (output, context) => {
1948
- return (0, smithy_client_1.take)(output, {
1949
- nextToken: smithy_client_1.expectString,
1950
- summaries: (_) => de_SystemInstanceSummaries(_, context),
1951
- });
1952
- };
1953
- const de_SearchSystemTemplatesResponse = (output, context) => {
1954
- return (0, smithy_client_1.take)(output, {
1955
- nextToken: smithy_client_1.expectString,
1956
- summaries: (_) => de_SystemTemplateSummaries(_, context),
1957
- });
1958
- };
1959
- const de_SystemInstanceDescription = (output, context) => {
1960
- return (0, smithy_client_1.take)(output, {
1961
- definition: smithy_client_1._json,
1962
- flowActionsRoleArn: smithy_client_1.expectString,
1963
- metricsConfiguration: smithy_client_1._json,
1964
- s3BucketName: smithy_client_1.expectString,
1965
- summary: (_) => de_SystemInstanceSummary(_, context),
1966
- validatedDependencyRevisions: smithy_client_1._json,
1967
- validatedNamespaceVersion: smithy_client_1.expectLong,
1968
- });
1969
- };
1970
- const de_SystemInstanceSummaries = (output, context) => {
1971
- const retVal = (output || [])
1972
- .filter((e) => e != null)
1973
- .map((entry) => {
1974
- return de_SystemInstanceSummary(entry, context);
1975
- });
1976
- return retVal;
1977
- };
1978
- const de_SystemInstanceSummary = (output, context) => {
1979
- return (0, smithy_client_1.take)(output, {
1980
- arn: smithy_client_1.expectString,
1981
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1982
- greengrassGroupId: smithy_client_1.expectString,
1983
- greengrassGroupName: smithy_client_1.expectString,
1984
- greengrassGroupVersionId: smithy_client_1.expectString,
1985
- id: smithy_client_1.expectString,
1986
- status: smithy_client_1.expectString,
1987
- target: smithy_client_1.expectString,
1988
- updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1989
- });
1990
- };
1991
- const de_SystemTemplateDescription = (output, context) => {
1992
- return (0, smithy_client_1.take)(output, {
1993
- definition: smithy_client_1._json,
1994
- summary: (_) => de_SystemTemplateSummary(_, context),
1995
- validatedNamespaceVersion: smithy_client_1.expectLong,
1996
- });
1997
- };
1998
- const de_SystemTemplateSummaries = (output, context) => {
1999
- const retVal = (output || [])
2000
- .filter((e) => e != null)
2001
- .map((entry) => {
2002
- return de_SystemTemplateSummary(entry, context);
2003
- });
2004
- return retVal;
2005
- };
2006
- const de_SystemTemplateSummary = (output, context) => {
2007
- return (0, smithy_client_1.take)(output, {
2008
- arn: smithy_client_1.expectString,
2009
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2010
- id: smithy_client_1.expectString,
2011
- revisionNumber: smithy_client_1.expectLong,
2012
- });
2013
- };
2014
- const de_UndeploySystemInstanceResponse = (output, context) => {
2015
- return (0, smithy_client_1.take)(output, {
2016
- summary: (_) => de_SystemInstanceSummary(_, context),
2017
- });
2018
- };
2019
- const de_UpdateFlowTemplateResponse = (output, context) => {
2020
- return (0, smithy_client_1.take)(output, {
2021
- summary: (_) => de_FlowTemplateSummary(_, context),
2022
- });
2023
- };
2024
- const de_UpdateSystemTemplateResponse = (output, context) => {
2025
- return (0, smithy_client_1.take)(output, {
2026
- summary: (_) => de_SystemTemplateSummary(_, context),
2027
- });
2028
- };
2029
- const deserializeMetadata = (output) => ({
2030
- httpStatusCode: output.statusCode,
2031
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
2032
- extendedRequestId: output.headers["x-amz-id-2"],
2033
- cfId: output.headers["x-amz-cf-id"],
2034
- });
2035
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
2036
- const throwDefaultError = (0, smithy_client_1.withBaseException)(IoTThingsGraphServiceException_1.IoTThingsGraphServiceException);
2037
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2038
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2039
- const contents = {
2040
- protocol,
2041
- hostname,
2042
- port,
2043
- method: "POST",
2044
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2045
- headers,
2046
- };
2047
- if (resolvedHostname !== undefined) {
2048
- contents.hostname = resolvedHostname;
2049
- }
2050
- if (body !== undefined) {
2051
- contents.body = body;
2052
- }
2053
- return new protocol_http_1.HttpRequest(contents);
2054
- };
2055
- function sharedHeaders(operation) {
2056
- return {
2057
- "content-type": "application/x-amz-json-1.1",
2058
- "x-amz-target": `IotThingsGraphFrontEndService.${operation}`,
2059
- };
2060
- }
2061
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2062
- if (encoded.length) {
2063
- return JSON.parse(encoded);
2064
- }
2065
- return {};
2066
- });
2067
- const parseErrorBody = async (errorBody, context) => {
2068
- const value = await parseBody(errorBody, context);
2069
- value.message = value.message ?? value.Message;
2070
- return value;
2071
- };
2072
- const loadRestJsonErrorCode = (output, data) => {
2073
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2074
- const sanitizeErrorCode = (rawValue) => {
2075
- let cleanValue = rawValue;
2076
- if (typeof cleanValue === "number") {
2077
- cleanValue = cleanValue.toString();
2078
- }
2079
- if (cleanValue.indexOf(",") >= 0) {
2080
- cleanValue = cleanValue.split(",")[0];
2081
- }
2082
- if (cleanValue.indexOf(":") >= 0) {
2083
- cleanValue = cleanValue.split(":")[0];
2084
- }
2085
- if (cleanValue.indexOf("#") >= 0) {
2086
- cleanValue = cleanValue.split("#")[1];
2087
- }
2088
- return cleanValue;
2089
- };
2090
- const headerKey = findKey(output.headers, "x-amzn-errortype");
2091
- if (headerKey !== undefined) {
2092
- return sanitizeErrorCode(output.headers[headerKey]);
2093
- }
2094
- if (data.code !== undefined) {
2095
- return sanitizeErrorCode(data.code);
2096
- }
2097
- if (data["__type"] !== undefined) {
2098
- return sanitizeErrorCode(data["__type"]);
2099
- }
2100
- };
1
+ module.exports = require("../index.js");