@aws-sdk/client-iotsitewise 3.74.0 → 3.78.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist-cjs/IoTSiteWise.js +45 -0
  3. package/dist-cjs/commands/BatchGetAssetPropertyAggregatesCommand.js +36 -0
  4. package/dist-cjs/commands/BatchGetAssetPropertyValueCommand.js +36 -0
  5. package/dist-cjs/commands/BatchGetAssetPropertyValueHistoryCommand.js +36 -0
  6. package/dist-cjs/commands/index.js +3 -0
  7. package/dist-cjs/models/models_0.js +172 -22
  8. package/dist-cjs/pagination/BatchGetAssetPropertyAggregatesPaginator.js +36 -0
  9. package/dist-cjs/pagination/BatchGetAssetPropertyValueHistoryPaginator.js +36 -0
  10. package/dist-cjs/pagination/BatchGetAssetPropertyValuePaginator.js +35 -0
  11. package/dist-cjs/pagination/GetAssetPropertyAggregatesPaginator.js +2 -1
  12. package/dist-cjs/pagination/GetAssetPropertyValueHistoryPaginator.js +2 -1
  13. package/dist-cjs/pagination/GetInterpolatedAssetPropertyValuesPaginator.js +2 -1
  14. package/dist-cjs/pagination/ListAccessPoliciesPaginator.js +2 -1
  15. package/dist-cjs/pagination/ListAssetModelsPaginator.js +2 -1
  16. package/dist-cjs/pagination/ListAssetRelationshipsPaginator.js +2 -1
  17. package/dist-cjs/pagination/ListAssetsPaginator.js +2 -1
  18. package/dist-cjs/pagination/ListAssociatedAssetsPaginator.js +2 -1
  19. package/dist-cjs/pagination/ListDashboardsPaginator.js +2 -1
  20. package/dist-cjs/pagination/ListGatewaysPaginator.js +2 -1
  21. package/dist-cjs/pagination/ListPortalsPaginator.js +2 -1
  22. package/dist-cjs/pagination/ListProjectAssetsPaginator.js +2 -1
  23. package/dist-cjs/pagination/ListProjectsPaginator.js +2 -1
  24. package/dist-cjs/pagination/ListTimeSeriesPaginator.js +2 -1
  25. package/dist-cjs/pagination/index.js +3 -0
  26. package/dist-cjs/protocols/Aws_restJson1.js +563 -3
  27. package/dist-es/IoTSiteWise.js +45 -0
  28. package/dist-es/commands/BatchGetAssetPropertyAggregatesCommand.js +39 -0
  29. package/dist-es/commands/BatchGetAssetPropertyValueCommand.js +39 -0
  30. package/dist-es/commands/BatchGetAssetPropertyValueHistoryCommand.js +39 -0
  31. package/dist-es/commands/index.js +3 -0
  32. package/dist-es/models/models_0.js +124 -17
  33. package/dist-es/pagination/BatchGetAssetPropertyAggregatesPaginator.js +75 -0
  34. package/dist-es/pagination/BatchGetAssetPropertyValueHistoryPaginator.js +75 -0
  35. package/dist-es/pagination/BatchGetAssetPropertyValuePaginator.js +74 -0
  36. package/dist-es/pagination/GetAssetPropertyAggregatesPaginator.js +3 -2
  37. package/dist-es/pagination/GetAssetPropertyValueHistoryPaginator.js +3 -2
  38. package/dist-es/pagination/GetInterpolatedAssetPropertyValuesPaginator.js +3 -2
  39. package/dist-es/pagination/ListAccessPoliciesPaginator.js +3 -2
  40. package/dist-es/pagination/ListAssetModelsPaginator.js +3 -2
  41. package/dist-es/pagination/ListAssetRelationshipsPaginator.js +3 -2
  42. package/dist-es/pagination/ListAssetsPaginator.js +3 -2
  43. package/dist-es/pagination/ListAssociatedAssetsPaginator.js +3 -2
  44. package/dist-es/pagination/ListDashboardsPaginator.js +3 -2
  45. package/dist-es/pagination/ListGatewaysPaginator.js +3 -2
  46. package/dist-es/pagination/ListPortalsPaginator.js +3 -2
  47. package/dist-es/pagination/ListProjectAssetsPaginator.js +3 -2
  48. package/dist-es/pagination/ListProjectsPaginator.js +3 -2
  49. package/dist-es/pagination/ListTimeSeriesPaginator.js +3 -2
  50. package/dist-es/pagination/index.js +3 -0
  51. package/dist-es/protocols/Aws_restJson1.js +611 -0
  52. package/dist-types/IoTSiteWise.d.ts +25 -0
  53. package/dist-types/IoTSiteWiseClient.d.ts +5 -2
  54. package/dist-types/commands/BatchGetAssetPropertyAggregatesCommand.d.ts +37 -0
  55. package/dist-types/commands/BatchGetAssetPropertyValueCommand.d.ts +36 -0
  56. package/dist-types/commands/BatchGetAssetPropertyValueHistoryCommand.d.ts +36 -0
  57. package/dist-types/commands/index.d.ts +3 -0
  58. package/dist-types/models/models_0.d.ts +627 -15
  59. package/dist-types/pagination/BatchGetAssetPropertyAggregatesPaginator.d.ts +4 -0
  60. package/dist-types/pagination/BatchGetAssetPropertyValueHistoryPaginator.d.ts +4 -0
  61. package/dist-types/pagination/BatchGetAssetPropertyValuePaginator.d.ts +4 -0
  62. package/dist-types/pagination/index.d.ts +3 -0
  63. package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
  64. package/dist-types/ts3.4/IoTSiteWise.d.ts +15 -0
  65. package/dist-types/ts3.4/IoTSiteWiseClient.d.ts +5 -2
  66. package/dist-types/ts3.4/commands/BatchGetAssetPropertyAggregatesCommand.d.ts +17 -0
  67. package/dist-types/ts3.4/commands/BatchGetAssetPropertyValueCommand.d.ts +17 -0
  68. package/dist-types/ts3.4/commands/BatchGetAssetPropertyValueHistoryCommand.d.ts +17 -0
  69. package/dist-types/ts3.4/commands/index.d.ts +3 -0
  70. package/dist-types/ts3.4/models/models_0.d.ts +315 -11
  71. package/dist-types/ts3.4/pagination/BatchGetAssetPropertyAggregatesPaginator.d.ts +4 -0
  72. package/dist-types/ts3.4/pagination/BatchGetAssetPropertyValueHistoryPaginator.d.ts +4 -0
  73. package/dist-types/ts3.4/pagination/BatchGetAssetPropertyValuePaginator.d.ts +4 -0
  74. package/dist-types/ts3.4/pagination/index.d.ts +3 -0
  75. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +9 -0
  76. package/package.json +26 -26
@@ -176,6 +176,114 @@ export var serializeAws_restJson1BatchDisassociateProjectAssetsCommand = functio
176
176
  }
177
177
  });
178
178
  }); };
179
+ export var serializeAws_restJson1BatchGetAssetPropertyAggregatesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
180
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body, resolvedHostname;
181
+ return __generator(this, function (_c) {
182
+ switch (_c.label) {
183
+ case 0: return [4, context.endpoint()];
184
+ case 1:
185
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
186
+ headers = {
187
+ "content-type": "application/json",
188
+ };
189
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/properties/batch/aggregates";
190
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.entries !== undefined &&
191
+ input.entries !== null && {
192
+ entries: serializeAws_restJson1BatchGetAssetPropertyAggregatesEntries(input.entries, context),
193
+ })), (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })));
194
+ return [4, context.endpoint()];
195
+ case 2:
196
+ resolvedHostname = (_c.sent()).hostname;
197
+ if (context.disableHostPrefix !== true) {
198
+ resolvedHostname = "data." + resolvedHostname;
199
+ if (!__isValidHostname(resolvedHostname)) {
200
+ throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
201
+ }
202
+ }
203
+ return [2, new __HttpRequest({
204
+ protocol: protocol,
205
+ hostname: resolvedHostname,
206
+ port: port,
207
+ method: "POST",
208
+ headers: headers,
209
+ path: resolvedPath,
210
+ body: body,
211
+ })];
212
+ }
213
+ });
214
+ }); };
215
+ export var serializeAws_restJson1BatchGetAssetPropertyValueCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
216
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body, resolvedHostname;
217
+ return __generator(this, function (_c) {
218
+ switch (_c.label) {
219
+ case 0: return [4, context.endpoint()];
220
+ case 1:
221
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
222
+ headers = {
223
+ "content-type": "application/json",
224
+ };
225
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/properties/batch/latest";
226
+ body = JSON.stringify(__assign(__assign({}, (input.entries !== undefined &&
227
+ input.entries !== null && {
228
+ entries: serializeAws_restJson1BatchGetAssetPropertyValueEntries(input.entries, context),
229
+ })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })));
230
+ return [4, context.endpoint()];
231
+ case 2:
232
+ resolvedHostname = (_c.sent()).hostname;
233
+ if (context.disableHostPrefix !== true) {
234
+ resolvedHostname = "data." + resolvedHostname;
235
+ if (!__isValidHostname(resolvedHostname)) {
236
+ throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
237
+ }
238
+ }
239
+ return [2, new __HttpRequest({
240
+ protocol: protocol,
241
+ hostname: resolvedHostname,
242
+ port: port,
243
+ method: "POST",
244
+ headers: headers,
245
+ path: resolvedPath,
246
+ body: body,
247
+ })];
248
+ }
249
+ });
250
+ }); };
251
+ export var serializeAws_restJson1BatchGetAssetPropertyValueHistoryCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
252
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body, resolvedHostname;
253
+ return __generator(this, function (_c) {
254
+ switch (_c.label) {
255
+ case 0: return [4, context.endpoint()];
256
+ case 1:
257
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
258
+ headers = {
259
+ "content-type": "application/json",
260
+ };
261
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/properties/batch/history";
262
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.entries !== undefined &&
263
+ input.entries !== null && {
264
+ entries: serializeAws_restJson1BatchGetAssetPropertyValueHistoryEntries(input.entries, context),
265
+ })), (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })));
266
+ return [4, context.endpoint()];
267
+ case 2:
268
+ resolvedHostname = (_c.sent()).hostname;
269
+ if (context.disableHostPrefix !== true) {
270
+ resolvedHostname = "data." + resolvedHostname;
271
+ if (!__isValidHostname(resolvedHostname)) {
272
+ throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
273
+ }
274
+ }
275
+ return [2, new __HttpRequest({
276
+ protocol: protocol,
277
+ hostname: resolvedHostname,
278
+ port: port,
279
+ method: "POST",
280
+ headers: headers,
281
+ path: resolvedPath,
282
+ body: body,
283
+ })];
284
+ }
285
+ });
286
+ }); };
179
287
  export var serializeAws_restJson1BatchPutAssetPropertyValueCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
180
288
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body, resolvedHostname;
181
289
  return __generator(this, function (_c) {
@@ -2841,6 +2949,246 @@ var deserializeAws_restJson1BatchDisassociateProjectAssetsCommandError = functio
2841
2949
  }
2842
2950
  });
2843
2951
  }); };
2952
+ export var deserializeAws_restJson1BatchGetAssetPropertyAggregatesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2953
+ var contents, data, _a, _b;
2954
+ return __generator(this, function (_c) {
2955
+ switch (_c.label) {
2956
+ case 0:
2957
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2958
+ return [2, deserializeAws_restJson1BatchGetAssetPropertyAggregatesCommandError(output, context)];
2959
+ }
2960
+ contents = {
2961
+ $metadata: deserializeMetadata(output),
2962
+ errorEntries: undefined,
2963
+ nextToken: undefined,
2964
+ skippedEntries: undefined,
2965
+ successEntries: undefined,
2966
+ };
2967
+ _a = __expectNonNull;
2968
+ _b = __expectObject;
2969
+ return [4, parseBody(output.body, context)];
2970
+ case 1:
2971
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2972
+ if (data.errorEntries !== undefined && data.errorEntries !== null) {
2973
+ contents.errorEntries = deserializeAws_restJson1BatchGetAssetPropertyAggregatesErrorEntries(data.errorEntries, context);
2974
+ }
2975
+ if (data.nextToken !== undefined && data.nextToken !== null) {
2976
+ contents.nextToken = __expectString(data.nextToken);
2977
+ }
2978
+ if (data.skippedEntries !== undefined && data.skippedEntries !== null) {
2979
+ contents.skippedEntries = deserializeAws_restJson1BatchGetAssetPropertyAggregatesSkippedEntries(data.skippedEntries, context);
2980
+ }
2981
+ if (data.successEntries !== undefined && data.successEntries !== null) {
2982
+ contents.successEntries = deserializeAws_restJson1BatchGetAssetPropertyAggregatesSuccessEntries(data.successEntries, context);
2983
+ }
2984
+ return [2, Promise.resolve(contents)];
2985
+ }
2986
+ });
2987
+ }); };
2988
+ var deserializeAws_restJson1BatchGetAssetPropertyAggregatesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2989
+ var parsedOutput, _a, response, errorCode, _b, parsedBody;
2990
+ var _c;
2991
+ return __generator(this, function (_d) {
2992
+ switch (_d.label) {
2993
+ case 0:
2994
+ _a = [__assign({}, output)];
2995
+ _c = {};
2996
+ return [4, parseBody(output.body, context)];
2997
+ case 1:
2998
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2999
+ errorCode = "UnknownError";
3000
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3001
+ _b = errorCode;
3002
+ switch (_b) {
3003
+ case "InternalFailureException": return [3, 2];
3004
+ case "com.amazonaws.iotsitewise#InternalFailureException": return [3, 2];
3005
+ case "InvalidRequestException": return [3, 4];
3006
+ case "com.amazonaws.iotsitewise#InvalidRequestException": return [3, 4];
3007
+ case "ServiceUnavailableException": return [3, 6];
3008
+ case "com.amazonaws.iotsitewise#ServiceUnavailableException": return [3, 6];
3009
+ case "ThrottlingException": return [3, 8];
3010
+ case "com.amazonaws.iotsitewise#ThrottlingException": return [3, 8];
3011
+ }
3012
+ return [3, 10];
3013
+ case 2: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
3014
+ case 3: throw _d.sent();
3015
+ case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
3016
+ case 5: throw _d.sent();
3017
+ case 6: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
3018
+ case 7: throw _d.sent();
3019
+ case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
3020
+ case 9: throw _d.sent();
3021
+ case 10:
3022
+ parsedBody = parsedOutput.body;
3023
+ response = new __BaseException({
3024
+ name: parsedBody.code || parsedBody.Code || errorCode,
3025
+ $fault: "client",
3026
+ $metadata: deserializeMetadata(output),
3027
+ });
3028
+ throw __decorateServiceException(response, parsedBody);
3029
+ }
3030
+ });
3031
+ }); };
3032
+ export var deserializeAws_restJson1BatchGetAssetPropertyValueCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3033
+ var contents, data, _a, _b;
3034
+ return __generator(this, function (_c) {
3035
+ switch (_c.label) {
3036
+ case 0:
3037
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3038
+ return [2, deserializeAws_restJson1BatchGetAssetPropertyValueCommandError(output, context)];
3039
+ }
3040
+ contents = {
3041
+ $metadata: deserializeMetadata(output),
3042
+ errorEntries: undefined,
3043
+ nextToken: undefined,
3044
+ skippedEntries: undefined,
3045
+ successEntries: undefined,
3046
+ };
3047
+ _a = __expectNonNull;
3048
+ _b = __expectObject;
3049
+ return [4, parseBody(output.body, context)];
3050
+ case 1:
3051
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3052
+ if (data.errorEntries !== undefined && data.errorEntries !== null) {
3053
+ contents.errorEntries = deserializeAws_restJson1BatchGetAssetPropertyValueErrorEntries(data.errorEntries, context);
3054
+ }
3055
+ if (data.nextToken !== undefined && data.nextToken !== null) {
3056
+ contents.nextToken = __expectString(data.nextToken);
3057
+ }
3058
+ if (data.skippedEntries !== undefined && data.skippedEntries !== null) {
3059
+ contents.skippedEntries = deserializeAws_restJson1BatchGetAssetPropertyValueSkippedEntries(data.skippedEntries, context);
3060
+ }
3061
+ if (data.successEntries !== undefined && data.successEntries !== null) {
3062
+ contents.successEntries = deserializeAws_restJson1BatchGetAssetPropertyValueSuccessEntries(data.successEntries, context);
3063
+ }
3064
+ return [2, Promise.resolve(contents)];
3065
+ }
3066
+ });
3067
+ }); };
3068
+ var deserializeAws_restJson1BatchGetAssetPropertyValueCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3069
+ var parsedOutput, _a, response, errorCode, _b, parsedBody;
3070
+ var _c;
3071
+ return __generator(this, function (_d) {
3072
+ switch (_d.label) {
3073
+ case 0:
3074
+ _a = [__assign({}, output)];
3075
+ _c = {};
3076
+ return [4, parseBody(output.body, context)];
3077
+ case 1:
3078
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3079
+ errorCode = "UnknownError";
3080
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3081
+ _b = errorCode;
3082
+ switch (_b) {
3083
+ case "InternalFailureException": return [3, 2];
3084
+ case "com.amazonaws.iotsitewise#InternalFailureException": return [3, 2];
3085
+ case "InvalidRequestException": return [3, 4];
3086
+ case "com.amazonaws.iotsitewise#InvalidRequestException": return [3, 4];
3087
+ case "ServiceUnavailableException": return [3, 6];
3088
+ case "com.amazonaws.iotsitewise#ServiceUnavailableException": return [3, 6];
3089
+ case "ThrottlingException": return [3, 8];
3090
+ case "com.amazonaws.iotsitewise#ThrottlingException": return [3, 8];
3091
+ }
3092
+ return [3, 10];
3093
+ case 2: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
3094
+ case 3: throw _d.sent();
3095
+ case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
3096
+ case 5: throw _d.sent();
3097
+ case 6: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
3098
+ case 7: throw _d.sent();
3099
+ case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
3100
+ case 9: throw _d.sent();
3101
+ case 10:
3102
+ parsedBody = parsedOutput.body;
3103
+ response = new __BaseException({
3104
+ name: parsedBody.code || parsedBody.Code || errorCode,
3105
+ $fault: "client",
3106
+ $metadata: deserializeMetadata(output),
3107
+ });
3108
+ throw __decorateServiceException(response, parsedBody);
3109
+ }
3110
+ });
3111
+ }); };
3112
+ export var deserializeAws_restJson1BatchGetAssetPropertyValueHistoryCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3113
+ var contents, data, _a, _b;
3114
+ return __generator(this, function (_c) {
3115
+ switch (_c.label) {
3116
+ case 0:
3117
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3118
+ return [2, deserializeAws_restJson1BatchGetAssetPropertyValueHistoryCommandError(output, context)];
3119
+ }
3120
+ contents = {
3121
+ $metadata: deserializeMetadata(output),
3122
+ errorEntries: undefined,
3123
+ nextToken: undefined,
3124
+ skippedEntries: undefined,
3125
+ successEntries: undefined,
3126
+ };
3127
+ _a = __expectNonNull;
3128
+ _b = __expectObject;
3129
+ return [4, parseBody(output.body, context)];
3130
+ case 1:
3131
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3132
+ if (data.errorEntries !== undefined && data.errorEntries !== null) {
3133
+ contents.errorEntries = deserializeAws_restJson1BatchGetAssetPropertyValueHistoryErrorEntries(data.errorEntries, context);
3134
+ }
3135
+ if (data.nextToken !== undefined && data.nextToken !== null) {
3136
+ contents.nextToken = __expectString(data.nextToken);
3137
+ }
3138
+ if (data.skippedEntries !== undefined && data.skippedEntries !== null) {
3139
+ contents.skippedEntries = deserializeAws_restJson1BatchGetAssetPropertyValueHistorySkippedEntries(data.skippedEntries, context);
3140
+ }
3141
+ if (data.successEntries !== undefined && data.successEntries !== null) {
3142
+ contents.successEntries = deserializeAws_restJson1BatchGetAssetPropertyValueHistorySuccessEntries(data.successEntries, context);
3143
+ }
3144
+ return [2, Promise.resolve(contents)];
3145
+ }
3146
+ });
3147
+ }); };
3148
+ var deserializeAws_restJson1BatchGetAssetPropertyValueHistoryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3149
+ var parsedOutput, _a, response, errorCode, _b, parsedBody;
3150
+ var _c;
3151
+ return __generator(this, function (_d) {
3152
+ switch (_d.label) {
3153
+ case 0:
3154
+ _a = [__assign({}, output)];
3155
+ _c = {};
3156
+ return [4, parseBody(output.body, context)];
3157
+ case 1:
3158
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3159
+ errorCode = "UnknownError";
3160
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3161
+ _b = errorCode;
3162
+ switch (_b) {
3163
+ case "InternalFailureException": return [3, 2];
3164
+ case "com.amazonaws.iotsitewise#InternalFailureException": return [3, 2];
3165
+ case "InvalidRequestException": return [3, 4];
3166
+ case "com.amazonaws.iotsitewise#InvalidRequestException": return [3, 4];
3167
+ case "ServiceUnavailableException": return [3, 6];
3168
+ case "com.amazonaws.iotsitewise#ServiceUnavailableException": return [3, 6];
3169
+ case "ThrottlingException": return [3, 8];
3170
+ case "com.amazonaws.iotsitewise#ThrottlingException": return [3, 8];
3171
+ }
3172
+ return [3, 10];
3173
+ case 2: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
3174
+ case 3: throw _d.sent();
3175
+ case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
3176
+ case 5: throw _d.sent();
3177
+ case 6: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
3178
+ case 7: throw _d.sent();
3179
+ case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
3180
+ case 9: throw _d.sent();
3181
+ case 10:
3182
+ parsedBody = parsedOutput.body;
3183
+ response = new __BaseException({
3184
+ name: parsedBody.code || parsedBody.Code || errorCode,
3185
+ $fault: "client",
3186
+ $metadata: deserializeMetadata(output),
3187
+ });
3188
+ throw __decorateServiceException(response, parsedBody);
3189
+ }
3190
+ });
3191
+ }); };
2844
3192
  export var deserializeAws_restJson1BatchPutAssetPropertyValueCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2845
3193
  var contents, data, _a, _b;
2846
3194
  return __generator(this, function (_c) {
@@ -7650,6 +7998,16 @@ var deserializeAws_restJson1UnauthorizedExceptionResponse = function (parsedOutp
7650
7998
  return [2, __decorateServiceException(exception, parsedOutput.body)];
7651
7999
  });
7652
8000
  }); };
8001
+ var serializeAws_restJson1AggregateTypes = function (input, context) {
8002
+ return input
8003
+ .filter(function (e) { return e != null; })
8004
+ .map(function (entry) {
8005
+ if (entry === null) {
8006
+ return null;
8007
+ }
8008
+ return entry;
8009
+ });
8010
+ };
7653
8011
  var serializeAws_restJson1Alarms = function (input, context) {
7654
8012
  return __assign(__assign({}, (input.alarmRoleArn !== undefined && input.alarmRoleArn !== null && { alarmRoleArn: input.alarmRoleArn })), (input.notificationLambdaArn !== undefined &&
7655
8013
  input.notificationLambdaArn !== null && { notificationLambdaArn: input.notificationLambdaArn }));
@@ -7760,6 +8118,54 @@ var serializeAws_restJson1AssetPropertyValues = function (input, context) {
7760
8118
  var serializeAws_restJson1Attribute = function (input, context) {
7761
8119
  return __assign({}, (input.defaultValue !== undefined && input.defaultValue !== null && { defaultValue: input.defaultValue }));
7762
8120
  };
8121
+ var serializeAws_restJson1BatchGetAssetPropertyAggregatesEntries = function (input, context) {
8122
+ return input
8123
+ .filter(function (e) { return e != null; })
8124
+ .map(function (entry) {
8125
+ if (entry === null) {
8126
+ return null;
8127
+ }
8128
+ return serializeAws_restJson1BatchGetAssetPropertyAggregatesEntry(entry, context);
8129
+ });
8130
+ };
8131
+ var serializeAws_restJson1BatchGetAssetPropertyAggregatesEntry = function (input, context) {
8132
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.aggregateTypes !== undefined &&
8133
+ input.aggregateTypes !== null && {
8134
+ aggregateTypes: serializeAws_restJson1AggregateTypes(input.aggregateTypes, context),
8135
+ })), (input.assetId !== undefined && input.assetId !== null && { assetId: input.assetId })), (input.endDate !== undefined &&
8136
+ input.endDate !== null && { endDate: Math.round(input.endDate.getTime() / 1000) })), (input.entryId !== undefined && input.entryId !== null && { entryId: input.entryId })), (input.propertyAlias !== undefined && input.propertyAlias !== null && { propertyAlias: input.propertyAlias })), (input.propertyId !== undefined && input.propertyId !== null && { propertyId: input.propertyId })), (input.qualities !== undefined &&
8137
+ input.qualities !== null && { qualities: serializeAws_restJson1Qualities(input.qualities, context) })), (input.resolution !== undefined && input.resolution !== null && { resolution: input.resolution })), (input.startDate !== undefined &&
8138
+ input.startDate !== null && { startDate: Math.round(input.startDate.getTime() / 1000) })), (input.timeOrdering !== undefined && input.timeOrdering !== null && { timeOrdering: input.timeOrdering }));
8139
+ };
8140
+ var serializeAws_restJson1BatchGetAssetPropertyValueEntries = function (input, context) {
8141
+ return input
8142
+ .filter(function (e) { return e != null; })
8143
+ .map(function (entry) {
8144
+ if (entry === null) {
8145
+ return null;
8146
+ }
8147
+ return serializeAws_restJson1BatchGetAssetPropertyValueEntry(entry, context);
8148
+ });
8149
+ };
8150
+ var serializeAws_restJson1BatchGetAssetPropertyValueEntry = function (input, context) {
8151
+ return __assign(__assign(__assign(__assign({}, (input.assetId !== undefined && input.assetId !== null && { assetId: input.assetId })), (input.entryId !== undefined && input.entryId !== null && { entryId: input.entryId })), (input.propertyAlias !== undefined && input.propertyAlias !== null && { propertyAlias: input.propertyAlias })), (input.propertyId !== undefined && input.propertyId !== null && { propertyId: input.propertyId }));
8152
+ };
8153
+ var serializeAws_restJson1BatchGetAssetPropertyValueHistoryEntries = function (input, context) {
8154
+ return input
8155
+ .filter(function (e) { return e != null; })
8156
+ .map(function (entry) {
8157
+ if (entry === null) {
8158
+ return null;
8159
+ }
8160
+ return serializeAws_restJson1BatchGetAssetPropertyValueHistoryEntry(entry, context);
8161
+ });
8162
+ };
8163
+ var serializeAws_restJson1BatchGetAssetPropertyValueHistoryEntry = function (input, context) {
8164
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.assetId !== undefined && input.assetId !== null && { assetId: input.assetId })), (input.endDate !== undefined &&
8165
+ input.endDate !== null && { endDate: Math.round(input.endDate.getTime() / 1000) })), (input.entryId !== undefined && input.entryId !== null && { entryId: input.entryId })), (input.propertyAlias !== undefined && input.propertyAlias !== null && { propertyAlias: input.propertyAlias })), (input.propertyId !== undefined && input.propertyId !== null && { propertyId: input.propertyId })), (input.qualities !== undefined &&
8166
+ input.qualities !== null && { qualities: serializeAws_restJson1Qualities(input.qualities, context) })), (input.startDate !== undefined &&
8167
+ input.startDate !== null && { startDate: Math.round(input.startDate.getTime() / 1000) })), (input.timeOrdering !== undefined && input.timeOrdering !== null && { timeOrdering: input.timeOrdering }));
8168
+ };
7763
8169
  var serializeAws_restJson1CustomerManagedS3Storage = function (input, context) {
7764
8170
  return __assign(__assign({}, (input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn })), (input.s3ResourceArn !== undefined && input.s3ResourceArn !== null && { s3ResourceArn: input.s3ResourceArn }));
7765
8171
  };
@@ -7891,6 +8297,16 @@ var serializeAws_restJson1PutAssetPropertyValueEntry = function (input, context)
7891
8297
  propertyValues: serializeAws_restJson1AssetPropertyValues(input.propertyValues, context),
7892
8298
  }));
7893
8299
  };
8300
+ var serializeAws_restJson1Qualities = function (input, context) {
8301
+ return input
8302
+ .filter(function (e) { return e != null; })
8303
+ .map(function (entry) {
8304
+ if (entry === null) {
8305
+ return null;
8306
+ }
8307
+ return entry;
8308
+ });
8309
+ };
7894
8310
  var serializeAws_restJson1Resource = function (input, context) {
7895
8311
  return __assign(__assign({}, (input.portal !== undefined &&
7896
8312
  input.portal !== null && { portal: serializeAws_restJson1PortalResource(input.portal, context) })), (input.project !== undefined &&
@@ -8328,6 +8744,201 @@ var deserializeAws_restJson1BatchDisassociateProjectAssetsErrors = function (out
8328
8744
  });
8329
8745
  return retVal;
8330
8746
  };
8747
+ var deserializeAws_restJson1BatchGetAssetPropertyAggregatesErrorEntries = function (output, context) {
8748
+ var retVal = (output || [])
8749
+ .filter(function (e) { return e != null; })
8750
+ .map(function (entry) {
8751
+ if (entry === null) {
8752
+ return null;
8753
+ }
8754
+ return deserializeAws_restJson1BatchGetAssetPropertyAggregatesErrorEntry(entry, context);
8755
+ });
8756
+ return retVal;
8757
+ };
8758
+ var deserializeAws_restJson1BatchGetAssetPropertyAggregatesErrorEntry = function (output, context) {
8759
+ return {
8760
+ entryId: __expectString(output.entryId),
8761
+ errorCode: __expectString(output.errorCode),
8762
+ errorMessage: __expectString(output.errorMessage),
8763
+ };
8764
+ };
8765
+ var deserializeAws_restJson1BatchGetAssetPropertyAggregatesErrorInfo = function (output, context) {
8766
+ return {
8767
+ errorCode: __expectString(output.errorCode),
8768
+ errorTimestamp: output.errorTimestamp !== undefined && output.errorTimestamp !== null
8769
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.errorTimestamp)))
8770
+ : undefined,
8771
+ };
8772
+ };
8773
+ var deserializeAws_restJson1BatchGetAssetPropertyAggregatesSkippedEntries = function (output, context) {
8774
+ var retVal = (output || [])
8775
+ .filter(function (e) { return e != null; })
8776
+ .map(function (entry) {
8777
+ if (entry === null) {
8778
+ return null;
8779
+ }
8780
+ return deserializeAws_restJson1BatchGetAssetPropertyAggregatesSkippedEntry(entry, context);
8781
+ });
8782
+ return retVal;
8783
+ };
8784
+ var deserializeAws_restJson1BatchGetAssetPropertyAggregatesSkippedEntry = function (output, context) {
8785
+ return {
8786
+ completionStatus: __expectString(output.completionStatus),
8787
+ entryId: __expectString(output.entryId),
8788
+ errorInfo: output.errorInfo !== undefined && output.errorInfo !== null
8789
+ ? deserializeAws_restJson1BatchGetAssetPropertyAggregatesErrorInfo(output.errorInfo, context)
8790
+ : undefined,
8791
+ };
8792
+ };
8793
+ var deserializeAws_restJson1BatchGetAssetPropertyAggregatesSuccessEntries = function (output, context) {
8794
+ var retVal = (output || [])
8795
+ .filter(function (e) { return e != null; })
8796
+ .map(function (entry) {
8797
+ if (entry === null) {
8798
+ return null;
8799
+ }
8800
+ return deserializeAws_restJson1BatchGetAssetPropertyAggregatesSuccessEntry(entry, context);
8801
+ });
8802
+ return retVal;
8803
+ };
8804
+ var deserializeAws_restJson1BatchGetAssetPropertyAggregatesSuccessEntry = function (output, context) {
8805
+ return {
8806
+ aggregatedValues: output.aggregatedValues !== undefined && output.aggregatedValues !== null
8807
+ ? deserializeAws_restJson1AggregatedValues(output.aggregatedValues, context)
8808
+ : undefined,
8809
+ entryId: __expectString(output.entryId),
8810
+ };
8811
+ };
8812
+ var deserializeAws_restJson1BatchGetAssetPropertyValueErrorEntries = function (output, context) {
8813
+ var retVal = (output || [])
8814
+ .filter(function (e) { return e != null; })
8815
+ .map(function (entry) {
8816
+ if (entry === null) {
8817
+ return null;
8818
+ }
8819
+ return deserializeAws_restJson1BatchGetAssetPropertyValueErrorEntry(entry, context);
8820
+ });
8821
+ return retVal;
8822
+ };
8823
+ var deserializeAws_restJson1BatchGetAssetPropertyValueErrorEntry = function (output, context) {
8824
+ return {
8825
+ entryId: __expectString(output.entryId),
8826
+ errorCode: __expectString(output.errorCode),
8827
+ errorMessage: __expectString(output.errorMessage),
8828
+ };
8829
+ };
8830
+ var deserializeAws_restJson1BatchGetAssetPropertyValueErrorInfo = function (output, context) {
8831
+ return {
8832
+ errorCode: __expectString(output.errorCode),
8833
+ errorTimestamp: output.errorTimestamp !== undefined && output.errorTimestamp !== null
8834
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.errorTimestamp)))
8835
+ : undefined,
8836
+ };
8837
+ };
8838
+ var deserializeAws_restJson1BatchGetAssetPropertyValueHistoryErrorEntries = function (output, context) {
8839
+ var retVal = (output || [])
8840
+ .filter(function (e) { return e != null; })
8841
+ .map(function (entry) {
8842
+ if (entry === null) {
8843
+ return null;
8844
+ }
8845
+ return deserializeAws_restJson1BatchGetAssetPropertyValueHistoryErrorEntry(entry, context);
8846
+ });
8847
+ return retVal;
8848
+ };
8849
+ var deserializeAws_restJson1BatchGetAssetPropertyValueHistoryErrorEntry = function (output, context) {
8850
+ return {
8851
+ entryId: __expectString(output.entryId),
8852
+ errorCode: __expectString(output.errorCode),
8853
+ errorMessage: __expectString(output.errorMessage),
8854
+ };
8855
+ };
8856
+ var deserializeAws_restJson1BatchGetAssetPropertyValueHistoryErrorInfo = function (output, context) {
8857
+ return {
8858
+ errorCode: __expectString(output.errorCode),
8859
+ errorTimestamp: output.errorTimestamp !== undefined && output.errorTimestamp !== null
8860
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.errorTimestamp)))
8861
+ : undefined,
8862
+ };
8863
+ };
8864
+ var deserializeAws_restJson1BatchGetAssetPropertyValueHistorySkippedEntries = function (output, context) {
8865
+ var retVal = (output || [])
8866
+ .filter(function (e) { return e != null; })
8867
+ .map(function (entry) {
8868
+ if (entry === null) {
8869
+ return null;
8870
+ }
8871
+ return deserializeAws_restJson1BatchGetAssetPropertyValueHistorySkippedEntry(entry, context);
8872
+ });
8873
+ return retVal;
8874
+ };
8875
+ var deserializeAws_restJson1BatchGetAssetPropertyValueHistorySkippedEntry = function (output, context) {
8876
+ return {
8877
+ completionStatus: __expectString(output.completionStatus),
8878
+ entryId: __expectString(output.entryId),
8879
+ errorInfo: output.errorInfo !== undefined && output.errorInfo !== null
8880
+ ? deserializeAws_restJson1BatchGetAssetPropertyValueHistoryErrorInfo(output.errorInfo, context)
8881
+ : undefined,
8882
+ };
8883
+ };
8884
+ var deserializeAws_restJson1BatchGetAssetPropertyValueHistorySuccessEntries = function (output, context) {
8885
+ var retVal = (output || [])
8886
+ .filter(function (e) { return e != null; })
8887
+ .map(function (entry) {
8888
+ if (entry === null) {
8889
+ return null;
8890
+ }
8891
+ return deserializeAws_restJson1BatchGetAssetPropertyValueHistorySuccessEntry(entry, context);
8892
+ });
8893
+ return retVal;
8894
+ };
8895
+ var deserializeAws_restJson1BatchGetAssetPropertyValueHistorySuccessEntry = function (output, context) {
8896
+ return {
8897
+ assetPropertyValueHistory: output.assetPropertyValueHistory !== undefined && output.assetPropertyValueHistory !== null
8898
+ ? deserializeAws_restJson1AssetPropertyValueHistory(output.assetPropertyValueHistory, context)
8899
+ : undefined,
8900
+ entryId: __expectString(output.entryId),
8901
+ };
8902
+ };
8903
+ var deserializeAws_restJson1BatchGetAssetPropertyValueSkippedEntries = function (output, context) {
8904
+ var retVal = (output || [])
8905
+ .filter(function (e) { return e != null; })
8906
+ .map(function (entry) {
8907
+ if (entry === null) {
8908
+ return null;
8909
+ }
8910
+ return deserializeAws_restJson1BatchGetAssetPropertyValueSkippedEntry(entry, context);
8911
+ });
8912
+ return retVal;
8913
+ };
8914
+ var deserializeAws_restJson1BatchGetAssetPropertyValueSkippedEntry = function (output, context) {
8915
+ return {
8916
+ completionStatus: __expectString(output.completionStatus),
8917
+ entryId: __expectString(output.entryId),
8918
+ errorInfo: output.errorInfo !== undefined && output.errorInfo !== null
8919
+ ? deserializeAws_restJson1BatchGetAssetPropertyValueErrorInfo(output.errorInfo, context)
8920
+ : undefined,
8921
+ };
8922
+ };
8923
+ var deserializeAws_restJson1BatchGetAssetPropertyValueSuccessEntries = function (output, context) {
8924
+ var retVal = (output || [])
8925
+ .filter(function (e) { return e != null; })
8926
+ .map(function (entry) {
8927
+ if (entry === null) {
8928
+ return null;
8929
+ }
8930
+ return deserializeAws_restJson1BatchGetAssetPropertyValueSuccessEntry(entry, context);
8931
+ });
8932
+ return retVal;
8933
+ };
8934
+ var deserializeAws_restJson1BatchGetAssetPropertyValueSuccessEntry = function (output, context) {
8935
+ return {
8936
+ assetPropertyValue: output.assetPropertyValue !== undefined && output.assetPropertyValue !== null
8937
+ ? deserializeAws_restJson1AssetPropertyValue(output.assetPropertyValue, context)
8938
+ : undefined,
8939
+ entryId: __expectString(output.entryId),
8940
+ };
8941
+ };
8331
8942
  var deserializeAws_restJson1BatchPutAssetPropertyError = function (output, context) {
8332
8943
  return {
8333
8944
  errorCode: __expectString(output.errorCode),