@aws-sdk/client-iotsitewise 3.42.0 → 3.46.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 +50 -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/endpoints.js +1 -0
- package/dist-cjs/models/models_0.js +68 -4
- package/dist-cjs/pagination/ListTimeSeriesPaginator.js +35 -0
- package/dist-cjs/pagination/index.js +1 -0
- package/dist-cjs/protocols/Aws_restJson1.js +634 -5
- package/dist-cjs/runtimeConfig.js +0 -2
- 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/endpoints.js +1 -0
- package/dist-es/models/models_0.js +46 -0
- package/dist-es/pagination/ListTimeSeriesPaginator.js +74 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_restJson1.js +807 -106
- package/dist-es/runtimeConfig.js +0 -2
- 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 +451 -83
- 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 +156 -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 +37 -44
|
@@ -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,9 +2032,13 @@ 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(__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),
|
|
2039
|
+
})), (input.retentionPeriod !== undefined &&
|
|
2040
|
+
input.retentionPeriod !== null && {
|
|
2041
|
+
retentionPeriod: serializeAws_restJson1RetentionPeriod(input.retentionPeriod, context),
|
|
1860
2042
|
})), (input.storageType !== undefined && input.storageType !== null && { storageType: input.storageType })));
|
|
1861
2043
|
return [4, context.endpoint()];
|
|
1862
2044
|
case 2:
|
|
@@ -2477,6 +2659,94 @@ var deserializeAws_restJson1AssociateAssetsCommandError = function (output, cont
|
|
|
2477
2659
|
}
|
|
2478
2660
|
});
|
|
2479
2661
|
}); };
|
|
2662
|
+
export var deserializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2663
|
+
var contents;
|
|
2664
|
+
return __generator(this, function (_a) {
|
|
2665
|
+
switch (_a.label) {
|
|
2666
|
+
case 0:
|
|
2667
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2668
|
+
return [2, deserializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommandError(output, context)];
|
|
2669
|
+
}
|
|
2670
|
+
contents = {
|
|
2671
|
+
$metadata: deserializeMetadata(output),
|
|
2672
|
+
};
|
|
2673
|
+
return [4, collectBody(output.body, context)];
|
|
2674
|
+
case 1:
|
|
2675
|
+
_a.sent();
|
|
2676
|
+
return [2, Promise.resolve(contents)];
|
|
2677
|
+
}
|
|
2678
|
+
});
|
|
2679
|
+
}); };
|
|
2680
|
+
var deserializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2681
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
2682
|
+
var _h;
|
|
2683
|
+
return __generator(this, function (_j) {
|
|
2684
|
+
switch (_j.label) {
|
|
2685
|
+
case 0:
|
|
2686
|
+
_a = [__assign({}, output)];
|
|
2687
|
+
_h = {};
|
|
2688
|
+
return [4, parseBody(output.body, context)];
|
|
2689
|
+
case 1:
|
|
2690
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
2691
|
+
errorCode = "UnknownError";
|
|
2692
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2693
|
+
_b = errorCode;
|
|
2694
|
+
switch (_b) {
|
|
2695
|
+
case "ConflictingOperationException": return [3, 2];
|
|
2696
|
+
case "com.amazonaws.iotsitewise#ConflictingOperationException": return [3, 2];
|
|
2697
|
+
case "InternalFailureException": return [3, 4];
|
|
2698
|
+
case "com.amazonaws.iotsitewise#InternalFailureException": return [3, 4];
|
|
2699
|
+
case "InvalidRequestException": return [3, 6];
|
|
2700
|
+
case "com.amazonaws.iotsitewise#InvalidRequestException": return [3, 6];
|
|
2701
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
2702
|
+
case "com.amazonaws.iotsitewise#ResourceNotFoundException": return [3, 8];
|
|
2703
|
+
case "ThrottlingException": return [3, 10];
|
|
2704
|
+
case "com.amazonaws.iotsitewise#ThrottlingException": return [3, 10];
|
|
2705
|
+
}
|
|
2706
|
+
return [3, 12];
|
|
2707
|
+
case 2:
|
|
2708
|
+
_c = [{}];
|
|
2709
|
+
return [4, deserializeAws_restJson1ConflictingOperationExceptionResponse(parsedOutput, context)];
|
|
2710
|
+
case 3:
|
|
2711
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2712
|
+
return [3, 13];
|
|
2713
|
+
case 4:
|
|
2714
|
+
_d = [{}];
|
|
2715
|
+
return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
2716
|
+
case 5:
|
|
2717
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2718
|
+
return [3, 13];
|
|
2719
|
+
case 6:
|
|
2720
|
+
_e = [{}];
|
|
2721
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
2722
|
+
case 7:
|
|
2723
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2724
|
+
return [3, 13];
|
|
2725
|
+
case 8:
|
|
2726
|
+
_f = [{}];
|
|
2727
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
2728
|
+
case 9:
|
|
2729
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2730
|
+
return [3, 13];
|
|
2731
|
+
case 10:
|
|
2732
|
+
_g = [{}];
|
|
2733
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
2734
|
+
case 11:
|
|
2735
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2736
|
+
return [3, 13];
|
|
2737
|
+
case 12:
|
|
2738
|
+
parsedBody = parsedOutput.body;
|
|
2739
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2740
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
2741
|
+
_j.label = 13;
|
|
2742
|
+
case 13:
|
|
2743
|
+
message = response.message || response.Message || errorCode;
|
|
2744
|
+
response.message = message;
|
|
2745
|
+
delete response.Message;
|
|
2746
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
2747
|
+
}
|
|
2748
|
+
});
|
|
2749
|
+
}); };
|
|
2480
2750
|
export var deserializeAws_restJson1BatchAssociateProjectAssetsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2481
2751
|
var contents, data, _a, _b;
|
|
2482
2752
|
return __generator(this, function (_c) {
|
|
@@ -4107,26 +4377,114 @@ var deserializeAws_restJson1DeleteProjectCommandError = function (output, contex
|
|
|
4107
4377
|
}
|
|
4108
4378
|
});
|
|
4109
4379
|
}); };
|
|
4110
|
-
export var
|
|
4111
|
-
var contents
|
|
4112
|
-
return __generator(this, function (
|
|
4113
|
-
switch (
|
|
4380
|
+
export var deserializeAws_restJson1DeleteTimeSeriesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4381
|
+
var contents;
|
|
4382
|
+
return __generator(this, function (_a) {
|
|
4383
|
+
switch (_a.label) {
|
|
4114
4384
|
case 0:
|
|
4115
4385
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4116
|
-
return [2,
|
|
4386
|
+
return [2, deserializeAws_restJson1DeleteTimeSeriesCommandError(output, context)];
|
|
4117
4387
|
}
|
|
4118
4388
|
contents = {
|
|
4119
4389
|
$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
4390
|
};
|
|
4128
|
-
|
|
4129
|
-
|
|
4391
|
+
return [4, collectBody(output.body, context)];
|
|
4392
|
+
case 1:
|
|
4393
|
+
_a.sent();
|
|
4394
|
+
return [2, Promise.resolve(contents)];
|
|
4395
|
+
}
|
|
4396
|
+
});
|
|
4397
|
+
}); };
|
|
4398
|
+
var deserializeAws_restJson1DeleteTimeSeriesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4399
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
4400
|
+
var _h;
|
|
4401
|
+
return __generator(this, function (_j) {
|
|
4402
|
+
switch (_j.label) {
|
|
4403
|
+
case 0:
|
|
4404
|
+
_a = [__assign({}, output)];
|
|
4405
|
+
_h = {};
|
|
4406
|
+
return [4, parseBody(output.body, context)];
|
|
4407
|
+
case 1:
|
|
4408
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
4409
|
+
errorCode = "UnknownError";
|
|
4410
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4411
|
+
_b = errorCode;
|
|
4412
|
+
switch (_b) {
|
|
4413
|
+
case "ConflictingOperationException": return [3, 2];
|
|
4414
|
+
case "com.amazonaws.iotsitewise#ConflictingOperationException": return [3, 2];
|
|
4415
|
+
case "InternalFailureException": return [3, 4];
|
|
4416
|
+
case "com.amazonaws.iotsitewise#InternalFailureException": return [3, 4];
|
|
4417
|
+
case "InvalidRequestException": return [3, 6];
|
|
4418
|
+
case "com.amazonaws.iotsitewise#InvalidRequestException": return [3, 6];
|
|
4419
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
4420
|
+
case "com.amazonaws.iotsitewise#ResourceNotFoundException": return [3, 8];
|
|
4421
|
+
case "ThrottlingException": return [3, 10];
|
|
4422
|
+
case "com.amazonaws.iotsitewise#ThrottlingException": return [3, 10];
|
|
4423
|
+
}
|
|
4424
|
+
return [3, 12];
|
|
4425
|
+
case 2:
|
|
4426
|
+
_c = [{}];
|
|
4427
|
+
return [4, deserializeAws_restJson1ConflictingOperationExceptionResponse(parsedOutput, context)];
|
|
4428
|
+
case 3:
|
|
4429
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
4430
|
+
return [3, 13];
|
|
4431
|
+
case 4:
|
|
4432
|
+
_d = [{}];
|
|
4433
|
+
return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
4434
|
+
case 5:
|
|
4435
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
4436
|
+
return [3, 13];
|
|
4437
|
+
case 6:
|
|
4438
|
+
_e = [{}];
|
|
4439
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
4440
|
+
case 7:
|
|
4441
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
4442
|
+
return [3, 13];
|
|
4443
|
+
case 8:
|
|
4444
|
+
_f = [{}];
|
|
4445
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
4446
|
+
case 9:
|
|
4447
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
4448
|
+
return [3, 13];
|
|
4449
|
+
case 10:
|
|
4450
|
+
_g = [{}];
|
|
4451
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
4452
|
+
case 11:
|
|
4453
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
4454
|
+
return [3, 13];
|
|
4455
|
+
case 12:
|
|
4456
|
+
parsedBody = parsedOutput.body;
|
|
4457
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
4458
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
4459
|
+
_j.label = 13;
|
|
4460
|
+
case 13:
|
|
4461
|
+
message = response.message || response.Message || errorCode;
|
|
4462
|
+
response.message = message;
|
|
4463
|
+
delete response.Message;
|
|
4464
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
4465
|
+
}
|
|
4466
|
+
});
|
|
4467
|
+
}); };
|
|
4468
|
+
export var deserializeAws_restJson1DescribeAccessPolicyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4469
|
+
var contents, data, _a, _b;
|
|
4470
|
+
return __generator(this, function (_c) {
|
|
4471
|
+
switch (_c.label) {
|
|
4472
|
+
case 0:
|
|
4473
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4474
|
+
return [2, deserializeAws_restJson1DescribeAccessPolicyCommandError(output, context)];
|
|
4475
|
+
}
|
|
4476
|
+
contents = {
|
|
4477
|
+
$metadata: deserializeMetadata(output),
|
|
4478
|
+
accessPolicyArn: undefined,
|
|
4479
|
+
accessPolicyCreationDate: undefined,
|
|
4480
|
+
accessPolicyId: undefined,
|
|
4481
|
+
accessPolicyIdentity: undefined,
|
|
4482
|
+
accessPolicyLastUpdateDate: undefined,
|
|
4483
|
+
accessPolicyPermission: undefined,
|
|
4484
|
+
accessPolicyResource: undefined,
|
|
4485
|
+
};
|
|
4486
|
+
_a = __expectNonNull;
|
|
4487
|
+
_b = __expectObject;
|
|
4130
4488
|
return [4, parseBody(output.body, context)];
|
|
4131
4489
|
case 1:
|
|
4132
4490
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
@@ -5182,16 +5540,248 @@ var deserializeAws_restJson1DescribePortalCommandError = function (output, conte
|
|
|
5182
5540
|
return [3, 11];
|
|
5183
5541
|
case 8:
|
|
5184
5542
|
_f = [{}];
|
|
5185
|
-
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
5543
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
5544
|
+
case 9:
|
|
5545
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5546
|
+
return [3, 11];
|
|
5547
|
+
case 10:
|
|
5548
|
+
parsedBody = parsedOutput.body;
|
|
5549
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
5550
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
5551
|
+
_h.label = 11;
|
|
5552
|
+
case 11:
|
|
5553
|
+
message = response.message || response.Message || errorCode;
|
|
5554
|
+
response.message = message;
|
|
5555
|
+
delete response.Message;
|
|
5556
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
5557
|
+
}
|
|
5558
|
+
});
|
|
5559
|
+
}); };
|
|
5560
|
+
export var deserializeAws_restJson1DescribeProjectCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5561
|
+
var contents, data, _a, _b;
|
|
5562
|
+
return __generator(this, function (_c) {
|
|
5563
|
+
switch (_c.label) {
|
|
5564
|
+
case 0:
|
|
5565
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
5566
|
+
return [2, deserializeAws_restJson1DescribeProjectCommandError(output, context)];
|
|
5567
|
+
}
|
|
5568
|
+
contents = {
|
|
5569
|
+
$metadata: deserializeMetadata(output),
|
|
5570
|
+
portalId: undefined,
|
|
5571
|
+
projectArn: undefined,
|
|
5572
|
+
projectCreationDate: undefined,
|
|
5573
|
+
projectDescription: undefined,
|
|
5574
|
+
projectId: undefined,
|
|
5575
|
+
projectLastUpdateDate: undefined,
|
|
5576
|
+
projectName: undefined,
|
|
5577
|
+
};
|
|
5578
|
+
_a = __expectNonNull;
|
|
5579
|
+
_b = __expectObject;
|
|
5580
|
+
return [4, parseBody(output.body, context)];
|
|
5581
|
+
case 1:
|
|
5582
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
5583
|
+
if (data.portalId !== undefined && data.portalId !== null) {
|
|
5584
|
+
contents.portalId = __expectString(data.portalId);
|
|
5585
|
+
}
|
|
5586
|
+
if (data.projectArn !== undefined && data.projectArn !== null) {
|
|
5587
|
+
contents.projectArn = __expectString(data.projectArn);
|
|
5588
|
+
}
|
|
5589
|
+
if (data.projectCreationDate !== undefined && data.projectCreationDate !== null) {
|
|
5590
|
+
contents.projectCreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.projectCreationDate)));
|
|
5591
|
+
}
|
|
5592
|
+
if (data.projectDescription !== undefined && data.projectDescription !== null) {
|
|
5593
|
+
contents.projectDescription = __expectString(data.projectDescription);
|
|
5594
|
+
}
|
|
5595
|
+
if (data.projectId !== undefined && data.projectId !== null) {
|
|
5596
|
+
contents.projectId = __expectString(data.projectId);
|
|
5597
|
+
}
|
|
5598
|
+
if (data.projectLastUpdateDate !== undefined && data.projectLastUpdateDate !== null) {
|
|
5599
|
+
contents.projectLastUpdateDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.projectLastUpdateDate)));
|
|
5600
|
+
}
|
|
5601
|
+
if (data.projectName !== undefined && data.projectName !== null) {
|
|
5602
|
+
contents.projectName = __expectString(data.projectName);
|
|
5603
|
+
}
|
|
5604
|
+
return [2, Promise.resolve(contents)];
|
|
5605
|
+
}
|
|
5606
|
+
});
|
|
5607
|
+
}); };
|
|
5608
|
+
var deserializeAws_restJson1DescribeProjectCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5609
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
5610
|
+
var _g;
|
|
5611
|
+
return __generator(this, function (_h) {
|
|
5612
|
+
switch (_h.label) {
|
|
5613
|
+
case 0:
|
|
5614
|
+
_a = [__assign({}, output)];
|
|
5615
|
+
_g = {};
|
|
5616
|
+
return [4, parseBody(output.body, context)];
|
|
5617
|
+
case 1:
|
|
5618
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
5619
|
+
errorCode = "UnknownError";
|
|
5620
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
5621
|
+
_b = errorCode;
|
|
5622
|
+
switch (_b) {
|
|
5623
|
+
case "InternalFailureException": return [3, 2];
|
|
5624
|
+
case "com.amazonaws.iotsitewise#InternalFailureException": return [3, 2];
|
|
5625
|
+
case "InvalidRequestException": return [3, 4];
|
|
5626
|
+
case "com.amazonaws.iotsitewise#InvalidRequestException": return [3, 4];
|
|
5627
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
5628
|
+
case "com.amazonaws.iotsitewise#ResourceNotFoundException": return [3, 6];
|
|
5629
|
+
case "ThrottlingException": return [3, 8];
|
|
5630
|
+
case "com.amazonaws.iotsitewise#ThrottlingException": return [3, 8];
|
|
5631
|
+
}
|
|
5632
|
+
return [3, 10];
|
|
5633
|
+
case 2:
|
|
5634
|
+
_c = [{}];
|
|
5635
|
+
return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
5636
|
+
case 3:
|
|
5637
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5638
|
+
return [3, 11];
|
|
5639
|
+
case 4:
|
|
5640
|
+
_d = [{}];
|
|
5641
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
5642
|
+
case 5:
|
|
5643
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5644
|
+
return [3, 11];
|
|
5645
|
+
case 6:
|
|
5646
|
+
_e = [{}];
|
|
5647
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
5648
|
+
case 7:
|
|
5649
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5650
|
+
return [3, 11];
|
|
5651
|
+
case 8:
|
|
5652
|
+
_f = [{}];
|
|
5653
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
5654
|
+
case 9:
|
|
5655
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5656
|
+
return [3, 11];
|
|
5657
|
+
case 10:
|
|
5658
|
+
parsedBody = parsedOutput.body;
|
|
5659
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
5660
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
5661
|
+
_h.label = 11;
|
|
5662
|
+
case 11:
|
|
5663
|
+
message = response.message || response.Message || errorCode;
|
|
5664
|
+
response.message = message;
|
|
5665
|
+
delete response.Message;
|
|
5666
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
5667
|
+
}
|
|
5668
|
+
});
|
|
5669
|
+
}); };
|
|
5670
|
+
export var deserializeAws_restJson1DescribeStorageConfigurationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5671
|
+
var contents, data, _a, _b;
|
|
5672
|
+
return __generator(this, function (_c) {
|
|
5673
|
+
switch (_c.label) {
|
|
5674
|
+
case 0:
|
|
5675
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
5676
|
+
return [2, deserializeAws_restJson1DescribeStorageConfigurationCommandError(output, context)];
|
|
5677
|
+
}
|
|
5678
|
+
contents = {
|
|
5679
|
+
$metadata: deserializeMetadata(output),
|
|
5680
|
+
configurationStatus: undefined,
|
|
5681
|
+
disassociatedDataStorage: undefined,
|
|
5682
|
+
lastUpdateDate: undefined,
|
|
5683
|
+
multiLayerStorage: undefined,
|
|
5684
|
+
retentionPeriod: undefined,
|
|
5685
|
+
storageType: undefined,
|
|
5686
|
+
};
|
|
5687
|
+
_a = __expectNonNull;
|
|
5688
|
+
_b = __expectObject;
|
|
5689
|
+
return [4, parseBody(output.body, context)];
|
|
5690
|
+
case 1:
|
|
5691
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
5692
|
+
if (data.configurationStatus !== undefined && data.configurationStatus !== null) {
|
|
5693
|
+
contents.configurationStatus = deserializeAws_restJson1ConfigurationStatus(data.configurationStatus, context);
|
|
5694
|
+
}
|
|
5695
|
+
if (data.disassociatedDataStorage !== undefined && data.disassociatedDataStorage !== null) {
|
|
5696
|
+
contents.disassociatedDataStorage = __expectString(data.disassociatedDataStorage);
|
|
5697
|
+
}
|
|
5698
|
+
if (data.lastUpdateDate !== undefined && data.lastUpdateDate !== null) {
|
|
5699
|
+
contents.lastUpdateDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdateDate)));
|
|
5700
|
+
}
|
|
5701
|
+
if (data.multiLayerStorage !== undefined && data.multiLayerStorage !== null) {
|
|
5702
|
+
contents.multiLayerStorage = deserializeAws_restJson1MultiLayerStorage(data.multiLayerStorage, context);
|
|
5703
|
+
}
|
|
5704
|
+
if (data.retentionPeriod !== undefined && data.retentionPeriod !== null) {
|
|
5705
|
+
contents.retentionPeriod = deserializeAws_restJson1RetentionPeriod(data.retentionPeriod, context);
|
|
5706
|
+
}
|
|
5707
|
+
if (data.storageType !== undefined && data.storageType !== null) {
|
|
5708
|
+
contents.storageType = __expectString(data.storageType);
|
|
5709
|
+
}
|
|
5710
|
+
return [2, Promise.resolve(contents)];
|
|
5711
|
+
}
|
|
5712
|
+
});
|
|
5713
|
+
}); };
|
|
5714
|
+
var deserializeAws_restJson1DescribeStorageConfigurationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5715
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
5716
|
+
var _j;
|
|
5717
|
+
return __generator(this, function (_k) {
|
|
5718
|
+
switch (_k.label) {
|
|
5719
|
+
case 0:
|
|
5720
|
+
_a = [__assign({}, output)];
|
|
5721
|
+
_j = {};
|
|
5722
|
+
return [4, parseBody(output.body, context)];
|
|
5723
|
+
case 1:
|
|
5724
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
5725
|
+
errorCode = "UnknownError";
|
|
5726
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
5727
|
+
_b = errorCode;
|
|
5728
|
+
switch (_b) {
|
|
5729
|
+
case "ConflictingOperationException": return [3, 2];
|
|
5730
|
+
case "com.amazonaws.iotsitewise#ConflictingOperationException": return [3, 2];
|
|
5731
|
+
case "InternalFailureException": return [3, 4];
|
|
5732
|
+
case "com.amazonaws.iotsitewise#InternalFailureException": return [3, 4];
|
|
5733
|
+
case "InvalidRequestException": return [3, 6];
|
|
5734
|
+
case "com.amazonaws.iotsitewise#InvalidRequestException": return [3, 6];
|
|
5735
|
+
case "LimitExceededException": return [3, 8];
|
|
5736
|
+
case "com.amazonaws.iotsitewise#LimitExceededException": return [3, 8];
|
|
5737
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
5738
|
+
case "com.amazonaws.iotsitewise#ResourceNotFoundException": return [3, 10];
|
|
5739
|
+
case "ThrottlingException": return [3, 12];
|
|
5740
|
+
case "com.amazonaws.iotsitewise#ThrottlingException": return [3, 12];
|
|
5741
|
+
}
|
|
5742
|
+
return [3, 14];
|
|
5743
|
+
case 2:
|
|
5744
|
+
_c = [{}];
|
|
5745
|
+
return [4, deserializeAws_restJson1ConflictingOperationExceptionResponse(parsedOutput, context)];
|
|
5746
|
+
case 3:
|
|
5747
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5748
|
+
return [3, 15];
|
|
5749
|
+
case 4:
|
|
5750
|
+
_d = [{}];
|
|
5751
|
+
return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
5752
|
+
case 5:
|
|
5753
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5754
|
+
return [3, 15];
|
|
5755
|
+
case 6:
|
|
5756
|
+
_e = [{}];
|
|
5757
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
5758
|
+
case 7:
|
|
5759
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5760
|
+
return [3, 15];
|
|
5761
|
+
case 8:
|
|
5762
|
+
_f = [{}];
|
|
5763
|
+
return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
5186
5764
|
case 9:
|
|
5187
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(
|
|
5188
|
-
return [3,
|
|
5765
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5766
|
+
return [3, 15];
|
|
5189
5767
|
case 10:
|
|
5768
|
+
_g = [{}];
|
|
5769
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
5770
|
+
case 11:
|
|
5771
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5772
|
+
return [3, 15];
|
|
5773
|
+
case 12:
|
|
5774
|
+
_h = [{}];
|
|
5775
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
5776
|
+
case 13:
|
|
5777
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5778
|
+
return [3, 15];
|
|
5779
|
+
case 14:
|
|
5190
5780
|
parsedBody = parsedOutput.body;
|
|
5191
5781
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
5192
5782
|
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
5193
|
-
|
|
5194
|
-
case
|
|
5783
|
+
_k.label = 15;
|
|
5784
|
+
case 15:
|
|
5195
5785
|
message = response.message || response.Message || errorCode;
|
|
5196
5786
|
response.message = message;
|
|
5197
5787
|
delete response.Message;
|
|
@@ -5199,55 +5789,59 @@ var deserializeAws_restJson1DescribePortalCommandError = function (output, conte
|
|
|
5199
5789
|
}
|
|
5200
5790
|
});
|
|
5201
5791
|
}); };
|
|
5202
|
-
export var
|
|
5792
|
+
export var deserializeAws_restJson1DescribeTimeSeriesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5203
5793
|
var contents, data, _a, _b;
|
|
5204
5794
|
return __generator(this, function (_c) {
|
|
5205
5795
|
switch (_c.label) {
|
|
5206
5796
|
case 0:
|
|
5207
5797
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
5208
|
-
return [2,
|
|
5798
|
+
return [2, deserializeAws_restJson1DescribeTimeSeriesCommandError(output, context)];
|
|
5209
5799
|
}
|
|
5210
5800
|
contents = {
|
|
5211
5801
|
$metadata: deserializeMetadata(output),
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5802
|
+
alias: undefined,
|
|
5803
|
+
assetId: undefined,
|
|
5804
|
+
dataType: undefined,
|
|
5805
|
+
dataTypeSpec: undefined,
|
|
5806
|
+
propertyId: undefined,
|
|
5807
|
+
timeSeriesCreationDate: undefined,
|
|
5808
|
+
timeSeriesId: undefined,
|
|
5809
|
+
timeSeriesLastUpdateDate: undefined,
|
|
5219
5810
|
};
|
|
5220
5811
|
_a = __expectNonNull;
|
|
5221
5812
|
_b = __expectObject;
|
|
5222
5813
|
return [4, parseBody(output.body, context)];
|
|
5223
5814
|
case 1:
|
|
5224
5815
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
5225
|
-
if (data.
|
|
5226
|
-
contents.
|
|
5816
|
+
if (data.alias !== undefined && data.alias !== null) {
|
|
5817
|
+
contents.alias = __expectString(data.alias);
|
|
5227
5818
|
}
|
|
5228
|
-
if (data.
|
|
5229
|
-
contents.
|
|
5819
|
+
if (data.assetId !== undefined && data.assetId !== null) {
|
|
5820
|
+
contents.assetId = __expectString(data.assetId);
|
|
5230
5821
|
}
|
|
5231
|
-
if (data.
|
|
5232
|
-
contents.
|
|
5822
|
+
if (data.dataType !== undefined && data.dataType !== null) {
|
|
5823
|
+
contents.dataType = __expectString(data.dataType);
|
|
5233
5824
|
}
|
|
5234
|
-
if (data.
|
|
5235
|
-
contents.
|
|
5825
|
+
if (data.dataTypeSpec !== undefined && data.dataTypeSpec !== null) {
|
|
5826
|
+
contents.dataTypeSpec = __expectString(data.dataTypeSpec);
|
|
5236
5827
|
}
|
|
5237
|
-
if (data.
|
|
5238
|
-
contents.
|
|
5828
|
+
if (data.propertyId !== undefined && data.propertyId !== null) {
|
|
5829
|
+
contents.propertyId = __expectString(data.propertyId);
|
|
5239
5830
|
}
|
|
5240
|
-
if (data.
|
|
5241
|
-
contents.
|
|
5831
|
+
if (data.timeSeriesCreationDate !== undefined && data.timeSeriesCreationDate !== null) {
|
|
5832
|
+
contents.timeSeriesCreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.timeSeriesCreationDate)));
|
|
5242
5833
|
}
|
|
5243
|
-
if (data.
|
|
5244
|
-
contents.
|
|
5834
|
+
if (data.timeSeriesId !== undefined && data.timeSeriesId !== null) {
|
|
5835
|
+
contents.timeSeriesId = __expectString(data.timeSeriesId);
|
|
5836
|
+
}
|
|
5837
|
+
if (data.timeSeriesLastUpdateDate !== undefined && data.timeSeriesLastUpdateDate !== null) {
|
|
5838
|
+
contents.timeSeriesLastUpdateDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.timeSeriesLastUpdateDate)));
|
|
5245
5839
|
}
|
|
5246
5840
|
return [2, Promise.resolve(contents)];
|
|
5247
5841
|
}
|
|
5248
5842
|
});
|
|
5249
5843
|
}); };
|
|
5250
|
-
var
|
|
5844
|
+
var deserializeAws_restJson1DescribeTimeSeriesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5251
5845
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
5252
5846
|
var _g;
|
|
5253
5847
|
return __generator(this, function (_h) {
|
|
@@ -5309,53 +5903,35 @@ var deserializeAws_restJson1DescribeProjectCommandError = function (output, cont
|
|
|
5309
5903
|
}
|
|
5310
5904
|
});
|
|
5311
5905
|
}); };
|
|
5312
|
-
export var
|
|
5313
|
-
var contents
|
|
5314
|
-
return __generator(this, function (
|
|
5315
|
-
switch (
|
|
5906
|
+
export var deserializeAws_restJson1DisassociateAssetsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5907
|
+
var contents;
|
|
5908
|
+
return __generator(this, function (_a) {
|
|
5909
|
+
switch (_a.label) {
|
|
5316
5910
|
case 0:
|
|
5317
5911
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
5318
|
-
return [2,
|
|
5912
|
+
return [2, deserializeAws_restJson1DisassociateAssetsCommandError(output, context)];
|
|
5319
5913
|
}
|
|
5320
5914
|
contents = {
|
|
5321
5915
|
$metadata: deserializeMetadata(output),
|
|
5322
|
-
configurationStatus: undefined,
|
|
5323
|
-
lastUpdateDate: undefined,
|
|
5324
|
-
multiLayerStorage: undefined,
|
|
5325
|
-
storageType: undefined,
|
|
5326
5916
|
};
|
|
5327
|
-
|
|
5328
|
-
_b = __expectObject;
|
|
5329
|
-
return [4, parseBody(output.body, context)];
|
|
5917
|
+
return [4, collectBody(output.body, context)];
|
|
5330
5918
|
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
|
-
}
|
|
5919
|
+
_a.sent();
|
|
5344
5920
|
return [2, Promise.resolve(contents)];
|
|
5345
5921
|
}
|
|
5346
5922
|
});
|
|
5347
5923
|
}); };
|
|
5348
|
-
var
|
|
5349
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g,
|
|
5350
|
-
var
|
|
5351
|
-
return __generator(this, function (
|
|
5352
|
-
switch (
|
|
5924
|
+
var deserializeAws_restJson1DisassociateAssetsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5925
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
5926
|
+
var _h;
|
|
5927
|
+
return __generator(this, function (_j) {
|
|
5928
|
+
switch (_j.label) {
|
|
5353
5929
|
case 0:
|
|
5354
5930
|
_a = [__assign({}, output)];
|
|
5355
|
-
|
|
5931
|
+
_h = {};
|
|
5356
5932
|
return [4, parseBody(output.body, context)];
|
|
5357
5933
|
case 1:
|
|
5358
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
5934
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
5359
5935
|
errorCode = "UnknownError";
|
|
5360
5936
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
5361
5937
|
_b = errorCode;
|
|
@@ -5366,56 +5942,48 @@ var deserializeAws_restJson1DescribeStorageConfigurationCommandError = function
|
|
|
5366
5942
|
case "com.amazonaws.iotsitewise#InternalFailureException": return [3, 4];
|
|
5367
5943
|
case "InvalidRequestException": return [3, 6];
|
|
5368
5944
|
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];
|
|
5945
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
5946
|
+
case "com.amazonaws.iotsitewise#ResourceNotFoundException": return [3, 8];
|
|
5947
|
+
case "ThrottlingException": return [3, 10];
|
|
5948
|
+
case "com.amazonaws.iotsitewise#ThrottlingException": return [3, 10];
|
|
5375
5949
|
}
|
|
5376
|
-
return [3,
|
|
5950
|
+
return [3, 12];
|
|
5377
5951
|
case 2:
|
|
5378
5952
|
_c = [{}];
|
|
5379
5953
|
return [4, deserializeAws_restJson1ConflictingOperationExceptionResponse(parsedOutput, context)];
|
|
5380
5954
|
case 3:
|
|
5381
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(
|
|
5382
|
-
return [3,
|
|
5955
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5956
|
+
return [3, 13];
|
|
5383
5957
|
case 4:
|
|
5384
5958
|
_d = [{}];
|
|
5385
5959
|
return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
5386
5960
|
case 5:
|
|
5387
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(
|
|
5388
|
-
return [3,
|
|
5961
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5962
|
+
return [3, 13];
|
|
5389
5963
|
case 6:
|
|
5390
5964
|
_e = [{}];
|
|
5391
5965
|
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
5392
5966
|
case 7:
|
|
5393
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(
|
|
5394
|
-
return [3,
|
|
5967
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5968
|
+
return [3, 13];
|
|
5395
5969
|
case 8:
|
|
5396
5970
|
_f = [{}];
|
|
5397
|
-
return [4,
|
|
5971
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
5398
5972
|
case 9:
|
|
5399
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(
|
|
5400
|
-
return [3,
|
|
5973
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5974
|
+
return [3, 13];
|
|
5401
5975
|
case 10:
|
|
5402
5976
|
_g = [{}];
|
|
5403
|
-
return [4,
|
|
5977
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
5404
5978
|
case 11:
|
|
5405
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(
|
|
5406
|
-
return [3,
|
|
5979
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5980
|
+
return [3, 13];
|
|
5407
5981
|
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
5982
|
parsedBody = parsedOutput.body;
|
|
5415
5983
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
5416
5984
|
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
5417
|
-
|
|
5418
|
-
case
|
|
5985
|
+
_j.label = 13;
|
|
5986
|
+
case 13:
|
|
5419
5987
|
message = response.message || response.Message || errorCode;
|
|
5420
5988
|
response.message = message;
|
|
5421
5989
|
delete response.Message;
|
|
@@ -5423,13 +5991,13 @@ var deserializeAws_restJson1DescribeStorageConfigurationCommandError = function
|
|
|
5423
5991
|
}
|
|
5424
5992
|
});
|
|
5425
5993
|
}); };
|
|
5426
|
-
export var
|
|
5994
|
+
export var deserializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5427
5995
|
var contents;
|
|
5428
5996
|
return __generator(this, function (_a) {
|
|
5429
5997
|
switch (_a.label) {
|
|
5430
5998
|
case 0:
|
|
5431
5999
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
5432
|
-
return [2,
|
|
6000
|
+
return [2, deserializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommandError(output, context)];
|
|
5433
6001
|
}
|
|
5434
6002
|
contents = {
|
|
5435
6003
|
$metadata: deserializeMetadata(output),
|
|
@@ -5441,7 +6009,7 @@ export var deserializeAws_restJson1DisassociateAssetsCommand = function (output,
|
|
|
5441
6009
|
}
|
|
5442
6010
|
});
|
|
5443
6011
|
}); };
|
|
5444
|
-
var
|
|
6012
|
+
var deserializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5445
6013
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
5446
6014
|
var _h;
|
|
5447
6015
|
return __generator(this, function (_j) {
|
|
@@ -6853,6 +7421,96 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
|
|
|
6853
7421
|
}
|
|
6854
7422
|
});
|
|
6855
7423
|
}); };
|
|
7424
|
+
export var deserializeAws_restJson1ListTimeSeriesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7425
|
+
var contents, data, _a, _b;
|
|
7426
|
+
return __generator(this, function (_c) {
|
|
7427
|
+
switch (_c.label) {
|
|
7428
|
+
case 0:
|
|
7429
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
7430
|
+
return [2, deserializeAws_restJson1ListTimeSeriesCommandError(output, context)];
|
|
7431
|
+
}
|
|
7432
|
+
contents = {
|
|
7433
|
+
$metadata: deserializeMetadata(output),
|
|
7434
|
+
TimeSeriesSummaries: undefined,
|
|
7435
|
+
nextToken: undefined,
|
|
7436
|
+
};
|
|
7437
|
+
_a = __expectNonNull;
|
|
7438
|
+
_b = __expectObject;
|
|
7439
|
+
return [4, parseBody(output.body, context)];
|
|
7440
|
+
case 1:
|
|
7441
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
7442
|
+
if (data.TimeSeriesSummaries !== undefined && data.TimeSeriesSummaries !== null) {
|
|
7443
|
+
contents.TimeSeriesSummaries = deserializeAws_restJson1TimeSeriesSummaries(data.TimeSeriesSummaries, context);
|
|
7444
|
+
}
|
|
7445
|
+
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
7446
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
7447
|
+
}
|
|
7448
|
+
return [2, Promise.resolve(contents)];
|
|
7449
|
+
}
|
|
7450
|
+
});
|
|
7451
|
+
}); };
|
|
7452
|
+
var deserializeAws_restJson1ListTimeSeriesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7453
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
7454
|
+
var _g;
|
|
7455
|
+
return __generator(this, function (_h) {
|
|
7456
|
+
switch (_h.label) {
|
|
7457
|
+
case 0:
|
|
7458
|
+
_a = [__assign({}, output)];
|
|
7459
|
+
_g = {};
|
|
7460
|
+
return [4, parseBody(output.body, context)];
|
|
7461
|
+
case 1:
|
|
7462
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
7463
|
+
errorCode = "UnknownError";
|
|
7464
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
7465
|
+
_b = errorCode;
|
|
7466
|
+
switch (_b) {
|
|
7467
|
+
case "InternalFailureException": return [3, 2];
|
|
7468
|
+
case "com.amazonaws.iotsitewise#InternalFailureException": return [3, 2];
|
|
7469
|
+
case "InvalidRequestException": return [3, 4];
|
|
7470
|
+
case "com.amazonaws.iotsitewise#InvalidRequestException": return [3, 4];
|
|
7471
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
7472
|
+
case "com.amazonaws.iotsitewise#ResourceNotFoundException": return [3, 6];
|
|
7473
|
+
case "ThrottlingException": return [3, 8];
|
|
7474
|
+
case "com.amazonaws.iotsitewise#ThrottlingException": return [3, 8];
|
|
7475
|
+
}
|
|
7476
|
+
return [3, 10];
|
|
7477
|
+
case 2:
|
|
7478
|
+
_c = [{}];
|
|
7479
|
+
return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
7480
|
+
case 3:
|
|
7481
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7482
|
+
return [3, 11];
|
|
7483
|
+
case 4:
|
|
7484
|
+
_d = [{}];
|
|
7485
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
7486
|
+
case 5:
|
|
7487
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7488
|
+
return [3, 11];
|
|
7489
|
+
case 6:
|
|
7490
|
+
_e = [{}];
|
|
7491
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
7492
|
+
case 7:
|
|
7493
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7494
|
+
return [3, 11];
|
|
7495
|
+
case 8:
|
|
7496
|
+
_f = [{}];
|
|
7497
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
7498
|
+
case 9:
|
|
7499
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7500
|
+
return [3, 11];
|
|
7501
|
+
case 10:
|
|
7502
|
+
parsedBody = parsedOutput.body;
|
|
7503
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
7504
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
7505
|
+
_h.label = 11;
|
|
7506
|
+
case 11:
|
|
7507
|
+
message = response.message || response.Message || errorCode;
|
|
7508
|
+
response.message = message;
|
|
7509
|
+
delete response.Message;
|
|
7510
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
7511
|
+
}
|
|
7512
|
+
});
|
|
7513
|
+
}); };
|
|
6856
7514
|
export var deserializeAws_restJson1PutDefaultEncryptionConfigurationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6857
7515
|
var contents, data, _a, _b;
|
|
6858
7516
|
return __generator(this, function (_c) {
|
|
@@ -7054,7 +7712,9 @@ export var deserializeAws_restJson1PutStorageConfigurationCommand = function (ou
|
|
|
7054
7712
|
contents = {
|
|
7055
7713
|
$metadata: deserializeMetadata(output),
|
|
7056
7714
|
configurationStatus: undefined,
|
|
7715
|
+
disassociatedDataStorage: undefined,
|
|
7057
7716
|
multiLayerStorage: undefined,
|
|
7717
|
+
retentionPeriod: undefined,
|
|
7058
7718
|
storageType: undefined,
|
|
7059
7719
|
};
|
|
7060
7720
|
_a = __expectNonNull;
|
|
@@ -7065,9 +7725,15 @@ export var deserializeAws_restJson1PutStorageConfigurationCommand = function (ou
|
|
|
7065
7725
|
if (data.configurationStatus !== undefined && data.configurationStatus !== null) {
|
|
7066
7726
|
contents.configurationStatus = deserializeAws_restJson1ConfigurationStatus(data.configurationStatus, context);
|
|
7067
7727
|
}
|
|
7728
|
+
if (data.disassociatedDataStorage !== undefined && data.disassociatedDataStorage !== null) {
|
|
7729
|
+
contents.disassociatedDataStorage = __expectString(data.disassociatedDataStorage);
|
|
7730
|
+
}
|
|
7068
7731
|
if (data.multiLayerStorage !== undefined && data.multiLayerStorage !== null) {
|
|
7069
7732
|
contents.multiLayerStorage = deserializeAws_restJson1MultiLayerStorage(data.multiLayerStorage, context);
|
|
7070
7733
|
}
|
|
7734
|
+
if (data.retentionPeriod !== undefined && data.retentionPeriod !== null) {
|
|
7735
|
+
contents.retentionPeriod = deserializeAws_restJson1RetentionPeriod(data.retentionPeriod, context);
|
|
7736
|
+
}
|
|
7071
7737
|
if (data.storageType !== undefined && data.storageType !== null) {
|
|
7072
7738
|
contents.storageType = __expectString(data.storageType);
|
|
7073
7739
|
}
|
|
@@ -8631,6 +9297,9 @@ var serializeAws_restJson1Resource = function (input, context) {
|
|
|
8631
9297
|
input.portal !== null && { portal: serializeAws_restJson1PortalResource(input.portal, context) })), (input.project !== undefined &&
|
|
8632
9298
|
input.project !== null && { project: serializeAws_restJson1ProjectResource(input.project, context) }));
|
|
8633
9299
|
};
|
|
9300
|
+
var serializeAws_restJson1RetentionPeriod = function (input, context) {
|
|
9301
|
+
return __assign(__assign({}, (input.numberOfDays !== undefined && input.numberOfDays !== null && { numberOfDays: input.numberOfDays })), (input.unlimited !== undefined && input.unlimited !== null && { unlimited: input.unlimited }));
|
|
9302
|
+
};
|
|
8634
9303
|
var serializeAws_restJson1TagMap = function (input, context) {
|
|
8635
9304
|
return Object.entries(input).reduce(function (acc, _a) {
|
|
8636
9305
|
var _b;
|
|
@@ -9476,6 +10145,12 @@ var deserializeAws_restJson1Resource = function (output, context) {
|
|
|
9476
10145
|
: undefined,
|
|
9477
10146
|
};
|
|
9478
10147
|
};
|
|
10148
|
+
var deserializeAws_restJson1RetentionPeriod = function (output, context) {
|
|
10149
|
+
return {
|
|
10150
|
+
numberOfDays: __expectInt32(output.numberOfDays),
|
|
10151
|
+
unlimited: __expectBoolean(output.unlimited),
|
|
10152
|
+
};
|
|
10153
|
+
};
|
|
9479
10154
|
var deserializeAws_restJson1TagMap = function (output, context) {
|
|
9480
10155
|
return Object.entries(output).reduce(function (acc, _a) {
|
|
9481
10156
|
var _b;
|
|
@@ -9492,6 +10167,32 @@ var deserializeAws_restJson1TimeInNanos = function (output, context) {
|
|
|
9492
10167
|
timeInSeconds: __expectLong(output.timeInSeconds),
|
|
9493
10168
|
};
|
|
9494
10169
|
};
|
|
10170
|
+
var deserializeAws_restJson1TimeSeriesSummaries = function (output, context) {
|
|
10171
|
+
return (output || [])
|
|
10172
|
+
.filter(function (e) { return e != null; })
|
|
10173
|
+
.map(function (entry) {
|
|
10174
|
+
if (entry === null) {
|
|
10175
|
+
return null;
|
|
10176
|
+
}
|
|
10177
|
+
return deserializeAws_restJson1TimeSeriesSummary(entry, context);
|
|
10178
|
+
});
|
|
10179
|
+
};
|
|
10180
|
+
var deserializeAws_restJson1TimeSeriesSummary = function (output, context) {
|
|
10181
|
+
return {
|
|
10182
|
+
alias: __expectString(output.alias),
|
|
10183
|
+
assetId: __expectString(output.assetId),
|
|
10184
|
+
dataType: __expectString(output.dataType),
|
|
10185
|
+
dataTypeSpec: __expectString(output.dataTypeSpec),
|
|
10186
|
+
propertyId: __expectString(output.propertyId),
|
|
10187
|
+
timeSeriesCreationDate: output.timeSeriesCreationDate !== undefined && output.timeSeriesCreationDate !== null
|
|
10188
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.timeSeriesCreationDate)))
|
|
10189
|
+
: undefined,
|
|
10190
|
+
timeSeriesId: __expectString(output.timeSeriesId),
|
|
10191
|
+
timeSeriesLastUpdateDate: output.timeSeriesLastUpdateDate !== undefined && output.timeSeriesLastUpdateDate !== null
|
|
10192
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.timeSeriesLastUpdateDate)))
|
|
10193
|
+
: undefined,
|
|
10194
|
+
};
|
|
10195
|
+
};
|
|
9495
10196
|
var deserializeAws_restJson1Timestamps = function (output, context) {
|
|
9496
10197
|
return (output || [])
|
|
9497
10198
|
.filter(function (e) { return e != null; })
|