queue_config_event.xsd
Схема подписки на состояние очередей для супервизора.
<?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="profile" type="profileType" 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="profile" type="profileType" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="type" type="actionTypeContent"/>
</xs:complexType>
<!-- profileType -->
<xs:complexType name="profileType">
<xs:sequence maxOccurs="unbounded">
<xs:element name="reason" type="reasonType"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string"/>
</xs:complexType>
<!-- reasonType -->
<xs:complexType name="reasonType">
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="en" type="xs:string"/>
<xs:attribute name="ru" type="xs:string"/>
</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>
XML
Примеры:
full:
<?xml version="1.0"?>
<event name="queue_config_event" timestamp="1970/01/01 07:00:00">
<full>
<queue queue_id="queue2" description="">
<operators>
<operator operator_id="101" type="alias"/>
</operators>
<groups>
<group group_id="group2"/>
<group group_id="group1"/>
</groups>
</queue>
<queue queue_id="queue1" description="some description">
<operators>
<operator operator_id="564" type="agent"/>
</operators>
<groups>
<group group_id="default"/>
</groups>
</queue>
</full>
</event>
CODE
partial:
<?xml version="1.0"?>
<event name="queue_config_event" timestamp="1970/01/01 07:00:00">
<partial>
<action type="added">
<queue queue_id="queue3" description="">
<operators/>
<groups>
<group group_id="group1"/>
</groups>
</queue>
</action>
<action type="removed">
<queue queue_id="queue4" description="">
<operators/>
<groups>
<group group_id="group2"/>
</groups>
</queue>
</action>
<action type="changed">
<queue queue_id="queue5" description="changed description">
<operators>
<operator operator_id="564" type="agent"/>
</operators>
<groups>
<group group_id="changed_group"/>
</groups>
</queue>
</action>
</partial>
</event
CODE