{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/eagle-eye-networks/json-schema/eagle-eye-networks-floor-create-payload-schema.json",
  "title": "FloorCreatePayload",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/eagle-eye-networks-floors-api-openapi.yml#/components/schemas/FloorCreatePayload",
  "allOf": [
    {
      "$ref": "#/$defs/ExtendedFloor"
    },
    {
      "required": [
        "name",
        "floorLevel",
        "topLeftCoordinates",
        "bottomRightCoordinates"
      ]
    }
  ],
  "$defs": {
    "BasicFloor": {
      "type": "object",
      "description": "Represents a floor of a location",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier of the floor",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "default": "",
          "minLength": 0,
          "maxLength": 126
        },
        "floorLevel": {
          "type": "integer",
          "description": "The floor level in a multi-storey building",
          "minimum": -30,
          "maximum": 300
        },
        "topLeftCoordinates": {
          "type": "object",
          "allOf": [
            {
              "$ref": "#/$defs/PointPosition"
            }
          ]
        },
        "bottomRightCoordinates": {
          "type": "object",
          "allOf": [
            {
              "$ref": "#/$defs/PointPosition"
            }
          ]
        }
      }
    },
    "ExtendedFloor": {
      "allOf": [
        {
          "$ref": "#/$defs/BasicFloor"
        }
      ],
      "properties": {
        "floorPlans": {
          "readOnly": true,
          "type": "array",
          "items": {
            "$ref": "#/$defs/FloorPlanGetResponse"
          }
        }
      }
    },
    "FloorPlan": {
      "type": "object",
      "description": "Represents a floor plan file",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier of the floor plan",
          "readOnly": true
        },
        "floorId": {
          "type": "string",
          "description": "Unique identifier of the floor",
          "readOnly": true
        },
        "type": {
          "type": "string",
          "description": "Type of the floor image",
          "readOnly": true,
          "enum": [
            "png",
            "svg",
            "pdf"
          ]
        },
        "creator": {
          "type": "string",
          "enum": [
            "originalUpload",
            "cloudGenerated"
          ],
          "readOnly": true
        }
      }
    },
    "FloorPlanGetResponse": {
      "allOf": [
        {
          "$ref": "#/$defs/FloorPlan"
        }
      ],
      "required": [
        "id",
        "floorId",
        "type",
        "creator"
      ]
    },
    "PointPosition": {
      "type": "object",
      "required": [
        "latitude",
        "longitude"
      ],
      "properties": {
        "latitude": {
          "description": "The latitude of the device. (WGS 84)",
          "type": "number",
          "format": "double",
          "minimum": -90,
          "maximum": 90
        },
        "longitude": {
          "description": "The longitude of the device. (WGS 84).",
          "type": "number",
          "format": "double",
          "minimum": -180,
          "maximum": 180
        }
      }
    }
  }
}