{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/modoboa/json-schema/modoboa-paginated-alarm-list-schema.json",
  "title": "PaginatedAlarmList",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/modoboa-alarms-api-openapi.yml#/components/schemas/PaginatedAlarmList",
  "type": "object",
  "required": [
    "count",
    "results"
  ],
  "properties": {
    "count": {
      "type": "integer"
    },
    "next": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "previous": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Alarm"
      }
    }
  },
  "$defs": {
    "Alarm": {
      "type": "object",
      "description": "Serializer for Alarm related endpoints.",
      "properties": {
        "id": {
          "type": "integer",
          "readOnly": true
        },
        "domain": {
          "allOf": [
            {
              "$ref": "#/$defs/AlarmDomain"
            }
          ],
          "readOnly": true
        },
        "mailbox": {
          "allOf": [
            {
              "$ref": "#/$defs/AlarmMailbox"
            }
          ],
          "readOnly": true
        },
        "created": {
          "type": "string",
          "format": "date-time"
        },
        "closed": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "status": {
          "allOf": [
            {
              "$ref": "#/$defs/AlarmStatusEnum"
            }
          ],
          "minimum": -9223372036854775808,
          "maximum": 9223372036854775807
        },
        "title": {
          "type": "string"
        },
        "internal_name": {
          "type": "string",
          "maxLength": 120
        }
      },
      "required": [
        "domain",
        "id",
        "internal_name",
        "mailbox",
        "title"
      ]
    },
    "AlarmDomain": {
      "type": "object",
      "description": "Minimal domain representation exposed through alarms.",
      "properties": {
        "pk": {
          "type": "integer",
          "readOnly": true,
          "title": "ID"
        },
        "name": {
          "type": "string",
          "description": "The domain name",
          "maxLength": 253
        }
      },
      "required": [
        "name",
        "pk"
      ]
    },
    "AlarmMailbox": {
      "type": "object",
      "description": "Minimal mailbox representation exposed through alarms.",
      "properties": {
        "pk": {
          "type": "integer",
          "readOnly": true,
          "title": "ID"
        },
        "address": {
          "type": "string",
          "description": "Mailbox address (without the @domain.tld part)",
          "maxLength": 252
        }
      },
      "required": [
        "address",
        "pk"
      ]
    },
    "AlarmStatusEnum": {
      "enum": [
        1,
        2
      ],
      "type": "integer",
      "description": "* `1` - Opened\n* `2` - Closed"
    }
  }
}