<?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/objectstore">
  <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.adapters.ObjectStoreModuleInjectionAdapter">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="mule:abstractExtensionType">
          <xs:annotation>
            <xs:documentation>Generic module for accessing Object Stores.
&lt;p/&gt;
Can be used with Mule default implementations or one can be passed via ref. It allows to store,
retrieve and remove objects from the store.</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="partition" use="optional" type="xs:string">
            <xs:annotation>
              <xs:documentation>Name of the partition in the default in-memory or persistent object stores (this argument has no
meaning if the object store is passed by ref using objectStore-ref)</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute xmlns="http://www.mulesoft.org/schema/mule/objectstore" name="persistent" default="false" use="optional" type="booleanType">
            <xs:annotation>
              <xs:documentation>Specified whenever the required store needs to be persistent or not (this argument has no
meaning if the object store is passed by ref using objectStore-ref)</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="objectStore-ref" use="optional" type="xs:string">
            <xs:annotation>
              <xs:documentation>Reference to an Object Store bean. This is optional and if it is not specified then the default
in-memory or persistent store will be used.</xs:documentation>
            </xs:annotation>
          </xs:attribute>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  <xs:element xmlns="http://www.mulesoft.org/schema/mule/objectstore" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="store" substitutionGroup="mule:abstract-message-processor" type="StoreType">
    <xs:annotation>
      <xs:documentation>Store object
&lt;p/&gt;</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="StoreType">
    <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="key" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>The identifier of the object to store</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="value-ref" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>The object to store. If you want this to be the payload then use value-ref="#[payload]".</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute xmlns="http://www.mulesoft.org/schema/mule/objectstore" name="overwrite" default="false" use="optional" type="booleanType">
          <xs:annotation>
            <xs:documentation>True if you want to overwrite the existing object.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element xmlns="http://www.mulesoft.org/schema/mule/objectstore" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="dual-store" substitutionGroup="mule:abstract-message-processor" type="DualStoreType">
    <xs:annotation>
      <xs:documentation>Store value using key, and also store key using value.
&lt;p/&gt;</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="DualStoreType">
    <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="key" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>The identifier of the object to store</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="value-ref" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>The object to store. If you want this to be the payload then use value-ref="#[payload]".</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute xmlns="http://www.mulesoft.org/schema/mule/objectstore" name="overwrite" default="false" use="optional" type="booleanType">
          <xs:annotation>
            <xs:documentation>True if you want to overwrite the existing object.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element xmlns="http://www.mulesoft.org/schema/mule/objectstore" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="retrieve" substitutionGroup="mule:abstract-message-processor" type="RetrieveType">
    <xs:annotation>
      <xs:documentation>Retrieve the given Object.
&lt;p/&gt;</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="RetrieveType">
    <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="key" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>The identifier of the object to retrieve.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="defaultValue-ref" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>The default value if the key does not exists.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element xmlns="http://www.mulesoft.org/schema/mule/objectstore" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="remove" substitutionGroup="mule:abstract-message-processor" type="RemoveType">
    <xs:annotation>
      <xs:documentation>Remove the object with key.
&lt;p/&gt;</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="RemoveType">
    <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="key" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>The identifier of the object to remove.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element xmlns="http://www.mulesoft.org/schema/mule/objectstore" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="all-keys" substitutionGroup="mule:abstract-message-processor" type="AllKeysType">
    <xs:annotation>
      <xs:documentation>Returns a list of all the keys in the store.
&lt;p/&gt;
&lt;i&gt;&lt;b&gt;IMPORTANT:&lt;/b&gt; Not all stores support this method. If the method is not supported a java.lang.UnsupportedOperationException is thrown&lt;/i&gt;
&lt;p/&gt;</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="AllKeysType">
    <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:schema>