{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-sitewise/json-schema/amazon-iot-sitewise-update-asset-model-composite-model-request-schema.json",
  "title": "UpdateAssetModelCompositeModelRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-sitewise-composite-models-api-openapi.yml#/components/schemas/UpdateAssetModelCompositeModelRequest",
  "type": "object",
  "properties": {
    "assetModelId": {
      "type": "string",
      "description": "The ID of the asset model, in UUID format."
    },
    "assetModelCompositeModelId": {
      "type": "string",
      "description": "The ID of a composite model on this asset model."
    },
    "assetModelCompositeModelExternalId": {
      "type": "string",
      "description": "An external ID to assign to the asset model. You can only set the external ID of the asset model if it wasn't set when it was created, or you're setting it to the exact same thing as when it was created."
    },
    "assetModelCompositeModelDescription": {
      "type": "string",
      "description": "A description for the composite model."
    },
    "assetModelCompositeModelName": {
      "type": "string",
      "description": "A unique name for the composite model."
    },
    "clientToken": {
      "type": "string",
      "description": "A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required."
    },
    "assetModelCompositeModelProperties": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AssetModelProperty"
      },
      "description": "The property definitions of the composite model. For more information, see Inline custom composite models in the IoT SiteWise User Guide. You can specify up to 200 properties per composite model. For more information, see Quotas in the IoT SiteWise User Guide."
    },
    "ifMatch": {
      "type": "string",
      "description": "The expected current entity tag (ETag) for the asset model’s latest or active version (specified using matchForVersionType). The update request is rejected if the tag does not match the latest or active version's current entity tag. See Optimistic locking for asset model writes in the IoT SiteWise User Guide."
    },
    "ifNoneMatch": {
      "type": "string",
      "description": "Accepts * to reject the update request if an active version (specified using matchForVersionType as ACTIVE) already exists for the asset model."
    },
    "matchForVersionType": {
      "type": "string",
      "enum": [
        "LATEST",
        "ACTIVE"
      ],
      "description": "Specifies the asset model version type (LATEST or ACTIVE) used in conjunction with If-Match or If-None-Match headers to determine the target ETag for the update operation."
    }
  },
  "required": [
    "assetModelId",
    "assetModelCompositeModelId",
    "assetModelCompositeModelName"
  ],
  "$defs": {
    "AssetModelProperty": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The ID of the asset model property. If you are callling UpdateAssetModel to create a new property: You can specify its ID here, if desired. IoT SiteWise automatically generates a unique ID for you, so this parameter is never required. However, if you prefer to supply your own ID instead, you can specify it here in UUID format. If you specify your own ID, it must be globally unique. If you are calling UpdateAssetModel to modify an existing property: This can be either the actual ID in UUID format, or else externalId: followed by the external ID, if it has one. For more information, see Referenc"
        },
        "externalId": {
          "type": "string",
          "description": "The external ID (if any) provided in the CreateAssetModel or UpdateAssetModel operation. You can assign an external ID by specifying this value as part of a call to UpdateAssetModel. However, you can't change the external ID if one is already assigned. For more information, see Using external IDs in the IoT SiteWise User Guide."
        },
        "name": {
          "type": "string",
          "description": "The name of the asset model property."
        },
        "dataType": {
          "type": "string",
          "enum": [
            "STRING",
            "INTEGER",
            "DOUBLE",
            "BOOLEAN",
            "STRUCT",
            "VIDEO",
            "ANNOTATION",
            "JSON"
          ],
          "description": "The data type of the asset model property. The VIDEO, ANNOTATION, and JSON data types aren't supported for asset model properties. These types are used only by time series that store data for datasets in a workspace. If you specify STRUCT, you must also specify dataTypeSpec to identify the type of the structure for this property."
        },
        "dataTypeSpec": {
          "type": "string",
          "description": "The data type of the structure for this property. This parameter exists on properties that have the STRUCT data type."
        },
        "unit": {
          "type": "string",
          "description": "The unit of the asset model property, such as Newtons or RPM."
        },
        "type": {
          "$ref": "#/$defs/PropertyType"
        },
        "path": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AssetModelPropertyPathSegment"
          },
          "description": "The structured path to the property from the root of the asset model."
        }
      },
      "required": [
        "name",
        "dataType",
        "type"
      ]
    },
    "AssetModelPropertyPathSegment": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The ID of the path segment."
        },
        "name": {
          "type": "string",
          "description": "The name of the path segment."
        }
      }
    },
    "Attribute": {
      "type": "object",
      "properties": {
        "defaultValue": {
          "type": "string",
          "description": "The default value of the asset model property attribute. All assets that you create from the asset model contain this attribute value. You can update an attribute's value after you create an asset. For more information, see Updating attribute values in the IoT SiteWise User Guide."
        }
      }
    },
    "ExpressionVariable": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The friendly name of the variable to be used in the expression."
        },
        "value": {
          "$ref": "#/$defs/VariableValue"
        }
      },
      "required": [
        "name",
        "value"
      ]
    },
    "ForwardingConfig": {
      "type": "object",
      "properties": {
        "state": {
          "type": "string",
          "enum": [
            "DISABLED",
            "ENABLED"
          ],
          "description": "The forwarding state for the given property."
        }
      },
      "required": [
        "state"
      ]
    },
    "Measurement": {
      "type": "object",
      "properties": {
        "processingConfig": {
          "$ref": "#/$defs/MeasurementProcessingConfig"
        }
      }
    },
    "MeasurementProcessingConfig": {
      "type": "object",
      "properties": {
        "forwardingConfig": {
          "$ref": "#/$defs/ForwardingConfig"
        }
      },
      "required": [
        "forwardingConfig"
      ]
    },
    "Metric": {
      "type": "object",
      "properties": {
        "expression": {
          "type": "string",
          "description": "The mathematical expression that defines the metric aggregation function. You can specify up to 10 variables per expression. You can specify up to 10 functions per expression. For more information, see Quotas in the IoT SiteWise User Guide."
        },
        "variables": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ExpressionVariable"
          },
          "description": "The list of variables used in the expression."
        },
        "window": {
          "$ref": "#/$defs/MetricWindow"
        },
        "processingConfig": {
          "$ref": "#/$defs/MetricProcessingConfig"
        }
      },
      "required": [
        "window"
      ]
    },
    "MetricProcessingConfig": {
      "type": "object",
      "properties": {
        "computeLocation": {
          "type": "string",
          "enum": [
            "EDGE",
            "CLOUD"
          ],
          "description": "The compute location for the given metric property."
        }
      },
      "required": [
        "computeLocation"
      ]
    },
    "MetricWindow": {
      "type": "object",
      "properties": {
        "tumbling": {
          "$ref": "#/$defs/TumblingWindow"
        }
      }
    },
    "PropertyType": {
      "type": "object",
      "properties": {
        "attribute": {
          "$ref": "#/$defs/Attribute"
        },
        "measurement": {
          "$ref": "#/$defs/Measurement"
        },
        "transform": {
          "$ref": "#/$defs/Transform"
        },
        "metric": {
          "$ref": "#/$defs/Metric"
        }
      }
    },
    "Transform": {
      "type": "object",
      "properties": {
        "expression": {
          "type": "string",
          "description": "The mathematical expression that defines the transformation function. You can specify up to 10 variables per expression. You can specify up to 10 functions per expression. For more information, see Quotas in the IoT SiteWise User Guide."
        },
        "variables": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ExpressionVariable"
          },
          "description": "The list of variables used in the expression."
        },
        "processingConfig": {
          "$ref": "#/$defs/TransformProcessingConfig"
        }
      },
      "required": [
        "expression",
        "variables"
      ]
    },
    "TransformProcessingConfig": {
      "type": "object",
      "properties": {
        "computeLocation": {
          "type": "string",
          "enum": [
            "EDGE",
            "CLOUD"
          ],
          "description": "The compute location for the given transform property."
        },
        "forwardingConfig": {
          "$ref": "#/$defs/ForwardingConfig"
        }
      },
      "required": [
        "computeLocation"
      ]
    },
    "TumblingWindow": {
      "type": "object",
      "properties": {
        "interval": {
          "type": "string",
          "description": "The time interval for the tumbling window. The interval time must be between 1 minute and 1 week. IoT SiteWise computes the 1w interval the end of Sunday at midnight each week (UTC), the 1d interval at the end of each day at midnight (UTC), the 1h interval at the end of each hour, and so on. When IoT SiteWise aggregates data points for metric computations, the start of each interval is exclusive and the end of each interval is inclusive. IoT SiteWise places the computed data point at the end of the interval."
        },
        "offset": {
          "type": "string",
          "description": "The offset for the tumbling window. The offset parameter accepts the following: The offset time. For example, if you specify 18h for offset and 1d for interval, IoT SiteWise aggregates data in one of the following ways: If you create the metric before or at 6 PM (UTC), you get the first aggregation result at 6 PM (UTC) on the day when you create the metric. If you create the metric after 6 PM (UTC), you get the first aggregation result at 6 PM (UTC) the next day. The ISO 8601 format. For example, if you specify PT18H for offset and 1d for interval, IoT SiteWise aggregates data in one of the fo"
        }
      },
      "required": [
        "interval"
      ]
    },
    "VariableValue": {
      "type": "object",
      "properties": {
        "propertyId": {
          "type": "string",
          "description": "The ID of the property to use as the variable. You can use the property name if it's from the same asset model. If the property has an external ID, you can specify externalId: followed by the external ID. For more information, see Using external IDs in the IoT SiteWise User Guide."
        },
        "hierarchyId": {
          "type": "string",
          "description": "The ID of the hierarchy to query for the property ID. You can use the hierarchy's name instead of the hierarchy's ID. If the hierarchy has an external ID, you can specify externalId: followed by the external ID. For more information, see Using external IDs in the IoT SiteWise User Guide. You use a hierarchy ID instead of a model ID because you can have several hierarchies using the same model and therefore the same propertyId. For example, you might have separately grouped assets that come from the same asset model. For more information, see Asset hierarchies in the IoT SiteWise User Guide."
        },
        "propertyPath": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AssetModelPropertyPathSegment"
          },
          "description": "The path of the property."
        }
      }
    }
  }
}