{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openeik.org/schemas/0.7/types/siteEquipment.schema.json",
  "$comment": "OpenEik 0.7: folded by tools/fold-schemas-0.7.mjs from the proposal siteEquipment, which 0.7 makes a rule (open questions, 166). Written by hand, not generated.",
  "title": "siteEquipment type",
  "description": "A type record of category \"siteEquipment\" (Part II, 6.3.6: the common type schema and its siteEquipment payload, its kind, cabin, container, crane or fence, and that kind's measures in mm, every one of them required and no other kind's allowed. Its folder is site.",
  "allOf": [
    {
      "$ref": "type.schema.json"
    },
    {
      "properties": {
        "category": {
          "const": "siteEquipment"
        },
        "siteEquipment": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "cabin",
                "container",
                "crane",
                "fence"
              ],
              "description": "What it is: a site cabin or office, a storage or waste container, a tower crane, or a site fence."
            },
            "length": {
              "type": "number",
              "minimum": 500,
              "maximum": 30000,
              "description": "A cabin's or a container's length, mm, along the direction it is turned to."
            },
            "width": {
              "type": "number",
              "minimum": 500,
              "maximum": 10000,
              "description": "A cabin's or a container's width, mm, across the direction it is turned to."
            },
            "height": {
              "type": "number",
              "minimum": 500,
              "maximum": 10000,
              "description": "A cabin's, a container's or a fence's height, mm, from its base up."
            },
            "mast": {
              "type": "number",
              "minimum": 3000,
              "maximum": 150000,
              "description": "A crane's mast, mm: the height of its jib's underside over the underside of its foot, where it stands."
            },
            "jib": {
              "type": "number",
              "minimum": 3000,
              "maximum": 100000,
              "description": "A crane's jib, mm: its length from the mast's axis, along the direction the crane is turned to; the radius of its reach."
            },
            "counterJib": {
              "type": "number",
              "minimum": 1000,
              "maximum": 50000,
              "description": "A crane's counter-jib, mm: its length from the mast's axis, the other way."
            },
            "base": {
              "type": "number",
              "minimum": 2000,
              "maximum": 20000,
              "description": "A crane's base, mm: the side of its square foot."
            },
            "thickness": {
              "type": "number",
              "minimum": 10,
              "maximum": 500,
              "description": "A fence's thickness, mm: its panel's, centred on its line."
            }
          },
          "required": [
            "kind"
          ],
          "x-eik-closed": true,
          "allOf": [
            {
              "if": {
                "required": [
                  "kind"
                ],
                "properties": {
                  "kind": {
                    "enum": [
                      "cabin",
                      "container"
                    ]
                  }
                }
              },
              "then": {
                "required": [
                  "length",
                  "width",
                  "height"
                ],
                "properties": {
                  "mast": false,
                  "jib": false,
                  "counterJib": false,
                  "base": false,
                  "thickness": false
                }
              }
            },
            {
              "if": {
                "required": [
                  "kind"
                ],
                "properties": {
                  "kind": {
                    "const": "crane"
                  }
                }
              },
              "then": {
                "required": [
                  "mast",
                  "jib",
                  "counterJib",
                  "base"
                ],
                "properties": {
                  "length": false,
                  "width": false,
                  "height": false,
                  "thickness": false
                }
              }
            },
            {
              "if": {
                "required": [
                  "kind"
                ],
                "properties": {
                  "kind": {
                    "const": "fence"
                  }
                }
              },
              "then": {
                "required": [
                  "height",
                  "thickness"
                ],
                "properties": {
                  "length": false,
                  "width": false,
                  "mast": false,
                  "jib": false,
                  "counterJib": false,
                  "base": false
                }
              }
            }
          ]
        }
      },
      "required": [
        "siteEquipment"
      ]
    }
  ]
}
