{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://publicschema.org/BuildingUnit.schema.json",
  "title": "BuildingUnit",
  "description": "A part of a building used as a separate unit in daily life, such as a dwelling, shop or office, usually with its own lockable entrance from outside or from a shared area. A unit need not be separately owned or have its own address.",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The full display name of the record. Depending on the concept, this is a person's or group's name, or the title of a program, instrument, scoring rule, or software product."
    },
    "identifiers": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "$ref": "https://publicschema.org/Identifier.schema.json"
          },
          {
            "type": "string",
            "description": "URI or identifier reference"
          }
        ],
        "description": "Identifiers carried by this entity, such as national ID numbers, program IDs, or identifiers asserted by an identity document."
      }
    },
    "within_building": {
      "oneOf": [
        {
          "$ref": "https://publicschema.org/Building.schema.json"
        },
        {
          "type": "string",
          "description": "URI or identifier reference"
        }
      ],
      "description": "The building that this building unit is part of."
    },
    "building_use": {
      "type": "array",
      "items": {
        "$ref": "https://publicschema.org/CodedValue.schema.json",
        "description": "What a building or building unit is currently used for, such as housing, farming or public services, taken from a named classification. Several uses can apply at once."
      }
    }
  }
}
