@aws-sdk/client-iotsitewise 3.637.0 → 3.645.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/dist-cjs/index.js CHANGED
@@ -26,6 +26,7 @@ __export(src_exports, {
26
26
  AssetErrorCode: () => AssetErrorCode,
27
27
  AssetModelState: () => AssetModelState,
28
28
  AssetModelType: () => AssetModelType,
29
+ AssetModelVersionType: () => AssetModelVersionType,
29
30
  AssetRelationshipType: () => AssetRelationshipType,
30
31
  AssetState: () => AssetState,
31
32
  AssociateAssetsCommand: () => AssociateAssetsCommand,
@@ -131,6 +132,7 @@ __export(src_exports, {
131
132
  MonitorErrorCode: () => MonitorErrorCode,
132
133
  Permission: () => Permission,
133
134
  PortalState: () => PortalState,
135
+ PreconditionFailedException: () => PreconditionFailedException,
134
136
  PropertyDataType: () => PropertyDataType,
135
137
  PropertyNotificationState: () => PropertyNotificationState,
136
138
  PutDefaultEncryptionConfigurationCommand: () => PutDefaultEncryptionConfigurationCommand,
@@ -447,6 +449,10 @@ var AssetModelType = {
447
449
  ASSET_MODEL: "ASSET_MODEL",
448
450
  COMPONENT_MODEL: "COMPONENT_MODEL"
449
451
  };
452
+ var AssetModelVersionType = {
453
+ ACTIVE: "ACTIVE",
454
+ LATEST: "LATEST"
455
+ };
450
456
  var AssetRelationshipType = {
451
457
  HIERARCHY: "HIERARCHY"
452
458
  };
@@ -635,6 +641,25 @@ var BatchPutAssetPropertyValueErrorCode = {
635
641
  ThrottlingException: "ThrottlingException",
636
642
  TimestampOutOfRangeException: "TimestampOutOfRangeException"
637
643
  };
644
+ var _PreconditionFailedException = class _PreconditionFailedException extends IoTSiteWiseServiceException {
645
+ /**
646
+ * @internal
647
+ */
648
+ constructor(opts) {
649
+ super({
650
+ name: "PreconditionFailedException",
651
+ $fault: "client",
652
+ ...opts
653
+ });
654
+ this.name = "PreconditionFailedException";
655
+ this.$fault = "client";
656
+ Object.setPrototypeOf(this, _PreconditionFailedException.prototype);
657
+ this.resourceId = opts.resourceId;
658
+ this.resourceArn = opts.resourceArn;
659
+ }
660
+ };
661
+ __name(_PreconditionFailedException, "PreconditionFailedException");
662
+ var PreconditionFailedException = _PreconditionFailedException;
638
663
  var ColumnName = {
639
664
  ALIAS: "ALIAS",
640
665
  ASSET_ID: "ASSET_ID",
@@ -1116,9 +1141,12 @@ var se_CreateAssetModelCommand = /* @__PURE__ */ __name(async (input, context) =
1116
1141
  }, "se_CreateAssetModelCommand");
1117
1142
  var se_CreateAssetModelCompositeModelCommand = /* @__PURE__ */ __name(async (input, context) => {
1118
1143
  const b = (0, import_core.requestBuilder)(input, context);
1119
- const headers = {
1120
- "content-type": "application/json"
1121
- };
1144
+ const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
1145
+ "content-type": "application/json",
1146
+ [_im]: input[_iM],
1147
+ [_inm]: input[_iNM],
1148
+ [_mfvt]: input[_mFVT]
1149
+ });
1122
1150
  b.bp("/asset-models/{assetModelId}/composite-models");
1123
1151
  b.p("assetModelId", () => input.assetModelId, "{assetModelId}", false);
1124
1152
  let body;
@@ -1329,7 +1357,11 @@ var se_DeleteAssetCommand = /* @__PURE__ */ __name(async (input, context) => {
1329
1357
  }, "se_DeleteAssetCommand");
1330
1358
  var se_DeleteAssetModelCommand = /* @__PURE__ */ __name(async (input, context) => {
1331
1359
  const b = (0, import_core.requestBuilder)(input, context);
1332
- const headers = {};
1360
+ const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
1361
+ [_im]: input[_iM],
1362
+ [_inm]: input[_iNM],
1363
+ [_mfvt]: input[_mFVT]
1364
+ });
1333
1365
  b.bp("/asset-models/{assetModelId}");
1334
1366
  b.p("assetModelId", () => input.assetModelId, "{assetModelId}", false);
1335
1367
  const query = (0, import_smithy_client.map)({
@@ -1349,7 +1381,11 @@ var se_DeleteAssetModelCommand = /* @__PURE__ */ __name(async (input, context) =
1349
1381
  }, "se_DeleteAssetModelCommand");
1350
1382
  var se_DeleteAssetModelCompositeModelCommand = /* @__PURE__ */ __name(async (input, context) => {
1351
1383
  const b = (0, import_core.requestBuilder)(input, context);
1352
- const headers = {};
1384
+ const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
1385
+ [_im]: input[_iM],
1386
+ [_inm]: input[_iNM],
1387
+ [_mfvt]: input[_mFVT]
1388
+ });
1353
1389
  b.bp("/asset-models/{assetModelId}/composite-models/{assetModelCompositeModelId}");
1354
1390
  b.p("assetModelId", () => input.assetModelId, "{assetModelId}", false);
1355
1391
  b.p("assetModelCompositeModelId", () => input.assetModelCompositeModelId, "{assetModelCompositeModelId}", false);
@@ -1551,7 +1587,8 @@ var se_DescribeAssetModelCommand = /* @__PURE__ */ __name(async (input, context)
1551
1587
  b.bp("/asset-models/{assetModelId}");
1552
1588
  b.p("assetModelId", () => input.assetModelId, "{assetModelId}", false);
1553
1589
  const query = (0, import_smithy_client.map)({
1554
- [_eP]: [() => input.excludeProperties !== void 0, () => input[_eP].toString()]
1590
+ [_eP]: [() => input.excludeProperties !== void 0, () => input[_eP].toString()],
1591
+ [_aMV]: [, input[_aMV]]
1555
1592
  });
1556
1593
  let body;
1557
1594
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -1571,6 +1608,9 @@ var se_DescribeAssetModelCompositeModelCommand = /* @__PURE__ */ __name(async (i
1571
1608
  b.bp("/asset-models/{assetModelId}/composite-models/{assetModelCompositeModelId}");
1572
1609
  b.p("assetModelId", () => input.assetModelId, "{assetModelId}", false);
1573
1610
  b.p("assetModelCompositeModelId", () => input.assetModelCompositeModelId, "{assetModelCompositeModelId}", false);
1611
+ const query = (0, import_smithy_client.map)({
1612
+ [_aMV]: [, input[_aMV]]
1613
+ });
1574
1614
  let body;
1575
1615
  let { hostname: resolvedHostname } = await context.endpoint();
1576
1616
  if (context.disableHostPrefix !== true) {
@@ -1580,7 +1620,7 @@ var se_DescribeAssetModelCompositeModelCommand = /* @__PURE__ */ __name(async (i
1580
1620
  }
1581
1621
  }
1582
1622
  b.hn(resolvedHostname);
1583
- b.m("GET").h(headers).b(body);
1623
+ b.m("GET").h(headers).q(query).b(body);
1584
1624
  return b.build();
1585
1625
  }, "se_DescribeAssetModelCompositeModelCommand");
1586
1626
  var se_DescribeAssetPropertyCommand = /* @__PURE__ */ __name(async (input, context) => {
@@ -2043,7 +2083,8 @@ var se_ListAssetModelCompositeModelsCommand = /* @__PURE__ */ __name(async (inpu
2043
2083
  b.p("assetModelId", () => input.assetModelId, "{assetModelId}", false);
2044
2084
  const query = (0, import_smithy_client.map)({
2045
2085
  [_nT]: [, input[_nT]],
2046
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()]
2086
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
2087
+ [_aMV]: [, input[_aMV]]
2047
2088
  });
2048
2089
  let body;
2049
2090
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -2065,7 +2106,8 @@ var se_ListAssetModelPropertiesCommand = /* @__PURE__ */ __name(async (input, co
2065
2106
  const query = (0, import_smithy_client.map)({
2066
2107
  [_nT]: [, input[_nT]],
2067
2108
  [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
2068
- [_f]: [, input[_f]]
2109
+ [_f]: [, input[_f]],
2110
+ [_aMV]: [, input[_aMV]]
2069
2111
  });
2070
2112
  let body;
2071
2113
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -2084,9 +2126,10 @@ var se_ListAssetModelsCommand = /* @__PURE__ */ __name(async (input, context) =>
2084
2126
  const headers = {};
2085
2127
  b.bp("/asset-models");
2086
2128
  const query = (0, import_smithy_client.map)({
2129
+ [_aMT]: [() => input.assetModelTypes !== void 0, () => (input[_aMT] || []).map((_entry) => _entry)],
2087
2130
  [_nT]: [, input[_nT]],
2088
2131
  [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
2089
- [_aMT]: [() => input.assetModelTypes !== void 0, () => (input[_aMT] || []).map((_entry) => _entry)]
2132
+ [_aMV]: [, input[_aMV]]
2090
2133
  });
2091
2134
  let body;
2092
2135
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -2556,9 +2599,12 @@ var se_UpdateAssetCommand = /* @__PURE__ */ __name(async (input, context) => {
2556
2599
  }, "se_UpdateAssetCommand");
2557
2600
  var se_UpdateAssetModelCommand = /* @__PURE__ */ __name(async (input, context) => {
2558
2601
  const b = (0, import_core.requestBuilder)(input, context);
2559
- const headers = {
2560
- "content-type": "application/json"
2561
- };
2602
+ const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
2603
+ "content-type": "application/json",
2604
+ [_im]: input[_iM],
2605
+ [_inm]: input[_iNM],
2606
+ [_mfvt]: input[_mFVT]
2607
+ });
2562
2608
  b.bp("/asset-models/{assetModelId}");
2563
2609
  b.p("assetModelId", () => input.assetModelId, "{assetModelId}", false);
2564
2610
  let body;
@@ -2586,9 +2632,12 @@ var se_UpdateAssetModelCommand = /* @__PURE__ */ __name(async (input, context) =
2586
2632
  }, "se_UpdateAssetModelCommand");
2587
2633
  var se_UpdateAssetModelCompositeModelCommand = /* @__PURE__ */ __name(async (input, context) => {
2588
2634
  const b = (0, import_core.requestBuilder)(input, context);
2589
- const headers = {
2590
- "content-type": "application/json"
2591
- };
2635
+ const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
2636
+ "content-type": "application/json",
2637
+ [_im]: input[_iM],
2638
+ [_inm]: input[_iNM],
2639
+ [_mfvt]: input[_mFVT]
2640
+ });
2592
2641
  b.bp("/asset-models/{assetModelId}/composite-models/{assetModelCompositeModelId}");
2593
2642
  b.p("assetModelId", () => input.assetModelId, "{assetModelId}", false);
2594
2643
  b.p("assetModelCompositeModelId", () => input.assetModelCompositeModelId, "{assetModelCompositeModelId}", false);
@@ -3227,7 +3276,8 @@ var de_DescribeAssetModelCommand = /* @__PURE__ */ __name(async (output, context
3227
3276
  return de_CommandError(output, context);
3228
3277
  }
3229
3278
  const contents = (0, import_smithy_client.map)({
3230
- $metadata: deserializeMetadata(output)
3279
+ $metadata: deserializeMetadata(output),
3280
+ [_eT]: [, output.headers[_e]]
3231
3281
  });
3232
3282
  const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
3233
3283
  const doc = (0, import_smithy_client.take)(data, {
@@ -3243,7 +3293,8 @@ var de_DescribeAssetModelCommand = /* @__PURE__ */ __name(async (output, context
3243
3293
  assetModelName: import_smithy_client.expectString,
3244
3294
  assetModelProperties: import_smithy_client._json,
3245
3295
  assetModelStatus: import_smithy_client._json,
3246
- assetModelType: import_smithy_client.expectString
3296
+ assetModelType: import_smithy_client.expectString,
3297
+ assetModelVersion: import_smithy_client.expectString
3247
3298
  });
3248
3299
  Object.assign(contents, doc);
3249
3300
  return contents;
@@ -4091,6 +4142,9 @@ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
4091
4142
  case "ServiceUnavailableException":
4092
4143
  case "com.amazonaws.iotsitewise#ServiceUnavailableException":
4093
4144
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
4145
+ case "PreconditionFailedException":
4146
+ case "com.amazonaws.iotsitewise#PreconditionFailedException":
4147
+ throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
4094
4148
  case "AccessDeniedException":
4095
4149
  case "com.amazonaws.iotsitewise#AccessDeniedException":
4096
4150
  throw await de_AccessDeniedExceptionRes(parsedOutput, context);
@@ -4183,6 +4237,21 @@ var de_LimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, c
4183
4237
  });
4184
4238
  return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
4185
4239
  }, "de_LimitExceededExceptionRes");
4240
+ var de_PreconditionFailedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
4241
+ const contents = (0, import_smithy_client.map)({});
4242
+ const data = parsedOutput.body;
4243
+ const doc = (0, import_smithy_client.take)(data, {
4244
+ message: import_smithy_client.expectString,
4245
+ resourceArn: import_smithy_client.expectString,
4246
+ resourceId: import_smithy_client.expectString
4247
+ });
4248
+ Object.assign(contents, doc);
4249
+ const exception = new PreconditionFailedException({
4250
+ $metadata: deserializeMetadata(parsedOutput),
4251
+ ...contents
4252
+ });
4253
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
4254
+ }, "de_PreconditionFailedExceptionRes");
4186
4255
  var de_QueryTimeoutExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
4187
4256
  const contents = (0, import_smithy_client.map)({});
4188
4257
  const data = parsedOutput.body;
@@ -4443,7 +4512,8 @@ var de_AssetModelSummary = /* @__PURE__ */ __name((output, context) => {
4443
4512
  id: import_smithy_client.expectString,
4444
4513
  lastUpdateDate: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
4445
4514
  name: import_smithy_client.expectString,
4446
- status: import_smithy_client._json
4515
+ status: import_smithy_client._json,
4516
+ version: import_smithy_client.expectString
4447
4517
  });
4448
4518
  }, "de_AssetModelSummary");
4449
4519
  var de_AssetPropertyValue = /* @__PURE__ */ __name((output, context) => {
@@ -4726,15 +4796,19 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
4726
4796
  extendedRequestId: output.headers["x-amz-id-2"],
4727
4797
  cfId: output.headers["x-amz-cf-id"]
4728
4798
  }), "deserializeMetadata");
4799
+ var isSerializableHeaderValue = /* @__PURE__ */ __name((value) => value !== void 0 && value !== null && value !== "" && (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) && (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0), "isSerializableHeaderValue");
4729
4800
  var _a = "alias";
4730
4801
  var _aI = "assetId";
4731
4802
  var _aMI = "assetModelId";
4732
4803
  var _aMT = "assetModelTypes";
4804
+ var _aMV = "assetModelVersion";
4733
4805
  var _aP = "aliasPrefix";
4734
4806
  var _aT = "aggregateTypes";
4735
4807
  var _cT = "clientToken";
4808
+ var _e = "etag";
4736
4809
  var _eD = "endDate";
4737
4810
  var _eP = "excludeProperties";
4811
+ var _eT = "eTag";
4738
4812
  var _eTIS = "endTimeInSeconds";
4739
4813
  var _eTOIN = "endTimeOffsetInNanos";
4740
4814
  var _f = "filter";
@@ -4742,9 +4816,15 @@ var _hI = "hierarchyId";
4742
4816
  var _iA = "iamArn";
4743
4817
  var _iI = "identityId";
4744
4818
  var _iIS = "intervalInSeconds";
4819
+ var _iM = "ifMatch";
4820
+ var _iNM = "ifNoneMatch";
4745
4821
  var _iT = "identityType";
4746
4822
  var _iWIS = "intervalWindowInSeconds";
4823
+ var _im = "if-match";
4824
+ var _inm = "if-none-match";
4825
+ var _mFVT = "matchForVersionType";
4747
4826
  var _mR = "maxResults";
4827
+ var _mfvt = "match-for-version-type";
4748
4828
  var _nT = "nextToken";
4749
4829
  var _pA = "propertyAlias";
4750
4830
  var _pI = "propertyId";
@@ -6619,6 +6699,7 @@ var waitUntilPortalNotExists = /* @__PURE__ */ __name(async (params, input) => {
6619
6699
  ErrorCode,
6620
6700
  DetailedErrorCode,
6621
6701
  AssetModelType,
6702
+ AssetModelVersionType,
6622
6703
  AssetRelationshipType,
6623
6704
  AssetState,
6624
6705
  ConflictingOperationException,
@@ -6636,6 +6717,7 @@ var waitUntilPortalNotExists = /* @__PURE__ */ __name(async (params, input) => {
6636
6717
  BatchGetAssetPropertyValueErrorCode,
6637
6718
  BatchGetAssetPropertyValueHistoryErrorCode,
6638
6719
  BatchPutAssetPropertyValueErrorCode,
6720
+ PreconditionFailedException,
6639
6721
  ColumnName,
6640
6722
  JobStatus,
6641
6723
  ImageFileType,
@@ -70,6 +70,10 @@ export const AssetModelType = {
70
70
  ASSET_MODEL: "ASSET_MODEL",
71
71
  COMPONENT_MODEL: "COMPONENT_MODEL",
72
72
  };
73
+ export const AssetModelVersionType = {
74
+ ACTIVE: "ACTIVE",
75
+ LATEST: "LATEST",
76
+ };
73
77
  export const AssetRelationshipType = {
74
78
  HIERARCHY: "HIERARCHY",
75
79
  };
@@ -218,6 +222,20 @@ export const BatchPutAssetPropertyValueErrorCode = {
218
222
  ThrottlingException: "ThrottlingException",
219
223
  TimestampOutOfRangeException: "TimestampOutOfRangeException",
220
224
  };
225
+ export class PreconditionFailedException extends __BaseException {
226
+ constructor(opts) {
227
+ super({
228
+ name: "PreconditionFailedException",
229
+ $fault: "client",
230
+ ...opts,
231
+ });
232
+ this.name = "PreconditionFailedException";
233
+ this.$fault = "client";
234
+ Object.setPrototypeOf(this, PreconditionFailedException.prototype);
235
+ this.resourceId = opts.resourceId;
236
+ this.resourceArn = opts.resourceArn;
237
+ }
238
+ }
221
239
  export const ColumnName = {
222
240
  ALIAS: "ALIAS",
223
241
  ASSET_ID: "ASSET_ID",
@@ -4,7 +4,7 @@ import { isValidHostname as __isValidHostname, } from "@smithy/protocol-http";
4
4
  import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseEpochTimestamp as __parseEpochTimestamp, serializeDateTime as __serializeDateTime, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
5
5
  import { v4 as generateIdempotencyToken } from "uuid";
6
6
  import { IoTSiteWiseServiceException as __BaseException } from "../models/IoTSiteWiseServiceException";
7
- import { AccessDeniedException, ConflictingOperationException, InternalFailureException, InvalidRequestException, LimitExceededException, QueryTimeoutException, ResourceAlreadyExistsException, ResourceNotFoundException, ServiceUnavailableException, ThrottlingException, UnauthorizedException, ValidationException, } from "../models/models_0";
7
+ import { AccessDeniedException, ConflictingOperationException, InternalFailureException, InvalidRequestException, LimitExceededException, PreconditionFailedException, QueryTimeoutException, ResourceAlreadyExistsException, ResourceNotFoundException, ServiceUnavailableException, ThrottlingException, UnauthorizedException, ValidationException, } from "../models/models_0";
8
8
  import { TooManyTagsException } from "../models/models_1";
9
9
  export const se_AssociateAssetsCommand = async (input, context) => {
10
10
  const b = rb(input, context);
@@ -275,9 +275,12 @@ export const se_CreateAssetModelCommand = async (input, context) => {
275
275
  };
276
276
  export const se_CreateAssetModelCompositeModelCommand = async (input, context) => {
277
277
  const b = rb(input, context);
278
- const headers = {
278
+ const headers = map({}, isSerializableHeaderValue, {
279
279
  "content-type": "application/json",
280
- };
280
+ [_im]: input[_iM],
281
+ [_inm]: input[_iNM],
282
+ [_mfvt]: input[_mFVT],
283
+ });
281
284
  b.bp("/asset-models/{assetModelId}/composite-models");
282
285
  b.p("assetModelId", () => input.assetModelId, "{assetModelId}", false);
283
286
  let body;
@@ -476,7 +479,11 @@ export const se_DeleteAssetCommand = async (input, context) => {
476
479
  };
477
480
  export const se_DeleteAssetModelCommand = async (input, context) => {
478
481
  const b = rb(input, context);
479
- const headers = {};
482
+ const headers = map({}, isSerializableHeaderValue, {
483
+ [_im]: input[_iM],
484
+ [_inm]: input[_iNM],
485
+ [_mfvt]: input[_mFVT],
486
+ });
480
487
  b.bp("/asset-models/{assetModelId}");
481
488
  b.p("assetModelId", () => input.assetModelId, "{assetModelId}", false);
482
489
  const query = map({
@@ -496,7 +503,11 @@ export const se_DeleteAssetModelCommand = async (input, context) => {
496
503
  };
497
504
  export const se_DeleteAssetModelCompositeModelCommand = async (input, context) => {
498
505
  const b = rb(input, context);
499
- const headers = {};
506
+ const headers = map({}, isSerializableHeaderValue, {
507
+ [_im]: input[_iM],
508
+ [_inm]: input[_iNM],
509
+ [_mfvt]: input[_mFVT],
510
+ });
500
511
  b.bp("/asset-models/{assetModelId}/composite-models/{assetModelCompositeModelId}");
501
512
  b.p("assetModelId", () => input.assetModelId, "{assetModelId}", false);
502
513
  b.p("assetModelCompositeModelId", () => input.assetModelCompositeModelId, "{assetModelCompositeModelId}", false);
@@ -697,6 +708,7 @@ export const se_DescribeAssetModelCommand = async (input, context) => {
697
708
  b.p("assetModelId", () => input.assetModelId, "{assetModelId}", false);
698
709
  const query = map({
699
710
  [_eP]: [() => input.excludeProperties !== void 0, () => input[_eP].toString()],
711
+ [_aMV]: [, input[_aMV]],
700
712
  });
701
713
  let body;
702
714
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -716,6 +728,9 @@ export const se_DescribeAssetModelCompositeModelCommand = async (input, context)
716
728
  b.bp("/asset-models/{assetModelId}/composite-models/{assetModelCompositeModelId}");
717
729
  b.p("assetModelId", () => input.assetModelId, "{assetModelId}", false);
718
730
  b.p("assetModelCompositeModelId", () => input.assetModelCompositeModelId, "{assetModelCompositeModelId}", false);
731
+ const query = map({
732
+ [_aMV]: [, input[_aMV]],
733
+ });
719
734
  let body;
720
735
  let { hostname: resolvedHostname } = await context.endpoint();
721
736
  if (context.disableHostPrefix !== true) {
@@ -725,7 +740,7 @@ export const se_DescribeAssetModelCompositeModelCommand = async (input, context)
725
740
  }
726
741
  }
727
742
  b.hn(resolvedHostname);
728
- b.m("GET").h(headers).b(body);
743
+ b.m("GET").h(headers).q(query).b(body);
729
744
  return b.build();
730
745
  };
731
746
  export const se_DescribeAssetPropertyCommand = async (input, context) => {
@@ -1181,6 +1196,7 @@ export const se_ListAssetModelCompositeModelsCommand = async (input, context) =>
1181
1196
  const query = map({
1182
1197
  [_nT]: [, input[_nT]],
1183
1198
  [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
1199
+ [_aMV]: [, input[_aMV]],
1184
1200
  });
1185
1201
  let body;
1186
1202
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -1203,6 +1219,7 @@ export const se_ListAssetModelPropertiesCommand = async (input, context) => {
1203
1219
  [_nT]: [, input[_nT]],
1204
1220
  [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
1205
1221
  [_f]: [, input[_f]],
1222
+ [_aMV]: [, input[_aMV]],
1206
1223
  });
1207
1224
  let body;
1208
1225
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -1221,9 +1238,10 @@ export const se_ListAssetModelsCommand = async (input, context) => {
1221
1238
  const headers = {};
1222
1239
  b.bp("/asset-models");
1223
1240
  const query = map({
1241
+ [_aMT]: [() => input.assetModelTypes !== void 0, () => (input[_aMT] || []).map((_entry) => _entry)],
1224
1242
  [_nT]: [, input[_nT]],
1225
1243
  [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
1226
- [_aMT]: [() => input.assetModelTypes !== void 0, () => (input[_aMT] || []).map((_entry) => _entry)],
1244
+ [_aMV]: [, input[_aMV]],
1227
1245
  });
1228
1246
  let body;
1229
1247
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -1681,9 +1699,12 @@ export const se_UpdateAssetCommand = async (input, context) => {
1681
1699
  };
1682
1700
  export const se_UpdateAssetModelCommand = async (input, context) => {
1683
1701
  const b = rb(input, context);
1684
- const headers = {
1702
+ const headers = map({}, isSerializableHeaderValue, {
1685
1703
  "content-type": "application/json",
1686
- };
1704
+ [_im]: input[_iM],
1705
+ [_inm]: input[_iNM],
1706
+ [_mfvt]: input[_mFVT],
1707
+ });
1687
1708
  b.bp("/asset-models/{assetModelId}");
1688
1709
  b.p("assetModelId", () => input.assetModelId, "{assetModelId}", false);
1689
1710
  let body;
@@ -1709,9 +1730,12 @@ export const se_UpdateAssetModelCommand = async (input, context) => {
1709
1730
  };
1710
1731
  export const se_UpdateAssetModelCompositeModelCommand = async (input, context) => {
1711
1732
  const b = rb(input, context);
1712
- const headers = {
1733
+ const headers = map({}, isSerializableHeaderValue, {
1713
1734
  "content-type": "application/json",
1714
- };
1735
+ [_im]: input[_iM],
1736
+ [_inm]: input[_iNM],
1737
+ [_mfvt]: input[_mFVT],
1738
+ });
1715
1739
  b.bp("/asset-models/{assetModelId}/composite-models/{assetModelCompositeModelId}");
1716
1740
  b.p("assetModelId", () => input.assetModelId, "{assetModelId}", false);
1717
1741
  b.p("assetModelCompositeModelId", () => input.assetModelCompositeModelId, "{assetModelCompositeModelId}", false);
@@ -2337,6 +2361,7 @@ export const de_DescribeAssetModelCommand = async (output, context) => {
2337
2361
  }
2338
2362
  const contents = map({
2339
2363
  $metadata: deserializeMetadata(output),
2364
+ [_eT]: [, output.headers[_e]],
2340
2365
  });
2341
2366
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2342
2367
  const doc = take(data, {
@@ -2353,6 +2378,7 @@ export const de_DescribeAssetModelCommand = async (output, context) => {
2353
2378
  assetModelProperties: _json,
2354
2379
  assetModelStatus: _json,
2355
2380
  assetModelType: __expectString,
2381
+ assetModelVersion: __expectString,
2356
2382
  });
2357
2383
  Object.assign(contents, doc);
2358
2384
  return contents;
@@ -3200,6 +3226,9 @@ const de_CommandError = async (output, context) => {
3200
3226
  case "ServiceUnavailableException":
3201
3227
  case "com.amazonaws.iotsitewise#ServiceUnavailableException":
3202
3228
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
3229
+ case "PreconditionFailedException":
3230
+ case "com.amazonaws.iotsitewise#PreconditionFailedException":
3231
+ throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
3203
3232
  case "AccessDeniedException":
3204
3233
  case "com.amazonaws.iotsitewise#AccessDeniedException":
3205
3234
  throw await de_AccessDeniedExceptionRes(parsedOutput, context);
@@ -3292,6 +3321,21 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
3292
3321
  });
3293
3322
  return __decorateServiceException(exception, parsedOutput.body);
3294
3323
  };
3324
+ const de_PreconditionFailedExceptionRes = async (parsedOutput, context) => {
3325
+ const contents = map({});
3326
+ const data = parsedOutput.body;
3327
+ const doc = take(data, {
3328
+ message: __expectString,
3329
+ resourceArn: __expectString,
3330
+ resourceId: __expectString,
3331
+ });
3332
+ Object.assign(contents, doc);
3333
+ const exception = new PreconditionFailedException({
3334
+ $metadata: deserializeMetadata(parsedOutput),
3335
+ ...contents,
3336
+ });
3337
+ return __decorateServiceException(exception, parsedOutput.body);
3338
+ };
3295
3339
  const de_QueryTimeoutExceptionRes = async (parsedOutput, context) => {
3296
3340
  const contents = map({});
3297
3341
  const data = parsedOutput.body;
@@ -3573,6 +3617,7 @@ const de_AssetModelSummary = (output, context) => {
3573
3617
  lastUpdateDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3574
3618
  name: __expectString,
3575
3619
  status: _json,
3620
+ version: __expectString,
3576
3621
  });
3577
3622
  };
3578
3623
  const de_AssetPropertyValue = (output, context) => {
@@ -3899,11 +3944,14 @@ const _a = "alias";
3899
3944
  const _aI = "assetId";
3900
3945
  const _aMI = "assetModelId";
3901
3946
  const _aMT = "assetModelTypes";
3947
+ const _aMV = "assetModelVersion";
3902
3948
  const _aP = "aliasPrefix";
3903
3949
  const _aT = "aggregateTypes";
3904
3950
  const _cT = "clientToken";
3951
+ const _e = "etag";
3905
3952
  const _eD = "endDate";
3906
3953
  const _eP = "excludeProperties";
3954
+ const _eT = "eTag";
3907
3955
  const _eTIS = "endTimeInSeconds";
3908
3956
  const _eTOIN = "endTimeOffsetInNanos";
3909
3957
  const _f = "filter";
@@ -3911,9 +3959,15 @@ const _hI = "hierarchyId";
3911
3959
  const _iA = "iamArn";
3912
3960
  const _iI = "identityId";
3913
3961
  const _iIS = "intervalInSeconds";
3962
+ const _iM = "ifMatch";
3963
+ const _iNM = "ifNoneMatch";
3914
3964
  const _iT = "identityType";
3915
3965
  const _iWIS = "intervalWindowInSeconds";
3966
+ const _im = "if-match";
3967
+ const _inm = "if-none-match";
3968
+ const _mFVT = "matchForVersionType";
3916
3969
  const _mR = "maxResults";
3970
+ const _mfvt = "match-for-version-type";
3917
3971
  const _nT = "nextToken";
3918
3972
  const _pA = "propertyAlias";
3919
3973
  const _pI = "propertyId";
@@ -56,9 +56,14 @@ declare const CreateAssetModelCommand_base: {
56
56
  * const client = new IoTSiteWiseClient(config);
57
57
  * const input = { // CreateAssetModelRequest
58
58
  * assetModelName: "STRING_VALUE", // required
59
+ * assetModelType: "ASSET_MODEL" || "COMPONENT_MODEL",
60
+ * assetModelId: "STRING_VALUE",
61
+ * assetModelExternalId: "STRING_VALUE",
59
62
  * assetModelDescription: "STRING_VALUE",
60
63
  * assetModelProperties: [ // AssetModelPropertyDefinitions
61
64
  * { // AssetModelPropertyDefinition
65
+ * id: "STRING_VALUE",
66
+ * externalId: "STRING_VALUE",
62
67
  * name: "STRING_VALUE", // required
63
68
  * dataType: "STRING" || "INTEGER" || "DOUBLE" || "BOOLEAN" || "STRUCT", // required
64
69
  * dataTypeSpec: "STRING_VALUE",
@@ -126,25 +131,27 @@ declare const CreateAssetModelCommand_base: {
126
131
  * },
127
132
  * },
128
133
  * },
129
- * id: "STRING_VALUE",
130
- * externalId: "STRING_VALUE",
131
134
  * },
132
135
  * ],
133
136
  * assetModelHierarchies: [ // AssetModelHierarchyDefinitions
134
137
  * { // AssetModelHierarchyDefinition
135
- * name: "STRING_VALUE", // required
136
- * childAssetModelId: "STRING_VALUE", // required
137
138
  * id: "STRING_VALUE",
138
139
  * externalId: "STRING_VALUE",
140
+ * name: "STRING_VALUE", // required
141
+ * childAssetModelId: "STRING_VALUE", // required
139
142
  * },
140
143
  * ],
141
144
  * assetModelCompositeModels: [ // AssetModelCompositeModelDefinitions
142
145
  * { // AssetModelCompositeModelDefinition
146
+ * id: "STRING_VALUE",
147
+ * externalId: "STRING_VALUE",
143
148
  * name: "STRING_VALUE", // required
144
149
  * description: "STRING_VALUE",
145
150
  * type: "STRING_VALUE", // required
146
151
  * properties: [
147
152
  * {
153
+ * id: "STRING_VALUE",
154
+ * externalId: "STRING_VALUE",
148
155
  * name: "STRING_VALUE", // required
149
156
  * dataType: "STRING" || "INTEGER" || "DOUBLE" || "BOOLEAN" || "STRUCT", // required
150
157
  * dataTypeSpec: "STRING_VALUE",
@@ -212,21 +219,14 @@ declare const CreateAssetModelCommand_base: {
212
219
  * },
213
220
  * },
214
221
  * },
215
- * id: "STRING_VALUE",
216
- * externalId: "STRING_VALUE",
217
222
  * },
218
223
  * ],
219
- * id: "STRING_VALUE",
220
- * externalId: "STRING_VALUE",
221
224
  * },
222
225
  * ],
223
226
  * clientToken: "STRING_VALUE",
224
227
  * tags: { // TagMap
225
228
  * "<keys>": "STRING_VALUE",
226
229
  * },
227
- * assetModelId: "STRING_VALUE",
228
- * assetModelExternalId: "STRING_VALUE",
229
- * assetModelType: "ASSET_MODEL" || "COMPONENT_MODEL",
230
230
  * };
231
231
  * const command = new CreateAssetModelCommand(input);
232
232
  * const response = await client.send(command);
@@ -52,8 +52,8 @@ declare const CreateAssetModelCompositeModelCommand_base: {
52
52
  * const client = new IoTSiteWiseClient(config);
53
53
  * const input = { // CreateAssetModelCompositeModelRequest
54
54
  * assetModelId: "STRING_VALUE", // required
55
- * parentAssetModelCompositeModelId: "STRING_VALUE",
56
55
  * assetModelCompositeModelExternalId: "STRING_VALUE",
56
+ * parentAssetModelCompositeModelId: "STRING_VALUE",
57
57
  * assetModelCompositeModelId: "STRING_VALUE",
58
58
  * assetModelCompositeModelDescription: "STRING_VALUE",
59
59
  * assetModelCompositeModelName: "STRING_VALUE", // required
@@ -62,6 +62,8 @@ declare const CreateAssetModelCompositeModelCommand_base: {
62
62
  * composedAssetModelId: "STRING_VALUE",
63
63
  * assetModelCompositeModelProperties: [ // AssetModelPropertyDefinitions
64
64
  * { // AssetModelPropertyDefinition
65
+ * id: "STRING_VALUE",
66
+ * externalId: "STRING_VALUE",
65
67
  * name: "STRING_VALUE", // required
66
68
  * dataType: "STRING" || "INTEGER" || "DOUBLE" || "BOOLEAN" || "STRUCT", // required
67
69
  * dataTypeSpec: "STRING_VALUE",
@@ -129,10 +131,11 @@ declare const CreateAssetModelCompositeModelCommand_base: {
129
131
  * },
130
132
  * },
131
133
  * },
132
- * id: "STRING_VALUE",
133
- * externalId: "STRING_VALUE",
134
134
  * },
135
135
  * ],
136
+ * ifMatch: "STRING_VALUE",
137
+ * ifNoneMatch: "STRING_VALUE",
138
+ * matchForVersionType: "LATEST" || "ACTIVE",
136
139
  * };
137
140
  * const command = new CreateAssetModelCompositeModelCommand(input);
138
141
  * const response = await client.send(command);
@@ -184,6 +187,9 @@ declare const CreateAssetModelCompositeModelCommand_base: {
184
187
  * allowed number of properties for an asset model.</p>
185
188
  * <p>For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/quotas.html">Quotas</a> in the <i>IoT SiteWise User Guide</i>.</p>
186
189
  *
190
+ * @throws {@link PreconditionFailedException} (client fault)
191
+ * <p>The precondition in one or more of the request-header fields evaluated to <code>FALSE</code>.</p>
192
+ *
187
193
  * @throws {@link ResourceAlreadyExistsException} (client fault)
188
194
  * <p>The resource already exists.</p>
189
195
  *