<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:include schemaLocation="monitor.xsd"/>
<!-- event -->
<xs:element name="event">
<xs:complexType>
<xs:complexContent>
<xs:extension base="baseEventType">
<xs:choice>
<xs:element name="full" type="fullType"/>
<xs:element name="partial" type="partialType"/>
</xs:choice>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<!-- resultFullType -->
<xs:complexType name="fullType">
<xs:sequence>
<xs:element name="group" type="groupType" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<!-- resultPartialType -->
<xs:complexType name="partialType">
<xs:sequence>
<xs:element name="action" type="actionType" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<!-- actionType -->
<xs:complexType name="actionType">
<xs:sequence>
<xs:element name="group" type="groupType" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="type" type="actionTypeContent"/>
</xs:complexType>
<!-- groupType -->
<xs:complexType name="groupType">
<xs:sequence maxOccurs="unbounded">
<xs:choice>
<xs:element name="agent" type="agentType"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="group_id" type="xs:string"/>
</xs:complexType>
<!-- agentType -->
<xs:complexType name="agentType">
<xs:attribute name="agent_id" type="xs:string"/>
<xs:attribute name="is_supervisor" type="xs:boolean"/>
</xs:complexType>
<!-- actionTypeContent -->
<xs:simpleType name="actionTypeContent">
<xs:restriction base="xs:string">
<xs:enumeration value="added"/>
<xs:enumeration value="removed"/>
<xs:enumeration value="changed"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
CODE