@aws-sdk/client-iottwinmaker 3.490.0 → 3.496.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 (66) hide show
  1. package/dist-cjs/IoTTwinMaker.js +1 -91
  2. package/dist-cjs/IoTTwinMakerClient.js +1 -43
  3. package/dist-cjs/commands/BatchPutPropertyValuesCommand.js +1 -28
  4. package/dist-cjs/commands/CancelMetadataTransferJobCommand.js +1 -28
  5. package/dist-cjs/commands/CreateComponentTypeCommand.js +1 -28
  6. package/dist-cjs/commands/CreateEntityCommand.js +1 -28
  7. package/dist-cjs/commands/CreateMetadataTransferJobCommand.js +1 -28
  8. package/dist-cjs/commands/CreateSceneCommand.js +1 -28
  9. package/dist-cjs/commands/CreateSyncJobCommand.js +1 -28
  10. package/dist-cjs/commands/CreateWorkspaceCommand.js +1 -28
  11. package/dist-cjs/commands/DeleteComponentTypeCommand.js +1 -28
  12. package/dist-cjs/commands/DeleteEntityCommand.js +1 -28
  13. package/dist-cjs/commands/DeleteSceneCommand.js +1 -28
  14. package/dist-cjs/commands/DeleteSyncJobCommand.js +1 -28
  15. package/dist-cjs/commands/DeleteWorkspaceCommand.js +1 -28
  16. package/dist-cjs/commands/ExecuteQueryCommand.js +1 -28
  17. package/dist-cjs/commands/GetComponentTypeCommand.js +1 -28
  18. package/dist-cjs/commands/GetEntityCommand.js +1 -28
  19. package/dist-cjs/commands/GetMetadataTransferJobCommand.js +1 -28
  20. package/dist-cjs/commands/GetPricingPlanCommand.js +1 -28
  21. package/dist-cjs/commands/GetPropertyValueCommand.js +1 -28
  22. package/dist-cjs/commands/GetPropertyValueHistoryCommand.js +1 -28
  23. package/dist-cjs/commands/GetSceneCommand.js +1 -28
  24. package/dist-cjs/commands/GetSyncJobCommand.js +1 -28
  25. package/dist-cjs/commands/GetWorkspaceCommand.js +1 -28
  26. package/dist-cjs/commands/ListComponentTypesCommand.js +1 -28
  27. package/dist-cjs/commands/ListComponentsCommand.js +1 -28
  28. package/dist-cjs/commands/ListEntitiesCommand.js +1 -28
  29. package/dist-cjs/commands/ListMetadataTransferJobsCommand.js +1 -28
  30. package/dist-cjs/commands/ListPropertiesCommand.js +1 -28
  31. package/dist-cjs/commands/ListScenesCommand.js +1 -28
  32. package/dist-cjs/commands/ListSyncJobsCommand.js +1 -28
  33. package/dist-cjs/commands/ListSyncResourcesCommand.js +1 -28
  34. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
  35. package/dist-cjs/commands/ListWorkspacesCommand.js +1 -28
  36. package/dist-cjs/commands/TagResourceCommand.js +1 -28
  37. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  38. package/dist-cjs/commands/UpdateComponentTypeCommand.js +1 -28
  39. package/dist-cjs/commands/UpdateEntityCommand.js +1 -28
  40. package/dist-cjs/commands/UpdatePricingPlanCommand.js +1 -28
  41. package/dist-cjs/commands/UpdateSceneCommand.js +1 -28
  42. package/dist-cjs/commands/UpdateWorkspaceCommand.js +1 -28
  43. package/dist-cjs/commands/index.js +1 -43
  44. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  45. package/dist-cjs/extensionConfiguration.js +1 -2
  46. package/dist-cjs/index.js +5104 -11
  47. package/dist-cjs/models/IoTTwinMakerServiceException.js +1 -12
  48. package/dist-cjs/models/index.js +1 -4
  49. package/dist-cjs/models/models_0.js +1 -343
  50. package/dist-cjs/pagination/ExecuteQueryPaginator.js +1 -7
  51. package/dist-cjs/pagination/GetPropertyValueHistoryPaginator.js +1 -7
  52. package/dist-cjs/pagination/GetPropertyValuePaginator.js +1 -7
  53. package/dist-cjs/pagination/Interfaces.js +1 -2
  54. package/dist-cjs/pagination/ListComponentTypesPaginator.js +1 -7
  55. package/dist-cjs/pagination/ListComponentsPaginator.js +1 -7
  56. package/dist-cjs/pagination/ListEntitiesPaginator.js +1 -7
  57. package/dist-cjs/pagination/ListMetadataTransferJobsPaginator.js +1 -7
  58. package/dist-cjs/pagination/ListPropertiesPaginator.js +1 -7
  59. package/dist-cjs/pagination/ListScenesPaginator.js +1 -7
  60. package/dist-cjs/pagination/ListSyncJobsPaginator.js +1 -7
  61. package/dist-cjs/pagination/ListSyncResourcesPaginator.js +1 -7
  62. package/dist-cjs/pagination/ListWorkspacesPaginator.js +1 -7
  63. package/dist-cjs/pagination/index.js +1 -16
  64. package/dist-cjs/protocols/Aws_restJson1.js +1 -3690
  65. package/dist-cjs/runtimeExtensions.js +1 -22
  66. package/package.json +40 -40
@@ -1,3690 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_DeleteEntityCommand = exports.de_DeleteComponentTypeCommand = exports.de_CreateWorkspaceCommand = exports.de_CreateSyncJobCommand = exports.de_CreateSceneCommand = exports.de_CreateMetadataTransferJobCommand = exports.de_CreateEntityCommand = exports.de_CreateComponentTypeCommand = exports.de_CancelMetadataTransferJobCommand = exports.de_BatchPutPropertyValuesCommand = exports.se_UpdateWorkspaceCommand = exports.se_UpdateSceneCommand = exports.se_UpdatePricingPlanCommand = exports.se_UpdateEntityCommand = exports.se_UpdateComponentTypeCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ListWorkspacesCommand = exports.se_ListTagsForResourceCommand = exports.se_ListSyncResourcesCommand = exports.se_ListSyncJobsCommand = exports.se_ListScenesCommand = exports.se_ListPropertiesCommand = exports.se_ListMetadataTransferJobsCommand = exports.se_ListEntitiesCommand = exports.se_ListComponentTypesCommand = exports.se_ListComponentsCommand = exports.se_GetWorkspaceCommand = exports.se_GetSyncJobCommand = exports.se_GetSceneCommand = exports.se_GetPropertyValueHistoryCommand = exports.se_GetPropertyValueCommand = exports.se_GetPricingPlanCommand = exports.se_GetMetadataTransferJobCommand = exports.se_GetEntityCommand = exports.se_GetComponentTypeCommand = exports.se_ExecuteQueryCommand = exports.se_DeleteWorkspaceCommand = exports.se_DeleteSyncJobCommand = exports.se_DeleteSceneCommand = exports.se_DeleteEntityCommand = exports.se_DeleteComponentTypeCommand = exports.se_CreateWorkspaceCommand = exports.se_CreateSyncJobCommand = exports.se_CreateSceneCommand = exports.se_CreateMetadataTransferJobCommand = exports.se_CreateEntityCommand = exports.se_CreateComponentTypeCommand = exports.se_CancelMetadataTransferJobCommand = exports.se_BatchPutPropertyValuesCommand = void 0;
4
- exports.de_UpdateWorkspaceCommand = exports.de_UpdateSceneCommand = exports.de_UpdatePricingPlanCommand = exports.de_UpdateEntityCommand = exports.de_UpdateComponentTypeCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ListWorkspacesCommand = exports.de_ListTagsForResourceCommand = exports.de_ListSyncResourcesCommand = exports.de_ListSyncJobsCommand = exports.de_ListScenesCommand = exports.de_ListPropertiesCommand = exports.de_ListMetadataTransferJobsCommand = exports.de_ListEntitiesCommand = exports.de_ListComponentTypesCommand = exports.de_ListComponentsCommand = exports.de_GetWorkspaceCommand = exports.de_GetSyncJobCommand = exports.de_GetSceneCommand = exports.de_GetPropertyValueHistoryCommand = exports.de_GetPropertyValueCommand = exports.de_GetPricingPlanCommand = exports.de_GetMetadataTransferJobCommand = exports.de_GetEntityCommand = exports.de_GetComponentTypeCommand = exports.de_ExecuteQueryCommand = exports.de_DeleteWorkspaceCommand = exports.de_DeleteSyncJobCommand = exports.de_DeleteSceneCommand = void 0;
5
- const core_1 = require("@smithy/core");
6
- const protocol_http_1 = require("@smithy/protocol-http");
7
- const smithy_client_1 = require("@smithy/smithy-client");
8
- const IoTTwinMakerServiceException_1 = require("../models/IoTTwinMakerServiceException");
9
- const models_0_1 = require("../models/models_0");
10
- const se_BatchPutPropertyValuesCommand = async (input, context) => {
11
- const b = (0, core_1.requestBuilder)(input, context);
12
- const headers = {
13
- "content-type": "application/json",
14
- };
15
- b.bp("/workspaces/{workspaceId}/entity-properties");
16
- b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
17
- let body;
18
- body = JSON.stringify((0, smithy_client_1.take)(input, {
19
- entries: (_) => se_Entries(_, context),
20
- }));
21
- let { hostname: resolvedHostname } = await context.endpoint();
22
- if (context.disableHostPrefix !== true) {
23
- resolvedHostname = "data." + resolvedHostname;
24
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
25
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
26
- }
27
- }
28
- b.hn(resolvedHostname);
29
- b.m("POST").h(headers).b(body);
30
- return b.build();
31
- };
32
- exports.se_BatchPutPropertyValuesCommand = se_BatchPutPropertyValuesCommand;
33
- const se_CancelMetadataTransferJobCommand = async (input, context) => {
34
- const b = (0, core_1.requestBuilder)(input, context);
35
- const headers = {};
36
- b.bp("/metadata-transfer-jobs/{metadataTransferJobId}/cancel");
37
- b.p("metadataTransferJobId", () => input.metadataTransferJobId, "{metadataTransferJobId}", false);
38
- let body;
39
- let { hostname: resolvedHostname } = await context.endpoint();
40
- if (context.disableHostPrefix !== true) {
41
- resolvedHostname = "api." + resolvedHostname;
42
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
43
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
44
- }
45
- }
46
- b.hn(resolvedHostname);
47
- b.m("PUT").h(headers).b(body);
48
- return b.build();
49
- };
50
- exports.se_CancelMetadataTransferJobCommand = se_CancelMetadataTransferJobCommand;
51
- const se_CreateComponentTypeCommand = async (input, context) => {
52
- const b = (0, core_1.requestBuilder)(input, context);
53
- const headers = {
54
- "content-type": "application/json",
55
- };
56
- b.bp("/workspaces/{workspaceId}/component-types/{componentTypeId}");
57
- b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
58
- b.p("componentTypeId", () => input.componentTypeId, "{componentTypeId}", false);
59
- let body;
60
- body = JSON.stringify((0, smithy_client_1.take)(input, {
61
- componentTypeName: [],
62
- compositeComponentTypes: (_) => (0, smithy_client_1._json)(_),
63
- description: [],
64
- extendsFrom: (_) => (0, smithy_client_1._json)(_),
65
- functions: (_) => (0, smithy_client_1._json)(_),
66
- isSingleton: [],
67
- propertyDefinitions: (_) => se_PropertyDefinitionsRequest(_, context),
68
- propertyGroups: (_) => (0, smithy_client_1._json)(_),
69
- tags: (_) => (0, smithy_client_1._json)(_),
70
- }));
71
- let { hostname: resolvedHostname } = await context.endpoint();
72
- if (context.disableHostPrefix !== true) {
73
- resolvedHostname = "api." + resolvedHostname;
74
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
75
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
76
- }
77
- }
78
- b.hn(resolvedHostname);
79
- b.m("POST").h(headers).b(body);
80
- return b.build();
81
- };
82
- exports.se_CreateComponentTypeCommand = se_CreateComponentTypeCommand;
83
- const se_CreateEntityCommand = async (input, context) => {
84
- const b = (0, core_1.requestBuilder)(input, context);
85
- const headers = {
86
- "content-type": "application/json",
87
- };
88
- b.bp("/workspaces/{workspaceId}/entities");
89
- b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
90
- let body;
91
- body = JSON.stringify((0, smithy_client_1.take)(input, {
92
- components: (_) => se_ComponentsMapRequest(_, context),
93
- compositeComponents: (_) => se_CompositeComponentsMapRequest(_, context),
94
- description: [],
95
- entityId: [],
96
- entityName: [],
97
- parentEntityId: [],
98
- tags: (_) => (0, smithy_client_1._json)(_),
99
- }));
100
- let { hostname: resolvedHostname } = await context.endpoint();
101
- if (context.disableHostPrefix !== true) {
102
- resolvedHostname = "api." + resolvedHostname;
103
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
104
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
105
- }
106
- }
107
- b.hn(resolvedHostname);
108
- b.m("POST").h(headers).b(body);
109
- return b.build();
110
- };
111
- exports.se_CreateEntityCommand = se_CreateEntityCommand;
112
- const se_CreateMetadataTransferJobCommand = async (input, context) => {
113
- const b = (0, core_1.requestBuilder)(input, context);
114
- const headers = {
115
- "content-type": "application/json",
116
- };
117
- b.bp("/metadata-transfer-jobs");
118
- let body;
119
- body = JSON.stringify((0, smithy_client_1.take)(input, {
120
- description: [],
121
- destination: (_) => (0, smithy_client_1._json)(_),
122
- metadataTransferJobId: [],
123
- sources: (_) => (0, smithy_client_1._json)(_),
124
- }));
125
- let { hostname: resolvedHostname } = await context.endpoint();
126
- if (context.disableHostPrefix !== true) {
127
- resolvedHostname = "api." + resolvedHostname;
128
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
129
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
130
- }
131
- }
132
- b.hn(resolvedHostname);
133
- b.m("POST").h(headers).b(body);
134
- return b.build();
135
- };
136
- exports.se_CreateMetadataTransferJobCommand = se_CreateMetadataTransferJobCommand;
137
- const se_CreateSceneCommand = async (input, context) => {
138
- const b = (0, core_1.requestBuilder)(input, context);
139
- const headers = {
140
- "content-type": "application/json",
141
- };
142
- b.bp("/workspaces/{workspaceId}/scenes");
143
- b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
144
- let body;
145
- body = JSON.stringify((0, smithy_client_1.take)(input, {
146
- capabilities: (_) => (0, smithy_client_1._json)(_),
147
- contentLocation: [],
148
- description: [],
149
- sceneId: [],
150
- sceneMetadata: (_) => (0, smithy_client_1._json)(_),
151
- tags: (_) => (0, smithy_client_1._json)(_),
152
- }));
153
- let { hostname: resolvedHostname } = await context.endpoint();
154
- if (context.disableHostPrefix !== true) {
155
- resolvedHostname = "api." + resolvedHostname;
156
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
157
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
158
- }
159
- }
160
- b.hn(resolvedHostname);
161
- b.m("POST").h(headers).b(body);
162
- return b.build();
163
- };
164
- exports.se_CreateSceneCommand = se_CreateSceneCommand;
165
- const se_CreateSyncJobCommand = async (input, context) => {
166
- const b = (0, core_1.requestBuilder)(input, context);
167
- const headers = {
168
- "content-type": "application/json",
169
- };
170
- b.bp("/workspaces/{workspaceId}/sync-jobs/{syncSource}");
171
- b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
172
- b.p("syncSource", () => input.syncSource, "{syncSource}", false);
173
- let body;
174
- body = JSON.stringify((0, smithy_client_1.take)(input, {
175
- syncRole: [],
176
- tags: (_) => (0, smithy_client_1._json)(_),
177
- }));
178
- let { hostname: resolvedHostname } = await context.endpoint();
179
- if (context.disableHostPrefix !== true) {
180
- resolvedHostname = "api." + resolvedHostname;
181
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
182
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
183
- }
184
- }
185
- b.hn(resolvedHostname);
186
- b.m("POST").h(headers).b(body);
187
- return b.build();
188
- };
189
- exports.se_CreateSyncJobCommand = se_CreateSyncJobCommand;
190
- const se_CreateWorkspaceCommand = async (input, context) => {
191
- const b = (0, core_1.requestBuilder)(input, context);
192
- const headers = {
193
- "content-type": "application/json",
194
- };
195
- b.bp("/workspaces/{workspaceId}");
196
- b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
197
- let body;
198
- body = JSON.stringify((0, smithy_client_1.take)(input, {
199
- description: [],
200
- role: [],
201
- s3Location: [],
202
- tags: (_) => (0, smithy_client_1._json)(_),
203
- }));
204
- let { hostname: resolvedHostname } = await context.endpoint();
205
- if (context.disableHostPrefix !== true) {
206
- resolvedHostname = "api." + resolvedHostname;
207
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
208
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
209
- }
210
- }
211
- b.hn(resolvedHostname);
212
- b.m("POST").h(headers).b(body);
213
- return b.build();
214
- };
215
- exports.se_CreateWorkspaceCommand = se_CreateWorkspaceCommand;
216
- const se_DeleteComponentTypeCommand = async (input, context) => {
217
- const b = (0, core_1.requestBuilder)(input, context);
218
- const headers = {};
219
- b.bp("/workspaces/{workspaceId}/component-types/{componentTypeId}");
220
- b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
221
- b.p("componentTypeId", () => input.componentTypeId, "{componentTypeId}", false);
222
- let body;
223
- let { hostname: resolvedHostname } = await context.endpoint();
224
- if (context.disableHostPrefix !== true) {
225
- resolvedHostname = "api." + resolvedHostname;
226
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
227
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
228
- }
229
- }
230
- b.hn(resolvedHostname);
231
- b.m("DELETE").h(headers).b(body);
232
- return b.build();
233
- };
234
- exports.se_DeleteComponentTypeCommand = se_DeleteComponentTypeCommand;
235
- const se_DeleteEntityCommand = async (input, context) => {
236
- const b = (0, core_1.requestBuilder)(input, context);
237
- const headers = {};
238
- b.bp("/workspaces/{workspaceId}/entities/{entityId}");
239
- b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
240
- b.p("entityId", () => input.entityId, "{entityId}", false);
241
- const query = (0, smithy_client_1.map)({
242
- [_iR]: [() => input.isRecursive !== void 0, () => input[_iR].toString()],
243
- });
244
- let body;
245
- let { hostname: resolvedHostname } = await context.endpoint();
246
- if (context.disableHostPrefix !== true) {
247
- resolvedHostname = "api." + resolvedHostname;
248
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
249
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
250
- }
251
- }
252
- b.hn(resolvedHostname);
253
- b.m("DELETE").h(headers).q(query).b(body);
254
- return b.build();
255
- };
256
- exports.se_DeleteEntityCommand = se_DeleteEntityCommand;
257
- const se_DeleteSceneCommand = async (input, context) => {
258
- const b = (0, core_1.requestBuilder)(input, context);
259
- const headers = {};
260
- b.bp("/workspaces/{workspaceId}/scenes/{sceneId}");
261
- b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
262
- b.p("sceneId", () => input.sceneId, "{sceneId}", false);
263
- let body;
264
- let { hostname: resolvedHostname } = await context.endpoint();
265
- if (context.disableHostPrefix !== true) {
266
- resolvedHostname = "api." + resolvedHostname;
267
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
268
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
269
- }
270
- }
271
- b.hn(resolvedHostname);
272
- b.m("DELETE").h(headers).b(body);
273
- return b.build();
274
- };
275
- exports.se_DeleteSceneCommand = se_DeleteSceneCommand;
276
- const se_DeleteSyncJobCommand = async (input, context) => {
277
- const b = (0, core_1.requestBuilder)(input, context);
278
- const headers = {};
279
- b.bp("/workspaces/{workspaceId}/sync-jobs/{syncSource}");
280
- b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
281
- b.p("syncSource", () => input.syncSource, "{syncSource}", false);
282
- let body;
283
- let { hostname: resolvedHostname } = await context.endpoint();
284
- if (context.disableHostPrefix !== true) {
285
- resolvedHostname = "api." + resolvedHostname;
286
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
287
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
288
- }
289
- }
290
- b.hn(resolvedHostname);
291
- b.m("DELETE").h(headers).b(body);
292
- return b.build();
293
- };
294
- exports.se_DeleteSyncJobCommand = se_DeleteSyncJobCommand;
295
- const se_DeleteWorkspaceCommand = async (input, context) => {
296
- const b = (0, core_1.requestBuilder)(input, context);
297
- const headers = {};
298
- b.bp("/workspaces/{workspaceId}");
299
- b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
300
- let body;
301
- let { hostname: resolvedHostname } = await context.endpoint();
302
- if (context.disableHostPrefix !== true) {
303
- resolvedHostname = "api." + resolvedHostname;
304
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
305
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
306
- }
307
- }
308
- b.hn(resolvedHostname);
309
- b.m("DELETE").h(headers).b(body);
310
- return b.build();
311
- };
312
- exports.se_DeleteWorkspaceCommand = se_DeleteWorkspaceCommand;
313
- const se_ExecuteQueryCommand = async (input, context) => {
314
- const b = (0, core_1.requestBuilder)(input, context);
315
- const headers = {
316
- "content-type": "application/json",
317
- };
318
- b.bp("/queries/execution");
319
- let body;
320
- body = JSON.stringify((0, smithy_client_1.take)(input, {
321
- maxResults: [],
322
- nextToken: [],
323
- queryStatement: [],
324
- workspaceId: [],
325
- }));
326
- let { hostname: resolvedHostname } = await context.endpoint();
327
- if (context.disableHostPrefix !== true) {
328
- resolvedHostname = "api." + resolvedHostname;
329
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
330
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
331
- }
332
- }
333
- b.hn(resolvedHostname);
334
- b.m("POST").h(headers).b(body);
335
- return b.build();
336
- };
337
- exports.se_ExecuteQueryCommand = se_ExecuteQueryCommand;
338
- const se_GetComponentTypeCommand = async (input, context) => {
339
- const b = (0, core_1.requestBuilder)(input, context);
340
- const headers = {};
341
- b.bp("/workspaces/{workspaceId}/component-types/{componentTypeId}");
342
- b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
343
- b.p("componentTypeId", () => input.componentTypeId, "{componentTypeId}", false);
344
- let body;
345
- let { hostname: resolvedHostname } = await context.endpoint();
346
- if (context.disableHostPrefix !== true) {
347
- resolvedHostname = "api." + resolvedHostname;
348
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
349
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
350
- }
351
- }
352
- b.hn(resolvedHostname);
353
- b.m("GET").h(headers).b(body);
354
- return b.build();
355
- };
356
- exports.se_GetComponentTypeCommand = se_GetComponentTypeCommand;
357
- const se_GetEntityCommand = async (input, context) => {
358
- const b = (0, core_1.requestBuilder)(input, context);
359
- const headers = {};
360
- b.bp("/workspaces/{workspaceId}/entities/{entityId}");
361
- b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
362
- b.p("entityId", () => input.entityId, "{entityId}", false);
363
- let body;
364
- let { hostname: resolvedHostname } = await context.endpoint();
365
- if (context.disableHostPrefix !== true) {
366
- resolvedHostname = "api." + resolvedHostname;
367
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
368
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
369
- }
370
- }
371
- b.hn(resolvedHostname);
372
- b.m("GET").h(headers).b(body);
373
- return b.build();
374
- };
375
- exports.se_GetEntityCommand = se_GetEntityCommand;
376
- const se_GetMetadataTransferJobCommand = async (input, context) => {
377
- const b = (0, core_1.requestBuilder)(input, context);
378
- const headers = {};
379
- b.bp("/metadata-transfer-jobs/{metadataTransferJobId}");
380
- b.p("metadataTransferJobId", () => input.metadataTransferJobId, "{metadataTransferJobId}", false);
381
- let body;
382
- let { hostname: resolvedHostname } = await context.endpoint();
383
- if (context.disableHostPrefix !== true) {
384
- resolvedHostname = "api." + resolvedHostname;
385
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
386
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
387
- }
388
- }
389
- b.hn(resolvedHostname);
390
- b.m("GET").h(headers).b(body);
391
- return b.build();
392
- };
393
- exports.se_GetMetadataTransferJobCommand = se_GetMetadataTransferJobCommand;
394
- const se_GetPricingPlanCommand = async (input, context) => {
395
- const b = (0, core_1.requestBuilder)(input, context);
396
- const headers = {
397
- "content-type": "application/json",
398
- };
399
- b.bp("/pricingplan");
400
- let body;
401
- body = "";
402
- let { hostname: resolvedHostname } = await context.endpoint();
403
- if (context.disableHostPrefix !== true) {
404
- resolvedHostname = "api." + resolvedHostname;
405
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
406
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
407
- }
408
- }
409
- b.hn(resolvedHostname);
410
- b.m("GET").h(headers).b(body);
411
- return b.build();
412
- };
413
- exports.se_GetPricingPlanCommand = se_GetPricingPlanCommand;
414
- const se_GetPropertyValueCommand = async (input, context) => {
415
- const b = (0, core_1.requestBuilder)(input, context);
416
- const headers = {
417
- "content-type": "application/json",
418
- };
419
- b.bp("/workspaces/{workspaceId}/entity-properties/value");
420
- b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
421
- let body;
422
- body = JSON.stringify((0, smithy_client_1.take)(input, {
423
- componentName: [],
424
- componentPath: [],
425
- componentTypeId: [],
426
- entityId: [],
427
- maxResults: [],
428
- nextToken: [],
429
- propertyGroupName: [],
430
- selectedProperties: (_) => (0, smithy_client_1._json)(_),
431
- tabularConditions: (_) => se_TabularConditions(_, context),
432
- }));
433
- let { hostname: resolvedHostname } = await context.endpoint();
434
- if (context.disableHostPrefix !== true) {
435
- resolvedHostname = "data." + resolvedHostname;
436
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
437
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
438
- }
439
- }
440
- b.hn(resolvedHostname);
441
- b.m("POST").h(headers).b(body);
442
- return b.build();
443
- };
444
- exports.se_GetPropertyValueCommand = se_GetPropertyValueCommand;
445
- const se_GetPropertyValueHistoryCommand = async (input, context) => {
446
- const b = (0, core_1.requestBuilder)(input, context);
447
- const headers = {
448
- "content-type": "application/json",
449
- };
450
- b.bp("/workspaces/{workspaceId}/entity-properties/history");
451
- b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
452
- let body;
453
- body = JSON.stringify((0, smithy_client_1.take)(input, {
454
- componentName: [],
455
- componentPath: [],
456
- componentTypeId: [],
457
- endDateTime: (_) => Math.round(_.getTime() / 1000),
458
- endTime: [],
459
- entityId: [],
460
- interpolation: (_) => (0, smithy_client_1._json)(_),
461
- maxResults: [],
462
- nextToken: [],
463
- orderByTime: [],
464
- propertyFilters: (_) => se_PropertyFilters(_, context),
465
- selectedProperties: (_) => (0, smithy_client_1._json)(_),
466
- startDateTime: (_) => Math.round(_.getTime() / 1000),
467
- startTime: [],
468
- }));
469
- let { hostname: resolvedHostname } = await context.endpoint();
470
- if (context.disableHostPrefix !== true) {
471
- resolvedHostname = "data." + resolvedHostname;
472
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
473
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
474
- }
475
- }
476
- b.hn(resolvedHostname);
477
- b.m("POST").h(headers).b(body);
478
- return b.build();
479
- };
480
- exports.se_GetPropertyValueHistoryCommand = se_GetPropertyValueHistoryCommand;
481
- const se_GetSceneCommand = async (input, context) => {
482
- const b = (0, core_1.requestBuilder)(input, context);
483
- const headers = {};
484
- b.bp("/workspaces/{workspaceId}/scenes/{sceneId}");
485
- b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
486
- b.p("sceneId", () => input.sceneId, "{sceneId}", false);
487
- let body;
488
- let { hostname: resolvedHostname } = await context.endpoint();
489
- if (context.disableHostPrefix !== true) {
490
- resolvedHostname = "api." + resolvedHostname;
491
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
492
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
493
- }
494
- }
495
- b.hn(resolvedHostname);
496
- b.m("GET").h(headers).b(body);
497
- return b.build();
498
- };
499
- exports.se_GetSceneCommand = se_GetSceneCommand;
500
- const se_GetSyncJobCommand = async (input, context) => {
501
- const b = (0, core_1.requestBuilder)(input, context);
502
- const headers = {};
503
- b.bp("/sync-jobs/{syncSource}");
504
- b.p("syncSource", () => input.syncSource, "{syncSource}", false);
505
- const query = (0, smithy_client_1.map)({
506
- [_w]: [, input[_wI]],
507
- });
508
- let body;
509
- let { hostname: resolvedHostname } = await context.endpoint();
510
- if (context.disableHostPrefix !== true) {
511
- resolvedHostname = "api." + resolvedHostname;
512
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
513
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
514
- }
515
- }
516
- b.hn(resolvedHostname);
517
- b.m("GET").h(headers).q(query).b(body);
518
- return b.build();
519
- };
520
- exports.se_GetSyncJobCommand = se_GetSyncJobCommand;
521
- const se_GetWorkspaceCommand = async (input, context) => {
522
- const b = (0, core_1.requestBuilder)(input, context);
523
- const headers = {};
524
- b.bp("/workspaces/{workspaceId}");
525
- b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
526
- let body;
527
- let { hostname: resolvedHostname } = await context.endpoint();
528
- if (context.disableHostPrefix !== true) {
529
- resolvedHostname = "api." + resolvedHostname;
530
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
531
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
532
- }
533
- }
534
- b.hn(resolvedHostname);
535
- b.m("GET").h(headers).b(body);
536
- return b.build();
537
- };
538
- exports.se_GetWorkspaceCommand = se_GetWorkspaceCommand;
539
- const se_ListComponentsCommand = async (input, context) => {
540
- const b = (0, core_1.requestBuilder)(input, context);
541
- const headers = {
542
- "content-type": "application/json",
543
- };
544
- b.bp("/workspaces/{workspaceId}/entities/{entityId}/components-list");
545
- b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
546
- b.p("entityId", () => input.entityId, "{entityId}", false);
547
- let body;
548
- body = JSON.stringify((0, smithy_client_1.take)(input, {
549
- componentPath: [],
550
- maxResults: [],
551
- nextToken: [],
552
- }));
553
- let { hostname: resolvedHostname } = await context.endpoint();
554
- if (context.disableHostPrefix !== true) {
555
- resolvedHostname = "api." + resolvedHostname;
556
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
557
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
558
- }
559
- }
560
- b.hn(resolvedHostname);
561
- b.m("POST").h(headers).b(body);
562
- return b.build();
563
- };
564
- exports.se_ListComponentsCommand = se_ListComponentsCommand;
565
- const se_ListComponentTypesCommand = async (input, context) => {
566
- const b = (0, core_1.requestBuilder)(input, context);
567
- const headers = {
568
- "content-type": "application/json",
569
- };
570
- b.bp("/workspaces/{workspaceId}/component-types-list");
571
- b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
572
- let body;
573
- body = JSON.stringify((0, smithy_client_1.take)(input, {
574
- filters: (_) => (0, smithy_client_1._json)(_),
575
- maxResults: [],
576
- nextToken: [],
577
- }));
578
- let { hostname: resolvedHostname } = await context.endpoint();
579
- if (context.disableHostPrefix !== true) {
580
- resolvedHostname = "api." + resolvedHostname;
581
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
582
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
583
- }
584
- }
585
- b.hn(resolvedHostname);
586
- b.m("POST").h(headers).b(body);
587
- return b.build();
588
- };
589
- exports.se_ListComponentTypesCommand = se_ListComponentTypesCommand;
590
- const se_ListEntitiesCommand = async (input, context) => {
591
- const b = (0, core_1.requestBuilder)(input, context);
592
- const headers = {
593
- "content-type": "application/json",
594
- };
595
- b.bp("/workspaces/{workspaceId}/entities-list");
596
- b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
597
- let body;
598
- body = JSON.stringify((0, smithy_client_1.take)(input, {
599
- filters: (_) => (0, smithy_client_1._json)(_),
600
- maxResults: [],
601
- nextToken: [],
602
- }));
603
- let { hostname: resolvedHostname } = await context.endpoint();
604
- if (context.disableHostPrefix !== true) {
605
- resolvedHostname = "api." + resolvedHostname;
606
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
607
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
608
- }
609
- }
610
- b.hn(resolvedHostname);
611
- b.m("POST").h(headers).b(body);
612
- return b.build();
613
- };
614
- exports.se_ListEntitiesCommand = se_ListEntitiesCommand;
615
- const se_ListMetadataTransferJobsCommand = async (input, context) => {
616
- const b = (0, core_1.requestBuilder)(input, context);
617
- const headers = {
618
- "content-type": "application/json",
619
- };
620
- b.bp("/metadata-transfer-jobs-list");
621
- let body;
622
- body = JSON.stringify((0, smithy_client_1.take)(input, {
623
- destinationType: [],
624
- filters: (_) => (0, smithy_client_1._json)(_),
625
- maxResults: [],
626
- nextToken: [],
627
- sourceType: [],
628
- }));
629
- let { hostname: resolvedHostname } = await context.endpoint();
630
- if (context.disableHostPrefix !== true) {
631
- resolvedHostname = "api." + resolvedHostname;
632
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
633
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
634
- }
635
- }
636
- b.hn(resolvedHostname);
637
- b.m("POST").h(headers).b(body);
638
- return b.build();
639
- };
640
- exports.se_ListMetadataTransferJobsCommand = se_ListMetadataTransferJobsCommand;
641
- const se_ListPropertiesCommand = async (input, context) => {
642
- const b = (0, core_1.requestBuilder)(input, context);
643
- const headers = {
644
- "content-type": "application/json",
645
- };
646
- b.bp("/workspaces/{workspaceId}/properties-list");
647
- b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
648
- let body;
649
- body = JSON.stringify((0, smithy_client_1.take)(input, {
650
- componentName: [],
651
- componentPath: [],
652
- entityId: [],
653
- maxResults: [],
654
- nextToken: [],
655
- }));
656
- let { hostname: resolvedHostname } = await context.endpoint();
657
- if (context.disableHostPrefix !== true) {
658
- resolvedHostname = "api." + resolvedHostname;
659
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
660
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
661
- }
662
- }
663
- b.hn(resolvedHostname);
664
- b.m("POST").h(headers).b(body);
665
- return b.build();
666
- };
667
- exports.se_ListPropertiesCommand = se_ListPropertiesCommand;
668
- const se_ListScenesCommand = async (input, context) => {
669
- const b = (0, core_1.requestBuilder)(input, context);
670
- const headers = {
671
- "content-type": "application/json",
672
- };
673
- b.bp("/workspaces/{workspaceId}/scenes-list");
674
- b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
675
- let body;
676
- body = JSON.stringify((0, smithy_client_1.take)(input, {
677
- maxResults: [],
678
- nextToken: [],
679
- }));
680
- let { hostname: resolvedHostname } = await context.endpoint();
681
- if (context.disableHostPrefix !== true) {
682
- resolvedHostname = "api." + resolvedHostname;
683
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
684
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
685
- }
686
- }
687
- b.hn(resolvedHostname);
688
- b.m("POST").h(headers).b(body);
689
- return b.build();
690
- };
691
- exports.se_ListScenesCommand = se_ListScenesCommand;
692
- const se_ListSyncJobsCommand = async (input, context) => {
693
- const b = (0, core_1.requestBuilder)(input, context);
694
- const headers = {
695
- "content-type": "application/json",
696
- };
697
- b.bp("/workspaces/{workspaceId}/sync-jobs-list");
698
- b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
699
- let body;
700
- body = JSON.stringify((0, smithy_client_1.take)(input, {
701
- maxResults: [],
702
- nextToken: [],
703
- }));
704
- let { hostname: resolvedHostname } = await context.endpoint();
705
- if (context.disableHostPrefix !== true) {
706
- resolvedHostname = "api." + resolvedHostname;
707
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
708
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
709
- }
710
- }
711
- b.hn(resolvedHostname);
712
- b.m("POST").h(headers).b(body);
713
- return b.build();
714
- };
715
- exports.se_ListSyncJobsCommand = se_ListSyncJobsCommand;
716
- const se_ListSyncResourcesCommand = async (input, context) => {
717
- const b = (0, core_1.requestBuilder)(input, context);
718
- const headers = {
719
- "content-type": "application/json",
720
- };
721
- b.bp("/workspaces/{workspaceId}/sync-jobs/{syncSource}/resources-list");
722
- b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
723
- b.p("syncSource", () => input.syncSource, "{syncSource}", false);
724
- let body;
725
- body = JSON.stringify((0, smithy_client_1.take)(input, {
726
- filters: (_) => (0, smithy_client_1._json)(_),
727
- maxResults: [],
728
- nextToken: [],
729
- }));
730
- let { hostname: resolvedHostname } = await context.endpoint();
731
- if (context.disableHostPrefix !== true) {
732
- resolvedHostname = "api." + resolvedHostname;
733
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
734
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
735
- }
736
- }
737
- b.hn(resolvedHostname);
738
- b.m("POST").h(headers).b(body);
739
- return b.build();
740
- };
741
- exports.se_ListSyncResourcesCommand = se_ListSyncResourcesCommand;
742
- const se_ListTagsForResourceCommand = async (input, context) => {
743
- const b = (0, core_1.requestBuilder)(input, context);
744
- const headers = {
745
- "content-type": "application/json",
746
- };
747
- b.bp("/tags-list");
748
- let body;
749
- body = JSON.stringify((0, smithy_client_1.take)(input, {
750
- maxResults: [],
751
- nextToken: [],
752
- resourceARN: [],
753
- }));
754
- let { hostname: resolvedHostname } = await context.endpoint();
755
- if (context.disableHostPrefix !== true) {
756
- resolvedHostname = "api." + resolvedHostname;
757
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
758
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
759
- }
760
- }
761
- b.hn(resolvedHostname);
762
- b.m("POST").h(headers).b(body);
763
- return b.build();
764
- };
765
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
766
- const se_ListWorkspacesCommand = async (input, context) => {
767
- const b = (0, core_1.requestBuilder)(input, context);
768
- const headers = {
769
- "content-type": "application/json",
770
- };
771
- b.bp("/workspaces-list");
772
- let body;
773
- body = JSON.stringify((0, smithy_client_1.take)(input, {
774
- maxResults: [],
775
- nextToken: [],
776
- }));
777
- let { hostname: resolvedHostname } = await context.endpoint();
778
- if (context.disableHostPrefix !== true) {
779
- resolvedHostname = "api." + resolvedHostname;
780
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
781
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
782
- }
783
- }
784
- b.hn(resolvedHostname);
785
- b.m("POST").h(headers).b(body);
786
- return b.build();
787
- };
788
- exports.se_ListWorkspacesCommand = se_ListWorkspacesCommand;
789
- const se_TagResourceCommand = async (input, context) => {
790
- const b = (0, core_1.requestBuilder)(input, context);
791
- const headers = {
792
- "content-type": "application/json",
793
- };
794
- b.bp("/tags");
795
- let body;
796
- body = JSON.stringify((0, smithy_client_1.take)(input, {
797
- resourceARN: [],
798
- tags: (_) => (0, smithy_client_1._json)(_),
799
- }));
800
- let { hostname: resolvedHostname } = await context.endpoint();
801
- if (context.disableHostPrefix !== true) {
802
- resolvedHostname = "api." + resolvedHostname;
803
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
804
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
805
- }
806
- }
807
- b.hn(resolvedHostname);
808
- b.m("POST").h(headers).b(body);
809
- return b.build();
810
- };
811
- exports.se_TagResourceCommand = se_TagResourceCommand;
812
- const se_UntagResourceCommand = async (input, context) => {
813
- const b = (0, core_1.requestBuilder)(input, context);
814
- const headers = {};
815
- b.bp("/tags");
816
- const query = (0, smithy_client_1.map)({
817
- [_rARN]: [, (0, smithy_client_1.expectNonNull)(input[_rARN], `resourceARN`)],
818
- [_tK]: [
819
- (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
820
- () => (input[_tK] || []).map((_entry) => _entry),
821
- ],
822
- });
823
- let body;
824
- let { hostname: resolvedHostname } = await context.endpoint();
825
- if (context.disableHostPrefix !== true) {
826
- resolvedHostname = "api." + resolvedHostname;
827
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
828
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
829
- }
830
- }
831
- b.hn(resolvedHostname);
832
- b.m("DELETE").h(headers).q(query).b(body);
833
- return b.build();
834
- };
835
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
836
- const se_UpdateComponentTypeCommand = async (input, context) => {
837
- const b = (0, core_1.requestBuilder)(input, context);
838
- const headers = {
839
- "content-type": "application/json",
840
- };
841
- b.bp("/workspaces/{workspaceId}/component-types/{componentTypeId}");
842
- b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
843
- b.p("componentTypeId", () => input.componentTypeId, "{componentTypeId}", false);
844
- let body;
845
- body = JSON.stringify((0, smithy_client_1.take)(input, {
846
- componentTypeName: [],
847
- compositeComponentTypes: (_) => (0, smithy_client_1._json)(_),
848
- description: [],
849
- extendsFrom: (_) => (0, smithy_client_1._json)(_),
850
- functions: (_) => (0, smithy_client_1._json)(_),
851
- isSingleton: [],
852
- propertyDefinitions: (_) => se_PropertyDefinitionsRequest(_, context),
853
- propertyGroups: (_) => (0, smithy_client_1._json)(_),
854
- }));
855
- let { hostname: resolvedHostname } = await context.endpoint();
856
- if (context.disableHostPrefix !== true) {
857
- resolvedHostname = "api." + resolvedHostname;
858
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
859
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
860
- }
861
- }
862
- b.hn(resolvedHostname);
863
- b.m("PUT").h(headers).b(body);
864
- return b.build();
865
- };
866
- exports.se_UpdateComponentTypeCommand = se_UpdateComponentTypeCommand;
867
- const se_UpdateEntityCommand = async (input, context) => {
868
- const b = (0, core_1.requestBuilder)(input, context);
869
- const headers = {
870
- "content-type": "application/json",
871
- };
872
- b.bp("/workspaces/{workspaceId}/entities/{entityId}");
873
- b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
874
- b.p("entityId", () => input.entityId, "{entityId}", false);
875
- let body;
876
- body = JSON.stringify((0, smithy_client_1.take)(input, {
877
- componentUpdates: (_) => se_ComponentUpdatesMapRequest(_, context),
878
- compositeComponentUpdates: (_) => se_CompositeComponentUpdatesMapRequest(_, context),
879
- description: [],
880
- entityName: [],
881
- parentEntityUpdate: (_) => (0, smithy_client_1._json)(_),
882
- }));
883
- let { hostname: resolvedHostname } = await context.endpoint();
884
- if (context.disableHostPrefix !== true) {
885
- resolvedHostname = "api." + resolvedHostname;
886
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
887
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
888
- }
889
- }
890
- b.hn(resolvedHostname);
891
- b.m("PUT").h(headers).b(body);
892
- return b.build();
893
- };
894
- exports.se_UpdateEntityCommand = se_UpdateEntityCommand;
895
- const se_UpdatePricingPlanCommand = async (input, context) => {
896
- const b = (0, core_1.requestBuilder)(input, context);
897
- const headers = {
898
- "content-type": "application/json",
899
- };
900
- b.bp("/pricingplan");
901
- let body;
902
- body = JSON.stringify((0, smithy_client_1.take)(input, {
903
- bundleNames: (_) => (0, smithy_client_1._json)(_),
904
- pricingMode: [],
905
- }));
906
- let { hostname: resolvedHostname } = await context.endpoint();
907
- if (context.disableHostPrefix !== true) {
908
- resolvedHostname = "api." + resolvedHostname;
909
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
910
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
911
- }
912
- }
913
- b.hn(resolvedHostname);
914
- b.m("POST").h(headers).b(body);
915
- return b.build();
916
- };
917
- exports.se_UpdatePricingPlanCommand = se_UpdatePricingPlanCommand;
918
- const se_UpdateSceneCommand = async (input, context) => {
919
- const b = (0, core_1.requestBuilder)(input, context);
920
- const headers = {
921
- "content-type": "application/json",
922
- };
923
- b.bp("/workspaces/{workspaceId}/scenes/{sceneId}");
924
- b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
925
- b.p("sceneId", () => input.sceneId, "{sceneId}", false);
926
- let body;
927
- body = JSON.stringify((0, smithy_client_1.take)(input, {
928
- capabilities: (_) => (0, smithy_client_1._json)(_),
929
- contentLocation: [],
930
- description: [],
931
- sceneMetadata: (_) => (0, smithy_client_1._json)(_),
932
- }));
933
- let { hostname: resolvedHostname } = await context.endpoint();
934
- if (context.disableHostPrefix !== true) {
935
- resolvedHostname = "api." + resolvedHostname;
936
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
937
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
938
- }
939
- }
940
- b.hn(resolvedHostname);
941
- b.m("PUT").h(headers).b(body);
942
- return b.build();
943
- };
944
- exports.se_UpdateSceneCommand = se_UpdateSceneCommand;
945
- const se_UpdateWorkspaceCommand = async (input, context) => {
946
- const b = (0, core_1.requestBuilder)(input, context);
947
- const headers = {
948
- "content-type": "application/json",
949
- };
950
- b.bp("/workspaces/{workspaceId}");
951
- b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
952
- let body;
953
- body = JSON.stringify((0, smithy_client_1.take)(input, {
954
- description: [],
955
- role: [],
956
- s3Location: [],
957
- }));
958
- let { hostname: resolvedHostname } = await context.endpoint();
959
- if (context.disableHostPrefix !== true) {
960
- resolvedHostname = "api." + resolvedHostname;
961
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
962
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
963
- }
964
- }
965
- b.hn(resolvedHostname);
966
- b.m("PUT").h(headers).b(body);
967
- return b.build();
968
- };
969
- exports.se_UpdateWorkspaceCommand = se_UpdateWorkspaceCommand;
970
- const de_BatchPutPropertyValuesCommand = async (output, context) => {
971
- if (output.statusCode !== 200 && output.statusCode >= 300) {
972
- return de_BatchPutPropertyValuesCommandError(output, context);
973
- }
974
- const contents = (0, smithy_client_1.map)({
975
- $metadata: deserializeMetadata(output),
976
- });
977
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
978
- const doc = (0, smithy_client_1.take)(data, {
979
- errorEntries: (_) => de_ErrorEntries(_, context),
980
- });
981
- Object.assign(contents, doc);
982
- return contents;
983
- };
984
- exports.de_BatchPutPropertyValuesCommand = de_BatchPutPropertyValuesCommand;
985
- const de_BatchPutPropertyValuesCommandError = async (output, context) => {
986
- const parsedOutput = {
987
- ...output,
988
- body: await parseErrorBody(output.body, context),
989
- };
990
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
991
- switch (errorCode) {
992
- case "InternalServerException":
993
- case "com.amazonaws.iottwinmaker#InternalServerException":
994
- throw await de_InternalServerExceptionRes(parsedOutput, context);
995
- case "ResourceNotFoundException":
996
- case "com.amazonaws.iottwinmaker#ResourceNotFoundException":
997
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
998
- case "ThrottlingException":
999
- case "com.amazonaws.iottwinmaker#ThrottlingException":
1000
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1001
- case "ValidationException":
1002
- case "com.amazonaws.iottwinmaker#ValidationException":
1003
- throw await de_ValidationExceptionRes(parsedOutput, context);
1004
- default:
1005
- const parsedBody = parsedOutput.body;
1006
- return throwDefaultError({
1007
- output,
1008
- parsedBody,
1009
- errorCode,
1010
- });
1011
- }
1012
- };
1013
- const de_CancelMetadataTransferJobCommand = async (output, context) => {
1014
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1015
- return de_CancelMetadataTransferJobCommandError(output, context);
1016
- }
1017
- const contents = (0, smithy_client_1.map)({
1018
- $metadata: deserializeMetadata(output),
1019
- });
1020
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1021
- const doc = (0, smithy_client_1.take)(data, {
1022
- arn: smithy_client_1.expectString,
1023
- metadataTransferJobId: smithy_client_1.expectString,
1024
- progress: smithy_client_1._json,
1025
- status: smithy_client_1._json,
1026
- updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1027
- });
1028
- Object.assign(contents, doc);
1029
- return contents;
1030
- };
1031
- exports.de_CancelMetadataTransferJobCommand = de_CancelMetadataTransferJobCommand;
1032
- const de_CancelMetadataTransferJobCommandError = async (output, context) => {
1033
- const parsedOutput = {
1034
- ...output,
1035
- body: await parseErrorBody(output.body, context),
1036
- };
1037
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1038
- switch (errorCode) {
1039
- case "AccessDeniedException":
1040
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
1041
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1042
- case "ConflictException":
1043
- case "com.amazonaws.iottwinmaker#ConflictException":
1044
- throw await de_ConflictExceptionRes(parsedOutput, context);
1045
- case "InternalServerException":
1046
- case "com.amazonaws.iottwinmaker#InternalServerException":
1047
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1048
- case "ResourceNotFoundException":
1049
- case "com.amazonaws.iottwinmaker#ResourceNotFoundException":
1050
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1051
- case "ThrottlingException":
1052
- case "com.amazonaws.iottwinmaker#ThrottlingException":
1053
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1054
- case "ValidationException":
1055
- case "com.amazonaws.iottwinmaker#ValidationException":
1056
- throw await de_ValidationExceptionRes(parsedOutput, context);
1057
- default:
1058
- const parsedBody = parsedOutput.body;
1059
- return throwDefaultError({
1060
- output,
1061
- parsedBody,
1062
- errorCode,
1063
- });
1064
- }
1065
- };
1066
- const de_CreateComponentTypeCommand = async (output, context) => {
1067
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1068
- return de_CreateComponentTypeCommandError(output, context);
1069
- }
1070
- const contents = (0, smithy_client_1.map)({
1071
- $metadata: deserializeMetadata(output),
1072
- });
1073
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1074
- const doc = (0, smithy_client_1.take)(data, {
1075
- arn: smithy_client_1.expectString,
1076
- creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1077
- state: smithy_client_1.expectString,
1078
- });
1079
- Object.assign(contents, doc);
1080
- return contents;
1081
- };
1082
- exports.de_CreateComponentTypeCommand = de_CreateComponentTypeCommand;
1083
- const de_CreateComponentTypeCommandError = async (output, context) => {
1084
- const parsedOutput = {
1085
- ...output,
1086
- body: await parseErrorBody(output.body, context),
1087
- };
1088
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1089
- switch (errorCode) {
1090
- case "AccessDeniedException":
1091
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
1092
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1093
- case "ConflictException":
1094
- case "com.amazonaws.iottwinmaker#ConflictException":
1095
- throw await de_ConflictExceptionRes(parsedOutput, context);
1096
- case "InternalServerException":
1097
- case "com.amazonaws.iottwinmaker#InternalServerException":
1098
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1099
- case "ServiceQuotaExceededException":
1100
- case "com.amazonaws.iottwinmaker#ServiceQuotaExceededException":
1101
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1102
- case "ThrottlingException":
1103
- case "com.amazonaws.iottwinmaker#ThrottlingException":
1104
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1105
- case "ValidationException":
1106
- case "com.amazonaws.iottwinmaker#ValidationException":
1107
- throw await de_ValidationExceptionRes(parsedOutput, context);
1108
- default:
1109
- const parsedBody = parsedOutput.body;
1110
- return throwDefaultError({
1111
- output,
1112
- parsedBody,
1113
- errorCode,
1114
- });
1115
- }
1116
- };
1117
- const de_CreateEntityCommand = async (output, context) => {
1118
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1119
- return de_CreateEntityCommandError(output, context);
1120
- }
1121
- const contents = (0, smithy_client_1.map)({
1122
- $metadata: deserializeMetadata(output),
1123
- });
1124
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1125
- const doc = (0, smithy_client_1.take)(data, {
1126
- arn: smithy_client_1.expectString,
1127
- creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1128
- entityId: smithy_client_1.expectString,
1129
- state: smithy_client_1.expectString,
1130
- });
1131
- Object.assign(contents, doc);
1132
- return contents;
1133
- };
1134
- exports.de_CreateEntityCommand = de_CreateEntityCommand;
1135
- const de_CreateEntityCommandError = async (output, context) => {
1136
- const parsedOutput = {
1137
- ...output,
1138
- body: await parseErrorBody(output.body, context),
1139
- };
1140
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1141
- switch (errorCode) {
1142
- case "AccessDeniedException":
1143
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
1144
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1145
- case "ConflictException":
1146
- case "com.amazonaws.iottwinmaker#ConflictException":
1147
- throw await de_ConflictExceptionRes(parsedOutput, context);
1148
- case "InternalServerException":
1149
- case "com.amazonaws.iottwinmaker#InternalServerException":
1150
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1151
- case "ServiceQuotaExceededException":
1152
- case "com.amazonaws.iottwinmaker#ServiceQuotaExceededException":
1153
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1154
- case "ThrottlingException":
1155
- case "com.amazonaws.iottwinmaker#ThrottlingException":
1156
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1157
- case "ValidationException":
1158
- case "com.amazonaws.iottwinmaker#ValidationException":
1159
- throw await de_ValidationExceptionRes(parsedOutput, context);
1160
- default:
1161
- const parsedBody = parsedOutput.body;
1162
- return throwDefaultError({
1163
- output,
1164
- parsedBody,
1165
- errorCode,
1166
- });
1167
- }
1168
- };
1169
- const de_CreateMetadataTransferJobCommand = async (output, context) => {
1170
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1171
- return de_CreateMetadataTransferJobCommandError(output, context);
1172
- }
1173
- const contents = (0, smithy_client_1.map)({
1174
- $metadata: deserializeMetadata(output),
1175
- });
1176
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1177
- const doc = (0, smithy_client_1.take)(data, {
1178
- arn: smithy_client_1.expectString,
1179
- creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1180
- metadataTransferJobId: smithy_client_1.expectString,
1181
- status: smithy_client_1._json,
1182
- });
1183
- Object.assign(contents, doc);
1184
- return contents;
1185
- };
1186
- exports.de_CreateMetadataTransferJobCommand = de_CreateMetadataTransferJobCommand;
1187
- const de_CreateMetadataTransferJobCommandError = async (output, context) => {
1188
- const parsedOutput = {
1189
- ...output,
1190
- body: await parseErrorBody(output.body, context),
1191
- };
1192
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1193
- switch (errorCode) {
1194
- case "AccessDeniedException":
1195
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
1196
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1197
- case "ConflictException":
1198
- case "com.amazonaws.iottwinmaker#ConflictException":
1199
- throw await de_ConflictExceptionRes(parsedOutput, context);
1200
- case "InternalServerException":
1201
- case "com.amazonaws.iottwinmaker#InternalServerException":
1202
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1203
- case "ResourceNotFoundException":
1204
- case "com.amazonaws.iottwinmaker#ResourceNotFoundException":
1205
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1206
- case "ServiceQuotaExceededException":
1207
- case "com.amazonaws.iottwinmaker#ServiceQuotaExceededException":
1208
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1209
- case "ThrottlingException":
1210
- case "com.amazonaws.iottwinmaker#ThrottlingException":
1211
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1212
- case "ValidationException":
1213
- case "com.amazonaws.iottwinmaker#ValidationException":
1214
- throw await de_ValidationExceptionRes(parsedOutput, context);
1215
- default:
1216
- const parsedBody = parsedOutput.body;
1217
- return throwDefaultError({
1218
- output,
1219
- parsedBody,
1220
- errorCode,
1221
- });
1222
- }
1223
- };
1224
- const de_CreateSceneCommand = async (output, context) => {
1225
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1226
- return de_CreateSceneCommandError(output, context);
1227
- }
1228
- const contents = (0, smithy_client_1.map)({
1229
- $metadata: deserializeMetadata(output),
1230
- });
1231
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1232
- const doc = (0, smithy_client_1.take)(data, {
1233
- arn: smithy_client_1.expectString,
1234
- creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1235
- });
1236
- Object.assign(contents, doc);
1237
- return contents;
1238
- };
1239
- exports.de_CreateSceneCommand = de_CreateSceneCommand;
1240
- const de_CreateSceneCommandError = async (output, context) => {
1241
- const parsedOutput = {
1242
- ...output,
1243
- body: await parseErrorBody(output.body, context),
1244
- };
1245
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1246
- switch (errorCode) {
1247
- case "AccessDeniedException":
1248
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
1249
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1250
- case "ConflictException":
1251
- case "com.amazonaws.iottwinmaker#ConflictException":
1252
- throw await de_ConflictExceptionRes(parsedOutput, context);
1253
- case "InternalServerException":
1254
- case "com.amazonaws.iottwinmaker#InternalServerException":
1255
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1256
- case "ServiceQuotaExceededException":
1257
- case "com.amazonaws.iottwinmaker#ServiceQuotaExceededException":
1258
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1259
- case "ThrottlingException":
1260
- case "com.amazonaws.iottwinmaker#ThrottlingException":
1261
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1262
- case "ValidationException":
1263
- case "com.amazonaws.iottwinmaker#ValidationException":
1264
- throw await de_ValidationExceptionRes(parsedOutput, context);
1265
- default:
1266
- const parsedBody = parsedOutput.body;
1267
- return throwDefaultError({
1268
- output,
1269
- parsedBody,
1270
- errorCode,
1271
- });
1272
- }
1273
- };
1274
- const de_CreateSyncJobCommand = async (output, context) => {
1275
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1276
- return de_CreateSyncJobCommandError(output, context);
1277
- }
1278
- const contents = (0, smithy_client_1.map)({
1279
- $metadata: deserializeMetadata(output),
1280
- });
1281
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1282
- const doc = (0, smithy_client_1.take)(data, {
1283
- arn: smithy_client_1.expectString,
1284
- creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1285
- state: smithy_client_1.expectString,
1286
- });
1287
- Object.assign(contents, doc);
1288
- return contents;
1289
- };
1290
- exports.de_CreateSyncJobCommand = de_CreateSyncJobCommand;
1291
- const de_CreateSyncJobCommandError = async (output, context) => {
1292
- const parsedOutput = {
1293
- ...output,
1294
- body: await parseErrorBody(output.body, context),
1295
- };
1296
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1297
- switch (errorCode) {
1298
- case "AccessDeniedException":
1299
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
1300
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1301
- case "ConflictException":
1302
- case "com.amazonaws.iottwinmaker#ConflictException":
1303
- throw await de_ConflictExceptionRes(parsedOutput, context);
1304
- case "InternalServerException":
1305
- case "com.amazonaws.iottwinmaker#InternalServerException":
1306
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1307
- case "ServiceQuotaExceededException":
1308
- case "com.amazonaws.iottwinmaker#ServiceQuotaExceededException":
1309
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1310
- case "ThrottlingException":
1311
- case "com.amazonaws.iottwinmaker#ThrottlingException":
1312
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1313
- case "ValidationException":
1314
- case "com.amazonaws.iottwinmaker#ValidationException":
1315
- throw await de_ValidationExceptionRes(parsedOutput, context);
1316
- default:
1317
- const parsedBody = parsedOutput.body;
1318
- return throwDefaultError({
1319
- output,
1320
- parsedBody,
1321
- errorCode,
1322
- });
1323
- }
1324
- };
1325
- const de_CreateWorkspaceCommand = async (output, context) => {
1326
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1327
- return de_CreateWorkspaceCommandError(output, context);
1328
- }
1329
- const contents = (0, smithy_client_1.map)({
1330
- $metadata: deserializeMetadata(output),
1331
- });
1332
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1333
- const doc = (0, smithy_client_1.take)(data, {
1334
- arn: smithy_client_1.expectString,
1335
- creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1336
- });
1337
- Object.assign(contents, doc);
1338
- return contents;
1339
- };
1340
- exports.de_CreateWorkspaceCommand = de_CreateWorkspaceCommand;
1341
- const de_CreateWorkspaceCommandError = async (output, context) => {
1342
- const parsedOutput = {
1343
- ...output,
1344
- body: await parseErrorBody(output.body, context),
1345
- };
1346
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1347
- switch (errorCode) {
1348
- case "AccessDeniedException":
1349
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
1350
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1351
- case "ConflictException":
1352
- case "com.amazonaws.iottwinmaker#ConflictException":
1353
- throw await de_ConflictExceptionRes(parsedOutput, context);
1354
- case "InternalServerException":
1355
- case "com.amazonaws.iottwinmaker#InternalServerException":
1356
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1357
- case "ServiceQuotaExceededException":
1358
- case "com.amazonaws.iottwinmaker#ServiceQuotaExceededException":
1359
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1360
- case "ThrottlingException":
1361
- case "com.amazonaws.iottwinmaker#ThrottlingException":
1362
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1363
- case "ValidationException":
1364
- case "com.amazonaws.iottwinmaker#ValidationException":
1365
- throw await de_ValidationExceptionRes(parsedOutput, context);
1366
- default:
1367
- const parsedBody = parsedOutput.body;
1368
- return throwDefaultError({
1369
- output,
1370
- parsedBody,
1371
- errorCode,
1372
- });
1373
- }
1374
- };
1375
- const de_DeleteComponentTypeCommand = async (output, context) => {
1376
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1377
- return de_DeleteComponentTypeCommandError(output, context);
1378
- }
1379
- const contents = (0, smithy_client_1.map)({
1380
- $metadata: deserializeMetadata(output),
1381
- });
1382
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1383
- const doc = (0, smithy_client_1.take)(data, {
1384
- state: smithy_client_1.expectString,
1385
- });
1386
- Object.assign(contents, doc);
1387
- return contents;
1388
- };
1389
- exports.de_DeleteComponentTypeCommand = de_DeleteComponentTypeCommand;
1390
- const de_DeleteComponentTypeCommandError = async (output, context) => {
1391
- const parsedOutput = {
1392
- ...output,
1393
- body: await parseErrorBody(output.body, context),
1394
- };
1395
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1396
- switch (errorCode) {
1397
- case "AccessDeniedException":
1398
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
1399
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1400
- case "InternalServerException":
1401
- case "com.amazonaws.iottwinmaker#InternalServerException":
1402
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1403
- case "ResourceNotFoundException":
1404
- case "com.amazonaws.iottwinmaker#ResourceNotFoundException":
1405
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1406
- case "ThrottlingException":
1407
- case "com.amazonaws.iottwinmaker#ThrottlingException":
1408
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1409
- case "ValidationException":
1410
- case "com.amazonaws.iottwinmaker#ValidationException":
1411
- throw await de_ValidationExceptionRes(parsedOutput, context);
1412
- default:
1413
- const parsedBody = parsedOutput.body;
1414
- return throwDefaultError({
1415
- output,
1416
- parsedBody,
1417
- errorCode,
1418
- });
1419
- }
1420
- };
1421
- const de_DeleteEntityCommand = async (output, context) => {
1422
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1423
- return de_DeleteEntityCommandError(output, context);
1424
- }
1425
- const contents = (0, smithy_client_1.map)({
1426
- $metadata: deserializeMetadata(output),
1427
- });
1428
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1429
- const doc = (0, smithy_client_1.take)(data, {
1430
- state: smithy_client_1.expectString,
1431
- });
1432
- Object.assign(contents, doc);
1433
- return contents;
1434
- };
1435
- exports.de_DeleteEntityCommand = de_DeleteEntityCommand;
1436
- const de_DeleteEntityCommandError = async (output, context) => {
1437
- const parsedOutput = {
1438
- ...output,
1439
- body: await parseErrorBody(output.body, context),
1440
- };
1441
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1442
- switch (errorCode) {
1443
- case "InternalServerException":
1444
- case "com.amazonaws.iottwinmaker#InternalServerException":
1445
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1446
- case "ResourceNotFoundException":
1447
- case "com.amazonaws.iottwinmaker#ResourceNotFoundException":
1448
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1449
- case "ServiceQuotaExceededException":
1450
- case "com.amazonaws.iottwinmaker#ServiceQuotaExceededException":
1451
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1452
- case "ThrottlingException":
1453
- case "com.amazonaws.iottwinmaker#ThrottlingException":
1454
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1455
- case "ValidationException":
1456
- case "com.amazonaws.iottwinmaker#ValidationException":
1457
- throw await de_ValidationExceptionRes(parsedOutput, context);
1458
- default:
1459
- const parsedBody = parsedOutput.body;
1460
- return throwDefaultError({
1461
- output,
1462
- parsedBody,
1463
- errorCode,
1464
- });
1465
- }
1466
- };
1467
- const de_DeleteSceneCommand = async (output, context) => {
1468
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1469
- return de_DeleteSceneCommandError(output, context);
1470
- }
1471
- const contents = (0, smithy_client_1.map)({
1472
- $metadata: deserializeMetadata(output),
1473
- });
1474
- await (0, smithy_client_1.collectBody)(output.body, context);
1475
- return contents;
1476
- };
1477
- exports.de_DeleteSceneCommand = de_DeleteSceneCommand;
1478
- const de_DeleteSceneCommandError = async (output, context) => {
1479
- const parsedOutput = {
1480
- ...output,
1481
- body: await parseErrorBody(output.body, context),
1482
- };
1483
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1484
- switch (errorCode) {
1485
- case "AccessDeniedException":
1486
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
1487
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1488
- case "InternalServerException":
1489
- case "com.amazonaws.iottwinmaker#InternalServerException":
1490
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1491
- case "ResourceNotFoundException":
1492
- case "com.amazonaws.iottwinmaker#ResourceNotFoundException":
1493
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1494
- case "ThrottlingException":
1495
- case "com.amazonaws.iottwinmaker#ThrottlingException":
1496
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1497
- case "ValidationException":
1498
- case "com.amazonaws.iottwinmaker#ValidationException":
1499
- throw await de_ValidationExceptionRes(parsedOutput, context);
1500
- default:
1501
- const parsedBody = parsedOutput.body;
1502
- return throwDefaultError({
1503
- output,
1504
- parsedBody,
1505
- errorCode,
1506
- });
1507
- }
1508
- };
1509
- const de_DeleteSyncJobCommand = async (output, context) => {
1510
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1511
- return de_DeleteSyncJobCommandError(output, context);
1512
- }
1513
- const contents = (0, smithy_client_1.map)({
1514
- $metadata: deserializeMetadata(output),
1515
- });
1516
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1517
- const doc = (0, smithy_client_1.take)(data, {
1518
- state: smithy_client_1.expectString,
1519
- });
1520
- Object.assign(contents, doc);
1521
- return contents;
1522
- };
1523
- exports.de_DeleteSyncJobCommand = de_DeleteSyncJobCommand;
1524
- const de_DeleteSyncJobCommandError = async (output, context) => {
1525
- const parsedOutput = {
1526
- ...output,
1527
- body: await parseErrorBody(output.body, context),
1528
- };
1529
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1530
- switch (errorCode) {
1531
- case "AccessDeniedException":
1532
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
1533
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1534
- case "InternalServerException":
1535
- case "com.amazonaws.iottwinmaker#InternalServerException":
1536
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1537
- case "ResourceNotFoundException":
1538
- case "com.amazonaws.iottwinmaker#ResourceNotFoundException":
1539
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1540
- case "ServiceQuotaExceededException":
1541
- case "com.amazonaws.iottwinmaker#ServiceQuotaExceededException":
1542
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1543
- case "ThrottlingException":
1544
- case "com.amazonaws.iottwinmaker#ThrottlingException":
1545
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1546
- case "ValidationException":
1547
- case "com.amazonaws.iottwinmaker#ValidationException":
1548
- throw await de_ValidationExceptionRes(parsedOutput, context);
1549
- default:
1550
- const parsedBody = parsedOutput.body;
1551
- return throwDefaultError({
1552
- output,
1553
- parsedBody,
1554
- errorCode,
1555
- });
1556
- }
1557
- };
1558
- const de_DeleteWorkspaceCommand = async (output, context) => {
1559
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1560
- return de_DeleteWorkspaceCommandError(output, context);
1561
- }
1562
- const contents = (0, smithy_client_1.map)({
1563
- $metadata: deserializeMetadata(output),
1564
- });
1565
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1566
- const doc = (0, smithy_client_1.take)(data, {
1567
- message: smithy_client_1.expectString,
1568
- });
1569
- Object.assign(contents, doc);
1570
- return contents;
1571
- };
1572
- exports.de_DeleteWorkspaceCommand = de_DeleteWorkspaceCommand;
1573
- const de_DeleteWorkspaceCommandError = async (output, context) => {
1574
- const parsedOutput = {
1575
- ...output,
1576
- body: await parseErrorBody(output.body, context),
1577
- };
1578
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1579
- switch (errorCode) {
1580
- case "AccessDeniedException":
1581
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
1582
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1583
- case "InternalServerException":
1584
- case "com.amazonaws.iottwinmaker#InternalServerException":
1585
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1586
- case "ResourceNotFoundException":
1587
- case "com.amazonaws.iottwinmaker#ResourceNotFoundException":
1588
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1589
- case "ThrottlingException":
1590
- case "com.amazonaws.iottwinmaker#ThrottlingException":
1591
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1592
- case "ValidationException":
1593
- case "com.amazonaws.iottwinmaker#ValidationException":
1594
- throw await de_ValidationExceptionRes(parsedOutput, context);
1595
- default:
1596
- const parsedBody = parsedOutput.body;
1597
- return throwDefaultError({
1598
- output,
1599
- parsedBody,
1600
- errorCode,
1601
- });
1602
- }
1603
- };
1604
- const de_ExecuteQueryCommand = async (output, context) => {
1605
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1606
- return de_ExecuteQueryCommandError(output, context);
1607
- }
1608
- const contents = (0, smithy_client_1.map)({
1609
- $metadata: deserializeMetadata(output),
1610
- });
1611
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1612
- const doc = (0, smithy_client_1.take)(data, {
1613
- columnDescriptions: smithy_client_1._json,
1614
- nextToken: smithy_client_1.expectString,
1615
- rows: (_) => de_Rows(_, context),
1616
- });
1617
- Object.assign(contents, doc);
1618
- return contents;
1619
- };
1620
- exports.de_ExecuteQueryCommand = de_ExecuteQueryCommand;
1621
- const de_ExecuteQueryCommandError = async (output, context) => {
1622
- const parsedOutput = {
1623
- ...output,
1624
- body: await parseErrorBody(output.body, context),
1625
- };
1626
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1627
- switch (errorCode) {
1628
- case "AccessDeniedException":
1629
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
1630
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1631
- case "InternalServerException":
1632
- case "com.amazonaws.iottwinmaker#InternalServerException":
1633
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1634
- case "QueryTimeoutException":
1635
- case "com.amazonaws.iottwinmaker#QueryTimeoutException":
1636
- throw await de_QueryTimeoutExceptionRes(parsedOutput, context);
1637
- case "ServiceQuotaExceededException":
1638
- case "com.amazonaws.iottwinmaker#ServiceQuotaExceededException":
1639
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1640
- case "ThrottlingException":
1641
- case "com.amazonaws.iottwinmaker#ThrottlingException":
1642
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1643
- case "ValidationException":
1644
- case "com.amazonaws.iottwinmaker#ValidationException":
1645
- throw await de_ValidationExceptionRes(parsedOutput, context);
1646
- default:
1647
- const parsedBody = parsedOutput.body;
1648
- return throwDefaultError({
1649
- output,
1650
- parsedBody,
1651
- errorCode,
1652
- });
1653
- }
1654
- };
1655
- const de_GetComponentTypeCommand = async (output, context) => {
1656
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1657
- return de_GetComponentTypeCommandError(output, context);
1658
- }
1659
- const contents = (0, smithy_client_1.map)({
1660
- $metadata: deserializeMetadata(output),
1661
- });
1662
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1663
- const doc = (0, smithy_client_1.take)(data, {
1664
- arn: smithy_client_1.expectString,
1665
- componentTypeId: smithy_client_1.expectString,
1666
- componentTypeName: smithy_client_1.expectString,
1667
- compositeComponentTypes: smithy_client_1._json,
1668
- creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1669
- description: smithy_client_1.expectString,
1670
- extendsFrom: smithy_client_1._json,
1671
- functions: smithy_client_1._json,
1672
- isAbstract: smithy_client_1.expectBoolean,
1673
- isSchemaInitialized: smithy_client_1.expectBoolean,
1674
- isSingleton: smithy_client_1.expectBoolean,
1675
- propertyDefinitions: (_) => de_PropertyDefinitionsResponse(_, context),
1676
- propertyGroups: smithy_client_1._json,
1677
- status: smithy_client_1._json,
1678
- syncSource: smithy_client_1.expectString,
1679
- updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1680
- workspaceId: smithy_client_1.expectString,
1681
- });
1682
- Object.assign(contents, doc);
1683
- return contents;
1684
- };
1685
- exports.de_GetComponentTypeCommand = de_GetComponentTypeCommand;
1686
- const de_GetComponentTypeCommandError = async (output, context) => {
1687
- const parsedOutput = {
1688
- ...output,
1689
- body: await parseErrorBody(output.body, context),
1690
- };
1691
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1692
- switch (errorCode) {
1693
- case "AccessDeniedException":
1694
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
1695
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1696
- case "InternalServerException":
1697
- case "com.amazonaws.iottwinmaker#InternalServerException":
1698
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1699
- case "ResourceNotFoundException":
1700
- case "com.amazonaws.iottwinmaker#ResourceNotFoundException":
1701
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1702
- case "ThrottlingException":
1703
- case "com.amazonaws.iottwinmaker#ThrottlingException":
1704
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1705
- case "ValidationException":
1706
- case "com.amazonaws.iottwinmaker#ValidationException":
1707
- throw await de_ValidationExceptionRes(parsedOutput, context);
1708
- default:
1709
- const parsedBody = parsedOutput.body;
1710
- return throwDefaultError({
1711
- output,
1712
- parsedBody,
1713
- errorCode,
1714
- });
1715
- }
1716
- };
1717
- const de_GetEntityCommand = async (output, context) => {
1718
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1719
- return de_GetEntityCommandError(output, context);
1720
- }
1721
- const contents = (0, smithy_client_1.map)({
1722
- $metadata: deserializeMetadata(output),
1723
- });
1724
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1725
- const doc = (0, smithy_client_1.take)(data, {
1726
- areAllComponentsReturned: smithy_client_1.expectBoolean,
1727
- arn: smithy_client_1.expectString,
1728
- components: (_) => de_ComponentsMap(_, context),
1729
- creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1730
- description: smithy_client_1.expectString,
1731
- entityId: smithy_client_1.expectString,
1732
- entityName: smithy_client_1.expectString,
1733
- hasChildEntities: smithy_client_1.expectBoolean,
1734
- parentEntityId: smithy_client_1.expectString,
1735
- status: smithy_client_1._json,
1736
- syncSource: smithy_client_1.expectString,
1737
- updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1738
- workspaceId: smithy_client_1.expectString,
1739
- });
1740
- Object.assign(contents, doc);
1741
- return contents;
1742
- };
1743
- exports.de_GetEntityCommand = de_GetEntityCommand;
1744
- const de_GetEntityCommandError = async (output, context) => {
1745
- const parsedOutput = {
1746
- ...output,
1747
- body: await parseErrorBody(output.body, context),
1748
- };
1749
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1750
- switch (errorCode) {
1751
- case "InternalServerException":
1752
- case "com.amazonaws.iottwinmaker#InternalServerException":
1753
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1754
- case "ResourceNotFoundException":
1755
- case "com.amazonaws.iottwinmaker#ResourceNotFoundException":
1756
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1757
- case "ServiceQuotaExceededException":
1758
- case "com.amazonaws.iottwinmaker#ServiceQuotaExceededException":
1759
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1760
- case "ThrottlingException":
1761
- case "com.amazonaws.iottwinmaker#ThrottlingException":
1762
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1763
- case "ValidationException":
1764
- case "com.amazonaws.iottwinmaker#ValidationException":
1765
- throw await de_ValidationExceptionRes(parsedOutput, context);
1766
- default:
1767
- const parsedBody = parsedOutput.body;
1768
- return throwDefaultError({
1769
- output,
1770
- parsedBody,
1771
- errorCode,
1772
- });
1773
- }
1774
- };
1775
- const de_GetMetadataTransferJobCommand = async (output, context) => {
1776
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1777
- return de_GetMetadataTransferJobCommandError(output, context);
1778
- }
1779
- const contents = (0, smithy_client_1.map)({
1780
- $metadata: deserializeMetadata(output),
1781
- });
1782
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1783
- const doc = (0, smithy_client_1.take)(data, {
1784
- arn: smithy_client_1.expectString,
1785
- creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1786
- description: smithy_client_1.expectString,
1787
- destination: smithy_client_1._json,
1788
- metadataTransferJobId: smithy_client_1.expectString,
1789
- metadataTransferJobRole: smithy_client_1.expectString,
1790
- progress: smithy_client_1._json,
1791
- reportUrl: smithy_client_1.expectString,
1792
- sources: smithy_client_1._json,
1793
- status: smithy_client_1._json,
1794
- updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1795
- });
1796
- Object.assign(contents, doc);
1797
- return contents;
1798
- };
1799
- exports.de_GetMetadataTransferJobCommand = de_GetMetadataTransferJobCommand;
1800
- const de_GetMetadataTransferJobCommandError = async (output, context) => {
1801
- const parsedOutput = {
1802
- ...output,
1803
- body: await parseErrorBody(output.body, context),
1804
- };
1805
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1806
- switch (errorCode) {
1807
- case "AccessDeniedException":
1808
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
1809
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1810
- case "InternalServerException":
1811
- case "com.amazonaws.iottwinmaker#InternalServerException":
1812
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1813
- case "ResourceNotFoundException":
1814
- case "com.amazonaws.iottwinmaker#ResourceNotFoundException":
1815
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1816
- case "ThrottlingException":
1817
- case "com.amazonaws.iottwinmaker#ThrottlingException":
1818
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1819
- case "ValidationException":
1820
- case "com.amazonaws.iottwinmaker#ValidationException":
1821
- throw await de_ValidationExceptionRes(parsedOutput, context);
1822
- default:
1823
- const parsedBody = parsedOutput.body;
1824
- return throwDefaultError({
1825
- output,
1826
- parsedBody,
1827
- errorCode,
1828
- });
1829
- }
1830
- };
1831
- const de_GetPricingPlanCommand = async (output, context) => {
1832
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1833
- return de_GetPricingPlanCommandError(output, context);
1834
- }
1835
- const contents = (0, smithy_client_1.map)({
1836
- $metadata: deserializeMetadata(output),
1837
- });
1838
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1839
- const doc = (0, smithy_client_1.take)(data, {
1840
- currentPricingPlan: (_) => de_PricingPlan(_, context),
1841
- pendingPricingPlan: (_) => de_PricingPlan(_, context),
1842
- });
1843
- Object.assign(contents, doc);
1844
- return contents;
1845
- };
1846
- exports.de_GetPricingPlanCommand = de_GetPricingPlanCommand;
1847
- const de_GetPricingPlanCommandError = async (output, context) => {
1848
- const parsedOutput = {
1849
- ...output,
1850
- body: await parseErrorBody(output.body, context),
1851
- };
1852
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1853
- switch (errorCode) {
1854
- case "AccessDeniedException":
1855
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
1856
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1857
- case "InternalServerException":
1858
- case "com.amazonaws.iottwinmaker#InternalServerException":
1859
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1860
- case "ThrottlingException":
1861
- case "com.amazonaws.iottwinmaker#ThrottlingException":
1862
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1863
- case "ValidationException":
1864
- case "com.amazonaws.iottwinmaker#ValidationException":
1865
- throw await de_ValidationExceptionRes(parsedOutput, context);
1866
- default:
1867
- const parsedBody = parsedOutput.body;
1868
- return throwDefaultError({
1869
- output,
1870
- parsedBody,
1871
- errorCode,
1872
- });
1873
- }
1874
- };
1875
- const de_GetPropertyValueCommand = async (output, context) => {
1876
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1877
- return de_GetPropertyValueCommandError(output, context);
1878
- }
1879
- const contents = (0, smithy_client_1.map)({
1880
- $metadata: deserializeMetadata(output),
1881
- });
1882
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1883
- const doc = (0, smithy_client_1.take)(data, {
1884
- nextToken: smithy_client_1.expectString,
1885
- propertyValues: (_) => de_PropertyLatestValueMap(_, context),
1886
- tabularPropertyValues: (_) => de_TabularPropertyValues(_, context),
1887
- });
1888
- Object.assign(contents, doc);
1889
- return contents;
1890
- };
1891
- exports.de_GetPropertyValueCommand = de_GetPropertyValueCommand;
1892
- const de_GetPropertyValueCommandError = async (output, context) => {
1893
- const parsedOutput = {
1894
- ...output,
1895
- body: await parseErrorBody(output.body, context),
1896
- };
1897
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1898
- switch (errorCode) {
1899
- case "AccessDeniedException":
1900
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
1901
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1902
- case "ConnectorFailureException":
1903
- case "com.amazonaws.iottwinmaker#ConnectorFailureException":
1904
- throw await de_ConnectorFailureExceptionRes(parsedOutput, context);
1905
- case "ConnectorTimeoutException":
1906
- case "com.amazonaws.iottwinmaker#ConnectorTimeoutException":
1907
- throw await de_ConnectorTimeoutExceptionRes(parsedOutput, context);
1908
- case "InternalServerException":
1909
- case "com.amazonaws.iottwinmaker#InternalServerException":
1910
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1911
- case "ResourceNotFoundException":
1912
- case "com.amazonaws.iottwinmaker#ResourceNotFoundException":
1913
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1914
- case "ThrottlingException":
1915
- case "com.amazonaws.iottwinmaker#ThrottlingException":
1916
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1917
- case "ValidationException":
1918
- case "com.amazonaws.iottwinmaker#ValidationException":
1919
- throw await de_ValidationExceptionRes(parsedOutput, context);
1920
- default:
1921
- const parsedBody = parsedOutput.body;
1922
- return throwDefaultError({
1923
- output,
1924
- parsedBody,
1925
- errorCode,
1926
- });
1927
- }
1928
- };
1929
- const de_GetPropertyValueHistoryCommand = async (output, context) => {
1930
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1931
- return de_GetPropertyValueHistoryCommandError(output, context);
1932
- }
1933
- const contents = (0, smithy_client_1.map)({
1934
- $metadata: deserializeMetadata(output),
1935
- });
1936
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1937
- const doc = (0, smithy_client_1.take)(data, {
1938
- nextToken: smithy_client_1.expectString,
1939
- propertyValues: (_) => de_PropertyValueList(_, context),
1940
- });
1941
- Object.assign(contents, doc);
1942
- return contents;
1943
- };
1944
- exports.de_GetPropertyValueHistoryCommand = de_GetPropertyValueHistoryCommand;
1945
- const de_GetPropertyValueHistoryCommandError = async (output, context) => {
1946
- const parsedOutput = {
1947
- ...output,
1948
- body: await parseErrorBody(output.body, context),
1949
- };
1950
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1951
- switch (errorCode) {
1952
- case "AccessDeniedException":
1953
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
1954
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1955
- case "ConnectorFailureException":
1956
- case "com.amazonaws.iottwinmaker#ConnectorFailureException":
1957
- throw await de_ConnectorFailureExceptionRes(parsedOutput, context);
1958
- case "ConnectorTimeoutException":
1959
- case "com.amazonaws.iottwinmaker#ConnectorTimeoutException":
1960
- throw await de_ConnectorTimeoutExceptionRes(parsedOutput, context);
1961
- case "InternalServerException":
1962
- case "com.amazonaws.iottwinmaker#InternalServerException":
1963
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1964
- case "ResourceNotFoundException":
1965
- case "com.amazonaws.iottwinmaker#ResourceNotFoundException":
1966
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1967
- case "ThrottlingException":
1968
- case "com.amazonaws.iottwinmaker#ThrottlingException":
1969
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1970
- case "ValidationException":
1971
- case "com.amazonaws.iottwinmaker#ValidationException":
1972
- throw await de_ValidationExceptionRes(parsedOutput, context);
1973
- default:
1974
- const parsedBody = parsedOutput.body;
1975
- return throwDefaultError({
1976
- output,
1977
- parsedBody,
1978
- errorCode,
1979
- });
1980
- }
1981
- };
1982
- const de_GetSceneCommand = async (output, context) => {
1983
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1984
- return de_GetSceneCommandError(output, context);
1985
- }
1986
- const contents = (0, smithy_client_1.map)({
1987
- $metadata: deserializeMetadata(output),
1988
- });
1989
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1990
- const doc = (0, smithy_client_1.take)(data, {
1991
- arn: smithy_client_1.expectString,
1992
- capabilities: smithy_client_1._json,
1993
- contentLocation: smithy_client_1.expectString,
1994
- creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1995
- description: smithy_client_1.expectString,
1996
- error: smithy_client_1._json,
1997
- generatedSceneMetadata: smithy_client_1._json,
1998
- sceneId: smithy_client_1.expectString,
1999
- sceneMetadata: smithy_client_1._json,
2000
- updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2001
- workspaceId: smithy_client_1.expectString,
2002
- });
2003
- Object.assign(contents, doc);
2004
- return contents;
2005
- };
2006
- exports.de_GetSceneCommand = de_GetSceneCommand;
2007
- const de_GetSceneCommandError = async (output, context) => {
2008
- const parsedOutput = {
2009
- ...output,
2010
- body: await parseErrorBody(output.body, context),
2011
- };
2012
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2013
- switch (errorCode) {
2014
- case "AccessDeniedException":
2015
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
2016
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2017
- case "InternalServerException":
2018
- case "com.amazonaws.iottwinmaker#InternalServerException":
2019
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2020
- case "ResourceNotFoundException":
2021
- case "com.amazonaws.iottwinmaker#ResourceNotFoundException":
2022
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2023
- case "ThrottlingException":
2024
- case "com.amazonaws.iottwinmaker#ThrottlingException":
2025
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2026
- case "ValidationException":
2027
- case "com.amazonaws.iottwinmaker#ValidationException":
2028
- throw await de_ValidationExceptionRes(parsedOutput, context);
2029
- default:
2030
- const parsedBody = parsedOutput.body;
2031
- return throwDefaultError({
2032
- output,
2033
- parsedBody,
2034
- errorCode,
2035
- });
2036
- }
2037
- };
2038
- const de_GetSyncJobCommand = async (output, context) => {
2039
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2040
- return de_GetSyncJobCommandError(output, context);
2041
- }
2042
- const contents = (0, smithy_client_1.map)({
2043
- $metadata: deserializeMetadata(output),
2044
- });
2045
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2046
- const doc = (0, smithy_client_1.take)(data, {
2047
- arn: smithy_client_1.expectString,
2048
- creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2049
- status: smithy_client_1._json,
2050
- syncRole: smithy_client_1.expectString,
2051
- syncSource: smithy_client_1.expectString,
2052
- updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2053
- workspaceId: smithy_client_1.expectString,
2054
- });
2055
- Object.assign(contents, doc);
2056
- return contents;
2057
- };
2058
- exports.de_GetSyncJobCommand = de_GetSyncJobCommand;
2059
- const de_GetSyncJobCommandError = async (output, context) => {
2060
- const parsedOutput = {
2061
- ...output,
2062
- body: await parseErrorBody(output.body, context),
2063
- };
2064
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2065
- switch (errorCode) {
2066
- case "AccessDeniedException":
2067
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
2068
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2069
- case "InternalServerException":
2070
- case "com.amazonaws.iottwinmaker#InternalServerException":
2071
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2072
- case "ResourceNotFoundException":
2073
- case "com.amazonaws.iottwinmaker#ResourceNotFoundException":
2074
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2075
- case "ServiceQuotaExceededException":
2076
- case "com.amazonaws.iottwinmaker#ServiceQuotaExceededException":
2077
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2078
- case "ThrottlingException":
2079
- case "com.amazonaws.iottwinmaker#ThrottlingException":
2080
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2081
- case "ValidationException":
2082
- case "com.amazonaws.iottwinmaker#ValidationException":
2083
- throw await de_ValidationExceptionRes(parsedOutput, context);
2084
- default:
2085
- const parsedBody = parsedOutput.body;
2086
- return throwDefaultError({
2087
- output,
2088
- parsedBody,
2089
- errorCode,
2090
- });
2091
- }
2092
- };
2093
- const de_GetWorkspaceCommand = async (output, context) => {
2094
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2095
- return de_GetWorkspaceCommandError(output, context);
2096
- }
2097
- const contents = (0, smithy_client_1.map)({
2098
- $metadata: deserializeMetadata(output),
2099
- });
2100
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2101
- const doc = (0, smithy_client_1.take)(data, {
2102
- arn: smithy_client_1.expectString,
2103
- creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2104
- description: smithy_client_1.expectString,
2105
- linkedServices: smithy_client_1._json,
2106
- role: smithy_client_1.expectString,
2107
- s3Location: smithy_client_1.expectString,
2108
- updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2109
- workspaceId: smithy_client_1.expectString,
2110
- });
2111
- Object.assign(contents, doc);
2112
- return contents;
2113
- };
2114
- exports.de_GetWorkspaceCommand = de_GetWorkspaceCommand;
2115
- const de_GetWorkspaceCommandError = async (output, context) => {
2116
- const parsedOutput = {
2117
- ...output,
2118
- body: await parseErrorBody(output.body, context),
2119
- };
2120
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2121
- switch (errorCode) {
2122
- case "InternalServerException":
2123
- case "com.amazonaws.iottwinmaker#InternalServerException":
2124
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2125
- case "ResourceNotFoundException":
2126
- case "com.amazonaws.iottwinmaker#ResourceNotFoundException":
2127
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2128
- case "ServiceQuotaExceededException":
2129
- case "com.amazonaws.iottwinmaker#ServiceQuotaExceededException":
2130
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2131
- case "ThrottlingException":
2132
- case "com.amazonaws.iottwinmaker#ThrottlingException":
2133
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2134
- case "ValidationException":
2135
- case "com.amazonaws.iottwinmaker#ValidationException":
2136
- throw await de_ValidationExceptionRes(parsedOutput, context);
2137
- default:
2138
- const parsedBody = parsedOutput.body;
2139
- return throwDefaultError({
2140
- output,
2141
- parsedBody,
2142
- errorCode,
2143
- });
2144
- }
2145
- };
2146
- const de_ListComponentsCommand = async (output, context) => {
2147
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2148
- return de_ListComponentsCommandError(output, context);
2149
- }
2150
- const contents = (0, smithy_client_1.map)({
2151
- $metadata: deserializeMetadata(output),
2152
- });
2153
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2154
- const doc = (0, smithy_client_1.take)(data, {
2155
- componentSummaries: smithy_client_1._json,
2156
- nextToken: smithy_client_1.expectString,
2157
- });
2158
- Object.assign(contents, doc);
2159
- return contents;
2160
- };
2161
- exports.de_ListComponentsCommand = de_ListComponentsCommand;
2162
- const de_ListComponentsCommandError = async (output, context) => {
2163
- const parsedOutput = {
2164
- ...output,
2165
- body: await parseErrorBody(output.body, context),
2166
- };
2167
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2168
- switch (errorCode) {
2169
- case "AccessDeniedException":
2170
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
2171
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2172
- case "InternalServerException":
2173
- case "com.amazonaws.iottwinmaker#InternalServerException":
2174
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2175
- case "ResourceNotFoundException":
2176
- case "com.amazonaws.iottwinmaker#ResourceNotFoundException":
2177
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2178
- case "ThrottlingException":
2179
- case "com.amazonaws.iottwinmaker#ThrottlingException":
2180
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2181
- case "ValidationException":
2182
- case "com.amazonaws.iottwinmaker#ValidationException":
2183
- throw await de_ValidationExceptionRes(parsedOutput, context);
2184
- default:
2185
- const parsedBody = parsedOutput.body;
2186
- return throwDefaultError({
2187
- output,
2188
- parsedBody,
2189
- errorCode,
2190
- });
2191
- }
2192
- };
2193
- const de_ListComponentTypesCommand = async (output, context) => {
2194
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2195
- return de_ListComponentTypesCommandError(output, context);
2196
- }
2197
- const contents = (0, smithy_client_1.map)({
2198
- $metadata: deserializeMetadata(output),
2199
- });
2200
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2201
- const doc = (0, smithy_client_1.take)(data, {
2202
- componentTypeSummaries: (_) => de_ComponentTypeSummaries(_, context),
2203
- maxResults: smithy_client_1.expectInt32,
2204
- nextToken: smithy_client_1.expectString,
2205
- workspaceId: smithy_client_1.expectString,
2206
- });
2207
- Object.assign(contents, doc);
2208
- return contents;
2209
- };
2210
- exports.de_ListComponentTypesCommand = de_ListComponentTypesCommand;
2211
- const de_ListComponentTypesCommandError = async (output, context) => {
2212
- const parsedOutput = {
2213
- ...output,
2214
- body: await parseErrorBody(output.body, context),
2215
- };
2216
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2217
- switch (errorCode) {
2218
- case "AccessDeniedException":
2219
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
2220
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2221
- case "InternalServerException":
2222
- case "com.amazonaws.iottwinmaker#InternalServerException":
2223
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2224
- case "ThrottlingException":
2225
- case "com.amazonaws.iottwinmaker#ThrottlingException":
2226
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2227
- case "ValidationException":
2228
- case "com.amazonaws.iottwinmaker#ValidationException":
2229
- throw await de_ValidationExceptionRes(parsedOutput, context);
2230
- default:
2231
- const parsedBody = parsedOutput.body;
2232
- return throwDefaultError({
2233
- output,
2234
- parsedBody,
2235
- errorCode,
2236
- });
2237
- }
2238
- };
2239
- const de_ListEntitiesCommand = async (output, context) => {
2240
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2241
- return de_ListEntitiesCommandError(output, context);
2242
- }
2243
- const contents = (0, smithy_client_1.map)({
2244
- $metadata: deserializeMetadata(output),
2245
- });
2246
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2247
- const doc = (0, smithy_client_1.take)(data, {
2248
- entitySummaries: (_) => de_EntitySummaries(_, context),
2249
- nextToken: smithy_client_1.expectString,
2250
- });
2251
- Object.assign(contents, doc);
2252
- return contents;
2253
- };
2254
- exports.de_ListEntitiesCommand = de_ListEntitiesCommand;
2255
- const de_ListEntitiesCommandError = async (output, context) => {
2256
- const parsedOutput = {
2257
- ...output,
2258
- body: await parseErrorBody(output.body, context),
2259
- };
2260
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2261
- switch (errorCode) {
2262
- case "InternalServerException":
2263
- case "com.amazonaws.iottwinmaker#InternalServerException":
2264
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2265
- case "ServiceQuotaExceededException":
2266
- case "com.amazonaws.iottwinmaker#ServiceQuotaExceededException":
2267
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2268
- case "ThrottlingException":
2269
- case "com.amazonaws.iottwinmaker#ThrottlingException":
2270
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2271
- case "ValidationException":
2272
- case "com.amazonaws.iottwinmaker#ValidationException":
2273
- throw await de_ValidationExceptionRes(parsedOutput, context);
2274
- default:
2275
- const parsedBody = parsedOutput.body;
2276
- return throwDefaultError({
2277
- output,
2278
- parsedBody,
2279
- errorCode,
2280
- });
2281
- }
2282
- };
2283
- const de_ListMetadataTransferJobsCommand = async (output, context) => {
2284
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2285
- return de_ListMetadataTransferJobsCommandError(output, context);
2286
- }
2287
- const contents = (0, smithy_client_1.map)({
2288
- $metadata: deserializeMetadata(output),
2289
- });
2290
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2291
- const doc = (0, smithy_client_1.take)(data, {
2292
- metadataTransferJobSummaries: (_) => de_MetadataTransferJobSummaries(_, context),
2293
- nextToken: smithy_client_1.expectString,
2294
- });
2295
- Object.assign(contents, doc);
2296
- return contents;
2297
- };
2298
- exports.de_ListMetadataTransferJobsCommand = de_ListMetadataTransferJobsCommand;
2299
- const de_ListMetadataTransferJobsCommandError = async (output, context) => {
2300
- const parsedOutput = {
2301
- ...output,
2302
- body: await parseErrorBody(output.body, context),
2303
- };
2304
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2305
- switch (errorCode) {
2306
- case "AccessDeniedException":
2307
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
2308
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2309
- case "InternalServerException":
2310
- case "com.amazonaws.iottwinmaker#InternalServerException":
2311
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2312
- case "ThrottlingException":
2313
- case "com.amazonaws.iottwinmaker#ThrottlingException":
2314
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2315
- case "ValidationException":
2316
- case "com.amazonaws.iottwinmaker#ValidationException":
2317
- throw await de_ValidationExceptionRes(parsedOutput, context);
2318
- default:
2319
- const parsedBody = parsedOutput.body;
2320
- return throwDefaultError({
2321
- output,
2322
- parsedBody,
2323
- errorCode,
2324
- });
2325
- }
2326
- };
2327
- const de_ListPropertiesCommand = async (output, context) => {
2328
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2329
- return de_ListPropertiesCommandError(output, context);
2330
- }
2331
- const contents = (0, smithy_client_1.map)({
2332
- $metadata: deserializeMetadata(output),
2333
- });
2334
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2335
- const doc = (0, smithy_client_1.take)(data, {
2336
- nextToken: smithy_client_1.expectString,
2337
- propertySummaries: (_) => de_PropertySummaries(_, context),
2338
- });
2339
- Object.assign(contents, doc);
2340
- return contents;
2341
- };
2342
- exports.de_ListPropertiesCommand = de_ListPropertiesCommand;
2343
- const de_ListPropertiesCommandError = async (output, context) => {
2344
- const parsedOutput = {
2345
- ...output,
2346
- body: await parseErrorBody(output.body, context),
2347
- };
2348
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2349
- switch (errorCode) {
2350
- case "AccessDeniedException":
2351
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
2352
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2353
- case "InternalServerException":
2354
- case "com.amazonaws.iottwinmaker#InternalServerException":
2355
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2356
- case "ResourceNotFoundException":
2357
- case "com.amazonaws.iottwinmaker#ResourceNotFoundException":
2358
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2359
- case "ThrottlingException":
2360
- case "com.amazonaws.iottwinmaker#ThrottlingException":
2361
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2362
- case "ValidationException":
2363
- case "com.amazonaws.iottwinmaker#ValidationException":
2364
- throw await de_ValidationExceptionRes(parsedOutput, context);
2365
- default:
2366
- const parsedBody = parsedOutput.body;
2367
- return throwDefaultError({
2368
- output,
2369
- parsedBody,
2370
- errorCode,
2371
- });
2372
- }
2373
- };
2374
- const de_ListScenesCommand = async (output, context) => {
2375
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2376
- return de_ListScenesCommandError(output, context);
2377
- }
2378
- const contents = (0, smithy_client_1.map)({
2379
- $metadata: deserializeMetadata(output),
2380
- });
2381
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2382
- const doc = (0, smithy_client_1.take)(data, {
2383
- nextToken: smithy_client_1.expectString,
2384
- sceneSummaries: (_) => de_SceneSummaries(_, context),
2385
- });
2386
- Object.assign(contents, doc);
2387
- return contents;
2388
- };
2389
- exports.de_ListScenesCommand = de_ListScenesCommand;
2390
- const de_ListScenesCommandError = async (output, context) => {
2391
- const parsedOutput = {
2392
- ...output,
2393
- body: await parseErrorBody(output.body, context),
2394
- };
2395
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2396
- switch (errorCode) {
2397
- case "AccessDeniedException":
2398
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
2399
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2400
- case "InternalServerException":
2401
- case "com.amazonaws.iottwinmaker#InternalServerException":
2402
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2403
- case "ThrottlingException":
2404
- case "com.amazonaws.iottwinmaker#ThrottlingException":
2405
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2406
- case "ValidationException":
2407
- case "com.amazonaws.iottwinmaker#ValidationException":
2408
- throw await de_ValidationExceptionRes(parsedOutput, context);
2409
- default:
2410
- const parsedBody = parsedOutput.body;
2411
- return throwDefaultError({
2412
- output,
2413
- parsedBody,
2414
- errorCode,
2415
- });
2416
- }
2417
- };
2418
- const de_ListSyncJobsCommand = async (output, context) => {
2419
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2420
- return de_ListSyncJobsCommandError(output, context);
2421
- }
2422
- const contents = (0, smithy_client_1.map)({
2423
- $metadata: deserializeMetadata(output),
2424
- });
2425
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2426
- const doc = (0, smithy_client_1.take)(data, {
2427
- nextToken: smithy_client_1.expectString,
2428
- syncJobSummaries: (_) => de_SyncJobSummaries(_, context),
2429
- });
2430
- Object.assign(contents, doc);
2431
- return contents;
2432
- };
2433
- exports.de_ListSyncJobsCommand = de_ListSyncJobsCommand;
2434
- const de_ListSyncJobsCommandError = async (output, context) => {
2435
- const parsedOutput = {
2436
- ...output,
2437
- body: await parseErrorBody(output.body, context),
2438
- };
2439
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2440
- switch (errorCode) {
2441
- case "AccessDeniedException":
2442
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
2443
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2444
- case "InternalServerException":
2445
- case "com.amazonaws.iottwinmaker#InternalServerException":
2446
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2447
- case "ServiceQuotaExceededException":
2448
- case "com.amazonaws.iottwinmaker#ServiceQuotaExceededException":
2449
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2450
- case "ThrottlingException":
2451
- case "com.amazonaws.iottwinmaker#ThrottlingException":
2452
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2453
- case "ValidationException":
2454
- case "com.amazonaws.iottwinmaker#ValidationException":
2455
- throw await de_ValidationExceptionRes(parsedOutput, context);
2456
- default:
2457
- const parsedBody = parsedOutput.body;
2458
- return throwDefaultError({
2459
- output,
2460
- parsedBody,
2461
- errorCode,
2462
- });
2463
- }
2464
- };
2465
- const de_ListSyncResourcesCommand = async (output, context) => {
2466
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2467
- return de_ListSyncResourcesCommandError(output, context);
2468
- }
2469
- const contents = (0, smithy_client_1.map)({
2470
- $metadata: deserializeMetadata(output),
2471
- });
2472
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2473
- const doc = (0, smithy_client_1.take)(data, {
2474
- nextToken: smithy_client_1.expectString,
2475
- syncResources: (_) => de_SyncResourceSummaries(_, context),
2476
- });
2477
- Object.assign(contents, doc);
2478
- return contents;
2479
- };
2480
- exports.de_ListSyncResourcesCommand = de_ListSyncResourcesCommand;
2481
- const de_ListSyncResourcesCommandError = async (output, context) => {
2482
- const parsedOutput = {
2483
- ...output,
2484
- body: await parseErrorBody(output.body, context),
2485
- };
2486
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2487
- switch (errorCode) {
2488
- case "AccessDeniedException":
2489
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
2490
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2491
- case "InternalServerException":
2492
- case "com.amazonaws.iottwinmaker#InternalServerException":
2493
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2494
- case "ServiceQuotaExceededException":
2495
- case "com.amazonaws.iottwinmaker#ServiceQuotaExceededException":
2496
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2497
- case "ThrottlingException":
2498
- case "com.amazonaws.iottwinmaker#ThrottlingException":
2499
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2500
- case "ValidationException":
2501
- case "com.amazonaws.iottwinmaker#ValidationException":
2502
- throw await de_ValidationExceptionRes(parsedOutput, context);
2503
- default:
2504
- const parsedBody = parsedOutput.body;
2505
- return throwDefaultError({
2506
- output,
2507
- parsedBody,
2508
- errorCode,
2509
- });
2510
- }
2511
- };
2512
- const de_ListTagsForResourceCommand = async (output, context) => {
2513
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2514
- return de_ListTagsForResourceCommandError(output, context);
2515
- }
2516
- const contents = (0, smithy_client_1.map)({
2517
- $metadata: deserializeMetadata(output),
2518
- });
2519
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2520
- const doc = (0, smithy_client_1.take)(data, {
2521
- nextToken: smithy_client_1.expectString,
2522
- tags: smithy_client_1._json,
2523
- });
2524
- Object.assign(contents, doc);
2525
- return contents;
2526
- };
2527
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
2528
- const de_ListTagsForResourceCommandError = async (output, context) => {
2529
- const parsedOutput = {
2530
- ...output,
2531
- body: await parseErrorBody(output.body, context),
2532
- };
2533
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2534
- switch (errorCode) {
2535
- case "AccessDeniedException":
2536
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
2537
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2538
- case "ResourceNotFoundException":
2539
- case "com.amazonaws.iottwinmaker#ResourceNotFoundException":
2540
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2541
- default:
2542
- const parsedBody = parsedOutput.body;
2543
- return throwDefaultError({
2544
- output,
2545
- parsedBody,
2546
- errorCode,
2547
- });
2548
- }
2549
- };
2550
- const de_ListWorkspacesCommand = async (output, context) => {
2551
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2552
- return de_ListWorkspacesCommandError(output, context);
2553
- }
2554
- const contents = (0, smithy_client_1.map)({
2555
- $metadata: deserializeMetadata(output),
2556
- });
2557
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2558
- const doc = (0, smithy_client_1.take)(data, {
2559
- nextToken: smithy_client_1.expectString,
2560
- workspaceSummaries: (_) => de_WorkspaceSummaries(_, context),
2561
- });
2562
- Object.assign(contents, doc);
2563
- return contents;
2564
- };
2565
- exports.de_ListWorkspacesCommand = de_ListWorkspacesCommand;
2566
- const de_ListWorkspacesCommandError = async (output, context) => {
2567
- const parsedOutput = {
2568
- ...output,
2569
- body: await parseErrorBody(output.body, context),
2570
- };
2571
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2572
- switch (errorCode) {
2573
- case "InternalServerException":
2574
- case "com.amazonaws.iottwinmaker#InternalServerException":
2575
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2576
- case "ServiceQuotaExceededException":
2577
- case "com.amazonaws.iottwinmaker#ServiceQuotaExceededException":
2578
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2579
- case "ThrottlingException":
2580
- case "com.amazonaws.iottwinmaker#ThrottlingException":
2581
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2582
- case "ValidationException":
2583
- case "com.amazonaws.iottwinmaker#ValidationException":
2584
- throw await de_ValidationExceptionRes(parsedOutput, context);
2585
- default:
2586
- const parsedBody = parsedOutput.body;
2587
- return throwDefaultError({
2588
- output,
2589
- parsedBody,
2590
- errorCode,
2591
- });
2592
- }
2593
- };
2594
- const de_TagResourceCommand = async (output, context) => {
2595
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2596
- return de_TagResourceCommandError(output, context);
2597
- }
2598
- const contents = (0, smithy_client_1.map)({
2599
- $metadata: deserializeMetadata(output),
2600
- });
2601
- await (0, smithy_client_1.collectBody)(output.body, context);
2602
- return contents;
2603
- };
2604
- exports.de_TagResourceCommand = de_TagResourceCommand;
2605
- const de_TagResourceCommandError = async (output, context) => {
2606
- const parsedOutput = {
2607
- ...output,
2608
- body: await parseErrorBody(output.body, context),
2609
- };
2610
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2611
- switch (errorCode) {
2612
- case "AccessDeniedException":
2613
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
2614
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2615
- case "ResourceNotFoundException":
2616
- case "com.amazonaws.iottwinmaker#ResourceNotFoundException":
2617
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2618
- case "TooManyTagsException":
2619
- case "com.amazonaws.iottwinmaker#TooManyTagsException":
2620
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
2621
- default:
2622
- const parsedBody = parsedOutput.body;
2623
- return throwDefaultError({
2624
- output,
2625
- parsedBody,
2626
- errorCode,
2627
- });
2628
- }
2629
- };
2630
- const de_UntagResourceCommand = async (output, context) => {
2631
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2632
- return de_UntagResourceCommandError(output, context);
2633
- }
2634
- const contents = (0, smithy_client_1.map)({
2635
- $metadata: deserializeMetadata(output),
2636
- });
2637
- await (0, smithy_client_1.collectBody)(output.body, context);
2638
- return contents;
2639
- };
2640
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
2641
- const de_UntagResourceCommandError = async (output, context) => {
2642
- const parsedOutput = {
2643
- ...output,
2644
- body: await parseErrorBody(output.body, context),
2645
- };
2646
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2647
- switch (errorCode) {
2648
- case "AccessDeniedException":
2649
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
2650
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2651
- case "ResourceNotFoundException":
2652
- case "com.amazonaws.iottwinmaker#ResourceNotFoundException":
2653
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2654
- default:
2655
- const parsedBody = parsedOutput.body;
2656
- return throwDefaultError({
2657
- output,
2658
- parsedBody,
2659
- errorCode,
2660
- });
2661
- }
2662
- };
2663
- const de_UpdateComponentTypeCommand = async (output, context) => {
2664
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2665
- return de_UpdateComponentTypeCommandError(output, context);
2666
- }
2667
- const contents = (0, smithy_client_1.map)({
2668
- $metadata: deserializeMetadata(output),
2669
- });
2670
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2671
- const doc = (0, smithy_client_1.take)(data, {
2672
- arn: smithy_client_1.expectString,
2673
- componentTypeId: smithy_client_1.expectString,
2674
- state: smithy_client_1.expectString,
2675
- workspaceId: smithy_client_1.expectString,
2676
- });
2677
- Object.assign(contents, doc);
2678
- return contents;
2679
- };
2680
- exports.de_UpdateComponentTypeCommand = de_UpdateComponentTypeCommand;
2681
- const de_UpdateComponentTypeCommandError = async (output, context) => {
2682
- const parsedOutput = {
2683
- ...output,
2684
- body: await parseErrorBody(output.body, context),
2685
- };
2686
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2687
- switch (errorCode) {
2688
- case "AccessDeniedException":
2689
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
2690
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2691
- case "InternalServerException":
2692
- case "com.amazonaws.iottwinmaker#InternalServerException":
2693
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2694
- case "ResourceNotFoundException":
2695
- case "com.amazonaws.iottwinmaker#ResourceNotFoundException":
2696
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2697
- case "ServiceQuotaExceededException":
2698
- case "com.amazonaws.iottwinmaker#ServiceQuotaExceededException":
2699
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2700
- case "ThrottlingException":
2701
- case "com.amazonaws.iottwinmaker#ThrottlingException":
2702
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2703
- case "ValidationException":
2704
- case "com.amazonaws.iottwinmaker#ValidationException":
2705
- throw await de_ValidationExceptionRes(parsedOutput, context);
2706
- default:
2707
- const parsedBody = parsedOutput.body;
2708
- return throwDefaultError({
2709
- output,
2710
- parsedBody,
2711
- errorCode,
2712
- });
2713
- }
2714
- };
2715
- const de_UpdateEntityCommand = async (output, context) => {
2716
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2717
- return de_UpdateEntityCommandError(output, context);
2718
- }
2719
- const contents = (0, smithy_client_1.map)({
2720
- $metadata: deserializeMetadata(output),
2721
- });
2722
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2723
- const doc = (0, smithy_client_1.take)(data, {
2724
- state: smithy_client_1.expectString,
2725
- updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2726
- });
2727
- Object.assign(contents, doc);
2728
- return contents;
2729
- };
2730
- exports.de_UpdateEntityCommand = de_UpdateEntityCommand;
2731
- const de_UpdateEntityCommandError = async (output, context) => {
2732
- const parsedOutput = {
2733
- ...output,
2734
- body: await parseErrorBody(output.body, context),
2735
- };
2736
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2737
- switch (errorCode) {
2738
- case "AccessDeniedException":
2739
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
2740
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2741
- case "ConflictException":
2742
- case "com.amazonaws.iottwinmaker#ConflictException":
2743
- throw await de_ConflictExceptionRes(parsedOutput, context);
2744
- case "InternalServerException":
2745
- case "com.amazonaws.iottwinmaker#InternalServerException":
2746
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2747
- case "ResourceNotFoundException":
2748
- case "com.amazonaws.iottwinmaker#ResourceNotFoundException":
2749
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2750
- case "ServiceQuotaExceededException":
2751
- case "com.amazonaws.iottwinmaker#ServiceQuotaExceededException":
2752
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2753
- case "ThrottlingException":
2754
- case "com.amazonaws.iottwinmaker#ThrottlingException":
2755
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2756
- case "ValidationException":
2757
- case "com.amazonaws.iottwinmaker#ValidationException":
2758
- throw await de_ValidationExceptionRes(parsedOutput, context);
2759
- default:
2760
- const parsedBody = parsedOutput.body;
2761
- return throwDefaultError({
2762
- output,
2763
- parsedBody,
2764
- errorCode,
2765
- });
2766
- }
2767
- };
2768
- const de_UpdatePricingPlanCommand = async (output, context) => {
2769
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2770
- return de_UpdatePricingPlanCommandError(output, context);
2771
- }
2772
- const contents = (0, smithy_client_1.map)({
2773
- $metadata: deserializeMetadata(output),
2774
- });
2775
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2776
- const doc = (0, smithy_client_1.take)(data, {
2777
- currentPricingPlan: (_) => de_PricingPlan(_, context),
2778
- pendingPricingPlan: (_) => de_PricingPlan(_, context),
2779
- });
2780
- Object.assign(contents, doc);
2781
- return contents;
2782
- };
2783
- exports.de_UpdatePricingPlanCommand = de_UpdatePricingPlanCommand;
2784
- const de_UpdatePricingPlanCommandError = async (output, context) => {
2785
- const parsedOutput = {
2786
- ...output,
2787
- body: await parseErrorBody(output.body, context),
2788
- };
2789
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2790
- switch (errorCode) {
2791
- case "AccessDeniedException":
2792
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
2793
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2794
- case "InternalServerException":
2795
- case "com.amazonaws.iottwinmaker#InternalServerException":
2796
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2797
- case "ThrottlingException":
2798
- case "com.amazonaws.iottwinmaker#ThrottlingException":
2799
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2800
- case "ValidationException":
2801
- case "com.amazonaws.iottwinmaker#ValidationException":
2802
- throw await de_ValidationExceptionRes(parsedOutput, context);
2803
- default:
2804
- const parsedBody = parsedOutput.body;
2805
- return throwDefaultError({
2806
- output,
2807
- parsedBody,
2808
- errorCode,
2809
- });
2810
- }
2811
- };
2812
- const de_UpdateSceneCommand = async (output, context) => {
2813
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2814
- return de_UpdateSceneCommandError(output, context);
2815
- }
2816
- const contents = (0, smithy_client_1.map)({
2817
- $metadata: deserializeMetadata(output),
2818
- });
2819
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2820
- const doc = (0, smithy_client_1.take)(data, {
2821
- updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2822
- });
2823
- Object.assign(contents, doc);
2824
- return contents;
2825
- };
2826
- exports.de_UpdateSceneCommand = de_UpdateSceneCommand;
2827
- const de_UpdateSceneCommandError = async (output, context) => {
2828
- const parsedOutput = {
2829
- ...output,
2830
- body: await parseErrorBody(output.body, context),
2831
- };
2832
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2833
- switch (errorCode) {
2834
- case "AccessDeniedException":
2835
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
2836
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2837
- case "InternalServerException":
2838
- case "com.amazonaws.iottwinmaker#InternalServerException":
2839
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2840
- case "ResourceNotFoundException":
2841
- case "com.amazonaws.iottwinmaker#ResourceNotFoundException":
2842
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2843
- case "ThrottlingException":
2844
- case "com.amazonaws.iottwinmaker#ThrottlingException":
2845
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2846
- case "ValidationException":
2847
- case "com.amazonaws.iottwinmaker#ValidationException":
2848
- throw await de_ValidationExceptionRes(parsedOutput, context);
2849
- default:
2850
- const parsedBody = parsedOutput.body;
2851
- return throwDefaultError({
2852
- output,
2853
- parsedBody,
2854
- errorCode,
2855
- });
2856
- }
2857
- };
2858
- const de_UpdateWorkspaceCommand = async (output, context) => {
2859
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2860
- return de_UpdateWorkspaceCommandError(output, context);
2861
- }
2862
- const contents = (0, smithy_client_1.map)({
2863
- $metadata: deserializeMetadata(output),
2864
- });
2865
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2866
- const doc = (0, smithy_client_1.take)(data, {
2867
- updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2868
- });
2869
- Object.assign(contents, doc);
2870
- return contents;
2871
- };
2872
- exports.de_UpdateWorkspaceCommand = de_UpdateWorkspaceCommand;
2873
- const de_UpdateWorkspaceCommandError = async (output, context) => {
2874
- const parsedOutput = {
2875
- ...output,
2876
- body: await parseErrorBody(output.body, context),
2877
- };
2878
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2879
- switch (errorCode) {
2880
- case "AccessDeniedException":
2881
- case "com.amazonaws.iottwinmaker#AccessDeniedException":
2882
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2883
- case "InternalServerException":
2884
- case "com.amazonaws.iottwinmaker#InternalServerException":
2885
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2886
- case "ResourceNotFoundException":
2887
- case "com.amazonaws.iottwinmaker#ResourceNotFoundException":
2888
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2889
- case "ServiceQuotaExceededException":
2890
- case "com.amazonaws.iottwinmaker#ServiceQuotaExceededException":
2891
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2892
- case "ThrottlingException":
2893
- case "com.amazonaws.iottwinmaker#ThrottlingException":
2894
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2895
- case "ValidationException":
2896
- case "com.amazonaws.iottwinmaker#ValidationException":
2897
- throw await de_ValidationExceptionRes(parsedOutput, context);
2898
- default:
2899
- const parsedBody = parsedOutput.body;
2900
- return throwDefaultError({
2901
- output,
2902
- parsedBody,
2903
- errorCode,
2904
- });
2905
- }
2906
- };
2907
- const throwDefaultError = (0, smithy_client_1.withBaseException)(IoTTwinMakerServiceException_1.IoTTwinMakerServiceException);
2908
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2909
- const contents = (0, smithy_client_1.map)({});
2910
- const data = parsedOutput.body;
2911
- const doc = (0, smithy_client_1.take)(data, {
2912
- message: smithy_client_1.expectString,
2913
- });
2914
- Object.assign(contents, doc);
2915
- const exception = new models_0_1.AccessDeniedException({
2916
- $metadata: deserializeMetadata(parsedOutput),
2917
- ...contents,
2918
- });
2919
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2920
- };
2921
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
2922
- const contents = (0, smithy_client_1.map)({});
2923
- const data = parsedOutput.body;
2924
- const doc = (0, smithy_client_1.take)(data, {
2925
- message: smithy_client_1.expectString,
2926
- });
2927
- Object.assign(contents, doc);
2928
- const exception = new models_0_1.ConflictException({
2929
- $metadata: deserializeMetadata(parsedOutput),
2930
- ...contents,
2931
- });
2932
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2933
- };
2934
- const de_ConnectorFailureExceptionRes = async (parsedOutput, context) => {
2935
- const contents = (0, smithy_client_1.map)({});
2936
- const data = parsedOutput.body;
2937
- const doc = (0, smithy_client_1.take)(data, {
2938
- message: smithy_client_1.expectString,
2939
- });
2940
- Object.assign(contents, doc);
2941
- const exception = new models_0_1.ConnectorFailureException({
2942
- $metadata: deserializeMetadata(parsedOutput),
2943
- ...contents,
2944
- });
2945
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2946
- };
2947
- const de_ConnectorTimeoutExceptionRes = async (parsedOutput, context) => {
2948
- const contents = (0, smithy_client_1.map)({});
2949
- const data = parsedOutput.body;
2950
- const doc = (0, smithy_client_1.take)(data, {
2951
- message: smithy_client_1.expectString,
2952
- });
2953
- Object.assign(contents, doc);
2954
- const exception = new models_0_1.ConnectorTimeoutException({
2955
- $metadata: deserializeMetadata(parsedOutput),
2956
- ...contents,
2957
- });
2958
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2959
- };
2960
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2961
- const contents = (0, smithy_client_1.map)({});
2962
- const data = parsedOutput.body;
2963
- const doc = (0, smithy_client_1.take)(data, {
2964
- message: smithy_client_1.expectString,
2965
- });
2966
- Object.assign(contents, doc);
2967
- const exception = new models_0_1.InternalServerException({
2968
- $metadata: deserializeMetadata(parsedOutput),
2969
- ...contents,
2970
- });
2971
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2972
- };
2973
- const de_QueryTimeoutExceptionRes = async (parsedOutput, context) => {
2974
- const contents = (0, smithy_client_1.map)({});
2975
- const data = parsedOutput.body;
2976
- const doc = (0, smithy_client_1.take)(data, {
2977
- message: smithy_client_1.expectString,
2978
- });
2979
- Object.assign(contents, doc);
2980
- const exception = new models_0_1.QueryTimeoutException({
2981
- $metadata: deserializeMetadata(parsedOutput),
2982
- ...contents,
2983
- });
2984
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2985
- };
2986
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2987
- const contents = (0, smithy_client_1.map)({});
2988
- const data = parsedOutput.body;
2989
- const doc = (0, smithy_client_1.take)(data, {
2990
- message: smithy_client_1.expectString,
2991
- });
2992
- Object.assign(contents, doc);
2993
- const exception = new models_0_1.ResourceNotFoundException({
2994
- $metadata: deserializeMetadata(parsedOutput),
2995
- ...contents,
2996
- });
2997
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2998
- };
2999
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
3000
- const contents = (0, smithy_client_1.map)({});
3001
- const data = parsedOutput.body;
3002
- const doc = (0, smithy_client_1.take)(data, {
3003
- message: smithy_client_1.expectString,
3004
- });
3005
- Object.assign(contents, doc);
3006
- const exception = new models_0_1.ServiceQuotaExceededException({
3007
- $metadata: deserializeMetadata(parsedOutput),
3008
- ...contents,
3009
- });
3010
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3011
- };
3012
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
3013
- const contents = (0, smithy_client_1.map)({});
3014
- const data = parsedOutput.body;
3015
- const doc = (0, smithy_client_1.take)(data, {
3016
- message: smithy_client_1.expectString,
3017
- });
3018
- Object.assign(contents, doc);
3019
- const exception = new models_0_1.ThrottlingException({
3020
- $metadata: deserializeMetadata(parsedOutput),
3021
- ...contents,
3022
- });
3023
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3024
- };
3025
- const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
3026
- const contents = (0, smithy_client_1.map)({});
3027
- const data = parsedOutput.body;
3028
- const doc = (0, smithy_client_1.take)(data, {
3029
- message: smithy_client_1.expectString,
3030
- });
3031
- Object.assign(contents, doc);
3032
- const exception = new models_0_1.TooManyTagsException({
3033
- $metadata: deserializeMetadata(parsedOutput),
3034
- ...contents,
3035
- });
3036
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3037
- };
3038
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
3039
- const contents = (0, smithy_client_1.map)({});
3040
- const data = parsedOutput.body;
3041
- const doc = (0, smithy_client_1.take)(data, {
3042
- message: smithy_client_1.expectString,
3043
- });
3044
- Object.assign(contents, doc);
3045
- const exception = new models_0_1.ValidationException({
3046
- $metadata: deserializeMetadata(parsedOutput),
3047
- ...contents,
3048
- });
3049
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3050
- };
3051
- const se_ComponentRequest = (input, context) => {
3052
- return (0, smithy_client_1.take)(input, {
3053
- componentTypeId: [],
3054
- description: [],
3055
- properties: (_) => se_PropertyRequests(_, context),
3056
- propertyGroups: smithy_client_1._json,
3057
- });
3058
- };
3059
- const se_ComponentsMapRequest = (input, context) => {
3060
- return Object.entries(input).reduce((acc, [key, value]) => {
3061
- if (value === null) {
3062
- return acc;
3063
- }
3064
- acc[key] = se_ComponentRequest(value, context);
3065
- return acc;
3066
- }, {});
3067
- };
3068
- const se_ComponentUpdateRequest = (input, context) => {
3069
- return (0, smithy_client_1.take)(input, {
3070
- componentTypeId: [],
3071
- description: [],
3072
- propertyGroupUpdates: smithy_client_1._json,
3073
- propertyUpdates: (_) => se_PropertyRequests(_, context),
3074
- updateType: [],
3075
- });
3076
- };
3077
- const se_ComponentUpdatesMapRequest = (input, context) => {
3078
- return Object.entries(input).reduce((acc, [key, value]) => {
3079
- if (value === null) {
3080
- return acc;
3081
- }
3082
- acc[key] = se_ComponentUpdateRequest(value, context);
3083
- return acc;
3084
- }, {});
3085
- };
3086
- const se_CompositeComponentRequest = (input, context) => {
3087
- return (0, smithy_client_1.take)(input, {
3088
- description: [],
3089
- properties: (_) => se_PropertyRequests(_, context),
3090
- propertyGroups: smithy_client_1._json,
3091
- });
3092
- };
3093
- const se_CompositeComponentsMapRequest = (input, context) => {
3094
- return Object.entries(input).reduce((acc, [key, value]) => {
3095
- if (value === null) {
3096
- return acc;
3097
- }
3098
- acc[key] = se_CompositeComponentRequest(value, context);
3099
- return acc;
3100
- }, {});
3101
- };
3102
- const se_CompositeComponentUpdateRequest = (input, context) => {
3103
- return (0, smithy_client_1.take)(input, {
3104
- description: [],
3105
- propertyGroupUpdates: smithy_client_1._json,
3106
- propertyUpdates: (_) => se_PropertyRequests(_, context),
3107
- updateType: [],
3108
- });
3109
- };
3110
- const se_CompositeComponentUpdatesMapRequest = (input, context) => {
3111
- return Object.entries(input).reduce((acc, [key, value]) => {
3112
- if (value === null) {
3113
- return acc;
3114
- }
3115
- acc[key] = se_CompositeComponentUpdateRequest(value, context);
3116
- return acc;
3117
- }, {});
3118
- };
3119
- const se_DataType = (input, context) => {
3120
- return (0, smithy_client_1.take)(input, {
3121
- allowedValues: (_) => se_DataValueList(_, context),
3122
- nestedType: (_) => se_DataType(_, context),
3123
- relationship: smithy_client_1._json,
3124
- type: [],
3125
- unitOfMeasure: [],
3126
- });
3127
- };
3128
- const se_DataValue = (input, context) => {
3129
- return (0, smithy_client_1.take)(input, {
3130
- booleanValue: [],
3131
- doubleValue: smithy_client_1.serializeFloat,
3132
- expression: [],
3133
- integerValue: [],
3134
- listValue: (_) => se_DataValueList(_, context),
3135
- longValue: [],
3136
- mapValue: (_) => se_DataValueMap(_, context),
3137
- relationshipValue: smithy_client_1._json,
3138
- stringValue: [],
3139
- });
3140
- };
3141
- const se_DataValueList = (input, context) => {
3142
- return input
3143
- .filter((e) => e != null)
3144
- .map((entry) => {
3145
- return se_DataValue(entry, context);
3146
- });
3147
- };
3148
- const se_DataValueMap = (input, context) => {
3149
- return Object.entries(input).reduce((acc, [key, value]) => {
3150
- if (value === null) {
3151
- return acc;
3152
- }
3153
- acc[key] = se_DataValue(value, context);
3154
- return acc;
3155
- }, {});
3156
- };
3157
- const se_Entries = (input, context) => {
3158
- return input
3159
- .filter((e) => e != null)
3160
- .map((entry) => {
3161
- return se_PropertyValueEntry(entry, context);
3162
- });
3163
- };
3164
- const se_PropertyDefinitionRequest = (input, context) => {
3165
- return (0, smithy_client_1.take)(input, {
3166
- configuration: smithy_client_1._json,
3167
- dataType: (_) => se_DataType(_, context),
3168
- defaultValue: (_) => se_DataValue(_, context),
3169
- displayName: [],
3170
- isExternalId: [],
3171
- isRequiredInEntity: [],
3172
- isStoredExternally: [],
3173
- isTimeSeries: [],
3174
- });
3175
- };
3176
- const se_PropertyDefinitionsRequest = (input, context) => {
3177
- return Object.entries(input).reduce((acc, [key, value]) => {
3178
- if (value === null) {
3179
- return acc;
3180
- }
3181
- acc[key] = se_PropertyDefinitionRequest(value, context);
3182
- return acc;
3183
- }, {});
3184
- };
3185
- const se_PropertyFilter = (input, context) => {
3186
- return (0, smithy_client_1.take)(input, {
3187
- operator: [],
3188
- propertyName: [],
3189
- value: (_) => se_DataValue(_, context),
3190
- });
3191
- };
3192
- const se_PropertyFilters = (input, context) => {
3193
- return input
3194
- .filter((e) => e != null)
3195
- .map((entry) => {
3196
- return se_PropertyFilter(entry, context);
3197
- });
3198
- };
3199
- const se_PropertyRequest = (input, context) => {
3200
- return (0, smithy_client_1.take)(input, {
3201
- definition: (_) => se_PropertyDefinitionRequest(_, context),
3202
- updateType: [],
3203
- value: (_) => se_DataValue(_, context),
3204
- });
3205
- };
3206
- const se_PropertyRequests = (input, context) => {
3207
- return Object.entries(input).reduce((acc, [key, value]) => {
3208
- if (value === null) {
3209
- return acc;
3210
- }
3211
- acc[key] = se_PropertyRequest(value, context);
3212
- return acc;
3213
- }, {});
3214
- };
3215
- const se_PropertyValue = (input, context) => {
3216
- return (0, smithy_client_1.take)(input, {
3217
- time: [],
3218
- timestamp: (_) => Math.round(_.getTime() / 1000),
3219
- value: (_) => se_DataValue(_, context),
3220
- });
3221
- };
3222
- const se_PropertyValueEntry = (input, context) => {
3223
- return (0, smithy_client_1.take)(input, {
3224
- entityPropertyReference: smithy_client_1._json,
3225
- propertyValues: (_) => se_PropertyValues(_, context),
3226
- });
3227
- };
3228
- const se_PropertyValues = (input, context) => {
3229
- return input
3230
- .filter((e) => e != null)
3231
- .map((entry) => {
3232
- return se_PropertyValue(entry, context);
3233
- });
3234
- };
3235
- const se_TabularConditions = (input, context) => {
3236
- return (0, smithy_client_1.take)(input, {
3237
- orderBy: smithy_client_1._json,
3238
- propertyFilters: (_) => se_PropertyFilters(_, context),
3239
- });
3240
- };
3241
- const de_BatchPutPropertyError = (output, context) => {
3242
- return (0, smithy_client_1.take)(output, {
3243
- entry: (_) => de_PropertyValueEntry(_, context),
3244
- errorCode: smithy_client_1.expectString,
3245
- errorMessage: smithy_client_1.expectString,
3246
- });
3247
- };
3248
- const de_BatchPutPropertyErrorEntry = (output, context) => {
3249
- return (0, smithy_client_1.take)(output, {
3250
- errors: (_) => de_Errors(_, context),
3251
- });
3252
- };
3253
- const de_ComponentResponse = (output, context) => {
3254
- return (0, smithy_client_1.take)(output, {
3255
- areAllCompositeComponentsReturned: smithy_client_1.expectBoolean,
3256
- areAllPropertiesReturned: smithy_client_1.expectBoolean,
3257
- componentName: smithy_client_1.expectString,
3258
- componentTypeId: smithy_client_1.expectString,
3259
- compositeComponents: smithy_client_1._json,
3260
- definedIn: smithy_client_1.expectString,
3261
- description: smithy_client_1.expectString,
3262
- properties: (_) => de_PropertyResponses(_, context),
3263
- propertyGroups: smithy_client_1._json,
3264
- status: smithy_client_1._json,
3265
- syncSource: smithy_client_1.expectString,
3266
- });
3267
- };
3268
- const de_ComponentsMap = (output, context) => {
3269
- return Object.entries(output).reduce((acc, [key, value]) => {
3270
- if (value === null) {
3271
- return acc;
3272
- }
3273
- acc[key] = de_ComponentResponse(value, context);
3274
- return acc;
3275
- }, {});
3276
- };
3277
- const de_ComponentTypeSummaries = (output, context) => {
3278
- const retVal = (output || [])
3279
- .filter((e) => e != null)
3280
- .map((entry) => {
3281
- return de_ComponentTypeSummary(entry, context);
3282
- });
3283
- return retVal;
3284
- };
3285
- const de_ComponentTypeSummary = (output, context) => {
3286
- return (0, smithy_client_1.take)(output, {
3287
- arn: smithy_client_1.expectString,
3288
- componentTypeId: smithy_client_1.expectString,
3289
- componentTypeName: smithy_client_1.expectString,
3290
- creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3291
- description: smithy_client_1.expectString,
3292
- status: smithy_client_1._json,
3293
- updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3294
- });
3295
- };
3296
- const de_DataType = (output, context) => {
3297
- return (0, smithy_client_1.take)(output, {
3298
- allowedValues: (_) => de_DataValueList(_, context),
3299
- nestedType: (_) => de_DataType(_, context),
3300
- relationship: smithy_client_1._json,
3301
- type: smithy_client_1.expectString,
3302
- unitOfMeasure: smithy_client_1.expectString,
3303
- });
3304
- };
3305
- const de_DataValue = (output, context) => {
3306
- return (0, smithy_client_1.take)(output, {
3307
- booleanValue: smithy_client_1.expectBoolean,
3308
- doubleValue: smithy_client_1.limitedParseDouble,
3309
- expression: smithy_client_1.expectString,
3310
- integerValue: smithy_client_1.expectInt32,
3311
- listValue: (_) => de_DataValueList(_, context),
3312
- longValue: smithy_client_1.expectLong,
3313
- mapValue: (_) => de_DataValueMap(_, context),
3314
- relationshipValue: smithy_client_1._json,
3315
- stringValue: smithy_client_1.expectString,
3316
- });
3317
- };
3318
- const de_DataValueList = (output, context) => {
3319
- const retVal = (output || [])
3320
- .filter((e) => e != null)
3321
- .map((entry) => {
3322
- return de_DataValue(entry, context);
3323
- });
3324
- return retVal;
3325
- };
3326
- const de_DataValueMap = (output, context) => {
3327
- return Object.entries(output).reduce((acc, [key, value]) => {
3328
- if (value === null) {
3329
- return acc;
3330
- }
3331
- acc[key] = de_DataValue(value, context);
3332
- return acc;
3333
- }, {});
3334
- };
3335
- const de_EntitySummaries = (output, context) => {
3336
- const retVal = (output || [])
3337
- .filter((e) => e != null)
3338
- .map((entry) => {
3339
- return de_EntitySummary(entry, context);
3340
- });
3341
- return retVal;
3342
- };
3343
- const de_EntitySummary = (output, context) => {
3344
- return (0, smithy_client_1.take)(output, {
3345
- arn: smithy_client_1.expectString,
3346
- creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3347
- description: smithy_client_1.expectString,
3348
- entityId: smithy_client_1.expectString,
3349
- entityName: smithy_client_1.expectString,
3350
- hasChildEntities: smithy_client_1.expectBoolean,
3351
- parentEntityId: smithy_client_1.expectString,
3352
- status: smithy_client_1._json,
3353
- updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3354
- });
3355
- };
3356
- const de_ErrorEntries = (output, context) => {
3357
- const retVal = (output || [])
3358
- .filter((e) => e != null)
3359
- .map((entry) => {
3360
- return de_BatchPutPropertyErrorEntry(entry, context);
3361
- });
3362
- return retVal;
3363
- };
3364
- const de_Errors = (output, context) => {
3365
- const retVal = (output || [])
3366
- .filter((e) => e != null)
3367
- .map((entry) => {
3368
- return de_BatchPutPropertyError(entry, context);
3369
- });
3370
- return retVal;
3371
- };
3372
- const de_MetadataTransferJobSummaries = (output, context) => {
3373
- const retVal = (output || [])
3374
- .filter((e) => e != null)
3375
- .map((entry) => {
3376
- return de_MetadataTransferJobSummary(entry, context);
3377
- });
3378
- return retVal;
3379
- };
3380
- const de_MetadataTransferJobSummary = (output, context) => {
3381
- return (0, smithy_client_1.take)(output, {
3382
- arn: smithy_client_1.expectString,
3383
- creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3384
- metadataTransferJobId: smithy_client_1.expectString,
3385
- progress: smithy_client_1._json,
3386
- status: smithy_client_1._json,
3387
- updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3388
- });
3389
- };
3390
- const de_PricingPlan = (output, context) => {
3391
- return (0, smithy_client_1.take)(output, {
3392
- billableEntityCount: smithy_client_1.expectLong,
3393
- bundleInformation: smithy_client_1._json,
3394
- effectiveDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3395
- pricingMode: smithy_client_1.expectString,
3396
- updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3397
- updateReason: smithy_client_1.expectString,
3398
- });
3399
- };
3400
- const de_PropertyDefinitionResponse = (output, context) => {
3401
- return (0, smithy_client_1.take)(output, {
3402
- configuration: smithy_client_1._json,
3403
- dataType: (_) => de_DataType(_, context),
3404
- defaultValue: (_) => de_DataValue(_, context),
3405
- displayName: smithy_client_1.expectString,
3406
- isExternalId: smithy_client_1.expectBoolean,
3407
- isFinal: smithy_client_1.expectBoolean,
3408
- isImported: smithy_client_1.expectBoolean,
3409
- isInherited: smithy_client_1.expectBoolean,
3410
- isRequiredInEntity: smithy_client_1.expectBoolean,
3411
- isStoredExternally: smithy_client_1.expectBoolean,
3412
- isTimeSeries: smithy_client_1.expectBoolean,
3413
- });
3414
- };
3415
- const de_PropertyDefinitionsResponse = (output, context) => {
3416
- return Object.entries(output).reduce((acc, [key, value]) => {
3417
- if (value === null) {
3418
- return acc;
3419
- }
3420
- acc[key] = de_PropertyDefinitionResponse(value, context);
3421
- return acc;
3422
- }, {});
3423
- };
3424
- const de_PropertyLatestValue = (output, context) => {
3425
- return (0, smithy_client_1.take)(output, {
3426
- propertyReference: smithy_client_1._json,
3427
- propertyValue: (_) => de_DataValue(_, context),
3428
- });
3429
- };
3430
- const de_PropertyLatestValueMap = (output, context) => {
3431
- return Object.entries(output).reduce((acc, [key, value]) => {
3432
- if (value === null) {
3433
- return acc;
3434
- }
3435
- acc[key] = de_PropertyLatestValue(value, context);
3436
- return acc;
3437
- }, {});
3438
- };
3439
- const de_PropertyResponse = (output, context) => {
3440
- return (0, smithy_client_1.take)(output, {
3441
- areAllPropertyValuesReturned: smithy_client_1.expectBoolean,
3442
- definition: (_) => de_PropertyDefinitionResponse(_, context),
3443
- value: (_) => de_DataValue(_, context),
3444
- });
3445
- };
3446
- const de_PropertyResponses = (output, context) => {
3447
- return Object.entries(output).reduce((acc, [key, value]) => {
3448
- if (value === null) {
3449
- return acc;
3450
- }
3451
- acc[key] = de_PropertyResponse(value, context);
3452
- return acc;
3453
- }, {});
3454
- };
3455
- const de_PropertySummaries = (output, context) => {
3456
- const retVal = (output || [])
3457
- .filter((e) => e != null)
3458
- .map((entry) => {
3459
- return de_PropertySummary(entry, context);
3460
- });
3461
- return retVal;
3462
- };
3463
- const de_PropertySummary = (output, context) => {
3464
- return (0, smithy_client_1.take)(output, {
3465
- areAllPropertyValuesReturned: smithy_client_1.expectBoolean,
3466
- definition: (_) => de_PropertyDefinitionResponse(_, context),
3467
- propertyName: smithy_client_1.expectString,
3468
- value: (_) => de_DataValue(_, context),
3469
- });
3470
- };
3471
- const de_PropertyTableValue = (output, context) => {
3472
- return Object.entries(output).reduce((acc, [key, value]) => {
3473
- if (value === null) {
3474
- return acc;
3475
- }
3476
- acc[key] = de_DataValue(value, context);
3477
- return acc;
3478
- }, {});
3479
- };
3480
- const de_PropertyValue = (output, context) => {
3481
- return (0, smithy_client_1.take)(output, {
3482
- time: smithy_client_1.expectString,
3483
- timestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3484
- value: (_) => de_DataValue(_, context),
3485
- });
3486
- };
3487
- const de_PropertyValueEntry = (output, context) => {
3488
- return (0, smithy_client_1.take)(output, {
3489
- entityPropertyReference: smithy_client_1._json,
3490
- propertyValues: (_) => de_PropertyValues(_, context),
3491
- });
3492
- };
3493
- const de_PropertyValueHistory = (output, context) => {
3494
- return (0, smithy_client_1.take)(output, {
3495
- entityPropertyReference: smithy_client_1._json,
3496
- values: (_) => de_Values(_, context),
3497
- });
3498
- };
3499
- const de_PropertyValueList = (output, context) => {
3500
- const retVal = (output || [])
3501
- .filter((e) => e != null)
3502
- .map((entry) => {
3503
- return de_PropertyValueHistory(entry, context);
3504
- });
3505
- return retVal;
3506
- };
3507
- const de_PropertyValues = (output, context) => {
3508
- const retVal = (output || [])
3509
- .filter((e) => e != null)
3510
- .map((entry) => {
3511
- return de_PropertyValue(entry, context);
3512
- });
3513
- return retVal;
3514
- };
3515
- const de_QueryResultValue = (output, context) => {
3516
- return output;
3517
- };
3518
- const de_Row = (output, context) => {
3519
- return (0, smithy_client_1.take)(output, {
3520
- rowData: (_) => de_RowData(_, context),
3521
- });
3522
- };
3523
- const de_RowData = (output, context) => {
3524
- const retVal = (output || [])
3525
- .filter((e) => e != null)
3526
- .map((entry) => {
3527
- return de_QueryResultValue(entry, context);
3528
- });
3529
- return retVal;
3530
- };
3531
- const de_Rows = (output, context) => {
3532
- const retVal = (output || [])
3533
- .filter((e) => e != null)
3534
- .map((entry) => {
3535
- return de_Row(entry, context);
3536
- });
3537
- return retVal;
3538
- };
3539
- const de_SceneSummaries = (output, context) => {
3540
- const retVal = (output || [])
3541
- .filter((e) => e != null)
3542
- .map((entry) => {
3543
- return de_SceneSummary(entry, context);
3544
- });
3545
- return retVal;
3546
- };
3547
- const de_SceneSummary = (output, context) => {
3548
- return (0, smithy_client_1.take)(output, {
3549
- arn: smithy_client_1.expectString,
3550
- contentLocation: smithy_client_1.expectString,
3551
- creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3552
- description: smithy_client_1.expectString,
3553
- sceneId: smithy_client_1.expectString,
3554
- updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3555
- });
3556
- };
3557
- const de_SyncJobSummaries = (output, context) => {
3558
- const retVal = (output || [])
3559
- .filter((e) => e != null)
3560
- .map((entry) => {
3561
- return de_SyncJobSummary(entry, context);
3562
- });
3563
- return retVal;
3564
- };
3565
- const de_SyncJobSummary = (output, context) => {
3566
- return (0, smithy_client_1.take)(output, {
3567
- arn: smithy_client_1.expectString,
3568
- creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3569
- status: smithy_client_1._json,
3570
- syncSource: smithy_client_1.expectString,
3571
- updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3572
- workspaceId: smithy_client_1.expectString,
3573
- });
3574
- };
3575
- const de_SyncResourceSummaries = (output, context) => {
3576
- const retVal = (output || [])
3577
- .filter((e) => e != null)
3578
- .map((entry) => {
3579
- return de_SyncResourceSummary(entry, context);
3580
- });
3581
- return retVal;
3582
- };
3583
- const de_SyncResourceSummary = (output, context) => {
3584
- return (0, smithy_client_1.take)(output, {
3585
- externalId: smithy_client_1.expectString,
3586
- resourceId: smithy_client_1.expectString,
3587
- resourceType: smithy_client_1.expectString,
3588
- status: smithy_client_1._json,
3589
- updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3590
- });
3591
- };
3592
- const de_TabularPropertyValue = (output, context) => {
3593
- const retVal = (output || [])
3594
- .filter((e) => e != null)
3595
- .map((entry) => {
3596
- return de_PropertyTableValue(entry, context);
3597
- });
3598
- return retVal;
3599
- };
3600
- const de_TabularPropertyValues = (output, context) => {
3601
- const retVal = (output || [])
3602
- .filter((e) => e != null)
3603
- .map((entry) => {
3604
- return de_TabularPropertyValue(entry, context);
3605
- });
3606
- return retVal;
3607
- };
3608
- const de_Values = (output, context) => {
3609
- const retVal = (output || [])
3610
- .filter((e) => e != null)
3611
- .map((entry) => {
3612
- return de_PropertyValue(entry, context);
3613
- });
3614
- return retVal;
3615
- };
3616
- const de_WorkspaceSummaries = (output, context) => {
3617
- const retVal = (output || [])
3618
- .filter((e) => e != null)
3619
- .map((entry) => {
3620
- return de_WorkspaceSummary(entry, context);
3621
- });
3622
- return retVal;
3623
- };
3624
- const de_WorkspaceSummary = (output, context) => {
3625
- return (0, smithy_client_1.take)(output, {
3626
- arn: smithy_client_1.expectString,
3627
- creationDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3628
- description: smithy_client_1.expectString,
3629
- linkedServices: smithy_client_1._json,
3630
- updateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3631
- workspaceId: smithy_client_1.expectString,
3632
- });
3633
- };
3634
- const deserializeMetadata = (output) => ({
3635
- httpStatusCode: output.statusCode,
3636
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
3637
- extendedRequestId: output.headers["x-amz-id-2"],
3638
- cfId: output.headers["x-amz-cf-id"],
3639
- });
3640
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
3641
- const isSerializableHeaderValue = (value) => value !== undefined &&
3642
- value !== null &&
3643
- value !== "" &&
3644
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
3645
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
3646
- const _iR = "isRecursive";
3647
- const _rARN = "resourceARN";
3648
- const _tK = "tagKeys";
3649
- const _w = "workspace";
3650
- const _wI = "workspaceId";
3651
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
3652
- if (encoded.length) {
3653
- return JSON.parse(encoded);
3654
- }
3655
- return {};
3656
- });
3657
- const parseErrorBody = async (errorBody, context) => {
3658
- const value = await parseBody(errorBody, context);
3659
- value.message = value.message ?? value.Message;
3660
- return value;
3661
- };
3662
- const loadRestJsonErrorCode = (output, data) => {
3663
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
3664
- const sanitizeErrorCode = (rawValue) => {
3665
- let cleanValue = rawValue;
3666
- if (typeof cleanValue === "number") {
3667
- cleanValue = cleanValue.toString();
3668
- }
3669
- if (cleanValue.indexOf(",") >= 0) {
3670
- cleanValue = cleanValue.split(",")[0];
3671
- }
3672
- if (cleanValue.indexOf(":") >= 0) {
3673
- cleanValue = cleanValue.split(":")[0];
3674
- }
3675
- if (cleanValue.indexOf("#") >= 0) {
3676
- cleanValue = cleanValue.split("#")[1];
3677
- }
3678
- return cleanValue;
3679
- };
3680
- const headerKey = findKey(output.headers, "x-amzn-errortype");
3681
- if (headerKey !== undefined) {
3682
- return sanitizeErrorCode(output.headers[headerKey]);
3683
- }
3684
- if (data.code !== undefined) {
3685
- return sanitizeErrorCode(data.code);
3686
- }
3687
- if (data["__type"] !== undefined) {
3688
- return sanitizeErrorCode(data["__type"]);
3689
- }
3690
- };
1
+ module.exports = require("../index.js");