<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:mule="http://www.mulesoft.org/schema/mule/core" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" targetNamespace="http://www.mulesoft.org/schema/mule/apple-push">
  <xs:import namespace="http://www.w3.org/XML/1998/namespace"></xs:import>
  <xs:import schemaLocation="http://www.springframework.org/schema/beans/spring-beans-3.0.xsd" namespace="http://www.springframework.org/schema/beans"></xs:import>
  <xs:import schemaLocation="http://www.mulesoft.org/schema/mule/core/current/mule.xsd" namespace="http://www.mulesoft.org/schema/mule/core"></xs:import>
  <xs:import schemaLocation="http://www.mulesoft.org/schema/mule/devkit/current/mule-devkit.xsd" namespace="http://www.mulesoft.org/schema/mule/devkit"></xs:import>
  <xs:simpleType name="integerType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:integer"></xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="\#\[[^\]]+\]"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="decimalType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:decimal"></xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="\#\[[^\]]+\]"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="floatType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:float"></xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="\#\[[^\]]+\]"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="doubleType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:double"></xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="\#\[[^\]]+\]"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="dateTimeType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:dateTime"></xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="\#\[[^\]]+\]"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="longType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:long"></xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="\#\[[^\]]+\]"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="byteType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:byte"></xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="\#\[[^\]]+\]"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="booleanType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:boolean"></xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="\#\[[^\]]+\]"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="anyUriType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:anyURI"></xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="\#\[[^\]]+\]"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="charType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:minLength value="1"></xs:minLength>
          <xs:maxLength value="1"></xs:maxLength>
        </xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="\#\[[^\]]+\]"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:complexType name="XmlType">
    <xs:sequence>
      <xs:any maxOccurs="unbounded" minOccurs="0" processContents="lax"></xs:any>
    </xs:sequence>
    <xs:attribute name="ref" use="optional" type="xs:string">
      <xs:annotation>
        <xs:documentation>The reference object for this parameter</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:element xmlns:devkit="http://www.mulesoft.org/schema/mule/devkit" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="config" substitutionGroup="mule:abstract-extension" devkit:javaClass="org.mule.modules.applepush.config.ApplePushCloudConnectorLifecycleAdapter">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="mule:abstractExtensionType">
          <xs:annotation>
            <xs:documentation>Mule Connector for
&lt;a href="http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html"&gt;
Apple Push&lt;/a&gt;
&lt;p&gt;
Apple Push Notification service (APNs for short) is the centerpiece of the push
notifications feature. It is a robust and highly efficient service for propagating
information to devices such as iPhone, iPad, and iPod touch devices. Each device
establishes an accredited and encrypted IP connection with the service and
receives notifications over this persistent connection. If a notification for an
application arrives when that application is not running, the device alerts the
user that the application has data waiting for it.
&lt;/p&gt;
&lt;p&gt;
Software developers (‚Äúproviders‚Äù) originate the notifications in their server
software. The provider connects with APNs through a persistent and secure channel
while monitoring incoming data intended for their client applications. When new
data for an application arrives, the provider prepares and sends a notification
through the channel to APNs, which pushes the notification to the target device.
&lt;/p&gt;</xs:documentation>
          </xs:annotation>
          <xs:attribute name="name" use="optional" type="xs:string">
            <xs:annotation>
              <xs:documentation>Give a name to this configuration so it can be later referenced by config-ref.</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="host" use="required" type="xs:string">
            <xs:annotation>
              <xs:documentation>Hostname of Apple's Push Notification Gateway</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute xmlns="http://www.mulesoft.org/schema/mule/apple-push" name="port" use="required" type="integerType">
            <xs:annotation>
              <xs:documentation>Port number of Apple's Push Notification Gateway</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="keystore" use="required" type="xs:string">
            <xs:annotation>
              <xs:documentation>Filename of the keystore which contains the SSL certificate. The file needs be
available on the classpath and must be of PKCS #12 format.</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="keystorePassword" use="required" type="xs:string">
            <xs:annotation>
              <xs:documentation>Password of the keystore</xs:documentation>
            </xs:annotation>
          </xs:attribute>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  <xs:element xmlns="http://www.mulesoft.org/schema/mule/apple-push" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="send" substitutionGroup="mule:abstract-message-processor" type="SendType">
    <xs:annotation>
      <xs:documentation>Sends a push notification with the provided information to the iPhone
identified by deviceToken.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="SendType">
    <xs:complexContent>
      <xs:extension xmlns:mule="http://www.mulesoft.org/schema/mule/core" base="mule:abstractMessageProcessorType">
        <xs:sequence>
          <xs:element name="fields" maxOccurs="1" minOccurs="0">
            <xs:annotation>
              <xs:documentation>Application-specific custom fields. These values are presented to the application and the iOS doesn't display them automatically.</xs:documentation>
            </xs:annotation>
            <xs:complexType>
              <xs:choice>
                <xs:sequence>
                  <xs:element name="field" maxOccurs="unbounded" minOccurs="0">
                    <xs:complexType>
                      <xs:simpleContent>
                        <xs:extension base="xs:string">
                          <xs:attribute name="value-ref" use="optional" type="xs:string"></xs:attribute>
                          <xs:attribute name="key" type="xs:string"></xs:attribute>
                        </xs:extension>
                      </xs:simpleContent>
                    </xs:complexType>
                  </xs:element>
                </xs:sequence>
                <xs:sequence>
                  <xs:any maxOccurs="unbounded" minOccurs="0" processContents="lax"></xs:any>
                </xs:sequence>
              </xs:choice>
              <xs:attribute name="ref" use="optional" type="xs:string">
                <xs:annotation>
                  <xs:documentation>The reference object for this parameter</xs:documentation>
                </xs:annotation>
              </xs:attribute>
            </xs:complexType>
          </xs:element>
        </xs:sequence>
        <xs:attribute name="config-ref" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>Specify which configuration to use for this invocation.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="deviceToken" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>The device token of the iPhone to which this notification is intended</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="alert" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>The alert body of the notification</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="sound" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>The name of a sound file in the application bundle. The sound in this file is played as an alert. If the sound file doesn‚Äôt exist or default is specified as the value, the default alert sound is played.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute xmlns="http://www.mulesoft.org/schema/mule/apple-push" name="badge" default="-1" use="optional" type="integerType">
          <xs:annotation>
            <xs:documentation>The number to display as the badge of the application icon. If this Configurable is absent, any badge number currently shown is removed.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
</xs:schema>