{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://publicschema.org/transport/DrivingEntitlement.schema.json",
  "title": "DrivingEntitlement",
  "description": "A permission for a person to drive vehicles of one license category, recorded by a licensing authority, with its own conditions and dates. One driver's license can record several entitlements that start and expire on different dates. The license document is evidence of the entitlements, not the permission itself.",
  "type": "object",
  "properties": {
    "registered_subject": {
      "type": "string",
      "format": "uri",
      "description": "The URI of the person, organization, asset or other thing that the registration recognizes. On an authorization it is the holder of the permission, and an installation, asset or site the permission covers is the authorized object. An asset registration, such as a vehicle registration, recognizes the asset; its keeper is recorded as an asset party role."
    },
    "registration_authority": {
      "oneOf": [
        {
          "$ref": "https://publicschema.org/Organization.schema.json"
        },
        {
          "type": "string",
          "description": "URI or identifier reference"
        }
      ],
      "description": "The organization that confers the recognition."
    },
    "registration_jurisdiction": {
      "oneOf": [
        {
          "$ref": "https://publicschema.org/Location.schema.json"
        },
        {
          "type": "string",
          "description": "URI or identifier reference"
        }
      ],
      "description": "The area within which the recognition applies."
    },
    "registration_purpose": {
      "type": "string",
      "description": "The administrative purpose or category of the recognition, stated as text. It does not imply eligibility for a benefit."
    },
    "valid_from": {
      "type": "string",
      "format": "date",
      "description": "The first calendar day on which the registration, permission, certification or other stated fact applies, as its source states it, when known. A later suspension, withdrawal or correction is recorded separately and does not overwrite this date."
    },
    "valid_to": {
      "type": "string",
      "format": "date",
      "description": "The last calendar day on which the registration, permission, certification or other stated fact applies, as its source states it. A later suspension, withdrawal or correction is recorded separately and does not overwrite this date. If absent, the end is unknown, not unlimited."
    },
    "evidence_assertions": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "$ref": "https://publicschema.org/EvidenceAssertion.schema.json"
          },
          {
            "type": "string",
            "description": "URI or identifier reference"
          }
        ],
        "description": "Statements identifying sources that support or contradict this statement."
      }
    },
    "authorized_object": {
      "type": "string",
      "format": "uri",
      "description": "The URI of the installation, asset or site that the permission covers, when it covers one. The holder is the registered subject. A transfer of the permission to another holder is a separate authorization for that holder."
    },
    "authorized_activity": {
      "type": "string",
      "description": "The activity that the permission covers, stated as text."
    },
    "authorization_conditions": {
      "type": "string",
      "description": "Conditions that limit the permission, stated as text. Conditions taken from a code list go in a coded slot where the authorization defines one, such as driving_condition_codes on a driving entitlement."
    },
    "driving_category": {
      "$ref": "https://publicschema.org/CodedValue.schema.json",
      "description": "The license category this entitlement covers, such as B for cars, taken from a named category list. The same letter can mean different vehicles in different jurisdictions or editions of a list."
    },
    "driving_condition_codes": {
      "type": "array",
      "items": {
        "$ref": "https://publicschema.org/CodedValue.schema.json",
        "description": "Coded conditions or restrictions recorded against this entitlement, such as a requirement to wear glasses or to drive only vehicles with automatic transmission, each taken from a named code list. Conditions without a code are stated as text in authorization_conditions. Some codes reveal a medical condition."
      }
    }
  }
}
