{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-sitewise/json-schema/amazon-iot-sitewise-describe-computation-model-response-schema.json",
  "title": "DescribeComputationModelResponse",
  "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/DescribeComputationModelResponse",
  "type": "object",
  "properties": {
    "computationModelId": {
      "type": "string",
      "description": "The ID of the computation model."
    },
    "computationModelArn": {
      "type": "string",
      "description": "The ARN of the computation model, which has the following format. arn:${Partition}:iotsitewise:${Region}:${Account}:computation-model/${ComputationModelId}"
    },
    "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."
    },
    "computationModelCreationDate": {
      "type": "string",
      "format": "date-time",
      "description": "The model creation date, in Unix epoch time."
    },
    "computationModelLastUpdateDate": {
      "type": "string",
      "format": "date-time",
      "description": "The date the model was last updated, in Unix epoch time."
    },
    "computationModelStatus": {
      "$ref": "#/$defs/ComputationModelStatus"
    },
    "computationModelVersion": {
      "type": "string",
      "description": "The version of the computation model."
    },
    "actionDefinitions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ActionDefinition"
      },
      "description": "The available actions for this computation model."
    }
  },
  "required": [
    "computationModelId",
    "computationModelArn",
    "computationModelName",
    "computationModelConfiguration",
    "computationModelDataBinding",
    "computationModelCreationDate",
    "computationModelLastUpdateDate",
    "computationModelStatus",
    "computationModelVersion",
    "actionDefinitions"
  ],
  "$defs": {
    "ActionDefinition": {
      "type": "object",
      "properties": {
        "actionDefinitionId": {
          "type": "string",
          "description": "The ID of the action definition."
        },
        "actionName": {
          "type": "string",
          "description": "The name of the action definition."
        },
        "actionType": {
          "type": "string",
          "description": "The type of the action definition."
        }
      },
      "required": [
        "actionDefinitionId",
        "actionName",
        "actionType"
      ]
    },
    "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."
        }
      }
    },
    "ComputationModelStatus": {
      "type": "object",
      "properties": {
        "state": {
          "type": "string",
          "enum": [
            "CREATING",
            "ACTIVE",
            "UPDATING",
            "DELETING",
            "FAILED"
          ],
          "description": "The current state of the computation model."
        },
        "error": {
          "$ref": "#/$defs/ErrorDetails"
        }
      },
      "required": [
        "state"
      ]
    },
    "DetailedError": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "INCOMPATIBLE_COMPUTE_LOCATION",
            "INCOMPATIBLE_FORWARDING_CONFIGURATION"
          ],
          "description": "The error code."
        },
        "message": {
          "type": "string",
          "description": "The error message."
        }
      },
      "required": [
        "code",
        "message"
      ]
    },
    "ErrorDetails": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "VALIDATION_ERROR",
            "INTERNAL_FAILURE"
          ],
          "description": "The error code."
        },
        "message": {
          "type": "string",
          "description": "The error message."
        },
        "details": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DetailedError"
          },
          "description": "A list of detailed errors."
        }
      },
      "required": [
        "code",
        "message"
      ]
    }
  }
}