<?xml version="1.0" encoding="UTF-8"?>

<!--

   SpamRep Schema - describes SpamRep related messages/formats.
      version - 1.0
      date    - 19 Jun 2012

   FILE INFORMATION

    OMA Permanent Document
       File: OMA-SUP-XSD_spam_rep-V1_0-20120619-A
       Type: Text - Schema Description

    Public Reachable Information
       Path: http://www.openmobilealliance.org/tech/profiles
       Name: spam_rep-v1_0.xsd

   NORMATIVE INFORMATION

     Information about this file can be found in the specification

       OMA-TS-SpamRep-V1_0-20120619-A

     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 2012 Open Mobile Alliance Ltd.  All Rights Reserved.
     Used with the permission of the Open Mobile Alliance Ltd. under the
     terms set forth above.

-->

<xs:schema
	targetNamespace="urn:oma:xml:spam-rep:messages"
	xmlns:tns="urn:oma:xml:spam-rep:messages"
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns:xml="http://www.w3.org/XML/1998/namespace"
	elementFormDefault="qualified" attributeFormDefault="unqualified">

	<!-- This import brings in the XML language attribute xml:lang -->
	<xs:import namespace="http://www.w3.org/XML/1998/namespace"
		schemaLocation="http://www.w3.org/2001/xml.xsd"/>

	<!-- The root "spam-rep-document" element serves as a container -->
	<xs:element name="spam-rep-document">
		<xs:complexType>
			<xs:annotation>
				<xs:documentation xml:lang="en">
					The root element of the SpamRep document and container for 
					SpamRep messages. A message can be either a request sent 
					from the client or a response provided by the server.
				</xs:documentation>
			</xs:annotation>

			<xs:sequence minOccurs="1" maxOccurs="unbounded">
				<xs:choice>
					<xs:element name="spam-report" type="tns:spam-reportType"/>
					<xs:element name="action-request" type="tns:action-requestType"/>
					<xs:element name="status-query" type="tns:status-queryType"/>
					<xs:element name="quarantined-messages-query" type="tns:quarantined-messages-queryType"/>
					<xs:element name="report-status" type="tns:report-statusType"/>
					<xs:element name="action-response" type="tns:action-responseType"/>
					<xs:element name="quarantined-messages-list" type="tns:quarantined-messages-listType"/>
					<xs:element name="share_perms-messages-list" type="tns:share_perms-messages-listType"/>
					<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
				</xs:choice>
			</xs:sequence>
		</xs:complexType>
	</xs:element>

	<!-- SpamRep Client Originated Messages -->

	<xs:complexType name="spam-reportType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				Spam Report Message Element.
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
	    	<xs:element name="spam-rep-message-id"   type="xs:integer"/>
			<xs:element name="spam-rep-client-id"    type="xs:string"/>
			<xs:element name="report-type"           type="tns:spam-rep-reportType" maxOccurs="3"/>
			<xs:element name="message-type"          type="xs:string"/>
            <xs:element name="value-type"            type="tns:spam-rep-valueType"/>
			<xs:element name="message-reference"     type="xs:string"/>
			<xs:element name="hashing-function"      type="xs:string"/>
            <xs:element name="message-fingerprint"   type="tns:message-fingerprint-structType" 
			    minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="reported-msg-protocol" type="xs:string"  minOccurs="0"/>
			<xs:element name="message-attributes"    type="tns:message-attribute-baseType"
			    minOccurs="0"/>
			<xs:element name="submission-time"       type="xs:string"  minOccurs="0"/>
			<xs:element name="originating-address"   type="xs:string"  minOccurs="0"/>
			<xs:element name="forward-status"        type="xs:boolean" minOccurs="0"/>
			<xs:element name="abuse-type"            type="tns:spam-rep-abuseType"
			    minOccurs="0"/>
			<xs:element name="share-permission"      type="tns:share_perms-structType" 
			    minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="version"               type="xs:string"/>
			<xs:element name="detection-info"        type="tns:detect-info-structType" 
			    minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="action-requestType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				Action Request Message Element.
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="action-type"            type="xs:string"/>
			<xs:element name="sender"                 type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="quarantined-message-id" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="status-queryType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				Status Query Message Element.
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="spam-report-id" type="xs:string" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="quarantined-messages-queryType">
	</xs:complexType>

	<!-- SpamRep Server Originated Messages -->

	<xs:complexType name="report-statusType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				The report status.
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
	    	<xs:element name="spam-report-id" type="xs:string"/>
			<xs:element name="status-code" type="xs:integer"/>
			<xs:element name="status-text" type="xs:string"         minOccurs="0"/>
			<xs:element name="spam-rep-message-id" type="xs:string" minOccurs="0"/>
			<xs:element name="abuse-type" type="tns:spam-rep-abuseType" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="action-responseType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				The action response message element.
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="spam-rep-server-id"          type="xs:string"/>
			<xs:element name="status-code"                 type="xs:integer"/>
			<xs:element name="status-text"                 type="xs:string"        minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="quarantined-messages-listType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				The quarantined message list.
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
	    	<xs:element name="quarantined-message" 
			             type="tns:quarantined-message-structType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="status-code" type="xs:integer"/>
			<xs:element name="status-text" type="xs:string"        minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="quarantined-message-structType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				The quarantined message structure.  Element 'add-info' is opaque.
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
	    	<xs:element name="message-id" type="xs:integer"/>
			<xs:element name="add-info"   type="xs:hexBinary" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>

    <xs:complexType name="share_perms-messages-listType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				Element structure that contains attributes for a third-party, 
				its name and current permissions.
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="third-party-id"        type="xs:string"/>
			<xs:element name="third-party-name"      type="xs:string"/>
			<xs:element name="current-permission"    type="tns:share-perm-valueType"/>
			<xs:element name="deny-allowed"          type="xs:boolean"/>
		</xs:sequence>
	</xs:complexType>

    <xs:complexType name="message-fingerprint-structType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				When reporting by-reference, an instance of this structure contains a
				fingerprint of the message.
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
	    	<xs:element name="alg-id"      type="xs:string"/>
			<xs:element name="fingerprint" type="xs:hexBinary"/>
			<xs:element name="range"       type="xs:string" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>

    <xs:complexType abstract="true" name="message-attribute-baseType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				Abstract message attribute structure.
			</xs:documentation>
		</xs:annotation>
	</xs:complexType>

    <xs:complexType name="email-attribute-structType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				Utilized when message-type parameter is set to 'Email'.
			</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
    		<xs:extension base="tns:message-attribute-baseType">
				<xs:sequence>
					<xs:element name="message-hdr-field" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element name="header-from"       type="xs:string" minOccurs="0"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

    <xs:complexType name="sms-attribute-structType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				Utilized when message-type parameter is set to 'SMS'.
			</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
    		<xs:extension base="tns:message-attribute-baseType">
				<xs:sequence minOccurs="0">
					<xs:element name="dcs"                type="xs:integer"/>
					<xs:element name="origination-addr"   type="xs:string"/>
					<xs:element name="destination-addr"   type="xs:string"/>
					<xs:element name="sca">
					  <xs:simpleType>
    					<xs:restriction base="xs:string">
      						<xs:maxLength value="15"/>
    					</xs:restriction>
  					  </xs:simpleType>
					</xs:element>
					<xs:element name="service-ctr-tstamp" type="xs:string"/>
					<xs:element name="device-tstamp"      type="xs:string"/>
					<xs:element name="pid"                type="xs:integer"/>
					<xs:element name="udl"                type="xs:integer"/>
					<xs:element name="ud-indicator"       type="tns:sms-ma-ud-indicator-valueType"/>
					<xs:element name="udhi"               type="tns:sms-ma-udhi-valueType"/>
					<xs:element name="udh-attached"       type="tns:sms-ma-udh-attached-valueType"/>
					<xs:element name="udh"                type="xs:base64Binary"/>
					<xs:element name="mti"                type="tns:sms-ma-mti-valueType"/>
					<xs:element name="delivery-network"   type="tns:delivery-network-structType"/>
					<xs:element name="interface-type"     type="tns:sms-ma-interface-type-valueType"/>
					<xs:element name="origination-imsi"   type="xs:string"/>
					<xs:element name="destination-imsi"   type="xs:string"/>
					<xs:element name="imei"               type="xs:string"/>
					<xs:element name="cell-id"            type="xs:string"/>
                    <xs:element name="lac"                type="xs:string"/>
					<xs:element name="mcc"                type="xs:string"/>
					<xs:element name="mnc"                type="xs:string"/>
					<xs:element name="message-flood"      type="tns:sms-ma-message-flood-valueType"/>
					<xs:element name="vpf"                type="tns:sms-ma-vpf-valueType"/>
					<xs:element name="vp"                 type="xs:string"/>
					<xs:element name="mr"                 type="tns:sms-ma-mr-valueType"/>  
					<xs:element name="sr"                 type="tns:sms-ma-sr-valueType"/> 
					<xs:element name="concat-msg-segment" type="xs:string"/>   
					<xs:element name="mms"                type="xs:boolean"/>
					<xs:element name="rd"                 type="xs:boolean"/>
					<xs:element name="srq"                type="tns:sms-ma-sr-valueType"/> 
					<xs:element name="dt"                 type="xs:string"/>
					<xs:element name="st"                 type="xs:integer"/>
					<xs:element name="msc-e164">
						<xs:simpleType>
    						<xs:restriction base="xs:string">
      							<xs:maxLength value="15"/>
    						</xs:restriction>
  					  	</xs:simpleType>
					</xs:element>
					<xs:element name="reporting-node"        type="tns:sms-ma-rn-valueType"/>   
					<xs:element name="reporting-node-addr"   type="xs:string"/>
					<xs:element name="origination-node-addr" type="xs:string"/>                   
					<xs:element name="destination-node-addr" type="xs:string"/>
					<xs:element name="esm-class"             type="tns:sms-ma-esm-class-valueType"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

    <xs:complexType name="mms-attribute-structType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				Utilized when message-type parameter is set to 'MMS'.
			</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
    		<xs:extension base="tns:message-attribute-baseType">
				<xs:sequence>
					<xs:element name="message-type" type="xs:string"/>
					<xs:element name="message-id"   type="xs:integer"/>
					<xs:element name="tx-id"        type="xs:string"/>
					<xs:element name="to"           type="xs:string" minOccurs="0"/>
					<xs:element name="from"         type="xs:string" minOccurs="0"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

    <xs:complexType name="im-attribute-structType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				Utilized when message-type parameter is set to 'IM'.
			</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
    		<xs:extension base="tns:message-attribute-baseType">
				<xs:sequence>
					<xs:element name="service-type" type="xs:string"/>
					<xs:element name="to"           type="xs:string" minOccurs="0"/>
					<xs:element name="from"         type="xs:string" minOccurs="0"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

    <xs:complexType name="share_perms-structType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				Share permission structure (not Share_Permission list element).
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="current-permission" type="tns:share-perm-valueType"/>
			<xs:element name="third-party-id"     type="xs:string"/>
		</xs:sequence>
	</xs:complexType>

    <xs:complexType name="detect-info-structType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				Describes the detection method, policy, etc.
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="detection-method"  type="xs:string"/>
			<xs:element name="policy-name"       type="xs:string" minOccurs="0"/>
            <xs:element name="abuse-score"       type="xs:string" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>

    <!-- SpamRep miscellaneous complex data types -->

	<xs:complexType name="delivery-network-structType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				Datatype which describes precisely how an SMS would be delivered.
			</xs:documentation>
		</xs:annotation>
		<xs:sequence minOccurs="0">
			<xs:element name="network"            type="tns:sms-ma-dev-network-valueType"/>
			<xs:element name="sender">
				<xs:simpleType>
    				<xs:restriction base="xs:string">
      					<xs:pattern value="Circuit|Packet"/>
    				</xs:restriction>
  				</xs:simpleType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>

	<!-- SpamRep simple data types -->

    <xs:simpleType name="spam-rep-abuseType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				The parameter AbuseType represented as integral values.
			</xs:documentation>
		</xs:annotation>
    	<xs:restriction base="xs:integer">
      		<xs:enumeration value="0"/>                                    <!-- Spam -->
      		<xs:enumeration value="1"/>                                    <!-- Phishing -->
      		<xs:enumeration value="2"/>                                    <!-- Malware -->
			<xs:enumeration value="3"/>                                    <!-- Not spam -->
			<xs:enumeration value="4"/>                                    <!-- Miscategorized -->
      		<xs:enumeration value="5"/>                                    <!-- Unauthorized Message -->
			<xs:enumeration value="6"/>                                    <!-- Sender Authentication Failure -->
			<xs:enumeration value="7"/>                                    <!-- Invalid Message Format -->
			<xs:enumeration value="8"/>                                    <!-- Other -->
			<xs:enumeration value="9"/>                                    <!-- Unspecified -->
    	</xs:restriction>
	</xs:simpleType>

    <xs:simpleType name="spam-rep-reportType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				Indicates the type of spam reporting.
			</xs:documentation>
		</xs:annotation>
    	<xs:restriction base="xs:string">
      		<xs:enumeration value="By-Value"/>
      		<xs:enumeration value="By-Reference"/>
			<xs:enumeration value="By-Fingerprint"/>
    	</xs:restriction>
	</xs:simpleType>

    <xs:simpleType name="spam-rep-valueType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				The parameter ValueType.
			</xs:documentation>
		</xs:annotation>
    	<xs:restriction base="xs:string">
      		<xs:enumeration value="full"/>
      		<xs:enumeration value="partial"/>
    	</xs:restriction>
	</xs:simpleType>

    <xs:simpleType name="share-perm-valueType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				The share permission structure permission represented as tokens.
			</xs:documentation>
		</xs:annotation>
    	<xs:restriction base="xs:string">
      		<xs:enumeration value="Entire message"/>                                    
      		<xs:enumeration value="Email / phone number"/>                                    
      		<xs:enumeration value="Anonymous"/>                                    
			<xs:enumeration value="Deny"/>                                    
    	</xs:restriction>
	</xs:simpleType>

    <xs:simpleType name="sms-ma-ud-indicator-valueType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				Indication of whether SpamRep Message a verbatim copy of spam, 
				decoded, or removed entirely.
			</xs:documentation>
		</xs:annotation>
    	<xs:restriction base="xs:string">
      		<xs:enumeration value="RAW"/>
      		<xs:enumeration value="DECODED"/>
			<xs:enumeration value="REMOVED"/>
    	</xs:restriction>
	</xs:simpleType>

    <xs:simpleType name="sms-ma-udhi-valueType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				Indication that UDH is present in body of an SMS message.
			</xs:documentation>
		</xs:annotation>
    	<xs:restriction base="xs:string">
      		<xs:enumeration value="Present"/>
      		<xs:enumeration value="Absent"/>
			<xs:enumeration value="Unknown"/>
    	</xs:restriction>
	</xs:simpleType>

    <xs:simpleType name="sms-ma-udh-attached-valueType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				SMS mail attribute which indicates whether the content of the SpamRep 
				message (UD) includes UDH, or only body of the UD.
			</xs:documentation>
		</xs:annotation>
    	<xs:restriction base="xs:string">
      		<xs:enumeration value="True"/>
      		<xs:enumeration value="False"/>
			<xs:enumeration value="Unknown"/>
    	</xs:restriction>
	</xs:simpleType>

    <xs:simpleType name="sms-ma-mti-valueType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				SMS message type indicator field.
			</xs:documentation>
		</xs:annotation>
    	<xs:restriction base="xs:string">
      		<xs:enumeration value="SMS-DELIVER"/>
      		<xs:enumeration value="SMS-DELIVER-REPORT"/>
			<xs:enumeration value="SMS-SUBMIT"/>
      		<xs:enumeration value="SMS-SUBMIT-REPORT"/>
      		<xs:enumeration value="SMS-STATUS-REPORT"/>
			<xs:enumeration value="SMS-COMMAND"/>
			<xs:enumeration value="UNKNOWN"/>
			<xs:enumeration value="OTHER"/>
    	</xs:restriction>
	</xs:simpleType>

    <xs:simpleType name="sms-ma-dev-network-valueType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				Indicates how SMS was or would be delivered.
			</xs:documentation>
		</xs:annotation>
    	<xs:restriction base="xs:string">
      		<xs:enumeration value="GSM"/>
      		<xs:enumeration value="UMTS"/>
			<xs:enumeration value="LTE"/>
      		<xs:enumeration value="3GPP"/>
      		<xs:enumeration value="CDMA"/>
			<xs:enumeration value="Other"/>
			<xs:enumeration value="Unknown"/>
    	</xs:restriction>
	</xs:simpleType>

    <xs:simpleType name="sms-ma-interface-type-valueType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				Convey information about type of interface/nature of transaction.
			</xs:documentation>
		</xs:annotation>
    	<xs:restriction base="xs:integer">
      		<xs:enumeration value="0"/>                    <!-- Mobile Originated/Mobile Terminated -->
      		<xs:enumeration value="1"/>                    <!-- Mobile Originated/Application Terminated -->
      		<xs:enumeration value="2"/>                    <!-- Application Originated/ Mobile Terminated -->
			<xs:enumeration value="3"/>                    <!-- Mobile Originated/Destination Unknown -->
			<xs:enumeration value="4"/>                    <!-- Origination Unknown/Mobile Terminated -->
      		<xs:enumeration value="5"/>                    <!-- Application Originated/Application Terminated -->
			<xs:enumeration value="6"/>                    <!-- Inter-carrier Application Originated/Mobile Terminated -->
			<xs:enumeration value="7"/>                    <!-- Inter-carrier Application Originated/Mobile Terminated -->
			<xs:enumeration value="8"/>                    <!-- Mobile Originated/Inter-carrier Application Terminated -->
    	</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="sms-ma-message-flood-valueType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				Collectively describe a flood of messages.
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
      		<xs:pattern value="([0-9])+,([0-9]+)"/>
    	</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="sms-ma-vpf-valueType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				Validity period format.
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:integer">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="3"/>
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="sms-ma-mr-valueType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				Message reference.
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:integer">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="255"/>
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="sms-ma-sr-valueType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				Status report.
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:integer">
			<xs:pattern value="0|1"/>
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="sms-ma-rn-valueType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				Type of element that reported the spam.
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="SMS_Router"/>
			<xs:enumeration value="IP-SM-GW"/>
			<xs:enumeration value="SMS-SC"/>
			<xs:enumeration value="Mobile_Device"/>
			<xs:enumeration value="Subscriber"/>
			<xs:enumeration value="Email_Gateway"/>
			<xs:enumeration value="Unknown"/>
			<xs:enumeration value="Other"/>
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="sms-ma-esm-class-valueType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				Indicator of presence/absence of UDHI and RP.
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:integer">
			<xs:enumeration value="0"/>							<!-- Normal SMS -->
			<xs:enumeration value="64"/>						<!-- Normal SMS w/UDHI set -->
			<xs:enumeration value="128"/>						<!-- Normal SMS w/Reply Path set -->
			<xs:enumeration value="192"/>						<!-- Normal SMS w/UDHI and Reply Path set -->
		</xs:restriction>
	</xs:simpleType>
</xs:schema>
