<?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/cloudhub">
  <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.cloudhub.adapters.CloudHubConnectorLifecycleAdapter">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="mule:abstractExtensionType">
          <xs:annotation>
            <xs:documentation>Provides the ability to interact with Mule CloudHub from within a Mule application. There are operations to deploy, start,
stop, and update applications as well as send notifications from your application to CloudHub.
&lt;p&gt;
When running this connector in an application inside CloudHub, it will use token based authentication
to access the API. This will allow access and usage of the CloudHub APIs without the need
to specify your username and password.
&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="url" default="https://muleion.com/" use="optional" type="xs:string">
            <xs:annotation>
              <xs:documentation>CloudHub URL.</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="username" use="optional" type="xs:string">
            <xs:annotation>
              <xs:documentation>CloudHub username.</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="password" use="optional" type="xs:string">
            <xs:annotation>
              <xs:documentation>CloudHub password.</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute xmlns="http://www.mulesoft.org/schema/mule/cloudhub" name="maxWaitTime" default="0" use="optional" type="longType">
            <xs:annotation>
              <xs:documentation>Maximum time allowed to deplpoy/undeploy.</xs:documentation>
            </xs:annotation>
          </xs:attribute>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  <xs:element xmlns="http://www.mulesoft.org/schema/mule/cloudhub" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="deploy-application" substitutionGroup="mule:abstract-message-processor" type="DeployApplicationType">
    <xs:annotation>
      <xs:documentation>Deploy specified application.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="DeployApplicationType">
    <xs:complexContent>
      <xs:extension xmlns:mule="http://www.mulesoft.org/schema/mule/core" base="mule:abstractMessageProcessorType">
        <xs:sequence>
          <xs:element name="environment-variables" maxOccurs="1" minOccurs="0">
            <xs:annotation>
              <xs:documentation>Environment variables for you application.</xs:documentation>
            </xs:annotation>
            <xs:complexType>
              <xs:choice>
                <xs:sequence>
                  <xs:element name="environment-variable" 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="domain" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>The application domain.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="muleVersion" default="3.2.2" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>The version of Mule, e.g. 3.2.2.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute xmlns="http://www.mulesoft.org/schema/mule/cloudhub" name="workerCount" default="1" use="optional" type="integerType">
          <xs:annotation>
            <xs:documentation>The number of workers to deploy.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element xmlns="http://www.mulesoft.org/schema/mule/cloudhub" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="list-applications" substitutionGroup="mule:abstract-message-processor" type="ListApplicationsType">
    <xs:annotation>
      <xs:documentation>List applications.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="ListApplicationsType">
    <xs:complexContent>
      <xs:extension xmlns:mule="http://www.mulesoft.org/schema/mule/core" base="mule:abstractMessageProcessorType">
        <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:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element xmlns="http://www.mulesoft.org/schema/mule/cloudhub" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="get-application" substitutionGroup="mule:abstract-message-processor" type="GetApplicationType">
    <xs:annotation>
      <xs:documentation>Get an application.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="GetApplicationType">
    <xs:complexContent>
      <xs:extension xmlns:mule="http://www.mulesoft.org/schema/mule/core" base="mule:abstractMessageProcessorType">
        <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="domain" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>The application domain.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element xmlns="http://www.mulesoft.org/schema/mule/cloudhub" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="update-application" substitutionGroup="mule:abstract-message-processor" type="UpdateApplicationType">
    <xs:annotation>
      <xs:documentation>Update an application.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="UpdateApplicationType">
    <xs:complexContent>
      <xs:extension xmlns:mule="http://www.mulesoft.org/schema/mule/core" base="mule:abstractMessageProcessorType">
        <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="application-ref" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>The application to update.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element xmlns="http://www.mulesoft.org/schema/mule/cloudhub" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="start-application" substitutionGroup="mule:abstract-message-processor" type="StartApplicationType">
    <xs:annotation>
      <xs:documentation>Start an application.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="StartApplicationType">
    <xs:complexContent>
      <xs:extension xmlns:mule="http://www.mulesoft.org/schema/mule/core" base="mule:abstractMessageProcessorType">
        <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="domain" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>The application domain.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element xmlns="http://www.mulesoft.org/schema/mule/cloudhub" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="stop-application" substitutionGroup="mule:abstract-message-processor" type="StopApplicationType">
    <xs:annotation>
      <xs:documentation>Stop an application.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="StopApplicationType">
    <xs:complexContent>
      <xs:extension xmlns:mule="http://www.mulesoft.org/schema/mule/core" base="mule:abstractMessageProcessorType">
        <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="domain" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>The application domain.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element xmlns="http://www.mulesoft.org/schema/mule/cloudhub" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="delete-application" substitutionGroup="mule:abstract-message-processor" type="DeleteApplicationType">
    <xs:annotation>
      <xs:documentation>Delete an application.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="DeleteApplicationType">
    <xs:complexContent>
      <xs:extension xmlns:mule="http://www.mulesoft.org/schema/mule/core" base="mule:abstractMessageProcessorType">
        <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="domain" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>The application domain.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element xmlns="http://www.mulesoft.org/schema/mule/cloudhub" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="list-notifications" substitutionGroup="mule:abstract-message-processor" type="ListNotificationsType">
    <xs:annotation>
      <xs:documentation>List a user's notifications.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="ListNotificationsType">
    <xs:complexContent>
      <xs:extension xmlns:mule="http://www.mulesoft.org/schema/mule/core" base="mule:abstractMessageProcessorType">
        <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 xmlns="http://www.mulesoft.org/schema/mule/cloudhub" name="maxResults" use="optional" type="integerType">
          <xs:annotation>
            <xs:documentation>The maximum number of results to retrieve.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute xmlns="http://www.mulesoft.org/schema/mule/cloudhub" name="offset" use="optional" type="integerType">
          <xs:annotation>
            <xs:documentation>The offset to start listing alerts from.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element xmlns="http://www.mulesoft.org/schema/mule/cloudhub" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="dismiss-notification" substitutionGroup="mule:abstract-message-processor" type="DismissNotificationType">
    <xs:annotation>
      <xs:documentation>Dismiss an individual notification.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="DismissNotificationType">
    <xs:complexContent>
      <xs:extension xmlns:mule="http://www.mulesoft.org/schema/mule/core" base="mule:abstractMessageProcessorType">
        <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="href" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>the href property of the Notification object.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element xmlns="http://www.mulesoft.org/schema/mule/cloudhub" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="create-notification" substitutionGroup="mule:abstract-message-processor" type="CreateNotificationType">
    <xs:annotation>
      <xs:documentation>Create a notification inside CloudHub.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="CreateNotificationType">
    <xs:complexContent>
      <xs:extension xmlns:mule="http://www.mulesoft.org/schema/mule/core" base="mule:abstractMessageProcessorType">
        <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="message" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>the contents of the notification.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute xmlns="http://www.mulesoft.org/schema/mule/cloudhub" name="priority" use="required" type="PriorityEnumType">
          <xs:annotation>
            <xs:documentation>The notification priority.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="domain" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>The application domain.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element xmlns="http://www.mulesoft.org/schema/mule/cloudhub" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="create-notification-from-flow" substitutionGroup="mule:abstract-message-processor" type="CreateNotificationFromFlowType">
    <xs:annotation>
      <xs:documentation>Create a notification inside CloudHub for your flow. If not running in an CloudHub environment, this will log
to the console.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="CreateNotificationFromFlowType">
    <xs:complexContent>
      <xs:extension xmlns:mule="http://www.mulesoft.org/schema/mule/core" base="mule:abstractMessageProcessorType">
        <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="message" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>the contents of the notification.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute xmlns="http://www.mulesoft.org/schema/mule/cloudhub" name="priority" use="required" type="PriorityEnumType">
          <xs:annotation>
            <xs:documentation>The notification priority.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute xmlns="http://www.mulesoft.org/schema/mule/cloudhub" name="includeStacktrace" default="true" use="optional" type="booleanType">
          <xs:annotation>
            <xs:documentation>If the message payload contains an Exception, whether or not to include the stacktrace. True by default.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="PriorityEnumType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="INFO"></xs:enumeration>
          <xs:enumeration value="ERROR"></xs:enumeration>
          <xs:enumeration value="WARN"></xs:enumeration>
        </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:schema>