<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://www.ismobile.com/coordinator/2006/operations/cwi/event_asgt/" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:coord="http://www.ismobile.com/coordinator/2006/operations/cwi/event_asgt/" xmlns:ty="http://www.ismobile.com/coordinator/2017/types/">
    <!-- Created with com.ismobile.xsdfix:xsdfix:1.1 at 2018-01-19 14:40:43 -->
    <xs:import namespace="http://www.ismobile.com/coordinator/2017/types/" schemaLocation="http://coord.ismobile.com/coordinator/cwi/ws/hard/types.xsd"/>
    <xs:attribute name="target" type="ty:string100"/>
    <xs:attribute name="type" type="ty:string100"/>
    <xs:element name="asgtid" type="ty:string100" nillable="false">
        <xs:annotation>
            <xs:documentation>Assignment ID</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="eventname" type="ty:string100" nillable="false">
        <xs:annotation>
            <xs:documentation>Name of the event, must match a transition in the assignment statemap</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="reportedby" type="ty:string100" nillable="false">
        <xs:annotation>
            <xs:documentation>User or system doing the event</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="timestamp" nillable="false">
        <xs:annotation>
            <xs:documentation>Timestamp for the update</xs:documentation>
        </xs:annotation>
        <xs:complexType> 
            <xs:simpleContent>
                <xs:extension base="ty:baseDatetime">
                    <xs:attribute ref="coord:type" use="required" fixed="datetime"/>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="event">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="coord:asgtid"/>
                <xs:element ref="coord:eventname"/>
                <xs:element ref="coord:reportedby"/>
                <xs:element ref="coord:timestamp" minOccurs="0"/>
            </xs:sequence>
            <xs:attribute ref="coord:target" use="required" fixed="assignment"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="header">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="coord:messageid"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:element name="messageid" type="ty:string100">
        <xs:annotation>
            <xs:documentation>ID of the message from backend system, if this element is set in the XML, an ack/nack will be sent back</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="operation">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="coord:header" minOccurs="0"/>
                <xs:element ref="coord:event"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>
