@aws-sdk/client-service-catalog-appregistry 3.28.0 → 3.32.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 (56) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +1 -1
  3. package/ServiceCatalogAppRegistry.ts +40 -2
  4. package/ServiceCatalogAppRegistryClient.ts +7 -1
  5. package/commands/GetAssociatedResourceCommand.ts +98 -0
  6. package/commands/SyncResourceCommand.ts +2 -1
  7. package/dist/cjs/ServiceCatalogAppRegistry.js +16 -1
  8. package/dist/cjs/ServiceCatalogAppRegistry.js.map +1 -1
  9. package/dist/cjs/ServiceCatalogAppRegistryClient.js +1 -1
  10. package/dist/cjs/ServiceCatalogAppRegistryClient.js.map +1 -1
  11. package/dist/cjs/commands/GetAssociatedResourceCommand.js +61 -0
  12. package/dist/cjs/commands/GetAssociatedResourceCommand.js.map +1 -0
  13. package/dist/cjs/commands/SyncResourceCommand.js +2 -1
  14. package/dist/cjs/commands/SyncResourceCommand.js.map +1 -1
  15. package/dist/cjs/index.js +1 -0
  16. package/dist/cjs/index.js.map +1 -1
  17. package/dist/cjs/models/models_0.js +65 -2
  18. package/dist/cjs/models/models_0.js.map +1 -1
  19. package/dist/cjs/package.json +31 -31
  20. package/dist/cjs/protocols/Aws_restJson1.js +188 -32
  21. package/dist/cjs/protocols/Aws_restJson1.js.map +1 -1
  22. package/dist/es/ServiceCatalogAppRegistry.js +16 -1
  23. package/dist/es/ServiceCatalogAppRegistry.js.map +1 -1
  24. package/dist/es/ServiceCatalogAppRegistryClient.js +1 -1
  25. package/dist/es/ServiceCatalogAppRegistryClient.js.map +1 -1
  26. package/dist/es/commands/GetAssociatedResourceCommand.js +65 -0
  27. package/dist/es/commands/GetAssociatedResourceCommand.js.map +1 -0
  28. package/dist/es/commands/SyncResourceCommand.js +2 -1
  29. package/dist/es/commands/SyncResourceCommand.js.map +1 -1
  30. package/dist/es/endpoints.js +1 -2
  31. package/dist/es/endpoints.js.map +1 -1
  32. package/dist/es/index.js +1 -0
  33. package/dist/es/index.js.map +1 -1
  34. package/dist/es/models/models_0.js +51 -0
  35. package/dist/es/models/models_0.js.map +1 -1
  36. package/dist/es/package.json +31 -31
  37. package/dist/es/protocols/Aws_restJson1.js +297 -86
  38. package/dist/es/protocols/Aws_restJson1.js.map +1 -1
  39. package/dist/types/ServiceCatalogAppRegistry.d.ts +10 -2
  40. package/dist/types/ServiceCatalogAppRegistryClient.d.ts +4 -3
  41. package/dist/types/commands/GetAssociatedResourceCommand.d.ts +35 -0
  42. package/dist/types/commands/SyncResourceCommand.d.ts +2 -1
  43. package/dist/types/index.d.ts +1 -0
  44. package/dist/types/models/models_0.d.ts +143 -6
  45. package/dist/types/protocols/Aws_restJson1.d.ts +3 -0
  46. package/dist/types/ts3.4/ServiceCatalogAppRegistry.d.ts +10 -2
  47. package/dist/types/ts3.4/ServiceCatalogAppRegistryClient.d.ts +4 -3
  48. package/dist/types/ts3.4/commands/GetAssociatedResourceCommand.d.ts +35 -0
  49. package/dist/types/ts3.4/commands/SyncResourceCommand.d.ts +2 -1
  50. package/dist/types/ts3.4/index.d.ts +1 -0
  51. package/dist/types/ts3.4/models/models_0.d.ts +143 -6
  52. package/dist/types/ts3.4/protocols/Aws_restJson1.d.ts +3 -0
  53. package/index.ts +1 -0
  54. package/models/models_0.ts +176 -6
  55. package/package.json +31 -31
  56. package/protocols/Aws_restJson1.ts +215 -32
@@ -1,6 +1,6 @@
1
1
  import { __assign, __awaiter, __generator, __read } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
- import { expectInt as __expectInt, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, } from "@aws-sdk/smithy-client";
3
+ import { expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, parseRfc3339DateTime as __parseRfc3339DateTime, } from "@aws-sdk/smithy-client";
4
4
  import { v4 as generateIdempotencyToken } from "uuid";
5
5
  export var serializeAws_restJson1AssociateAttributeGroupCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
6
6
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
@@ -333,6 +333,58 @@ export var serializeAws_restJson1GetApplicationCommand = function (input, contex
333
333
  }
334
334
  });
335
335
  }); };
336
+ export var serializeAws_restJson1GetAssociatedResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
337
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, body;
338
+ return __generator(this, function (_c) {
339
+ switch (_c.label) {
340
+ case 0: return [4 /*yield*/, context.endpoint()];
341
+ case 1:
342
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
343
+ headers = {};
344
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
345
+ "/applications/{application}/resources/{resourceType}/{resource}";
346
+ if (input.application !== undefined) {
347
+ labelValue = input.application;
348
+ if (labelValue.length <= 0) {
349
+ throw new Error("Empty value provided for input HTTP label: application.");
350
+ }
351
+ resolvedPath = resolvedPath.replace("{application}", __extendedEncodeURIComponent(labelValue));
352
+ }
353
+ else {
354
+ throw new Error("No value provided for input HTTP label: application.");
355
+ }
356
+ if (input.resourceType !== undefined) {
357
+ labelValue = input.resourceType;
358
+ if (labelValue.length <= 0) {
359
+ throw new Error("Empty value provided for input HTTP label: resourceType.");
360
+ }
361
+ resolvedPath = resolvedPath.replace("{resourceType}", __extendedEncodeURIComponent(labelValue));
362
+ }
363
+ else {
364
+ throw new Error("No value provided for input HTTP label: resourceType.");
365
+ }
366
+ if (input.resource !== undefined) {
367
+ labelValue = input.resource;
368
+ if (labelValue.length <= 0) {
369
+ throw new Error("Empty value provided for input HTTP label: resource.");
370
+ }
371
+ resolvedPath = resolvedPath.replace("{resource}", __extendedEncodeURIComponent(labelValue));
372
+ }
373
+ else {
374
+ throw new Error("No value provided for input HTTP label: resource.");
375
+ }
376
+ return [2 /*return*/, new __HttpRequest({
377
+ protocol: protocol,
378
+ hostname: hostname,
379
+ port: port,
380
+ method: "GET",
381
+ headers: headers,
382
+ path: resolvedPath,
383
+ body: body,
384
+ })];
385
+ }
386
+ });
387
+ }); };
336
388
  export var serializeAws_restJson1GetAttributeGroupCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
337
389
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
338
390
  return __generator(this, function (_c) {
@@ -685,9 +737,9 @@ export var serializeAws_restJson1UpdateAttributeGroupCommand = function (input,
685
737
  });
686
738
  }); };
687
739
  export var deserializeAws_restJson1AssociateAttributeGroupCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
688
- var contents, data;
689
- return __generator(this, function (_a) {
690
- switch (_a.label) {
740
+ var contents, data, _a, _b;
741
+ return __generator(this, function (_c) {
742
+ switch (_c.label) {
691
743
  case 0:
692
744
  if (output.statusCode !== 200 && output.statusCode >= 300) {
693
745
  return [2 /*return*/, deserializeAws_restJson1AssociateAttributeGroupCommandError(output, context)];
@@ -697,9 +749,11 @@ export var deserializeAws_restJson1AssociateAttributeGroupCommand = function (ou
697
749
  applicationArn: undefined,
698
750
  attributeGroupArn: undefined,
699
751
  };
752
+ _a = __expectNonNull;
753
+ _b = __expectObject;
700
754
  return [4 /*yield*/, parseBody(output.body, context)];
701
755
  case 1:
702
- data = _a.sent();
756
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
703
757
  if (data.applicationArn !== undefined && data.applicationArn !== null) {
704
758
  contents.applicationArn = __expectString(data.applicationArn);
705
759
  }
@@ -773,9 +827,9 @@ var deserializeAws_restJson1AssociateAttributeGroupCommandError = function (outp
773
827
  });
774
828
  }); };
775
829
  export var deserializeAws_restJson1AssociateResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
776
- var contents, data;
777
- return __generator(this, function (_a) {
778
- switch (_a.label) {
830
+ var contents, data, _a, _b;
831
+ return __generator(this, function (_c) {
832
+ switch (_c.label) {
779
833
  case 0:
780
834
  if (output.statusCode !== 200 && output.statusCode >= 300) {
781
835
  return [2 /*return*/, deserializeAws_restJson1AssociateResourceCommandError(output, context)];
@@ -785,9 +839,11 @@ export var deserializeAws_restJson1AssociateResourceCommand = function (output,
785
839
  applicationArn: undefined,
786
840
  resourceArn: undefined,
787
841
  };
842
+ _a = __expectNonNull;
843
+ _b = __expectObject;
788
844
  return [4 /*yield*/, parseBody(output.body, context)];
789
845
  case 1:
790
- data = _a.sent();
846
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
791
847
  if (data.applicationArn !== undefined && data.applicationArn !== null) {
792
848
  contents.applicationArn = __expectString(data.applicationArn);
793
849
  }
@@ -861,9 +917,9 @@ var deserializeAws_restJson1AssociateResourceCommandError = function (output, co
861
917
  });
862
918
  }); };
863
919
  export var deserializeAws_restJson1CreateApplicationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
864
- var contents, data;
865
- return __generator(this, function (_a) {
866
- switch (_a.label) {
920
+ var contents, data, _a, _b;
921
+ return __generator(this, function (_c) {
922
+ switch (_c.label) {
867
923
  case 0:
868
924
  if (output.statusCode !== 201 && output.statusCode >= 300) {
869
925
  return [2 /*return*/, deserializeAws_restJson1CreateApplicationCommandError(output, context)];
@@ -872,9 +928,11 @@ export var deserializeAws_restJson1CreateApplicationCommand = function (output,
872
928
  $metadata: deserializeMetadata(output),
873
929
  application: undefined,
874
930
  };
931
+ _a = __expectNonNull;
932
+ _b = __expectObject;
875
933
  return [4 /*yield*/, parseBody(output.body, context)];
876
934
  case 1:
877
- data = _a.sent();
935
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
878
936
  if (data.application !== undefined && data.application !== null) {
879
937
  contents.application = deserializeAws_restJson1Application(data.application, context);
880
938
  }
@@ -937,9 +995,9 @@ var deserializeAws_restJson1CreateApplicationCommandError = function (output, co
937
995
  });
938
996
  }); };
939
997
  export var deserializeAws_restJson1CreateAttributeGroupCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
940
- var contents, data;
941
- return __generator(this, function (_a) {
942
- switch (_a.label) {
998
+ var contents, data, _a, _b;
999
+ return __generator(this, function (_c) {
1000
+ switch (_c.label) {
943
1001
  case 0:
944
1002
  if (output.statusCode !== 201 && output.statusCode >= 300) {
945
1003
  return [2 /*return*/, deserializeAws_restJson1CreateAttributeGroupCommandError(output, context)];
@@ -948,9 +1006,11 @@ export var deserializeAws_restJson1CreateAttributeGroupCommand = function (outpu
948
1006
  $metadata: deserializeMetadata(output),
949
1007
  attributeGroup: undefined,
950
1008
  };
1009
+ _a = __expectNonNull;
1010
+ _b = __expectObject;
951
1011
  return [4 /*yield*/, parseBody(output.body, context)];
952
1012
  case 1:
953
- data = _a.sent();
1013
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
954
1014
  if (data.attributeGroup !== undefined && data.attributeGroup !== null) {
955
1015
  contents.attributeGroup = deserializeAws_restJson1AttributeGroup(data.attributeGroup, context);
956
1016
  }
@@ -1021,9 +1081,9 @@ var deserializeAws_restJson1CreateAttributeGroupCommandError = function (output,
1021
1081
  });
1022
1082
  }); };
1023
1083
  export var deserializeAws_restJson1DeleteApplicationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1024
- var contents, data;
1025
- return __generator(this, function (_a) {
1026
- switch (_a.label) {
1084
+ var contents, data, _a, _b;
1085
+ return __generator(this, function (_c) {
1086
+ switch (_c.label) {
1027
1087
  case 0:
1028
1088
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1029
1089
  return [2 /*return*/, deserializeAws_restJson1DeleteApplicationCommandError(output, context)];
@@ -1032,9 +1092,11 @@ export var deserializeAws_restJson1DeleteApplicationCommand = function (output,
1032
1092
  $metadata: deserializeMetadata(output),
1033
1093
  application: undefined,
1034
1094
  };
1095
+ _a = __expectNonNull;
1096
+ _b = __expectObject;
1035
1097
  return [4 /*yield*/, parseBody(output.body, context)];
1036
1098
  case 1:
1037
- data = _a.sent();
1099
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1038
1100
  if (data.application !== undefined && data.application !== null) {
1039
1101
  contents.application = deserializeAws_restJson1ApplicationSummary(data.application, context);
1040
1102
  }
@@ -1097,9 +1159,9 @@ var deserializeAws_restJson1DeleteApplicationCommandError = function (output, co
1097
1159
  });
1098
1160
  }); };
1099
1161
  export var deserializeAws_restJson1DeleteAttributeGroupCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1100
- var contents, data;
1101
- return __generator(this, function (_a) {
1102
- switch (_a.label) {
1162
+ var contents, data, _a, _b;
1163
+ return __generator(this, function (_c) {
1164
+ switch (_c.label) {
1103
1165
  case 0:
1104
1166
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1105
1167
  return [2 /*return*/, deserializeAws_restJson1DeleteAttributeGroupCommandError(output, context)];
@@ -1108,9 +1170,11 @@ export var deserializeAws_restJson1DeleteAttributeGroupCommand = function (outpu
1108
1170
  $metadata: deserializeMetadata(output),
1109
1171
  attributeGroup: undefined,
1110
1172
  };
1173
+ _a = __expectNonNull;
1174
+ _b = __expectObject;
1111
1175
  return [4 /*yield*/, parseBody(output.body, context)];
1112
1176
  case 1:
1113
- data = _a.sent();
1177
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1114
1178
  if (data.attributeGroup !== undefined && data.attributeGroup !== null) {
1115
1179
  contents.attributeGroup = deserializeAws_restJson1AttributeGroupSummary(data.attributeGroup, context);
1116
1180
  }
@@ -1173,9 +1237,9 @@ var deserializeAws_restJson1DeleteAttributeGroupCommandError = function (output,
1173
1237
  });
1174
1238
  }); };
1175
1239
  export var deserializeAws_restJson1DisassociateAttributeGroupCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1176
- var contents, data;
1177
- return __generator(this, function (_a) {
1178
- switch (_a.label) {
1240
+ var contents, data, _a, _b;
1241
+ return __generator(this, function (_c) {
1242
+ switch (_c.label) {
1179
1243
  case 0:
1180
1244
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1181
1245
  return [2 /*return*/, deserializeAws_restJson1DisassociateAttributeGroupCommandError(output, context)];
@@ -1185,9 +1249,11 @@ export var deserializeAws_restJson1DisassociateAttributeGroupCommand = function
1185
1249
  applicationArn: undefined,
1186
1250
  attributeGroupArn: undefined,
1187
1251
  };
1252
+ _a = __expectNonNull;
1253
+ _b = __expectObject;
1188
1254
  return [4 /*yield*/, parseBody(output.body, context)];
1189
1255
  case 1:
1190
- data = _a.sent();
1256
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1191
1257
  if (data.applicationArn !== undefined && data.applicationArn !== null) {
1192
1258
  contents.applicationArn = __expectString(data.applicationArn);
1193
1259
  }
@@ -1253,9 +1319,9 @@ var deserializeAws_restJson1DisassociateAttributeGroupCommandError = function (o
1253
1319
  });
1254
1320
  }); };
1255
1321
  export var deserializeAws_restJson1DisassociateResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1256
- var contents, data;
1257
- return __generator(this, function (_a) {
1258
- switch (_a.label) {
1322
+ var contents, data, _a, _b;
1323
+ return __generator(this, function (_c) {
1324
+ switch (_c.label) {
1259
1325
  case 0:
1260
1326
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1261
1327
  return [2 /*return*/, deserializeAws_restJson1DisassociateResourceCommandError(output, context)];
@@ -1265,9 +1331,11 @@ export var deserializeAws_restJson1DisassociateResourceCommand = function (outpu
1265
1331
  applicationArn: undefined,
1266
1332
  resourceArn: undefined,
1267
1333
  };
1334
+ _a = __expectNonNull;
1335
+ _b = __expectObject;
1268
1336
  return [4 /*yield*/, parseBody(output.body, context)];
1269
1337
  case 1:
1270
- data = _a.sent();
1338
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1271
1339
  if (data.applicationArn !== undefined && data.applicationArn !== null) {
1272
1340
  contents.applicationArn = __expectString(data.applicationArn);
1273
1341
  }
@@ -1325,9 +1393,9 @@ var deserializeAws_restJson1DisassociateResourceCommandError = function (output,
1325
1393
  });
1326
1394
  }); };
1327
1395
  export var deserializeAws_restJson1GetApplicationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1328
- var contents, data;
1329
- return __generator(this, function (_a) {
1330
- switch (_a.label) {
1396
+ var contents, data, _a, _b;
1397
+ return __generator(this, function (_c) {
1398
+ switch (_c.label) {
1331
1399
  case 0:
1332
1400
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1333
1401
  return [2 /*return*/, deserializeAws_restJson1GetApplicationCommandError(output, context)];
@@ -1339,21 +1407,24 @@ export var deserializeAws_restJson1GetApplicationCommand = function (output, con
1339
1407
  creationTime: undefined,
1340
1408
  description: undefined,
1341
1409
  id: undefined,
1410
+ integrations: undefined,
1342
1411
  lastUpdateTime: undefined,
1343
1412
  name: undefined,
1344
1413
  tags: undefined,
1345
1414
  };
1415
+ _a = __expectNonNull;
1416
+ _b = __expectObject;
1346
1417
  return [4 /*yield*/, parseBody(output.body, context)];
1347
1418
  case 1:
1348
- data = _a.sent();
1419
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1349
1420
  if (data.arn !== undefined && data.arn !== null) {
1350
1421
  contents.arn = __expectString(data.arn);
1351
1422
  }
1352
1423
  if (data.associatedResourceCount !== undefined && data.associatedResourceCount !== null) {
1353
- contents.associatedResourceCount = __expectInt(data.associatedResourceCount);
1424
+ contents.associatedResourceCount = __expectInt32(data.associatedResourceCount);
1354
1425
  }
1355
1426
  if (data.creationTime !== undefined && data.creationTime !== null) {
1356
- contents.creationTime = new Date(data.creationTime);
1427
+ contents.creationTime = __expectNonNull(__parseRfc3339DateTime(data.creationTime));
1357
1428
  }
1358
1429
  if (data.description !== undefined && data.description !== null) {
1359
1430
  contents.description = __expectString(data.description);
@@ -1361,8 +1432,11 @@ export var deserializeAws_restJson1GetApplicationCommand = function (output, con
1361
1432
  if (data.id !== undefined && data.id !== null) {
1362
1433
  contents.id = __expectString(data.id);
1363
1434
  }
1435
+ if (data.integrations !== undefined && data.integrations !== null) {
1436
+ contents.integrations = deserializeAws_restJson1Integrations(data.integrations, context);
1437
+ }
1364
1438
  if (data.lastUpdateTime !== undefined && data.lastUpdateTime !== null) {
1365
- contents.lastUpdateTime = new Date(data.lastUpdateTime);
1439
+ contents.lastUpdateTime = __expectNonNull(__parseRfc3339DateTime(data.lastUpdateTime));
1366
1440
  }
1367
1441
  if (data.name !== undefined && data.name !== null) {
1368
1442
  contents.name = __expectString(data.name);
@@ -1428,10 +1502,88 @@ var deserializeAws_restJson1GetApplicationCommandError = function (output, conte
1428
1502
  }
1429
1503
  });
1430
1504
  }); };
1505
+ export var deserializeAws_restJson1GetAssociatedResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1506
+ var contents, data, _a, _b;
1507
+ return __generator(this, function (_c) {
1508
+ switch (_c.label) {
1509
+ case 0:
1510
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1511
+ return [2 /*return*/, deserializeAws_restJson1GetAssociatedResourceCommandError(output, context)];
1512
+ }
1513
+ contents = {
1514
+ $metadata: deserializeMetadata(output),
1515
+ resource: undefined,
1516
+ };
1517
+ _a = __expectNonNull;
1518
+ _b = __expectObject;
1519
+ return [4 /*yield*/, parseBody(output.body, context)];
1520
+ case 1:
1521
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1522
+ if (data.resource !== undefined && data.resource !== null) {
1523
+ contents.resource = deserializeAws_restJson1Resource(data.resource, context);
1524
+ }
1525
+ return [2 /*return*/, Promise.resolve(contents)];
1526
+ }
1527
+ });
1528
+ }); };
1529
+ var deserializeAws_restJson1GetAssociatedResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1530
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
1531
+ var _f;
1532
+ return __generator(this, function (_g) {
1533
+ switch (_g.label) {
1534
+ case 0:
1535
+ _a = [__assign({}, output)];
1536
+ _f = {};
1537
+ return [4 /*yield*/, parseBody(output.body, context)];
1538
+ case 1:
1539
+ parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
1540
+ errorCode = "UnknownError";
1541
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1542
+ _b = errorCode;
1543
+ switch (_b) {
1544
+ case "InternalServerException": return [3 /*break*/, 2];
1545
+ case "com.amazonaws.servicecatalogappregistry#InternalServerException": return [3 /*break*/, 2];
1546
+ case "ResourceNotFoundException": return [3 /*break*/, 4];
1547
+ case "com.amazonaws.servicecatalogappregistry#ResourceNotFoundException": return [3 /*break*/, 4];
1548
+ case "ValidationException": return [3 /*break*/, 6];
1549
+ case "com.amazonaws.servicecatalogappregistry#ValidationException": return [3 /*break*/, 6];
1550
+ }
1551
+ return [3 /*break*/, 8];
1552
+ case 2:
1553
+ _c = [{}];
1554
+ return [4 /*yield*/, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1555
+ case 3:
1556
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1557
+ return [3 /*break*/, 9];
1558
+ case 4:
1559
+ _d = [{}];
1560
+ return [4 /*yield*/, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1561
+ case 5:
1562
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1563
+ return [3 /*break*/, 9];
1564
+ case 6:
1565
+ _e = [{}];
1566
+ return [4 /*yield*/, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1567
+ case 7:
1568
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1569
+ return [3 /*break*/, 9];
1570
+ case 8:
1571
+ parsedBody = parsedOutput.body;
1572
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1573
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
1574
+ _g.label = 9;
1575
+ case 9:
1576
+ message = response.message || response.Message || errorCode;
1577
+ response.message = message;
1578
+ delete response.Message;
1579
+ return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];
1580
+ }
1581
+ });
1582
+ }); };
1431
1583
  export var deserializeAws_restJson1GetAttributeGroupCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1432
- var contents, data;
1433
- return __generator(this, function (_a) {
1434
- switch (_a.label) {
1584
+ var contents, data, _a, _b;
1585
+ return __generator(this, function (_c) {
1586
+ switch (_c.label) {
1435
1587
  case 0:
1436
1588
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1437
1589
  return [2 /*return*/, deserializeAws_restJson1GetAttributeGroupCommandError(output, context)];
@@ -1447,9 +1599,11 @@ export var deserializeAws_restJson1GetAttributeGroupCommand = function (output,
1447
1599
  name: undefined,
1448
1600
  tags: undefined,
1449
1601
  };
1602
+ _a = __expectNonNull;
1603
+ _b = __expectObject;
1450
1604
  return [4 /*yield*/, parseBody(output.body, context)];
1451
1605
  case 1:
1452
- data = _a.sent();
1606
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1453
1607
  if (data.arn !== undefined && data.arn !== null) {
1454
1608
  contents.arn = __expectString(data.arn);
1455
1609
  }
@@ -1457,7 +1611,7 @@ export var deserializeAws_restJson1GetAttributeGroupCommand = function (output,
1457
1611
  contents.attributes = __expectString(data.attributes);
1458
1612
  }
1459
1613
  if (data.creationTime !== undefined && data.creationTime !== null) {
1460
- contents.creationTime = new Date(data.creationTime);
1614
+ contents.creationTime = __expectNonNull(__parseRfc3339DateTime(data.creationTime));
1461
1615
  }
1462
1616
  if (data.description !== undefined && data.description !== null) {
1463
1617
  contents.description = __expectString(data.description);
@@ -1466,7 +1620,7 @@ export var deserializeAws_restJson1GetAttributeGroupCommand = function (output,
1466
1620
  contents.id = __expectString(data.id);
1467
1621
  }
1468
1622
  if (data.lastUpdateTime !== undefined && data.lastUpdateTime !== null) {
1469
- contents.lastUpdateTime = new Date(data.lastUpdateTime);
1623
+ contents.lastUpdateTime = __expectNonNull(__parseRfc3339DateTime(data.lastUpdateTime));
1470
1624
  }
1471
1625
  if (data.name !== undefined && data.name !== null) {
1472
1626
  contents.name = __expectString(data.name);
@@ -1533,9 +1687,9 @@ var deserializeAws_restJson1GetAttributeGroupCommandError = function (output, co
1533
1687
  });
1534
1688
  }); };
1535
1689
  export var deserializeAws_restJson1ListApplicationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1536
- var contents, data;
1537
- return __generator(this, function (_a) {
1538
- switch (_a.label) {
1690
+ var contents, data, _a, _b;
1691
+ return __generator(this, function (_c) {
1692
+ switch (_c.label) {
1539
1693
  case 0:
1540
1694
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1541
1695
  return [2 /*return*/, deserializeAws_restJson1ListApplicationsCommandError(output, context)];
@@ -1545,9 +1699,11 @@ export var deserializeAws_restJson1ListApplicationsCommand = function (output, c
1545
1699
  applications: undefined,
1546
1700
  nextToken: undefined,
1547
1701
  };
1702
+ _a = __expectNonNull;
1703
+ _b = __expectObject;
1548
1704
  return [4 /*yield*/, parseBody(output.body, context)];
1549
1705
  case 1:
1550
- data = _a.sent();
1706
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1551
1707
  if (data.applications !== undefined && data.applications !== null) {
1552
1708
  contents.applications = deserializeAws_restJson1ApplicationSummaries(data.applications, context);
1553
1709
  }
@@ -1605,9 +1761,9 @@ var deserializeAws_restJson1ListApplicationsCommandError = function (output, con
1605
1761
  });
1606
1762
  }); };
1607
1763
  export var deserializeAws_restJson1ListAssociatedAttributeGroupsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1608
- var contents, data;
1609
- return __generator(this, function (_a) {
1610
- switch (_a.label) {
1764
+ var contents, data, _a, _b;
1765
+ return __generator(this, function (_c) {
1766
+ switch (_c.label) {
1611
1767
  case 0:
1612
1768
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1613
1769
  return [2 /*return*/, deserializeAws_restJson1ListAssociatedAttributeGroupsCommandError(output, context)];
@@ -1617,9 +1773,11 @@ export var deserializeAws_restJson1ListAssociatedAttributeGroupsCommand = functi
1617
1773
  attributeGroups: undefined,
1618
1774
  nextToken: undefined,
1619
1775
  };
1776
+ _a = __expectNonNull;
1777
+ _b = __expectObject;
1620
1778
  return [4 /*yield*/, parseBody(output.body, context)];
1621
1779
  case 1:
1622
- data = _a.sent();
1780
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1623
1781
  if (data.attributeGroups !== undefined && data.attributeGroups !== null) {
1624
1782
  contents.attributeGroups = deserializeAws_restJson1AttributeGroupIds(data.attributeGroups, context);
1625
1783
  }
@@ -1685,9 +1843,9 @@ var deserializeAws_restJson1ListAssociatedAttributeGroupsCommandError = function
1685
1843
  });
1686
1844
  }); };
1687
1845
  export var deserializeAws_restJson1ListAssociatedResourcesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1688
- var contents, data;
1689
- return __generator(this, function (_a) {
1690
- switch (_a.label) {
1846
+ var contents, data, _a, _b;
1847
+ return __generator(this, function (_c) {
1848
+ switch (_c.label) {
1691
1849
  case 0:
1692
1850
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1693
1851
  return [2 /*return*/, deserializeAws_restJson1ListAssociatedResourcesCommandError(output, context)];
@@ -1697,9 +1855,11 @@ export var deserializeAws_restJson1ListAssociatedResourcesCommand = function (ou
1697
1855
  nextToken: undefined,
1698
1856
  resources: undefined,
1699
1857
  };
1858
+ _a = __expectNonNull;
1859
+ _b = __expectObject;
1700
1860
  return [4 /*yield*/, parseBody(output.body, context)];
1701
1861
  case 1:
1702
- data = _a.sent();
1862
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1703
1863
  if (data.nextToken !== undefined && data.nextToken !== null) {
1704
1864
  contents.nextToken = __expectString(data.nextToken);
1705
1865
  }
@@ -1765,9 +1925,9 @@ var deserializeAws_restJson1ListAssociatedResourcesCommandError = function (outp
1765
1925
  });
1766
1926
  }); };
1767
1927
  export var deserializeAws_restJson1ListAttributeGroupsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1768
- var contents, data;
1769
- return __generator(this, function (_a) {
1770
- switch (_a.label) {
1928
+ var contents, data, _a, _b;
1929
+ return __generator(this, function (_c) {
1930
+ switch (_c.label) {
1771
1931
  case 0:
1772
1932
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1773
1933
  return [2 /*return*/, deserializeAws_restJson1ListAttributeGroupsCommandError(output, context)];
@@ -1777,9 +1937,11 @@ export var deserializeAws_restJson1ListAttributeGroupsCommand = function (output
1777
1937
  attributeGroups: undefined,
1778
1938
  nextToken: undefined,
1779
1939
  };
1940
+ _a = __expectNonNull;
1941
+ _b = __expectObject;
1780
1942
  return [4 /*yield*/, parseBody(output.body, context)];
1781
1943
  case 1:
1782
- data = _a.sent();
1944
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1783
1945
  if (data.attributeGroups !== undefined && data.attributeGroups !== null) {
1784
1946
  contents.attributeGroups = deserializeAws_restJson1AttributeGroupSummaries(data.attributeGroups, context);
1785
1947
  }
@@ -1837,9 +1999,9 @@ var deserializeAws_restJson1ListAttributeGroupsCommandError = function (output,
1837
1999
  });
1838
2000
  }); };
1839
2001
  export var deserializeAws_restJson1ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1840
- var contents, data;
1841
- return __generator(this, function (_a) {
1842
- switch (_a.label) {
2002
+ var contents, data, _a, _b;
2003
+ return __generator(this, function (_c) {
2004
+ switch (_c.label) {
1843
2005
  case 0:
1844
2006
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1845
2007
  return [2 /*return*/, deserializeAws_restJson1ListTagsForResourceCommandError(output, context)];
@@ -1848,9 +2010,11 @@ export var deserializeAws_restJson1ListTagsForResourceCommand = function (output
1848
2010
  $metadata: deserializeMetadata(output),
1849
2011
  tags: undefined,
1850
2012
  };
2013
+ _a = __expectNonNull;
2014
+ _b = __expectObject;
1851
2015
  return [4 /*yield*/, parseBody(output.body, context)];
1852
2016
  case 1:
1853
- data = _a.sent();
2017
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1854
2018
  if (data.tags !== undefined && data.tags !== null) {
1855
2019
  contents.tags = deserializeAws_restJson1Tags(data.tags, context);
1856
2020
  }
@@ -1913,9 +2077,9 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
1913
2077
  });
1914
2078
  }); };
1915
2079
  export var deserializeAws_restJson1SyncResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1916
- var contents, data;
1917
- return __generator(this, function (_a) {
1918
- switch (_a.label) {
2080
+ var contents, data, _a, _b;
2081
+ return __generator(this, function (_c) {
2082
+ switch (_c.label) {
1919
2083
  case 0:
1920
2084
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1921
2085
  return [2 /*return*/, deserializeAws_restJson1SyncResourceCommandError(output, context)];
@@ -1926,9 +2090,11 @@ export var deserializeAws_restJson1SyncResourceCommand = function (output, conte
1926
2090
  applicationArn: undefined,
1927
2091
  resourceArn: undefined,
1928
2092
  };
2093
+ _a = __expectNonNull;
2094
+ _b = __expectObject;
1929
2095
  return [4 /*yield*/, parseBody(output.body, context)];
1930
2096
  case 1:
1931
- data = _a.sent();
2097
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1932
2098
  if (data.actionTaken !== undefined && data.actionTaken !== null) {
1933
2099
  contents.actionTaken = __expectString(data.actionTaken);
1934
2100
  }
@@ -2141,9 +2307,9 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
2141
2307
  });
2142
2308
  }); };
2143
2309
  export var deserializeAws_restJson1UpdateApplicationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2144
- var contents, data;
2145
- return __generator(this, function (_a) {
2146
- switch (_a.label) {
2310
+ var contents, data, _a, _b;
2311
+ return __generator(this, function (_c) {
2312
+ switch (_c.label) {
2147
2313
  case 0:
2148
2314
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2149
2315
  return [2 /*return*/, deserializeAws_restJson1UpdateApplicationCommandError(output, context)];
@@ -2152,9 +2318,11 @@ export var deserializeAws_restJson1UpdateApplicationCommand = function (output,
2152
2318
  $metadata: deserializeMetadata(output),
2153
2319
  application: undefined,
2154
2320
  };
2321
+ _a = __expectNonNull;
2322
+ _b = __expectObject;
2155
2323
  return [4 /*yield*/, parseBody(output.body, context)];
2156
2324
  case 1:
2157
- data = _a.sent();
2325
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2158
2326
  if (data.application !== undefined && data.application !== null) {
2159
2327
  contents.application = deserializeAws_restJson1Application(data.application, context);
2160
2328
  }
@@ -2217,9 +2385,9 @@ var deserializeAws_restJson1UpdateApplicationCommandError = function (output, co
2217
2385
  });
2218
2386
  }); };
2219
2387
  export var deserializeAws_restJson1UpdateAttributeGroupCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2220
- var contents, data;
2221
- return __generator(this, function (_a) {
2222
- switch (_a.label) {
2388
+ var contents, data, _a, _b;
2389
+ return __generator(this, function (_c) {
2390
+ switch (_c.label) {
2223
2391
  case 0:
2224
2392
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2225
2393
  return [2 /*return*/, deserializeAws_restJson1UpdateAttributeGroupCommandError(output, context)];
@@ -2228,9 +2396,11 @@ export var deserializeAws_restJson1UpdateAttributeGroupCommand = function (outpu
2228
2396
  $metadata: deserializeMetadata(output),
2229
2397
  attributeGroup: undefined,
2230
2398
  };
2399
+ _a = __expectNonNull;
2400
+ _b = __expectObject;
2231
2401
  return [4 /*yield*/, parseBody(output.body, context)];
2232
2402
  case 1:
2233
- data = _a.sent();
2403
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2234
2404
  if (data.attributeGroup !== undefined && data.attributeGroup !== null) {
2235
2405
  contents.attributeGroup = deserializeAws_restJson1AttributeGroup(data.attributeGroup, context);
2236
2406
  }
@@ -2393,11 +2563,13 @@ var serializeAws_restJson1Tags = function (input, context) {
2393
2563
  var deserializeAws_restJson1Application = function (output, context) {
2394
2564
  return {
2395
2565
  arn: __expectString(output.arn),
2396
- creationTime: output.creationTime !== undefined && output.creationTime !== null ? new Date(output.creationTime) : undefined,
2566
+ creationTime: output.creationTime !== undefined && output.creationTime !== null
2567
+ ? __expectNonNull(__parseRfc3339DateTime(output.creationTime))
2568
+ : undefined,
2397
2569
  description: __expectString(output.description),
2398
2570
  id: __expectString(output.id),
2399
2571
  lastUpdateTime: output.lastUpdateTime !== undefined && output.lastUpdateTime !== null
2400
- ? new Date(output.lastUpdateTime)
2572
+ ? __expectNonNull(__parseRfc3339DateTime(output.lastUpdateTime))
2401
2573
  : undefined,
2402
2574
  name: __expectString(output.name),
2403
2575
  tags: output.tags !== undefined && output.tags !== null
@@ -2418,11 +2590,13 @@ var deserializeAws_restJson1ApplicationSummaries = function (output, context) {
2418
2590
  var deserializeAws_restJson1ApplicationSummary = function (output, context) {
2419
2591
  return {
2420
2592
  arn: __expectString(output.arn),
2421
- creationTime: output.creationTime !== undefined && output.creationTime !== null ? new Date(output.creationTime) : undefined,
2593
+ creationTime: output.creationTime !== undefined && output.creationTime !== null
2594
+ ? __expectNonNull(__parseRfc3339DateTime(output.creationTime))
2595
+ : undefined,
2422
2596
  description: __expectString(output.description),
2423
2597
  id: __expectString(output.id),
2424
2598
  lastUpdateTime: output.lastUpdateTime !== undefined && output.lastUpdateTime !== null
2425
- ? new Date(output.lastUpdateTime)
2599
+ ? __expectNonNull(__parseRfc3339DateTime(output.lastUpdateTime))
2426
2600
  : undefined,
2427
2601
  name: __expectString(output.name),
2428
2602
  };
@@ -2430,11 +2604,13 @@ var deserializeAws_restJson1ApplicationSummary = function (output, context) {
2430
2604
  var deserializeAws_restJson1AttributeGroup = function (output, context) {
2431
2605
  return {
2432
2606
  arn: __expectString(output.arn),
2433
- creationTime: output.creationTime !== undefined && output.creationTime !== null ? new Date(output.creationTime) : undefined,
2607
+ creationTime: output.creationTime !== undefined && output.creationTime !== null
2608
+ ? __expectNonNull(__parseRfc3339DateTime(output.creationTime))
2609
+ : undefined,
2434
2610
  description: __expectString(output.description),
2435
2611
  id: __expectString(output.id),
2436
2612
  lastUpdateTime: output.lastUpdateTime !== undefined && output.lastUpdateTime !== null
2437
- ? new Date(output.lastUpdateTime)
2613
+ ? __expectNonNull(__parseRfc3339DateTime(output.lastUpdateTime))
2438
2614
  : undefined,
2439
2615
  name: __expectString(output.name),
2440
2616
  tags: output.tags !== undefined && output.tags !== null
@@ -2465,21 +2641,56 @@ var deserializeAws_restJson1AttributeGroupSummaries = function (output, context)
2465
2641
  var deserializeAws_restJson1AttributeGroupSummary = function (output, context) {
2466
2642
  return {
2467
2643
  arn: __expectString(output.arn),
2468
- creationTime: output.creationTime !== undefined && output.creationTime !== null ? new Date(output.creationTime) : undefined,
2644
+ creationTime: output.creationTime !== undefined && output.creationTime !== null
2645
+ ? __expectNonNull(__parseRfc3339DateTime(output.creationTime))
2646
+ : undefined,
2469
2647
  description: __expectString(output.description),
2470
2648
  id: __expectString(output.id),
2471
2649
  lastUpdateTime: output.lastUpdateTime !== undefined && output.lastUpdateTime !== null
2472
- ? new Date(output.lastUpdateTime)
2650
+ ? __expectNonNull(__parseRfc3339DateTime(output.lastUpdateTime))
2473
2651
  : undefined,
2474
2652
  name: __expectString(output.name),
2475
2653
  };
2476
2654
  };
2655
+ var deserializeAws_restJson1Integrations = function (output, context) {
2656
+ return {
2657
+ resourceGroup: output.resourceGroup !== undefined && output.resourceGroup !== null
2658
+ ? deserializeAws_restJson1ResourceGroup(output.resourceGroup, context)
2659
+ : undefined,
2660
+ };
2661
+ };
2662
+ var deserializeAws_restJson1Resource = function (output, context) {
2663
+ return {
2664
+ arn: __expectString(output.arn),
2665
+ associationTime: output.associationTime !== undefined && output.associationTime !== null
2666
+ ? __expectNonNull(__parseRfc3339DateTime(output.associationTime))
2667
+ : undefined,
2668
+ integrations: output.integrations !== undefined && output.integrations !== null
2669
+ ? deserializeAws_restJson1ResourceIntegrations(output.integrations, context)
2670
+ : undefined,
2671
+ name: __expectString(output.name),
2672
+ };
2673
+ };
2674
+ var deserializeAws_restJson1ResourceGroup = function (output, context) {
2675
+ return {
2676
+ arn: __expectString(output.arn),
2677
+ errorMessage: __expectString(output.errorMessage),
2678
+ state: __expectString(output.state),
2679
+ };
2680
+ };
2477
2681
  var deserializeAws_restJson1ResourceInfo = function (output, context) {
2478
2682
  return {
2479
2683
  arn: __expectString(output.arn),
2480
2684
  name: __expectString(output.name),
2481
2685
  };
2482
2686
  };
2687
+ var deserializeAws_restJson1ResourceIntegrations = function (output, context) {
2688
+ return {
2689
+ resourceGroup: output.resourceGroup !== undefined && output.resourceGroup !== null
2690
+ ? deserializeAws_restJson1ResourceGroup(output.resourceGroup, context)
2691
+ : undefined,
2692
+ };
2693
+ };
2483
2694
  var deserializeAws_restJson1Resources = function (output, context) {
2484
2695
  return (output || [])
2485
2696
  .filter(function (e) { return e != null; })