<?xml version="1.0" encoding="UTF-8"?>
 <!--
   FILE INFORMATION 
   Description 
   This schema describes RESTful bindings for Parlay X Web Services, Terminal Status 
    
   Version: 1.0 (1.0)
   Date: 11 Jan 2011 
    
   OMA Permanent Document 
   File: OMA-SUP-XSD_rest_terminalstatus-V1_0-20110111-C
   Type: Text 
      
   Public Reachable Information 
   Path: http://www.openmobilealliance.org/tech/profiles 
   Name: rest_terminalstatus-v1_0.xsd 
      
   NORMATIVE INFORMATION

   Information about this file can be found in the latest revision of the specification
   OMA-TS-ParlayREST_TerminalStatus-V1_0 available at
   http://www.openmobilealliance.org/

   Send comments to technical-comments@mail.openmobilealliance.org
  
   LEGAL DISCLAIMER
   
   Use of this document is subject to all of the terms and conditions
   of the Use Agreement located at
   http://www.openmobilealliance.org/UseAgreement.html,
   provided, however, that section (d) under "Documents - Terms 
   of Use" which states, "no modifications are made to such 
   Documents" does not apply to your use.
   
   The Open Mobile Alliance authorizes you to copy this document, 
   provided that you retain all copyright and other proprietary  
   notices contained in the original materials on any copies of the 
   materials and  that you comply strictly with these terms. This 
   copyright permission does not constitute an endorsement of the 
   products or services. The Open Mobile Alliance assumes no 
   responsibility for errors or omissions in this document.
   
   Each Open Mobile Alliance member has agreed to use reasonable
   endeavors to inform the Open Mobile Alliance in a timely manner of
   Essential IPR as it becomes aware that the Essential IPR is related
   to the prepared or published specification.  However, the members
   do not have an obligation to conduct IPR searches.  The declared
   Essential IPR is publicly available to members and non-members of
   the Open Mobile Alliance and may be found on the "OMA IPR
   Declarations" list at http://www.openmobilealliance.org/ipr.html.
   The Open Mobile Alliance has not conducted an independent IPR review
   of this document and the information contained herein, and makes no
   representations or warranties regarding third party IPR, including
   without limitation patents, copyrights or trade secret rights.  This
   document may contain inventions for which you must obtain licenses
   from third parties before making, using or selling the inventions.
   Defined terms above are set forth in the schedule to the Open Mobile
   Alliance Application Form.
   
   NO REPRESENTATIONS OR WARRANTIES (WHETHER EXPRESS OR IMPLIED) ARE
   MADE BY THE OPEN MOBILE ALLIANCE OR ANY OPEN MOBILE ALLIANCE MEMBER
   OR ITS AFFILIATES REGARDING ANY OF THE IPR'S REPRESENTED ON THE "OMA
   IPR DECLARATIONS" LIST, INCLUDING, BUT NOT LIMITED TO THE ACCURACY,
   COMPLETENESS, VALIDITY OR RELEVANCE OF THE INFORMATION OR WHETHER OR
   NOT SUCH RIGHTS ARE ESSENTIAL OR NON-ESSENTIAL.
   
   THE OPEN MOBILE ALLIANCE IS NOT LIABLE FOR AND HEREBY DISCLAIMS ANY
   DIRECT, INDIRECT, PUNITIVE, SPECIAL, INCIDENTAL, CONSEQUENTIAL, OR
   EXEMPLARY DAMAGES ARISING OUT OF OR IN CONNECTION WITH THE USE OF
   DOCUMENTS AND THE INFORMATION CONTAINED IN THE DOCUMENTS.
   
   Copyright 2011 Open Mobile Alliance Ltd.  All Rights Reserved.
   Used with the permission of the Open Mobile Alliance Ltd. under the
   terms set forth above.   
  -->

  <!--
    CHANGE HISTORY 
    20100505 File created by Sichen Wang, Huawei, based on OMA-TS-ParlayREST_TerminalStatus-V1_0-20100430-D
    20100517 updated based on OMA-TS-ParlayREST_TerminalStatus-V1_0-2010517-D, see CR OMA-ARC-REST-2010-0214R01-INP_TerminalStatus_XSD
    20100820 updated based on OMA-TS-ParlayREST_TerminalStatus-V1_0-2010708-D, see CR OMA-ARC-REST-2010-0409-CR_terminalStatus_xsd_update
    20100830 Updated with the latest OMA legal disclaimer
    20100927 updated based on OMA-TS-ParlayREST_TerminalStatus-V1_0-2010926-D
    20101210 updated based on OMA-TS-ParlayREST_TerminalStatus-V1_0-20101210-D,
    20101217 fixed schemaLocation statememt - removed line pointing to the local file 
	20110111 Candidate approval
  -->

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:common="urn:oma:xml:rest:common:1"
  xmlns="urn:oma:xml:rest:terminalstatus:1"
  targetNamespace="urn:oma:xml:rest:terminalstatus:1" version="1.0">

  <xsd:annotation>
    <xsd:documentation>This schema defines the XML for validating data used in the terminalStatus REST enabler.</xsd:documentation>
  </xsd:annotation>

  <xsd:import namespace="urn:oma:xml:rest:common:1"
    schemaLocation="http://www.openmobilealliance.org/tech/profiles/rest_common-v1_1.xsd"/>

  <xsd:simpleType name="AccessibilityStatus">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="Reachable"/>
      <xsd:enumeration value="Unreachable"/>
      <xsd:enumeration value="Busy"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:complexType name="MobileCountryNetworkCode">
    <xsd:sequence>
      <xsd:element name="mcc" type="xsd:string" maxOccurs="1" minOccurs="1"/>
      <xsd:element name="mnc" type="xsd:string" maxOccurs="1" minOccurs="1"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="TerminalAccessibilityStatus">
    <xsd:sequence>
      <xsd:element name="address" type="xsd:anyURI" maxOccurs="1" minOccurs="1"/>
      <xsd:element name="retrievalStatus" type="common:RetrievalStatus" maxOccurs="1" minOccurs="1"/>
      <xsd:element name="currentAccessibility" type="AccessibilityStatus" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="homeMccMnc" type="MobileCountryNetworkCode" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="errorInformation" type="common:ServiceError" maxOccurs="1" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:element name="terminalAccessibilityStatusList" type="TerminalAccessibilityStatusList"/>

  <xsd:complexType name="TerminalAccessibilityStatusList">
    <xsd:sequence>
      <xsd:element name="accessibility" type="TerminalAccessibilityStatus" maxOccurs="unbounded" minOccurs="1"/>
      <xsd:element name="resourceURL" type="xsd:anyURI" maxOccurs="1" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:simpleType name="RoamingStatus">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="InternationalRoaming"/>
      <xsd:enumeration value="DomesticRoaming"/>
      <xsd:enumeration value="NotRoaming"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:complexType name="TerminalRoamingStatus">
    <xsd:sequence>
      <xsd:element name="address" type="xsd:anyURI" maxOccurs="1" minOccurs="1"/>
      <xsd:element name="retrievalStatus" type="common:RetrievalStatus" maxOccurs="1" minOccurs="1"/>
      <xsd:element name="currentRoaming" type="RoamingStatus" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="servingMccMnc" type="MobileCountryNetworkCode" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="errorInformation" type="common:ServiceError" maxOccurs="1" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:element name="terminalRoamingStatusList" type="TerminalRoamingStatusList"/>

  <xsd:complexType name="TerminalRoamingStatusList">
    <xsd:sequence>
      <xsd:element name="roaming" type="TerminalRoamingStatus" maxOccurs="unbounded" minOccurs="1"/>
      <xsd:element name="resourceURL" type="xsd:anyURI" maxOccurs="1" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:simpleType name="ConnectionType">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="EDGE"/>
      <xsd:enumeration value="GPRS"/>
      <xsd:enumeration value="UMTS"/>
      <xsd:enumeration value="HSDPA"/>
      <xsd:enumeration value="HSUPA"/>
      <xsd:enumeration value="HSPA+"/>
      <xsd:enumeration value="LTE"/>
      <xsd:enumeration value="WLAN"/>
      <xsd:enumeration value="PACKET"/>
      <xsd:enumeration value="WCDMA"/>
      <xsd:enumeration value="CDMA"/>
      <xsd:enumeration value="TD-SCDMA"/>
      <xsd:enumeration value="WiMAX"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:complexType name="TerminalConnectionType">
    <xsd:sequence>
      <xsd:element name="address" type="xsd:anyURI" maxOccurs="1" minOccurs="1"/>
      <xsd:element name="retrievalStatus" type="common:RetrievalStatus" maxOccurs="1" minOccurs="1"/>
      <xsd:element name="currentConnectionType" type="ConnectionType" maxOccurs="unbounded" minOccurs="0"/>
      <xsd:element name="errorInformation" type="common:ServiceError" maxOccurs="1" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:element name="terminalConnectionTypeList" type="TerminalConnectionTypeList"/>

  <xsd:complexType name="TerminalConnectionTypeList">
    <xsd:sequence>
      <xsd:element name="connectionType" type="TerminalConnectionType" maxOccurs="unbounded" minOccurs="1"/>
      <xsd:element name="resourceURL" type="xsd:anyURI" maxOccurs="1" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="AccessibilityStatusForCollection">
    <xsd:sequence>
      <xsd:element name="retrievalStatus" type="common:RetrievalStatus" maxOccurs="1" minOccurs="1"/>
      <xsd:element name="currentAccessibility" type="AccessibilityStatus" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="homeMccMnc" type="MobileCountryNetworkCode" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="errorInformation" type="common:ServiceError" maxOccurs="1" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="RoamingStatusForCollection">
    <xsd:sequence>
      <xsd:element name="retrievalStatus" type="common:RetrievalStatus" maxOccurs="1" minOccurs="1"/>
      <xsd:element name="currentRoaming" type="RoamingStatus" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="servingMccMnc" type="MobileCountryNetworkCode" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="errorInformation" type="common:ServiceError" maxOccurs="1" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="ConnectionTypeForCollection">
    <xsd:sequence>
      <xsd:element name="retrievalStatus" type="common:RetrievalStatus" maxOccurs="1" minOccurs="1"/>
      <xsd:element name="currentConnectionType" type="ConnectionType" maxOccurs="unbounded" minOccurs="0"/>
      <xsd:element name="errorInformation" type="common:ServiceError" maxOccurs="1" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="TerminalStatusCollection">
    <xsd:sequence>
      <xsd:element name="address" type="xsd:anyURI" maxOccurs="1" minOccurs="1"/>
      <xsd:element name="accessibility" type="AccessibilityStatusForCollection" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="roaming" type="RoamingStatusForCollection" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="connectionType" type="ConnectionTypeForCollection" maxOccurs="1" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:element name="terminalStatusCollectionList" type="TerminalStatusCollectionList"/>

  <xsd:complexType name="TerminalStatusCollectionList">
    <xsd:sequence>
      <xsd:element name="collection" type="TerminalStatusCollection" maxOccurs="unbounded" minOccurs="1"/>
      <xsd:element name="resourceURL" type="xsd:anyURI" maxOccurs="1" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>


  <xsd:element name="subscriptionCancellationNotification" type="SubscriptionCancellationNotification"/>

  <xsd:complexType name="SubscriptionCancellationNotification">
    <xsd:sequence>
      <xsd:element name="callbackData" type="xsd:string" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="address" type="xsd:anyURI" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="reason" type="common:ServiceError" maxOccurs="1" minOccurs="1"/>
      <xsd:element name="link" type="common:Link" maxOccurs="unbounded" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>


  <xsd:element name="notificationSubscriptionList" type="NotificationSubscriptionList"/>

  <xsd:complexType name="NotificationSubscriptionList">
    <xsd:sequence>
      <xsd:element name="collectionChangeSubscription" type="StatusCollectionChangeSubscription" maxOccurs="unbounded" minOccurs="0"/>
      <xsd:element name="accessibilityChangeSubscription" type="AccessibilityChangeSubscription" maxOccurs="unbounded" minOccurs="0"/>
      <xsd:element name="roamingChangeSubscription" type="RoamingChangeSubscription" maxOccurs="unbounded" minOccurs="0"/>
      <xsd:element name="connectionChangeSubscription" type="ConnectionChangeSubscription" maxOccurs="unbounded" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>


  <xsd:element name="statusCollectionChangeSubscription" type="StatusCollectionChangeSubscription"/>

  <xsd:complexType name="StatusCollectionChangeSubscription">
    <xsd:sequence>
      <xsd:element name="clientCorrelator" type="xsd:string" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="resourceURL" type="xsd:anyURI" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="link" type="common:Link" maxOccurs="unbounded" minOccurs="0"/>
      <xsd:element name="callbackReference" type="common:CallbackReference" maxOccurs="1" minOccurs="1"/>
      <xsd:element name="address" type="xsd:anyURI" maxOccurs="unbounded" minOccurs="1"/>
      <xsd:element name="accessibilityCriteria" type="AccessibilityStatus" maxOccurs="unbounded" minOccurs="0"/>
      <xsd:element name="roamingCriteria" type="RoamingStatus" maxOccurs="unbounded" minOccurs="0"/>
      <xsd:element name="connectionTypeCriteria" type="ConnectionType" maxOccurs="unbounded" minOccurs="0"/>
      <xsd:element name="checkImmediate" type="xsd:boolean" maxOccurs="1" minOccurs="1"/>
      <xsd:element name="frequency" type="xsd:int" maxOccurs="1" minOccurs="1"/>
      <xsd:element name="duration" type="xsd:int" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="count" type="xsd:int" maxOccurs="1" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>


  <xsd:element name="accessibilityChangeSubscription" type="AccessibilityChangeSubscription"/>

  <xsd:complexType name="AccessibilityChangeSubscription">
    <xsd:sequence>
      <xsd:element name="clientCorrelator" type="xsd:string" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="resourceURL" type="xsd:anyURI" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="link" type="common:Link" maxOccurs="unbounded" minOccurs="0"/>
      <xsd:element name="callbackReference" type="common:CallbackReference" maxOccurs="1" minOccurs="1"/>
      <xsd:element name="address" type="xsd:anyURI" maxOccurs="unbounded" minOccurs="1"/>
      <xsd:element name="accessibilityCriteria" type="AccessibilityStatus" maxOccurs="unbounded" minOccurs="0"/>
      <xsd:element name="checkImmediate" type="xsd:boolean" maxOccurs="1" minOccurs="1"/>
      <xsd:element name="frequency" type="xsd:int" maxOccurs="1" minOccurs="1"/>
      <xsd:element name="duration" type="xsd:int" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="count" type="xsd:int" maxOccurs="1" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>


  <xsd:element name="roamingChangeSubscription" type="RoamingChangeSubscription"/>

  <xsd:complexType name="RoamingChangeSubscription">
    <xsd:sequence>
      <xsd:element name="clientCorrelator" type="xsd:string" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="resourceURL" type="xsd:anyURI" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="link" type="common:Link" maxOccurs="unbounded" minOccurs="0"/>
      <xsd:element name="callbackReference" type="common:CallbackReference" maxOccurs="1" minOccurs="1"/>
      <xsd:element name="address" type="xsd:anyURI" maxOccurs="unbounded" minOccurs="1"/>
      <xsd:element name="roamingCriteria" type="RoamingStatus" maxOccurs="unbounded" minOccurs="0"/>
      <xsd:element name="checkImmediate" type="xsd:boolean" maxOccurs="1" minOccurs="1"/>
      <xsd:element name="frequency" type="xsd:int" maxOccurs="1" minOccurs="1"/>
      <xsd:element name="duration" type="xsd:int" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="count" type="xsd:int" maxOccurs="1" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>


  <xsd:element name="connectionChangeSubscription" type="ConnectionChangeSubscription"/>

  <xsd:complexType name="ConnectionChangeSubscription">
    <xsd:sequence>
      <xsd:element name="clientCorrelator" type="xsd:string" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="resourceURL" type="xsd:anyURI" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="link" type="common:Link" maxOccurs="unbounded" minOccurs="0"/>
      <xsd:element name="callbackReference" type="common:CallbackReference" maxOccurs="1" minOccurs="1"/>
      <xsd:element name="address" type="xsd:anyURI" maxOccurs="unbounded" minOccurs="1"/>
      <xsd:element name="connectionTypeCriteria" type="ConnectionType" maxOccurs="unbounded" minOccurs="0"/>
      <xsd:element name="checkImmediate" type="xsd:boolean" maxOccurs="1" minOccurs="1"/>
      <xsd:element name="frequency" type="xsd:int" maxOccurs="1" minOccurs="1"/>
      <xsd:element name="duration" type="xsd:int" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="count" type="xsd:int" maxOccurs="1" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>
 

  <xsd:element name="statusCollectionChangeNotification" type="StatusCollectionChangeNotification"/>

  <xsd:complexType name="StatusCollectionChangeNotification">
    <xsd:sequence>
      <xsd:element name="callbackData" type="xsd:string" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="collection" type="TerminalStatusCollection" maxOccurs="unbounded" minOccurs="1"/>
      <xsd:element name="isFinalNotification" type="xsd:boolean" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="link" type="common:Link" maxOccurs="unbounded" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>


  <xsd:element name="accessibilityChangeNotification" type="AccessibilityChangeNotification"/>

  <xsd:complexType name="AccessibilityChangeNotification">
    <xsd:sequence>
      <xsd:element name="callbackData" type="xsd:string" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="accessibility" type="TerminalAccessibilityStatus" maxOccurs="unbounded" minOccurs="1"/>
      <xsd:element name="isFinalNotification" type="xsd:boolean" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="link" type="common:Link" maxOccurs="unbounded" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>


  <xsd:element name="roamingChangeNotification" type="RoamingChangeNotification"/>

  <xsd:complexType name="RoamingChangeNotification">
    <xsd:sequence>
      <xsd:element name="callbackData" type="xsd:string" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="roaming" type="TerminalRoamingStatus" maxOccurs="unbounded" minOccurs="1"/>
      <xsd:element name="isFinalNotification" type="xsd:boolean" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="link" type="common:Link" maxOccurs="unbounded" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>


  <xsd:element name="connectionChangeNotification" type="ConnectionChangeNotification"/>

  <xsd:complexType name="ConnectionChangeNotification">
    <xsd:sequence>
      <xsd:element name="callbackData" type="xsd:string" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="connectionType" type="TerminalConnectionType" maxOccurs="unbounded" minOccurs="1"/>
      <xsd:element name="isFinalNotification" type="xsd:boolean" maxOccurs="1" minOccurs="0"/>
      <xsd:element name="link" type="common:Link" maxOccurs="unbounded" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>
</xsd:schema>