openapi: 3.0.1
info:
  title: Aviation Data Hub API - Flight Vertical
  description: Aviation Data Hub acts as a central data repository for all functions, which affect the efficient functioning of an airport. Data can be ingested from various sources via standardized interfaces. The way of getting data out of it is similar; there are standardized REST and MQTT interfaces to fetch the data. The data structure is based on industry standards such as IATA's AIDM and ACI's ACRIS combined with decades of Siemens Logistics industry knowledge.
  contact:
    name: Siemens Logistics GmbH
    url: https://www.siemens-logistics.com
    email: adh-devportal@siemens-logistics.com
  license:
    name: Property of Siemens Logistics GmbH
  version: 20.2.0
tags:
  - name: Flight Leg Store
    externalDocs:
      description: The flight leg store contains methods to access and insert or modify flight leg data.
      url: https://devportal.aviationdatahub.siemens.cloud/en/flight-vertical/overview
paths:
  /flightlegs/events/scheduled:
    post:
      tags:
        - Flight Leg Store
      summary: Post a flight scheduled event.
      description: Transfers a flight scheduled event to ADH. This may change the state of the flight leg. New data is processed asynchronously and may need some time to be updated.
      operationId: postFlightScheduledEvent
      requestBody:
        description: A FlightScheduledEvent JSON structure.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/FlightScheduledEvent"
        required: true
      responses:
        "200":
          description: default response
        "400":
          description: "Bad Request: e.g. invalid parameter."
          content:
            application/json: {}
        "401":
          description: "Unauthorized: please login first."
        "403":
          description: "Forbidden: not allowed to perform this request."
  /flightlegs/events/aircraftallocation:
    post:
      tags:
        - Flight Leg Store
      summary: Post a flight aircraft allocation event.
      description: Transfers a flight aircraft allocation event to ADH. This may change the state of the flight leg. New data is processed asynchronously and may need some time to be updated.
      operationId: postFlightAircraftAllocationEvent
      requestBody:
        description: A FlightAircraftAllocationEvent JSON structure.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/FlightAircraftAllocationEvent"
        required: true
      responses:
        "200":
          description: default response
        "400":
          description: "Bad Request: e.g. invalid parameter."
          content:
            application/json: {}
        "401":
          description: "Unauthorized: please login first."
        "403":
          description: "Forbidden: not allowed to perform this request."
  /flightlegs/events/time:
    post:
      tags:
        - Flight Leg Store
      summary: Post a flight time event.
      description: Transfers a flight time event to ADH. This may change the state of the flight leg. New data is processed asynchronously and may need some time to be updated.
      operationId: postFlightTimeEvent
      requestBody:
        description: A FlightTimeEvent JSON structure.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/FlightTimeEvent"
        required: true
      responses:
        "200":
          description: default response
        "400":
          description: "Bad Request: e.g. invalid parameter."
          content:
            application/json: {}
        "401":
          description: "Unauthorized: please login first."
        "403":
          description: "Forbidden: not allowed to perform this request."
  /flightlegs/events/cancelled:
    post:
      tags:
        - Flight Leg Store
      summary: Post a flight cancelled event.
      description: Transfers a flight cancelled event to ADH. This may change the state of the flight leg. New data is processed asynchronously and may need some time to be updated.
      operationId: postFlightCancelledEvent
      requestBody:
        description: A FlightCancelledEvent JSON structure.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/FlightCancelledEvent"
        required: true
      responses:
        "200":
          description: default response
        "400":
          description: "Bad Request: e.g. invalid parameter."
          content:
            application/json: {}
        "401":
          description: "Unauthorized: please login first."
        "403":
          description: "Forbidden: not allowed to perform this request."
  /flightlegs/events/gate:
    post:
      tags:
        - Flight Leg Store
      summary: Post a gate resource event.
      description: Transfers a gate resource event to ADH. This may change the state of the flight leg. New data is processed asynchronously and may need some time to be updated.
      operationId: postGateResourceEvent
      requestBody:
        description: A Gate Resource Event JSON structure.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GateResourceEvent"
        required: true
      responses:
        "200":
          description: default response
        "400":
          description: "Bad Request: e.g. invalid parameter."
          content:
            application/json: {}
        "401":
          description: "Unauthorized: please login first."
        "403":
          description: "Forbidden: not allowed to perform this request."
  /flightlegs/events/aircraftparkingposition:
    post:
      tags:
        - Flight Leg Store
      summary: Post an aircraft parking position resource event.
      description: Transfers an aircraft parking position resource event to ADH. This may change the state of the flight leg. New data is processed asynchronously and may need some time to be updated.
      operationId: postStandResourceEvent
      requestBody:
        description: A Stand Resource Event JSON structure.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AircraftParkingPositionResourceEvent"
        required: true
      responses:
        "200":
          description: default response
        "400":
          description: "Bad Request: e.g. invalid parameter."
          content:
            application/json: {}
        "401":
          description: "Unauthorized: please login first."
        "403":
          description: "Forbidden: not allowed to perform this request."
  /flightlegs/events/aircraftterminal:
    post:
      tags:
        - Flight Leg Store
      summary: Post a terminal resource event.
      description: Transfers a terminal resource event to ADH. This may change the state of the flight leg. New data is processed asynchronously and may need some time to be updated.
      operationId: postTerminalResourceEvent
      requestBody:
        description: A Terminal Resource Event JSON structure.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AircraftTerminalResourceEvent"
        required: true
      responses:
        "200":
          description: default response
        "400":
          description: "Bad Request: e.g. invalid parameter."
          content:
            application/json: {}
        "401":
          description: "Unauthorized: please login first."
        "403":
          description: "Forbidden: not allowed to perform this request."
  /flightlegs/events/checkindesks:
    post:
      tags:
        - Flight Leg Store
      summary: Post a check-in desks resource event.
      description: Transfers a check-in desks resource event to ADH. This may change the state of the flight leg. New data is processed asynchronously and may need some time to be updated.
      operationId: postCheckInDesksResourceEvent
      requestBody:
        description: A Check-in Desks Resource Event JSON structure.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CheckInDesksResourceEvent"
        required: true
      responses:
        "200":
          description: default response
        "400":
          description: "Bad Request: e.g. invalid parameter."
          content:
            application/json: {}
        "401":
          description: "Unauthorized: please login first."
        "403":
          description: "Forbidden: not allowed to perform this request."
  /flightlegs/{id}:
    get:
      tags:
        - Flight Leg Store
      summary: Get flight leg by id.
      operationId: getFlightLegREST
      parameters:
        - name: id
          in: path
          description: The flight leg id.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: "Ok: Default response."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/FlightLeg"
        "400":
          description: "Bad Request: e.g. invalid parameter."
          content:
            application/json: {}
        "401":
          description: "Unauthorized: please login first."
        "403":
          description: "Forbidden: not allowed to perform this request."
        "404":
          description: "Not Found: flight leg with given id not found."
  /flightlegs:
    get:
      tags:
        - Flight Leg Store
      summary: Query flight legs based on given search criteria.
      description: If no query parameter is set the search will be reduced to the last 24 hours. If no maxResult is set a maximum of 1000 records will be returned.
      operationId: queryFlightLegs
      parameters:
        - name: carrier
          in: query
          description: IATA 2-digit code of the operating carrier.
          required: false
          schema:
            type: string
        - name: flight-number
          in: query
          description: The numeric flight number of operating airline.
          required: false
          schema:
            type: string
        - name: operational-suffix
          in: query
          description: Used to distinguish two flights having the same flight number and departing from their respective origin stations on the same date.
          required: false
          schema:
            type: string
        - name: origin-date
          in: query
          description: The day of operation, i.e. local day of schedule off-block time in UTC at first departure airport of flight.
          required: false
          schema:
            type: string
        - name: origin-iata-code
          in: query
          description: The IATA code of an airport as origin airport of a flight leg.
          required: false
          schema:
            type: string
        - name: destination-iata-code
          in: query
          description: The IATA code of an airport as destination airport of a flight leg.
          required: false
          schema:
            type: string
        - name: from
          in: query
          description: The (included) start point of the interval in UTC for the scheduled departure/ arrival time depending on values for origin/ destination airport. e.g. 2020-01-31T12:30:00.000Z. If used the from and the to parameter has to be set.
          required: false
          schema:
            type: string
        - name: to
          in: query
          description: The (excluded) end point of the interval in UTC for the scheduled departure/ arrival time depending on values for origin/ destination airport. e.g. 2020-01-31T12:30:00.000Z. If used the from and the to parameter has to be set.
          required: false
          schema:
            type: string
        - name: max-results
          in: query
          description: The maximum number of results.
          required: false
          schema:
            type: integer
            format: int32
      responses:
        "200":
          description: default response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/FlightLeg"
        "400":
          description: "Bad Request: e.g. invalid parameter."
          content:
            application/json: {}
        "401":
          description: "Unauthorized: please login first."
        "403":
          description: "Forbidden: not allowed to perform this request."
  /flightlegs/{id}/events:
    get:
      tags:
        - Flight Leg Store
      summary: Get events for a specific flight leg.
      description: Return empty result if there are no events for the specified flight leg. If no query parameter is set the search will be reduced to the last 24 hours. If no maxResult is set a maximum of 1000 records will be returned.
      operationId: getFlightLegEvents
      parameters:
        - name: id
          in: path
          description: The FlightLeg id.
          required: true
          schema:
            type: string
        - name: from
          in: query
          description: The start point of the interval in UTC. e.g. 2020-01-31T12:30:00.000Z. If used the from and the to parameter has to be set.
          required: false
          schema:
            type: string
        - name: to
          in: query
          description: The end point of the interval in UTC. e.g. 2020-01-31T12:30:00.000Z. If used the from and the to parameter has to be set.
          required: false
          schema:
            type: string
        - name: event-type
          in: query
          description: "The event type: "
          required: false
          schema:
            enum:
              - FLIGHT_SCHEDULED_EVENT
              - AIRCRAFT_ALLOCATION_EVENT
              - FLIGHT_TIME_EVENT
              - FLIGHT_CANCELLED_EVENT
              - GATE_RESOURCE_EVENT
              - AIRCRAFT_PARKING_POSITION_RESOURCE_EVENT
              - AIRCRAFT_TERMINAL_RESOURCE_EVENT
              - BAGGAGE_MAKE_UP_BELT_RESOURCE_EVENT
              - BAGGAGE_TRANSFER_LATERAL_RESOURCE_EVENT
              - BAGGAGE_CLAIM_UNIT_RESOURCE_EVENT
              - CHECK_IN_DESKS_RESOURCE_EVENT
        - name: max-results
          in: query
          description: The maximum number of results.
          required: false
          schema:
            type: integer
            format: int32
      responses:
        "200":
          description: default response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/FlightEvent"
        "400":
          description: "Bad Request: e.g. invalid parameter."
          content:
            application/json: {}
        "401":
          description: "Unauthorized: please login first."
        "403":
          description: "Forbidden: not allowed to perform this request."
  /flightlegs/events:
    get:
      tags:
        - Flight Leg Store
      summary: Query flight events based on given search criteria.
      description: If no query parameter is set the search will be reduced to the last 24 hours. If no maxResult is set a maximum of 1000 records will be returned.
      operationId: queryFlightEvents
      parameters:
        - name: from
          in: query
          description: The start point of the interval in UTC. e.g. 2020-01-31T12:30:00.000Z. If used the from and the to parameter has to be set.
          required: false
          schema:
            type: string
        - name: to
          in: query
          description: The end point of the interval in UTC. e.g. 2020-01-31T12:30:00.000Z. If used the from and the to parameter has to be set.
          required: false
          schema:
            type: string
        - name: carrier
          in: query
          description: IATA 2-digit code of the operating carrier.
          required: false
          schema:
            type: string
        - name: flight-number
          in: query
          description: The numeric flight number of operating airline.
          required: false
          schema:
            type: string
        - name: operational-suffix
          in: query
          description: Used to distinguish two flights having the same flight number and departing from their respective origin stations on the same date.
          required: false
          schema:
            type: string
        - name: origin-date
          in: query
          description: The day of operation, i.e. local day of schedule off-block time in UTC at first departure airport of flight. e.g. 2020-01-31T12:30:00.000Z.
          required: false
          schema:
            type: string
        - name: origin-iata-code
          in: query
          description: The IATA code of an airport as origin airport for a flight leg.
          required: false
          schema:
            type: string
        - name: destination-iata-code
          in: query
          description: The IATA code of an airport as destination airport for a flight leg.
          required: false
          schema:
            type: string
        - name: event-type
          in: query
          description: "The event type: "
          required: false
          schema:
            enum:
              - FLIGHT_SCHEDULED_EVENT
              - AIRCRAFT_ALLOCATION_EVENT
              - FLIGHT_TIME_EVENT
              - FLIGHT_CANCELLED_EVENT
              - GATE_RESOURCE_EVENT
              - AIRCRAFT_PARKING_POSITION_RESOURCE_EVENT
              - AIRCRAFT_TERMINAL_RESOURCE_EVENT
              - BAGGAGE_MAKE_UP_BELT_RESOURCE_EVENT
              - BAGGAGE_TRANSFER_LATERAL_RESOURCE_EVENT
              - BAGGAGE_CLAIM_UNIT_RESOURCE_EVENT
              - CHECK_IN_DESKS_RESOURCE_EVENT
        - name: location
          in: query
          description: Location of the event to search for.
          required: false
          schema:
            type: string
        - name: source
          in: query
          description: Source of the event to search for.
          required: false
          schema:
            type: string
        - name: max-results
          in: query
          description: The maximum number of results.
          required: false
          schema:
            type: integer
            format: int32
      responses:
        "200":
          description: default response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/FlightEvent"
        "400":
          description: "Bad Request: e.g. invalid parameter."
          content:
            application/json: {}
        "401":
          description: "Unauthorized: please login first."
        "403":
          description: "Forbidden: not allowed to perform this request."
components:
  schemas:
    Aircraft:
      type: object
      properties:
        timestamp:
          type: string
          description: Timestamp of event.
          format: date-time
        aircraft-type:
          type: string
          description: Aircraft type.
          example: A320
        registration-number:
          type: string
          description: Registration number.
      description: Aircraft used for operating the flight leg.
    AircraftParkingPositionResourceEvent:
      required:
        - aircraft-parking-position
        - departure-or-arrival
        - event-time
        - event-type
        - identifier
        - source
      type: object
      properties:
        meta:
          $ref: "#/components/schemas/EventMeta"
        event-type:
          type: string
          description: Type of event for the concrete subclass.
          enum:
            - AIRCRAFT_PARKING_POSITION_RESOURCE_EVENT
        event-time:
          type: string
          description: Timestamp when the event occurred in UTC.
          format: date-time
        location:
          type: string
          description: Location id where the event occured.
          example: TRA_12
        source:
          type: string
          description: System generating the event.
          example: Scanner TRA_12
        identifier:
          $ref: "#/components/schemas/FlightLegIdentifier"
        secondary-identifiers:
          uniqueItems: true
          type: array
          description: Additionally identifiers used by BHS etc.
          items:
            $ref: "#/components/schemas/SecondaryIdentifier"
        departure-or-arrival:
          type: string
          description: Indicator for departure or arrival related information.
          enum:
            - DEPARTURE
            - ARRIVAL
        aircraft-parking-position:
          type: string
          description: Aircraft parking position.
          example: Bay 15
      description: Entity for Business Events for aircraft parking position assignment to a flight.
    AircraftTerminalResourceEvent:
      required:
        - departure-or-arrival
        - event-time
        - event-type
        - identifier
        - source
        - terminal
      type: object
      properties:
        meta:
          $ref: "#/components/schemas/EventMeta"
        event-type:
          type: string
          description: Type of event for the concrete subclass.
          enum:
            - AIRCRAFT_TERMINAL_RESOURCE_EVENT
        event-time:
          type: string
          description: Timestamp when the event occurred in UTC.
          format: date-time
        location:
          type: string
          description: Location id where the event occured.
          example: TRA_12
        source:
          type: string
          description: System generating the event.
          example: Scanner TRA_12
        identifier:
          $ref: "#/components/schemas/FlightLegIdentifier"
        secondary-identifiers:
          uniqueItems: true
          type: array
          description: Additionally identifiers used by BHS etc.
          items:
            $ref: "#/components/schemas/SecondaryIdentifier"
        departure-or-arrival:
          type: string
          description: Indicator for departure or arrival related information.
          enum:
            - DEPARTURE
            - ARRIVAL
        terminal:
          type: string
          description: Aircraft terminal.
          example: Terminal A
      description: Entity for Business Events for aircraft terminal assignment to flight.
    AirportResource:
      required:
        - location
        - timestamp
      type: object
      properties:
        timestamp:
          type: string
          description: Timestamp of event setting this resource in UTC.
          format: date-time
        location:
          type: string
          description: Resource location or name.
          example: Apron
      description: Description of an airport resource, allocated to a flight leg.
      example: AirportResource Description
    AirportResources:
      type: object
      properties:
        aircraft-parking-position:
          $ref: "#/components/schemas/AirportResource"
        passenger-gates:
          type: array
          description: The public gates which the passengers will use to board or disembark.
          items:
            $ref: "#/components/schemas/AirportResource"
        remote-operational-gates:
          type: array
          description: Additional location used to transfer passengers to or from a remote parking position.
          items:
            $ref: "#/components/schemas/AirportResource"
        runway:
          $ref: "#/components/schemas/AirportResource"
        aircraft-terminal:
          $ref: "#/components/schemas/AirportResource"
        public-terminals:
          type: array
          description: Terminals where the passengers will be processed.
          items:
            $ref: "#/components/schemas/AirportResource"
        baggage-claim-units:
          type: array
          description: The number(s) or name(s) of the assigned baggage claim units.
          items:
            $ref: "#/components/schemas/AirportResource"
        baggage-make-up-belts:
          type: array
          description: The baggage makeup belts assigned for outgoing bags.
          items:
            $ref: "#/components/schemas/AirportResource"
        baggage-transfer-laterals:
          type: array
          description: The baggage transfer laterals assigned for incoming bags.
          items:
            $ref: "#/components/schemas/AirportResource"
        check-in-desks:
          $ref: "#/components/schemas/AirportResource"
      description: Ground resources for inbound flight at arrival airport.
    BaggageClaimUnitResourceEvent:
      required:
        - baggage-claim-units
        - departure-or-arrival
        - event-time
        - event-type
        - identifier
        - source
      type: object
      description: Entity for Business Events for baggage claim unit assignments to flight.
      allOf:
        - $ref: "#/components/schemas/FlightEvent"
        - type: object
          properties:
            event-type:
              type: string
              description: Type of event for the concrete subclass.
              enum:
                - BAGGAGE_CLAIM_UNIT_RESOURCE_EVENT
            departure-or-arrival:
              type: string
              description: Indicator for departure or arrival related information.
              enum:
                - DEPARTURE
                - ARRIVAL
            baggage-claim-units:
              uniqueItems: true
              type: array
              description: Baggage claim units.
              items:
                type: string
                description: Baggage claim units.
    BaggageMakeUpBeltResourceEvent:
      required:
        - baggage-make-up-belts
        - departure-or-arrival
        - event-time
        - event-type
        - identifier
        - source
      type: object
      description: Entity for Business Events for baggage make-up belt assignments to flight.
      allOf:
        - $ref: "#/components/schemas/FlightEvent"
        - type: object
          properties:
            event-type:
              type: string
              description: Type of event for the concrete subclass.
              enum:
                - BAGGAGE_MAKE_UP_BELT_RESOURCE_EVENT
            departure-or-arrival:
              type: string
              description: Indicator for departure or arrival related information.
              enum:
                - DEPARTURE
                - ARRIVAL
            baggage-make-up-belts:
              uniqueItems: true
              type: array
              description: Baggage make-up belts.
              items:
                type: string
                description: Baggage make-up belts.
    BaggageTransferLateralResourceEvent:
      required:
        - baggage-transfer-laterals
        - departure-or-arrival
        - event-time
        - event-type
        - identifier
        - source
      type: object
      description: Entity for Business Events for baggage transfer lateral assignments to flight.
      allOf:
        - $ref: "#/components/schemas/FlightEvent"
        - type: object
          properties:
            event-type:
              type: string
              description: Type of event for the concrete subclass.
              enum:
                - BAGGAGE_TRANSFER_LATERAL_RESOURCE_EVENT
            departure-or-arrival:
              type: string
              description: Indicator for departure or arrival related information.
              enum:
                - DEPARTURE
                - ARRIVAL
            baggage-transfer-laterals:
              uniqueItems: true
              type: array
              description: Baggage transfer laterals.
              items:
                type: string
                description: Baggage transfer laterals.
    CheckInDesksResourceEvent:
      required:
        - check-in-desks
        - event-time
        - event-type
        - identifier
        - source
      type: object
      properties:
        meta:
          $ref: "#/components/schemas/EventMeta"
        event-type:
          type: string
          description: Type of event for the concrete subclass.
          enum:
            - CHECK_IN_DESKS_RESOURCE_EVENT
        event-time:
          type: string
          description: Timestamp when the event occurred in UTC.
          format: date-time
        location:
          type: string
          description: Location id where the event occured.
          example: TRA_12
        source:
          type: string
          description: System generating the event.
          example: Scanner TRA_12
        identifier:
          $ref: "#/components/schemas/FlightLegIdentifier"
        secondary-identifiers:
          uniqueItems: true
          type: array
          description: Additionally identifiers used by BHS etc.
          items:
            $ref: "#/components/schemas/SecondaryIdentifier"
        check-in-desks:
          type: string
          description: Check-in desks.
          example: Check-in desk 11, Check-in desk 12
      description: Entity for Business Events for aircraft check-in desks assignment to flight.
    EventMeta:
      type: object
      properties:
        created-at:
          type: string
          description: Timestamp when event was first created in DH, in case of REST call, the timestamp of REST call, in case iof entry be MQTT, first processing in DH.
          format: date-time
          readOnly: true
        created-by:
          $ref: "#/components/schemas/User"
        modified-count:
          type: integer
          description: Number of modifications in DH. Not set if never modified.
          format: int64
          readOnly: true
        modified-at:
          type: string
          description: Timestamp of last modification in DH, for Events this is the timestamp when enrichment was added, not set otherwise.
          format: date-time
          readOnly: true
      description: Metadata added by DH to events.
      readOnly: true
    FlightAircraftAllocationEvent:
      required:
        - aircraft-registration
        - aircraft-type
        - event-time
        - event-type
        - identifier
        - source
      type: object
      properties:
        meta:
          $ref: "#/components/schemas/EventMeta"
        event-type:
          type: string
          description: Type of event for the concrete subclass.
          enum:
            - AIRCRAFT_ALLOCATION_EVENT
        event-time:
          type: string
          description: Timestamp when the event occurred in UTC.
          format: date-time
        location:
          type: string
          description: Location id where the event occured.
          example: TRA_12
        source:
          type: string
          description: System generating the event.
          example: Scanner TRA_12
        identifier:
          $ref: "#/components/schemas/FlightLegIdentifier"
        secondary-identifiers:
          uniqueItems: true
          type: array
          description: Additionally identifiers used by BHS etc.
          items:
            $ref: "#/components/schemas/SecondaryIdentifier"
        aircraft-type:
          type: string
          description: Aircraft type.
          example: A320
        aircraft-registration:
          type: string
          description: Registration number of aircraft.
      description: Entity for Business Events for aircraft assignment to flight.
    FlightCancelledEvent:
      required:
        - event-time
        - event-type
        - identifier
        - source
      type: object
      properties:
        meta:
          $ref: "#/components/schemas/EventMeta"
        event-type:
          type: string
          description: Type of event for the concrete subclass.
          enum:
            - FLIGHT_CANCELLED_EVENT
        event-time:
          type: string
          description: Timestamp when the event occurred in UTC.
          format: date-time
        location:
          type: string
          description: Location id where the event occured.
          example: TRA_12
        source:
          type: string
          description: System generating the event.
          example: Scanner TRA_12
        identifier:
          $ref: "#/components/schemas/FlightLegIdentifier"
        secondary-identifiers:
          uniqueItems: true
          type: array
          description: Additionally identifiers used by BHS etc.
          items:
            $ref: "#/components/schemas/SecondaryIdentifier"
      description: Entity for Business Events for cancellation of flight.
    FlightEvent:
      required:
        - event-time
        - event-type
        - identifier
        - source
      type: object
      properties:
        meta:
          $ref: "#/components/schemas/EventMeta"
        event-type:
          type: string
          description: Type of event, must match the type defined for the concrete subclass.
        event-time:
          type: string
          description: Timestamp when the event occurred in UTC.
          format: date-time
        location:
          type: string
          description: Location id where the event occured.
          example: TRA_12
        source:
          type: string
          description: System generating the event.
          example: Scanner TRA_12
        identifier:
          $ref: "#/components/schemas/FlightLegIdentifier"
        secondary-identifiers:
          uniqueItems: true
          type: array
          description: Additionally identifiers used by BHS etc.
          items:
            $ref: "#/components/schemas/SecondaryIdentifier"
      description: Entity for Business Events for flights. Always use one of the subtypes.
      discriminator:
        propertyName: event-type
      oneOf:
        - $ref: "#/components/schemas/FlightScheduledEvent"
        - $ref: "#/components/schemas/FlightAircraftAllocationEvent"
        - $ref: "#/components/schemas/FlightTimeEvent"
        - $ref: "#/components/schemas/FlightCancelledEvent"
        - $ref: "#/components/schemas/GateResourceEvent"
        - $ref: "#/components/schemas/AircraftParkingPositionResourceEvent"
        - $ref: "#/components/schemas/AircraftTerminalResourceEvent"
        - $ref: "#/components/schemas/BaggageClaimUnitResourceEvent"
        - $ref: "#/components/schemas/BaggageMakeUpBeltResourceEvent"
        - $ref: "#/components/schemas/BaggageTransferLateralResourceEvent"
        - $ref: "#/components/schemas/CheckInDesksResourceEvent"
    FlightLeg:
      required:
        - id
        - identifier
        - is-international
        - state
      type: object
      properties:
        meta:
          $ref: "#/components/schemas/ObjectMeta"
        id:
          type: string
          description: The ID of flight leg in ADH.
        identifier:
          $ref: "#/components/schemas/FlightLegIdentifier"
        secondary-identifiers:
          uniqueItems: true
          type: array
          description: Additional identifiers for the flight leg used by BHS etc.
          items:
            $ref: "#/components/schemas/SecondaryIdentifier"
        codeshares:
          type: array
          description: Codeshare flight numbers.
          items:
            $ref: "#/components/schemas/FlightLegIdentifier"
        flight-segments:
          type: array
          description: Flight segments.
          items:
            $ref: "#/components/schemas/FlightSegment"
        outbound-resources:
          $ref: "#/components/schemas/AirportResources"
        inbound-resources:
          $ref: "#/components/schemas/AirportResources"
        milestones:
          $ref: "#/components/schemas/Milestones"
        aircraft:
          $ref: "#/components/schemas/Aircraft"
        is-international:
          type: boolean
          description: Indicates whether it is a domestic or an international flight leg.
        state:
          type: string
          description: Operational state of flight leg.
          enum:
            - SCHEDULED
            - CANCELLED
            - OFF_BLOCK
            - DEPARTED
            - LANDED
            - IN_BLOCK
      description: Object holding the state of a flight leg.
    FlightLegIdentifier:
      required:
        - carrier
        - destination-iata-code
        - flight-number
        - identifier-string
        - origin-date
        - origin-iata-code
      type: object
      properties:
        carrier:
          type: string
          description: 2-digit IATA code of operating carrier.
          example: ZZ
        flight-number:
          type: string
          description: The flight number of the operating carrier. Should contain not more than 4 chars and must not include whitespaces
          example: "997"
        operational-suffix:
          type: string
          description: Used to distinguish two flights having the same flight number and departing from their respective origin stations on the same date.
          example: B
        origin-date:
          type: string
          description: UTC scheduled date of departure of the first leg of the flight. Must be between 2010-01-01 and 2210-01-01.
          format: date
        origin-iata-code:
          type: string
          description: 3-digit IATA code of origin airport.
          example: AAA
        identifier-string:
          type: string
          description: Automatically generated unique flight ID using format CARRIERFLIGHTNUMBER-DATE-ORIGIN-DESTINATION.
        destination-iata-code:
          type: string
          description: 3-digit IATA code of destination airport.
          example: ZZZ
      description: Object holding identifying information for a flight leg.
    FlightScheduledEvent:
      required:
        - event-time
        - event-type
        - identifier
        - is-international
        - sibt
        - sobt
        - source
      type: object
      properties:
        meta:
          $ref: "#/components/schemas/EventMeta"
        event-type:
          type: string
          description: Type of event for the concrete subclass.
          enum:
            - FLIGHT_SCHEDULED_EVENT
        event-time:
          type: string
          description: Timestamp when the event occurred in UTC.
          format: date-time
        location:
          type: string
          description: Location id where the event occured.
          example: TRA_12
        source:
          type: string
          description: System generating the event.
          example: Scanner TRA_12
        identifier:
          $ref: "#/components/schemas/FlightLegIdentifier"
        secondary-identifiers:
          uniqueItems: true
          type: array
          description: Additionally identifiers used by BHS etc.
          items:
            $ref: "#/components/schemas/SecondaryIdentifier"
        sobt:
          type: string
          description: Scheduled Off-Block time. Must be in range of origin-date minus 1 day and plus 1 day.
          format: date-time
        sibt:
          type: string
          description: Scheduled In-Block time. Must be in range of origin-date  minus 1 day and plus 3 days.
          format: date-time
        aircraft-type:
          type: string
          description: Aircraft type.
          example: A320
        aircraft-registration:
          type: string
          description: Registration number of aircraft.
        is-international:
          type: boolean
          description: Indicates whether is is an domestic or international flight leg
        codeshares:
          type: array
          description: Codeshare flight numbers.
          items:
            $ref: "#/components/schemas/FlightLegIdentifier"
        flight-segments:
          type: array
          description: Flight segments.
          items:
            $ref: "#/components/schemas/FlightSegment"
      description: Entity for Business Events for flight scheduling.
    FlightSegment:
      required:
        - identifier
        - is-international
      type: object
      properties:
        identifier:
          $ref: "#/components/schemas/FlightSegmentIdentifier"
        secondary-identifiers:
          uniqueItems: true
          type: array
          description: Additionally identifiers for the flight segment used by airport systems etc.
          items:
            $ref: "#/components/schemas/SecondaryIdentifier"
        is-international:
          type: boolean
          description: Indicates whether is is a domestic or an international flight segment.
      description: Model for flight segments.
    FlightSegmentIdentifier:
      required:
        - carrier
        - destination-iata-code
        - flight-number
        - identifier-string
        - origin-date
        - origin-iata-code
      type: object
      properties:
        carrier:
          type: string
          description: 2-digit IATA code of operating carrier.
          example: ZZ
        flight-number:
          type: string
          description: The flight number of the operating carrier. Should contain not more than 4 chars and must not include whitespaces
          example: "997"
        operational-suffix:
          type: string
          description: Used to distinguish two flights having the same flight number and departing from their respective origin stations on the same date.
          example: B
        origin-date:
          type: string
          description: UTC scheduled date of departure of the first leg of the flight. Must be between 2010-01-01 and 2210-01-01.
          format: date
        origin-iata-code:
          type: string
          description: 3-digit IATA code of origin airport.
          example: AAA
        destination-iata-code:
          type: string
          description: 3-digit IATA code of destination airport.
          example: ZZZ
        identifier-string:
          type: string
          description: Automatically generated unique flight ID using format CARRIERFLIGHTNUMBER-DATE-ORIGIN-DESTINATION.
      description: Object holding identifying information for a flight segment.
    FlightTime:
      required:
        - milestone
        - time-kind
        - timestamp
      type: object
      properties:
        milestone:
          type: string
          description: Milestone this time belongs to.
          enum:
            - LDT
            - IBT
            - GTO
            - GTC
            - OBT
            - TOT
        time-kind:
          type: string
          description: Time kind this time belongs to.
          enum:
            - SCHEDULED
            - ESTIMATED
            - ACTUAL
        timestamp:
          type: string
          description: Timestamp of this time in UTC. Must be in range of origin-date minus 1 day and plus 7 days.
          format: date-time
      description: Defines the flight time for a milestone and type.
    FlightTimeEvent:
      required:
        - event-time
        - event-type
        - flight-times
        - identifier
        - source
      type: object
      properties:
        meta:
          $ref: "#/components/schemas/EventMeta"
        event-type:
          type: string
          description: Type of event for the concrete subclass.
          enum:
            - FLIGHT_TIME_EVENT
        event-time:
          type: string
          description: Timestamp when the event occurred in UTC.
          format: date-time
        location:
          type: string
          description: Location id where the event occured.
          example: TRA_12
        source:
          type: string
          description: System generating the event.
          example: Scanner TRA_12
        identifier:
          $ref: "#/components/schemas/FlightLegIdentifier"
        secondary-identifiers:
          uniqueItems: true
          type: array
          description: Additionally identifiers used by BHS etc.
          items:
            $ref: "#/components/schemas/SecondaryIdentifier"
        flight-times:
          type: array
          description: List of flight times to set or update.
          items:
            $ref: "#/components/schemas/FlightTime"
      description: Entity for Business Events for flight times setting and update.
    Milestones:
      type: object
      properties:
        gto:
          $ref: "#/components/schemas/MilestoneTimes"
        gtc:
          $ref: "#/components/schemas/MilestoneTimes"
        obt:
          $ref: "#/components/schemas/MilestoneTimes"
        tot:
          $ref: "#/components/schemas/MilestoneTimes"
        ldt:
          $ref: "#/components/schemas/MilestoneTimes"
        ibt:
          $ref: "#/components/schemas/MilestoneTimes"
      description: Milestone times at departure and arrival, i.e. off-block, take-off, landing, in-block.
    MilestoneTimes:
      type: object
      properties:
        scheduled:
          type: string
          description: Scheduled time for milestone.
          format: date-time
        estimated:
          type: string
          description: Estimated time for milestone.
          format: date-time
        actual:
          type: string
          description: Actual time for milestone.
          format: date-time
      description: In-block time at destination airport of flight leg.
    GateResourceEvent:
      required:
        - departure-or-arrival
        - event-time
        - event-type
        - gates
        - identifier
        - source
      type: object
      properties:
        meta:
          $ref: "#/components/schemas/EventMeta"
        event-type:
          type: string
          description: Type of event for the concrete subclass.
          enum:
            - GATE_RESOURCE_EVENT
        event-time:
          type: string
          description: Timestamp when the event occurred in UTC.
          format: date-time
        location:
          type: string
          description: Location id where the event occured.
          example: TRA_12
        source:
          type: string
          description: System generating the event.
          example: Scanner TRA_12
        identifier:
          $ref: "#/components/schemas/FlightLegIdentifier"
        secondary-identifiers:
          uniqueItems: true
          type: array
          description: Additionally identifiers used by BHS etc.
          items:
            $ref: "#/components/schemas/SecondaryIdentifier"
        departure-or-arrival:
          type: string
          description: Indicator for departure or arrival related information.
          enum:
            - DEPARTURE
            - ARRIVAL
        gates:
          uniqueItems: true
          type: array
          description: Passenger gates.
          items:
            type: string
            description: Passenger gates.
      description: Entity for Business Events for passenger gate assignment to flight.
    ObjectMeta:
      type: object
      properties:
        created-at:
          type: string
          description: Timestamp when object was first created in DH.
          format: date-time
          readOnly: true
        created-by:
          $ref: "#/components/schemas/User"
        created-event-type:
          type: string
          description: Event-type of event which caused the object to be created.
          readOnly: true
        created-event-time:
          type: string
          description: Event-time of event which caused the object to be created.
          format: date-time
          readOnly: true
        modified-count:
          type: integer
          description: Number of modifications in DH.
          format: int64
          readOnly: true
        modified-at:
          type: string
          description: Timestamp of last modification in DH.
          format: date-time
          readOnly: true
        modified-by:
          $ref: "#/components/schemas/User"
        modified-event-type:
          type: string
          description: Event-type of event which caused the object to be modified.
          readOnly: true
        modified-event-time:
          type: string
          description: Event-time of event which caused the object to be modified.
          format: date-time
          readOnly: true
      description: Metadata of DH objects.
      readOnly: true
    SecondaryIdentifier:
      required:
        - created
        - identifier
        - source
      type: object
      properties:
        identifier:
          type: string
          description: Secondary identifier .
        created:
          type: string
          description: Timestamp of creation of secondary identifier in UTC.
          format: date-time
        source:
          type: string
          description: Source creating the secondary identifier.
      description: Additional identifiers for flight legs or segments used by airport systems etc.
    User:
      type: object
      properties:
        user-id:
          type: string
          description: Unique user id.
          readOnly: true
        user-name:
          type: string
          description: Readable user name
          readOnly: true
      description: Metadata of DH objects.
      readOnly: true
