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

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

  <xs:element name="fidsData" type="fidsDataV1"/>

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

  <xs:complexType name="fidsResponseV1">
    <xs:sequence>
      <xs:element ref="fidsData" minOccurs="0" maxOccurs="unbounded"/>
      <xs:element name="error" type="apiResponseError" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="fidsDataV1">
    <xs:sequence>
      <xs:element name="flightId" type="xs:string" minOccurs="0"/>
      <xs:element name="lastUpdatedTime" type="xs:string" minOccurs="0"/>
      <xs:element name="lastUpdatedTimeUtc" type="xs:string" minOccurs="0"/>
      <xs:element name="lastUpdatedDate" type="xs:string" minOccurs="0"/>
      <xs:element name="lastUpdatedDateUtc" type="xs:string" minOccurs="0"/>
      <xs:element name="dayOffset" type="xs:int" minOccurs="0"/>
      <xs:element name="statusCode" type="xs:string" minOccurs="0"/>
      <xs:element name="airlineName" type="xs:string" minOccurs="0"/>
      <xs:element name="airlineCode" type="xs:string" minOccurs="0"/>
      <xs:element name="flightNumber" type="xs:string" minOccurs="0"/>
      <xs:element name="airlineLogoUrlPng" type="xs:string" minOccurs="0"/>
      <xs:element name="airlineLogoUrlSvg" type="xs:string" minOccurs="0"/>
      <xs:element name="isCodeshare" type="xs:boolean" minOccurs="0"/>
      <xs:element name="operatedFlightNumber" type="xs:string" minOccurs="0"/>
      <xs:element name="operatingAirlineName" type="xs:string" minOccurs="0"/>
      <xs:element name="operatingAirlineCode" type="xs:string" minOccurs="0"/>
      <xs:element name="originAirportName" type="xs:string" minOccurs="0"/>
      <xs:element name="originAirportCode" type="xs:string" minOccurs="0"/>
      <xs:element name="originCity" type="xs:string" minOccurs="0"/>
      <xs:element name="originFamiliarName" type="xs:string" minOccurs="0"/>
      <xs:element name="originStateCode" type="xs:string" minOccurs="0"/>
      <xs:element name="originCountryCode" type="xs:string" minOccurs="0"/>
      <xs:element name="destinationAirportName" type="xs:string" minOccurs="0"/>
      <xs:element name="destinationAirportCode" type="xs:string" minOccurs="0"/>
      <xs:element name="destinationCity" type="xs:string" minOccurs="0"/>
      <xs:element name="destinationFamiliarName" type="xs:string" minOccurs="0"/>
      <xs:element name="destinationStateCode" type="xs:string" minOccurs="0"/>
      <xs:element name="destinationCountryCode" type="xs:string" minOccurs="0"/>
      <xs:element name="flight" type="xs:string" minOccurs="0"/>
      <xs:element name="delayed" type="xs:boolean" minOccurs="0"/>
      <xs:element name="remarks" type="xs:string" minOccurs="0"/>
      <xs:element name="remarksWithTime" type="xs:string" minOccurs="0"/>
      <xs:element name="airportCode" type="xs:string" minOccurs="0"/>
      <xs:element name="airportName" type="xs:string" minOccurs="0"/>
      <xs:element name="city" type="xs:string" minOccurs="0"/>
      <xs:element name="familiarName" type="xs:string" minOccurs="0"/>
      <xs:element name="gate" type="xs:string" minOccurs="0"/>
      <xs:element name="terminal" type="xs:string" minOccurs="0"/>
      <xs:element name="scheduledTime" type="xs:string" minOccurs="0"/>
      <xs:element name="estimatedTime" type="xs:string" minOccurs="0"/>
      <xs:element name="actualTime" type="xs:string" minOccurs="0"/>
      <xs:element name="currentTime" type="xs:string" minOccurs="0"/>
      <xs:element name="scheduledGateTime" type="xs:string" minOccurs="0"/>
      <xs:element name="estimatedGateTime" type="xs:string" minOccurs="0"/>
      <xs:element name="actualGateTime" type="xs:string" minOccurs="0"/>
      <xs:element name="currentGateTime" type="xs:string" minOccurs="0"/>
      <xs:element name="codesharesAsNames" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="codeShareAsName" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="codesharesAsCodes" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="codeShareAsCode" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="uplineAirportNames" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="uplineAirportName" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="uplineAirportCodes" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="uplineAirportCode" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="downlineAirportNames" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="downlineAirportName" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="downlineAirportCodes" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="downlineAirportCode" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="weather" type="xs:string" minOccurs="0"/>
      <xs:element name="weatherGraphic" type="xs:string" minOccurs="0"/>
      <xs:element name="temperatureC" type="xs:double" minOccurs="0"/>
      <xs:element name="temperatureF" type="xs:double" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="apiResponseError">
    <xs:sequence>
      <xs:element name="httpStatusCode" type="xs:int"/>
      <xs:element name="errorCode" type="xs:string" minOccurs="0"/>
      <xs:element name="errorId" type="xs:string" minOccurs="0"/>
      <xs:element name="errorMessage" type="xs:string" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
</xs:schema>

