<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.cablelabs.com/namespaces/CBI/2.0/xsd/WIFI"
    xmlns:WIFI="http://www.cablelabs.com/namespaces/CBI/2.0/xsd/WIFI"
    xmlns:CBI="http://www.cablelabs.com/namespaces/CBI/2.0/xsd/CBI"
    xmlns:ipdr="http://www.ipdr.org/namespaces/ipdr"
    xmlns:ca="urn:ietf:params:xml:ns:pidf:geopriv10:civicAddr" version="1.0" vc:minVersion="1.1"
    xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning">
    <import namespace="http://www.cablelabs.com/namespaces/CBI/2.0/xsd/CBI"
        schemaLocation="CBI-1.0.xsd"/>
    <import namespace="http://www.ipdr.org/namespaces/ipdr"
        schemaLocation="http://www.ipdr.org/public/IPDRDoc3.5.1.xsd"/>
    <import namespace="urn:ietf:params:xml:ns:pidf:geopriv10:civicAddr"
        schemaLocation="http://www.iana.org/assignments/xml-registry/schema/pidf/geopriv10/civicAddr.xsd"/>
    <include schemaLocation="http://www.ipdr.org/public/IPDRTypes.xsd"/>
    <annotation>
        <documentation>XML Schema for WiFi Intercept.</documentation>
        <documentation>
            <ipdr:reference>Data-Over-Cable Service Interface Specifications: Cable Broadband and Wi-Fi Intercept Specification
                Schema added by ECN CBI2.0-N-1227-5, Accepted 6/3/2015.
            </ipdr:reference>
        </documentation>
    </annotation>
    <element name="UserName">
        <simpleType>
            <restriction base="string">
                <minLength value="1"/>
                <maxLength value="255"/>
            </restriction>
        </simpleType>
    </element>
    <element name="CalledStationId" type="ipdr:macAddress"/>
    <element name="CallingStationId" type="ipdr:macAddress"/>
    <element name="CallingStationIpAddress" type="CBI:IpAddrType"/>
    <element name="AccountSessionId">
        <simpleType>
            <restriction base="string">
                <minLength value="1"/>
                <maxLength value="256"/>
            </restriction>
        </simpleType>
    </element>
    <element name="ReplyMessage">
        <simpleType>
            <restriction base="string">
                <minLength value="1"/>
                <maxLength value="160"/>
            </restriction>
        </simpleType>
    </element>
    <simpleType name="NASFQDNType">
        <restriction base="string">
            <minLength value="1"/>
            <maxLength value="256"/>
        </restriction>
    </simpleType>
    <complexType name="NASIdType">
        <choice>
            <element name="NASFQDN" type="WIFI:NASFQDNType"/>
            <element name="NASIpAddress" type="CBI:IpAddrType"/>
        </choice>
    </complexType>
    <element name="NASId" type="WIFI:NASIdType"/>
    <element name="SessionTimeout" type="unsignedInt"/>
    <element name="IdleTimeout" type="unsignedInt"/>
    <element name="ServiceType">
        <simpleType>
            <restriction base="string">
                <enumeration value="Login"/>
                <enumeration value="Framed"/>
                <enumeration value="Callback Login"/>
                <enumeration value="Callback Framed"/>
                <enumeration value="Outbound"/>
                <enumeration value="Administrative"/>
                <enumeration value="NAS Prompt"/>
                <enumeration value="Authenticate Only"/>
                <enumeration value="Callback NAS Prompt"/>
                <enumeration value="Call Check"/>
                <enumeration value="Callback Administrative"/>
            </restriction>
        </simpleType>
    </element>
    <element name="AccessAttempt">
        <complexType>
            <sequence>
                <element ref="CBI:CaseIdentity"/>
                <element ref="CBI:MFSystemIdentity"/>
                <element ref="CBI:TimeStamp"/>
                <element ref="WIFI:UserName" minOccurs="0"/>
                <element ref="WIFI:CalledStationId"/>
                <element ref="WIFI:CallingStationId"/>
                <element ref="WIFI:AccountSessionId" minOccurs="0"/>
                <element ref="WIFI:NASId"/>
                <element ref="WIFI:ServiceType" minOccurs="0"/>
                <element ref="WIFI:CallingStationIpAddress" minOccurs="0"/>
                <element ref="CBI:LocationInformation" minOccurs="0"/>
            </sequence>
        </complexType>
    </element>
    <element name="AccessSessionAccepted">
        <complexType>
            <sequence>
                <element ref="CBI:CaseIdentity"/>
                <element ref="CBI:MFSystemIdentity"/>
                <element ref="CBI:TimeStamp"/>
                <element ref="WIFI:UserName" minOccurs="0"/>
                <element ref="WIFI:CalledStationId"/>
                <element ref="WIFI:CallingStationId"/>
                <element ref="WIFI:NASId"/>
                <element ref="WIFI:ServiceType" minOccurs="0"/>
                <element ref="WIFI:CallingStationIpAddress" minOccurs="0"/>
                <element ref="WIFI:SessionTimeout" minOccurs="0"/>
                <element ref="WIFI:IdleTimeout" minOccurs="0"/>
            </sequence>
        </complexType>
    </element>
    <element name="AccessFailed">
        <complexType>
            <sequence>
                <element ref="CBI:CaseIdentity"/>
                <element ref="CBI:MFSystemIdentity"/>
                <element ref="CBI:TimeStamp"/>
                <element ref="WIFI:UserName" minOccurs="0"/>
                <element ref="WIFI:CalledStationId"/>
                <element ref="WIFI:CallingStationId"/>
                <element ref="WIFI:AccountSessionId" minOccurs="0"/>
                <element ref="WIFI:ReplyMessage" minOccurs="0"/>
            </sequence>
        </complexType>
    </element>
    <element name="AccessSessionEnd">
        <complexType>
            <sequence>
                <element ref="CBI:CaseIdentity"/>
                <element ref="CBI:MFSystemIdentity"/>
                <element ref="CBI:TimeStamp"/>
                <element ref="WIFI:UserName" minOccurs="0"/>
                <element ref="WIFI:CalledStationId"/>
                <element ref="WIFI:CallingStationId"/>
                <element ref="WIFI:AccountSessionId" minOccurs="0"/>
                <element ref="CBI:LocationInformation" minOccurs="0"/>
            </sequence>
        </complexType>
    </element>
    <element name="WIFISMessage">
        <complexType>
            <choice>
                <element ref="WIFI:AccessAttempt"/>
                <element ref="WIFI:AccessSessionAccepted"/>
                <element ref="WIFI:AccessFailed"/>
                <element ref="WIFI:AccessSessionEnd"/>
                <element ref="CBI:SurveillanceStatusReport"/>
                <element ref="CBI:PacketDataSummaryReport"/>
            </choice>
        </complexType>
    </element>
    <element name="WIFISMessages">
        <complexType>
            <sequence>
                <element ref="WIFI:WIFISMessage" maxOccurs="unbounded"/>
            </sequence>
        </complexType>
    </element>
</schema>
