{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-sitewise/json-schema/amazon-iot-sitewise-update-computation-model-request-schema.json",
  "title": "UpdateComputationModelRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-sitewise-computation-models-api-openapi.yml#/components/schemas/UpdateComputationModelRequest",
  "type": "object",
  "properties": {
    "computationModelId": {
      "type": "string",
      "description": "The ID of the computation model."
    },
    "computationModelName": {
      "type": "string",
      "description": "The name of the computation model."
    },
    "computationModelDescription": {
      "type": "string",
      "description": "The description of the computation model."
    },
    "computationModelConfiguration": {
      "$ref": "#/$defs/ComputationModelConfiguration"
    },
    "computationModelDataBinding": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/ComputationModelDataBindingValue"
      },
      "description": "The data binding for the computation model. Key is a variable name defined in configuration. Value is a ComputationModelDataBindingValue referenced by the variable."
    },
    "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."
    }
  },
  "required": [
    "computationModelId",
    "computationModelName",
    "computationModelConfiguration",
    "computationModelDataBinding"
  ],
  "$defs": {
    "AssetModelPropertyBindingValue": {
      "type": "object",
      "properties": {
        "assetModelId": {
          "type": "string",
          "description": "The ID of the asset model, in UUID format."
        },
        "propertyId": {
          "type": "string",
          "description": "The ID of the asset model property used in data binding value."
        }
      },
      "required": [
        "assetModelId",
        "propertyId"
      ]
    },
    "AssetPropertyBindingValue": {
      "type": "object",
      "properties": {
        "assetId": {
          "type": "string",
          "description": "The ID of the asset containing the property. This identifies the specific asset instance's property value used in the computation model."
        },
        "propertyId": {
          "type": "string",
          "description": "The ID of the property within the asset. This identifies the specific property's value used in the computation model."
        }
      },
      "required": [
        "assetId",
        "propertyId"
      ]
    },
    "ComputationModelAnomalyDetectionConfiguration": {
      "type": "object",
      "properties": {
        "inputProperties": {
          "type": "string",
          "description": "Define the variable name associated with input properties, with the following format ${VariableName}."
        },
        "resultProperty": {
          "type": "string",
          "description": "Define the variable name associated with the result property, and the following format ${VariableName}."
        }
      },
      "required": [
        "inputProperties",
        "resultProperty"
      ]
    },
    "ComputationModelConfiguration": {
      "type": "object",
      "properties": {
        "anomalyDetection": {
          "$ref": "#/$defs/ComputationModelAnomalyDetectionConfiguration"
        }
      }
    },
    "ComputationModelDataBindingValue": {
      "type": "object",
      "properties": {
        "assetModelProperty": {
          "$ref": "#/$defs/AssetModelPropertyBindingValue"
        },
        "assetProperty": {
          "$ref": "#/$defs/AssetPropertyBindingValue"
        },
        "list": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ComputationModelDataBindingValue"
          },
          "description": "Specifies a list of data binding value."
        }
      }
    }
  }
}