@aws-sdk/client-iottwinmaker 3.224.0 → 3.227.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 (55) hide show
  1. package/dist-cjs/IoTTwinMaker.js +75 -0
  2. package/dist-cjs/commands/CreateSyncJobCommand.js +46 -0
  3. package/dist-cjs/commands/DeleteSyncJobCommand.js +46 -0
  4. package/dist-cjs/commands/GetSyncJobCommand.js +46 -0
  5. package/dist-cjs/commands/ListSyncJobsCommand.js +46 -0
  6. package/dist-cjs/commands/ListSyncResourcesCommand.js +46 -0
  7. package/dist-cjs/commands/index.js +5 -0
  8. package/dist-cjs/endpoint/ruleset.js +1 -10
  9. package/dist-cjs/models/models_0.js +111 -3
  10. package/dist-cjs/pagination/ListSyncJobsPaginator.js +36 -0
  11. package/dist-cjs/pagination/ListSyncResourcesPaginator.js +36 -0
  12. package/dist-cjs/pagination/index.js +2 -0
  13. package/dist-cjs/protocols/Aws_restJson1.js +510 -2
  14. package/dist-es/IoTTwinMaker.js +75 -0
  15. package/dist-es/commands/CreateSyncJobCommand.js +42 -0
  16. package/dist-es/commands/DeleteSyncJobCommand.js +42 -0
  17. package/dist-es/commands/GetSyncJobCommand.js +42 -0
  18. package/dist-es/commands/ListSyncJobsCommand.js +42 -0
  19. package/dist-es/commands/ListSyncResourcesCommand.js +42 -0
  20. package/dist-es/commands/index.js +5 -0
  21. package/dist-es/endpoint/ruleset.js +1 -10
  22. package/dist-es/models/models_0.js +93 -0
  23. package/dist-es/pagination/ListSyncJobsPaginator.js +32 -0
  24. package/dist-es/pagination/ListSyncResourcesPaginator.js +32 -0
  25. package/dist-es/pagination/index.js +2 -0
  26. package/dist-es/protocols/Aws_restJson1.js +499 -1
  27. package/dist-types/IoTTwinMaker.d.ts +35 -0
  28. package/dist-types/IoTTwinMakerClient.d.ts +7 -2
  29. package/dist-types/commands/CreateSyncJobCommand.d.ts +37 -0
  30. package/dist-types/commands/DeleteSyncJobCommand.d.ts +37 -0
  31. package/dist-types/commands/GetSyncJobCommand.d.ts +37 -0
  32. package/dist-types/commands/ListSyncJobsCommand.d.ts +37 -0
  33. package/dist-types/commands/ListSyncResourcesCommand.d.ts +37 -0
  34. package/dist-types/commands/index.d.ts +5 -0
  35. package/dist-types/endpoint/EndpointParameters.d.ts +1 -1
  36. package/dist-types/models/models_0.d.ts +421 -1
  37. package/dist-types/pagination/ListSyncJobsPaginator.d.ts +4 -0
  38. package/dist-types/pagination/ListSyncResourcesPaginator.d.ts +4 -0
  39. package/dist-types/pagination/index.d.ts +2 -0
  40. package/dist-types/protocols/Aws_restJson1.d.ts +15 -0
  41. package/dist-types/ts3.4/IoTTwinMaker.d.ts +85 -0
  42. package/dist-types/ts3.4/IoTTwinMakerClient.d.ts +30 -0
  43. package/dist-types/ts3.4/commands/CreateSyncJobCommand.d.ts +37 -0
  44. package/dist-types/ts3.4/commands/DeleteSyncJobCommand.d.ts +37 -0
  45. package/dist-types/ts3.4/commands/GetSyncJobCommand.d.ts +34 -0
  46. package/dist-types/ts3.4/commands/ListSyncJobsCommand.d.ts +34 -0
  47. package/dist-types/ts3.4/commands/ListSyncResourcesCommand.d.ts +38 -0
  48. package/dist-types/ts3.4/commands/index.d.ts +5 -0
  49. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +1 -1
  50. package/dist-types/ts3.4/models/models_0.d.ts +200 -0
  51. package/dist-types/ts3.4/pagination/ListSyncJobsPaginator.d.ts +11 -0
  52. package/dist-types/ts3.4/pagination/ListSyncResourcesPaginator.d.ts +11 -0
  53. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  54. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +60 -0
  55. package/package.json +28 -28
@@ -1,7 +1,7 @@
1
1
  import { HttpRequest as __HttpRequest, isValidHostname as __isValidHostname, } from "@aws-sdk/protocol-http";
2
2
  import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, throwDefaultError, } from "@aws-sdk/smithy-client";
3
3
  import { IoTTwinMakerServiceException as __BaseException } from "../models/IoTTwinMakerServiceException";
4
- import { AccessDeniedException, ConflictException, ConnectorFailureException, ConnectorTimeoutException, InternalServerException, ListComponentTypesFilter, ListEntitiesFilter, QueryTimeoutException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, TooManyTagsException, ValidationException, } from "../models/models_0";
4
+ import { AccessDeniedException, ConflictException, ConnectorFailureException, ConnectorTimeoutException, InternalServerException, ListComponentTypesFilter, ListEntitiesFilter, QueryTimeoutException, ResourceNotFoundException, ServiceQuotaExceededException, SyncResourceFilter, ThrottlingException, TooManyTagsException, ValidationException, } from "../models/models_0";
5
5
  export const serializeAws_restJson1BatchPutPropertyValuesCommand = async (input, context) => {
6
6
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
7
  const headers = {
@@ -42,6 +42,7 @@ export const serializeAws_restJson1CreateComponentTypeCommand = async (input, co
42
42
  resolvedPath = __resolvedPath(resolvedPath, input, "componentTypeId", () => input.componentTypeId, "{componentTypeId}", false);
43
43
  let body;
44
44
  body = JSON.stringify({
45
+ ...(input.componentTypeName != null && { componentTypeName: input.componentTypeName }),
45
46
  ...(input.description != null && { description: input.description }),
46
47
  ...(input.extendsFrom != null && { extendsFrom: serializeAws_restJson1ExtendsFrom(input.extendsFrom, context) }),
47
48
  ...(input.functions != null && { functions: serializeAws_restJson1FunctionsRequest(input.functions, context) }),
@@ -140,6 +141,37 @@ export const serializeAws_restJson1CreateSceneCommand = async (input, context) =
140
141
  body,
141
142
  });
142
143
  };
144
+ export const serializeAws_restJson1CreateSyncJobCommand = async (input, context) => {
145
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
146
+ const headers = {
147
+ "content-type": "application/json",
148
+ };
149
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
150
+ "/workspaces/{workspaceId}/sync-jobs/{syncSource}";
151
+ resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
152
+ resolvedPath = __resolvedPath(resolvedPath, input, "syncSource", () => input.syncSource, "{syncSource}", false);
153
+ let body;
154
+ body = JSON.stringify({
155
+ ...(input.syncRole != null && { syncRole: input.syncRole }),
156
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
157
+ });
158
+ let { hostname: resolvedHostname } = await context.endpoint();
159
+ if (context.disableHostPrefix !== true) {
160
+ resolvedHostname = "api." + resolvedHostname;
161
+ if (!__isValidHostname(resolvedHostname)) {
162
+ throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
163
+ }
164
+ }
165
+ return new __HttpRequest({
166
+ protocol,
167
+ hostname: resolvedHostname,
168
+ port,
169
+ method: "POST",
170
+ headers,
171
+ path: resolvedPath,
172
+ body,
173
+ });
174
+ };
143
175
  export const serializeAws_restJson1CreateWorkspaceCommand = async (input, context) => {
144
176
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
145
177
  const headers = {
@@ -250,6 +282,31 @@ export const serializeAws_restJson1DeleteSceneCommand = async (input, context) =
250
282
  body,
251
283
  });
252
284
  };
285
+ export const serializeAws_restJson1DeleteSyncJobCommand = async (input, context) => {
286
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
287
+ const headers = {};
288
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
289
+ "/workspaces/{workspaceId}/sync-jobs/{syncSource}";
290
+ resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
291
+ resolvedPath = __resolvedPath(resolvedPath, input, "syncSource", () => input.syncSource, "{syncSource}", false);
292
+ let body;
293
+ let { hostname: resolvedHostname } = await context.endpoint();
294
+ if (context.disableHostPrefix !== true) {
295
+ resolvedHostname = "api." + resolvedHostname;
296
+ if (!__isValidHostname(resolvedHostname)) {
297
+ throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
298
+ }
299
+ }
300
+ return new __HttpRequest({
301
+ protocol,
302
+ hostname: resolvedHostname,
303
+ port,
304
+ method: "DELETE",
305
+ headers,
306
+ path: resolvedPath,
307
+ body,
308
+ });
309
+ };
253
310
  export const serializeAws_restJson1DeleteWorkspaceCommand = async (input, context) => {
254
311
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
255
312
  const headers = {};
@@ -490,6 +547,33 @@ export const serializeAws_restJson1GetSceneCommand = async (input, context) => {
490
547
  body,
491
548
  });
492
549
  };
550
+ export const serializeAws_restJson1GetSyncJobCommand = async (input, context) => {
551
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
552
+ const headers = {};
553
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sync-jobs/{syncSource}";
554
+ resolvedPath = __resolvedPath(resolvedPath, input, "syncSource", () => input.syncSource, "{syncSource}", false);
555
+ const query = map({
556
+ workspace: [, input.workspaceId],
557
+ });
558
+ let body;
559
+ let { hostname: resolvedHostname } = await context.endpoint();
560
+ if (context.disableHostPrefix !== true) {
561
+ resolvedHostname = "api." + resolvedHostname;
562
+ if (!__isValidHostname(resolvedHostname)) {
563
+ throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
564
+ }
565
+ }
566
+ return new __HttpRequest({
567
+ protocol,
568
+ hostname: resolvedHostname,
569
+ port,
570
+ method: "GET",
571
+ headers,
572
+ path: resolvedPath,
573
+ query,
574
+ body,
575
+ });
576
+ };
493
577
  export const serializeAws_restJson1GetWorkspaceCommand = async (input, context) => {
494
578
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
495
579
  const headers = {};
@@ -603,6 +687,67 @@ export const serializeAws_restJson1ListScenesCommand = async (input, context) =>
603
687
  body,
604
688
  });
605
689
  };
690
+ export const serializeAws_restJson1ListSyncJobsCommand = async (input, context) => {
691
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
692
+ const headers = {
693
+ "content-type": "application/json",
694
+ };
695
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/sync-jobs-list";
696
+ resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
697
+ let body;
698
+ body = JSON.stringify({
699
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
700
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
701
+ });
702
+ let { hostname: resolvedHostname } = await context.endpoint();
703
+ if (context.disableHostPrefix !== true) {
704
+ resolvedHostname = "api." + resolvedHostname;
705
+ if (!__isValidHostname(resolvedHostname)) {
706
+ throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
707
+ }
708
+ }
709
+ return new __HttpRequest({
710
+ protocol,
711
+ hostname: resolvedHostname,
712
+ port,
713
+ method: "POST",
714
+ headers,
715
+ path: resolvedPath,
716
+ body,
717
+ });
718
+ };
719
+ export const serializeAws_restJson1ListSyncResourcesCommand = async (input, context) => {
720
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
721
+ const headers = {
722
+ "content-type": "application/json",
723
+ };
724
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
725
+ "/workspaces/{workspaceId}/sync-jobs/{syncSource}/resources-list";
726
+ resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
727
+ resolvedPath = __resolvedPath(resolvedPath, input, "syncSource", () => input.syncSource, "{syncSource}", false);
728
+ let body;
729
+ body = JSON.stringify({
730
+ ...(input.filters != null && { filters: serializeAws_restJson1SyncResourceFilters(input.filters, context) }),
731
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
732
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
733
+ });
734
+ let { hostname: resolvedHostname } = await context.endpoint();
735
+ if (context.disableHostPrefix !== true) {
736
+ resolvedHostname = "api." + resolvedHostname;
737
+ if (!__isValidHostname(resolvedHostname)) {
738
+ throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
739
+ }
740
+ }
741
+ return new __HttpRequest({
742
+ protocol,
743
+ hostname: resolvedHostname,
744
+ port,
745
+ method: "POST",
746
+ headers,
747
+ path: resolvedPath,
748
+ body,
749
+ });
750
+ };
606
751
  export const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
607
752
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
608
753
  const headers = {
@@ -729,6 +874,7 @@ export const serializeAws_restJson1UpdateComponentTypeCommand = async (input, co
729
874
  resolvedPath = __resolvedPath(resolvedPath, input, "componentTypeId", () => input.componentTypeId, "{componentTypeId}", false);
730
875
  let body;
731
876
  body = JSON.stringify({
877
+ ...(input.componentTypeName != null && { componentTypeName: input.componentTypeName }),
732
878
  ...(input.description != null && { description: input.description }),
733
879
  ...(input.extendsFrom != null && { extendsFrom: serializeAws_restJson1ExtendsFrom(input.extendsFrom, context) }),
734
880
  ...(input.functions != null && { functions: serializeAws_restJson1FunctionsRequest(input.functions, context) }),
@@ -1089,6 +1235,60 @@ const deserializeAws_restJson1CreateSceneCommandError = async (output, context)
1089
1235
  });
1090
1236
  }
1091
1237
  };
1238
+ export const deserializeAws_restJson1CreateSyncJobCommand = async (output, context) => {
1239
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1240
+ return deserializeAws_restJson1CreateSyncJobCommandError(output, context);
1241
+ }
1242
+ const contents = map({
1243
+ $metadata: deserializeMetadata(output),
1244
+ });
1245
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1246
+ if (data.arn != null) {
1247
+ contents.arn = __expectString(data.arn);
1248
+ }
1249
+ if (data.creationDateTime != null) {
1250
+ contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime)));
1251
+ }
1252
+ if (data.state != null) {
1253
+ contents.state = __expectString(data.state);
1254
+ }
1255
+ return contents;
1256
+ };
1257
+ const deserializeAws_restJson1CreateSyncJobCommandError = async (output, context) => {
1258
+ const parsedOutput = {
1259
+ ...output,
1260
+ body: await parseErrorBody(output.body, context),
1261
+ };
1262
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1263
+ switch (errorCode) {
1264
+ case "AccessDeniedException":
1265
+ case "com.amazonaws.iottwinmaker#AccessDeniedException":
1266
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1267
+ case "ConflictException":
1268
+ case "com.amazonaws.iottwinmaker#ConflictException":
1269
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1270
+ case "InternalServerException":
1271
+ case "com.amazonaws.iottwinmaker#InternalServerException":
1272
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1273
+ case "ServiceQuotaExceededException":
1274
+ case "com.amazonaws.iottwinmaker#ServiceQuotaExceededException":
1275
+ throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
1276
+ case "ThrottlingException":
1277
+ case "com.amazonaws.iottwinmaker#ThrottlingException":
1278
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1279
+ case "ValidationException":
1280
+ case "com.amazonaws.iottwinmaker#ValidationException":
1281
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1282
+ default:
1283
+ const parsedBody = parsedOutput.body;
1284
+ throwDefaultError({
1285
+ output,
1286
+ parsedBody,
1287
+ exceptionCtor: __BaseException,
1288
+ errorCode,
1289
+ });
1290
+ }
1291
+ };
1092
1292
  export const deserializeAws_restJson1CreateWorkspaceCommand = async (output, context) => {
1093
1293
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1094
1294
  return deserializeAws_restJson1CreateWorkspaceCommandError(output, context);
@@ -1272,6 +1472,54 @@ const deserializeAws_restJson1DeleteSceneCommandError = async (output, context)
1272
1472
  });
1273
1473
  }
1274
1474
  };
1475
+ export const deserializeAws_restJson1DeleteSyncJobCommand = async (output, context) => {
1476
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1477
+ return deserializeAws_restJson1DeleteSyncJobCommandError(output, context);
1478
+ }
1479
+ const contents = map({
1480
+ $metadata: deserializeMetadata(output),
1481
+ });
1482
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1483
+ if (data.state != null) {
1484
+ contents.state = __expectString(data.state);
1485
+ }
1486
+ return contents;
1487
+ };
1488
+ const deserializeAws_restJson1DeleteSyncJobCommandError = async (output, context) => {
1489
+ const parsedOutput = {
1490
+ ...output,
1491
+ body: await parseErrorBody(output.body, context),
1492
+ };
1493
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1494
+ switch (errorCode) {
1495
+ case "AccessDeniedException":
1496
+ case "com.amazonaws.iottwinmaker#AccessDeniedException":
1497
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1498
+ case "InternalServerException":
1499
+ case "com.amazonaws.iottwinmaker#InternalServerException":
1500
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1501
+ case "ResourceNotFoundException":
1502
+ case "com.amazonaws.iottwinmaker#ResourceNotFoundException":
1503
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1504
+ case "ServiceQuotaExceededException":
1505
+ case "com.amazonaws.iottwinmaker#ServiceQuotaExceededException":
1506
+ throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
1507
+ case "ThrottlingException":
1508
+ case "com.amazonaws.iottwinmaker#ThrottlingException":
1509
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1510
+ case "ValidationException":
1511
+ case "com.amazonaws.iottwinmaker#ValidationException":
1512
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1513
+ default:
1514
+ const parsedBody = parsedOutput.body;
1515
+ throwDefaultError({
1516
+ output,
1517
+ parsedBody,
1518
+ exceptionCtor: __BaseException,
1519
+ errorCode,
1520
+ });
1521
+ }
1522
+ };
1275
1523
  export const deserializeAws_restJson1DeleteWorkspaceCommand = async (output, context) => {
1276
1524
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1277
1525
  return deserializeAws_restJson1DeleteWorkspaceCommandError(output, context);
@@ -1382,6 +1630,9 @@ export const deserializeAws_restJson1GetComponentTypeCommand = async (output, co
1382
1630
  if (data.componentTypeId != null) {
1383
1631
  contents.componentTypeId = __expectString(data.componentTypeId);
1384
1632
  }
1633
+ if (data.componentTypeName != null) {
1634
+ contents.componentTypeName = __expectString(data.componentTypeName);
1635
+ }
1385
1636
  if (data.creationDateTime != null) {
1386
1637
  contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime)));
1387
1638
  }
@@ -1412,6 +1663,9 @@ export const deserializeAws_restJson1GetComponentTypeCommand = async (output, co
1412
1663
  if (data.status != null) {
1413
1664
  contents.status = deserializeAws_restJson1Status(data.status, context);
1414
1665
  }
1666
+ if (data.syncSource != null) {
1667
+ contents.syncSource = __expectString(data.syncSource);
1668
+ }
1415
1669
  if (data.updateDateTime != null) {
1416
1670
  contents.updateDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.updateDateTime)));
1417
1671
  }
@@ -1487,6 +1741,9 @@ export const deserializeAws_restJson1GetEntityCommand = async (output, context)
1487
1741
  if (data.status != null) {
1488
1742
  contents.status = deserializeAws_restJson1Status(data.status, context);
1489
1743
  }
1744
+ if (data.syncSource != null) {
1745
+ contents.syncSource = __expectString(data.syncSource);
1746
+ }
1490
1747
  if (data.updateDateTime != null) {
1491
1748
  contents.updateDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.updateDateTime)));
1492
1749
  }
@@ -1749,6 +2006,72 @@ const deserializeAws_restJson1GetSceneCommandError = async (output, context) =>
1749
2006
  });
1750
2007
  }
1751
2008
  };
2009
+ export const deserializeAws_restJson1GetSyncJobCommand = async (output, context) => {
2010
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2011
+ return deserializeAws_restJson1GetSyncJobCommandError(output, context);
2012
+ }
2013
+ const contents = map({
2014
+ $metadata: deserializeMetadata(output),
2015
+ });
2016
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2017
+ if (data.arn != null) {
2018
+ contents.arn = __expectString(data.arn);
2019
+ }
2020
+ if (data.creationDateTime != null) {
2021
+ contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime)));
2022
+ }
2023
+ if (data.status != null) {
2024
+ contents.status = deserializeAws_restJson1SyncJobStatus(data.status, context);
2025
+ }
2026
+ if (data.syncRole != null) {
2027
+ contents.syncRole = __expectString(data.syncRole);
2028
+ }
2029
+ if (data.syncSource != null) {
2030
+ contents.syncSource = __expectString(data.syncSource);
2031
+ }
2032
+ if (data.updateDateTime != null) {
2033
+ contents.updateDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.updateDateTime)));
2034
+ }
2035
+ if (data.workspaceId != null) {
2036
+ contents.workspaceId = __expectString(data.workspaceId);
2037
+ }
2038
+ return contents;
2039
+ };
2040
+ const deserializeAws_restJson1GetSyncJobCommandError = async (output, context) => {
2041
+ const parsedOutput = {
2042
+ ...output,
2043
+ body: await parseErrorBody(output.body, context),
2044
+ };
2045
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2046
+ switch (errorCode) {
2047
+ case "AccessDeniedException":
2048
+ case "com.amazonaws.iottwinmaker#AccessDeniedException":
2049
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2050
+ case "InternalServerException":
2051
+ case "com.amazonaws.iottwinmaker#InternalServerException":
2052
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2053
+ case "ResourceNotFoundException":
2054
+ case "com.amazonaws.iottwinmaker#ResourceNotFoundException":
2055
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2056
+ case "ServiceQuotaExceededException":
2057
+ case "com.amazonaws.iottwinmaker#ServiceQuotaExceededException":
2058
+ throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
2059
+ case "ThrottlingException":
2060
+ case "com.amazonaws.iottwinmaker#ThrottlingException":
2061
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2062
+ case "ValidationException":
2063
+ case "com.amazonaws.iottwinmaker#ValidationException":
2064
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2065
+ default:
2066
+ const parsedBody = parsedOutput.body;
2067
+ throwDefaultError({
2068
+ output,
2069
+ parsedBody,
2070
+ exceptionCtor: __BaseException,
2071
+ errorCode,
2072
+ });
2073
+ }
2074
+ };
1752
2075
  export const deserializeAws_restJson1GetWorkspaceCommand = async (output, context) => {
1753
2076
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1754
2077
  return deserializeAws_restJson1GetWorkspaceCommandError(output, context);
@@ -1953,6 +2276,102 @@ const deserializeAws_restJson1ListScenesCommandError = async (output, context) =
1953
2276
  });
1954
2277
  }
1955
2278
  };
2279
+ export const deserializeAws_restJson1ListSyncJobsCommand = async (output, context) => {
2280
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2281
+ return deserializeAws_restJson1ListSyncJobsCommandError(output, context);
2282
+ }
2283
+ const contents = map({
2284
+ $metadata: deserializeMetadata(output),
2285
+ });
2286
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2287
+ if (data.nextToken != null) {
2288
+ contents.nextToken = __expectString(data.nextToken);
2289
+ }
2290
+ if (data.syncJobSummaries != null) {
2291
+ contents.syncJobSummaries = deserializeAws_restJson1SyncJobSummaries(data.syncJobSummaries, context);
2292
+ }
2293
+ return contents;
2294
+ };
2295
+ const deserializeAws_restJson1ListSyncJobsCommandError = async (output, context) => {
2296
+ const parsedOutput = {
2297
+ ...output,
2298
+ body: await parseErrorBody(output.body, context),
2299
+ };
2300
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2301
+ switch (errorCode) {
2302
+ case "AccessDeniedException":
2303
+ case "com.amazonaws.iottwinmaker#AccessDeniedException":
2304
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2305
+ case "InternalServerException":
2306
+ case "com.amazonaws.iottwinmaker#InternalServerException":
2307
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2308
+ case "ServiceQuotaExceededException":
2309
+ case "com.amazonaws.iottwinmaker#ServiceQuotaExceededException":
2310
+ throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
2311
+ case "ThrottlingException":
2312
+ case "com.amazonaws.iottwinmaker#ThrottlingException":
2313
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2314
+ case "ValidationException":
2315
+ case "com.amazonaws.iottwinmaker#ValidationException":
2316
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2317
+ default:
2318
+ const parsedBody = parsedOutput.body;
2319
+ throwDefaultError({
2320
+ output,
2321
+ parsedBody,
2322
+ exceptionCtor: __BaseException,
2323
+ errorCode,
2324
+ });
2325
+ }
2326
+ };
2327
+ export const deserializeAws_restJson1ListSyncResourcesCommand = async (output, context) => {
2328
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2329
+ return deserializeAws_restJson1ListSyncResourcesCommandError(output, context);
2330
+ }
2331
+ const contents = map({
2332
+ $metadata: deserializeMetadata(output),
2333
+ });
2334
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2335
+ if (data.nextToken != null) {
2336
+ contents.nextToken = __expectString(data.nextToken);
2337
+ }
2338
+ if (data.syncResources != null) {
2339
+ contents.syncResources = deserializeAws_restJson1SyncResourceSummaries(data.syncResources, context);
2340
+ }
2341
+ return contents;
2342
+ };
2343
+ const deserializeAws_restJson1ListSyncResourcesCommandError = 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 deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2353
+ case "InternalServerException":
2354
+ case "com.amazonaws.iottwinmaker#InternalServerException":
2355
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2356
+ case "ServiceQuotaExceededException":
2357
+ case "com.amazonaws.iottwinmaker#ServiceQuotaExceededException":
2358
+ throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
2359
+ case "ThrottlingException":
2360
+ case "com.amazonaws.iottwinmaker#ThrottlingException":
2361
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2362
+ case "ValidationException":
2363
+ case "com.amazonaws.iottwinmaker#ValidationException":
2364
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2365
+ default:
2366
+ const parsedBody = parsedOutput.body;
2367
+ throwDefaultError({
2368
+ output,
2369
+ parsedBody,
2370
+ exceptionCtor: __BaseException,
2371
+ errorCode,
2372
+ });
2373
+ }
2374
+ };
1956
2375
  export const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
1957
2376
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1958
2377
  return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
@@ -2733,6 +3152,7 @@ const serializeAws_restJson1PropertyDefinitionRequest = (input, context) => {
2733
3152
  }),
2734
3153
  ...(input.dataType != null && { dataType: serializeAws_restJson1DataType(input.dataType, context) }),
2735
3154
  ...(input.defaultValue != null && { defaultValue: serializeAws_restJson1DataValue(input.defaultValue, context) }),
3155
+ ...(input.displayName != null && { displayName: input.displayName }),
2736
3156
  ...(input.isExternalId != null && { isExternalId: input.isExternalId }),
2737
3157
  ...(input.isRequiredInEntity != null && { isRequiredInEntity: input.isRequiredInEntity }),
2738
3158
  ...(input.isStoredExternally != null && { isStoredExternally: input.isStoredExternally }),
@@ -2861,6 +3281,22 @@ const serializeAws_restJson1SelectedPropertyList = (input, context) => {
2861
3281
  return entry;
2862
3282
  });
2863
3283
  };
3284
+ const serializeAws_restJson1SyncResourceFilter = (input, context) => {
3285
+ return SyncResourceFilter.visit(input, {
3286
+ externalId: (value) => ({ externalId: value }),
3287
+ resourceId: (value) => ({ resourceId: value }),
3288
+ resourceType: (value) => ({ resourceType: value }),
3289
+ state: (value) => ({ state: value }),
3290
+ _: (name, value) => ({ name: value }),
3291
+ });
3292
+ };
3293
+ const serializeAws_restJson1SyncResourceFilters = (input, context) => {
3294
+ return input
3295
+ .filter((e) => e != null)
3296
+ .map((entry) => {
3297
+ return serializeAws_restJson1SyncResourceFilter(entry, context);
3298
+ });
3299
+ };
2864
3300
  const serializeAws_restJson1TabularConditions = (input, context) => {
2865
3301
  return {
2866
3302
  ...(input.orderBy != null && { orderBy: serializeAws_restJson1OrderByList(input.orderBy, context) }),
@@ -2940,6 +3376,7 @@ const deserializeAws_restJson1ComponentResponse = (output, context) => {
2940
3376
  ? deserializeAws_restJson1ComponentPropertyGroupResponses(output.propertyGroups, context)
2941
3377
  : undefined,
2942
3378
  status: output.status != null ? deserializeAws_restJson1Status(output.status, context) : undefined,
3379
+ syncSource: __expectString(output.syncSource),
2943
3380
  };
2944
3381
  };
2945
3382
  const deserializeAws_restJson1ComponentsMap = (output, context) => {
@@ -2966,6 +3403,7 @@ const deserializeAws_restJson1ComponentTypeSummary = (output, context) => {
2966
3403
  return {
2967
3404
  arn: __expectString(output.arn),
2968
3405
  componentTypeId: __expectString(output.componentTypeId),
3406
+ componentTypeName: __expectString(output.componentTypeName),
2969
3407
  creationDateTime: output.creationDateTime != null
2970
3408
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime)))
2971
3409
  : undefined,
@@ -3177,6 +3615,7 @@ const deserializeAws_restJson1PropertyDefinitionResponse = (output, context) =>
3177
3615
  configuration: output.configuration != null ? deserializeAws_restJson1Configuration(output.configuration, context) : undefined,
3178
3616
  dataType: output.dataType != null ? deserializeAws_restJson1DataType(output.dataType, context) : undefined,
3179
3617
  defaultValue: output.defaultValue != null ? deserializeAws_restJson1DataValue(output.defaultValue, context) : undefined,
3618
+ displayName: __expectString(output.displayName),
3180
3619
  isExternalId: __expectBoolean(output.isExternalId),
3181
3620
  isFinal: __expectBoolean(output.isFinal),
3182
3621
  isImported: __expectBoolean(output.isImported),
@@ -3407,6 +3846,65 @@ const deserializeAws_restJson1Status = (output, context) => {
3407
3846
  state: __expectString(output.state),
3408
3847
  };
3409
3848
  };
3849
+ const deserializeAws_restJson1SyncJobStatus = (output, context) => {
3850
+ return {
3851
+ error: output.error != null ? deserializeAws_restJson1ErrorDetails(output.error, context) : undefined,
3852
+ state: __expectString(output.state),
3853
+ };
3854
+ };
3855
+ const deserializeAws_restJson1SyncJobSummaries = (output, context) => {
3856
+ const retVal = (output || [])
3857
+ .filter((e) => e != null)
3858
+ .map((entry) => {
3859
+ if (entry === null) {
3860
+ return null;
3861
+ }
3862
+ return deserializeAws_restJson1SyncJobSummary(entry, context);
3863
+ });
3864
+ return retVal;
3865
+ };
3866
+ const deserializeAws_restJson1SyncJobSummary = (output, context) => {
3867
+ return {
3868
+ arn: __expectString(output.arn),
3869
+ creationDateTime: output.creationDateTime != null
3870
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime)))
3871
+ : undefined,
3872
+ status: output.status != null ? deserializeAws_restJson1SyncJobStatus(output.status, context) : undefined,
3873
+ syncSource: __expectString(output.syncSource),
3874
+ updateDateTime: output.updateDateTime != null
3875
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateDateTime)))
3876
+ : undefined,
3877
+ workspaceId: __expectString(output.workspaceId),
3878
+ };
3879
+ };
3880
+ const deserializeAws_restJson1SyncResourceStatus = (output, context) => {
3881
+ return {
3882
+ error: output.error != null ? deserializeAws_restJson1ErrorDetails(output.error, context) : undefined,
3883
+ state: __expectString(output.state),
3884
+ };
3885
+ };
3886
+ const deserializeAws_restJson1SyncResourceSummaries = (output, context) => {
3887
+ const retVal = (output || [])
3888
+ .filter((e) => e != null)
3889
+ .map((entry) => {
3890
+ if (entry === null) {
3891
+ return null;
3892
+ }
3893
+ return deserializeAws_restJson1SyncResourceSummary(entry, context);
3894
+ });
3895
+ return retVal;
3896
+ };
3897
+ const deserializeAws_restJson1SyncResourceSummary = (output, context) => {
3898
+ return {
3899
+ externalId: __expectString(output.externalId),
3900
+ resourceId: __expectString(output.resourceId),
3901
+ resourceType: __expectString(output.resourceType),
3902
+ status: output.status != null ? deserializeAws_restJson1SyncResourceStatus(output.status, context) : undefined,
3903
+ updateDateTime: output.updateDateTime != null
3904
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateDateTime)))
3905
+ : undefined,
3906
+ };
3907
+ };
3410
3908
  const deserializeAws_restJson1TabularPropertyValue = (output, context) => {
3411
3909
  const retVal = (output || [])
3412
3910
  .filter((e) => e != null)