<?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/rest">
  <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.rest.config.RestModuleLifecycleAdapter">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="mule:abstractExtensionType">
          <xs:annotation>
            <xs:documentation>A Mule module for implementing REST APIs whitin flows.
The module includes a custom router that will dispatch the message
to the inner message processors as long as the URI matches and
the processors are attached to the right HTTP method.</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:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  <xs:element xmlns="http://www.mulesoft.org/schema/mule/rest" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="router" substitutionGroup="mule:abstract-intercepting-message-processor" type="RouterType">
    <xs:annotation>
      <xs:documentation>A REST router is an intercepting message processor that will only execute if the incoming message
contains a &lt;i&gt;http.request.path&lt;/i&gt; property that matches the templareUri parameter.
&lt;p/&gt;
An URI template is a URI-like String that contained variables marked of in
braces (&lt;code&gt;{&lt;/code&gt;, &lt;code&gt;&lt;/code&gt;), which can be expanded to produce a URI.
&lt;p/&gt;
The following is an example URI template:
&lt;p/&gt;
&lt;code&gt;
/hotels/{hotel/bookings/{booking
&lt;/code&gt;
&lt;p/&gt;
If the incoming URI matches the template it will extract the variables in it and it will make them available as
properties.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="RouterType">
    <xs:complexContent>
      <xs:extension xmlns:mule="http://www.mulesoft.org/schema/mule/core" base="mule:abstractInterceptingMessageProcessorType">
        <xs:sequence>
          <xs:element name="get" maxOccurs="1" minOccurs="0">
            <xs:annotation>
              <xs:documentation>Processor to be executed when the HTTP method is "GET"</xs:documentation>
            </xs:annotation>
            <xs:complexType>
              <xs:group ref="mule:messageProcessorOrOutboundEndpoint" maxOccurs="unbounded" minOccurs="0"></xs:group>
              <xs:attribute name="text" use="optional" type="xs:string"></xs:attribute>
            </xs:complexType>
          </xs:element>
          <xs:element name="put" maxOccurs="1" minOccurs="0">
            <xs:annotation>
              <xs:documentation>Processor to be executed when the HTTP method is "PUT"</xs:documentation>
            </xs:annotation>
            <xs:complexType>
              <xs:group ref="mule:messageProcessorOrOutboundEndpoint" maxOccurs="unbounded" minOccurs="0"></xs:group>
              <xs:attribute name="text" use="optional" type="xs:string"></xs:attribute>
            </xs:complexType>
          </xs:element>
          <xs:element name="post" maxOccurs="1" minOccurs="0">
            <xs:annotation>
              <xs:documentation>Processor to be executed when the HTTP method is "POST"</xs:documentation>
            </xs:annotation>
            <xs:complexType>
              <xs:group ref="mule:messageProcessorOrOutboundEndpoint" maxOccurs="unbounded" minOccurs="0"></xs:group>
              <xs:attribute name="text" use="optional" type="xs:string"></xs:attribute>
            </xs:complexType>
          </xs:element>
          <xs:element name="delete" maxOccurs="1" minOccurs="0">
            <xs:annotation>
              <xs:documentation>Processor to be executed when the HTTP method is "DELETE"</xs:documentation>
            </xs:annotation>
            <xs:complexType>
              <xs:group ref="mule:messageProcessorOrOutboundEndpoint" maxOccurs="unbounded" minOccurs="0"></xs:group>
              <xs:attribute name="text" use="optional" type="xs:string"></xs:attribute>
            </xs:complexType>
          </xs:element>
          <xs:element name="patch" maxOccurs="1" minOccurs="0">
            <xs:annotation>
              <xs:documentation>Processor to be executed when the HTTP method is "PATCH"</xs:documentation>
            </xs:annotation>
            <xs:complexType>
              <xs:group ref="mule:messageProcessorOrOutboundEndpoint" maxOccurs="unbounded" minOccurs="0"></xs:group>
              <xs:attribute name="text" use="optional" type="xs:string"></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="templateUri" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Template URI string. Variables need to be contained within braces &lt;code&gt;{&lt;/code&gt;, &lt;code&gt;&lt;/code&gt;.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
</xs:schema>