<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="urn:ibm:names:ws:provisioning:0.1:notify" 
        xmlns:notify="urn:ibm:names:ws:provisioning:0.1:notify"
        xmlns:core="urn:ibm:names:ws:provisioning:0.1:core"
        xmlns:api="urn:ibm:names:ws:provisioning:0.1:api"        
        xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

    <import namespace="urn:ibm:names:ws:provisioning:0.1:core" schemaLocation="core.xsd"/>
    <import namespace="urn:ibm:names:ws:provisioning:0.1:api" schemaLocation="api.xsd"/>
    
    <element name="NotificationSubscription" type="notify:NotificationSubscriptionType"/>  
    <complexType name="NotificationSubscriptionType">
        <annotation>
            <documentation>This structure acts as an identifier for a particular subscription.</documentation>
        </annotation>       
        <sequence>
            <element name="identifier" type="core:ProvisioningIdentifierType" minOccurs="1" maxOccurs="1"/>    
            <element name="expiration" type="dateTime" minOccurs="0" maxOccurs="1"/>  
        </sequence>
    </complexType>
    
    <element name="SubscribeRequest" type="notify:SubscribeRequestType"/>  
    <complexType name="SubscribeRequestType">
        <annotation>
            <documentation>Subscribe.</documentation>
        </annotation>   
        <sequence>
            <element name="listener" type="string" minOccurs="1" maxOccurs="1">  
                <annotation>
                    <documentation>The URL of the listener.  Must be a NotificationListenerPort portType.</documentation>
                </annotation>
            </element>
            <element name="interval" type="long" minOccurs="0"/>
            <element name="criteria" type="core:ProvisionedItemFilterType" minOccurs="0"/>
            <element name="subscription" type="notify:NotificationSubscriptionType" minOccurs="0"/> 
        </sequence>
    </complexType>
    
    <element name="SubscribeResponse" type="notify:SubscribeResponseType"/>  
    <complexType name="SubscribeResponseType">
        <annotation>
            <documentation>Subscribe Response.</documentation>
        </annotation>   
        <sequence>
            <element name="subscription" type="notify:NotificationSubscriptionType" minOccurs="0" maxOccurs="1"/>
            <element name="status" type="core:ProvisioningRequestStatusType" minOccurs="1"/>      
        </sequence>
    </complexType>
    
    <element name="UnsubscribeRequest" type="notify:UnsubscribeRequestType"/>  
    <complexType name="UnsubscribeRequestType">
        <annotation>
            <documentation>Unsubscribe.</documentation>
        </annotation>   
        <sequence>
            <element name="subscription" type="notify:NotificationSubscriptionType" minOccurs="1" maxOccurs="unbounded"/>
        </sequence>
    </complexType>
    
    <element name="UnsubscribeResponse" type="notify:UnsubscribeResponseType"/>  
    <complexType name="UnsubscribeResponseType">
        <annotation>
            <documentation>Unsubscribe reponse.</documentation>
        </annotation>  
        <sequence>
            <element name="status" type="core:ProvisioningObjectStatusType" minOccurs="1" maxOccurs="unbounded"/>      
        </sequence>        
    </complexType>
    
</schema>

