{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/kontaktio/main/json-schema/kontaktio-occupancy-room-current-schema.json",
  "title": "Occupancy-Room-Current",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/kontaktio-occupancy-room-api-openapi.yml#/components/schemas/Occupancy-Room-Current",
  "type": "object",
  "properties": {
    "content": {
      "type": "array",
      "uniqueItems": true,
      "minItems": 0,
      "items": {
        "type": "object",
        "properties": {
          "roomId": {
            "type": "number",
            "description": "ID of the room."
          },
          "roomName": {
            "type": "string",
            "minLength": 1,
            "description": "Name of the room."
          },
          "floorId": {
            "type": "number",
            "description": "ID of the floor."
          },
          "floorName": {
            "type": "string",
            "minLength": 1,
            "description": "Name of the floor."
          },
          "buildingId": {
            "type": "number",
            "description": "ID of the building."
          },
          "buildingName": {
            "type": "string",
            "minLength": 1,
            "description": "Name of the building."
          },
          "campusId": {
            "type": "number",
            "description": "ID of the campus."
          },
          "campusName": {
            "type": "string",
            "minLength": 1,
            "description": "Name of the campus."
          },
          "lastUpdate": {
            "type": "string",
            "minLength": 1,
            "description": "Time of last occupancy update"
          },
          "occupancy": {
            "type": "number",
            "description": "Number of people detected in the given time range."
          }
        },
        "required": [
          "roomId",
          "lastUpdate",
          "occupancy"
        ]
      }
    },
    "page": {
      "type": "object",
      "required": [
        "size",
        "totalElements",
        "totalPages",
        "number"
      ],
      "properties": {
        "size": {
          "type": "number"
        },
        "totalElements": {
          "type": "number"
        },
        "totalPages": {
          "type": "number"
        },
        "number": {
          "type": "number"
        }
      }
    }
  },
  "required": [
    "content",
    "page"
  ]
}