<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

    <xsd:element name="notifySync" type="notifySyncType">
        <xsd:annotation>
            <xsd:documentation xml:lang="de">
                Nachricht zur Fernwartung des Telefons
            </xsd:documentation>
        </xsd:annotation>
    </xsd:element>

    <xsd:complexType name="notifySyncType">
        <xsd:sequence>
            <xsd:choice>
                <xsd:element name="startDate" type="xsd:dateTime" minOccurs="0">
                    <xsd:annotation>
                        <xsd:documentation xml:lang="de">
                            Zeitpunkt der Ausführung.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
                <xsd:element name="startDelay" type="xsd:duration" minOccurs="0">
                    <xsd:annotation>
                        <xsd:documentation xml:lang="de">
                            Relative Zeit bis zur Ausführung.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
            </xsd:choice>
            <xsd:element name="etsId" type="xsd:integer" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation xml:lang="de">
                        Art der Anlage, welche die Einstellungen bereitstellt.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="pbxSerial" type="xsd:string" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation xml:lang="de">
                        Seriennummer der Anlage, welche die Einstellungen bereitstellt.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:choice>
                <xsd:element name="updateFirmware" type="updateFirmwareType" minOccurs="0">
                    <xsd:annotation>
                        <xsd:documentation xml:lang="de">
                            Stoesst ein Firmware-Update an.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>

                <xsd:element name="reboot" type="rebootType" minOccurs="0">
                    <xsd:annotation>
                        <xsd:documentation xml:lang="de">
                            Startet das Telefon neu.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>

                <xsd:element name="checkSync" type="checkSyncType" minOccurs="0">
                    <xsd:annotation>
                        <xsd:documentation xml:lang="de">
                            Stoesst ein Provisioning an.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
                <xsd:element name="reregister" type="emptyType" minOccurs="0">
                    <xsd:annotation>
                        <xsd:documentation xml:lang="de">
                            Erneuert die SIP-Registrierung.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
                <xsd:element name="remoteAccess" type="remoteAccessType" minOccurs="0">
                    <xsd:annotation>
                        <xsd:documentation xml:lang="de">
                            Aktiviert eine Verbindung zu einem Remote Access Server.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
            </xsd:choice>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="emptyType" />

    <xsd:complexType name="updateFirmwareType">
        <xsd:sequence>
            <xsd:element name="url" type="xsd:string" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation xml:lang="de">
                        Legt die URL fest, von der das Telefon
                        Einstellungen beziehen soll bzw. zu der es seine eigenen Einstellungen hochladen kann. Ist das
                        Element leer, ist kein Download/Upload moeglich. Fehlt das Element, bleibt die bisherige URL
                        im Telefon erhalten.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="rebootType">
        <xsd:sequence>
            <xsd:element name="reset" type="emptyType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation xml:lang="de">
                        Neustart inklusive Auslieferungsreset.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="checkSyncType">
        <xsd:annotation>
            <xsd:documentation xml:lang="de">
                Stoesst ein Provisioning an.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="url" type="xsd:string" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation xml:lang="de">
                        Legt die URL fest, von der das Telefon
                        Einstellungen beziehen soll bzw. zu der es seine eigenen Einstellungen hochladen kann. Ist das
                        Element leer, ist kein Download/Upload moeglich. Fehlt das Element, bleibt die bisherige URL
                        im Telefon erhalten.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="dataAvailable" type="xsd:boolean" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation xml:lang="de">
                        Zeigt an, ob fuer das Telefon Einstellungen
                        vorliegen. Liegen keine Daten vor, kann das Telefon trotzdem seine eigenen Einstellungen
                        hochladen, sofern die URL bekannt ist. Fehlt das Element, bleibt der alte Wert im Telefon
                        erhalten.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="remoteAccessType">
        <xsd:annotation>
            <xsd:documentation xml:lang="de">
                Aktiviert eine Verbindung zu einem Remote Access Server.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="activate" type="xsd:boolean">
                <xsd:annotation>
                    <xsd:documentation xml:lang="de">
                        Bestimmt, ob der Remote Access aktiviert oder deaktiviert werden soll.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="callerSerialNumber" type="xsd:string" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation xml:lang="de">
                        Seriennummer der Aufrufenden Instanz. 
                        Kann verwendet werden, um Gruppenzuordnungen am Remote Server herzustellen.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>
</xsd:schema>
