{
  "$id": "https://schemas.ruter.no/adt/ota/api/v2.1/extended-information/transfer-information.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "TransferInformation",
  "description": "Transfer information",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "expiryDateTime",
    "transferOptions"
  ],
  "properties": {
    "expiryDateTime": {
      "$id": "#/properties/expiryDateTime",
      "type": "string",
      "description": "Do not present this information after this time. ISO 8601, UTC"
    },
    "heading": {
      "$id": "#/properties/heading",
      "type": "string",
      "description": "Optional. The heading to be displayed.",
      "examples": [
        "Next departures from City Centre"
      ]
    },
    "displayDurationSeconds": {
      "$id": "#/properties/displayDurationSeconds",
      "type": "number",
      "description": "Optional. The recommended number of seconds the transfer options shall be presented. This value depends on the number of items and content type, reflecting the time it takes for a passenger to read it."
    },
    "message": {
      "$id": "#/properties/message",
      "type": "string",
      "description": "Optional. Text to be presented when no transfer option information is available for a stop where transfer options usually are presented.",
      "examples": [
        "No departures from City Centre within the next 20 minutes",
        "Due to technical problems, departures cannot be displayed at the moment."
      ]
    },
    "transferOptions": {
      "$id": "#/properties/transferOptions",
      "type": "array",
      "description": "A list of Transfer Options that are currently relevant to the passengers onboard the vehicle at this point in the vehicle journey.",
      "items": {
        "type": "object",
        "title": "transferOption",
        "required": [
          "transportMode",
          "lineDesignation",
          "destinationDisplayName",
          "presentedDepartureTimes"
        ],
        "properties": {
          "transportMode": {
            "type": "string",
            "description": "Mode of transport.",
            "examples": [
              "BUS",
              "TRAIN",
              "FERRY",
              "METRO"
            ]
          },
          "lineDesignation": {
            "type": "string",
            "description": "The line designation to display. This is often a number but can also be alphanumeric. Normally 1- 4 characters."
          },
          "destinationDisplayName": {
            "type": "string",
            "description": "The name of the destination of the vehicle. This can be of any length but practically seldom over 30 characters."
          },
          "directionOfLineName": {
            "type": "string",
            "description": "Optional. The text denoting the direction of the vehicle. This can be of any length but practically seldom over 30 characters.",
            "examples": [
              "Towards City Centre"
            ]
          },
          "stopPointDesignation": {
            "type": "string",
            "description": "Optional. The designation of the stop from where departure will occur. Typically, a single or double letter or a digit that distinguish this stop point from other stop points within the stop area."
          },
          "presentedDepartureTimes": {
            "type": "array",
            "items": {
              "type": "string",
              "title": "presentedDepartureTimes",
              "description": "A text describing remaining time to departure.",
              "examples": [
                "4 min",
                "Now"
              ]
            }
          }
        }
      }
    }
  }
}
