@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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.deserializeAws_restJson1UpdateProjectCommand = exports.deserializeAws_restJson1UpdatePortalCommand = exports.deserializeAws_restJson1UpdateGatewayCapabilityConfigurationCommand = exports.deserializeAws_restJson1UpdateGatewayCommand = exports.deserializeAws_restJson1UpdateDashboardCommand = exports.deserializeAws_restJson1UpdateAssetPropertyCommand = exports.deserializeAws_restJson1UpdateAssetModelCommand = exports.deserializeAws_restJson1UpdateAssetCommand = exports.deserializeAws_restJson1UpdateAccessPolicyCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1PutStorageConfigurationCommand = exports.deserializeAws_restJson1PutLoggingOptionsCommand = exports.deserializeAws_restJson1PutDefaultEncryptionConfigurationCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListProjectsCommand = exports.deserializeAws_restJson1ListProjectAssetsCommand = exports.deserializeAws_restJson1ListPortalsCommand = exports.deserializeAws_restJson1ListGatewaysCommand = exports.deserializeAws_restJson1ListDashboardsCommand = void 0;
|
|
3
|
+
exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListProjectsCommand = exports.serializeAws_restJson1ListProjectAssetsCommand = exports.serializeAws_restJson1ListPortalsCommand = exports.serializeAws_restJson1ListGatewaysCommand = exports.serializeAws_restJson1ListDashboardsCommand = exports.serializeAws_restJson1ListAssociatedAssetsCommand = exports.serializeAws_restJson1ListAssetsCommand = exports.serializeAws_restJson1ListAssetRelationshipsCommand = exports.serializeAws_restJson1ListAssetModelsCommand = exports.serializeAws_restJson1ListAccessPoliciesCommand = exports.serializeAws_restJson1GetInterpolatedAssetPropertyValuesCommand = exports.serializeAws_restJson1GetAssetPropertyValueHistoryCommand = exports.serializeAws_restJson1GetAssetPropertyValueCommand = exports.serializeAws_restJson1GetAssetPropertyAggregatesCommand = exports.serializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommand = exports.serializeAws_restJson1DisassociateAssetsCommand = exports.serializeAws_restJson1DescribeTimeSeriesCommand = exports.serializeAws_restJson1DescribeStorageConfigurationCommand = exports.serializeAws_restJson1DescribeProjectCommand = exports.serializeAws_restJson1DescribePortalCommand = exports.serializeAws_restJson1DescribeLoggingOptionsCommand = exports.serializeAws_restJson1DescribeGatewayCapabilityConfigurationCommand = exports.serializeAws_restJson1DescribeGatewayCommand = exports.serializeAws_restJson1DescribeDefaultEncryptionConfigurationCommand = exports.serializeAws_restJson1DescribeDashboardCommand = exports.serializeAws_restJson1DescribeAssetPropertyCommand = exports.serializeAws_restJson1DescribeAssetModelCommand = exports.serializeAws_restJson1DescribeAssetCommand = exports.serializeAws_restJson1DescribeAccessPolicyCommand = exports.serializeAws_restJson1DeleteTimeSeriesCommand = exports.serializeAws_restJson1DeleteProjectCommand = exports.serializeAws_restJson1DeletePortalCommand = exports.serializeAws_restJson1DeleteGatewayCommand = exports.serializeAws_restJson1DeleteDashboardCommand = exports.serializeAws_restJson1DeleteAssetModelCommand = exports.serializeAws_restJson1DeleteAssetCommand = exports.serializeAws_restJson1DeleteAccessPolicyCommand = exports.serializeAws_restJson1CreateProjectCommand = exports.serializeAws_restJson1CreatePortalCommand = exports.serializeAws_restJson1CreateGatewayCommand = exports.serializeAws_restJson1CreateDashboardCommand = exports.serializeAws_restJson1CreateAssetModelCommand = exports.serializeAws_restJson1CreateAssetCommand = exports.serializeAws_restJson1CreateAccessPolicyCommand = exports.serializeAws_restJson1BatchPutAssetPropertyValueCommand = exports.serializeAws_restJson1BatchDisassociateProjectAssetsCommand = exports.serializeAws_restJson1BatchAssociateProjectAssetsCommand = exports.serializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommand = exports.serializeAws_restJson1AssociateAssetsCommand = void 0;
|
|
4
|
+
exports.deserializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommand = exports.deserializeAws_restJson1DisassociateAssetsCommand = exports.deserializeAws_restJson1DescribeTimeSeriesCommand = exports.deserializeAws_restJson1DescribeStorageConfigurationCommand = exports.deserializeAws_restJson1DescribeProjectCommand = exports.deserializeAws_restJson1DescribePortalCommand = exports.deserializeAws_restJson1DescribeLoggingOptionsCommand = exports.deserializeAws_restJson1DescribeGatewayCapabilityConfigurationCommand = exports.deserializeAws_restJson1DescribeGatewayCommand = exports.deserializeAws_restJson1DescribeDefaultEncryptionConfigurationCommand = exports.deserializeAws_restJson1DescribeDashboardCommand = exports.deserializeAws_restJson1DescribeAssetPropertyCommand = exports.deserializeAws_restJson1DescribeAssetModelCommand = exports.deserializeAws_restJson1DescribeAssetCommand = exports.deserializeAws_restJson1DescribeAccessPolicyCommand = exports.deserializeAws_restJson1DeleteTimeSeriesCommand = exports.deserializeAws_restJson1DeleteProjectCommand = exports.deserializeAws_restJson1DeletePortalCommand = exports.deserializeAws_restJson1DeleteGatewayCommand = exports.deserializeAws_restJson1DeleteDashboardCommand = exports.deserializeAws_restJson1DeleteAssetModelCommand = exports.deserializeAws_restJson1DeleteAssetCommand = exports.deserializeAws_restJson1DeleteAccessPolicyCommand = exports.deserializeAws_restJson1CreateProjectCommand = exports.deserializeAws_restJson1CreatePortalCommand = exports.deserializeAws_restJson1CreateGatewayCommand = exports.deserializeAws_restJson1CreateDashboardCommand = exports.deserializeAws_restJson1CreateAssetModelCommand = exports.deserializeAws_restJson1CreateAssetCommand = exports.deserializeAws_restJson1CreateAccessPolicyCommand = exports.deserializeAws_restJson1BatchPutAssetPropertyValueCommand = exports.deserializeAws_restJson1BatchDisassociateProjectAssetsCommand = exports.deserializeAws_restJson1BatchAssociateProjectAssetsCommand = exports.deserializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommand = exports.deserializeAws_restJson1AssociateAssetsCommand = exports.serializeAws_restJson1UpdateProjectCommand = exports.serializeAws_restJson1UpdatePortalCommand = exports.serializeAws_restJson1UpdateGatewayCapabilityConfigurationCommand = exports.serializeAws_restJson1UpdateGatewayCommand = exports.serializeAws_restJson1UpdateDashboardCommand = exports.serializeAws_restJson1UpdateAssetPropertyCommand = exports.serializeAws_restJson1UpdateAssetModelCommand = exports.serializeAws_restJson1UpdateAssetCommand = exports.serializeAws_restJson1UpdateAccessPolicyCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1PutStorageConfigurationCommand = exports.serializeAws_restJson1PutLoggingOptionsCommand = exports.serializeAws_restJson1PutDefaultEncryptionConfigurationCommand = exports.serializeAws_restJson1ListTimeSeriesCommand = void 0;
|
|
5
|
+
exports.deserializeAws_restJson1UpdateProjectCommand = exports.deserializeAws_restJson1UpdatePortalCommand = exports.deserializeAws_restJson1UpdateGatewayCapabilityConfigurationCommand = exports.deserializeAws_restJson1UpdateGatewayCommand = exports.deserializeAws_restJson1UpdateDashboardCommand = exports.deserializeAws_restJson1UpdateAssetPropertyCommand = exports.deserializeAws_restJson1UpdateAssetModelCommand = exports.deserializeAws_restJson1UpdateAssetCommand = exports.deserializeAws_restJson1UpdateAccessPolicyCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1PutStorageConfigurationCommand = exports.deserializeAws_restJson1PutLoggingOptionsCommand = exports.deserializeAws_restJson1PutDefaultEncryptionConfigurationCommand = exports.deserializeAws_restJson1ListTimeSeriesCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListProjectsCommand = exports.deserializeAws_restJson1ListProjectAssetsCommand = exports.deserializeAws_restJson1ListPortalsCommand = exports.deserializeAws_restJson1ListGatewaysCommand = exports.deserializeAws_restJson1ListDashboardsCommand = exports.deserializeAws_restJson1ListAssociatedAssetsCommand = exports.deserializeAws_restJson1ListAssetsCommand = exports.deserializeAws_restJson1ListAssetRelationshipsCommand = exports.deserializeAws_restJson1ListAssetModelsCommand = exports.deserializeAws_restJson1ListAccessPoliciesCommand = exports.deserializeAws_restJson1GetInterpolatedAssetPropertyValuesCommand = exports.deserializeAws_restJson1GetAssetPropertyValueHistoryCommand = exports.deserializeAws_restJson1GetAssetPropertyValueCommand = exports.deserializeAws_restJson1GetAssetPropertyAggregatesCommand = void 0;
|
|
6
6
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
7
7
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
8
8
|
const uuid_1 = require("uuid");
|
|
@@ -47,6 +47,41 @@ const serializeAws_restJson1AssociateAssetsCommand = async (input, context) => {
|
|
|
47
47
|
});
|
|
48
48
|
};
|
|
49
49
|
exports.serializeAws_restJson1AssociateAssetsCommand = serializeAws_restJson1AssociateAssetsCommand;
|
|
50
|
+
const serializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommand = async (input, context) => {
|
|
51
|
+
var _a;
|
|
52
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
53
|
+
const headers = {
|
|
54
|
+
"content-type": "application/json",
|
|
55
|
+
};
|
|
56
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/timeseries/associate";
|
|
57
|
+
const query = {
|
|
58
|
+
...(input.alias !== undefined && { alias: input.alias }),
|
|
59
|
+
...(input.assetId !== undefined && { assetId: input.assetId }),
|
|
60
|
+
...(input.propertyId !== undefined && { propertyId: input.propertyId }),
|
|
61
|
+
};
|
|
62
|
+
let body;
|
|
63
|
+
body = JSON.stringify({
|
|
64
|
+
clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : uuid_1.v4(),
|
|
65
|
+
});
|
|
66
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
67
|
+
if (context.disableHostPrefix !== true) {
|
|
68
|
+
resolvedHostname = "api." + resolvedHostname;
|
|
69
|
+
if (!protocol_http_1.isValidHostname(resolvedHostname)) {
|
|
70
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return new protocol_http_1.HttpRequest({
|
|
74
|
+
protocol,
|
|
75
|
+
hostname: resolvedHostname,
|
|
76
|
+
port,
|
|
77
|
+
method: "POST",
|
|
78
|
+
headers,
|
|
79
|
+
path: resolvedPath,
|
|
80
|
+
query,
|
|
81
|
+
body,
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
exports.serializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommand = serializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommand;
|
|
50
85
|
const serializeAws_restJson1BatchAssociateProjectAssetsCommand = async (input, context) => {
|
|
51
86
|
var _a;
|
|
52
87
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
@@ -682,6 +717,41 @@ const serializeAws_restJson1DeleteProjectCommand = async (input, context) => {
|
|
|
682
717
|
});
|
|
683
718
|
};
|
|
684
719
|
exports.serializeAws_restJson1DeleteProjectCommand = serializeAws_restJson1DeleteProjectCommand;
|
|
720
|
+
const serializeAws_restJson1DeleteTimeSeriesCommand = async (input, context) => {
|
|
721
|
+
var _a;
|
|
722
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
723
|
+
const headers = {
|
|
724
|
+
"content-type": "application/json",
|
|
725
|
+
};
|
|
726
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/timeseries/delete";
|
|
727
|
+
const query = {
|
|
728
|
+
...(input.alias !== undefined && { alias: input.alias }),
|
|
729
|
+
...(input.assetId !== undefined && { assetId: input.assetId }),
|
|
730
|
+
...(input.propertyId !== undefined && { propertyId: input.propertyId }),
|
|
731
|
+
};
|
|
732
|
+
let body;
|
|
733
|
+
body = JSON.stringify({
|
|
734
|
+
clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : uuid_1.v4(),
|
|
735
|
+
});
|
|
736
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
737
|
+
if (context.disableHostPrefix !== true) {
|
|
738
|
+
resolvedHostname = "api." + resolvedHostname;
|
|
739
|
+
if (!protocol_http_1.isValidHostname(resolvedHostname)) {
|
|
740
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
return new protocol_http_1.HttpRequest({
|
|
744
|
+
protocol,
|
|
745
|
+
hostname: resolvedHostname,
|
|
746
|
+
port,
|
|
747
|
+
method: "POST",
|
|
748
|
+
headers,
|
|
749
|
+
path: resolvedPath,
|
|
750
|
+
query,
|
|
751
|
+
body,
|
|
752
|
+
});
|
|
753
|
+
};
|
|
754
|
+
exports.serializeAws_restJson1DeleteTimeSeriesCommand = serializeAws_restJson1DeleteTimeSeriesCommand;
|
|
685
755
|
const serializeAws_restJson1DescribeAccessPolicyCommand = async (input, context) => {
|
|
686
756
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
687
757
|
const headers = {};
|
|
@@ -1078,6 +1148,35 @@ const serializeAws_restJson1DescribeStorageConfigurationCommand = async (input,
|
|
|
1078
1148
|
});
|
|
1079
1149
|
};
|
|
1080
1150
|
exports.serializeAws_restJson1DescribeStorageConfigurationCommand = serializeAws_restJson1DescribeStorageConfigurationCommand;
|
|
1151
|
+
const serializeAws_restJson1DescribeTimeSeriesCommand = async (input, context) => {
|
|
1152
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1153
|
+
const headers = {};
|
|
1154
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/timeseries/describe";
|
|
1155
|
+
const query = {
|
|
1156
|
+
...(input.alias !== undefined && { alias: input.alias }),
|
|
1157
|
+
...(input.assetId !== undefined && { assetId: input.assetId }),
|
|
1158
|
+
...(input.propertyId !== undefined && { propertyId: input.propertyId }),
|
|
1159
|
+
};
|
|
1160
|
+
let body;
|
|
1161
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
1162
|
+
if (context.disableHostPrefix !== true) {
|
|
1163
|
+
resolvedHostname = "api." + resolvedHostname;
|
|
1164
|
+
if (!protocol_http_1.isValidHostname(resolvedHostname)) {
|
|
1165
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
return new protocol_http_1.HttpRequest({
|
|
1169
|
+
protocol,
|
|
1170
|
+
hostname: resolvedHostname,
|
|
1171
|
+
port,
|
|
1172
|
+
method: "GET",
|
|
1173
|
+
headers,
|
|
1174
|
+
path: resolvedPath,
|
|
1175
|
+
query,
|
|
1176
|
+
body,
|
|
1177
|
+
});
|
|
1178
|
+
};
|
|
1179
|
+
exports.serializeAws_restJson1DescribeTimeSeriesCommand = serializeAws_restJson1DescribeTimeSeriesCommand;
|
|
1081
1180
|
const serializeAws_restJson1DisassociateAssetsCommand = async (input, context) => {
|
|
1082
1181
|
var _a;
|
|
1083
1182
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
@@ -1119,6 +1218,41 @@ const serializeAws_restJson1DisassociateAssetsCommand = async (input, context) =
|
|
|
1119
1218
|
});
|
|
1120
1219
|
};
|
|
1121
1220
|
exports.serializeAws_restJson1DisassociateAssetsCommand = serializeAws_restJson1DisassociateAssetsCommand;
|
|
1221
|
+
const serializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommand = async (input, context) => {
|
|
1222
|
+
var _a;
|
|
1223
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1224
|
+
const headers = {
|
|
1225
|
+
"content-type": "application/json",
|
|
1226
|
+
};
|
|
1227
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/timeseries/disassociate";
|
|
1228
|
+
const query = {
|
|
1229
|
+
...(input.alias !== undefined && { alias: input.alias }),
|
|
1230
|
+
...(input.assetId !== undefined && { assetId: input.assetId }),
|
|
1231
|
+
...(input.propertyId !== undefined && { propertyId: input.propertyId }),
|
|
1232
|
+
};
|
|
1233
|
+
let body;
|
|
1234
|
+
body = JSON.stringify({
|
|
1235
|
+
clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : uuid_1.v4(),
|
|
1236
|
+
});
|
|
1237
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
1238
|
+
if (context.disableHostPrefix !== true) {
|
|
1239
|
+
resolvedHostname = "api." + resolvedHostname;
|
|
1240
|
+
if (!protocol_http_1.isValidHostname(resolvedHostname)) {
|
|
1241
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
return new protocol_http_1.HttpRequest({
|
|
1245
|
+
protocol,
|
|
1246
|
+
hostname: resolvedHostname,
|
|
1247
|
+
port,
|
|
1248
|
+
method: "POST",
|
|
1249
|
+
headers,
|
|
1250
|
+
path: resolvedPath,
|
|
1251
|
+
query,
|
|
1252
|
+
body,
|
|
1253
|
+
});
|
|
1254
|
+
};
|
|
1255
|
+
exports.serializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommand = serializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommand;
|
|
1122
1256
|
const serializeAws_restJson1GetAssetPropertyAggregatesCommand = async (input, context) => {
|
|
1123
1257
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1124
1258
|
const headers = {};
|
|
@@ -1614,6 +1748,37 @@ const serializeAws_restJson1ListTagsForResourceCommand = async (input, context)
|
|
|
1614
1748
|
});
|
|
1615
1749
|
};
|
|
1616
1750
|
exports.serializeAws_restJson1ListTagsForResourceCommand = serializeAws_restJson1ListTagsForResourceCommand;
|
|
1751
|
+
const serializeAws_restJson1ListTimeSeriesCommand = async (input, context) => {
|
|
1752
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1753
|
+
const headers = {};
|
|
1754
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/timeseries";
|
|
1755
|
+
const query = {
|
|
1756
|
+
...(input.nextToken !== undefined && { nextToken: input.nextToken }),
|
|
1757
|
+
...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
|
|
1758
|
+
...(input.assetId !== undefined && { assetId: input.assetId }),
|
|
1759
|
+
...(input.aliasPrefix !== undefined && { aliasPrefix: input.aliasPrefix }),
|
|
1760
|
+
...(input.timeSeriesType !== undefined && { timeSeriesType: input.timeSeriesType }),
|
|
1761
|
+
};
|
|
1762
|
+
let body;
|
|
1763
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
1764
|
+
if (context.disableHostPrefix !== true) {
|
|
1765
|
+
resolvedHostname = "api." + resolvedHostname;
|
|
1766
|
+
if (!protocol_http_1.isValidHostname(resolvedHostname)) {
|
|
1767
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
1768
|
+
}
|
|
1769
|
+
}
|
|
1770
|
+
return new protocol_http_1.HttpRequest({
|
|
1771
|
+
protocol,
|
|
1772
|
+
hostname: resolvedHostname,
|
|
1773
|
+
port,
|
|
1774
|
+
method: "GET",
|
|
1775
|
+
headers,
|
|
1776
|
+
path: resolvedPath,
|
|
1777
|
+
query,
|
|
1778
|
+
body,
|
|
1779
|
+
});
|
|
1780
|
+
};
|
|
1781
|
+
exports.serializeAws_restJson1ListTimeSeriesCommand = serializeAws_restJson1ListTimeSeriesCommand;
|
|
1617
1782
|
const serializeAws_restJson1PutDefaultEncryptionConfigurationCommand = async (input, context) => {
|
|
1618
1783
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1619
1784
|
const headers = {
|
|
@@ -1683,6 +1848,8 @@ const serializeAws_restJson1PutStorageConfigurationCommand = async (input, conte
|
|
|
1683
1848
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/configuration/account/storage";
|
|
1684
1849
|
let body;
|
|
1685
1850
|
body = JSON.stringify({
|
|
1851
|
+
...(input.disassociatedDataStorage !== undefined &&
|
|
1852
|
+
input.disassociatedDataStorage !== null && { disassociatedDataStorage: input.disassociatedDataStorage }),
|
|
1686
1853
|
...(input.multiLayerStorage !== undefined &&
|
|
1687
1854
|
input.multiLayerStorage !== null && {
|
|
1688
1855
|
multiLayerStorage: serializeAws_restJson1MultiLayerStorage(input.multiLayerStorage, context),
|
|
@@ -2265,6 +2432,82 @@ const deserializeAws_restJson1AssociateAssetsCommandError = async (output, conte
|
|
|
2265
2432
|
delete response.Message;
|
|
2266
2433
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
2267
2434
|
};
|
|
2435
|
+
const deserializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommand = async (output, context) => {
|
|
2436
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2437
|
+
return deserializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommandError(output, context);
|
|
2438
|
+
}
|
|
2439
|
+
const contents = {
|
|
2440
|
+
$metadata: deserializeMetadata(output),
|
|
2441
|
+
};
|
|
2442
|
+
await collectBody(output.body, context);
|
|
2443
|
+
return Promise.resolve(contents);
|
|
2444
|
+
};
|
|
2445
|
+
exports.deserializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommand = deserializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommand;
|
|
2446
|
+
const deserializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommandError = async (output, context) => {
|
|
2447
|
+
const parsedOutput = {
|
|
2448
|
+
...output,
|
|
2449
|
+
body: await parseBody(output.body, context),
|
|
2450
|
+
};
|
|
2451
|
+
let response;
|
|
2452
|
+
let errorCode = "UnknownError";
|
|
2453
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2454
|
+
switch (errorCode) {
|
|
2455
|
+
case "ConflictingOperationException":
|
|
2456
|
+
case "com.amazonaws.iotsitewise#ConflictingOperationException":
|
|
2457
|
+
response = {
|
|
2458
|
+
...(await deserializeAws_restJson1ConflictingOperationExceptionResponse(parsedOutput, context)),
|
|
2459
|
+
name: errorCode,
|
|
2460
|
+
$metadata: deserializeMetadata(output),
|
|
2461
|
+
};
|
|
2462
|
+
break;
|
|
2463
|
+
case "InternalFailureException":
|
|
2464
|
+
case "com.amazonaws.iotsitewise#InternalFailureException":
|
|
2465
|
+
response = {
|
|
2466
|
+
...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
|
|
2467
|
+
name: errorCode,
|
|
2468
|
+
$metadata: deserializeMetadata(output),
|
|
2469
|
+
};
|
|
2470
|
+
break;
|
|
2471
|
+
case "InvalidRequestException":
|
|
2472
|
+
case "com.amazonaws.iotsitewise#InvalidRequestException":
|
|
2473
|
+
response = {
|
|
2474
|
+
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
2475
|
+
name: errorCode,
|
|
2476
|
+
$metadata: deserializeMetadata(output),
|
|
2477
|
+
};
|
|
2478
|
+
break;
|
|
2479
|
+
case "ResourceNotFoundException":
|
|
2480
|
+
case "com.amazonaws.iotsitewise#ResourceNotFoundException":
|
|
2481
|
+
response = {
|
|
2482
|
+
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2483
|
+
name: errorCode,
|
|
2484
|
+
$metadata: deserializeMetadata(output),
|
|
2485
|
+
};
|
|
2486
|
+
break;
|
|
2487
|
+
case "ThrottlingException":
|
|
2488
|
+
case "com.amazonaws.iotsitewise#ThrottlingException":
|
|
2489
|
+
response = {
|
|
2490
|
+
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2491
|
+
name: errorCode,
|
|
2492
|
+
$metadata: deserializeMetadata(output),
|
|
2493
|
+
};
|
|
2494
|
+
break;
|
|
2495
|
+
default:
|
|
2496
|
+
const parsedBody = parsedOutput.body;
|
|
2497
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2498
|
+
response = {
|
|
2499
|
+
...parsedBody,
|
|
2500
|
+
name: `${errorCode}`,
|
|
2501
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2502
|
+
$fault: "client",
|
|
2503
|
+
$metadata: deserializeMetadata(output),
|
|
2504
|
+
};
|
|
2505
|
+
}
|
|
2506
|
+
const message = response.message || response.Message || errorCode;
|
|
2507
|
+
response.message = message;
|
|
2508
|
+
delete response.Message;
|
|
2509
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
2510
|
+
};
|
|
2268
2511
|
const deserializeAws_restJson1BatchAssociateProjectAssetsCommand = async (output, context) => {
|
|
2269
2512
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2270
2513
|
return deserializeAws_restJson1BatchAssociateProjectAssetsCommandError(output, context);
|
|
@@ -3597,9 +3840,77 @@ const deserializeAws_restJson1DeletePortalCommandError = async (output, context)
|
|
|
3597
3840
|
delete response.Message;
|
|
3598
3841
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
3599
3842
|
};
|
|
3600
|
-
const deserializeAws_restJson1DeleteProjectCommand = async (output, context) => {
|
|
3601
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
3602
|
-
return deserializeAws_restJson1DeleteProjectCommandError(output, context);
|
|
3843
|
+
const deserializeAws_restJson1DeleteProjectCommand = async (output, context) => {
|
|
3844
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
3845
|
+
return deserializeAws_restJson1DeleteProjectCommandError(output, context);
|
|
3846
|
+
}
|
|
3847
|
+
const contents = {
|
|
3848
|
+
$metadata: deserializeMetadata(output),
|
|
3849
|
+
};
|
|
3850
|
+
await collectBody(output.body, context);
|
|
3851
|
+
return Promise.resolve(contents);
|
|
3852
|
+
};
|
|
3853
|
+
exports.deserializeAws_restJson1DeleteProjectCommand = deserializeAws_restJson1DeleteProjectCommand;
|
|
3854
|
+
const deserializeAws_restJson1DeleteProjectCommandError = async (output, context) => {
|
|
3855
|
+
const parsedOutput = {
|
|
3856
|
+
...output,
|
|
3857
|
+
body: await parseBody(output.body, context),
|
|
3858
|
+
};
|
|
3859
|
+
let response;
|
|
3860
|
+
let errorCode = "UnknownError";
|
|
3861
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3862
|
+
switch (errorCode) {
|
|
3863
|
+
case "InternalFailureException":
|
|
3864
|
+
case "com.amazonaws.iotsitewise#InternalFailureException":
|
|
3865
|
+
response = {
|
|
3866
|
+
...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
|
|
3867
|
+
name: errorCode,
|
|
3868
|
+
$metadata: deserializeMetadata(output),
|
|
3869
|
+
};
|
|
3870
|
+
break;
|
|
3871
|
+
case "InvalidRequestException":
|
|
3872
|
+
case "com.amazonaws.iotsitewise#InvalidRequestException":
|
|
3873
|
+
response = {
|
|
3874
|
+
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
3875
|
+
name: errorCode,
|
|
3876
|
+
$metadata: deserializeMetadata(output),
|
|
3877
|
+
};
|
|
3878
|
+
break;
|
|
3879
|
+
case "ResourceNotFoundException":
|
|
3880
|
+
case "com.amazonaws.iotsitewise#ResourceNotFoundException":
|
|
3881
|
+
response = {
|
|
3882
|
+
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
3883
|
+
name: errorCode,
|
|
3884
|
+
$metadata: deserializeMetadata(output),
|
|
3885
|
+
};
|
|
3886
|
+
break;
|
|
3887
|
+
case "ThrottlingException":
|
|
3888
|
+
case "com.amazonaws.iotsitewise#ThrottlingException":
|
|
3889
|
+
response = {
|
|
3890
|
+
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
3891
|
+
name: errorCode,
|
|
3892
|
+
$metadata: deserializeMetadata(output),
|
|
3893
|
+
};
|
|
3894
|
+
break;
|
|
3895
|
+
default:
|
|
3896
|
+
const parsedBody = parsedOutput.body;
|
|
3897
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3898
|
+
response = {
|
|
3899
|
+
...parsedBody,
|
|
3900
|
+
name: `${errorCode}`,
|
|
3901
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3902
|
+
$fault: "client",
|
|
3903
|
+
$metadata: deserializeMetadata(output),
|
|
3904
|
+
};
|
|
3905
|
+
}
|
|
3906
|
+
const message = response.message || response.Message || errorCode;
|
|
3907
|
+
response.message = message;
|
|
3908
|
+
delete response.Message;
|
|
3909
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
3910
|
+
};
|
|
3911
|
+
const deserializeAws_restJson1DeleteTimeSeriesCommand = async (output, context) => {
|
|
3912
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3913
|
+
return deserializeAws_restJson1DeleteTimeSeriesCommandError(output, context);
|
|
3603
3914
|
}
|
|
3604
3915
|
const contents = {
|
|
3605
3916
|
$metadata: deserializeMetadata(output),
|
|
@@ -3607,8 +3918,8 @@ const deserializeAws_restJson1DeleteProjectCommand = async (output, context) =>
|
|
|
3607
3918
|
await collectBody(output.body, context);
|
|
3608
3919
|
return Promise.resolve(contents);
|
|
3609
3920
|
};
|
|
3610
|
-
exports.
|
|
3611
|
-
const
|
|
3921
|
+
exports.deserializeAws_restJson1DeleteTimeSeriesCommand = deserializeAws_restJson1DeleteTimeSeriesCommand;
|
|
3922
|
+
const deserializeAws_restJson1DeleteTimeSeriesCommandError = async (output, context) => {
|
|
3612
3923
|
const parsedOutput = {
|
|
3613
3924
|
...output,
|
|
3614
3925
|
body: await parseBody(output.body, context),
|
|
@@ -3617,6 +3928,14 @@ const deserializeAws_restJson1DeleteProjectCommandError = async (output, context
|
|
|
3617
3928
|
let errorCode = "UnknownError";
|
|
3618
3929
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3619
3930
|
switch (errorCode) {
|
|
3931
|
+
case "ConflictingOperationException":
|
|
3932
|
+
case "com.amazonaws.iotsitewise#ConflictingOperationException":
|
|
3933
|
+
response = {
|
|
3934
|
+
...(await deserializeAws_restJson1ConflictingOperationExceptionResponse(parsedOutput, context)),
|
|
3935
|
+
name: errorCode,
|
|
3936
|
+
$metadata: deserializeMetadata(output),
|
|
3937
|
+
};
|
|
3938
|
+
break;
|
|
3620
3939
|
case "InternalFailureException":
|
|
3621
3940
|
case "com.amazonaws.iotsitewise#InternalFailureException":
|
|
3622
3941
|
response = {
|
|
@@ -4720,6 +5039,7 @@ const deserializeAws_restJson1DescribeStorageConfigurationCommand = async (outpu
|
|
|
4720
5039
|
const contents = {
|
|
4721
5040
|
$metadata: deserializeMetadata(output),
|
|
4722
5041
|
configurationStatus: undefined,
|
|
5042
|
+
disassociatedDataStorage: undefined,
|
|
4723
5043
|
lastUpdateDate: undefined,
|
|
4724
5044
|
multiLayerStorage: undefined,
|
|
4725
5045
|
storageType: undefined,
|
|
@@ -4728,6 +5048,9 @@ const deserializeAws_restJson1DescribeStorageConfigurationCommand = async (outpu
|
|
|
4728
5048
|
if (data.configurationStatus !== undefined && data.configurationStatus !== null) {
|
|
4729
5049
|
contents.configurationStatus = deserializeAws_restJson1ConfigurationStatus(data.configurationStatus, context);
|
|
4730
5050
|
}
|
|
5051
|
+
if (data.disassociatedDataStorage !== undefined && data.disassociatedDataStorage !== null) {
|
|
5052
|
+
contents.disassociatedDataStorage = smithy_client_1.expectString(data.disassociatedDataStorage);
|
|
5053
|
+
}
|
|
4731
5054
|
if (data.lastUpdateDate !== undefined && data.lastUpdateDate !== null) {
|
|
4732
5055
|
contents.lastUpdateDate = smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(data.lastUpdateDate)));
|
|
4733
5056
|
}
|
|
@@ -4813,6 +5136,106 @@ const deserializeAws_restJson1DescribeStorageConfigurationCommandError = async (
|
|
|
4813
5136
|
delete response.Message;
|
|
4814
5137
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
4815
5138
|
};
|
|
5139
|
+
const deserializeAws_restJson1DescribeTimeSeriesCommand = async (output, context) => {
|
|
5140
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
5141
|
+
return deserializeAws_restJson1DescribeTimeSeriesCommandError(output, context);
|
|
5142
|
+
}
|
|
5143
|
+
const contents = {
|
|
5144
|
+
$metadata: deserializeMetadata(output),
|
|
5145
|
+
alias: undefined,
|
|
5146
|
+
assetId: undefined,
|
|
5147
|
+
dataType: undefined,
|
|
5148
|
+
dataTypeSpec: undefined,
|
|
5149
|
+
propertyId: undefined,
|
|
5150
|
+
timeSeriesCreationDate: undefined,
|
|
5151
|
+
timeSeriesId: undefined,
|
|
5152
|
+
timeSeriesLastUpdateDate: undefined,
|
|
5153
|
+
};
|
|
5154
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
5155
|
+
if (data.alias !== undefined && data.alias !== null) {
|
|
5156
|
+
contents.alias = smithy_client_1.expectString(data.alias);
|
|
5157
|
+
}
|
|
5158
|
+
if (data.assetId !== undefined && data.assetId !== null) {
|
|
5159
|
+
contents.assetId = smithy_client_1.expectString(data.assetId);
|
|
5160
|
+
}
|
|
5161
|
+
if (data.dataType !== undefined && data.dataType !== null) {
|
|
5162
|
+
contents.dataType = smithy_client_1.expectString(data.dataType);
|
|
5163
|
+
}
|
|
5164
|
+
if (data.dataTypeSpec !== undefined && data.dataTypeSpec !== null) {
|
|
5165
|
+
contents.dataTypeSpec = smithy_client_1.expectString(data.dataTypeSpec);
|
|
5166
|
+
}
|
|
5167
|
+
if (data.propertyId !== undefined && data.propertyId !== null) {
|
|
5168
|
+
contents.propertyId = smithy_client_1.expectString(data.propertyId);
|
|
5169
|
+
}
|
|
5170
|
+
if (data.timeSeriesCreationDate !== undefined && data.timeSeriesCreationDate !== null) {
|
|
5171
|
+
contents.timeSeriesCreationDate = smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(data.timeSeriesCreationDate)));
|
|
5172
|
+
}
|
|
5173
|
+
if (data.timeSeriesId !== undefined && data.timeSeriesId !== null) {
|
|
5174
|
+
contents.timeSeriesId = smithy_client_1.expectString(data.timeSeriesId);
|
|
5175
|
+
}
|
|
5176
|
+
if (data.timeSeriesLastUpdateDate !== undefined && data.timeSeriesLastUpdateDate !== null) {
|
|
5177
|
+
contents.timeSeriesLastUpdateDate = smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(data.timeSeriesLastUpdateDate)));
|
|
5178
|
+
}
|
|
5179
|
+
return Promise.resolve(contents);
|
|
5180
|
+
};
|
|
5181
|
+
exports.deserializeAws_restJson1DescribeTimeSeriesCommand = deserializeAws_restJson1DescribeTimeSeriesCommand;
|
|
5182
|
+
const deserializeAws_restJson1DescribeTimeSeriesCommandError = async (output, context) => {
|
|
5183
|
+
const parsedOutput = {
|
|
5184
|
+
...output,
|
|
5185
|
+
body: await parseBody(output.body, context),
|
|
5186
|
+
};
|
|
5187
|
+
let response;
|
|
5188
|
+
let errorCode = "UnknownError";
|
|
5189
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
5190
|
+
switch (errorCode) {
|
|
5191
|
+
case "InternalFailureException":
|
|
5192
|
+
case "com.amazonaws.iotsitewise#InternalFailureException":
|
|
5193
|
+
response = {
|
|
5194
|
+
...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
|
|
5195
|
+
name: errorCode,
|
|
5196
|
+
$metadata: deserializeMetadata(output),
|
|
5197
|
+
};
|
|
5198
|
+
break;
|
|
5199
|
+
case "InvalidRequestException":
|
|
5200
|
+
case "com.amazonaws.iotsitewise#InvalidRequestException":
|
|
5201
|
+
response = {
|
|
5202
|
+
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
5203
|
+
name: errorCode,
|
|
5204
|
+
$metadata: deserializeMetadata(output),
|
|
5205
|
+
};
|
|
5206
|
+
break;
|
|
5207
|
+
case "ResourceNotFoundException":
|
|
5208
|
+
case "com.amazonaws.iotsitewise#ResourceNotFoundException":
|
|
5209
|
+
response = {
|
|
5210
|
+
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
5211
|
+
name: errorCode,
|
|
5212
|
+
$metadata: deserializeMetadata(output),
|
|
5213
|
+
};
|
|
5214
|
+
break;
|
|
5215
|
+
case "ThrottlingException":
|
|
5216
|
+
case "com.amazonaws.iotsitewise#ThrottlingException":
|
|
5217
|
+
response = {
|
|
5218
|
+
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
5219
|
+
name: errorCode,
|
|
5220
|
+
$metadata: deserializeMetadata(output),
|
|
5221
|
+
};
|
|
5222
|
+
break;
|
|
5223
|
+
default:
|
|
5224
|
+
const parsedBody = parsedOutput.body;
|
|
5225
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
5226
|
+
response = {
|
|
5227
|
+
...parsedBody,
|
|
5228
|
+
name: `${errorCode}`,
|
|
5229
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
5230
|
+
$fault: "client",
|
|
5231
|
+
$metadata: deserializeMetadata(output),
|
|
5232
|
+
};
|
|
5233
|
+
}
|
|
5234
|
+
const message = response.message || response.Message || errorCode;
|
|
5235
|
+
response.message = message;
|
|
5236
|
+
delete response.Message;
|
|
5237
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
5238
|
+
};
|
|
4816
5239
|
const deserializeAws_restJson1DisassociateAssetsCommand = async (output, context) => {
|
|
4817
5240
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4818
5241
|
return deserializeAws_restJson1DisassociateAssetsCommandError(output, context);
|
|
@@ -4889,6 +5312,82 @@ const deserializeAws_restJson1DisassociateAssetsCommandError = async (output, co
|
|
|
4889
5312
|
delete response.Message;
|
|
4890
5313
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
4891
5314
|
};
|
|
5315
|
+
const deserializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommand = async (output, context) => {
|
|
5316
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
5317
|
+
return deserializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommandError(output, context);
|
|
5318
|
+
}
|
|
5319
|
+
const contents = {
|
|
5320
|
+
$metadata: deserializeMetadata(output),
|
|
5321
|
+
};
|
|
5322
|
+
await collectBody(output.body, context);
|
|
5323
|
+
return Promise.resolve(contents);
|
|
5324
|
+
};
|
|
5325
|
+
exports.deserializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommand = deserializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommand;
|
|
5326
|
+
const deserializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommandError = async (output, context) => {
|
|
5327
|
+
const parsedOutput = {
|
|
5328
|
+
...output,
|
|
5329
|
+
body: await parseBody(output.body, context),
|
|
5330
|
+
};
|
|
5331
|
+
let response;
|
|
5332
|
+
let errorCode = "UnknownError";
|
|
5333
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
5334
|
+
switch (errorCode) {
|
|
5335
|
+
case "ConflictingOperationException":
|
|
5336
|
+
case "com.amazonaws.iotsitewise#ConflictingOperationException":
|
|
5337
|
+
response = {
|
|
5338
|
+
...(await deserializeAws_restJson1ConflictingOperationExceptionResponse(parsedOutput, context)),
|
|
5339
|
+
name: errorCode,
|
|
5340
|
+
$metadata: deserializeMetadata(output),
|
|
5341
|
+
};
|
|
5342
|
+
break;
|
|
5343
|
+
case "InternalFailureException":
|
|
5344
|
+
case "com.amazonaws.iotsitewise#InternalFailureException":
|
|
5345
|
+
response = {
|
|
5346
|
+
...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
|
|
5347
|
+
name: errorCode,
|
|
5348
|
+
$metadata: deserializeMetadata(output),
|
|
5349
|
+
};
|
|
5350
|
+
break;
|
|
5351
|
+
case "InvalidRequestException":
|
|
5352
|
+
case "com.amazonaws.iotsitewise#InvalidRequestException":
|
|
5353
|
+
response = {
|
|
5354
|
+
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
5355
|
+
name: errorCode,
|
|
5356
|
+
$metadata: deserializeMetadata(output),
|
|
5357
|
+
};
|
|
5358
|
+
break;
|
|
5359
|
+
case "ResourceNotFoundException":
|
|
5360
|
+
case "com.amazonaws.iotsitewise#ResourceNotFoundException":
|
|
5361
|
+
response = {
|
|
5362
|
+
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
5363
|
+
name: errorCode,
|
|
5364
|
+
$metadata: deserializeMetadata(output),
|
|
5365
|
+
};
|
|
5366
|
+
break;
|
|
5367
|
+
case "ThrottlingException":
|
|
5368
|
+
case "com.amazonaws.iotsitewise#ThrottlingException":
|
|
5369
|
+
response = {
|
|
5370
|
+
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
5371
|
+
name: errorCode,
|
|
5372
|
+
$metadata: deserializeMetadata(output),
|
|
5373
|
+
};
|
|
5374
|
+
break;
|
|
5375
|
+
default:
|
|
5376
|
+
const parsedBody = parsedOutput.body;
|
|
5377
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
5378
|
+
response = {
|
|
5379
|
+
...parsedBody,
|
|
5380
|
+
name: `${errorCode}`,
|
|
5381
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
5382
|
+
$fault: "client",
|
|
5383
|
+
$metadata: deserializeMetadata(output),
|
|
5384
|
+
};
|
|
5385
|
+
}
|
|
5386
|
+
const message = response.message || response.Message || errorCode;
|
|
5387
|
+
response.message = message;
|
|
5388
|
+
delete response.Message;
|
|
5389
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
5390
|
+
};
|
|
4892
5391
|
const deserializeAws_restJson1GetAssetPropertyAggregatesCommand = async (output, context) => {
|
|
4893
5392
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4894
5393
|
return deserializeAws_restJson1GetAssetPropertyAggregatesCommandError(output, context);
|
|
@@ -6021,6 +6520,82 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
6021
6520
|
delete response.Message;
|
|
6022
6521
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
6023
6522
|
};
|
|
6523
|
+
const deserializeAws_restJson1ListTimeSeriesCommand = async (output, context) => {
|
|
6524
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
6525
|
+
return deserializeAws_restJson1ListTimeSeriesCommandError(output, context);
|
|
6526
|
+
}
|
|
6527
|
+
const contents = {
|
|
6528
|
+
$metadata: deserializeMetadata(output),
|
|
6529
|
+
TimeSeriesSummaries: undefined,
|
|
6530
|
+
nextToken: undefined,
|
|
6531
|
+
};
|
|
6532
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
6533
|
+
if (data.TimeSeriesSummaries !== undefined && data.TimeSeriesSummaries !== null) {
|
|
6534
|
+
contents.TimeSeriesSummaries = deserializeAws_restJson1TimeSeriesSummaries(data.TimeSeriesSummaries, context);
|
|
6535
|
+
}
|
|
6536
|
+
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
6537
|
+
contents.nextToken = smithy_client_1.expectString(data.nextToken);
|
|
6538
|
+
}
|
|
6539
|
+
return Promise.resolve(contents);
|
|
6540
|
+
};
|
|
6541
|
+
exports.deserializeAws_restJson1ListTimeSeriesCommand = deserializeAws_restJson1ListTimeSeriesCommand;
|
|
6542
|
+
const deserializeAws_restJson1ListTimeSeriesCommandError = async (output, context) => {
|
|
6543
|
+
const parsedOutput = {
|
|
6544
|
+
...output,
|
|
6545
|
+
body: await parseBody(output.body, context),
|
|
6546
|
+
};
|
|
6547
|
+
let response;
|
|
6548
|
+
let errorCode = "UnknownError";
|
|
6549
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
6550
|
+
switch (errorCode) {
|
|
6551
|
+
case "InternalFailureException":
|
|
6552
|
+
case "com.amazonaws.iotsitewise#InternalFailureException":
|
|
6553
|
+
response = {
|
|
6554
|
+
...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
|
|
6555
|
+
name: errorCode,
|
|
6556
|
+
$metadata: deserializeMetadata(output),
|
|
6557
|
+
};
|
|
6558
|
+
break;
|
|
6559
|
+
case "InvalidRequestException":
|
|
6560
|
+
case "com.amazonaws.iotsitewise#InvalidRequestException":
|
|
6561
|
+
response = {
|
|
6562
|
+
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
6563
|
+
name: errorCode,
|
|
6564
|
+
$metadata: deserializeMetadata(output),
|
|
6565
|
+
};
|
|
6566
|
+
break;
|
|
6567
|
+
case "ResourceNotFoundException":
|
|
6568
|
+
case "com.amazonaws.iotsitewise#ResourceNotFoundException":
|
|
6569
|
+
response = {
|
|
6570
|
+
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
6571
|
+
name: errorCode,
|
|
6572
|
+
$metadata: deserializeMetadata(output),
|
|
6573
|
+
};
|
|
6574
|
+
break;
|
|
6575
|
+
case "ThrottlingException":
|
|
6576
|
+
case "com.amazonaws.iotsitewise#ThrottlingException":
|
|
6577
|
+
response = {
|
|
6578
|
+
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
6579
|
+
name: errorCode,
|
|
6580
|
+
$metadata: deserializeMetadata(output),
|
|
6581
|
+
};
|
|
6582
|
+
break;
|
|
6583
|
+
default:
|
|
6584
|
+
const parsedBody = parsedOutput.body;
|
|
6585
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
6586
|
+
response = {
|
|
6587
|
+
...parsedBody,
|
|
6588
|
+
name: `${errorCode}`,
|
|
6589
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
6590
|
+
$fault: "client",
|
|
6591
|
+
$metadata: deserializeMetadata(output),
|
|
6592
|
+
};
|
|
6593
|
+
}
|
|
6594
|
+
const message = response.message || response.Message || errorCode;
|
|
6595
|
+
response.message = message;
|
|
6596
|
+
delete response.Message;
|
|
6597
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
6598
|
+
};
|
|
6024
6599
|
const deserializeAws_restJson1PutDefaultEncryptionConfigurationCommand = async (output, context) => {
|
|
6025
6600
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
6026
6601
|
return deserializeAws_restJson1PutDefaultEncryptionConfigurationCommandError(output, context);
|
|
@@ -6192,6 +6767,7 @@ const deserializeAws_restJson1PutStorageConfigurationCommand = async (output, co
|
|
|
6192
6767
|
const contents = {
|
|
6193
6768
|
$metadata: deserializeMetadata(output),
|
|
6194
6769
|
configurationStatus: undefined,
|
|
6770
|
+
disassociatedDataStorage: undefined,
|
|
6195
6771
|
multiLayerStorage: undefined,
|
|
6196
6772
|
storageType: undefined,
|
|
6197
6773
|
};
|
|
@@ -6199,6 +6775,9 @@ const deserializeAws_restJson1PutStorageConfigurationCommand = async (output, co
|
|
|
6199
6775
|
if (data.configurationStatus !== undefined && data.configurationStatus !== null) {
|
|
6200
6776
|
contents.configurationStatus = deserializeAws_restJson1ConfigurationStatus(data.configurationStatus, context);
|
|
6201
6777
|
}
|
|
6778
|
+
if (data.disassociatedDataStorage !== undefined && data.disassociatedDataStorage !== null) {
|
|
6779
|
+
contents.disassociatedDataStorage = smithy_client_1.expectString(data.disassociatedDataStorage);
|
|
6780
|
+
}
|
|
6202
6781
|
if (data.multiLayerStorage !== undefined && data.multiLayerStorage !== null) {
|
|
6203
6782
|
contents.multiLayerStorage = deserializeAws_restJson1MultiLayerStorage(data.multiLayerStorage, context);
|
|
6204
6783
|
}
|
|
@@ -8581,6 +9160,32 @@ const deserializeAws_restJson1TimeInNanos = (output, context) => {
|
|
|
8581
9160
|
timeInSeconds: smithy_client_1.expectLong(output.timeInSeconds),
|
|
8582
9161
|
};
|
|
8583
9162
|
};
|
|
9163
|
+
const deserializeAws_restJson1TimeSeriesSummaries = (output, context) => {
|
|
9164
|
+
return (output || [])
|
|
9165
|
+
.filter((e) => e != null)
|
|
9166
|
+
.map((entry) => {
|
|
9167
|
+
if (entry === null) {
|
|
9168
|
+
return null;
|
|
9169
|
+
}
|
|
9170
|
+
return deserializeAws_restJson1TimeSeriesSummary(entry, context);
|
|
9171
|
+
});
|
|
9172
|
+
};
|
|
9173
|
+
const deserializeAws_restJson1TimeSeriesSummary = (output, context) => {
|
|
9174
|
+
return {
|
|
9175
|
+
alias: smithy_client_1.expectString(output.alias),
|
|
9176
|
+
assetId: smithy_client_1.expectString(output.assetId),
|
|
9177
|
+
dataType: smithy_client_1.expectString(output.dataType),
|
|
9178
|
+
dataTypeSpec: smithy_client_1.expectString(output.dataTypeSpec),
|
|
9179
|
+
propertyId: smithy_client_1.expectString(output.propertyId),
|
|
9180
|
+
timeSeriesCreationDate: output.timeSeriesCreationDate !== undefined && output.timeSeriesCreationDate !== null
|
|
9181
|
+
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.timeSeriesCreationDate)))
|
|
9182
|
+
: undefined,
|
|
9183
|
+
timeSeriesId: smithy_client_1.expectString(output.timeSeriesId),
|
|
9184
|
+
timeSeriesLastUpdateDate: output.timeSeriesLastUpdateDate !== undefined && output.timeSeriesLastUpdateDate !== null
|
|
9185
|
+
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.timeSeriesLastUpdateDate)))
|
|
9186
|
+
: undefined,
|
|
9187
|
+
};
|
|
9188
|
+
};
|
|
8584
9189
|
const deserializeAws_restJson1Timestamps = (output, context) => {
|
|
8585
9190
|
return (output || [])
|
|
8586
9191
|
.filter((e) => e != null)
|