{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/carboncuretechnologies/json-schema/carboncuretechnologies-injection-schema.json",
  "title": "Injection",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/carboncuretechnologies-engineering-orca-api-openapi.yml#/components/schemas/Injection",
  "type": "object",
  "properties": {
    "injectionId": {
      "type": "integer",
      "format": "int64"
    },
    "readyMixUnitId": {
      "type": "integer",
      "format": "int32"
    },
    "createdTimestamp": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "startTimestamp": {
      "type": "string",
      "format": "date-time"
    },
    "endTimestamp": {
      "type": "string",
      "format": "date-time"
    },
    "ambientTemperature": {
      "type": [
        "number",
        "null"
      ],
      "format": "float"
    },
    "readings": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/InjectionReading"
      }
    },
    "alarms": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/Alarm"
      }
    },
    "ticketId": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int32"
    },
    "injectedCO2Kg": {
      "type": [
        "number",
        "null"
      ],
      "format": "float"
    },
    "isReconstructed": {
      "type": "boolean"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "Alarm": {
      "type": "object",
      "properties": {
        "alarmId": {
          "type": "integer",
          "format": "int64"
        },
        "code": {
          "type": "integer",
          "format": "int32"
        },
        "alarmCodeDetailsId": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32"
        },
        "alarmCodeDetails": {
          "$ref": "#/$defs/MixerAlarmCodeDetails"
        },
        "readyMixUnitId": {
          "type": "integer",
          "format": "int32"
        },
        "injectionId": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64"
        },
        "timestamp": {
          "type": "string",
          "format": "date-time"
        },
        "resolvedTimestamp": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "resolved": {
          "type": "boolean",
          "readOnly": true
        }
      },
      "additionalProperties": false
    },
    "AlarmSeverity": {
      "enum": [
        "Low",
        "Medium",
        "High"
      ],
      "type": "string"
    },
    "InjectionReading": {
      "type": "object",
      "properties": {
        "injectionReadingId": {
          "type": "integer",
          "format": "int64"
        },
        "readyMixUnitId": {
          "type": "integer",
          "format": "int32"
        },
        "injectionId": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64"
        },
        "timestamp": {
          "type": "string",
          "format": "date-time"
        },
        "createdTimestamp": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "inletLiquidPressureKPa": {
          "type": [
            "number",
            "null"
          ],
          "format": "float"
        },
        "inletGasPressureKPa": {
          "type": [
            "number",
            "null"
          ],
          "format": "float"
        },
        "upstreamPressureKPa": {
          "type": [
            "number",
            "null"
          ],
          "format": "float"
        },
        "downstreamPressure0KPa": {
          "type": [
            "number",
            "null"
          ],
          "format": "float"
        },
        "downstreamPressure1KPa": {
          "type": [
            "number",
            "null"
          ],
          "format": "float"
        },
        "downstreamPressure2KPa": {
          "type": [
            "number",
            "null"
          ],
          "format": "float"
        },
        "upstreamTemperatureC": {
          "type": [
            "number",
            "null"
          ],
          "format": "float"
        },
        "flowRateKgPerSec": {
          "type": [
            "number",
            "null"
          ],
          "format": "float"
        },
        "injectedCO2Kg": {
          "type": "number",
          "format": "float"
        },
        "liquidValveOpen": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "gasValveOpen": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "equation1": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "equation2": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "equation3": {
          "type": [
            "boolean",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "MixerAlarmCodeDetails": {
      "type": "object",
      "properties": {
        "alarmCodeDetailsId": {
          "type": "integer",
          "format": "int32"
        },
        "code": {
          "type": "integer",
          "format": "int32"
        },
        "message": {
          "type": [
            "string",
            "null"
          ]
        },
        "severity": {
          "$ref": "#/$defs/AlarmSeverity"
        }
      },
      "additionalProperties": false
    }
  }
}