From 76f816219ca60bd7eac5fbd27fc7f308bfe9dcdc Mon Sep 17 00:00:00 2001
From: Miguel Angel Reina Ortega <miguelangel.reinaortega@etsi.org>
Date: Tue, 17 May 2022 11:05:57 +0200
Subject: [PATCH] SDS-2020-0115R03 - TS-0004-e2eQosSession_R4

Signed-off-by: Miguel Angel Reina Ortega <miguelangel.reinaortega@etsi.org>
---
 CDT-AE.xsd               |  7 +++--
 CDT-CSEBase.xsd          |  2 ++
 CDT-commonTypes.xsd      | 36 ++++++++++++++++++++++++
 CDT-e2eQosSession.xsd    | 61 ++++++++++++++++++++++++++++++++++++++++
 CDT-enumerationTypes.xsd | 48 +++++++++++++++++++++++++++++++
 CDT-remoteCSE.xsd        |  5 +++-
 6 files changed, 156 insertions(+), 3 deletions(-)
 create mode 100644 CDT-e2eQosSession.xsd

diff --git a/CDT-AE.xsd b/CDT-AE.xsd
index 34fbea8..38eb395 100644
--- a/CDT-AE.xsd
+++ b/CDT-AE.xsd
@@ -40,7 +40,8 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
 	<xs:include schemaLocation="CDT-triggerRequest.xsd" />
 	<xs:include schemaLocation="CDT-transactionMgmt.xsd" />
 	<xs:include schemaLocation="CDT-transaction.xsd" />
-	
+    <xs:include schemaLocation="CDT-e2eQosSession.xsd" />
+
 	<xs:element name="AE" substitutionGroup="m2m:sg_announceableResource">
 		<xs:complexType>
 			<xs:complexContent>
@@ -84,6 +85,7 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
 								<xs:element ref="m2m:triggerRequest" />
 								<xs:element ref="m2m:transactionMgmt" />
 								<xs:element ref="m2m:transaction" />
+								<xs:element ref="m2m:e2eQosSession" />
 							</xs:choice>
 						</xs:choice>
 					</xs:sequence>
@@ -140,7 +142,8 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
 								<xs:element ref="m2m:triggerRequest" />
 								<xs:element ref="m2m:transactionMgmt" />
 								<xs:element ref="m2m:transaction" />
-							</xs:choice>
+								<xs:element ref="m2m:e2eQosSession" />
+                            </xs:choice>
 						</xs:choice>
 					</xs:sequence>
 				</xs:extension>
diff --git a/CDT-CSEBase.xsd b/CDT-CSEBase.xsd
index e3e7a5b..51098c6 100644
--- a/CDT-CSEBase.xsd
+++ b/CDT-CSEBase.xsd
@@ -59,6 +59,7 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
     <xs:include schemaLocation="CDT-transactionMgmt.xsd" />
     <xs:include schemaLocation="CDT-transaction.xsd" />
     <xs:include schemaLocation="CDT-semanticRuleRepository.xsd" />
+    <xs:include schemaLocation="CDT-e2eQosSession.xsd" />
     
 	<xs:element name="CSEBase" substitutionGroup="m2m:sg_resource">
 		<xs:complexType>
@@ -120,6 +121,7 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
                                 <xs:element ref="m2m:transactionMgmt" />
                                 <xs:element ref="m2m:transaction" />
                                 <xs:element ref="m2m:semanticRuleRepository" />
+                                <xs:element ref="m2m:e2eQosSession" />
                             </xs:choice>
                         </xs:choice>
 					</xs:sequence>
diff --git a/CDT-commonTypes.xsd b/CDT-commonTypes.xsd
index fc0acb4..c6aa81a 100644
--- a/CDT-commonTypes.xsd
+++ b/CDT-commonTypes.xsd
@@ -497,6 +497,14 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
 		</xs:restriction>
 	</xs:simpleType>
 	
+	<xs:simpleType name="qosLevel">
+		<!-- User-defined range -->
+		<xs:restriction base='xs:integer'>
+			<xs:minInclusive value="0" />
+			<xs:maxInclusive value="100" />
+		</xs:restriction>
+    </xs:simpleType>
+
 	<xs:simpleType name="resourceList" >
 		<xs:list itemType="xs:anyURI" /> 			
 	</xs:simpleType>
@@ -1387,7 +1395,35 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
 		</xs:sequence>
 	</xs:complexType>	
 	
+	<xs:complexType name="e2eQosRequirements">
+		<xs:sequence>
+			<xs:element name="e2eQosRequirement" minOccurs="1" maxOccurs="unbounded">
+				<xs:complexType>
+					<xs:sequence> 
+						<xs:element name="qosLevel" type="m2m:qosLevel"/>
+						<xs:element name="resourceIDList" type="m2m:listOfM2MID" minOccurs="0" />
+						<xs:element name="sessionSchedule" type="m2m:scheduleEntry" minOccurs="0" />
+						<xs:element name="numOfRequests" type="xs:positiveInteger" minOccurs="0" />
+						<xs:element name="numOfBytes" type="xs:positiveInteger" minOccurs="0" />
+					</xs:sequence>
+				</xs:complexType>
+			</xs:element>
+		</xs:sequence>
+	</xs:complexType>
 		
+	<xs:complexType name="e2eQosPolicies">
+		<xs:sequence>
+			<xs:element name="e2eQosPolicy" minOccurs="1" maxOccurs="unbounded">
+				<xs:complexType>
+					<xs:sequence> 
+						<xs:element name="status" type="m2m:e2eQosPolicyStatus"/>
+						<xs:element name="action" type="m2m:e2eQosAction"/>
+					</xs:sequence>
+				</xs:complexType>
+			</xs:element>
+		</xs:sequence>
+	</xs:complexType>
+
 	<!-- Resource type definitions. These types include the "common attributes" that are used by oneM2M Resources. Each oneM2M 
 		Resource has a resource type that is defined in a separate schema, but each resource type extends one of the types that is 
 		defined below -->
diff --git a/CDT-e2eQosSession.xsd b/CDT-e2eQosSession.xsd
new file mode 100644
index 0000000..a8e3104
--- /dev/null
+++ b/CDT-e2eQosSession.xsd
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+Copyright Notification
+
+The oneM2M Partners authorize 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, nor does it encompass the granting of 
+any patent rights. The oneM2M Partners assume no responsibility for errors or omissions in this document. 
+© 2020, oneM2M Partners Type 1 (ARIB, ATIS, CCSA, ETSI, TIA, TSDSI, TTA, TTC). All rights reserved.
+
+Notice of Disclaimer & Limitation of Liability 
+
+The information provided in this document is directed solely to professionals who have the appropriate degree of experience to understand 
+and interpret its contents in accordance with generally accepted engineering or other professional standards and applicable regulations. 
+No recommendation as to products or vendors is made or should be implied. 
+
+NO REPRESENTATION OR WARRANTY IS MADE THAT THE INFORMATION IS TECHNICALLY ACCURATE OR SUFFICIENT OR CONFORMS TO ANY STATUTE, 
+GOVERNMENTAL RULE OR REGULATION, AND FURTHER, NO REPRESENTATION OR WARRANTY IS MADE OF MERCHANTABILITY OR FITNESS FOR ANY 
+PARTICULAR PURPOSE OR AGAINST INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS. 
+NO oneM2M PARTNER TYPE 1 SHALL BE LIABLE, BEYOND THE AMOUNT OF ANY SUM RECEIVED IN PAYMENT BY THAT PARTNER FOR THIS DOCUMENT, WITH RESPECT TO 
+ANY CLAIM, AND IN NO EVENT SHALL oneM2M BE LIABLE FOR LOST PROFITS OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES. 
+oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PROVIDED IN THIS DOCUMENT IS AT THE RISK OF THE USER.
+
+-->
+<xs:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.onem2m.org/xml/protocols"
+	xmlns:m2m="http://www.onem2m.org/xml/protocols" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	elementFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+	<xs:include schemaLocation="CDT-commonTypes.xsd" />
+	<xs:include schemaLocation="CDT-subscription.xsd" />
+	<xs:include schemaLocation="CDT-transaction.xsd"/>
+
+	<xs:element name="e2eQosSession" substitutionGroup="m2m:sg_regularResource">
+		<xs:complexType>
+			<xs:complexContent>
+				<!-- Inherit common attributes from RegularResource Type -->
+				<xs:extension base="m2m:regularResource">
+					<xs:sequence>
+						<!-- Common Attribute, specific to <container>, <contentInstance>, <request> and <delivery> and other resources -->
+						
+						<!-- Resource Specific Attributes -->
+						<xs:element name="sessionEndpoints" type="m2m:listOfM2MID" />
+						<xs:element name="e2eQosRequirements" type="m2m:e2eQosRequirements" />
+						<xs:element name="e2eQosPolicies" type="m2m:e2eQosPolicies" minOccurs="0" />
+						<xs:element name="e2eQosStatus" type="m2m:e2eQosStatus" />
+						
+						<!-- Child Resources -->
+						<xs:choice minOccurs="0" maxOccurs="1">
+							<xs:element name="childResource" type="m2m:childResourceRef" minOccurs="1" maxOccurs="unbounded" />
+							<xs:choice minOccurs="1" maxOccurs="unbounded">
+								<xs:element ref="m2m:subscription" />
+								<xs:element ref="m2m:transaction" />
+							</xs:choice>
+						</xs:choice>
+					</xs:sequence>
+				</xs:extension>
+			</xs:complexContent>
+		</xs:complexType>
+	</xs:element>
+	
+</xs:schema>
diff --git a/CDT-enumerationTypes.xsd b/CDT-enumerationTypes.xsd
index ba77192..d088850 100644
--- a/CDT-enumerationTypes.xsd
+++ b/CDT-enumerationTypes.xsd
@@ -147,6 +147,8 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
 			<xs:enumeration value="57" />			
 			<!-- flexContainerInstance -->
 			<xs:enumeration value="58" />			
+			<!-- e2eQosSession -->
+			<xs:enumeration value="59" />			
 			<!-- accessControlPolicyAnnc -->
 			<xs:enumeration value="10001" />
 			<!-- AEAnnc -->
@@ -656,6 +658,8 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
 			<xs:enumeration value="57" />			
 			<!-- flexContainerInstance -->
 			<xs:enumeration value="58" />			
+			<!-- e2eQosSession -->
+			<xs:enumeration value="59" />			
 			<!-- accessControlPolicyAnnc -->
 			<xs:enumeration value="10001" />
 			<!-- AEAnnc -->
@@ -1893,6 +1897,50 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
 			<xs:enumeration value="4" />
 		</xs:restriction>
 	</xs:simpleType>
+
+	<xs:simpleType name="e2eQosStatus">
+		<xs:annotation>
+			<xs:documentation>Used for the e2eQosStatus attribute of the e2eQosSession resource</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:integer">
+			<!-- ENABLED -->
+			<xs:enumeration value="1" />
+			<!-- FAILED -->
+			<xs:enumeration value="2" />
+			<!-- DISABLED -->
+			<xs:enumeration value="3" />
+			<!-- USAGE_EXHAUSTED -->
+			<xs:enumeration value="4" />
+		</xs:restriction>
+	</xs:simpleType>
 	
+	<xs:simpleType name="e2eQosPolicyStatus">
+		<xs:annotation>
+			<xs:documentation>Used for the status element of action element of the e2eQosPolicy attribute of the e2eQosSession resource</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:integer">
+			<!-- FAILED -->
+			<xs:enumeration value="2" />
+			<!-- DISABLED -->
+			<xs:enumeration value="3" />
+			<!-- USAGE_EXHAUSTED -->
+			<xs:enumeration value="4" />
+		</xs:restriction>
+	</xs:simpleType>
+
+	<xs:simpleType name="e2eQosAction">
+		<xs:annotation>
+			<xs:documentation>Used for the action element of the e2eQosPolicy attribute of the e2eQosSession resource</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:integer">
+			<!-- RE-ENABLE -->
+			<xs:enumeration value="1" />
+			<!-- DISABLE -->
+			<xs:enumeration value="2" />
+			<!-- DELETE -->
+			<xs:enumeration value="3" />
+		</xs:restriction>
+	</xs:simpleType>
+
 </xs:schema>
 
diff --git a/CDT-remoteCSE.xsd b/CDT-remoteCSE.xsd
index e31cdec..d9aa24d 100644
--- a/CDT-remoteCSE.xsd
+++ b/CDT-remoteCSE.xsd
@@ -42,7 +42,8 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
 	<xs:include schemaLocation="CDT-crossResourceSubscription.xsd" />
 	<xs:include schemaLocation="CDT-transactionMgmt.xsd" />
 	<xs:include schemaLocation="CDT-transaction.xsd" />
-						
+    <xs:include schemaLocation="CDT-e2eQosSession.xsd" />
+					
 	<xs:element name="remoteCSE" substitutionGroup="m2m:sg_announceableResource">
 		<xs:complexType>
 			<xs:complexContent>
@@ -96,6 +97,7 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
                             	<xs:element ref="m2m:crossResourceSubscription" />
                             	<xs:element ref="m2m:transactionMgmt" />
                             	<xs:element ref="m2m:transaction" />
+                            	<xs:element ref="m2m:e2eQosSession" />
                             </xs:choice>
                         </xs:choice>
 					</xs:sequence>
@@ -154,6 +156,7 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
                             	<xs:element ref="m2m:crossResourceSubscription" />
                             	<xs:element ref="m2m:transactionMgmt" />
                             	<xs:element ref="m2m:transaction" />
+                            	<xs:element ref="m2m:e2eQosSession" />
                             </xs:choice>
                         </xs:choice>
 					</xs:sequence>
-- 
GitLab