<?xml version="1.0" encoding="UTF-8"?>
<!-- March 14, 2007 -->
<xsd:schema
   targetNamespace="http://www.csapi.org/schema/parlayx/message_broadcast/v4_0"
   xmlns:message_broadcast_xsd="http://www.csapi.org/schema/parlayx/message_broadcast/v4_0"
   xmlns:parlayx_common_xsd="http://www.csapi.org/schema/parlayx/common/v4_0"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema">

   <xsd:import namespace="http://www.csapi.org/schema/parlayx/common/v4_0" schemaLocation="parlayx_common_types_4_0.xsd"/>

   <xsd:complexType name="BroadcastStatusData">
      <xsd:sequence>
         <xsd:element name="area" type="message_broadcast_xsd:BroadcastArea"/>
         <xsd:element name="reportStatus" type="parlayx_common_xsd:RetrievalStatus"/>
         <xsd:element name="currentStatus" type="message_broadcast_xsd:BroadcastStatusInformation" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="errorInformation" type="parlayx_common_xsd:ServiceError" minOccurs="0" maxOccurs="1"/>
      </xsd:sequence>
   </xsd:complexType>

   <xsd:complexType name="BroadcastArea">
      <xsd:sequence>
         <xsd:element name="UnionElement" type="message_broadcast_xsd:AreaType"/>
         <xsd:element name="Alias" type="xsd:string" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="Circle" type="message_broadcast_xsd:Circle" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="Polygon" type="message_broadcast_xsd:Polygon" minOccurs="0" maxOccurs="1"/>
      </xsd:sequence>
   </xsd:complexType>

   <xsd:complexType name="BroadcastStatusInformation">
      <xsd:sequence>
         <xsd:element name="status" type="message_broadcast_xsd:BroadcastStatus"/>
         <xsd:element name="numberOfBroadcasts" type="xsd:int" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="successRate" type="xsd:int" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="broadcastEndTime" type="xsd:dateTime" minOccurs="0" maxOccurs="1"/>
      </xsd:sequence>
   </xsd:complexType>

   <xsd:complexType name="Circle">
      <xsd:sequence>
         <xsd:element name="center" type="message_broadcast_xsd:LocationPoint"/>
         <xsd:element name="radius" type="xsd:float"/>
      </xsd:sequence>
   </xsd:complexType>

   <xsd:complexType name="Polygon">
      <xsd:sequence>
         <xsd:element name="locationPoints" type="message_broadcast_xsd:LocationPoint" minOccurs="3" maxOccurs="13"/>
      </xsd:sequence>
   </xsd:complexType>

   <xsd:complexType name="LocationPoint">
      <xsd:sequence>
         <xsd:element name="latitude" type="xsd:float"/>
         <xsd:element name="longitude" type="xsd:float"/>
      </xsd:sequence>
   </xsd:complexType>

   <xsd:simpleType name="BroadcastStatus">
      <xsd:restriction base="xsd:string">
         <xsd:enumeration value="MessageWaiting"/>
         <xsd:enumeration value="Broadcasting"/>
         <xsd:enumeration value="Broadcasted"/>
         <xsd:enumeration value="BroadcastImpossible"/>
         <xsd:enumeration value="BroadcastUnknown"/>
         <xsd:enumeration value="BroadcastNotificationNotSupported"/>
      </xsd:restriction>
   </xsd:simpleType>

   <xsd:simpleType name="AreaType">
      <xsd:restriction base="xsd:string">
         <xsd:enumeration value="Alias"/>
         <xsd:enumeration value="Circle"/>
         <xsd:enumeration value="Polygon"/>
      </xsd:restriction>
   </xsd:simpleType>

   <xsd:simpleType name="MessagePriority">
      <xsd:restriction base="xsd:string">
         <xsd:enumeration value="Default"/>
         <xsd:enumeration value="Low"/>
         <xsd:enumeration value="Normal"/>
         <xsd:enumeration value="High"/>
      </xsd:restriction>
   </xsd:simpleType>
</xsd:schema>
