<?xml version="1.0" encoding="UTF-8"?>
<!--
   XML data type definitions for the RESTful Network API for Quality of Service (QoS)  
   Version: 1.0 (1.0)
   Date: 25 Nov 2014
   
   FILE INFORMATION 
   
      OMA Permanent Document 
         File: OMA-SUP-XSD_rest_netapi_qos-V1_0-20141125-C
         Type: Text - Schema Description 
   
   Public Reachable Information 
      Path: http://www.openmobilealliance.org/tech/profiles 
      Name: rest_netapi_qos-v1_0.xsd 
   
   NORMATIVE INFORMATION
   
   Information about this file can be found in the latest revision of the specification
 
       OMA-TS-REST_NetAPI_QoS-V1_0 
       
       This is available at http://www.openmobilealliance.org/
   
      Send comments to technical-comments@mail.openmobilealliance.org
   
   CHANGE HISTORY 
   03102013 File created, see OMA-ARC-REST-QoS-2013-0018-INP_XSD_baseline
   10102013 Added data types according to OMA-ARC-REST-QoS-2013-0019-CR_XSD_data_types
   29112013 Implemented changes according to OMA-ARC-REST-QoS-2013-0021R01-CR_XSD_subscriptions_for_preDefined_QoS_features  
   04032014 Implemented changes according to OMA-ARC-REST-QoS-2014-0004-CR_XSD_alignment_with_CR001_CR002_changes_for_TS  
   11032014 Implemented changes according to OMA-ARC-REST-QoS-2014-0007-CR_XSD_alignment_with_CR003_changes_for_TS  
   24032014 Implemented changes according to OMA-ARC-REST-QoS-2014-0009-CR_XSD_fixing_element_names  
   06052014 Implemented changes according to OMA-ARC-REST-QoS-2014-0021-CR_XSD_adding_new_data_types  
   03092014 Implemented changes according to OMA-ARC-REST-QoS-2014-0034-CR and OMA-ARC-REST-QoS-2014-0035-CR 
   08102014 Implemented changes according to OMA-ARC-REST-QoS-2014-0039-CR_XSD_more_alignments_with_changes_in_TS 
   22102014 Implemented changes according to OMA-ARC-REST-QoS-2014-0043-CR_XSD_data_types_for_multiple_media_and_flows 
   05112014 Implemented changes according to OMA-ARC-REST-QoS-2014-0047R02-CR_XSD_changes_for_data_types 
   25112014 Status changed to Candidate by TP, TP Ref # OMA-TP-2014-0266-INP_REST_NetAPI_QoS_V1_0_ERP_and_ETR_for_Candidate_Approval

   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 2014 Open Mobile Alliance Ltd.  All Rights Reserved.
   Used with the permission of the Open Mobile Alliance Ltd. under the
   terms set forth above.   
-->


<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   targetNamespace="urn:oma:xml:rest:netapi:qos:1" 
   xmlns:common="urn:oma:xml:rest:netapi:common:1"
   xmlns="urn:oma:xml:rest:netapi:qos:1" version="1.0">
   
   <xsd:annotation>
      <xsd:documentation>This schema defines the XML data types for the RESTful Network API for Quality of Service (QoS).</xsd:documentation>
   </xsd:annotation>
   
   <xsd:import namespace="urn:oma:xml:rest:netapi:common:1"
      schemaLocation="http://www.openmobilealliance.org/tech/profiles/rest_netapi_common-v1_0.xsd"/>

   <!-- ==================================== -->   
   <!--      Data type definitions           -->
   <!-- ==================================== -->  

   <xsd:element name="predefinedQosFeatureList" type="PredefinedQosFeatureList"/>
   
   <xsd:complexType name="PredefinedQosFeatureList">
      <xsd:sequence>
         <xsd:element name="predefinedQosFeature" type="PredefinedQosFeature" minOccurs="0" maxOccurs="unbounded"/>
         <xsd:element name="resourceURL" type="xsd:anyURI" minOccurs="1" maxOccurs="1"/>
      </xsd:sequence> 
   </xsd:complexType>
   
   <xsd:complexType name="PredefinedQosFeature">
      <xsd:sequence>
         <xsd:element name="predefinedQosFeatureId" type="xsd:string" minOccurs="1" maxOccurs="1"/>
         <xsd:element name="predefinedQosFeatureName" type="xsd:string" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="mediaInfo" type="PredefinedMediaInfo" minOccurs="0" maxOccurs="unbounded"/>
         <xsd:element name="reservationPriority" type="ReservationPriority" minOccurs="0" maxOccurs="1"/>        
         <xsd:element name="link" type="common:Link" minOccurs="0" maxOccurs="unbounded"/>
      </xsd:sequence> 
   </xsd:complexType> 

   <xsd:complexType name="PredefinedMediaInfo">
      <xsd:sequence>
         <xsd:element name="mediaType" type="MediaType" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="bandwidth" type="BandwidthInformation" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="reservationPriority" type="ReservationPriority" minOccurs="0" maxOccurs="1"/>        
      </xsd:sequence> 
   </xsd:complexType> 

   <xsd:element name="qosFeatureData" type="QosFeatureData"/>

   <xsd:complexType name="QosFeatureData">
      <xsd:sequence>
         <xsd:element name="clientCorrelator" type="xsd:string" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="predefinedQosFeatureId" type="xsd:string" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="media" type="MediaComponentDescription" minOccurs="0" maxOccurs="unbounded"/>
         <xsd:element name="reservationPriority" type="ReservationPriority" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="duration" type="xsd:unsignedInt" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="volume" type="xsd:unsignedInt" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="defaultAction" type="DefaultAction" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="sponsorId" type="xsd:string" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="resourceURL" type="xsd:anyURI" minOccurs="0" maxOccurs="1"/>        
      </xsd:sequence> 
   </xsd:complexType>
   
      <xsd:complexType name="MediaComponentDescription">
      <xsd:sequence>
         <xsd:element name="mediaNumber" type="xsd:unsignedInt" minOccurs="1" maxOccurs="1"/> 
         <xsd:element name="mediaType" type="MediaType" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="bandwidth" type="BandwidthInformation" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="ipFlow" type="IpFlowDescription" minOccurs="0" maxOccurs="unbounded"/>
         <xsd:element name="flowStatus" type="FlowStatus" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="reservationPriority" type="ReservationPriority" minOccurs="0" maxOccurs="1"/>        
      </xsd:sequence> 
   </xsd:complexType>
      
   <xsd:complexType name="BandwidthInformation">
      <xsd:sequence>
         <xsd:element name="minUplinkBitRate" type="xsd:unsignedInt" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="maxUplinkBitRate" type="xsd:unsignedInt" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="minDownlinkBitRate" type="xsd:unsignedInt" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="maxDownlinkBitRate" type="xsd:unsignedInt" minOccurs="0" maxOccurs="1"/>
      </xsd:sequence> 
   </xsd:complexType>
 
   <xsd:complexType name="IpFlowDescription">
      <xsd:sequence>
         <xsd:element name="flowNumber" type="xsd:unsignedInt" minOccurs="1" maxOccurs="1"/> 
         <xsd:element name="flowUsage" type="FlowUsage" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="flowDescription" type="FlowDescription" minOccurs="0" maxOccurs="2"/>
         <xsd:element name="flowStatus" type="FlowStatus" minOccurs="0" maxOccurs="1"/>
      </xsd:sequence> 
   </xsd:complexType>   
 
   <xsd:complexType name="FlowDescription">
      <xsd:sequence>
         <xsd:element name="direction" type="FlowDirection" minOccurs="1" maxOccurs="1"/> 
         <xsd:element name="protocol" type="ProtocolType" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="otherPartyIpAddress" type="IpAddress" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="otherPartyPortNumber" type="PortNumber" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="userIpAddress" type="IpAddress" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="userPortNumber" type="PortNumber" minOccurs="0" maxOccurs="1"/>
      </xsd:sequence> 
   </xsd:complexType>   
 
   <xsd:complexType name="IpAddress">
      <xsd:sequence>
         <xsd:choice minOccurs="1" maxOccurs="1">
         <xsd:element name="ipV4Address" type="xsd:string" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="ipV6Address" type="xsd:string" minOccurs="0" maxOccurs="1"/>
         </xsd:choice>
      </xsd:sequence> 
   </xsd:complexType>
   
   <xsd:complexType name="PortNumber">
      <xsd:sequence>
         <xsd:choice minOccurs="1" maxOccurs="1">
         <xsd:element name="port" type="xsd:unsignedInt" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="portRange" type="PortRange" minOccurs="0" maxOccurs="1"/>
         </xsd:choice>
      </xsd:sequence> 
   </xsd:complexType>
   
   <xsd:complexType name="PortRange">
      <xsd:sequence>
         <xsd:element name="first" type="xsd:unsignedInt" minOccurs="1" maxOccurs="1"/>
         <xsd:element name="last" type="xsd:unsignedInt" minOccurs="1" maxOccurs="1"/>
      </xsd:sequence> 
   </xsd:complexType>
   
   <xsd:element name="appliedQosFeatureList" type="AppliedQosFeatureList"/>
   
   <xsd:complexType name="AppliedQosFeatureList">
      <xsd:sequence>
         <xsd:element name="qosFeature" type="QosFeatureData" minOccurs="0" maxOccurs="unbounded"/>
         <xsd:element name="resourceURL" type="xsd:anyURI" minOccurs="1" maxOccurs="1"/>
      </xsd:sequence> 
   </xsd:complexType>   
   
   <xsd:element name="qosFeaturesSubscriptionList" type="QosFeaturesSubscriptionList"/>
   
   <xsd:complexType name="QosFeaturesSubscriptionList">
      <xsd:sequence>
         <xsd:element name="predefinedQosFeaturesSubscriptionList" type="PredefinedQosFeaturesSubscriptionList" minOccurs="0" maxOccurs="unbounded"/>
         <xsd:element name="appliedQosFeaturesSubscriptionList" type="AppliedQosFeaturesSubscriptionList" minOccurs="0" maxOccurs="unbounded"/>
         <xsd:element name="resourceURL" type="xsd:anyURI" minOccurs="1" maxOccurs="1"/>
      </xsd:sequence> 
   </xsd:complexType>
   
   <xsd:element name="predefinedQosFeaturesSubscriptionList" type="PredefinedQosFeaturesSubscriptionList"/>
   
   <xsd:complexType name="PredefinedQosFeaturesSubscriptionList">
      <xsd:sequence>
         <xsd:element name="predefinedQosFeaturesSubscription" type="PredefinedQosFeaturesSubscription" minOccurs="0" maxOccurs="unbounded"/>
         <xsd:element name="resourceURL" type="xsd:anyURI" minOccurs="1" maxOccurs="1"/>
      </xsd:sequence> 
   </xsd:complexType> 
   
   <xsd:element name="appliedQosFeaturesSubscriptionList" type="AppliedQosFeaturesSubscriptionList"/>
   
   <xsd:complexType name="AppliedQosFeaturesSubscriptionList">
      <xsd:sequence>
         <xsd:element name="appliedQosFeaturesSubscription" type="AppliedQosFeaturesSubscription" minOccurs="0" maxOccurs="unbounded"/>
         <xsd:element name="resourceURL" type="xsd:anyURI" minOccurs="1" maxOccurs="1"/>
      </xsd:sequence> 
   </xsd:complexType>        

   <xsd:element name="predefinedQosFeaturesSubscription" type="PredefinedQosFeaturesSubscription"/>
 
   <xsd:complexType name="PredefinedQosFeaturesSubscription">
      <xsd:sequence>
         <xsd:element name="callbackReference" type="common:CallbackReference" minOccurs="1" maxOccurs="1"/>
         <xsd:element name="duration" type="xsd:unsignedInt" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="clientCorrelator" type="xsd:string" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="predefinedQosFeatureId" type="xsd:string" minOccurs="1" maxOccurs="unbounded"/>
         <xsd:element name="multipleNotificationsRequested" type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="resourceURL" type="xsd:anyURI" minOccurs="0" maxOccurs="1"/>         
      </xsd:sequence> 
   </xsd:complexType> 
   
   <xsd:element name="appliedQosFeaturesSubscription" type="AppliedQosFeaturesSubscription"/>
 
   <xsd:complexType name="AppliedQosFeaturesSubscription">
      <xsd:sequence>
         <xsd:element name="callbackReference" type="common:CallbackReference" minOccurs="1" maxOccurs="1"/>
         <xsd:element name="duration" type="xsd:unsignedInt" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="clientCorrelator" type="xsd:string" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="eventType" type="QosEvent" minOccurs="0" maxOccurs="unbounded"/>
         <xsd:element name="resourceURL" type="xsd:anyURI" minOccurs="0" maxOccurs="1"/>         
      </xsd:sequence> 
   </xsd:complexType>

   <xsd:element name="predefinedQosAvailabilityNotification" type="PredefinedQosAvailabilityNotification"/>
 
   <xsd:complexType name="PredefinedQosAvailabilityNotification">
      <xsd:sequence>
         <xsd:element name="callbackData" type="xsd:string" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="predefinedQosFeatureId" type="xsd:string" minOccurs="1" maxOccurs="unbounded"/>
         <xsd:element name="link" type="common:Link" minOccurs="0" maxOccurs="unbounded"/>       
      </xsd:sequence> 
   </xsd:complexType>  
   
   <xsd:element name="appliedQosFeaturesNotification" type="AppliedQosFeaturesNotification"/>
 
   <xsd:complexType name="AppliedQosFeaturesNotification">
      <xsd:sequence>
         <xsd:element name="callbackData" type="xsd:string" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="eventType" type="QosEvent" minOccurs="1" maxOccurs="1"/>
         <xsd:element name="eventDescription" type="xsd:string" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="link" type="common:Link" minOccurs="0" maxOccurs="unbounded"/>       
      </xsd:sequence> 
   </xsd:complexType> 

   <!-- ==================================== --> 
   <!--            Enumerations              -->
   <!-- ==================================== -->  

   <xsd:simpleType name="DefaultAction">
      <xsd:restriction base="xsd:string">
         <xsd:enumeration value="AutoRenewal"/>
         <xsd:enumeration value="AutoCancellation"/>
     </xsd:restriction>
   </xsd:simpleType>
   
   <xsd:simpleType name="FlowDirection">
      <xsd:restriction base="xsd:string">
         <xsd:enumeration value="Uplink"/>
         <xsd:enumeration value="Downlink"/>
     </xsd:restriction>
   </xsd:simpleType>     
 
   <xsd:simpleType name="FlowStatus">
      <xsd:restriction base="xsd:string">
         <xsd:enumeration value="EnabledUplink"/>
         <xsd:enumeration value="EnabledDownlink"/>
         <xsd:enumeration value="Enabled"/>
         <xsd:enumeration value="Disabled"/>
         <xsd:enumeration value="Removed"/>
     </xsd:restriction>
   </xsd:simpleType>
   
   <xsd:simpleType name="FlowUsage">
      <xsd:restriction base="xsd:string">
         <xsd:enumeration value="RTCP"/>
         <xsd:enumeration value="Signalling"/>
     </xsd:restriction>
   </xsd:simpleType>     
   
   <xsd:simpleType name="MediaType">
      <xsd:restriction base="xsd:string">
         <xsd:enumeration value="Audio"/>
         <xsd:enumeration value="Video"/>
         <xsd:enumeration value="Data"/>         
         <xsd:enumeration value="Application"/>
         <xsd:enumeration value="Control"/>         
         <xsd:enumeration value="Text"/>
         <xsd:enumeration value="Message"/>
         <xsd:enumeration value="Image"/>         
         <xsd:enumeration value="Other"/>
     </xsd:restriction>
   </xsd:simpleType>

   <xsd:simpleType name="ProtocolType">
      <xsd:restriction base="xsd:string">
         <xsd:enumeration value="TCP"/>
         <xsd:enumeration value="UDP"/>
         <xsd:enumeration value="SCTP"/>
     </xsd:restriction>
   </xsd:simpleType> 
  
   <xsd:simpleType name="QosEvent">
      <xsd:restriction base="xsd:string">
         <xsd:enumeration value="AbnormalConnectionTermination"/>
         <xsd:enumeration value="NormalConnectionTermination"/>
         <xsd:enumeration value="AppliedQosFeatureReleased"/>
         <xsd:enumeration value="AppliedQosFeatureRenewed"/>
     </xsd:restriction>
   </xsd:simpleType>

   <xsd:simpleType name="ReservationPriority">
      <xsd:restriction base="xsd:string">
         <xsd:enumeration value="High"/>
         <xsd:enumeration value="Medium"/>
         <xsd:enumeration value="Low"/>
     </xsd:restriction>
   </xsd:simpleType>

   <!-- ==================================================================== -->
   <!-- Elements that can appear as root elements for Light-weight Resources -->
   <!-- ==================================================================== -->
   
      <xsd:element name="duration" type="xsd:unsignedInt"/>
      <xsd:element name="volume" type="xsd:unsignedInt"/>
      <xsd:element name="flowStatus" type="FlowStatus"/>
      <xsd:element name="bandwidth" type="BandwidthInformation"/>
                  
</xsd:schema>