XML Schema


  
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0">

  <xs:element name="FlightRecordResponse" type="flightRecord"/>

  <xs:element name="PingRequest" type="pingRequest"/>

  <xs:element name="PingResponse" type="pingResponse"/>

  <xs:element name="marketingCarrier" type="marketingCarrier"/>

  <xs:element name="response" type="flightRecordResponse"/>

  <xs:element name="update" type="flightRecordUpdate"/>

  <xs:complexType name="ErrorType">
    <xs:sequence/>
    <xs:attribute name="description" type="xs:string"/>
    <xs:attribute name="code" type="xs:int" use="required"/>
  </xs:complexType>

  <xs:complexType name="flightRecordResponse">
    <xs:complexContent>
      <xs:extension base="baseResponse">
        <xs:sequence>
          <xs:element minOccurs="0" name="airportCode" type="xs:string"/>
          <xs:element minOccurs="0" name="airlineCode" type="xs:string"/>
          <xs:element minOccurs="0" name="flightNumber" type="xs:string"/>
          <xs:element minOccurs="0" name="flightDate" type="xs:string"/>
          <xs:element minOccurs="0" name="adi" type="xs:string"/>
          <xs:element minOccurs="0" name="subscribedForUpdates" type="xs:boolean"/>
          <xs:element maxOccurs="unbounded" minOccurs="0" name="flightRecord" type="flightRecord"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType abstract="true" name="baseResponse">
    <xs:sequence>
      <xs:element minOccurs="0" name="errors" type="errors"/>
      <xs:element name="success" type="xs:boolean"/>
    </xs:sequence>
    <xs:attribute name="token" type="xs:string"/>
    <xs:attribute name="version" type="xs:string"/>
  </xs:complexType>

  <xs:complexType name="flightRecord">
    <xs:sequence>
      <xs:element minOccurs="0" name="actual" type="xs:string"/>
      <xs:element minOccurs="0" name="adi" type="xs:string"/>
      <xs:element minOccurs="0" name="aircraft" type="xs:string"/>
      <xs:element minOccurs="0" name="airportCode" type="xs:string"/>
      <xs:element minOccurs="0" name="arrivalDeparture" type="xs:string"/>
      <xs:element minOccurs="0" name="cityCode" type="xs:string"/>
      <xs:element minOccurs="0" name="city" type="xs:string"/>
      <xs:element minOccurs="0" name="duration" type="xs:string"/>
      <xs:element minOccurs="0" name="estimated" type="xs:string"/>
      <xs:element minOccurs="0" name="claim" type="xs:string"/>
      <xs:element minOccurs="0" name="gate" type="xs:string"/>
      <xs:element minOccurs="0" name="gateRemark" type="xs:string"/>
      <xs:element minOccurs="0" name="gateRemarkText" type="xs:string"/>
      <xs:element minOccurs="0" name="id" type="xs:string"/>
      <xs:element minOccurs="0" name="marketingCarriers">
        <xs:complexType>
          <xs:sequence>
            <xs:element maxOccurs="unbounded" minOccurs="0" name="marketingCarrier" nillable="true" type="marketingCarrier"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element minOccurs="0" name="operatingCarrier" type="flight"/>
      <xs:element minOccurs="0" name="operationDate" type="xs:string"/>
      <xs:element minOccurs="0" name="scheduled" type="xs:string"/>
      <xs:element minOccurs="0" name="status" type="xs:string"/>
      <xs:element minOccurs="0" name="statusText" type="xs:string"/>
      <xs:element minOccurs="0" name="tailNumber" type="xs:string"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="marketingCarrier">
    <xs:complexContent>
      <xs:extension base="flight">
        <xs:sequence/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="flight">
    <xs:sequence>
      <xs:element minOccurs="0" name="airline" type="xs:string"/>
      <xs:element minOccurs="0" name="airlineCode" type="xs:string"/>
      <xs:element minOccurs="0" name="flightNumber" type="xs:string"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="errors">
    <xs:sequence>
      <xs:element maxOccurs="unbounded" name="error" type="ErrorType"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="pingRequest">
    <xs:sequence/>
    <xs:attribute name="Message" type="xs:string"/>
    <xs:attribute name="PartitionCode" type="xs:string"/>
  </xs:complexType>

  <xs:complexType name="flightRecordUpdate">
    <xs:complexContent>
      <xs:extension base="baseResponse">
        <xs:sequence>
          <xs:element minOccurs="0" name="updateField" type="statusField"/>
          <xs:element minOccurs="0" name="previous" type="xs:string"/>
          <xs:element minOccurs="0" name="current" type="xs:string"/>
          <xs:element maxOccurs="unbounded" minOccurs="0" name="flightRecord" type="flightRecord"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="pingResponse">
    <xs:sequence/>
    <xs:attribute name="DateTime" type="xs:string"/>
    <xs:attribute name="Env" type="xs:string"/>
    <xs:attribute name="IpAddress" type="xs:string"/>
    <xs:attribute name="PartitionCode" type="xs:string"/>
    <xs:attribute name="Version" type="xs:string"/>
  </xs:complexType>

  <xs:simpleType name="statusField">
    <xs:restriction base="xs:string">
      <xs:enumeration value="GATE"/>
      <xs:enumeration value="ACTUAL"/>
      <xs:enumeration value="ESTIMATED"/>
      <xs:enumeration value="AIRCRAFT"/>
      <xs:enumeration value="STATUS"/>
    </xs:restriction>
  </xs:simpleType>
</xs:schema>