<?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/yammer">
  <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.yammer.config.YammerConnectorOAuth2Adapter">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="mule:abstractExtensionType">
          <xs:annotation>
            <xs:documentation>Connector for Yammer related functions.

&lt;a href="https://www.yammer.com"&gt;Yammer&lt;/a&gt; is a social-network-like internal corporate communications system,
where users are able to post messages, follow users,
images and so on in a manner like Facebook or Twitter.

This connector allows to:
&lt;ul&gt;
&lt;li&gt;Retrieve messages&lt;/li&gt;
&lt;li&gt;Retrieve received messages&lt;/li&gt;
&lt;li&gt;Retrieve private messages&lt;/li&gt;
&lt;li&gt;Retrieve sent messages&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
It's necessary to set in yammer (https://www.yammer.com/client_applications where you can create an application or edit it) the next Callback URL:&lt;br/&gt;
&lt;br/&gt;
http://{host:{port/yammerCodeRetrievingPath&lt;br/&gt;
&lt;br/&gt;
where the {host is the same host as the Website of the yammer application.&lt;br/&gt;
&lt;br/&gt;
Then you have to configure yammer:&lt;br/&gt;
&lt;br/&gt;
&amp;lt;http:connector name="connector.http.mule.default" enableCookies="true" keepAlive="true" /&amp;gt;&lt;br/&gt;
&lt;br/&gt;
&amp;lt;yammer:config consumerKey="${consumerKey" consumerSecret="${consumerSecret"&amp;gt;&lt;br/&gt;
&amp;lt;yammer:http-callback-config domain="{host" remotePort="SOME_PORT" localPort="{port" /&amp;gt;&lt;br/&gt;
&amp;lt;/yammer:config&amp;gt;&lt;br/&gt;
&lt;br/&gt;
where {host and {port are the same of the Callback URL used before.&lt;br/&gt;
&lt;/p&gt;</xs:documentation>
          </xs:annotation>
          <xs:sequence>
            <xs:element name="http-callback-config" maxOccurs="1" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Config for http callbacks.</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:complexContent>
                  <xs:extension base="mule:abstractExtensionType">
                    <xs:attribute name="localPort" default="${http.port}" use="optional" type="xs:string"></xs:attribute>
                    <xs:attribute name="remotePort" default="${http.port}" use="optional" type="xs:string"></xs:attribute>
                    <xs:attribute name="domain" default="${fullDomain}" use="optional" type="xs:string"></xs:attribute>
                    <xs:attribute name="async" default="true" use="optional" type="xs:boolean"></xs:attribute>
                  </xs:extension>
                </xs:complexContent>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
          <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="consumerKey" use="required" type="xs:string">
            <xs:annotation>
              <xs:documentation>The OAuth consumer key</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="consumerSecret" use="required" type="xs:string">
            <xs:annotation>
              <xs:documentation>The OAuth consumer secret</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute xmlns="http://www.mulesoft.org/schema/mule/yammer" name="debug" default="false" use="optional" type="booleanType">
            <xs:annotation>
              <xs:documentation>If connector should be run in debug mode.
This enables logging of HTTP activity
against Yammer</xs:documentation>
            </xs:annotation>
          </xs:attribute>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  <xs:element xmlns="http://www.mulesoft.org/schema/mule/yammer" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="get-messages" substitutionGroup="mule:abstract-message-processor" type="GetMessagesType">
    <xs:annotation>
      <xs:documentation>Answers all messages in this network. Corresponds to the "Company Feed" tab on the website.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="GetMessagesType">
    <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/yammer" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="get-sent-messages" substitutionGroup="mule:abstract-message-processor" type="GetSentMessagesType">
    <xs:annotation>
      <xs:documentation>Answers the whole list of messages sent by the current user.
Corresponds to the "Sent" tab on the website.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="GetSentMessagesType">
    <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/yammer" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="get-received-messages" substitutionGroup="mule:abstract-message-processor" type="GetReceivedMessagesType">
    <xs:annotation>
      <xs:documentation>Answers the list of messages received by the logged-in user.
Corresponds to the "Received" tab on the website.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="GetReceivedMessagesType">
    <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/yammer" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="get-private-messages" substitutionGroup="mule:abstract-message-processor" type="GetPrivateMessagesType">
    <xs:annotation>
      <xs:documentation>Answers the whole list of private Messages (aka Direct Messages) for the logged-in user.
Corresponds to the "Direct Messages" section on the website.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="GetPrivateMessagesType">
    <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/yammer" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="get-following-messages" substitutionGroup="mule:abstract-message-processor" type="GetFollowingMessagesType">
    <xs:annotation>
      <xs:documentation>Answers the list of messages followed by the logged-in user.
Corresponds to the "My Feed" tab on the website.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="GetFollowingMessagesType">
    <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>