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

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

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

  <xs:complexType name="schedulesResponse" final="extension restriction">
    <xs:sequence>
      <xs:element name="scheduledFlights" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="scheduledFlight" type="scheduledFlight" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="appendix" type="appendixWithWrapper" minOccurs="0"/>
      <xs:element name="error" type="apiResponseError" minOccurs="0"/>
      <xs:element name="request" type="interpretedRequest" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="scheduledFlight" final="extension restriction">
    <xs:sequence>
      <xs:element name="carrierFsCode" type="xs:string" minOccurs="0"/>
      <xs:element name="carrier" type="airline" minOccurs="0"/>
      <xs:element name="flightNumber" type="xs:string" minOccurs="0"/>
      <xs:element name="brand" type="xs:string" minOccurs="0"/>
      <xs:element name="departureAirport" type="airport" minOccurs="0"/>
      <xs:element name="departureAirportFsCode" type="xs:string" minOccurs="0"/>
      <xs:element name="arrivalAirport" type="airport" minOccurs="0"/>
      <xs:element name="arrivalAirportFsCode" type="xs:string" minOccurs="0"/>
      <xs:element name="stops" type="xs:int" minOccurs="0"/>
      <xs:element name="departureTerminal" type="xs:string" minOccurs="0"/>
      <xs:element name="arrivalTerminal" type="xs:string" minOccurs="0"/>
      <xs:element name="departureTime" type="xs:string" minOccurs="0"/>
      <xs:element name="arrivalTime" type="xs:string" minOccurs="0"/>
      <xs:element name="flightEquipmentIataCode" type="xs:string" minOccurs="0"/>
      <xs:element name="flightEquipment" type="equipment" minOccurs="0"/>
      <xs:element name="isCodeshare" type="xs:boolean" minOccurs="0"/>
      <xs:element name="isWetlease" type="xs:boolean" minOccurs="0"/>
      <xs:element name="serviceType" type="xs:string" minOccurs="0"/>
      <xs:element name="serviceClasses" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="serviceClass" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="trafficRestrictions" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="trafficRestriction" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="operator" type="scheduledOperator" minOccurs="0"/>
      <xs:element name="codeshares" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="codeshare" type="scheduledCodeshare" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="wetleaseOperator" type="airline" minOccurs="0"/>
      <xs:element name="wetleaseOperatorFsCode" type="xs:string" minOccurs="0"/>
      <xs:element name="referenceCode" type="xs:string" minOccurs="0"/>
      <xs:element name="elapsedTime" type="xs:int" minOccurs="0"/>
      <xs:element name="effectiveDate" type="localDate" minOccurs="0"/>
      <xs:element name="discontinueDate" type="localDate" minOccurs="0"/>
      <xs:element name="isOperatingMonday" type="xs:boolean" minOccurs="0"/>
      <xs:element name="isOperatingTuesday" type="xs:boolean" minOccurs="0"/>
      <xs:element name="isOperatingWednesday" type="xs:boolean" minOccurs="0"/>
      <xs:element name="isOperatingThursday" type="xs:boolean" minOccurs="0"/>
      <xs:element name="isOperatingFriday" type="xs:boolean" minOccurs="0"/>
      <xs:element name="isOperatingSaturday" type="xs:boolean" minOccurs="0"/>
      <xs:element name="isOperatingSunday" type="xs:boolean" minOccurs="0"/>
      <xs:element name="departureCountryCodeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="departureRegionCodeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="departureStateProvinceCodeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="departureCityCodeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="passengerDepartureTime" type="localTime" minOccurs="0"/>
      <xs:element name="aircraftDepartureTime" type="localTime" minOccurs="0"/>
      <xs:element name="departureUtcVariance" type="xs:string" minOccurs="0"/>
      <xs:element name="arrivalStationCodeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="arrivalCountryCodeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="arrivalRegionCodeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="arrivalStateProvinceCodeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="arrivalCityCodeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="passengerArrivalTime" type="localTime" minOccurs="0"/>
      <xs:element name="aircraftArrivalTime" type="localTime" minOccurs="0"/>
      <xs:element name="arrivalUtcVariance" type="xs:string" minOccurs="0"/>
      <xs:element name="equipmentSubtypeCodeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="equipmentGroupCodeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="bookingClasses" type="xs:string" minOccurs="0"/>
      <xs:element name="arrivalDayIndicator" type="xs:int" minOccurs="0"/>
      <xs:element name="numberOfIntermediateStops" type="xs:int" minOccurs="0"/>
      <xs:element name="intermediateStopStationCodesIata" type="xs:string" minOccurs="0"/>
      <xs:element name="intermediateStopRestrictions" type="xs:string" minOccurs="0"/>
      <xs:element name="isEquipmentChange" type="xs:boolean" minOccurs="0"/>
      <xs:element name="equipmentCodesAcrossSector" type="xs:string" minOccurs="0"/>
      <xs:element name="mealCodes" type="xs:string" minOccurs="0"/>
      <xs:element name="flightDurationLessLayover" type="xs:int" minOccurs="0"/>
      <xs:element name="flightDistance" type="xs:int" minOccurs="0"/>
      <xs:element name="flightDistanceThroughIndividualLegs" type="xs:int" minOccurs="0"/>
      <xs:element name="layoverTime" type="xs:int" minOccurs="0"/>
      <xs:element name="itineraryVariationIdentifier" type="xs:int" minOccurs="0"/>
      <xs:element name="firstLegNumber" type="xs:int" minOccurs="0"/>
      <xs:element name="inflightServiceCodes" type="xs:string" minOccurs="0"/>
      <xs:element name="codeshareInfo" type="xs:string" minOccurs="0"/>
      <xs:element name="aircraftOwnerInformation" type="xs:string" minOccurs="0"/>
      <xs:element name="operationalSuffix" type="xs:string" minOccurs="0"/>
      <xs:element name="firstClassSeats" type="xs:int" minOccurs="0"/>
      <xs:element name="businessClassSeats" type="xs:int" minOccurs="0"/>
      <xs:element name="premiumEconomySeats" type="xs:int" minOccurs="0"/>
      <xs:element name="economyClassSeats" type="xs:int" minOccurs="0"/>
      <xs:element name="totalSeats" type="xs:int" minOccurs="0"/>
      <xs:element name="aircraftTonnage" type="xs:int" minOccurs="0"/>
      <xs:element name="aircraftConfigurationVersion" type="xs:string" minOccurs="0"/>
      <xs:element name="equipmentChangeStops" type="xs:string" minOccurs="0"/>
      <xs:element name="mctIndicator" type="xs:string" minOccurs="0"/>
      <xs:element name="intermediateStopArrivalTime" type="xs:string" minOccurs="0"/>
      <xs:element name="intermediateStopDepartureTime" type="xs:string" minOccurs="0"/>
      <xs:element name="intermediateStopNextDayIndicator" type="xs:string" minOccurs="0"/>
      <xs:element name="logicalToPhysicalLegKey" type="xs:string" minOccurs="0"/>
      <xs:element name="releaseSellDate" type="localDate" minOccurs="0"/>
      <xs:element name="secureFlightIndicator" type="xs:string" minOccurs="0"/>
      <xs:element name="aircraftOwner" type="xs:string" minOccurs="0"/>
      <xs:element name="cockpitCrewEmployer" type="xs:string" minOccurs="0"/>
      <xs:element name="cabinCrewEmployer" type="xs:string" minOccurs="0"/>
      <xs:element name="onwardFlight" type="xs:string" minOccurs="0"/>
      <xs:element name="automatedCheckIn" type="xs:string" minOccurs="0"/>
      <xs:element name="dateVariation" type="xs:string" minOccurs="0"/>
      <xs:element name="dei011" type="xs:string" minOccurs="0"/>
      <xs:element name="dei201" type="xs:boolean" minOccurs="0"/>
      <xs:element name="dei299" type="xs:string" minOccurs="0"/>
      <xs:element name="dei501" type="xs:string" minOccurs="0"/>
      <xs:element name="dei502" type="xs:string" minOccurs="0"/>
      <xs:element name="dei503" type="xs:string" minOccurs="0"/>
      <xs:element name="dei505" type="xs:string" minOccurs="0"/>
      <xs:element name="physicalSectorizedIdKey" type="xs:string" minOccurs="0"/>
      <xs:element name="sectorizedId" type="xs:int" minOccurs="0"/>
      <xs:element name="publishDate" type="localDate" minOccurs="0"/>
      <xs:element name="carrierName" type="xs:string" minOccurs="0"/>
      <xs:element name="carrierShortName" type="xs:string" minOccurs="0"/>
      <xs:element name="carrierCategoryTypeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="reservationPhoneNumber" type="xs:string" minOccurs="0"/>
      <xs:element name="carrierUrl" type="xs:string" minOccurs="0"/>
      <xs:element name="equipmentCodeIcao" type="xs:string" minOccurs="0"/>
      <xs:element name="equipmentDescription" type="xs:string" minOccurs="0"/>
      <xs:element name="equipmentAircraftName" type="xs:string" minOccurs="0"/>
      <xs:element name="equipmentMaxAirspeed" type="xs:int" minOccurs="0"/>
      <xs:element name="equipmentAircraftType" type="xs:string" minOccurs="0"/>
      <xs:element name="equipmentIsWidebodyFuselage" type="xs:boolean" minOccurs="0"/>
      <xs:element name="departureStationCityCodeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="departureStationCodeIcao" type="xs:string" minOccurs="0"/>
      <xs:element name="departureStationName" type="xs:string" minOccurs="0"/>
      <xs:element name="departureStationCityName" type="xs:string" minOccurs="0"/>
      <xs:element name="departureStationCityCodeIcao" type="xs:string" minOccurs="0"/>
      <xs:element name="departureStationRegionCodeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="departureStationCountryCodeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="departureStationLatitude" type="xs:string" minOccurs="0"/>
      <xs:element name="departureStationLongitude" type="xs:string" minOccurs="0"/>
      <xs:element name="departureStationTimeZoneCodeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="departureStationTypeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="arrivalStationCityCodeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="arrivalStationCodeIcao" type="xs:string" minOccurs="0"/>
      <xs:element name="arrivalStationName" type="xs:string" minOccurs="0"/>
      <xs:element name="arrivalStationCityName" type="xs:string" minOccurs="0"/>
      <xs:element name="arrivalStationCityCodeIcao" type="xs:string" minOccurs="0"/>
      <xs:element name="arrivalStationRegionCodeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="arrivalStationCountryCodeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="arrivalStationLatitude" type="xs:string" minOccurs="0"/>
      <xs:element name="arrivalStationLongitude" type="xs:string" minOccurs="0"/>
      <xs:element name="arrivalStationTimeZoneCodeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="arrivalStationTypeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="departureMetroCodeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="departureMetroName" type="xs:string" minOccurs="0"/>
      <xs:element name="departureMetroCountryCodeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="departureMetroStateProvinceCodeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="arrivalMetroCodeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="arrivalMetroName" type="xs:string" minOccurs="0"/>
      <xs:element name="arrivalMetroCountryCodeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="arrivalMetroStateProvinceCodeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="departureCountryNameIata" type="xs:string" minOccurs="0"/>
      <xs:element name="arrivalCountryNameIata" type="xs:string" minOccurs="0"/>
      <xs:element name="departureWorldAreaCodeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="arrivalWorldAreaCodeIata" type="xs:string" minOccurs="0"/>
      <xs:element name="daysOfOperation" type="xs:string" minOccurs="0"/>
      <xs:element name="totalFrequency" type="xs:int" minOccurs="0"/>
      <xs:element name="weeklyFrequency" type="xs:int" minOccurs="0"/>
      <xs:element name="totalSeatMiles" type="xs:long" minOccurs="0"/>
      <xs:element name="totalSeatKm" type="xs:long" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="airline" final="extension restriction">
    <xs:sequence>
      <xs:element name="fs" type="xs:string" minOccurs="0"/>
      <xs:element name="iata" type="xs:string" minOccurs="0"/>
      <xs:element name="icao" type="xs:string" minOccurs="0"/>
      <xs:element name="name" type="xs:string" minOccurs="0"/>
      <xs:element name="phoneNumber" type="xs:string" minOccurs="0"/>
      <xs:element name="active" type="xs:boolean"/>
      <xs:element name="dateFrom" type="xs:string" minOccurs="0"/>
      <xs:element name="dateTo" type="xs:string" minOccurs="0"/>
      <xs:element name="category" type="xs:string" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="airport" final="extension restriction">
    <xs:sequence>
      <xs:element name="fs" type="xs:string" minOccurs="0"/>
      <xs:element name="iata" type="xs:string" minOccurs="0"/>
      <xs:element name="icao" type="xs:string" minOccurs="0"/>
      <xs:element name="faa" type="xs:string" minOccurs="0"/>
      <xs:element name="name" type="xs:string" minOccurs="0"/>
      <xs:element name="street1" type="xs:string" minOccurs="0"/>
      <xs:element name="street2" type="xs:string" minOccurs="0"/>
      <xs:element name="city" type="xs:string" minOccurs="0"/>
      <xs:element name="cityCode" type="xs:string" minOccurs="0"/>
      <xs:element name="district" type="xs:string" minOccurs="0"/>
      <xs:element name="stateCode" type="xs:string" minOccurs="0"/>
      <xs:element name="postalCode" type="xs:string" minOccurs="0"/>
      <xs:element name="countryCode" type="xs:string" minOccurs="0"/>
      <xs:element name="countryName" type="xs:string" minOccurs="0"/>
      <xs:element name="regionName" type="xs:string" minOccurs="0"/>
      <xs:element name="regionIata" type="xs:string" minOccurs="0"/>
      <xs:element name="timeZoneRegionName" type="xs:string" minOccurs="0"/>
      <xs:element name="weatherZone" type="xs:string" minOccurs="0"/>
      <xs:element name="localTime" type="xs:string" minOccurs="0"/>
      <xs:element name="utcOffsetHours" type="xs:double"/>
      <xs:element name="latitude" type="xs:double"/>
      <xs:element name="longitude" type="xs:double"/>
      <xs:element name="elevationFeet" type="xs:int" minOccurs="0"/>
      <xs:element name="classification" type="xs:int"/>
      <xs:element name="active" type="xs:boolean"/>
      <xs:element name="dateFrom" type="xs:string" minOccurs="0"/>
      <xs:element name="dateTo" type="xs:string" minOccurs="0"/>
      <xs:element name="delayIndexUrl" type="xs:string" minOccurs="0"/>
      <xs:element name="weatherUrl" type="xs:string" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="equipment" final="extension restriction">
    <xs:sequence>
      <xs:element name="iata" type="xs:string" minOccurs="0"/>
      <xs:element name="name" type="xs:string" minOccurs="0"/>
      <xs:element name="turboProp" type="xs:boolean" minOccurs="0"/>
      <xs:element name="jet" type="xs:boolean" minOccurs="0"/>
      <xs:element name="widebody" type="xs:boolean" minOccurs="0"/>
      <xs:element name="regional" type="xs:boolean" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="scheduledOperator" final="extension restriction">
    <xs:sequence>
      <xs:element name="carrier" type="airline" minOccurs="0"/>
      <xs:element name="carrierFsCode" type="xs:string" minOccurs="0"/>
      <xs:element name="flightNumber" type="xs:string" minOccurs="0"/>
      <xs:element name="serviceType" type="xs:string" minOccurs="0"/>
      <xs:element name="serviceClasses" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="serviceClass" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="trafficRestrictions" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="trafficRestrictions" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="referenceCode" type="xs:long" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="scheduledCodeshare" final="extension restriction">
    <xs:sequence>
      <xs:element name="carrier" type="airline" minOccurs="0"/>
      <xs:element name="carrierFsCode" type="xs:string" minOccurs="0"/>
      <xs:element name="flightNumber" type="xs:string" minOccurs="0"/>
      <xs:element name="serviceType" type="xs:string" minOccurs="0"/>
      <xs:element name="serviceClasses" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="serviceClass" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="trafficRestrictions" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="trafficRestriction" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="referenceCode" type="xs:long" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="localDate" final="extension restriction">
    <xs:sequence/>
  </xs:complexType>

  <xs:complexType name="localTime" final="extension restriction">
    <xs:sequence/>
  </xs:complexType>

  <xs:complexType name="appendixWithWrapper" final="extension restriction">
    <xs:sequence>
      <xs:element name="airlines" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="airline" type="airline" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="airports" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="airport" type="airport" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="equipments" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element ref="equipment" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

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

  <xs:complexType name="interpretedRequest" final="extension restriction">
    <xs:all>
      <xs:element name="carrier" type="inputParameter" minOccurs="0"/>
      <xs:element name="flightNumber" type="inputParameter" minOccurs="0"/>
      <xs:element name="departing" type="xs:boolean"/>
      <xs:element name="hourOfDay" type="inputParameter" minOccurs="0"/>
      <xs:element name="codeType" type="inputParameter" minOccurs="0"/>
      <xs:element name="url" type="xs:string" minOccurs="0"/>
      <xs:element name="airport" type="inputParameter" minOccurs="0"/>
      <xs:element name="arrivalAirport" type="inputParameter" minOccurs="0"/>
      <xs:element name="departureAirport" type="inputParameter" minOccurs="0"/>
      <xs:element name="date" type="interpretedDateFields" minOccurs="0"/>
    </xs:all>
  </xs:complexType>

  <xs:complexType name="inputParameter">
    <xs:all>
      <xs:element name="airport" type="airport" minOccurs="0"/>
      <xs:element name="airline" type="airline" minOccurs="0"/>
      <xs:element ref="equipment" minOccurs="0"/>
      <xs:element name="fsCode" type="xs:string" minOccurs="0"/>
      <xs:element name="interpreted" type="xs:string" minOccurs="0"/>
      <xs:element name="requestedCode" type="xs:string" minOccurs="0"/>
      <xs:element name="requested" type="xs:string" minOccurs="0"/>
    </xs:all>
  </xs:complexType>

  <xs:complexType name="interpretedDateFields">
    <xs:all>
      <xs:element name="year" type="xs:string" minOccurs="0"/>
      <xs:element name="month" type="xs:string" minOccurs="0"/>
      <xs:element name="day" type="xs:string" minOccurs="0"/>
      <xs:element name="hour" type="xs:string" minOccurs="0"/>
      <xs:element name="minute" type="xs:string" minOccurs="0"/>
      <xs:element name="interpreted" type="xs:string" minOccurs="0"/>
    </xs:all>
  </xs:complexType>
</xs:schema>

