@aws-sdk/client-iotsitewise 3.42.0 → 3.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist-cjs/IoTSiteWise.js +75 -0
- package/dist-cjs/commands/AssociateTimeSeriesToAssetPropertyCommand.js +36 -0
- package/dist-cjs/commands/DeleteTimeSeriesCommand.js +36 -0
- package/dist-cjs/commands/DescribeTimeSeriesCommand.js +36 -0
- package/dist-cjs/commands/DisassociateTimeSeriesFromAssetPropertyCommand.js +36 -0
- package/dist-cjs/commands/ListTimeSeriesCommand.js +36 -0
- package/dist-cjs/commands/index.js +5 -0
- package/dist-cjs/models/models_0.js +62 -4
- package/dist-cjs/pagination/ListTimeSeriesPaginator.js +35 -0
- package/dist-cjs/pagination/index.js +1 -0
- package/dist-cjs/protocols/Aws_restJson1.js +613 -8
- package/dist-es/IoTSiteWise.js +75 -0
- package/dist-es/commands/AssociateTimeSeriesToAssetPropertyCommand.js +39 -0
- package/dist-es/commands/DeleteTimeSeriesCommand.js +39 -0
- package/dist-es/commands/DescribeTimeSeriesCommand.js +39 -0
- package/dist-es/commands/DisassociateTimeSeriesFromAssetPropertyCommand.js +39 -0
- package/dist-es/commands/ListTimeSeriesCommand.js +39 -0
- package/dist-es/commands/index.js +5 -0
- package/dist-es/models/models_0.js +42 -0
- package/dist-es/pagination/ListTimeSeriesPaginator.js +74 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_restJson1.js +790 -109
- package/dist-types/IoTSiteWise.d.ts +81 -2
- package/dist-types/IoTSiteWiseClient.d.ts +7 -2
- package/dist-types/commands/AssociateTimeSeriesToAssetPropertyCommand.d.ts +35 -0
- package/dist-types/commands/CreateProjectCommand.d.ts +4 -0
- package/dist-types/commands/DeleteTimeSeriesCommand.d.ts +56 -0
- package/dist-types/commands/DescribeTimeSeriesCommand.d.ts +54 -0
- package/dist-types/commands/DisassociateTimeSeriesFromAssetPropertyCommand.d.ts +35 -0
- package/dist-types/commands/GetInterpolatedAssetPropertyValuesCommand.d.ts +2 -2
- package/dist-types/commands/ListTimeSeriesCommand.d.ts +35 -0
- package/dist-types/commands/index.d.ts +5 -0
- package/dist-types/models/models_0.d.ts +393 -73
- package/dist-types/pagination/ListTimeSeriesPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +15 -0
- package/dist-types/ts3.4/IoTSiteWise.d.ts +25 -0
- package/dist-types/ts3.4/IoTSiteWiseClient.d.ts +7 -2
- package/dist-types/ts3.4/commands/AssociateTimeSeriesToAssetPropertyCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteTimeSeriesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DescribeTimeSeriesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DisassociateTimeSeriesFromAssetPropertyCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListTimeSeriesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +5 -0
- package/dist-types/ts3.4/models/models_0.d.ts +139 -0
- package/dist-types/ts3.4/pagination/ListTimeSeriesPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +15 -0
- package/package.json +2 -2
|
@@ -46,6 +46,44 @@ export var serializeAws_restJson1AssociateAssetsCommand = function (input, conte
|
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
}); };
|
|
49
|
+
export var serializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
50
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body, resolvedHostname;
|
|
51
|
+
var _c;
|
|
52
|
+
return __generator(this, function (_d) {
|
|
53
|
+
switch (_d.label) {
|
|
54
|
+
case 0: return [4, context.endpoint()];
|
|
55
|
+
case 1:
|
|
56
|
+
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
57
|
+
headers = {
|
|
58
|
+
"content-type": "application/json",
|
|
59
|
+
};
|
|
60
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/timeseries/associate";
|
|
61
|
+
query = __assign(__assign(__assign({}, (input.alias !== undefined && { alias: input.alias })), (input.assetId !== undefined && { assetId: input.assetId })), (input.propertyId !== undefined && { propertyId: input.propertyId }));
|
|
62
|
+
body = JSON.stringify({
|
|
63
|
+
clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken(),
|
|
64
|
+
});
|
|
65
|
+
return [4, context.endpoint()];
|
|
66
|
+
case 2:
|
|
67
|
+
resolvedHostname = (_d.sent()).hostname;
|
|
68
|
+
if (context.disableHostPrefix !== true) {
|
|
69
|
+
resolvedHostname = "api." + resolvedHostname;
|
|
70
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
71
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return [2, new __HttpRequest({
|
|
75
|
+
protocol: protocol,
|
|
76
|
+
hostname: resolvedHostname,
|
|
77
|
+
port: port,
|
|
78
|
+
method: "POST",
|
|
79
|
+
headers: headers,
|
|
80
|
+
path: resolvedPath,
|
|
81
|
+
query: query,
|
|
82
|
+
body: body,
|
|
83
|
+
})];
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}); };
|
|
49
87
|
export var serializeAws_restJson1BatchAssociateProjectAssetsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
50
88
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body, resolvedHostname;
|
|
51
89
|
var _c;
|
|
@@ -733,6 +771,44 @@ export var serializeAws_restJson1DeleteProjectCommand = function (input, context
|
|
|
733
771
|
}
|
|
734
772
|
});
|
|
735
773
|
}); };
|
|
774
|
+
export var serializeAws_restJson1DeleteTimeSeriesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
775
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body, resolvedHostname;
|
|
776
|
+
var _c;
|
|
777
|
+
return __generator(this, function (_d) {
|
|
778
|
+
switch (_d.label) {
|
|
779
|
+
case 0: return [4, context.endpoint()];
|
|
780
|
+
case 1:
|
|
781
|
+
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
782
|
+
headers = {
|
|
783
|
+
"content-type": "application/json",
|
|
784
|
+
};
|
|
785
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/timeseries/delete";
|
|
786
|
+
query = __assign(__assign(__assign({}, (input.alias !== undefined && { alias: input.alias })), (input.assetId !== undefined && { assetId: input.assetId })), (input.propertyId !== undefined && { propertyId: input.propertyId }));
|
|
787
|
+
body = JSON.stringify({
|
|
788
|
+
clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken(),
|
|
789
|
+
});
|
|
790
|
+
return [4, context.endpoint()];
|
|
791
|
+
case 2:
|
|
792
|
+
resolvedHostname = (_d.sent()).hostname;
|
|
793
|
+
if (context.disableHostPrefix !== true) {
|
|
794
|
+
resolvedHostname = "api." + resolvedHostname;
|
|
795
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
796
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
return [2, new __HttpRequest({
|
|
800
|
+
protocol: protocol,
|
|
801
|
+
hostname: resolvedHostname,
|
|
802
|
+
port: port,
|
|
803
|
+
method: "POST",
|
|
804
|
+
headers: headers,
|
|
805
|
+
path: resolvedPath,
|
|
806
|
+
query: query,
|
|
807
|
+
body: body,
|
|
808
|
+
})];
|
|
809
|
+
}
|
|
810
|
+
});
|
|
811
|
+
}); };
|
|
736
812
|
export var serializeAws_restJson1DescribeAccessPolicyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
737
813
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body, resolvedHostname;
|
|
738
814
|
return __generator(this, function (_c) {
|
|
@@ -1213,6 +1289,38 @@ export var serializeAws_restJson1DescribeStorageConfigurationCommand = function
|
|
|
1213
1289
|
}
|
|
1214
1290
|
});
|
|
1215
1291
|
}); };
|
|
1292
|
+
export var serializeAws_restJson1DescribeTimeSeriesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1293
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body, resolvedHostname;
|
|
1294
|
+
return __generator(this, function (_c) {
|
|
1295
|
+
switch (_c.label) {
|
|
1296
|
+
case 0: return [4, context.endpoint()];
|
|
1297
|
+
case 1:
|
|
1298
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
1299
|
+
headers = {};
|
|
1300
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/timeseries/describe";
|
|
1301
|
+
query = __assign(__assign(__assign({}, (input.alias !== undefined && { alias: input.alias })), (input.assetId !== undefined && { assetId: input.assetId })), (input.propertyId !== undefined && { propertyId: input.propertyId }));
|
|
1302
|
+
return [4, context.endpoint()];
|
|
1303
|
+
case 2:
|
|
1304
|
+
resolvedHostname = (_c.sent()).hostname;
|
|
1305
|
+
if (context.disableHostPrefix !== true) {
|
|
1306
|
+
resolvedHostname = "api." + resolvedHostname;
|
|
1307
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
1308
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
return [2, new __HttpRequest({
|
|
1312
|
+
protocol: protocol,
|
|
1313
|
+
hostname: resolvedHostname,
|
|
1314
|
+
port: port,
|
|
1315
|
+
method: "GET",
|
|
1316
|
+
headers: headers,
|
|
1317
|
+
path: resolvedPath,
|
|
1318
|
+
query: query,
|
|
1319
|
+
body: body,
|
|
1320
|
+
})];
|
|
1321
|
+
}
|
|
1322
|
+
});
|
|
1323
|
+
}); };
|
|
1216
1324
|
export var serializeAws_restJson1DisassociateAssetsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1217
1325
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body, resolvedHostname;
|
|
1218
1326
|
var _c;
|
|
@@ -1257,6 +1365,44 @@ export var serializeAws_restJson1DisassociateAssetsCommand = function (input, co
|
|
|
1257
1365
|
}
|
|
1258
1366
|
});
|
|
1259
1367
|
}); };
|
|
1368
|
+
export var serializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1369
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body, resolvedHostname;
|
|
1370
|
+
var _c;
|
|
1371
|
+
return __generator(this, function (_d) {
|
|
1372
|
+
switch (_d.label) {
|
|
1373
|
+
case 0: return [4, context.endpoint()];
|
|
1374
|
+
case 1:
|
|
1375
|
+
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
1376
|
+
headers = {
|
|
1377
|
+
"content-type": "application/json",
|
|
1378
|
+
};
|
|
1379
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/timeseries/disassociate";
|
|
1380
|
+
query = __assign(__assign(__assign({}, (input.alias !== undefined && { alias: input.alias })), (input.assetId !== undefined && { assetId: input.assetId })), (input.propertyId !== undefined && { propertyId: input.propertyId }));
|
|
1381
|
+
body = JSON.stringify({
|
|
1382
|
+
clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken(),
|
|
1383
|
+
});
|
|
1384
|
+
return [4, context.endpoint()];
|
|
1385
|
+
case 2:
|
|
1386
|
+
resolvedHostname = (_d.sent()).hostname;
|
|
1387
|
+
if (context.disableHostPrefix !== true) {
|
|
1388
|
+
resolvedHostname = "api." + resolvedHostname;
|
|
1389
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
1390
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
1391
|
+
}
|
|
1392
|
+
}
|
|
1393
|
+
return [2, new __HttpRequest({
|
|
1394
|
+
protocol: protocol,
|
|
1395
|
+
hostname: resolvedHostname,
|
|
1396
|
+
port: port,
|
|
1397
|
+
method: "POST",
|
|
1398
|
+
headers: headers,
|
|
1399
|
+
path: resolvedPath,
|
|
1400
|
+
query: query,
|
|
1401
|
+
body: body,
|
|
1402
|
+
})];
|
|
1403
|
+
}
|
|
1404
|
+
});
|
|
1405
|
+
}); };
|
|
1260
1406
|
export var serializeAws_restJson1GetAssetPropertyAggregatesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1261
1407
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body, resolvedHostname;
|
|
1262
1408
|
return __generator(this, function (_c) {
|
|
@@ -1773,6 +1919,38 @@ export var serializeAws_restJson1ListTagsForResourceCommand = function (input, c
|
|
|
1773
1919
|
}
|
|
1774
1920
|
});
|
|
1775
1921
|
}); };
|
|
1922
|
+
export var serializeAws_restJson1ListTimeSeriesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1923
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body, resolvedHostname;
|
|
1924
|
+
return __generator(this, function (_c) {
|
|
1925
|
+
switch (_c.label) {
|
|
1926
|
+
case 0: return [4, context.endpoint()];
|
|
1927
|
+
case 1:
|
|
1928
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
1929
|
+
headers = {};
|
|
1930
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/timeseries";
|
|
1931
|
+
query = __assign(__assign(__assign(__assign(__assign({}, (input.nextToken !== undefined && { nextToken: input.nextToken })), (input.maxResults !== undefined && { maxResults: input.maxResults.toString() })), (input.assetId !== undefined && { assetId: input.assetId })), (input.aliasPrefix !== undefined && { aliasPrefix: input.aliasPrefix })), (input.timeSeriesType !== undefined && { timeSeriesType: input.timeSeriesType }));
|
|
1932
|
+
return [4, context.endpoint()];
|
|
1933
|
+
case 2:
|
|
1934
|
+
resolvedHostname = (_c.sent()).hostname;
|
|
1935
|
+
if (context.disableHostPrefix !== true) {
|
|
1936
|
+
resolvedHostname = "api." + resolvedHostname;
|
|
1937
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
1938
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
1941
|
+
return [2, new __HttpRequest({
|
|
1942
|
+
protocol: protocol,
|
|
1943
|
+
hostname: resolvedHostname,
|
|
1944
|
+
port: port,
|
|
1945
|
+
method: "GET",
|
|
1946
|
+
headers: headers,
|
|
1947
|
+
path: resolvedPath,
|
|
1948
|
+
query: query,
|
|
1949
|
+
body: body,
|
|
1950
|
+
})];
|
|
1951
|
+
}
|
|
1952
|
+
});
|
|
1953
|
+
}); };
|
|
1776
1954
|
export var serializeAws_restJson1PutDefaultEncryptionConfigurationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1777
1955
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body, resolvedHostname;
|
|
1778
1956
|
return __generator(this, function (_c) {
|
|
@@ -1854,7 +2032,8 @@ export var serializeAws_restJson1PutStorageConfigurationCommand = function (inpu
|
|
|
1854
2032
|
"content-type": "application/json",
|
|
1855
2033
|
};
|
|
1856
2034
|
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/configuration/account/storage";
|
|
1857
|
-
body = JSON.stringify(__assign(__assign({}, (input.
|
|
2035
|
+
body = JSON.stringify(__assign(__assign(__assign({}, (input.disassociatedDataStorage !== undefined &&
|
|
2036
|
+
input.disassociatedDataStorage !== null && { disassociatedDataStorage: input.disassociatedDataStorage })), (input.multiLayerStorage !== undefined &&
|
|
1858
2037
|
input.multiLayerStorage !== null && {
|
|
1859
2038
|
multiLayerStorage: serializeAws_restJson1MultiLayerStorage(input.multiLayerStorage, context),
|
|
1860
2039
|
})), (input.storageType !== undefined && input.storageType !== null && { storageType: input.storageType })));
|
|
@@ -2477,6 +2656,94 @@ var deserializeAws_restJson1AssociateAssetsCommandError = function (output, cont
|
|
|
2477
2656
|
}
|
|
2478
2657
|
});
|
|
2479
2658
|
}); };
|
|
2659
|
+
export var deserializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2660
|
+
var contents;
|
|
2661
|
+
return __generator(this, function (_a) {
|
|
2662
|
+
switch (_a.label) {
|
|
2663
|
+
case 0:
|
|
2664
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2665
|
+
return [2, deserializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommandError(output, context)];
|
|
2666
|
+
}
|
|
2667
|
+
contents = {
|
|
2668
|
+
$metadata: deserializeMetadata(output),
|
|
2669
|
+
};
|
|
2670
|
+
return [4, collectBody(output.body, context)];
|
|
2671
|
+
case 1:
|
|
2672
|
+
_a.sent();
|
|
2673
|
+
return [2, Promise.resolve(contents)];
|
|
2674
|
+
}
|
|
2675
|
+
});
|
|
2676
|
+
}); };
|
|
2677
|
+
var deserializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2678
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
2679
|
+
var _h;
|
|
2680
|
+
return __generator(this, function (_j) {
|
|
2681
|
+
switch (_j.label) {
|
|
2682
|
+
case 0:
|
|
2683
|
+
_a = [__assign({}, output)];
|
|
2684
|
+
_h = {};
|
|
2685
|
+
return [4, parseBody(output.body, context)];
|
|
2686
|
+
case 1:
|
|
2687
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
2688
|
+
errorCode = "UnknownError";
|
|
2689
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2690
|
+
_b = errorCode;
|
|
2691
|
+
switch (_b) {
|
|
2692
|
+
case "ConflictingOperationException": return [3, 2];
|
|
2693
|
+
case "com.amazonaws.iotsitewise#ConflictingOperationException": return [3, 2];
|
|
2694
|
+
case "InternalFailureException": return [3, 4];
|
|
2695
|
+
case "com.amazonaws.iotsitewise#InternalFailureException": return [3, 4];
|
|
2696
|
+
case "InvalidRequestException": return [3, 6];
|
|
2697
|
+
case "com.amazonaws.iotsitewise#InvalidRequestException": return [3, 6];
|
|
2698
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
2699
|
+
case "com.amazonaws.iotsitewise#ResourceNotFoundException": return [3, 8];
|
|
2700
|
+
case "ThrottlingException": return [3, 10];
|
|
2701
|
+
case "com.amazonaws.iotsitewise#ThrottlingException": return [3, 10];
|
|
2702
|
+
}
|
|
2703
|
+
return [3, 12];
|
|
2704
|
+
case 2:
|
|
2705
|
+
_c = [{}];
|
|
2706
|
+
return [4, deserializeAws_restJson1ConflictingOperationExceptionResponse(parsedOutput, context)];
|
|
2707
|
+
case 3:
|
|
2708
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2709
|
+
return [3, 13];
|
|
2710
|
+
case 4:
|
|
2711
|
+
_d = [{}];
|
|
2712
|
+
return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
2713
|
+
case 5:
|
|
2714
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2715
|
+
return [3, 13];
|
|
2716
|
+
case 6:
|
|
2717
|
+
_e = [{}];
|
|
2718
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
2719
|
+
case 7:
|
|
2720
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2721
|
+
return [3, 13];
|
|
2722
|
+
case 8:
|
|
2723
|
+
_f = [{}];
|
|
2724
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
2725
|
+
case 9:
|
|
2726
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2727
|
+
return [3, 13];
|
|
2728
|
+
case 10:
|
|
2729
|
+
_g = [{}];
|
|
2730
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
2731
|
+
case 11:
|
|
2732
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2733
|
+
return [3, 13];
|
|
2734
|
+
case 12:
|
|
2735
|
+
parsedBody = parsedOutput.body;
|
|
2736
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2737
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
2738
|
+
_j.label = 13;
|
|
2739
|
+
case 13:
|
|
2740
|
+
message = response.message || response.Message || errorCode;
|
|
2741
|
+
response.message = message;
|
|
2742
|
+
delete response.Message;
|
|
2743
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
2744
|
+
}
|
|
2745
|
+
});
|
|
2746
|
+
}); };
|
|
2480
2747
|
export var deserializeAws_restJson1BatchAssociateProjectAssetsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2481
2748
|
var contents, data, _a, _b;
|
|
2482
2749
|
return __generator(this, function (_c) {
|
|
@@ -4107,26 +4374,114 @@ var deserializeAws_restJson1DeleteProjectCommandError = function (output, contex
|
|
|
4107
4374
|
}
|
|
4108
4375
|
});
|
|
4109
4376
|
}); };
|
|
4110
|
-
export var
|
|
4111
|
-
var contents
|
|
4112
|
-
return __generator(this, function (
|
|
4113
|
-
switch (
|
|
4377
|
+
export var deserializeAws_restJson1DeleteTimeSeriesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4378
|
+
var contents;
|
|
4379
|
+
return __generator(this, function (_a) {
|
|
4380
|
+
switch (_a.label) {
|
|
4114
4381
|
case 0:
|
|
4115
4382
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4116
|
-
return [2,
|
|
4383
|
+
return [2, deserializeAws_restJson1DeleteTimeSeriesCommandError(output, context)];
|
|
4117
4384
|
}
|
|
4118
4385
|
contents = {
|
|
4119
4386
|
$metadata: deserializeMetadata(output),
|
|
4120
|
-
accessPolicyArn: undefined,
|
|
4121
|
-
accessPolicyCreationDate: undefined,
|
|
4122
|
-
accessPolicyId: undefined,
|
|
4123
|
-
accessPolicyIdentity: undefined,
|
|
4124
|
-
accessPolicyLastUpdateDate: undefined,
|
|
4125
|
-
accessPolicyPermission: undefined,
|
|
4126
|
-
accessPolicyResource: undefined,
|
|
4127
4387
|
};
|
|
4128
|
-
|
|
4129
|
-
|
|
4388
|
+
return [4, collectBody(output.body, context)];
|
|
4389
|
+
case 1:
|
|
4390
|
+
_a.sent();
|
|
4391
|
+
return [2, Promise.resolve(contents)];
|
|
4392
|
+
}
|
|
4393
|
+
});
|
|
4394
|
+
}); };
|
|
4395
|
+
var deserializeAws_restJson1DeleteTimeSeriesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4396
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
4397
|
+
var _h;
|
|
4398
|
+
return __generator(this, function (_j) {
|
|
4399
|
+
switch (_j.label) {
|
|
4400
|
+
case 0:
|
|
4401
|
+
_a = [__assign({}, output)];
|
|
4402
|
+
_h = {};
|
|
4403
|
+
return [4, parseBody(output.body, context)];
|
|
4404
|
+
case 1:
|
|
4405
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
4406
|
+
errorCode = "UnknownError";
|
|
4407
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4408
|
+
_b = errorCode;
|
|
4409
|
+
switch (_b) {
|
|
4410
|
+
case "ConflictingOperationException": return [3, 2];
|
|
4411
|
+
case "com.amazonaws.iotsitewise#ConflictingOperationException": return [3, 2];
|
|
4412
|
+
case "InternalFailureException": return [3, 4];
|
|
4413
|
+
case "com.amazonaws.iotsitewise#InternalFailureException": return [3, 4];
|
|
4414
|
+
case "InvalidRequestException": return [3, 6];
|
|
4415
|
+
case "com.amazonaws.iotsitewise#InvalidRequestException": return [3, 6];
|
|
4416
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
4417
|
+
case "com.amazonaws.iotsitewise#ResourceNotFoundException": return [3, 8];
|
|
4418
|
+
case "ThrottlingException": return [3, 10];
|
|
4419
|
+
case "com.amazonaws.iotsitewise#ThrottlingException": return [3, 10];
|
|
4420
|
+
}
|
|
4421
|
+
return [3, 12];
|
|
4422
|
+
case 2:
|
|
4423
|
+
_c = [{}];
|
|
4424
|
+
return [4, deserializeAws_restJson1ConflictingOperationExceptionResponse(parsedOutput, context)];
|
|
4425
|
+
case 3:
|
|
4426
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
4427
|
+
return [3, 13];
|
|
4428
|
+
case 4:
|
|
4429
|
+
_d = [{}];
|
|
4430
|
+
return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
4431
|
+
case 5:
|
|
4432
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
4433
|
+
return [3, 13];
|
|
4434
|
+
case 6:
|
|
4435
|
+
_e = [{}];
|
|
4436
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
4437
|
+
case 7:
|
|
4438
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
4439
|
+
return [3, 13];
|
|
4440
|
+
case 8:
|
|
4441
|
+
_f = [{}];
|
|
4442
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
4443
|
+
case 9:
|
|
4444
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
4445
|
+
return [3, 13];
|
|
4446
|
+
case 10:
|
|
4447
|
+
_g = [{}];
|
|
4448
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
4449
|
+
case 11:
|
|
4450
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
4451
|
+
return [3, 13];
|
|
4452
|
+
case 12:
|
|
4453
|
+
parsedBody = parsedOutput.body;
|
|
4454
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
4455
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
4456
|
+
_j.label = 13;
|
|
4457
|
+
case 13:
|
|
4458
|
+
message = response.message || response.Message || errorCode;
|
|
4459
|
+
response.message = message;
|
|
4460
|
+
delete response.Message;
|
|
4461
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
4462
|
+
}
|
|
4463
|
+
});
|
|
4464
|
+
}); };
|
|
4465
|
+
export var deserializeAws_restJson1DescribeAccessPolicyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4466
|
+
var contents, data, _a, _b;
|
|
4467
|
+
return __generator(this, function (_c) {
|
|
4468
|
+
switch (_c.label) {
|
|
4469
|
+
case 0:
|
|
4470
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4471
|
+
return [2, deserializeAws_restJson1DescribeAccessPolicyCommandError(output, context)];
|
|
4472
|
+
}
|
|
4473
|
+
contents = {
|
|
4474
|
+
$metadata: deserializeMetadata(output),
|
|
4475
|
+
accessPolicyArn: undefined,
|
|
4476
|
+
accessPolicyCreationDate: undefined,
|
|
4477
|
+
accessPolicyId: undefined,
|
|
4478
|
+
accessPolicyIdentity: undefined,
|
|
4479
|
+
accessPolicyLastUpdateDate: undefined,
|
|
4480
|
+
accessPolicyPermission: undefined,
|
|
4481
|
+
accessPolicyResource: undefined,
|
|
4482
|
+
};
|
|
4483
|
+
_a = __expectNonNull;
|
|
4484
|
+
_b = __expectObject;
|
|
4130
4485
|
return [4, parseBody(output.body, context)];
|
|
4131
4486
|
case 1:
|
|
4132
4487
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
@@ -5176,22 +5531,250 @@ var deserializeAws_restJson1DescribePortalCommandError = function (output, conte
|
|
|
5176
5531
|
return [3, 11];
|
|
5177
5532
|
case 6:
|
|
5178
5533
|
_e = [{}];
|
|
5179
|
-
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
5534
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
5535
|
+
case 7:
|
|
5536
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5537
|
+
return [3, 11];
|
|
5538
|
+
case 8:
|
|
5539
|
+
_f = [{}];
|
|
5540
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
5541
|
+
case 9:
|
|
5542
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5543
|
+
return [3, 11];
|
|
5544
|
+
case 10:
|
|
5545
|
+
parsedBody = parsedOutput.body;
|
|
5546
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
5547
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
5548
|
+
_h.label = 11;
|
|
5549
|
+
case 11:
|
|
5550
|
+
message = response.message || response.Message || errorCode;
|
|
5551
|
+
response.message = message;
|
|
5552
|
+
delete response.Message;
|
|
5553
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
5554
|
+
}
|
|
5555
|
+
});
|
|
5556
|
+
}); };
|
|
5557
|
+
export var deserializeAws_restJson1DescribeProjectCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5558
|
+
var contents, data, _a, _b;
|
|
5559
|
+
return __generator(this, function (_c) {
|
|
5560
|
+
switch (_c.label) {
|
|
5561
|
+
case 0:
|
|
5562
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
5563
|
+
return [2, deserializeAws_restJson1DescribeProjectCommandError(output, context)];
|
|
5564
|
+
}
|
|
5565
|
+
contents = {
|
|
5566
|
+
$metadata: deserializeMetadata(output),
|
|
5567
|
+
portalId: undefined,
|
|
5568
|
+
projectArn: undefined,
|
|
5569
|
+
projectCreationDate: undefined,
|
|
5570
|
+
projectDescription: undefined,
|
|
5571
|
+
projectId: undefined,
|
|
5572
|
+
projectLastUpdateDate: undefined,
|
|
5573
|
+
projectName: undefined,
|
|
5574
|
+
};
|
|
5575
|
+
_a = __expectNonNull;
|
|
5576
|
+
_b = __expectObject;
|
|
5577
|
+
return [4, parseBody(output.body, context)];
|
|
5578
|
+
case 1:
|
|
5579
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
5580
|
+
if (data.portalId !== undefined && data.portalId !== null) {
|
|
5581
|
+
contents.portalId = __expectString(data.portalId);
|
|
5582
|
+
}
|
|
5583
|
+
if (data.projectArn !== undefined && data.projectArn !== null) {
|
|
5584
|
+
contents.projectArn = __expectString(data.projectArn);
|
|
5585
|
+
}
|
|
5586
|
+
if (data.projectCreationDate !== undefined && data.projectCreationDate !== null) {
|
|
5587
|
+
contents.projectCreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.projectCreationDate)));
|
|
5588
|
+
}
|
|
5589
|
+
if (data.projectDescription !== undefined && data.projectDescription !== null) {
|
|
5590
|
+
contents.projectDescription = __expectString(data.projectDescription);
|
|
5591
|
+
}
|
|
5592
|
+
if (data.projectId !== undefined && data.projectId !== null) {
|
|
5593
|
+
contents.projectId = __expectString(data.projectId);
|
|
5594
|
+
}
|
|
5595
|
+
if (data.projectLastUpdateDate !== undefined && data.projectLastUpdateDate !== null) {
|
|
5596
|
+
contents.projectLastUpdateDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.projectLastUpdateDate)));
|
|
5597
|
+
}
|
|
5598
|
+
if (data.projectName !== undefined && data.projectName !== null) {
|
|
5599
|
+
contents.projectName = __expectString(data.projectName);
|
|
5600
|
+
}
|
|
5601
|
+
return [2, Promise.resolve(contents)];
|
|
5602
|
+
}
|
|
5603
|
+
});
|
|
5604
|
+
}); };
|
|
5605
|
+
var deserializeAws_restJson1DescribeProjectCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5606
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
5607
|
+
var _g;
|
|
5608
|
+
return __generator(this, function (_h) {
|
|
5609
|
+
switch (_h.label) {
|
|
5610
|
+
case 0:
|
|
5611
|
+
_a = [__assign({}, output)];
|
|
5612
|
+
_g = {};
|
|
5613
|
+
return [4, parseBody(output.body, context)];
|
|
5614
|
+
case 1:
|
|
5615
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
5616
|
+
errorCode = "UnknownError";
|
|
5617
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
5618
|
+
_b = errorCode;
|
|
5619
|
+
switch (_b) {
|
|
5620
|
+
case "InternalFailureException": return [3, 2];
|
|
5621
|
+
case "com.amazonaws.iotsitewise#InternalFailureException": return [3, 2];
|
|
5622
|
+
case "InvalidRequestException": return [3, 4];
|
|
5623
|
+
case "com.amazonaws.iotsitewise#InvalidRequestException": return [3, 4];
|
|
5624
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
5625
|
+
case "com.amazonaws.iotsitewise#ResourceNotFoundException": return [3, 6];
|
|
5626
|
+
case "ThrottlingException": return [3, 8];
|
|
5627
|
+
case "com.amazonaws.iotsitewise#ThrottlingException": return [3, 8];
|
|
5628
|
+
}
|
|
5629
|
+
return [3, 10];
|
|
5630
|
+
case 2:
|
|
5631
|
+
_c = [{}];
|
|
5632
|
+
return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
5633
|
+
case 3:
|
|
5634
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5635
|
+
return [3, 11];
|
|
5636
|
+
case 4:
|
|
5637
|
+
_d = [{}];
|
|
5638
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
5639
|
+
case 5:
|
|
5640
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5641
|
+
return [3, 11];
|
|
5642
|
+
case 6:
|
|
5643
|
+
_e = [{}];
|
|
5644
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
5645
|
+
case 7:
|
|
5646
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5647
|
+
return [3, 11];
|
|
5648
|
+
case 8:
|
|
5649
|
+
_f = [{}];
|
|
5650
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
5651
|
+
case 9:
|
|
5652
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5653
|
+
return [3, 11];
|
|
5654
|
+
case 10:
|
|
5655
|
+
parsedBody = parsedOutput.body;
|
|
5656
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
5657
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
5658
|
+
_h.label = 11;
|
|
5659
|
+
case 11:
|
|
5660
|
+
message = response.message || response.Message || errorCode;
|
|
5661
|
+
response.message = message;
|
|
5662
|
+
delete response.Message;
|
|
5663
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
5664
|
+
}
|
|
5665
|
+
});
|
|
5666
|
+
}); };
|
|
5667
|
+
export var deserializeAws_restJson1DescribeStorageConfigurationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5668
|
+
var contents, data, _a, _b;
|
|
5669
|
+
return __generator(this, function (_c) {
|
|
5670
|
+
switch (_c.label) {
|
|
5671
|
+
case 0:
|
|
5672
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
5673
|
+
return [2, deserializeAws_restJson1DescribeStorageConfigurationCommandError(output, context)];
|
|
5674
|
+
}
|
|
5675
|
+
contents = {
|
|
5676
|
+
$metadata: deserializeMetadata(output),
|
|
5677
|
+
configurationStatus: undefined,
|
|
5678
|
+
disassociatedDataStorage: undefined,
|
|
5679
|
+
lastUpdateDate: undefined,
|
|
5680
|
+
multiLayerStorage: undefined,
|
|
5681
|
+
storageType: undefined,
|
|
5682
|
+
};
|
|
5683
|
+
_a = __expectNonNull;
|
|
5684
|
+
_b = __expectObject;
|
|
5685
|
+
return [4, parseBody(output.body, context)];
|
|
5686
|
+
case 1:
|
|
5687
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
5688
|
+
if (data.configurationStatus !== undefined && data.configurationStatus !== null) {
|
|
5689
|
+
contents.configurationStatus = deserializeAws_restJson1ConfigurationStatus(data.configurationStatus, context);
|
|
5690
|
+
}
|
|
5691
|
+
if (data.disassociatedDataStorage !== undefined && data.disassociatedDataStorage !== null) {
|
|
5692
|
+
contents.disassociatedDataStorage = __expectString(data.disassociatedDataStorage);
|
|
5693
|
+
}
|
|
5694
|
+
if (data.lastUpdateDate !== undefined && data.lastUpdateDate !== null) {
|
|
5695
|
+
contents.lastUpdateDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdateDate)));
|
|
5696
|
+
}
|
|
5697
|
+
if (data.multiLayerStorage !== undefined && data.multiLayerStorage !== null) {
|
|
5698
|
+
contents.multiLayerStorage = deserializeAws_restJson1MultiLayerStorage(data.multiLayerStorage, context);
|
|
5699
|
+
}
|
|
5700
|
+
if (data.storageType !== undefined && data.storageType !== null) {
|
|
5701
|
+
contents.storageType = __expectString(data.storageType);
|
|
5702
|
+
}
|
|
5703
|
+
return [2, Promise.resolve(contents)];
|
|
5704
|
+
}
|
|
5705
|
+
});
|
|
5706
|
+
}); };
|
|
5707
|
+
var deserializeAws_restJson1DescribeStorageConfigurationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5708
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
5709
|
+
var _j;
|
|
5710
|
+
return __generator(this, function (_k) {
|
|
5711
|
+
switch (_k.label) {
|
|
5712
|
+
case 0:
|
|
5713
|
+
_a = [__assign({}, output)];
|
|
5714
|
+
_j = {};
|
|
5715
|
+
return [4, parseBody(output.body, context)];
|
|
5716
|
+
case 1:
|
|
5717
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
5718
|
+
errorCode = "UnknownError";
|
|
5719
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
5720
|
+
_b = errorCode;
|
|
5721
|
+
switch (_b) {
|
|
5722
|
+
case "ConflictingOperationException": return [3, 2];
|
|
5723
|
+
case "com.amazonaws.iotsitewise#ConflictingOperationException": return [3, 2];
|
|
5724
|
+
case "InternalFailureException": return [3, 4];
|
|
5725
|
+
case "com.amazonaws.iotsitewise#InternalFailureException": return [3, 4];
|
|
5726
|
+
case "InvalidRequestException": return [3, 6];
|
|
5727
|
+
case "com.amazonaws.iotsitewise#InvalidRequestException": return [3, 6];
|
|
5728
|
+
case "LimitExceededException": return [3, 8];
|
|
5729
|
+
case "com.amazonaws.iotsitewise#LimitExceededException": return [3, 8];
|
|
5730
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
5731
|
+
case "com.amazonaws.iotsitewise#ResourceNotFoundException": return [3, 10];
|
|
5732
|
+
case "ThrottlingException": return [3, 12];
|
|
5733
|
+
case "com.amazonaws.iotsitewise#ThrottlingException": return [3, 12];
|
|
5734
|
+
}
|
|
5735
|
+
return [3, 14];
|
|
5736
|
+
case 2:
|
|
5737
|
+
_c = [{}];
|
|
5738
|
+
return [4, deserializeAws_restJson1ConflictingOperationExceptionResponse(parsedOutput, context)];
|
|
5739
|
+
case 3:
|
|
5740
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5741
|
+
return [3, 15];
|
|
5742
|
+
case 4:
|
|
5743
|
+
_d = [{}];
|
|
5744
|
+
return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
5745
|
+
case 5:
|
|
5746
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5747
|
+
return [3, 15];
|
|
5748
|
+
case 6:
|
|
5749
|
+
_e = [{}];
|
|
5750
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
5180
5751
|
case 7:
|
|
5181
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(
|
|
5182
|
-
return [3,
|
|
5752
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5753
|
+
return [3, 15];
|
|
5183
5754
|
case 8:
|
|
5184
5755
|
_f = [{}];
|
|
5185
|
-
return [4,
|
|
5756
|
+
return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
5186
5757
|
case 9:
|
|
5187
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(
|
|
5188
|
-
return [3,
|
|
5758
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5759
|
+
return [3, 15];
|
|
5189
5760
|
case 10:
|
|
5761
|
+
_g = [{}];
|
|
5762
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
5763
|
+
case 11:
|
|
5764
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5765
|
+
return [3, 15];
|
|
5766
|
+
case 12:
|
|
5767
|
+
_h = [{}];
|
|
5768
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
5769
|
+
case 13:
|
|
5770
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5771
|
+
return [3, 15];
|
|
5772
|
+
case 14:
|
|
5190
5773
|
parsedBody = parsedOutput.body;
|
|
5191
5774
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
5192
5775
|
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
5193
|
-
|
|
5194
|
-
case
|
|
5776
|
+
_k.label = 15;
|
|
5777
|
+
case 15:
|
|
5195
5778
|
message = response.message || response.Message || errorCode;
|
|
5196
5779
|
response.message = message;
|
|
5197
5780
|
delete response.Message;
|
|
@@ -5199,55 +5782,59 @@ var deserializeAws_restJson1DescribePortalCommandError = function (output, conte
|
|
|
5199
5782
|
}
|
|
5200
5783
|
});
|
|
5201
5784
|
}); };
|
|
5202
|
-
export var
|
|
5785
|
+
export var deserializeAws_restJson1DescribeTimeSeriesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5203
5786
|
var contents, data, _a, _b;
|
|
5204
5787
|
return __generator(this, function (_c) {
|
|
5205
5788
|
switch (_c.label) {
|
|
5206
5789
|
case 0:
|
|
5207
5790
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
5208
|
-
return [2,
|
|
5791
|
+
return [2, deserializeAws_restJson1DescribeTimeSeriesCommandError(output, context)];
|
|
5209
5792
|
}
|
|
5210
5793
|
contents = {
|
|
5211
5794
|
$metadata: deserializeMetadata(output),
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5795
|
+
alias: undefined,
|
|
5796
|
+
assetId: undefined,
|
|
5797
|
+
dataType: undefined,
|
|
5798
|
+
dataTypeSpec: undefined,
|
|
5799
|
+
propertyId: undefined,
|
|
5800
|
+
timeSeriesCreationDate: undefined,
|
|
5801
|
+
timeSeriesId: undefined,
|
|
5802
|
+
timeSeriesLastUpdateDate: undefined,
|
|
5219
5803
|
};
|
|
5220
5804
|
_a = __expectNonNull;
|
|
5221
5805
|
_b = __expectObject;
|
|
5222
5806
|
return [4, parseBody(output.body, context)];
|
|
5223
5807
|
case 1:
|
|
5224
5808
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
5225
|
-
if (data.
|
|
5226
|
-
contents.
|
|
5809
|
+
if (data.alias !== undefined && data.alias !== null) {
|
|
5810
|
+
contents.alias = __expectString(data.alias);
|
|
5227
5811
|
}
|
|
5228
|
-
if (data.
|
|
5229
|
-
contents.
|
|
5812
|
+
if (data.assetId !== undefined && data.assetId !== null) {
|
|
5813
|
+
contents.assetId = __expectString(data.assetId);
|
|
5230
5814
|
}
|
|
5231
|
-
if (data.
|
|
5232
|
-
contents.
|
|
5815
|
+
if (data.dataType !== undefined && data.dataType !== null) {
|
|
5816
|
+
contents.dataType = __expectString(data.dataType);
|
|
5233
5817
|
}
|
|
5234
|
-
if (data.
|
|
5235
|
-
contents.
|
|
5818
|
+
if (data.dataTypeSpec !== undefined && data.dataTypeSpec !== null) {
|
|
5819
|
+
contents.dataTypeSpec = __expectString(data.dataTypeSpec);
|
|
5236
5820
|
}
|
|
5237
|
-
if (data.
|
|
5238
|
-
contents.
|
|
5821
|
+
if (data.propertyId !== undefined && data.propertyId !== null) {
|
|
5822
|
+
contents.propertyId = __expectString(data.propertyId);
|
|
5239
5823
|
}
|
|
5240
|
-
if (data.
|
|
5241
|
-
contents.
|
|
5824
|
+
if (data.timeSeriesCreationDate !== undefined && data.timeSeriesCreationDate !== null) {
|
|
5825
|
+
contents.timeSeriesCreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.timeSeriesCreationDate)));
|
|
5242
5826
|
}
|
|
5243
|
-
if (data.
|
|
5244
|
-
contents.
|
|
5827
|
+
if (data.timeSeriesId !== undefined && data.timeSeriesId !== null) {
|
|
5828
|
+
contents.timeSeriesId = __expectString(data.timeSeriesId);
|
|
5829
|
+
}
|
|
5830
|
+
if (data.timeSeriesLastUpdateDate !== undefined && data.timeSeriesLastUpdateDate !== null) {
|
|
5831
|
+
contents.timeSeriesLastUpdateDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.timeSeriesLastUpdateDate)));
|
|
5245
5832
|
}
|
|
5246
5833
|
return [2, Promise.resolve(contents)];
|
|
5247
5834
|
}
|
|
5248
5835
|
});
|
|
5249
5836
|
}); };
|
|
5250
|
-
var
|
|
5837
|
+
var deserializeAws_restJson1DescribeTimeSeriesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5251
5838
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
5252
5839
|
var _g;
|
|
5253
5840
|
return __generator(this, function (_h) {
|
|
@@ -5309,53 +5896,35 @@ var deserializeAws_restJson1DescribeProjectCommandError = function (output, cont
|
|
|
5309
5896
|
}
|
|
5310
5897
|
});
|
|
5311
5898
|
}); };
|
|
5312
|
-
export var
|
|
5313
|
-
var contents
|
|
5314
|
-
return __generator(this, function (
|
|
5315
|
-
switch (
|
|
5899
|
+
export var deserializeAws_restJson1DisassociateAssetsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5900
|
+
var contents;
|
|
5901
|
+
return __generator(this, function (_a) {
|
|
5902
|
+
switch (_a.label) {
|
|
5316
5903
|
case 0:
|
|
5317
5904
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
5318
|
-
return [2,
|
|
5905
|
+
return [2, deserializeAws_restJson1DisassociateAssetsCommandError(output, context)];
|
|
5319
5906
|
}
|
|
5320
5907
|
contents = {
|
|
5321
5908
|
$metadata: deserializeMetadata(output),
|
|
5322
|
-
configurationStatus: undefined,
|
|
5323
|
-
lastUpdateDate: undefined,
|
|
5324
|
-
multiLayerStorage: undefined,
|
|
5325
|
-
storageType: undefined,
|
|
5326
5909
|
};
|
|
5327
|
-
|
|
5328
|
-
_b = __expectObject;
|
|
5329
|
-
return [4, parseBody(output.body, context)];
|
|
5910
|
+
return [4, collectBody(output.body, context)];
|
|
5330
5911
|
case 1:
|
|
5331
|
-
|
|
5332
|
-
if (data.configurationStatus !== undefined && data.configurationStatus !== null) {
|
|
5333
|
-
contents.configurationStatus = deserializeAws_restJson1ConfigurationStatus(data.configurationStatus, context);
|
|
5334
|
-
}
|
|
5335
|
-
if (data.lastUpdateDate !== undefined && data.lastUpdateDate !== null) {
|
|
5336
|
-
contents.lastUpdateDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdateDate)));
|
|
5337
|
-
}
|
|
5338
|
-
if (data.multiLayerStorage !== undefined && data.multiLayerStorage !== null) {
|
|
5339
|
-
contents.multiLayerStorage = deserializeAws_restJson1MultiLayerStorage(data.multiLayerStorage, context);
|
|
5340
|
-
}
|
|
5341
|
-
if (data.storageType !== undefined && data.storageType !== null) {
|
|
5342
|
-
contents.storageType = __expectString(data.storageType);
|
|
5343
|
-
}
|
|
5912
|
+
_a.sent();
|
|
5344
5913
|
return [2, Promise.resolve(contents)];
|
|
5345
5914
|
}
|
|
5346
5915
|
});
|
|
5347
5916
|
}); };
|
|
5348
|
-
var
|
|
5349
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g,
|
|
5350
|
-
var
|
|
5351
|
-
return __generator(this, function (
|
|
5352
|
-
switch (
|
|
5917
|
+
var deserializeAws_restJson1DisassociateAssetsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5918
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
5919
|
+
var _h;
|
|
5920
|
+
return __generator(this, function (_j) {
|
|
5921
|
+
switch (_j.label) {
|
|
5353
5922
|
case 0:
|
|
5354
5923
|
_a = [__assign({}, output)];
|
|
5355
|
-
|
|
5924
|
+
_h = {};
|
|
5356
5925
|
return [4, parseBody(output.body, context)];
|
|
5357
5926
|
case 1:
|
|
5358
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
5927
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
5359
5928
|
errorCode = "UnknownError";
|
|
5360
5929
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
5361
5930
|
_b = errorCode;
|
|
@@ -5366,56 +5935,48 @@ var deserializeAws_restJson1DescribeStorageConfigurationCommandError = function
|
|
|
5366
5935
|
case "com.amazonaws.iotsitewise#InternalFailureException": return [3, 4];
|
|
5367
5936
|
case "InvalidRequestException": return [3, 6];
|
|
5368
5937
|
case "com.amazonaws.iotsitewise#InvalidRequestException": return [3, 6];
|
|
5369
|
-
case "
|
|
5370
|
-
case "com.amazonaws.iotsitewise#
|
|
5371
|
-
case "
|
|
5372
|
-
case "com.amazonaws.iotsitewise#
|
|
5373
|
-
case "ThrottlingException": return [3, 12];
|
|
5374
|
-
case "com.amazonaws.iotsitewise#ThrottlingException": return [3, 12];
|
|
5938
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
5939
|
+
case "com.amazonaws.iotsitewise#ResourceNotFoundException": return [3, 8];
|
|
5940
|
+
case "ThrottlingException": return [3, 10];
|
|
5941
|
+
case "com.amazonaws.iotsitewise#ThrottlingException": return [3, 10];
|
|
5375
5942
|
}
|
|
5376
|
-
return [3,
|
|
5943
|
+
return [3, 12];
|
|
5377
5944
|
case 2:
|
|
5378
5945
|
_c = [{}];
|
|
5379
5946
|
return [4, deserializeAws_restJson1ConflictingOperationExceptionResponse(parsedOutput, context)];
|
|
5380
5947
|
case 3:
|
|
5381
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(
|
|
5382
|
-
return [3,
|
|
5948
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5949
|
+
return [3, 13];
|
|
5383
5950
|
case 4:
|
|
5384
5951
|
_d = [{}];
|
|
5385
5952
|
return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
5386
5953
|
case 5:
|
|
5387
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(
|
|
5388
|
-
return [3,
|
|
5954
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5955
|
+
return [3, 13];
|
|
5389
5956
|
case 6:
|
|
5390
5957
|
_e = [{}];
|
|
5391
5958
|
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
5392
5959
|
case 7:
|
|
5393
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(
|
|
5394
|
-
return [3,
|
|
5960
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5961
|
+
return [3, 13];
|
|
5395
5962
|
case 8:
|
|
5396
5963
|
_f = [{}];
|
|
5397
|
-
return [4,
|
|
5964
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
5398
5965
|
case 9:
|
|
5399
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(
|
|
5400
|
-
return [3,
|
|
5966
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5967
|
+
return [3, 13];
|
|
5401
5968
|
case 10:
|
|
5402
5969
|
_g = [{}];
|
|
5403
|
-
return [4,
|
|
5970
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
5404
5971
|
case 11:
|
|
5405
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(
|
|
5406
|
-
return [3,
|
|
5972
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5973
|
+
return [3, 13];
|
|
5407
5974
|
case 12:
|
|
5408
|
-
_h = [{}];
|
|
5409
|
-
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
5410
|
-
case 13:
|
|
5411
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5412
|
-
return [3, 15];
|
|
5413
|
-
case 14:
|
|
5414
5975
|
parsedBody = parsedOutput.body;
|
|
5415
5976
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
5416
5977
|
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
5417
|
-
|
|
5418
|
-
case
|
|
5978
|
+
_j.label = 13;
|
|
5979
|
+
case 13:
|
|
5419
5980
|
message = response.message || response.Message || errorCode;
|
|
5420
5981
|
response.message = message;
|
|
5421
5982
|
delete response.Message;
|
|
@@ -5423,13 +5984,13 @@ var deserializeAws_restJson1DescribeStorageConfigurationCommandError = function
|
|
|
5423
5984
|
}
|
|
5424
5985
|
});
|
|
5425
5986
|
}); };
|
|
5426
|
-
export var
|
|
5987
|
+
export var deserializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5427
5988
|
var contents;
|
|
5428
5989
|
return __generator(this, function (_a) {
|
|
5429
5990
|
switch (_a.label) {
|
|
5430
5991
|
case 0:
|
|
5431
5992
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
5432
|
-
return [2,
|
|
5993
|
+
return [2, deserializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommandError(output, context)];
|
|
5433
5994
|
}
|
|
5434
5995
|
contents = {
|
|
5435
5996
|
$metadata: deserializeMetadata(output),
|
|
@@ -5441,7 +6002,7 @@ export var deserializeAws_restJson1DisassociateAssetsCommand = function (output,
|
|
|
5441
6002
|
}
|
|
5442
6003
|
});
|
|
5443
6004
|
}); };
|
|
5444
|
-
var
|
|
6005
|
+
var deserializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5445
6006
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
5446
6007
|
var _h;
|
|
5447
6008
|
return __generator(this, function (_j) {
|
|
@@ -6853,6 +7414,96 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
|
|
|
6853
7414
|
}
|
|
6854
7415
|
});
|
|
6855
7416
|
}); };
|
|
7417
|
+
export var deserializeAws_restJson1ListTimeSeriesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7418
|
+
var contents, data, _a, _b;
|
|
7419
|
+
return __generator(this, function (_c) {
|
|
7420
|
+
switch (_c.label) {
|
|
7421
|
+
case 0:
|
|
7422
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
7423
|
+
return [2, deserializeAws_restJson1ListTimeSeriesCommandError(output, context)];
|
|
7424
|
+
}
|
|
7425
|
+
contents = {
|
|
7426
|
+
$metadata: deserializeMetadata(output),
|
|
7427
|
+
TimeSeriesSummaries: undefined,
|
|
7428
|
+
nextToken: undefined,
|
|
7429
|
+
};
|
|
7430
|
+
_a = __expectNonNull;
|
|
7431
|
+
_b = __expectObject;
|
|
7432
|
+
return [4, parseBody(output.body, context)];
|
|
7433
|
+
case 1:
|
|
7434
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
7435
|
+
if (data.TimeSeriesSummaries !== undefined && data.TimeSeriesSummaries !== null) {
|
|
7436
|
+
contents.TimeSeriesSummaries = deserializeAws_restJson1TimeSeriesSummaries(data.TimeSeriesSummaries, context);
|
|
7437
|
+
}
|
|
7438
|
+
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
7439
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
7440
|
+
}
|
|
7441
|
+
return [2, Promise.resolve(contents)];
|
|
7442
|
+
}
|
|
7443
|
+
});
|
|
7444
|
+
}); };
|
|
7445
|
+
var deserializeAws_restJson1ListTimeSeriesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7446
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
7447
|
+
var _g;
|
|
7448
|
+
return __generator(this, function (_h) {
|
|
7449
|
+
switch (_h.label) {
|
|
7450
|
+
case 0:
|
|
7451
|
+
_a = [__assign({}, output)];
|
|
7452
|
+
_g = {};
|
|
7453
|
+
return [4, parseBody(output.body, context)];
|
|
7454
|
+
case 1:
|
|
7455
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
7456
|
+
errorCode = "UnknownError";
|
|
7457
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
7458
|
+
_b = errorCode;
|
|
7459
|
+
switch (_b) {
|
|
7460
|
+
case "InternalFailureException": return [3, 2];
|
|
7461
|
+
case "com.amazonaws.iotsitewise#InternalFailureException": return [3, 2];
|
|
7462
|
+
case "InvalidRequestException": return [3, 4];
|
|
7463
|
+
case "com.amazonaws.iotsitewise#InvalidRequestException": return [3, 4];
|
|
7464
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
7465
|
+
case "com.amazonaws.iotsitewise#ResourceNotFoundException": return [3, 6];
|
|
7466
|
+
case "ThrottlingException": return [3, 8];
|
|
7467
|
+
case "com.amazonaws.iotsitewise#ThrottlingException": return [3, 8];
|
|
7468
|
+
}
|
|
7469
|
+
return [3, 10];
|
|
7470
|
+
case 2:
|
|
7471
|
+
_c = [{}];
|
|
7472
|
+
return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
7473
|
+
case 3:
|
|
7474
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7475
|
+
return [3, 11];
|
|
7476
|
+
case 4:
|
|
7477
|
+
_d = [{}];
|
|
7478
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
7479
|
+
case 5:
|
|
7480
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7481
|
+
return [3, 11];
|
|
7482
|
+
case 6:
|
|
7483
|
+
_e = [{}];
|
|
7484
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
7485
|
+
case 7:
|
|
7486
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7487
|
+
return [3, 11];
|
|
7488
|
+
case 8:
|
|
7489
|
+
_f = [{}];
|
|
7490
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
7491
|
+
case 9:
|
|
7492
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7493
|
+
return [3, 11];
|
|
7494
|
+
case 10:
|
|
7495
|
+
parsedBody = parsedOutput.body;
|
|
7496
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
7497
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
7498
|
+
_h.label = 11;
|
|
7499
|
+
case 11:
|
|
7500
|
+
message = response.message || response.Message || errorCode;
|
|
7501
|
+
response.message = message;
|
|
7502
|
+
delete response.Message;
|
|
7503
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
7504
|
+
}
|
|
7505
|
+
});
|
|
7506
|
+
}); };
|
|
6856
7507
|
export var deserializeAws_restJson1PutDefaultEncryptionConfigurationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6857
7508
|
var contents, data, _a, _b;
|
|
6858
7509
|
return __generator(this, function (_c) {
|
|
@@ -7054,6 +7705,7 @@ export var deserializeAws_restJson1PutStorageConfigurationCommand = function (ou
|
|
|
7054
7705
|
contents = {
|
|
7055
7706
|
$metadata: deserializeMetadata(output),
|
|
7056
7707
|
configurationStatus: undefined,
|
|
7708
|
+
disassociatedDataStorage: undefined,
|
|
7057
7709
|
multiLayerStorage: undefined,
|
|
7058
7710
|
storageType: undefined,
|
|
7059
7711
|
};
|
|
@@ -7065,6 +7717,9 @@ export var deserializeAws_restJson1PutStorageConfigurationCommand = function (ou
|
|
|
7065
7717
|
if (data.configurationStatus !== undefined && data.configurationStatus !== null) {
|
|
7066
7718
|
contents.configurationStatus = deserializeAws_restJson1ConfigurationStatus(data.configurationStatus, context);
|
|
7067
7719
|
}
|
|
7720
|
+
if (data.disassociatedDataStorage !== undefined && data.disassociatedDataStorage !== null) {
|
|
7721
|
+
contents.disassociatedDataStorage = __expectString(data.disassociatedDataStorage);
|
|
7722
|
+
}
|
|
7068
7723
|
if (data.multiLayerStorage !== undefined && data.multiLayerStorage !== null) {
|
|
7069
7724
|
contents.multiLayerStorage = deserializeAws_restJson1MultiLayerStorage(data.multiLayerStorage, context);
|
|
7070
7725
|
}
|
|
@@ -9492,6 +10147,32 @@ var deserializeAws_restJson1TimeInNanos = function (output, context) {
|
|
|
9492
10147
|
timeInSeconds: __expectLong(output.timeInSeconds),
|
|
9493
10148
|
};
|
|
9494
10149
|
};
|
|
10150
|
+
var deserializeAws_restJson1TimeSeriesSummaries = function (output, context) {
|
|
10151
|
+
return (output || [])
|
|
10152
|
+
.filter(function (e) { return e != null; })
|
|
10153
|
+
.map(function (entry) {
|
|
10154
|
+
if (entry === null) {
|
|
10155
|
+
return null;
|
|
10156
|
+
}
|
|
10157
|
+
return deserializeAws_restJson1TimeSeriesSummary(entry, context);
|
|
10158
|
+
});
|
|
10159
|
+
};
|
|
10160
|
+
var deserializeAws_restJson1TimeSeriesSummary = function (output, context) {
|
|
10161
|
+
return {
|
|
10162
|
+
alias: __expectString(output.alias),
|
|
10163
|
+
assetId: __expectString(output.assetId),
|
|
10164
|
+
dataType: __expectString(output.dataType),
|
|
10165
|
+
dataTypeSpec: __expectString(output.dataTypeSpec),
|
|
10166
|
+
propertyId: __expectString(output.propertyId),
|
|
10167
|
+
timeSeriesCreationDate: output.timeSeriesCreationDate !== undefined && output.timeSeriesCreationDate !== null
|
|
10168
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.timeSeriesCreationDate)))
|
|
10169
|
+
: undefined,
|
|
10170
|
+
timeSeriesId: __expectString(output.timeSeriesId),
|
|
10171
|
+
timeSeriesLastUpdateDate: output.timeSeriesLastUpdateDate !== undefined && output.timeSeriesLastUpdateDate !== null
|
|
10172
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.timeSeriesLastUpdateDate)))
|
|
10173
|
+
: undefined,
|
|
10174
|
+
};
|
|
10175
|
+
};
|
|
9495
10176
|
var deserializeAws_restJson1Timestamps = function (output, context) {
|
|
9496
10177
|
return (output || [])
|
|
9497
10178
|
.filter(function (e) { return e != null; })
|