<?xml version="1.0" encoding="utf-8" ?>
<xs:schema id="types"
        elementFormDefault="qualified"
        xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
        targetNamespace="http://schemas.microsoft.com/exchange/services/2006/types"
        xmlns:xs="http://www.w3.org/2001/XMLSchema">

  <xs:import namespace="http://www.w3.org/XML/1998/namespace"/>

  <!-- SOAP header to indicate language for mailbox interaction-->
  <xs:complexType name="MailboxCultureType">
    <xs:simpleContent>
      <xs:extension base="xs:language">
        <xs:anyAttribute namespace="http://schemas.xmlsoap.org/soap/envelope/">
          <xs:annotation>
            <xs:documentation>Allow attributes in the soap namespace to be used here</xs:documentation>
          </xs:annotation>
        </xs:anyAttribute>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:element name="MailboxCulture" type="t:MailboxCultureType"/>

<xs:complexType name="InstalledAppType">
    <xs:sequence minOccurs="0">
        <xs:element name="Id" type="xs:string" minOccurs="0"/>
        <xs:element name="MarketplaceAssetId" type="xs:string" minOccurs="0" maxOccurs="1"/>
        <xs:element name="Enabled" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
        <xs:element name="ConsentState" type="xs:string" minOccurs="0" maxOccurs="1"/>
        <xs:element name="Type" type="xs:string" minOccurs="0" maxOccurs="1"/>
        <xs:element name="LicenseStatus" type="xs:string" minOccurs="0" maxOccurs="1"/>
        <xs:element name="TrialExpirationDate" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
        <xs:element name="ProviderName" type="xs:string" minOccurs="0" maxOccurs="1"/>
        <xs:element name="IconUrl" type="xs:string" minOccurs="0" maxOccurs="1"/>
        <xs:element name="HighResolutionIconUrl" type="xs:string" minOccurs="0" maxOccurs="1"/>
        <xs:element name="DisplayName" type="xs:string" minOccurs="0" maxOccurs="1"/>
        <xs:element name="Description" type="xs:string" minOccurs="0" maxOccurs="1"/>
        <xs:element name="Requirements" type="xs:string" minOccurs="0" maxOccurs="1"/>
        <xs:element name="Version" type="xs:string" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
</xs:complexType>

  <!-- SOAP header to indicate which roles the caller or application want to use -->
  <xs:complexType name="NonEmptyArrayOfRoleType">
    <xs:sequence>
      <xs:element name="Role" type="xs:string" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="ManagementRoleType">
    <xs:sequence>
      <xs:element name="UserRoles" type="t:NonEmptyArrayOfRoleType" minOccurs="0"  maxOccurs="1"/>
      <xs:element name="ApplicationRoles" type="t:NonEmptyArrayOfRoleType" minOccurs="0"  maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ManagementRole" type="t:ManagementRoleType" />

  <!-- Server to Server auth SOAP header information -->
  <xs:complexType name="SidAndAttributesType">
    <xs:sequence>
      <xs:element name="SecurityIdentifier" type="xs:string"/>
    </xs:sequence>
    <xs:attribute name="Attributes" type="xs:unsignedInt" use="required"/>
  </xs:complexType>

  <xs:complexType name="NonEmptyArrayOfGroupIdentifiersType">
    <xs:sequence>
      <xs:element name="GroupIdentifier" type="t:SidAndAttributesType" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="NonEmptyArrayOfRestrictedGroupIdentifiersType">
    <xs:sequence>
      <xs:element name="RestrictedGroupIdentifier" type="t:SidAndAttributesType" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SerializedSecurityContextType">
    <xs:sequence>
      <xs:element name="UserSid" type="xs:string"/>
      <xs:element name="GroupSids" type="t:NonEmptyArrayOfGroupIdentifiersType" minOccurs="0"/>
      <xs:element name="RestrictedGroupSids" type="t:NonEmptyArrayOfRestrictedGroupIdentifiersType" minOccurs="0"/>
      <xs:element name="PrimarySmtpAddress" type="xs:string" minOccurs="0"/>
    </xs:sequence>
    <xs:anyAttribute namespace="http://schemas.xmlsoap.org/soap/envelope/">
      <xs:annotation>
        <xs:documentation>Allow attributes in the soap namespace to be used here</xs:documentation>
      </xs:annotation>
    </xs:anyAttribute>
  </xs:complexType>
  <xs:element name="SerializedSecurityContext" type="t:SerializedSecurityContextType"/>

  <xs:complexType name="ConnectingSIDType">
    <xs:choice>
      <xs:element name="PrincipalName" type="t:PrincipalNameType" />
      <xs:element name="SID" type="t:SIDType" />
      <xs:element name="PrimarySmtpAddress" type="t:PrimarySmtpAddressType" />
      <xs:element name="SmtpAddress" type="t:SmtpAddressType" />
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="PrincipalNameType">
    <xs:simpleContent>
      <xs:extension base="t:NonEmptyStringType" />
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="SIDType">
    <xs:simpleContent>
      <xs:extension base="t:NonEmptyStringType" />
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="PrimarySmtpAddressType">
    <xs:simpleContent>
      <xs:extension base="t:NonEmptyStringType" />
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="SmtpAddressType">
    <xs:simpleContent>
      <xs:extension base="t:NonEmptyStringType" />
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="ExchangeImpersonationType">
    <xs:sequence>
      <xs:element name="ConnectingSID" type="t:ConnectingSIDType" />
    </xs:sequence>
    <xs:anyAttribute namespace="http://schemas.xmlsoap.org/soap/envelope/">
      <xs:annotation>
        <xs:documentation>Allow attributes in the soap namespace to be used here</xs:documentation>
      </xs:annotation>
    </xs:anyAttribute>
  </xs:complexType>
  <xs:element name="ExchangeImpersonation" type="t:ExchangeImpersonationType" />

  <xs:simpleType name="SpecialLogonTypeType">
    <xs:annotation>
      <xs:documentation>Surfaces the various logon types that are supported for conversion</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="Admin"/>
      <xs:enumeration value="SystemService"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="OpenAsAdminOrSystemServiceType">
    <xs:sequence>
      <xs:element name="ConnectingSID" type="t:ConnectingSIDType" />
    </xs:sequence>
    <xs:attribute name="LogonType" type="t:SpecialLogonTypeType" use="required"/>
    <xs:attribute name="BudgetType" type="xs:int"  use="optional"/>
    <xs:anyAttribute namespace="http://schemas.xmlsoap.org/soap/envelope/">
      <xs:annotation>
        <xs:documentation>Allow attributes in the soap namespace to be used here</xs:documentation>
      </xs:annotation>
    </xs:anyAttribute>
  </xs:complexType>
  <xs:element name="OpenAsAdminOrSystemService" type="t:OpenAsAdminOrSystemServiceType" />

  <!-- External sharing security header for person-to-person sharing relationships -->
  <xs:element name="SharingSecurity" type="t:EncryptedDataContainerType"/>

  <!-- Enumeration of Exchange Server versions -->
  <xs:simpleType name="ExchangeVersionType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Exchange2007" />
      <xs:enumeration value="Exchange2007_SP1" />
      <xs:enumeration value="Exchange2009" />
      <xs:enumeration value="Exchange2010" />
      <xs:enumeration value="Exchange2010_SP1" />
      <xs:enumeration value="Exchange2010_SP2" />
      <xs:enumeration value="Exchange2012" />
      <xs:enumeration value="Exchange2013" />
      <xs:enumeration value="Exchange2013_SP1" />
      <xs:enumeration value="Exchange2015" />
      <xs:enumeration value="Exchange2016" />
      <xs:enumeration value="V2015_10_05" />
      <xs:enumeration value="V2016_01_06" />
      <xs:enumeration value="V2016_04_13" />
      <xs:enumeration value="V2016_07_13" />
      <xs:enumeration value="V2016_10_10" />
      <xs:enumeration value="V2017_01_07" />
      <xs:enumeration value="V2017_04_14" />
      <xs:enumeration value="V2017_07_11" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="ProxySecurityContextType">
    <xs:simpleContent>
      <xs:extension base="xs:base64Binary">
        <xs:anyAttribute namespace="http://schemas.xmlsoap.org/soap/envelope/">
          <xs:annotation>
            <xs:documentation>Allow attributes in the soap namespace to be used here</xs:documentation>
          </xs:annotation>
        </xs:anyAttribute>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:element name="ProxySecurityContext" type="t:ProxySecurityContextType"/>
  <xs:element name="ProxySuggesterSid" type="t:ProxySecurityContextType"/>
  <xs:element name="ProxyPartnerToken" type="t:ProxySecurityContextType" />

  <!-- Used in the SOAP header of responses for diagnostics purposes. -->
  <xs:element name="ServerVersionInfo">
    <xs:complexType>
      <xs:attribute name="MajorVersion" type="xs:int" use="optional"/>
      <xs:attribute name="MinorVersion" type="xs:int" use="optional"/>
      <xs:attribute name="MajorBuildNumber" type="xs:int" use="optional"/>
      <xs:attribute name="MinorBuildNumber" type="xs:int" use="optional"/>
      <xs:attribute name="Version" type="xs:string" use="optional"/>
    </xs:complexType>
  </xs:element>

  <!-- Used in the SOAP header of requests to specify version for request. -->
  <xs:element name="RequestServerVersion">
    <xs:complexType>
      <xs:attribute name="Version" type="t:ExchangeVersionType" use="required"/>
      <xs:anyAttribute namespace="http://schemas.xmlsoap.org/soap/envelope/">
        <xs:annotation>
          <xs:documentation>Allow attributes in the soap namespace to be used here</xs:documentation>
        </xs:annotation>
      </xs:anyAttribute>
    </xs:complexType>
  </xs:element>

  <!-- DateTimePrecision for Soap header -->

  <xs:simpleType name="DateTimePrecisionType">
    <xs:annotation>
      <xs:documentation>Precision for returned DateTime values</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="Seconds" />
      <xs:enumeration value="Milliseconds" />
    </xs:restriction>
  </xs:simpleType>

  <xs:element name="DateTimePrecision" type="t:DateTimePrecisionType" />

  <!-- Email address/participant types -->

  <xs:simpleType name="NonEmptyStringType">
    <xs:restriction base="xs:string">
      <xs:minLength value="1" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="BaseEmailAddressType" />

  <xs:simpleType name="MailboxTypeType">
    <xs:restriction base="xs:string">

      <xs:enumeration value="Unknown" />
      <xs:enumeration value="OneOff" />

      <xs:enumeration value="Mailbox" />
      <xs:enumeration value="PublicDL" />

      <xs:enumeration value="PrivateDL" />
      <xs:enumeration value="Contact" />

      <xs:enumeration value="PublicFolder" />
      <xs:enumeration value="GroupMailbox" />
      <xs:enumeration value="ImplicitContact" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="EmailAddressType">
    <xs:annotation>
      <xs:documentation>Identifier for a fully resolved email address</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="t:BaseEmailAddressType">
        <xs:sequence>
          <xs:element name="Name" type="xs:string" minOccurs="0"/>
          <xs:element name="EmailAddress" type="t:NonEmptyStringType" minOccurs="0"/>
          <xs:element name="RoutingType" type="t:NonEmptyStringType" minOccurs="0"/>
          <xs:element name="MailboxType" type="t:MailboxTypeType" minOccurs="0" />
          <xs:element name="ItemId" type="t:ItemIdType" minOccurs="0" />
          <xs:element name="OriginalDisplayName" type="xs:string" minOccurs="0"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="EmailAddressExtendedType">
    <xs:annotation>
      <xs:documentation>Extends EmailAddress by adding the external object id</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="t:EmailAddressType">
        <xs:sequence>
          <xs:element name="ExternalObjectId" type="xs:string" minOccurs="0"/>
          <xs:element name="PrimaryEmailAddress" type="t:NonEmptyStringType" minOccurs="0"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- GetRooms Service Types -->

  <xs:complexType name="ArrayOfEmailAddressesType">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Address" type="t:EmailAddressType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="DirectoryEntryType">
    <xs:sequence>
      <xs:element name="Id" type="t:EmailAddressType" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="RoomType">
    <xs:complexContent>
      <xs:extension base="t:DirectoryEntryType">
        <!-- We don't need anything additional at this time -->
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ArrayOfRoomsType">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Room" type="t:RoomType" />
    </xs:sequence>
  </xs:complexType>

  <!-- FindAvailableMeetingTimes Service Types -->

  <xs:complexType name="TimeSlot">
    <xs:sequence>
      <xs:element name="StartTime" type="xs:dateTime" />
      <xs:element name="DurationInMinutes" type="xs:double" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="MeetingLocation">
    <xs:sequence>
      <xs:element name="EmailAddress" type="xs:string" />
      <xs:element name="DisplayName" type="xs:string" />
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="ActivityDomainType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Unknown" />
      <xs:enumeration value="Personal" />
      <xs:enumeration value="Work" />
    </xs:restriction>
  </xs:simpleType>

  <!-- GetReminders Service Types -->

  <xs:simpleType name="ReminderGroupType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Calendar" />
      <xs:enumeration value="Task" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="ReminderType">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="Subject" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="Location" type="xs:string" />
      <xs:element minOccurs="1" maxOccurs="1" name="ReminderTime" type="xs:dateTime" />
      <xs:element minOccurs="1" maxOccurs="1" name="StartDate" type="xs:dateTime" />
      <xs:element minOccurs="1" maxOccurs="1" name="EndDate" type="xs:dateTime" />
      <xs:element minOccurs="1" maxOccurs="1" name="ItemId" type="t:ItemIdType" />
      <xs:element minOccurs="0" maxOccurs="1" name="RecurringMasterItemId" type="t:ItemIdType" />
      <xs:element minOccurs="0" maxOccurs="1" name="ReminderGroup" type="t:ReminderGroupType" />
      <xs:element minOccurs="1" maxOccurs="1" name="UID" type="xs:string" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfRemindersType">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Reminder" type="t:ReminderType" />
    </xs:sequence>
  </xs:complexType>


  <!-- - - - - - - - - - - - - - - - - - - -->
  <!--            Recipient List           -->
  <!-- - - - - - - - - - - - - - - - - - - -->
  <xs:complexType name="ArrayOfRecipientsType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="Mailbox" type="t:EmailAddressType"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="SingleRecipientType">
    <xs:choice>
      <xs:element name="Mailbox" type="t:EmailAddressType"/>
    </xs:choice>
  </xs:complexType>

  <!-- URIs for frequently referenced types -->
  <xs:simpleType name="UnindexedFieldURIType">
    <xs:restriction base="xs:string">

      <!-- Folder fields -->

      <xs:enumeration value="folder:FolderId"/>
      <xs:enumeration value="folder:ParentFolderId"/>
      <xs:enumeration value="folder:DisplayName" />
      <xs:enumeration value="folder:UnreadCount" />
      <xs:enumeration value="folder:TotalCount" />
      <xs:enumeration value="folder:ChildFolderCount" />
      <xs:enumeration value="folder:FolderClass" />
      <xs:enumeration value="folder:SearchParameters"/>
      <xs:enumeration value="folder:ManagedFolderInformation"/>
      <xs:enumeration value="folder:PermissionSet"/>
      <xs:enumeration value="folder:EffectiveRights"/>
      <xs:enumeration value="folder:SharingEffectiveRights"/>
      <xs:enumeration value="folder:DistinguishedFolderId"/>
      <xs:enumeration value="folder:PolicyTag"/>
      <xs:enumeration value="folder:ArchiveTag"/>
      <xs:enumeration value="folder:ReplicaList"/>

      <!-- Item fields -->

      <xs:enumeration value="item:ItemId"/>
      <xs:enumeration value="item:ParentFolderId"/>
      <xs:enumeration value="item:ItemClass" />
      <xs:enumeration value="item:MimeContent"/>
      <xs:enumeration value="item:Attachments" />
      <xs:enumeration value="item:Subject" />
      <xs:enumeration value="item:DateTimeReceived" />
      <xs:enumeration value="item:Size" />
      <xs:enumeration value="item:Categories" />
      <xs:enumeration value="item:HasAttachments"/>
      <xs:enumeration value="item:Importance"/>
      <xs:enumeration value="item:InReplyTo"/>
      <xs:enumeration value="item:InternetMessageHeaders" />
      <xs:enumeration value="item:IsAssociated" />
      <xs:enumeration value="item:IsDraft" />
      <xs:enumeration value="item:IsFromMe" />
      <xs:enumeration value="item:IsResend" />
      <xs:enumeration value="item:IsSubmitted" />
      <xs:enumeration value="item:IsUnmodified" />
      <xs:enumeration value="item:DateTimeSent" />
      <xs:enumeration value="item:DateTimeCreated" />
      <xs:enumeration value="item:Body" />
      <xs:enumeration value="item:ResponseObjects"/>
      <xs:enumeration value="item:Sensitivity"/>

      <xs:enumeration value="item:ReminderDueBy"/>
      <xs:enumeration value="item:ReminderIsSet"/>
      <xs:enumeration value="item:ReminderNextTime"/>
      <xs:enumeration value="item:ReminderMinutesBeforeStart"/>

      <xs:enumeration value="item:DisplayTo"/>
      <xs:enumeration value="item:DisplayCc"/>
      <xs:enumeration value="item:DisplayBcc"/>

      <xs:enumeration value="item:Culture"/>
      <xs:enumeration value="item:EffectiveRights"/>

      <xs:enumeration value="item:LastModifiedName"/>
      <xs:enumeration value="item:LastModifiedTime"/>
      <xs:enumeration value="item:ConversationId"/>
      <xs:enumeration value="item:UniqueBody"/>
      <xs:enumeration value="item:Flag"/>
      <xs:enumeration value="item:StoreEntryId"/>
      <xs:enumeration value="item:InstanceKey"/>
      <xs:enumeration value="item:NormalizedBody"/>
      <xs:enumeration value="item:EntityExtractionResult" />
      <xs:enumeration value="item:PolicyTag"/>
      <xs:enumeration value="item:ArchiveTag"/>
      <xs:enumeration value="item:RetentionDate"/>
      <xs:enumeration value="item:Preview" />
      <xs:enumeration value="item:PredictedActionReasons" />
      <xs:enumeration value="item:IsClutter" />
      <xs:enumeration value="item:RightsManagementLicenseData" />
      <xs:enumeration value="item:BlockStatus" />
      <xs:enumeration value="item:HasBlockedImages" />

      <xs:enumeration value="item:WebClientReadFormQueryString"/>
      <xs:enumeration value="item:WebClientEditFormQueryString"/>

      <xs:enumeration value="item:TextBody"/>

      <xs:enumeration value="item:IconIndex"/>

      <xs:enumeration value="item:MimeContentUTF8"/>

      <xs:enumeration value="item:Mentions"/>
      <xs:enumeration value="item:MentionedMe" />
      <xs:enumeration value="item:MentionsPreview"/>
      <xs:enumeration value="item:MentionsEx"/>
      <xs:enumeration value="item:Hashtags"/>
      <xs:enumeration value="item:AppliedHashtags"/>
      <xs:enumeration value="item:AppliedHashtagsPreview"/>
      <xs:enumeration value="item:Likes"/>
      <xs:enumeration value="item:LikesPreview"/>
      <xs:enumeration value="item:PendingSocialActivityTagIds"/>
      <xs:enumeration value="item:AtAllMention"/>
      <xs:enumeration value="item:CanDelete"/>
      <xs:enumeration value="item:InferenceClassification"/>

      <xs:enumeration value="item:FirstBody"/>

      <!-- Messages -->

      <xs:enumeration value="message:ConversationIndex"/>
      <xs:enumeration value="message:ConversationTopic"/>
      <xs:enumeration value="message:InternetMessageId"/>
      <xs:enumeration value="message:IsRead"/>
      <xs:enumeration value="message:IsResponseRequested"/>
      <xs:enumeration value="message:IsReadReceiptRequested"/>
      <xs:enumeration value="message:IsDeliveryReceiptRequested"/>
      <xs:enumeration value="message:ReceivedBy"/>
      <xs:enumeration value="message:ReceivedRepresenting"/>
      <xs:enumeration value="message:References"/>
      <xs:enumeration value="message:ReplyTo"/>
      <xs:enumeration value="message:From" />
      <xs:enumeration value="message:Sender" />
      <xs:enumeration value="message:ToRecipients" />
      <xs:enumeration value="message:CcRecipients" />
      <xs:enumeration value="message:BccRecipients" />
      <xs:enumeration value="message:ApprovalRequestData"/>
      <xs:enumeration value="message:VotingInformation"/>
      <xs:enumeration value="message:ReminderMessageData"/>
      <xs:enumeration value="message:PublishedCalendarItemIcs"/>
      <xs:enumeration value="message:PublishedCalendarItemName"/>
      <xs:enumeration value="message:MessageSafety"/>

      <!-- SharingMessage -->
      <xs:enumeration value="sharingMessage:SharingMessageAction"/>

      <!-- Meeting Message -->

      <xs:enumeration value="meeting:AssociatedCalendarItemId"/>
      <xs:enumeration value="meeting:IsDelegated"/>
      <xs:enumeration value="meeting:IsOutOfDate"/>
      <xs:enumeration value="meeting:HasBeenProcessed"/>
      <xs:enumeration value="meeting:ResponseType"/>

      <xs:enumeration value="meeting:ProposedStart"/>
      <xs:enumeration value="meeting:ProposedEnd"/>
      
      <xs:enumeration value="meeting:DoNotForwardMeeting"/>

      <!-- Meeting Request -->

      <xs:enumeration value="meetingRequest:MeetingRequestType"/>
      <xs:enumeration value="meetingRequest:IntendedFreeBusyStatus"/>
      <xs:enumeration value="meetingRequest:ChangeHighlights"/>
      

      <!-- Calendar items and appointments -->

      <xs:enumeration value="calendar:Start"/>
      <xs:enumeration value="calendar:End"/>
      <xs:enumeration value="calendar:OriginalStart"/>
      <xs:enumeration value="calendar:StartWallClock"/>
      <xs:enumeration value="calendar:EndWallClock"/>
      <xs:enumeration value="calendar:StartTimeZoneId"/>
      <xs:enumeration value="calendar:EndTimeZoneId"/>
      <xs:enumeration value="calendar:IsAllDayEvent"/>
      <xs:enumeration value="calendar:LegacyFreeBusyStatus"/>
      <xs:enumeration value="calendar:Location"/>
      <xs:enumeration value="calendar:EnhancedLocation"/>
      <xs:enumeration value="calendar:When"/>
      <xs:enumeration value="calendar:IsMeeting"/>
      <xs:enumeration value="calendar:IsCancelled"/>
      <xs:enumeration value="calendar:IsRecurring"/>
      <xs:enumeration value="calendar:MeetingRequestWasSent"/>
      <xs:enumeration value="calendar:IsResponseRequested"/>
      <xs:enumeration value="calendar:CalendarItemType"/>
      <xs:enumeration value="calendar:MyResponseType"/>
      <xs:enumeration value="calendar:Organizer"/>
      <xs:enumeration value="calendar:RequiredAttendees"/>
      <xs:enumeration value="calendar:OptionalAttendees"/>
      <xs:enumeration value="calendar:Resources"/>
      <xs:enumeration value="calendar:ConflictingMeetingCount"/>
      <xs:enumeration value="calendar:AdjacentMeetingCount"/>
      <xs:enumeration value="calendar:ConflictingMeetings"/>
      <xs:enumeration value="calendar:AdjacentMeetings"/>
      <xs:enumeration value="calendar:InboxReminders"/>

      <xs:enumeration value="calendar:Duration"/>
      <xs:enumeration value="calendar:TimeZone"/>
      <xs:enumeration value="calendar:AppointmentReplyTime"/>
      <xs:enumeration value="calendar:AppointmentSequenceNumber"/>
      <xs:enumeration value="calendar:AppointmentState"/>

      <xs:enumeration value="calendar:Recurrence"/>
      <xs:enumeration value="calendar:FirstOccurrence"/>
      <xs:enumeration value="calendar:LastOccurrence"/>
      <xs:enumeration value="calendar:ModifiedOccurrences"/>
      <xs:enumeration value="calendar:DeletedOccurrences"/>
      <xs:enumeration value="calendar:MeetingTimeZone"/>

      <xs:enumeration value="calendar:ConferenceType"/>
      <xs:enumeration value="calendar:AllowNewTimeProposal"/>
      <xs:enumeration value="calendar:IsOnlineMeeting"/>
      <xs:enumeration value="calendar:MeetingWorkspaceUrl"/>
      <xs:enumeration value="calendar:NetShowUrl"/>

      <xs:enumeration value="calendar:UID"/>
      <xs:enumeration value="calendar:RecurrenceId"/>
      <xs:enumeration value="calendar:DateTimeStamp"/>
      <xs:enumeration value="calendar:StartTimeZone"/>
      <xs:enumeration value="calendar:EndTimeZone"/>

      <xs:enumeration value="calendar:JoinOnlineMeetingUrl"/>
      <xs:enumeration value="calendar:OnlineMeetingSettings"/>

      <xs:enumeration value="calendar:IsOrganizer"/>
      <xs:enumeration value="calendar:CalendarActivityData"/>
      <xs:enumeration value="calendar:DoNotForwardMeeting"/>

      <!-- Task properties -->

      <xs:enumeration value="task:ActualWork"/>
      <xs:enumeration value="task:AssignedTime"/>
      <xs:enumeration value="task:BillingInformation"/>
      <xs:enumeration value="task:ChangeCount"/>
      <xs:enumeration value="task:Companies"/>
      <xs:enumeration value="task:CompleteDate"/>
      <xs:enumeration value="task:Contacts"/>
      <xs:enumeration value="task:DelegationState"/>
      <xs:enumeration value="task:Delegator"/>
      <xs:enumeration value="task:DueDate"/>
      <xs:enumeration value="task:IsAssignmentEditable"/>
      <xs:enumeration value="task:IsComplete"/>
      <xs:enumeration value="task:IsRecurring"/>
      <xs:enumeration value="task:IsTeamTask"/>
      <xs:enumeration value="task:Mileage"/>
      <xs:enumeration value="task:Owner"/>
      <xs:enumeration value="task:PercentComplete"/>
      <xs:enumeration value="task:Recurrence"/>
      <xs:enumeration value="task:StartDate"/>
      <xs:enumeration value="task:Status"/>
      <xs:enumeration value="task:StatusDescription"/>
      <xs:enumeration value="task:TotalWork"/>

      <!-- Contacts -->

      <xs:enumeration value="contacts:Alias" />
      <xs:enumeration value="contacts:AssistantName" />
      <xs:enumeration value="contacts:Birthday" />
      <xs:enumeration value="contacts:BusinessHomePage" />
      <xs:enumeration value="contacts:Children" />
      <xs:enumeration value="contacts:Companies" />
      <xs:enumeration value="contacts:CompanyName" />
      <xs:enumeration value="contacts:CompleteName" />
      <xs:enumeration value="contacts:ContactSource" />
      <xs:enumeration value="contacts:Culture" />
      <xs:enumeration value="contacts:Department" />
      <xs:enumeration value="contacts:DisplayName" />
      <xs:enumeration value="contacts:DirectoryId" />
      <xs:enumeration value="contacts:DirectReports" />
      <xs:enumeration value="contacts:EmailAddresses" />
      <xs:enumeration value="contacts:AbchEmailAddresses" />
      <xs:enumeration value="contacts:FileAs" />
      <xs:enumeration value="contacts:FileAsMapping" />
      <xs:enumeration value="contacts:Generation" />
      <xs:enumeration value="contacts:GivenName" />
      <xs:enumeration value="contacts:ImAddresses" />
      <xs:enumeration value="contacts:Initials" />
      <xs:enumeration value="contacts:JobTitle" />
      <xs:enumeration value="contacts:Manager" />
      <xs:enumeration value="contacts:ManagerMailbox" />
      <xs:enumeration value="contacts:MiddleName" />
      <xs:enumeration value="contacts:Mileage" />
      <xs:enumeration value="contacts:MSExchangeCertificate" />
      <xs:enumeration value="contacts:Nickname" />
      <xs:enumeration value="contacts:Notes" />
      <xs:enumeration value="contacts:OfficeLocation" />
      <xs:enumeration value="contacts:PhoneNumbers" />
      <xs:enumeration value="contacts:PhoneticFullName" />
      <xs:enumeration value="contacts:PhoneticFirstName" />
      <xs:enumeration value="contacts:PhoneticLastName" />
      <xs:enumeration value="contacts:Photo" />
      <xs:enumeration value="contacts:PhysicalAddresses" />
      <xs:enumeration value="contacts:PostalAddressIndex" />
      <xs:enumeration value="contacts:Profession" />
      <xs:enumeration value="contacts:SpouseName" />
      <xs:enumeration value="contacts:Surname" />
      <xs:enumeration value="contacts:WeddingAnniversary" />
      <xs:enumeration value="contacts:UserSMIMECertificate" />
      <xs:enumeration value="contacts:HasPicture" />
      <xs:enumeration value="contacts:AccountName" />
      <xs:enumeration value="contacts:IsAutoUpdateDisabled" />
      <xs:enumeration value="contacts:IsMessengerEnabled" />
      <xs:enumeration value="contacts:Comment" />
      <xs:enumeration value="contacts:ContactShortId" />
      <xs:enumeration value="contacts:ContactType" />
      <xs:enumeration value="contacts:CreatedBy" />
      <xs:enumeration value="contacts:Gender" />
      <xs:enumeration value="contacts:IsHidden" />
      <xs:enumeration value="contacts:ObjectId" />
      <xs:enumeration value="contacts:PassportId" />
      <xs:enumeration value="contacts:IsPrivate" />
      <xs:enumeration value="contacts:SourceId" />
      <xs:enumeration value="contacts:TrustLevel" />
      <xs:enumeration value="contacts:Urls" />
      <xs:enumeration value="contacts:Cid" />
      <xs:enumeration value="contacts:SkypeAuthCertificate" />
      <xs:enumeration value="contacts:SkypeContext" />
      <xs:enumeration value="contacts:SkypeId" />
      <xs:enumeration value="contacts:XboxLiveTag" />
      <xs:enumeration value="contacts:SkypeRelationship" />
      <xs:enumeration value="contacts:YomiNickname" />
      <xs:enumeration value="contacts:InviteFree" />
      <xs:enumeration value="contacts:HidePresenceAndProfile" />
      <xs:enumeration value="contacts:IsPendingOutbound" />
      <xs:enumeration value="contacts:SupportGroupFeeds" />
      <xs:enumeration value="contacts:UserTileHash" />
      <xs:enumeration value="contacts:UnifiedInbox" />
      <xs:enumeration value="contacts:Mris" />
      <xs:enumeration value="contacts:Wlid" />
      <xs:enumeration value="contacts:AbchContactId" />
      <xs:enumeration value="contacts:NotInBirthdayCalendar" />
      <xs:enumeration value="contacts:ShellContactType" />
      <xs:enumeration value="contacts:ImMri" />
      <xs:enumeration value="contacts:PresenceTrustLevel" />
      <xs:enumeration value="contacts:OtherMri" />
      <xs:enumeration value="contacts:ProfileLastChanged" />
      <xs:enumeration value="contacts:MobileIMEnabled" />
      <xs:enumeration value="distributionlist:Members" />
      <xs:enumeration value="contacts:PartnerNetworkProfilePhotoUrl" />
      <xs:enumeration value="contacts:PartnerNetworkThumbnailPhotoUrl" />
      <xs:enumeration value="contacts:PersonId" />
      <xs:enumeration value="contacts:ConversationGuid" />

      <!-- Post item -->
      <xs:enumeration value="postitem:PostedTime"/>
      <!-- Note: The following message Field URIs are also valid for a postitem:
                             message:ConversationIndex
                             message:ConversationTopic
                             message:From
                             message:InternetMessageId
                             message:References
                             message:Sender
      -->

      <!-- Conversation fields-->
      <xs:enumeration value ="conversation:ConversationId" />
      <xs:enumeration value ="conversation:ConversationTopic" />
      <xs:enumeration value ="conversation:UniqueRecipients" />
      <xs:enumeration value ="conversation:GlobalUniqueRecipients" />
      <xs:enumeration value ="conversation:UniqueUnreadSenders" />
      <xs:enumeration value ="conversation:GlobalUniqueUnreadSenders" />
      <xs:enumeration value ="conversation:UniqueSenders" />
      <xs:enumeration value ="conversation:GlobalUniqueSenders" />
      <xs:enumeration value ="conversation:LastDeliveryTime" />
      <xs:enumeration value ="conversation:GlobalLastDeliveryTime" />
      <xs:enumeration value ="conversation:Categories" />
      <xs:enumeration value ="conversation:GlobalCategories" />
      <xs:enumeration value ="conversation:FlagStatus" />
      <xs:enumeration value ="conversation:GlobalFlagStatus" />
      <xs:enumeration value ="conversation:HasAttachments" />
      <xs:enumeration value ="conversation:GlobalHasAttachments" />
      <xs:enumeration value ="conversation:HasIrm" />
      <xs:enumeration value ="conversation:GlobalHasIrm" />
      <xs:enumeration value ="conversation:MessageCount" />
      <xs:enumeration value ="conversation:GlobalMessageCount" />
      <xs:enumeration value ="conversation:UnreadCount" />
      <xs:enumeration value ="conversation:GlobalUnreadCount" />
      <xs:enumeration value ="conversation:Size" />
      <xs:enumeration value ="conversation:GlobalSize" />
      <xs:enumeration value ="conversation:ItemClasses" />
      <xs:enumeration value ="conversation:GlobalItemClasses" />
      <xs:enumeration value ="conversation:Importance" />
      <xs:enumeration value ="conversation:GlobalImportance" />
      <xs:enumeration value ="conversation:ItemIds" />
      <xs:enumeration value ="conversation:GlobalItemIds" />
      <xs:enumeration value ="conversation:LastModifiedTime" />
      <xs:enumeration value ="conversation:InstanceKey" />
      <xs:enumeration value ="conversation:Preview" />
      <xs:enumeration value ="conversation:IconIndex" />
      <xs:enumeration value ="conversation:GlobalIconIndex" />
      <xs:enumeration value ="conversation:DraftItemIds" />
      <xs:enumeration value ="conversation:HasClutter" />
      <xs:enumeration value ="conversation:MentionedMe" />
      <xs:enumeration value ="conversation:GlobalMentionedMe" />
      <xs:enumeration value ="conversation:AtAllMention" />
      <xs:enumeration value ="conversation:GlobalAtAllMention" />

      <!-- Person Insight Fields -->
      <xs:enumeration value="person:FullName" />
      <xs:enumeration value="person:GivenName" />
      <xs:enumeration value="person:Surname" />
      <xs:enumeration value="person:PhoneNumber" />
      <xs:enumeration value="person:SMSNumber" />
      <xs:enumeration value="person:EmailAddress" />
      <xs:enumeration value="person:Alias" />
      <xs:enumeration value="person:Department" />
      <xs:enumeration value="person:LinkedInProfileLink" />
      <xs:enumeration value="person:Skills" />
      <xs:enumeration value="person:ProfessionalBiography" />
      <xs:enumeration value="person:ManagementChain" />
      <xs:enumeration value="person:DirectReports" />
      <xs:enumeration value="person:Peers" />
      <xs:enumeration value="person:TeamSize" />
      <xs:enumeration value="person:CurrentJob" />
      <xs:enumeration value="person:Birthday" />
      <xs:enumeration value="person:Hometown" />
      <xs:enumeration value="person:CurrentLocation" />
      <xs:enumeration value="person:CompanyProfile" />
      <xs:enumeration value="person:Office" />
      <xs:enumeration value="person:Headline" />
      <xs:enumeration value="person:MutualConnections" />
      <xs:enumeration value="person:Title" />
      <xs:enumeration value="person:MutualManager" />
      <xs:enumeration value="person:Insights" />
      <xs:enumeration value="person:UserProfilePicture" />
      
      <!-- Persona fields-->
      <xs:enumeration value ="persona:PersonaId" />
      <xs:enumeration value ="persona:PersonaType" />
      <xs:enumeration value ="persona:GivenName" />
      <xs:enumeration value ="persona:CompanyName" />
      <xs:enumeration value ="persona:Surname" />
      <xs:enumeration value ="persona:DisplayName" />
      <xs:enumeration value ="persona:EmailAddress" />
      <xs:enumeration value ="persona:FileAs" />
      <xs:enumeration value ="persona:HomeCity" />
      <xs:enumeration value ="persona:CreationTime" />


      <xs:enumeration value ="persona:RelevanceScore" />
      <xs:enumeration value ="persona:RankingWeight" />
      <xs:enumeration value ="persona:WorkCity" />
      <xs:enumeration value ="persona:PersonaObjectStatus" />
      <xs:enumeration value ="persona:FileAsId" />
      <xs:enumeration value ="persona:DisplayNamePrefix" />
      <xs:enumeration value ="persona:YomiCompanyName" />
      <xs:enumeration value ="persona:YomiFirstName" />
      <xs:enumeration value ="persona:YomiLastName" />
      <xs:enumeration value ="persona:Title" />
      <xs:enumeration value ="persona:EmailAddresses" />
      <xs:enumeration value ="persona:PhoneNumber" />
      <xs:enumeration value ="persona:ImAddress" />
      <xs:enumeration value ="persona:ImAddresses" />
      <xs:enumeration value ="persona:ImAddresses2" />
      <xs:enumeration value ="persona:ImAddresses3" />
      <xs:enumeration value ="persona:FolderIds" />
      <xs:enumeration value ="persona:Attributions" />
      <xs:enumeration value ="persona:DisplayNames" />
      <xs:enumeration value ="persona:Initials" />
      <xs:enumeration value ="persona:FileAses" />
      <xs:enumeration value ="persona:FileAsIds" />
      <xs:enumeration value ="persona:DisplayNamePrefixes" />
      <xs:enumeration value ="persona:GivenNames" />
      <xs:enumeration value ="persona:MiddleNames" />
      <xs:enumeration value ="persona:Surnames" />
      <xs:enumeration value ="persona:Generations" />
      <xs:enumeration value ="persona:Nicknames" />
      <xs:enumeration value ="persona:YomiCompanyNames" />
      <xs:enumeration value ="persona:YomiFirstNames" />
      <xs:enumeration value ="persona:YomiLastNames" />
      <xs:enumeration value ="persona:BusinessPhoneNumbers" />
      <xs:enumeration value ="persona:BusinessPhoneNumbers2" />
      <xs:enumeration value ="persona:HomePhones" />
      <xs:enumeration value ="persona:HomePhones2" />
      <xs:enumeration value ="persona:MobilePhones" />
      <xs:enumeration value ="persona:MobilePhones2" />
      <xs:enumeration value ="persona:AssistantPhoneNumbers" />
      <xs:enumeration value ="persona:CallbackPhones" />
      <xs:enumeration value ="persona:CarPhones" />
      <xs:enumeration value ="persona:HomeFaxes" />
      <xs:enumeration value ="persona:OrganizationMainPhones" />
      <xs:enumeration value ="persona:OtherFaxes" />
      <xs:enumeration value ="persona:OtherTelephones" />
      <xs:enumeration value ="persona:OtherPhones2" />
      <xs:enumeration value ="persona:Pagers" />
      <xs:enumeration value ="persona:RadioPhones" />
      <xs:enumeration value ="persona:TelexNumbers" />
      <xs:enumeration value ="persona:WorkFaxes" />
      <xs:enumeration value ="persona:Emails1" />
      <xs:enumeration value ="persona:Emails2" />
      <xs:enumeration value ="persona:Emails3" />
      <xs:enumeration value ="persona:BusinessHomePages" />
      <xs:enumeration value ="persona:School" />
      <xs:enumeration value ="persona:PersonalHomePages" />
      <xs:enumeration value ="persona:OfficeLocations" />
      <xs:enumeration value ="persona:BusinessAddresses" />
      <xs:enumeration value ="persona:HomeAddresses" />
      <xs:enumeration value ="persona:OtherAddresses" />
      <xs:enumeration value ="persona:Titles" />
      <xs:enumeration value ="persona:Departments" />
      <xs:enumeration value ="persona:CompanyNames" />
      <xs:enumeration value ="persona:Managers" />
      <xs:enumeration value ="persona:AssistantNames" />
      <xs:enumeration value ="persona:Professions" />
      <xs:enumeration value ="persona:SpouseNames" />
      <xs:enumeration value ="persona:Hobbies" />
      <xs:enumeration value ="persona:WeddingAnniversaries" />
      <xs:enumeration value ="persona:Birthdays" />
      <xs:enumeration value ="persona:Children" />
      <xs:enumeration value ="persona:Locations" />
      <xs:enumeration value ="persona:ExtendedProperties" />
      <xs:enumeration value ="persona:PostalAddress" />
      <xs:enumeration value ="persona:Bodies" />
      <xs:enumeration value ="persona:IsFavorite" />
      <xs:enumeration value ="persona:InlineLinks" />
      <xs:enumeration value ="persona:ItemLinkIds" />
      <xs:enumeration value ="persona:HasActiveDeals" />
      <xs:enumeration value ="persona:IsBusinessContact" />
      <xs:enumeration value ="persona:AttributedHasActiveDeals" />
      <xs:enumeration value ="persona:AttributedIsBusinessContact" />
      <xs:enumeration value ="persona:SourceMailboxGuids" />
      <xs:enumeration value ="persona:LastContactedDate" />
      <xs:enumeration value ="persona:ExternalDirectoryObjectId" />
      <xs:enumeration value ="persona:MapiEntryId" />
      <xs:enumeration value ="persona:MapiEmailAddress" />
      <xs:enumeration value ="persona:MapiAddressType" />
      <xs:enumeration value ="persona:MapiSearchKey" />
      <xs:enumeration value ="persona:MapiTransmittableDisplayName" />
      <xs:enumeration value ="persona:MapiSendRichInfo" />

      <xs:enumeration value="rolemember:MemberType" />
      <xs:enumeration value="rolemember:MemberId" />
      <xs:enumeration value="rolemember:DisplayName" />

      <xs:enumeration value="network:TokenRefreshLastCompleted" />
      <xs:enumeration value="network:TokenRefreshLastAttempted" />
      <xs:enumeration value="network:SyncEnabled" />
      <xs:enumeration value="network:RejectedOffers" />
      <xs:enumeration value="network:SessionHandle" />
      <xs:enumeration value="network:RefreshTokenExpiry2" />
      <xs:enumeration value="network:RefreshToken2" />
      <xs:enumeration value="network:PsaLastChanged" />
      <xs:enumeration value="network:Offers" />
      <xs:enumeration value="network:LastWelcomeContact" />
      <xs:enumeration value="network:LastVersionSaved" />
      <xs:enumeration value="network:DomainTag" />
      <xs:enumeration value="network:FirstAuthErrorDates" />
      <xs:enumeration value="network:ErrorOffers" />
      <xs:enumeration value="network:ContactSyncSuccess" />
      <xs:enumeration value="network:ContactSyncError" />
      <xs:enumeration value="network:ClientToken2" />
      <xs:enumeration value="network:ClientToken" />
      <xs:enumeration value="network:ClientPublishSecret" />
      <xs:enumeration value="network:UserEmail" />
      <xs:enumeration value="network:AutoLinkSuccess" />
      <xs:enumeration value="network:AutoLinkError" />
      <xs:enumeration value="network:IsDefault" />
      <xs:enumeration value="network:Settings" />
      <xs:enumeration value="network:ProfileUrl" />
      <xs:enumeration value="network:UserTileUrl" />
      <xs:enumeration value="network:DomainId" />
      <xs:enumeration value="network:DisplayName" />
      <xs:enumeration value="network:AccountName" />
      <xs:enumeration value="network:SourceEntryID" />

      <xs:enumeration value="abchperson:FavoriteOrder" />
      <xs:enumeration value="abchperson:PersonId" />
      <xs:enumeration value="abchperson:ExchangePersonIdGuid" />
      <xs:enumeration value="abchperson:AntiLinkInfo" />
      <xs:enumeration value="abchperson:RelevanceOrder1" />
      <xs:enumeration value="abchperson:RelevanceOrder2" />
      <xs:enumeration value="abchperson:ContactHandles" />
      <xs:enumeration value="abchperson:Categories" />

      <xs:enumeration value="booking:ServiceIds" />
      <xs:enumeration value="booking:StaffIds" />
      <xs:enumeration value="booking:StaffInitials" />
      <xs:enumeration value="booking:CustomerName" />
      <xs:enumeration value="booking:CustomerEmail" />
      <xs:enumeration value="booking:CustomerPhone" />
      <xs:enumeration value="booking:CustomerId" />
      
      <!--Insight fields-->
      <xs:enumeration value="insight:InsightId" />
      <xs:enumeration value="insight:Type" />
      <xs:enumeration value="insight:StartTimeUtc" />
      <xs:enumeration value="insight:EndTimeUtc" />
      <xs:enumeration value="insight:Status" />
      <xs:enumeration value="insight:Version" />
      <xs:enumeration value="insight:ApplicationsIds" />
      <xs:enumeration value="insight:Text" />
      <xs:enumeration value="insight:SuggestedActions" />
      <xs:enumeration value="insight:AppContexts" />

    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DictionaryURIType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="item:InternetMessageHeader" />
      <xs:enumeration value="contacts:ImAddress" />
      <xs:enumeration value="contacts:PhysicalAddress:Street" />
      <xs:enumeration value="contacts:PhysicalAddress:City" />
      <xs:enumeration value="contacts:PhysicalAddress:State" />
      <xs:enumeration value="contacts:PhysicalAddress:CountryOrRegion" />
      <xs:enumeration value="contacts:PhysicalAddress:PostalCode" />
      <xs:enumeration value="contacts:PhoneNumber" />
      <xs:enumeration value="contacts:EmailAddress" />

      <xs:enumeration value="distributionlist:Members:Member" />

    </xs:restriction>
  </xs:simpleType>

  <!-- URIs for property types used in MessageXml -->
  <xs:simpleType name="ExceptionPropertyURIType">
    <xs:restriction base="xs:string">
      <!-- Attachment fields -->

      <xs:enumeration value="attachment:Name"/>
      <xs:enumeration value="attachment:ContentType"/>
      <xs:enumeration value="attachment:Content" />

      <!-- Recurrence fields -->

      <xs:enumeration value="recurrence:Month"/>
      <xs:enumeration value="recurrence:DayOfWeekIndex"/>
      <xs:enumeration value="recurrence:DaysOfWeek" />
      <xs:enumeration value="recurrence:DayOfMonth"/>
      <xs:enumeration value="recurrence:Interval" />
      <xs:enumeration value="recurrence:NumberOfOccurrences" />

      <xs:enumeration value="timezone:Offset" />

    </xs:restriction>
  </xs:simpleType>

  <!-- path types -->
  <xs:simpleType name="GuidType">
    <xs:annotation>
      <xs:documentation>
        The regular expression captures the standard representation of a GUID
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:pattern value="[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DistinguishedPropertySetType">
    <xs:annotation>
      <xs:documentation>
        Defines the well known property set ids for extended properties.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="Meeting"/>
      <xs:enumeration value="Appointment"/>
      <xs:enumeration value="Common"/>
      <xs:enumeration value="PublicStrings"/>
      <xs:enumeration value="Address"/>
      <xs:enumeration value="InternetHeaders"/>
      <xs:enumeration value="CalendarAssistant"/>
      <xs:enumeration value="UnifiedMessaging"/>
      <xs:enumeration value="Task"/>
      <xs:enumeration value="Sharing" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="MapiPropertyTypeType">
    <xs:annotation>
      <xs:documentation>
        Includes all of the extended property types that we support.  Note that Error, Null,
        Object and Object array can not be used in restrictions, or for setting/getting values.
        They are only there for error reporting purposes.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="ApplicationTime"/>
      <xs:enumeration value="ApplicationTimeArray"/>
      <xs:enumeration value="Binary"/>
      <xs:enumeration value="BinaryArray"/>
      <xs:enumeration value="Boolean"/>
      <xs:enumeration value="CLSID"/>
      <xs:enumeration value="CLSIDArray"/>
      <xs:enumeration value="Currency"/>
      <xs:enumeration value="CurrencyArray"/>
      <xs:enumeration value="Double"/>
      <xs:enumeration value="DoubleArray"/>
      <xs:enumeration value="Error"/>
      <xs:enumeration value="Float"/>
      <xs:enumeration value="FloatArray"/>
      <xs:enumeration value="Integer"/>
      <xs:enumeration value="IntegerArray"/>
      <xs:enumeration value="Long"/>
      <xs:enumeration value="LongArray"/>
      <xs:enumeration value="Null"/>
      <xs:enumeration value="Object"/>
      <xs:enumeration value="ObjectArray"/>
      <xs:enumeration value="Short"/>
      <xs:enumeration value="ShortArray"/>
      <xs:enumeration value="SystemTime"/>
      <xs:enumeration value="SystemTimeArray"/>
      <xs:enumeration value="String"/>
      <xs:enumeration value="StringArray"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="BasePathToElementType" abstract="true"/>

  <xs:complexType name="PathToUnindexedFieldType">
    <xs:complexContent>
      <xs:extension base="t:BasePathToElementType">
        <xs:attribute name="FieldURI" type="t:UnindexedFieldURIType" use="required" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PathToIndexedFieldType">
    <xs:complexContent>
      <xs:extension base="t:BasePathToElementType">
        <xs:attribute name="FieldURI" type="t:DictionaryURIType" use="required" />
        <xs:attribute name="FieldIndex" type="xs:string" use="required" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PathToExceptionFieldType">
    <xs:complexContent>
      <xs:extension base="t:BasePathToElementType">
        <xs:attribute name="FieldURI" type="t:ExceptionPropertyURIType" use="required" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:simpleType name="PropertyTagType">
    <xs:annotation>
      <xs:documentation>
        This type represents the property tag (MINUS the type part).  There are two options
        for representation:
        1.  Hex ==> 0x3fa4
        2.  Decimal ==> 0-65535
      </xs:documentation>
    </xs:annotation>
    <xs:union memberTypes ="xs:unsignedShort">
      <xs:simpleType id="HexPropertyTagType">
        <xs:restriction base="xs:string">
          <xs:pattern value="(0x|0X)[0-9A-Fa-f]{1,4}"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>

  <xs:complexType name="PathToExtendedFieldType">
    <xs:annotation>
      <xs:documentation>
        Represents an extended property.  Note that there are only a couple of valid attribute
        combinations.  Note that all occurances require the PropertyType attribute.

        1.  (DistinguishedPropertySetId || PropertySetId) + (PropertyName || Property Id)
        2.  PropertyTag

      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="t:BasePathToElementType">
        <xs:attribute name="DistinguishedPropertySetId" type="t:DistinguishedPropertySetType" use="optional"/>
        <xs:attribute name="PropertySetId" type="t:GuidType" use="optional"/>
        <xs:attribute name="PropertyTag" type="t:PropertyTagType" use="optional"/>
        <xs:attribute name="PropertyName" type="xs:string" use="optional"/>
        <xs:attribute name="PropertyId" type="xs:int" use="optional"/>
        <xs:attribute name="PropertyType" type="t:MapiPropertyTypeType" use="required"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:element name="Path" abstract="true" type="t:BasePathToElementType"/>
  <xs:element name="FieldURI" type="t:PathToUnindexedFieldType" substitutionGroup="t:Path"/>
  <xs:element name="IndexedFieldURI" type="t:PathToIndexedFieldType" substitutionGroup="t:Path" />
  <xs:element name="ExtendedFieldURI" type="t:PathToExtendedFieldType" substitutionGroup="t:Path"/>

  <!-- For errors only, identifies fields that do not have a uri. -->
  <xs:element name="ExceptionFieldURI" type="t:PathToExceptionFieldType" />

  <!-- Arrays of paths -->
  <xs:complexType name="NonEmptyArrayOfPathsToElementType">
    <!-- using choice here so that proxy generator will not flatten the array and thus lose the
        item element names -->
    <xs:choice maxOccurs ="unbounded">
      <xs:element ref="t:Path"/>
    </xs:choice>
  </xs:complexType>

  <!-- ExtendedProperty value instances -->

  <xs:complexType name="NonEmptyArrayOfPropertyValuesType">
    <xs:choice>
      <xs:element name="Value" type="xs:string" maxOccurs="unbounded"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="NonEmptyArrayOfExtendedPropertyType">
    <xs:choice>
      <xs:element name="ExtendedProperty" type="t:ExtendedPropertyType" maxOccurs="unbounded"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="ExtendedPropertyType">
    <xs:annotation>
      <xs:documentation>
        Represents an extended property instance (both its path identifier along with its
        associated value).
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="ExtendedFieldURI" type="t:PathToExtendedFieldType"/>
      <xs:choice>
        <xs:element name="Value" type="xs:string"/>
        <xs:element name="Values" type="t:NonEmptyArrayOfPropertyValuesType"/>
      </xs:choice>
    </xs:sequence>
  </xs:complexType>

  <!-- Query Traversal types -->
  <xs:simpleType name="FolderQueryTraversalType">
    <xs:annotation>
      <xs:documentation>Types of sub-tree traversal for deletion and enumeration</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="Shallow" />
      <xs:enumeration value="Deep" />
      <xs:enumeration value="SoftDeleted" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="SearchFolderTraversalType">
    <xs:annotation>
      <xs:documentation>Types of sub-tree traversal for deletion and enumeration</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="Shallow" />
      <xs:enumeration value="Deep" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ItemQueryTraversalType">
    <xs:annotation>
      <xs:documentation>Types of sub-tree traversal for deletion and enumeration</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="Shallow" />
      <xs:enumeration value="SoftDeleted" />
      <xs:enumeration value="Associated" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ConversationQueryTraversalType">
    <xs:annotation>
      <xs:documentation>Types of sub-tree traversal for conversations</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="Shallow" />
      <xs:enumeration value="Deep" />
    </xs:restriction>
  </xs:simpleType>

  <!-- Default shape names for response shapes -->
  <xs:simpleType name="DefaultShapeNamesType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="IdOnly" />
      <xs:enumeration value="Default" />
      <xs:enumeration value="AllProperties" />
      <xs:enumeration value="PcxPeopleSearch" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="BodyTypeResponseType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Best" />
      <xs:enumeration value="HTML" />
      <xs:enumeration value="Text" />
    </xs:restriction>
  </xs:simpleType>

  <!-- Placeholder type from which all folder shape properties are to be derived -->
  <xs:complexType name="FolderResponseShapeType">
    <xs:sequence>
      <xs:element name="BaseShape" type="t:DefaultShapeNamesType" />
      <xs:element name="AdditionalProperties" type="t:NonEmptyArrayOfPathsToElementType" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ItemResponseShapeType">
    <xs:sequence>
      <xs:element name="BaseShape" type="t:DefaultShapeNamesType" />
      <xs:element name="IncludeMimeContent" type="xs:boolean" minOccurs="0" />
      <xs:element name="BodyType" type="t:BodyTypeResponseType" minOccurs="0" />
      <xs:element name="UniqueBodyType" type="t:BodyTypeResponseType" minOccurs="0" />
      <xs:element name="NormalizedBodyType" type="t:BodyTypeResponseType" minOccurs="0" />
      <xs:element name="FilterHtmlContent" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ConvertHtmlCodePageToUTF8" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
      <xs:element name="InlineImageUrlTemplate" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="BlockExternalImages" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
      <xs:element name="AddBlankTargetToLinks" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
      <xs:element name="MaximumBodySize" type="xs:int" minOccurs="0" maxOccurs="1"/>
      <xs:element name="AdditionalProperties" type="t:NonEmptyArrayOfPathsToElementType" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AttachmentResponseShapeType">
    <xs:sequence>
      <xs:element name="IncludeMimeContent" type="xs:boolean" minOccurs="0" />
      <xs:element name="BodyType" type="t:BodyTypeResponseType" minOccurs="0" />
      <xs:element name="FilterHtmlContent" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
      <xs:element name="AdditionalProperties" type="t:NonEmptyArrayOfPathsToElementType" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ConversationResponseShapeType">
    <xs:sequence>
      <xs:element name="BaseShape" type="t:DefaultShapeNamesType" />
      <xs:element name="AdditionalProperties" type="t:NonEmptyArrayOfPathsToElementType" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PersonaResponseShapeType">
    <xs:sequence>
      <xs:element name="BaseShape" type="t:DefaultShapeNamesType" />
      <xs:element name="AdditionalProperties" type="t:NonEmptyArrayOfPathsToElementType" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="DisposalType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="HardDelete" />
      <xs:enumeration value="SoftDelete" />
      <xs:enumeration value="MoveToDeletedItems" />
    </xs:restriction>
  </xs:simpleType>

  <!-- auto-conflict resolution levels -->
  <xs:simpleType name="ConflictResolutionType">
    <xs:annotation>
      <xs:documentation>Type of conflict resolution to attempt during update</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="NeverOverwrite" />
      <xs:enumeration value="AutoResolve" />
      <xs:enumeration value="AlwaysOverwrite" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ClientAccessTokenTypeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="CallerIdentity" />
      <xs:enumeration value="ExtensionCallback" />
      <xs:enumeration value="ScopedToken" />
      <xs:enumeration value="ExtensionRestApiCallback" />
      <xs:enumeration value="Connectors" />
      <xs:enumeration value="Loki" />
      <xs:enumeration value="DesktopOutlook" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="NonEmptyArrayOfClientAccessTokenRequestsType">
    <xs:sequence>
      <xs:element name="TokenRequest" type="t:ClientAccessTokenRequestType" minOccurs="1" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ClientAccessTokenRequestType">
    <xs:sequence>
      <xs:element name="Id" type="xs:string" />
      <xs:element name="TokenType" type="t:ClientAccessTokenTypeType" />
      <xs:element name="Scope" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="ResourceUri" type="xs:string" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ClientAccessTokenType">
    <xs:sequence>
      <xs:element name="Id" type="xs:string" />
      <xs:element name="TokenType" type="t:ClientAccessTokenTypeType" />
      <xs:element name="TokenValue" type="xs:string"/>
      <xs:element name="TTL" type="xs:integer"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="ResponseClassType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Success" />
      <xs:enumeration value="Warning" />
      <xs:enumeration value="Error" />
    </xs:restriction>
  </xs:simpleType>

  <!-- Core update operations -->
  <xs:complexType name="ChangeDescriptionType" abstract="true">
    <!-- This path element needs some explanation.  For update operations, only ONE
            property can be modified within a single request.  That single property must be
            referenced in the Path element.  The Item/Folder element in the derived classes
            can then only hold a single property that is in agreement with the single path
            element-->
    <xs:sequence>
      <xs:element ref="t:Path"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ItemChangeDescriptionType">
    <xs:complexContent>
      <xs:extension base="t:ChangeDescriptionType"/>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="FolderChangeDescriptionType">
    <xs:complexContent>
      <xs:extension base="t:ChangeDescriptionType"/>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="SetItemFieldType">
    <xs:complexContent>
      <xs:extension base="t:ItemChangeDescriptionType">
        <xs:choice>
          <xs:element name="Item" type="t:ItemType"/>
          <xs:element name="Message" type="t:MessageType"/>
          <xs:element name="SharingMessage" type="t:SharingMessageType"/>
          <xs:element name="CalendarItem" type="t:CalendarItemType"/>
          <xs:element name="Contact" type="t:ContactItemType"/>
          <xs:element name="DistributionList" type="t:DistributionListType"/>
          <xs:element name="MeetingMessage" type="t:MeetingMessageType"/>
          <xs:element name="MeetingRequest" type="t:MeetingRequestMessageType"/>
          <xs:element name="MeetingResponse" type="t:MeetingResponseMessageType"/>
          <xs:element name="MeetingCancellation" type="t:MeetingCancellationMessageType"/>
          <xs:element name="Task" type="t:TaskType"/>
          <xs:element name="PostItem" type="t:PostItemType"/>
          <xs:element name="RoleMember" type="t:RoleMemberItemType"/>
          <xs:element name="Network" type="t:NetworkItemType"/>
          <xs:element name="Person" type="t:AbchPersonItemType"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="SetFolderFieldType">
    <xs:complexContent>
      <xs:extension base="t:FolderChangeDescriptionType">
        <xs:choice>
          <xs:element name="Folder" type="t:FolderType"/>
          <xs:element name="CalendarFolder" type="t:CalendarFolderType"/>
          <xs:element name="ContactsFolder" type="t:ContactsFolderType"/>
          <xs:element name="SearchFolder" type="t:SearchFolderType"/>
          <xs:element name="TasksFolder" type="t:TasksFolderType"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="DeleteItemFieldType">
    <xs:complexContent>
      <xs:extension base="t:ItemChangeDescriptionType">
        <xs:sequence/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DeleteFolderFieldType">
    <xs:complexContent>
      <xs:extension base="t:FolderChangeDescriptionType">
        <xs:sequence/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="AppendToItemFieldType">
    <xs:complexContent>
      <xs:extension base="t:ItemChangeDescriptionType">
        <xs:choice>
          <xs:element name="Item" type="t:ItemType"/>
          <xs:element name="Message" type="t:MessageType"/>
          <xs:element name="SharingMessage" type="t:SharingMessageType"/>
          <xs:element name="CalendarItem" type="t:CalendarItemType"/>
          <xs:element name="Contact" type="t:ContactItemType"/>
          <xs:element name="DistributionList" type="t:DistributionListType"/>
          <xs:element name="MeetingMessage" type="t:MeetingMessageType"/>
          <xs:element name="MeetingRequest" type="t:MeetingRequestMessageType"/>
          <xs:element name="MeetingResponse" type="t:MeetingResponseMessageType"/>
          <xs:element name="MeetingCancellation" type="t:MeetingCancellationMessageType"/>
          <xs:element name="Task" type="t:TaskType"/>
          <xs:element name="PostItem" type="t:PostItemType"/>
          <xs:element name="RoleMember" type="t:RoleMemberItemType"/>
          <xs:element name="Network" type="t:NetworkItemType"/>
          <xs:element name="Person" type="t:AbchPersonItemType"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="AppendToFolderFieldType">
    <xs:complexContent>
      <xs:extension base="t:FolderChangeDescriptionType">
        <xs:sequence>
          <xs:choice>
            <xs:element name="Folder" type="t:FolderType"/>
            <xs:element name="CalendarFolder" type="t:CalendarFolderType"/>
            <xs:element name="ContactsFolder" type="t:ContactsFolderType"/>
            <xs:element name="SearchFolder" type="t:SearchFolderType"/>
            <xs:element name="TasksFolder" type="t:TasksFolderType"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="NonEmptyArrayOfItemChangeDescriptionsType">
    <xs:choice maxOccurs="unbounded">
      <xs:element name="AppendToItemField" type="t:AppendToItemFieldType"/>
      <xs:element name="SetItemField" type="t:SetItemFieldType"/>
      <xs:element name="DeleteItemField" type="t:DeleteItemFieldType"/>
    </xs:choice>
  </xs:complexType>
  <xs:complexType name="NonEmptyArrayOfFolderChangeDescriptionsType">
    <xs:choice maxOccurs="unbounded">
      <xs:element name="AppendToFolderField" type="t:AppendToFolderFieldType"/>
      <xs:element name="SetFolderField" type="t:SetFolderFieldType"/>
      <xs:element name="DeleteFolderField" type="t:DeleteFolderFieldType"/>
    </xs:choice>
  </xs:complexType>

  <!-- Updating an item. -->

  <xs:complexType name="ItemChangeType">
    <xs:sequence>
      <xs:choice>
        <xs:element name="ItemId" type="t:ItemIdType" />
        <xs:element name="OccurrenceItemId" type="t:OccurrenceItemIdType"/>
        <xs:element name="RecurringMasterItemId" type="t:RecurringMasterItemIdType"/>
      </xs:choice>
      <xs:element name="Updates" type="t:NonEmptyArrayOfItemChangeDescriptionsType" />
      <xs:element name="CalendarActivityData" type="t:CalendarActivityDataType" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="NonEmptyArrayOfItemChangesType">
    <xs:sequence>
      <xs:element name="ItemChange" type="t:ItemChangeType" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <!-- Other headers -->
  <xs:complexType name="InternetHeaderType">
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute name="HeaderName" type="xs:string" use="required"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="NonEmptyArrayOfInternetHeadersType">
    <xs:sequence>
      <xs:element name="InternetMessageHeader" type="t:InternetHeaderType" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="NonEmptyArrayOfPredictedActionReasonType">
    <xs:sequence>
      <xs:element name="PredictedActionReason" type="t:PredictedActionReasonType" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <!-- Attachments -->

  <!-- This type is used in GetAttachment -->
  <xs:complexType name="RequestAttachmentIdType">
    <xs:complexContent>
      <xs:extension base="t:BaseItemIdType">
        <xs:attribute name="Id" type="xs:string" use="required"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- This type is used in CreateAttachment responses. CreateAttachment modifies the
        change key of the root item of the created attachment. We have to return that new
        change key.-->
  <xs:complexType name="AttachmentIdType">
    <xs:complexContent>
      <xs:extension base="t:RequestAttachmentIdType">
        <xs:attribute name="RootItemId" type="xs:string" use="optional"/>
        <xs:attribute name="RootItemChangeKey" type="xs:string" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- This type is used solely in DeleteAttachment responses. -->
  <xs:complexType name="RootItemIdType">
    <xs:complexContent>
      <xs:extension base="t:BaseItemIdType">
        <xs:attribute name="RootItemId" type="xs:string" use="required"/>
        <xs:attribute name="RootItemChangeKey" type="xs:string" use="required"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="NonEmptyArrayOfRequestAttachmentIdsType">
    <xs:choice minOccurs="1" maxOccurs="unbounded">
      <xs:element name="AttachmentId" type="t:RequestAttachmentIdType"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="AttachmentType">
    <xs:sequence>
      <xs:element name="AttachmentId" type="t:AttachmentIdType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Name" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ContentType" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ContentId" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ContentLocation" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="AttachmentOriginalUrl" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Size" type="xs:int" minOccurs="0" maxOccurs="1"/>
      <xs:element name="LastModifiedTime" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
      <xs:element name="IsInline" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ItemAttachmentType">
    <xs:complexContent>
      <xs:extension base="t:AttachmentType">
        <xs:choice minOccurs="0" maxOccurs="1">
          <xs:element name="Item" type="t:ItemType"/>
          <xs:element name="Message" type="t:MessageType"/>
          <xs:element name="SharingMessage" type="t:SharingMessageType"/>
          <xs:element name="CalendarItem" type="t:CalendarItemType"/>
          <xs:element name="Contact" type="t:ContactItemType"/>
          <xs:element name="MeetingMessage" type="t:MeetingMessageType"/>
          <xs:element name="MeetingRequest" type="t:MeetingRequestMessageType"/>
          <xs:element name="MeetingResponse" type="t:MeetingResponseMessageType"/>
          <xs:element name="MeetingCancellation" type="t:MeetingCancellationMessageType"/>
          <xs:element name="Task" type="t:TaskType"/>
          <xs:element name="PostItem" type="t:PostItemType"/>
          <xs:element name="RoleMember" type="t:RoleMemberItemType"/>
          <xs:element name="Network" type="t:NetworkItemType"/>
          <xs:element name="Person" type="t:AbchPersonItemType"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="SyncFolderItemsCreateOrUpdateType">
    <xs:choice>
      <xs:element name="Item" type="t:ItemType"/>
      <xs:element name="Message" type="t:MessageType"/>
      <xs:element name="SharingMessage" type="t:SharingMessageType"/>
      <xs:element name="CalendarItem" type="t:CalendarItemType"/>
      <xs:element name="Contact" type="t:ContactItemType"/>
      <xs:element name="DistributionList" type="t:DistributionListType"/>
      <xs:element name="MeetingMessage" type="t:MeetingMessageType"/>
      <xs:element name="MeetingRequest" type="t:MeetingRequestMessageType"/>
      <xs:element name="MeetingResponse" type="t:MeetingResponseMessageType"/>
      <xs:element name="MeetingCancellation" type="t:MeetingCancellationMessageType"/>
      <xs:element name="Task" type="t:TaskType"/>
      <xs:element name="PostItem" type="t:PostItemType"/>
      <xs:element name="RoleMember" type="t:RoleMemberItemType"/>
      <xs:element name="Network" type="t:NetworkItemType"/>
      <xs:element name="Person" type="t:AbchPersonItemType"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="FileAttachmentType">
    <xs:complexContent>
      <xs:extension base="t:AttachmentType">
        <xs:sequence>
          <xs:element name="IsContactPhoto" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
          <xs:element name="Content" type="xs:base64Binary" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ReferenceAttachmentType">
    <xs:complexContent>
      <xs:extension base="t:AttachmentType">
        <xs:sequence>
          <xs:element name="AttachLongPathName" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="ProviderType" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="ProviderEndpointUrl" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="AttachmentThumbnailUrl" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="AttachmentPreviewUrl" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="PermissionType" type="xs:int" minOccurs="0" maxOccurs="1"/>
          <xs:element name="OriginalPermissionType" type="xs:int" minOccurs="0" maxOccurs="1"/>
          <xs:element name="AttachmentIsFolder" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ArrayOfAttachmentsType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="ItemAttachment" type="t:ItemAttachmentType"/>
      <xs:element name="FileAttachment" type="t:FileAttachmentType"/>
      <xs:element name="ReferenceAttachment" type="t:ReferenceAttachmentType"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="NonEmptyArrayOfAttachmentsType">
    <xs:choice minOccurs="1" maxOccurs="unbounded">
      <xs:element name="ItemAttachment" type="t:ItemAttachmentType"/>
      <xs:element name="FileAttachment" type="t:FileAttachmentType"/>
      <xs:element name="ReferenceAttachment" type="t:ReferenceAttachmentType"/>
    </xs:choice>
  </xs:complexType>

  <!-- Sensitivity enumeration -->
  <xs:simpleType name="SensitivityChoicesType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Normal" />
      <xs:enumeration value="Personal" />
      <xs:enumeration value="Private" />
      <xs:enumeration value="Confidential" />
    </xs:restriction>
  </xs:simpleType>

  <!-- Importance enumeration -->
  <xs:simpleType name="ImportanceChoicesType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Low" />
      <xs:enumeration value="Normal" />
      <xs:enumeration value="High" />
    </xs:restriction>
  </xs:simpleType>

  <!-- Type of body returned -->
  <xs:simpleType name="BodyTypeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="HTML" />
      <xs:enumeration value="Text" />
    </xs:restriction>
  </xs:simpleType>

  <!-- Body content with body type attribute -->
  <xs:complexType name="BodyType">
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute name="BodyType" type="t:BodyTypeType" use="required" />
        <xs:attribute name="IsTruncated" type="xs:boolean" use="optional" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <!-- UniqueBody content with body type attribute -->
  <xs:complexType name="UniqueBodyType">
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute name="UniqueBodyType" type="t:BodyTypeType" use="required" />
        <xs:attribute name="IsTruncated" type="xs:boolean" use="optional" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <!-- NormalizedBody content with body type attribute -->
  <xs:complexType name="NormalizedBodyType">
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute name="NormalizedBodyType" type="t:BodyTypeType" use="required" />
        <xs:attribute name="IsTruncated" type="xs:boolean" use="optional" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <!-- Folder Service types. -->
  <!-- Folder Ids -->
  <xs:complexType name="BaseFolderIdType" abstract="true">
    <xs:annotation>
      <xs:documentation>Utility type which should never appear in user documents</xs:documentation>
    </xs:annotation>
  </xs:complexType>

  <!-- Folder classes -->
  <xs:simpleType name="FolderClassType">
    <xs:restriction base="xs:string" />
  </xs:simpleType>

  <xs:simpleType name="DistinguishedFolderIdNameType">
    <xs:annotation>
      <xs:documentation>URIs for the distinguished folders accessible from a mailbox</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="calendar" />
      <xs:enumeration value="contacts" />
      <xs:enumeration value="deleteditems" />
      <xs:enumeration value="drafts" />
      <xs:enumeration value="inbox" />
      <xs:enumeration value="journal" />
      <xs:enumeration value="notes" />
      <xs:enumeration value="outbox" />
      <xs:enumeration value="sentitems" />
      <xs:enumeration value="tasks" />
      <xs:enumeration value="msgfolderroot" />
      <xs:enumeration value="publicfoldersroot" />
      <xs:enumeration value="root" />
      <xs:enumeration value="junkemail" />
      <xs:enumeration value="searchfolders" />
      <xs:enumeration value="voicemail" />
      <xs:enumeration value="recoverableitemsroot" />
      <xs:enumeration value="recoverableitemsdeletions" />
      <xs:enumeration value="recoverableitemsversions" />
      <xs:enumeration value="recoverableitemspurges" />
      <xs:enumeration value="recoverableitemsdiscoveryholds" />
      <xs:enumeration value="archiveroot" />
      <xs:enumeration value="archivemsgfolderroot" />
      <xs:enumeration value="archivedeleteditems" />
      <xs:enumeration value="archiveinbox" />
      <xs:enumeration value="archiverecoverableitemsroot" />
      <xs:enumeration value="archiverecoverableitemsdeletions" />
      <xs:enumeration value="archiverecoverableitemsversions" />
      <xs:enumeration value="archiverecoverableitemspurges" />
      <xs:enumeration value="archiverecoverableitemsdiscoveryholds" />
      <xs:enumeration value="syncissues" />
      <xs:enumeration value="conflicts" />
      <xs:enumeration value="localfailures" />
      <xs:enumeration value="serverfailures" />
      <xs:enumeration value="recipientcache" />
      <xs:enumeration value="quickcontacts" />
      <xs:enumeration value="conversationhistory" />
      <xs:enumeration value="adminauditlogs" />
      <xs:enumeration value="todosearch" />
      <xs:enumeration value="mycontacts" />
      <xs:enumeration value="directory" />
      <xs:enumeration value="imcontactlist" />
      <xs:enumeration value="peopleconnect" />
      <xs:enumeration value="favorites" />
      <xs:enumeration value="mecontact" />
      <xs:enumeration value="personmetadata" />
      <xs:enumeration value="teamspaceactivity" />
      <xs:enumeration value="teamspacemessaging" />
      <xs:enumeration value="teamspaceworkitems" />
      <xs:enumeration value="scheduled" />
      <xs:enumeration value="orionnotes" />
      <xs:enumeration value="tagitems" />
      <xs:enumeration value="alltaggeditems" />
      <xs:enumeration value="externalcontacts" />
      <xs:enumeration value="teamchat" />
      <xs:enumeration value="teamchathistory" />
      <xs:enumeration value="yammerroot" />
      <xs:enumeration value="yammerinbound" />
      <xs:enumeration value="yammeroutbound" />
      <xs:enumeration value="yammerfeeds" />
      <xs:enumeration value="onedriveroot" />
      <xs:enumeration value="onedriverecylebin" />
      <xs:enumeration value="onedrivesystem" />
      <xs:enumeration value="onedrivevolume" />
      <xs:enumeration value="important" />
      <xs:enumeration value="starred" />
      <xs:enumeration value="archive"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="DistinguishedFolderIdType">
    <xs:annotation>
      <xs:documentation>Identifier for a distinguished folder</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="t:BaseFolderIdType">
        <xs:sequence>
          <xs:element name="Mailbox" type="t:EmailAddressType" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="Id" type="t:DistinguishedFolderIdNameType" use="required" />
        <xs:attribute name="ChangeKey" type="xs:string" use="optional" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="FolderIdType">
    <xs:annotation>
      <xs:documentation>Identifier for a fully resolved folder</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="t:BaseFolderIdType">
        <xs:attribute name="Id" type="xs:string" use="required" />
        <xs:attribute name="ChangeKey" type="xs:string" use="optional" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="AddressListIdType">
    <xs:annotation>
      <xs:documentation>Identifier for a address list</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="t:BaseFolderIdType">
        <xs:attribute name="Id" type="xs:string" use="required" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ArrayOfDistinguishedFolderIdType">
    <xs:choice maxOccurs="unbounded" minOccurs="0">
      <xs:element name="DistinguishedFolderId" type="t:DistinguishedFolderIdType"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="NonEmptyArrayOfBaseFolderIdsType">
    <xs:choice maxOccurs="unbounded" minOccurs="1">
      <xs:element name="FolderId" type="t:FolderIdType"/>
      <xs:element name="DistinguishedFolderId" type="t:DistinguishedFolderIdType"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="TargetFolderIdType">
    <xs:choice>
      <xs:element name="FolderId" type="t:FolderIdType"/>
      <xs:element name="DistinguishedFolderId" type="t:DistinguishedFolderIdType"/>
      <xs:element name="AddressListId" type="t:AddressListIdType"/>
    </xs:choice>
  </xs:complexType>

  <!-- UploadItems types -->
  <xs:complexType name="NonEmptyArrayOfUploadItemsType">
    <xs:sequence>
      <xs:element name="Item" type="t:UploadItemType" maxOccurs="unbounded" minOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <!-- UploadItemType-->
  <xs:complexType name="UploadItemType">
    <xs:sequence>
      <xs:element name="ParentFolderId" type="t:FolderIdType" maxOccurs ="1" minOccurs ="1"/>
      <xs:element name="ItemId" type="t:ItemIdType" maxOccurs ="1" minOccurs="0"/>
      <xs:element name="Data" type="xs:base64Binary" maxOccurs ="1" minOccurs ="1"/>
    </xs:sequence>
    <xs:attribute name="CreateAction" type="t:CreateActionType" use="required"/>
    <xs:attribute name="IsAssociated" type="xs:boolean" use="optional"/>
  </xs:complexType>

  <!-- CreateActionType -->
  <xs:simpleType name="CreateActionType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="CreateNew"/>
      <xs:enumeration value="Update"/>
      <xs:enumeration value="UpdateOrCreate"/>
    </xs:restriction >
  </xs:simpleType>

  <!-- CompleteActionType -->
  <xs:simpleType name="CompleteActionType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Commit"/>
      <xs:enumeration value="Abandon"/>
    </xs:restriction >
  </xs:simpleType>

  <!-- Find Folder/Item/Search supporting types -->
  <!-- When returning offset information for FindFolder/FindItem, we need to indicate where we
    are in the result set.  For the different paging mechanisms we need to indicate this in
    different ways.  The only common paging types between FindFolder and FindItem are indexed and
    fractional.
    -->
  <xs:attributeGroup name="FindResponsePagingAttributes">
    <xs:attribute name="IndexedPagingOffset" type="xs:int" use="optional"/>
    <xs:attribute name="NumeratorOffset" type="xs:int" use="optional"/>
    <xs:attribute name="AbsoluteDenominator" type="xs:int" use="optional"/>
    <xs:attribute name="IncludesLastItemInRange" type="xs:boolean" use="optional"/>
    <xs:attribute name="TotalItemsInView" type="xs:int" use="optional"/>
  </xs:attributeGroup>

  <xs:simpleType name="ViewFilterType">
    <xs:annotation>
      <xs:documentation>Types of view filters for finding items/conversations</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="All" />
      <xs:enumeration value="Flagged" />
      <xs:enumeration value="HasAttachment" />
      <xs:enumeration value="ToOrCcMe" />
      <xs:enumeration value="Unread" />
      <xs:enumeration value="TaskActive" />
      <xs:enumeration value="TaskOverdue" />
      <xs:enumeration value="TaskCompleted" />
      <xs:enumeration value="NoClutter" />
      <xs:enumeration value="Clutter" />
    </xs:restriction>
  </xs:simpleType>

  <!-- FindFolder response element for holding the results from a single parent -->
  <xs:complexType name="FindFolderParentType">
    <xs:sequence>
      <xs:element name="Folders" type="t:ArrayOfFoldersType" minOccurs="0"/>
    </xs:sequence>
    <xs:attributeGroup ref="t:FindResponsePagingAttributes"/>
  </xs:complexType>

  <!-- Basic information in a folder definition -->
  <xs:complexType name="BaseFolderType" abstract ="true">
    <xs:sequence>
      <xs:element name="FolderId" type="t:FolderIdType" minOccurs="0"/>
      <xs:element name="ParentFolderId" type="t:FolderIdType" minOccurs="0"/>
      <xs:element name="FolderClass" type="xs:string" minOccurs="0"/>
      <xs:element name="DisplayName" type="xs:string" minOccurs="0"/>
      <xs:element name="TotalCount" type="xs:int" minOccurs="0"/>
      <xs:element name="ChildFolderCount" type="xs:int" minOccurs="0"/>
      <xs:element name="ExtendedProperty" type="t:ExtendedPropertyType" minOccurs="0" maxOccurs="unbounded"/>
      <xs:element name="ManagedFolderInformation" type="t:ManagedFolderInformationType" minOccurs="0"/>
      <xs:element name="EffectiveRights" type="t:EffectiveRightsType" minOccurs="0"/>
      <xs:element name="DistinguishedFolderId" type="t:DistinguishedFolderIdNameType" minOccurs="0"/>
      <xs:element name="PolicyTag" type="t:RetentionTagType" minOccurs="0" />
      <xs:element name="ArchiveTag" type="t:RetentionTagType" minOccurs="0" />
      <xs:element name="ReplicaList" type="t:ArrayOfStringsType" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <!-- ManagedFolderInformation property type -->
  <xs:complexType name="ManagedFolderInformationType">
    <xs:annotation>
      <xs:documentation>Compound property for Managed Folder related information for Managed Folders.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="CanDelete" type="xs:boolean" minOccurs="0"/>
      <xs:element name="CanRenameOrMove" type="xs:boolean" minOccurs="0"/>
      <xs:element name="MustDisplayComment" type="xs:boolean" minOccurs="0"/>
      <xs:element name="HasQuota" type="xs:boolean" minOccurs="0"/>
      <xs:element name="IsManagedFoldersRoot" type="xs:boolean" minOccurs="0"/>
      <xs:element name="ManagedFolderId" type="xs:string" minOccurs="0"/>
      <xs:element name="Comment" type="xs:string" minOccurs="0"/>
      <xs:element name="StorageQuota" type="xs:int" minOccurs="0"/>
      <xs:element name="FolderSize" type="xs:int" minOccurs="0"/>
      <xs:element name="HomePage" type="xs:string" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="FolderType">
    <xs:complexContent>
      <xs:extension base="t:BaseFolderType">
        <xs:sequence>
          <xs:element name="PermissionSet" type="t:PermissionSetType" minOccurs="0"/>
          <xs:element name="UnreadCount" type="xs:int" minOccurs="0"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- Calendar Folder Type-->
  <xs:complexType name="CalendarFolderType">
    <xs:complexContent>
      <xs:extension base="t:BaseFolderType">
        <xs:sequence>
          <xs:element name="SharingEffectiveRights" type="t:CalendarPermissionReadAccessType" minOccurs="0"/>
          <xs:element name="PermissionSet" type="t:CalendarPermissionSetType" minOccurs="0"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- Reminder Action Type -->
  <xs:simpleType name="ReminderActionType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Dismiss"/>
      <xs:enumeration value="Snooze"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="ReminderItemActionType">
    <xs:sequence>
      <xs:element name="ActionType" type="t:ReminderActionType" minOccurs="1" maxOccurs="1" />
      <xs:element name="ItemId" type="t:ItemIdType" minOccurs ="1" maxOccurs ="1" />
      <xs:element name="NewReminderTime" type="xs:string" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="NonEmptyArrayOfReminderItemActionType">
    <xs:sequence>
      <xs:element name="ReminderItemAction" type="t:ReminderItemActionType" minOccurs="1" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <!-- Contacts Folder Type-->
  <xs:complexType name="ContactsFolderType">
    <xs:complexContent>
      <xs:extension base="t:BaseFolderType">
        <xs:sequence>
          <xs:element name="SharingEffectiveRights" type="t:PermissionReadAccessType" minOccurs="0"/>
          <xs:element name="PermissionSet" type="t:PermissionSetType" minOccurs="0"/>
          <xs:element name="SourceId" type="xs:string" minOccurs="0"/>
          <xs:element name="AccountName" type="xs:string" minOccurs="0"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- Search Folder Type-->
  <xs:complexType name="SearchFolderType">
    <xs:complexContent>
      <xs:extension base="t:FolderType">
        <xs:sequence>
          <xs:element name="SearchParameters" type="t:SearchParametersType" minOccurs="0" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- Tasks Folder Type-->
  <xs:complexType name="TasksFolderType">
    <xs:complexContent>
      <xs:extension base="t:FolderType"/>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="NonEmptyArrayOfFoldersType">
    <xs:choice minOccurs="1" maxOccurs="unbounded">
      <xs:element name="Folder" type="t:FolderType"/>
      <xs:element name="CalendarFolder" type="t:CalendarFolderType"/>
      <xs:element name="ContactsFolder" type="t:ContactsFolderType"/>
      <xs:element name="SearchFolder" type="t:SearchFolderType"/>
      <xs:element name="TasksFolder" type="t:TasksFolderType"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="ArrayOfFoldersType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="Folder" type="t:FolderType"/>
      <xs:element name="CalendarFolder" type="t:CalendarFolderType"/>
      <xs:element name="ContactsFolder" type="t:ContactsFolderType"/>
      <xs:element name="SearchFolder" type="t:SearchFolderType"/>
      <xs:element name="TasksFolder" type="t:TasksFolderType"/>
    </xs:choice>
  </xs:complexType>

  <!-- Item Service types. -->
  <xs:complexType name="BaseItemIdType" abstract="true">
    <xs:annotation>
      <xs:documentation>Abstract base type for item identifiers.  Should never be used in web service calls</xs:documentation>
    </xs:annotation>
  </xs:complexType>
  <xs:element name="BaseItemId" type="t:BaseItemIdType" />

  <xs:simpleType name="DerivedItemIdType">
    <xs:restriction base="xs:string" />
  </xs:simpleType>

  <xs:complexType name="ItemIdType">
    <xs:annotation>
      <xs:documentation>Identifier for a fully resolved item</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="t:BaseItemIdType">
        <xs:attribute name="Id" type="xs:string" use="required" />
        <xs:attribute name="ChangeKey" type="xs:string" use="optional" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="NonEmptyArrayOfBaseItemIdsType">
    <xs:choice minOccurs="1" maxOccurs="unbounded">
      <xs:element name="ItemId" type="t:ItemIdType"/>
      <xs:element name="OccurrenceItemId" type="t:OccurrenceItemIdType"/>
      <xs:element name="RecurringMasterItemId" type="t:RecurringMasterItemIdType"/>
      <xs:element name="RecurringMasterItemIdRanges" type="t:RecurringMasterItemIdRangesType" />
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="ArrayOfBaseItemIdsType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="ItemId" type="t:ItemIdType"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="NonEmptyArrayOfItemIdsType">
    <xs:sequence>
      <xs:element name="ItemId" type="t:ItemIdType" maxOccurs="unbounded" minOccurs="1"/>
    </xs:sequence>
  </xs:complexType>
  
  <xs:complexType name="ArrayOfItemIdsType">
    <xs:sequence>
      <xs:element name="ItemId" type="t:ItemIdType" maxOccurs="unbounded" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <!-- Item classes -->
  <xs:simpleType name="ItemClassType">
    <xs:restriction base="xs:string" />
  </xs:simpleType>

  <!--Reply objects-->
  <xs:complexType name="ResponseObjectCoreType" abstract="true">
    <xs:annotation>
      <xs:documentation>
        Internal abstract base type for reply objects.
        Should not appear in client code
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="t:MessageType">
        <xs:sequence>
          <xs:element name="ReferenceItemId" type="t:ItemIdType" minOccurs="0" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ResponseObjectType" abstract="true">
    <xs:annotation>
      <xs:documentation>Abstract base type for reply objects</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="t:ResponseObjectCoreType">
        <xs:attribute name="ObjectName" type="xs:string" use="optional">
          <xs:annotation>
            <xs:documentation>
              The name of this reply object class as an English string.  The client
              application is required to translate it if it's running in a different locale
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!--The wrapper around all reply object types-->
  <xs:complexType name="NonEmptyArrayOfResponseObjectsType">
    <xs:choice maxOccurs="unbounded" minOccurs="0">
      <xs:element name="AcceptItem" type="t:AcceptItemType"/>
      <xs:element name="TentativelyAcceptItem" type="t:TentativelyAcceptItemType"/>
      <xs:element name="DeclineItem" type="t:DeclineItemType"/>
      <xs:element name="ReplyToItem" type="t:ReplyToItemType" />
      <xs:element name="ForwardItem" type="t:ForwardItemType" />
      <xs:element name="ReplyAllToItem" type="t:ReplyAllToItemType" />
      <xs:element name="CancelCalendarItem" type="t:CancelCalendarItemType" />
      <xs:element name="RemoveItem" type="t:RemoveItemType" />
      <xs:element name="SuppressReadReceipt" type="t:SuppressReadReceiptType" />
      <xs:element name="PostReplyItem" type="t:PostReplyItemType" />
      <xs:element name="AcceptSharingInvitation" type="t:AcceptSharingInvitationType" />
      <xs:element name="AddItemToMyCalendar" type="t:AddItemToMyCalendarType" />
      <xs:element name="ProposeNewTime" type="t:ProposeNewTimeType" />
    </xs:choice>
  </xs:complexType>

  <!-- Updating an folder.  Represents a set of changes to a single folder -->
  <xs:complexType name="FolderChangeType">
    <xs:sequence>
      <xs:choice>
        <xs:element name="FolderId" type="t:FolderIdType" />
        <xs:element name="DistinguishedFolderId" type="t:DistinguishedFolderIdType"/>
      </xs:choice>
      <xs:element name="Updates" type="t:NonEmptyArrayOfFolderChangeDescriptionsType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="NonEmptyArrayOfFolderChangesType">
    <xs:sequence>
      <xs:element name="FolderChange" type="t:FolderChangeType" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <!-- Generic response to deleting a folder -->
  <!-- Some well-known reply objects -->
  <xs:complexType name="WellKnownResponseObjectType">
    <xs:complexContent>
      <xs:restriction base="t:ResponseObjectType">
        <xs:sequence>
          <xs:element name="ItemClass" type="t:ItemClassType" minOccurs="0" />
          <xs:element name="Sensitivity" type="t:SensitivityChoicesType" minOccurs="0" />
          <xs:element name="Body" type="t:BodyType" minOccurs="0" />
          <xs:element name="Attachments" type="t:NonEmptyArrayOfAttachmentsType" minOccurs="0" />
          <xs:element
                  name="InternetMessageHeaders"
                  type="t:NonEmptyArrayOfInternetHeadersType"
                  minOccurs="0" />
          <xs:element name="Sender" type="t:SingleRecipientType" minOccurs="0" />
          <xs:element name="ToRecipients" type="t:ArrayOfRecipientsType" minOccurs="0" />
          <xs:element name="CcRecipients" type="t:ArrayOfRecipientsType" minOccurs="0" />
          <xs:element name="BccRecipients" type="t:ArrayOfRecipientsType" minOccurs="0" />
          <xs:element name="IsReadReceiptRequested" type="xs:boolean" minOccurs="0" />
          <xs:element name="IsDeliveryReceiptRequested" type="xs:boolean" minOccurs="0" />
          <xs:element name="From" type="t:SingleRecipientType" minOccurs="0" />
          <xs:element name="ReferenceItemId" type="t:ItemIdType" minOccurs="0" />
        </xs:sequence>
        <xs:attribute name="ObjectName" type="xs:string" use="prohibited" />
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <!-- Smart reponses: ReplyToItem, ReplyAllToItem, ForwardItem-->
  <xs:complexType name="SmartResponseBaseType">
    <xs:complexContent>
      <xs:restriction base="t:ResponseObjectType">
        <xs:sequence>
          <xs:element name="Subject" type="xs:string" minOccurs="0" />
          <xs:element name="Body" type="t:BodyType" minOccurs="0" />
          <xs:element name="ToRecipients" type="t:ArrayOfRecipientsType" minOccurs="0" />
          <xs:element name="CcRecipients" type="t:ArrayOfRecipientsType" minOccurs="0" />
          <xs:element name="BccRecipients" type="t:ArrayOfRecipientsType" minOccurs="0" />
          <xs:element name="IsReadReceiptRequested" type="xs:boolean" minOccurs="0" />
          <xs:element name="IsDeliveryReceiptRequested" type="xs:boolean" minOccurs="0" />
          <xs:element name="From" type="t:SingleRecipientType" minOccurs="0" />
          <xs:element name="ReferenceItemId" type="t:ItemIdType" minOccurs="0" />
        </xs:sequence>
        <xs:attribute name="ObjectName" type="xs:string" use="prohibited" />
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SmartResponseType">
    <xs:complexContent>
      <xs:extension base="t:SmartResponseBaseType">
        <xs:sequence>
          <xs:element name="NewBodyContent" type="t:BodyType" minOccurs="0" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <!-- Distinguish the various kinds of responses which differ only in name by making them -->
  <!-- have types which all extend the same base types trivially -->
  <xs:complexType name="ReplyToItemType">
    <xs:complexContent>
      <xs:extension base="t:SmartResponseType" />
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ReplyAllToItemType">
    <xs:complexContent>
      <xs:extension base="t:SmartResponseType">
        <xs:sequence>
          <xs:element name="IsSpecificMessageReply" type="xs:boolean" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ForwardItemType">
    <xs:complexContent>
      <xs:extension base="t:SmartResponseType" />
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CancelCalendarItemType">
    <xs:complexContent>
      <xs:extension base="t:SmartResponseType" />
    </xs:complexContent>
  </xs:complexType>

  <!-- Reference Item response object  -->

  <xs:complexType name="ReferenceItemResponseType">
    <xs:complexContent>
      <xs:restriction base="t:ResponseObjectType">
        <xs:sequence>
          <xs:element name="ReferenceItemId" type="t:ItemIdType" minOccurs="0" />
        </xs:sequence>
        <xs:attribute name="ObjectName" type="xs:string" use="prohibited" />
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="SuppressReadReceiptType">
    <xs:complexContent>
      <xs:extension base="t:ReferenceItemResponseType" />
    </xs:complexContent>
  </xs:complexType>

  <!-- FindItem response element for holding the results from a single parent -->
  <xs:complexType name="FindItemParentType">
    <xs:choice>
      <xs:element name="Items" type="t:ArrayOfRealItemsType"/>
      <xs:element name="Groups" type="t:ArrayOfGroupedItemsType"/>
    </xs:choice>
    <xs:attributeGroup ref="t:FindResponsePagingAttributes"/>
  </xs:complexType>

  <!-- Core contents of an item. -->
  <xs:complexType name="ItemType">
    <xs:sequence>
      <xs:element name="MimeContent" type="t:MimeContentType" minOccurs="0" />
      <xs:element name="ItemId" type="t:ItemIdType" minOccurs="0" />
      <xs:element name="ParentFolderId" type="t:FolderIdType" minOccurs="0"/>
      <xs:element name="ItemClass" type="t:ItemClassType" minOccurs="0" />
      <xs:element name="Subject" type="xs:string" minOccurs="0" />
      <xs:element name="Sensitivity" type="t:SensitivityChoicesType" minOccurs="0" />
      <xs:element name="Body" type="t:BodyType" minOccurs="0" />
      <xs:element name="Attachments" type="t:NonEmptyArrayOfAttachmentsType" minOccurs="0" />
      <xs:element name="DateTimeReceived" type="xs:dateTime" minOccurs="0" />
      <xs:element name="Size" type="xs:int" minOccurs="0" />
      <xs:element name="Categories" type="t:ArrayOfStringsType" minOccurs="0" />
      <xs:element name="Importance" type="t:ImportanceChoicesType" minOccurs="0" />
      <xs:element name="InReplyTo" type="xs:string" minOccurs="0" />
      <xs:element name="IsSubmitted" type="xs:boolean" minOccurs="0" />
      <xs:element name="IsDraft" type="xs:boolean" minOccurs="0" />
      <xs:element name="IsFromMe" type="xs:boolean" minOccurs="0" />
      <xs:element name="IsResend" type="xs:boolean" minOccurs="0" />
      <xs:element name="IsUnmodified" type="xs:boolean" minOccurs="0" />
      <xs:element name="InternetMessageHeaders" type="t:NonEmptyArrayOfInternetHeadersType" minOccurs="0" />
      <xs:element name="DateTimeSent" type="xs:dateTime" minOccurs="0" />
      <xs:element name="DateTimeCreated" type="xs:dateTime" minOccurs="0" />
      <xs:element name="ResponseObjects" type="t:NonEmptyArrayOfResponseObjectsType" minOccurs="0" />
      <xs:element name="ReminderDueBy" type="xs:dateTime" minOccurs="0" />
      <xs:element name="ReminderIsSet" type="xs:boolean" minOccurs="0" />
      <xs:element name="ReminderNextTime" type="xs:dateTime" minOccurs="0" />
      <xs:element name="ReminderMinutesBeforeStart" type="t:ReminderMinutesBeforeStartType" minOccurs="0" />
      <xs:element name="DisplayCc" type="xs:string" minOccurs="0" />
      <xs:element name="DisplayTo" type="xs:string" minOccurs="0" />
      <xs:element name="DisplayBcc" type="xs:string" minOccurs="0" />
      <xs:element name="HasAttachments" type="xs:boolean" minOccurs="0"/>
      <xs:element name="ExtendedProperty" type="t:ExtendedPropertyType" minOccurs="0" maxOccurs="unbounded" />
      <xs:element name="Culture" type="xs:language" minOccurs="0"/>
      <xs:element name="EffectiveRights" type="t:EffectiveRightsType" minOccurs="0" />
      <xs:element name="LastModifiedName" type="xs:string" minOccurs="0" />
      <xs:element name="LastModifiedTime" type="xs:dateTime" minOccurs="0" />
      <xs:element name="IsAssociated" type="xs:boolean" minOccurs="0" />
      <xs:element name="WebClientReadFormQueryString" type="xs:string" minOccurs="0" />
      <xs:element name="WebClientEditFormQueryString" type="xs:string" minOccurs="0" />
      <xs:element name="ConversationId" type="t:ItemIdType" minOccurs="0" />
      <xs:element name="UniqueBody" type="t:BodyType" minOccurs="0" />
      <xs:element name="Flag" type="t:FlagType" minOccurs="0" />
      <xs:element name="StoreEntryId" type="xs:base64Binary" minOccurs="0" />
      <xs:element name="InstanceKey" type="xs:base64Binary" minOccurs="0" />
      <xs:element name="NormalizedBody" type="t:BodyType" minOccurs="0"/>
      <xs:element name="EntityExtractionResult" type="t:EntityExtractionResultType" minOccurs="0" />
      <xs:element name="PolicyTag" type="t:RetentionTagType" minOccurs="0" />
      <xs:element name="ArchiveTag" type="t:RetentionTagType" minOccurs="0" />
      <xs:element name="RetentionDate" type="xs:dateTime" minOccurs="0" />
      <xs:element name="Preview" type="xs:string" minOccurs="0" />
      <xs:element name="RightsManagementLicenseData" type="t:RightsManagementLicenseDataType" minOccurs="0" />
      <xs:element name="PredictedActionReasons" type="t:NonEmptyArrayOfPredictedActionReasonType" minOccurs="0" />
      <xs:element name="IsClutter" type="xs:boolean" minOccurs="0" />
      <xs:element name="BlockStatus" type="xs:boolean" minOccurs="0" />
      <xs:element name="HasBlockedImages" type="xs:boolean" minOccurs="0" />
      <xs:element name="TextBody" type="t:BodyType" minOccurs="0"/>
      <xs:element name="IconIndex" type="t:IconIndexType" minOccurs="0"/>
      <xs:element name="SearchKey" type="xs:base64Binary" minOccurs="0" />
      <xs:element name="SortKey" type="xs:long" minOccurs="0" />
      <xs:element name="Hashtags" type="t:ArrayOfStringsType" minOccurs="0" />
      <xs:element name="Mentions" type="t:ArrayOfRecipientsType" minOccurs="0" />
      <xs:element name="MentionedMe" type="xs:boolean" minOccurs="0" />
      <xs:element name="MentionsPreview" type="t:MentionsPreviewType" minOccurs="0" />
      <xs:element name="MentionsEx" type="t:NonEmptyArrayOfMentionActionsType" minOccurs="0" />
      <xs:element name="AppliedHashtags" type="t:NonEmptyArrayOfAppliedHashtagType" minOccurs="0" />
      <xs:element name="AppliedHashtagsPreview" type="t:AppliedHashtagsPreviewType" minOccurs="0" />
      <xs:element name="Likes" type="t:NonEmptyArrayOfLikeType" minOccurs="0" />
      <xs:element name="LikesPreview" type="t:LikesPreviewType" minOccurs="0" />
      <xs:element name="PendingSocialActivityTagIds" type="t:ArrayOfStringsType" minOccurs="0" />
      <xs:element name="AtAllMention" type="xs:boolean" minOccurs="0" />
      <xs:element name="CanDelete" type="xs:boolean" minOccurs="0" />
      <xs:element name="InferenceClassification" type="t:InferenceClassificationType" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfItemClassType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="ItemClass" type="t:ItemClassType"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="FlagType">
    <xs:sequence>
      <xs:element name="FlagStatus" type="t:FlagStatusType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="StartDate" type="xs:dateTime" minOccurs="0" />
      <xs:element name="DueDate" type="xs:dateTime" minOccurs="0" />
      <xs:element name="CompleteDate" type="xs:dateTime" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="FlagStatusType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="NotFlagged" />
      <xs:enumeration value="Flagged" />
      <xs:enumeration value="Complete" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="PredictedActionReasonType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None" />
      <xs:enumeration value="ConversationStarterIsYou" />
      <xs:enumeration value="OnlyRecipient" />
      <xs:enumeration value="ConversationContributions" />
      <xs:enumeration value="MarkedImportantBySender" />
      <xs:enumeration value="SenderIsManager" />
      <xs:enumeration value="SenderIsInManagementChain" />
      <xs:enumeration value="SenderIsDirectReport" />
      <xs:enumeration value="ActionBasedOnSender" />
      <xs:enumeration value="NameOnToLine" />
      <xs:enumeration value="NameOnCcLine" />
      <xs:enumeration value="ManagerPosition" />
      <xs:enumeration value="ReplyToAMessageFromMe" />
      <xs:enumeration value="PreviouslyFlagged" />
      <xs:enumeration value="ActionBasedOnRecipients" />
      <xs:enumeration value="ActionBasedOnSubjectWords" />
      <xs:enumeration value="ActionBasedOnBasedOnBodyWords" />
    </xs:restriction>
  </xs:simpleType>

  <!-- Begin Entity Extraction -->
  <xs:complexType name="EntityType">
    <xs:sequence>
      <xs:element name="Position" type="t:EmailPositionType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfAddressesType">
    <xs:sequence>
      <xs:element name="Address" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfAddressEntitiesType">
    <xs:sequence>
      <xs:element name="AddressEntity" type="t:AddressEntityType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AddressEntityType">
    <xs:complexContent>
      <xs:extension base="t:EntityType">
        <xs:sequence>
          <xs:element name="Address" type="xs:string" minOccurs="0" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ArrayOfEmailAddressEntitiesType">
    <xs:sequence>
      <xs:element name="EmailAddressEntity" type="t:EmailAddressEntityType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="EmailAddressEntityType">
    <xs:complexContent>
      <xs:extension base="t:EntityType">
        <xs:sequence>
          <xs:element name="EmailAddress" type="xs:string" minOccurs="0" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ArrayOfUrlEntitiesType">
    <xs:sequence>
      <xs:element name="UrlEntity" type="t:UrlEntityType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="UrlEntityType">
    <xs:complexContent>
      <xs:extension base="t:EntityType">
        <xs:sequence>
          <xs:element name="Url" type="xs:string" minOccurs="0" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ArrayOfMeetingSuggestionsType">
    <xs:sequence>
      <xs:element name="MeetingSuggestion" type="t:MeetingSuggestionType" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="MeetingSuggestionType">
    <xs:complexContent>
      <xs:extension base="t:EntityType">
        <xs:sequence>
          <xs:element name="Attendees" type="t:ArrayOfEmailUsersType" minOccurs="0" maxOccurs="1" />
          <xs:element name="Location" type="xs:string" minOccurs="0" />
          <xs:element name="Subject" type="xs:string" minOccurs="0" />
          <xs:element name="MeetingString" type="xs:string" minOccurs="0" />
          <xs:element name="StartTime" type="xs:dateTime" minOccurs="0" />
          <xs:element name="EndTime" type="xs:dateTime" minOccurs="0" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ArrayOfTaskSuggestionsType">
    <xs:sequence>
      <xs:element name="TaskSuggestion" type="t:TaskSuggestionType" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfContactsType">
    <xs:sequence>
      <xs:element name="Contact" type="t:ContactType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ContactType">
    <xs:complexContent>
      <xs:extension base="t:EntityType">
        <xs:sequence>
          <xs:element name="PersonName" type="xs:string" minOccurs="0" />
          <xs:element name="BusinessName" type="xs:string" minOccurs="0" />
          <xs:element name="PhoneNumbers" type="t:ArrayOfPhonesType" minOccurs="0" maxOccurs="1" />
          <xs:element name="Urls" type="t:ArrayOfUrlsType" minOccurs="0" maxOccurs="1" />
          <xs:element name="EmailAddresses" type="t:ArrayOfExtractedEmailAddresses" minOccurs="0" maxOccurs="1" />
          <xs:element name="Addresses" type="t:ArrayOfAddressesType" minOccurs="0" maxOccurs="1" />
          <xs:element name="ContactString" type="xs:string" minOccurs="0" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ArrayOfUrlsType">
    <xs:sequence>
      <xs:element name="Url" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfPhonesType">
    <xs:sequence>
      <xs:element name="Phone" type="t:PhoneType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PhoneType">
    <xs:sequence>
      <xs:element name="OriginalPhoneString" type="xs:string" minOccurs="0" />
      <xs:element name="PhoneString" type="xs:string" minOccurs="0" />
      <xs:element name="Type" type="xs:string" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfPhoneEntitiesType">
    <xs:sequence>
      <xs:element name="Phone" type="t:PhoneEntityType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PhoneEntityType">
    <xs:complexContent>
      <xs:extension base="t:EntityType">
        <xs:sequence>
          <xs:element name="OriginalPhoneString" type="xs:string" minOccurs="0" />
          <xs:element name="PhoneString" type="xs:string" minOccurs="0" />
          <xs:element name="Type" type="xs:string" minOccurs="0" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:simpleType name="EmailPositionType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="LatestReply" />
      <xs:enumeration value="Other" />
      <xs:enumeration value="Subject" />
      <xs:enumeration value="Signature" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="ArrayOfEmailUsersType">
    <xs:sequence>
      <xs:element name="EmailUser" type="t:EmailUserType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="EmailUserType">
    <xs:sequence>
      <xs:element name="Name" type="xs:string" minOccurs="0" />
      <xs:element name="UserId" type="xs:string" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="TaskSuggestionType">
    <xs:complexContent>
      <xs:extension base="t:EntityType">
        <xs:sequence>
          <xs:element name="TaskString" type="xs:string" minOccurs="0" />
          <xs:element name="Assignees" type="t:ArrayOfEmailUsersType" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ArrayOfExtractedEmailAddresses">
    <xs:sequence>
      <xs:element name="EmailAddress" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ParcelDeliveryEntityType">
    <xs:sequence>
      <xs:element name="Carrier" type="xs:string" minOccurs="0" />
      <xs:element name="TrackingNumber" type="xs:string" minOccurs="0" />
      <xs:element name="TrackingUrl" type="xs:string" minOccurs="0" />
      <xs:element name="ExpectedArrivalFrom" type="xs:string" minOccurs="0" />
      <xs:element name="ExpectedArrivalUntil" type="xs:string" minOccurs="0" />
      <xs:element name="Product" type="xs:string" minOccurs="0" />
      <xs:element name="ProductUrl" type="xs:string" minOccurs="0" />
      <xs:element name="ProductImage" type="xs:string" minOccurs="0" />
      <xs:element name="ProductSku" type="xs:string" minOccurs="0" />
      <xs:element name="ProductDescription" type="xs:string" minOccurs="0" />
      <xs:element name="ProductBrand" type="xs:string" minOccurs="0" />
      <xs:element name="ProductColor" type="xs:string" minOccurs="0" />
      <xs:element name="OrderNumber" type="xs:string" minOccurs="0" />
      <xs:element name="Seller" type="xs:string" minOccurs="0" />
      <xs:element name="OrderStatus" type="xs:string" minOccurs="0" />
      <xs:element name="AddressName" type="xs:string" minOccurs="0" />
      <xs:element name="StreetAddress" type="xs:string" minOccurs="0" />
      <xs:element name="AddressLocality" type="xs:string" minOccurs="0" />
      <xs:element name="AddressRegion" type="xs:string" minOccurs="0" />
      <xs:element name="AddressCountry" type="xs:string" minOccurs="0" />
      <xs:element name="PostalCode" type="xs:string" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>
  
  <xs:simpleType name="InferenceClassificationType">
      <xs:restriction base="xs:string">
          <xs:enumeration value="Focused" />
          <xs:enumeration value="Other" />
      </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="InferenceClassificationOverrideType">
        <xs:sequence>
            <xs:element name="Id" type="t:GuidType" minOccurs="1" maxOccurs="1" />
            <xs:element name="SenderSmtpAddress" type="xs:string" minOccurs="1" maxOccurs="1" />
            <xs:element name="SenderDisplayName" type="xs:string" minOccurs="1" maxOccurs="1" />
            <xs:element name="AlwaysClassifyAs" type="t:InferenceClassificationType" minOccurs="1" maxOccurs="1" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="ArrayOfInferenceClassificationOverridesType">
        <xs:sequence>
            <xs:element name="Override" minOccurs="0" maxOccurs="unbounded" type="t:InferenceClassificationOverrideType"/>
        </xs:sequence>
    </xs:complexType>

  <xs:complexType name="ArrayOfParcelDeliveryEntitiesType">
    <xs:sequence>
      <xs:element name="ParcelDelivery" type="t:ParcelDeliveryEntityType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="FlightEntityType">
    <xs:sequence>
      <xs:element name="FlightNumber" type="xs:string" minOccurs="0" />
      <xs:element name="AirlineIataCode" type="xs:string" minOccurs="0" />
      <xs:element name="DepartureTime" type="xs:string" minOccurs="0" />
      <xs:element name="WindowsTimeZoneName" type="xs:string" minOccurs="0" />
      <xs:element name="DepartureAirportIataCode" type="xs:string" minOccurs="0" />
      <xs:element name="ArrivalAirportIataCode" type="xs:string" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfFlightsType">
    <xs:sequence>
      <xs:element name="Flight" type="t:FlightEntityType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  
 <xs:complexType name="FlightReservationEntityType">
    <xs:sequence>
      <xs:element name="ReservationId" type="xs:string" minOccurs="0" />
      <xs:element name="ReservationStatus" type="xs:string" minOccurs="0" />
      <xs:element name="UnderName" type="xs:string" minOccurs="0" />
      <xs:element name="BrokerName" type="xs:string" minOccurs="0" />
      <xs:element name="BrokerPhone" type="xs:string" minOccurs="0" />
      <xs:element name="Flights" type="t:ArrayOfFlightsType" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfFlightReservationsType">
    <xs:sequence>
      <xs:element name="FlightReservation" type="t:FlightReservationEntityType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SenderAddInEntityType">
    <xs:sequence>
      <xs:element name="ExtensionId" type="xs:string" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfSenderAddInsType">
    <xs:sequence>
      <xs:element name="Microsoft.OutlookServices.SenderApp" type="t:SenderAddInEntityType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>  

  <xs:complexType name="EntityExtractionResultType">
    <xs:sequence>
      <xs:element name="Addresses" type="t:ArrayOfAddressEntitiesType" minOccurs="0" maxOccurs="1" />
      <xs:element name="MeetingSuggestions" type="t:ArrayOfMeetingSuggestionsType" minOccurs="0" maxOccurs="1" />
      <xs:element name="TaskSuggestions" type="t:ArrayOfTaskSuggestionsType" minOccurs="0" maxOccurs="1" />
      <xs:element name="EmailAddresses" type="t:ArrayOfEmailAddressEntitiesType" minOccurs="0" maxOccurs="1" />
      <xs:element name="Contacts" type="t:ArrayOfContactsType" minOccurs="0" maxOccurs="1" />
      <xs:element name="Urls" type="t:ArrayOfUrlEntitiesType" minOccurs="0" maxOccurs="1" />
      <xs:element name="PhoneNumbers" type="t:ArrayOfPhoneEntitiesType" minOccurs="0" maxOccurs="1" />
      <xs:element name="ParcelDeliveries" type="t:ArrayOfParcelDeliveryEntitiesType" minOccurs="0" maxOccurs="1" />
      <xs:element name="FlightReservations" type="t:ArrayOfFlightReservationsType" minOccurs="0" maxOccurs="1" />
      <xs:element name="SenderAddIns" type="t:ArrayOfSenderAddInsType" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <!-- End Entity Extraction -->

  <!-- Begin Rights Managment License Data -->
  <xs:complexType name="RightsManagementLicenseDataType">
    <xs:sequence>
      <xs:element name="RightsManagedMessageDecryptionStatus" type="xs:int" minOccurs="0" />
      <xs:element name="RmsTemplateId" type="xs:string" minOccurs="0" />
      <xs:element name="TemplateName" type="xs:string" minOccurs="0" />
      <xs:element name="TemplateDescription" type="xs:string" minOccurs="0" />
      <xs:element name="EditAllowed" type="xs:boolean" minOccurs="0" />
      <xs:element name="ReplyAllowed" type="xs:boolean" minOccurs="0" />
      <xs:element name="ReplyAllAllowed" type="xs:boolean" minOccurs="0" />
      <xs:element name="ForwardAllowed" type="xs:boolean" minOccurs="0" />
      <xs:element name="ModifyRecipientsAllowed" type="xs:boolean" minOccurs="0" />
      <xs:element name="ExtractAllowed" type="xs:boolean" minOccurs="0" />
      <xs:element name="PrintAllowed" type="xs:boolean" minOccurs="0" />
      <xs:element name="ExportAllowed" type="xs:boolean" minOccurs="0" />
      <xs:element name="ProgrammaticAccessAllowed" type="xs:boolean" minOccurs="0" />
      <xs:element name="IsOwner" type="xs:boolean" minOccurs="0" />
      <xs:element name="ContentOwner" type="xs:string" minOccurs="0" />
      <xs:element name="ContentExpiryDate" type="xs:string" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <!-- End Rights Management License Data -->

  <xs:simpleType name="ConversationActionTypeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="AlwaysCategorize" />
      <xs:enumeration value="AlwaysDelete" />
      <xs:enumeration value="AlwaysMove" />
      <xs:enumeration value="Delete" />
      <xs:enumeration value="Move" />
      <xs:enumeration value="Copy" />
      <xs:enumeration value="SetReadState" />
      <xs:enumeration value="SetRetentionPolicy" />
      <xs:enumeration value="Flag" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="ConversationActionType">
    <xs:sequence>
      <xs:element name="Action" type="t:ConversationActionTypeType" minOccurs="1" maxOccurs="1" />
      <xs:element name="ConversationId" type="t:ItemIdType" minOccurs="1" maxOccurs="1" />
      <xs:element name="ContextFolderId" type="t:TargetFolderIdType" minOccurs="0" maxOccurs="1" />
      <xs:element name="ConversationLastSyncTime" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ProcessRightAway" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="DestinationFolderId" type="t:TargetFolderIdType" minOccurs="0" maxOccurs="1" />
      <xs:element name="Categories" type="t:ArrayOfStringsType" minOccurs="0" maxOccurs="1" />
      <xs:element name="EnableAlwaysDelete" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="IsRead" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
      <xs:element name="DeleteType" type="t:DisposalType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="RetentionPolicyType" type="t:RetentionType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="RetentionPolicyTagId" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Flag" type="t:FlagType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="SuppressReadReceipts" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="NonEmptyArrayOfApplyConversationActionType">
    <xs:sequence>
      <xs:element name="ConversationAction" type="t:ConversationActionType" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>


  <xs:complexType name="ConversationType">
    <xs:sequence>
      <xs:element name="ConversationId" type="t:ItemIdType" minOccurs="0" />
      <xs:element name="ConversationTopic" type="xs:string" minOccurs="0" />

      <!-- Maps to ConversationItemSchema.ConversationMVTo-->
      <xs:element name="UniqueRecipients" type="t:ArrayOfStringsType" minOccurs="0" />
      <!-- Maps to ConversationItemSchema.ConversationGlobalMVTo-->
      <xs:element name="GlobalUniqueRecipients" type="t:ArrayOfStringsType" minOccurs="0" />

      <!-- Maps to ConversationItemSchema.ConversationMVUnreadFrom-->
      <xs:element name="UniqueUnreadSenders" type="t:ArrayOfStringsType" minOccurs="0" />
      <!-- Maps to ConversationItemSchema.ConversationGlobalMVUnreadFrom-->
      <xs:element name="GlobalUniqueUnreadSenders" type="t:ArrayOfStringsType" minOccurs="0" />

      <!-- Maps to ConversationItemSchema.ConversationMVFrom-->
      <xs:element name="UniqueSenders" type="t:ArrayOfStringsType" minOccurs="0" />
      <!-- Maps to ConversationItemSchema.ConversationMVFrom-->
      <xs:element name="GlobalUniqueSenders" type="t:ArrayOfStringsType" minOccurs="0" />

      <!-- Maps to ConversationItemSchema.ConversationLastDeliveryTime-->
      <xs:element name="LastDeliveryTime" type="xs:dateTime" minOccurs="0" />
      <!-- Maps to ConversationItemSchema.ConversationGlobalLastDeliveryTime-->
      <xs:element name="GlobalLastDeliveryTime" type="xs:dateTime" minOccurs="0" />

      <!-- Maps to ConversationItemSchema.ConversationCategories-->
      <xs:element name="Categories" type="t:ArrayOfStringsType" minOccurs="0" />
      <!-- Maps to ConversationItemSchema.ConversationGlobalCategories-->
      <xs:element name="GlobalCategories" type="t:ArrayOfStringsType" minOccurs="0" />

      <!-- Maps to ConversationItemSchema.ConversationFlagStatus-->
      <xs:element name="FlagStatus" type="t:FlagStatusType" minOccurs="0" />
      <!-- Maps to ConversationItemSchema.ConversationGlobalFlagStatus-->
      <xs:element name="GlobalFlagStatus" type="t:FlagStatusType" minOccurs="0" />

      <!-- Maps to ConversationItemSchema.ConversationHasAttach-->
      <xs:element name="HasAttachments" type="xs:boolean" minOccurs="0"/>
      <!-- Maps to ConversationItemSchema.ConversationGlobalHasAttach-->
      <xs:element name="GlobalHasAttachments" type="xs:boolean" minOccurs="0"/>

      <!-- Maps to ConversationItemSchema.ConversationMessageCount-->
      <xs:element name="MessageCount" type="xs:int" minOccurs="0" />
      <!-- Maps to ConversationItemSchema.ConversationGlobalMessageCount-->
      <xs:element name="GlobalMessageCount" type="xs:int" minOccurs="0" />

      <!-- Maps to ConversationItemSchema.ConversationUnreadMessageCount-->
      <xs:element name="UnreadCount" type="xs:int" minOccurs="0" />
      <!-- Maps to ConversationItemSchema.ConversationGlobalUnreadMessageCount-->
      <xs:element name="GlobalUnreadCount" type="xs:int" minOccurs="0" />

      <!-- Maps to ConversationItemSchema.ConversationMessageSize-->
      <xs:element name="Size" type="xs:int" minOccurs="0" />
      <!-- Maps to ConversationItemSchema.ConversationGlobalMessageSize-->
      <xs:element name="GlobalSize" type="xs:int" minOccurs="0" />

      <!-- Maps to ConversationItemSchema.ConversationMessageClasses-->
      <xs:element name="ItemClasses" type="t:ArrayOfItemClassType" minOccurs="0" />
      <!-- Maps to ConversationItemSchema.ConversationGlobalMessageClasses-->
      <xs:element name="GlobalItemClasses" type="t:ArrayOfItemClassType" minOccurs="0" />

      <!-- Maps to ConversationItemSchema.ConversationImportance-->
      <xs:element name="Importance" type="t:ImportanceChoicesType" minOccurs="0" />
      <!-- Maps to ConversationItemSchema.ConversationGlobalImportance-->
      <xs:element name="GlobalImportance" type="t:ImportanceChoicesType" minOccurs="0" />

      <!-- Maps to ConversationItemSchema.ConversationItemIds-->
      <xs:element name="ItemIds" type="t:NonEmptyArrayOfBaseItemIdsType" minOccurs="0"/>
      <!-- Maps to ConversationItemSchema.ConversationGlobalItemIds-->
      <xs:element name="GlobalItemIds" type="t:NonEmptyArrayOfBaseItemIdsType" minOccurs="0"/>

      <xs:element name="LastModifiedTime" type="xs:dateTime" minOccurs="0" />
      <xs:element name="InstanceKey" type="xs:base64Binary" minOccurs="0"/>

      <!-- Maps to ConversationItemSchema.ConversationPreview-->
      <xs:element name="Preview" type="xs:string" minOccurs="0" />

      <!-- Flag for the mailbox scope this conversation was found in -->
      <xs:element name="MailboxScope" type="t:MailboxSearchLocationType" minOccurs="0" />

      <!-- Maps to ConversationItemSchema.ConversationIconIndex-->
      <xs:element name="IconIndex" type="t:IconIndexType" minOccurs="0" />

      <!-- Maps to ConversationItemSchema.ConversationGlobalIconIndex-->
      <xs:element name="GlobalIconIndex" type="t:IconIndexType" minOccurs="0" />

      <!-- Maps to ConversationItemSchema.ConversationDraftItemIds-->
      <xs:element name="DraftItemIds" type="t:NonEmptyArrayOfBaseItemIdsType" minOccurs="0"/>

      <!-- Maps to ConversationItemSchema.ConversationHasIrm-->
      <xs:element name="HasIrm" type="xs:boolean" minOccurs="0"/>
      <!-- Maps to ConversationItemSchema.ConversationGlobalHasIrm-->
      <xs:element name="GlobalHasIrm" type="xs:boolean" minOccurs="0"/>
      
      <!-- Maps to ConversationItemSchema.ConversationInferenceClassification-->
      <xs:element name="InferenceClassification" type="t:InferenceClassificationType" minOccurs="0" />

      <!-- Key on which the data got sorted during search operation-->
      <xs:element name="SortKey" type="xs:long" minOccurs="0"/>

      <xs:element name="MentionedMe" type="xs:boolean" minOccurs="0"/>
      <xs:element name="GlobalMentionedMe" type="xs:boolean" minOccurs="0"/>
      <xs:element name="SenderSMTPAddress" type="t:SmtpAddressType" minOccurs="0"/>
      <xs:element name="MailboxGuids" minOccurs="0" maxOccurs="1">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="MailboxGuid" type="t:GuidType" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="From" type="t:SingleRecipientType" minOccurs="0" />
      <xs:element name="AtAllMention" type="xs:boolean" minOccurs="0"/>
      <xs:element name="GlobalAtAllMention" type="xs:boolean" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="HighlightTermType">
    <xs:sequence>
      <xs:element name="Scope" type="xs:string" minOccurs="1" maxOccurs="1" />
      <xs:element name="Value" type="xs:string" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfConversationsType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="Conversation" type="t:ConversationType"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="ConversationRequestType">
    <xs:sequence>
      <xs:element name="ConversationId" type="t:ItemIdType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="SyncState" type="xs:base64Binary" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfConversationRequestsType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="Conversation" type="t:ConversationRequestType"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="ConversationNodeType">
    <xs:sequence>
      <xs:element name="InternetMessageId" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ParentInternetMessageId" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Items" type="t:NonEmptyArrayOfAllItemsType" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfConversationNodesType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="ConversationNode" type="t:ConversationNodeType"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="ConversationResponseType">
    <xs:sequence>
      <xs:element name="ConversationId" type="t:ItemIdType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="SyncState" type="xs:base64Binary" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ConversationNodes" type="t:ArrayOfConversationNodesType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="CanDelete" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="ConversationNodeSortOrder">
    <xs:restriction base="xs:string">
      <xs:enumeration value="TreeOrderAscending"/>
      <xs:enumeration value="TreeOrderDescending"/>
      <xs:enumeration value="DateOrderAscending"/>
      <xs:enumeration value="DateOrderDescending"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="ArrayOfHighlightTermsType">
    <xs:sequence>
      <xs:element name="Term" type="t:HighlightTermType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PersonaAttributionType">
    <xs:sequence>
      <xs:element name="Id" type="xs:string" minOccurs="1" maxOccurs="1" />
      <xs:element name="SourceId" type="t:ItemIdType" minOccurs="1" maxOccurs="1" />
      <xs:element name="DisplayName" type="xs:string" minOccurs="1" maxOccurs="1" />
      <xs:element name="IsWritable" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="IsQuickContact" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="IsHidden" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="FolderId" type="t:FolderIdType" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfPersonaAttributionsType">
    <xs:sequence>
      <xs:element name="Attribution" type="t:PersonaAttributionType" minOccurs="1" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfValueAttributionsType">
    <xs:sequence>
      <xs:element name="Attribution" type="xs:string" minOccurs="1" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfStringValueType">
    <xs:sequence>
      <xs:element name="Value" type="xs:string" minOccurs="1" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="StringAttributedValueType">
    <xs:sequence>
      <xs:element name="Value" type="xs:string" minOccurs="1" maxOccurs="1" />
      <xs:element name="Attributions" type="t:ArrayOfValueAttributionsType" minOccurs="1" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="BodyContentType">
    <xs:sequence>
      <xs:element name="Value" type="xs:string" minOccurs="1" maxOccurs="1" />
      <xs:element name="BodyType" type="t:BodyTypeType" minOccurs="1" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="BodyContentAttributedValueType">
    <xs:sequence>
      <xs:element name="Value" type="t:BodyContentType" minOccurs="1" maxOccurs="1" />
      <xs:element name="Attributions" type="t:ArrayOfValueAttributionsType" minOccurs="1" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="StringArrayAttributedValueType">
    <xs:sequence>
      <xs:element name="Values" type="t:ArrayOfStringValueType" minOccurs="1" maxOccurs="1" />
      <xs:element name="Attributions" type="t:ArrayOfValueAttributionsType" minOccurs="1" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="EmailAddressAttributedValueType">
    <xs:sequence>
      <xs:element name="Value" type="t:EmailAddressType" minOccurs="1" maxOccurs="1" />
      <xs:element name="Attributions" type="t:ArrayOfValueAttributionsType" minOccurs="1" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PersonaPhoneNumberType">
    <xs:sequence>
      <xs:element name="Number" type="xs:string" minOccurs="1" maxOccurs="1" />
      <xs:element name="Type" type="xs:string" minOccurs="1" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PhoneNumberAttributedValueType">
    <xs:sequence>
      <xs:element name="Value" type="t:PersonaPhoneNumberType" minOccurs="1" maxOccurs="1" />
      <xs:element name="Attributions" type="t:ArrayOfValueAttributionsType" minOccurs="1" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PersonaPostalAddressType">
    <xs:sequence>
      <xs:element name="Street" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="City" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="State" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="Country" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="PostalCode" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="PostOfficeBox" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="Type" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="Latitude" type="xs:double" minOccurs="0" maxOccurs="1" />
      <xs:element name="Longitude" type="xs:double" minOccurs="0" maxOccurs="1" />
      <xs:element name="Accuracy" type="xs:double" minOccurs="0" maxOccurs="1" />
      <xs:element name="Altitude" type="xs:double" minOccurs="0" maxOccurs="1" />
      <xs:element name="AltitudeAccuracy" type="xs:double" minOccurs="0" maxOccurs="1" />
      <xs:element name="FormattedAddress" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="LocationUri" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="LocationSource" type="t:LocationSourceType" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PostalAddressAttributedValueType">
    <xs:sequence>
      <xs:element name="Value" type="t:PersonaPostalAddressType" minOccurs="1" maxOccurs="1" />
      <xs:element name="Attributions" type="t:ArrayOfValueAttributionsType" minOccurs="1" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ExtendedPropertyAttributedValueType">
    <xs:sequence>
      <xs:element name="Value" type="t:ExtendedPropertyType" minOccurs="1" maxOccurs="1" />
      <xs:element name="Attributions" type="t:ArrayOfValueAttributionsType" minOccurs="1" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfStringAttributedValuesType">
    <xs:sequence>
      <xs:element name="StringAttributedValue" type="t:StringAttributedValueType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfStringArrayAttributedValuesType">
    <xs:sequence>
      <xs:element name="StringArrayAttributedValue" type="t:StringArrayAttributedValueType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfBodyContentAttributedValuesType">
    <xs:sequence>
      <xs:element name="BodyContentAttributedValue" type="t:BodyContentAttributedValueType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfEmailAddressAttributedValuesType">
    <xs:sequence>
      <xs:element name="EmailAddressAttributedValue" type="t:EmailAddressAttributedValueType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfPhoneNumberAttributedValuesType">
    <xs:sequence>
      <xs:element name="PhoneNumberAttributedValue" type="t:PhoneNumberAttributedValueType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfPostalAddressAttributedValuesType">
    <xs:sequence>
      <xs:element name="PostalAddressAttributedValue" type="t:PostalAddressAttributedValueType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfExtendedPropertyAttributedValueType">
    <xs:sequence>
      <xs:element name="ExtendedPropertyAttributedValue" type="t:ExtendedPropertyAttributedValueType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="InsightFiltersType">
    <xs:sequence>
      <xs:element name="Count" type="xs:int" minOccurs="0" maxOccurs="1" />
      <xs:element name="Types" type="t:ArrayOfStringsType" minOccurs="0" maxOccurs="1" />
      <xs:element name="KeyInsightsOnly" type="xs:boolean" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="InsightValue">
    <xs:sequence>
      <xs:element name="InsightSource" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="UpdatedUtcTicks" type="xs:long" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="StringInsightValue">
    <xs:complexContent>
      <xs:extension base="t:InsightValue">
        <xs:sequence>
          <xs:element name="Data" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>        
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  
  <xs:complexType name="DelveDocument">
    <xs:complexContent>
      <xs:extension base="t:InsightValue">
        <xs:sequence>
          <xs:element name="Rank" type="xs:double" minOccurs="0" maxOccurs="1"/>
          <xs:element name="Author" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="Created" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="LastModifiedTime" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="DefaultEncodingURL" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="FileType" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="Title" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="DocumentId" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="PreviewURL" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="LastEditor" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ProfileInsightValue">
    <xs:complexContent>
      <xs:extension base="t:InsightValue">
        <xs:sequence>
          <xs:element name="FullName" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="FirstName" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="LastName" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="EmailAddress" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="Avatar" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="JoinedUtcTicks" type="xs:long" minOccurs="0" maxOccurs="1"/>
          <xs:element name="ProfilePicture" type="t:UserProfilePicture" minOccurs="0" maxOccurs="1" />
          <xs:element name="Title" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>        
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="OutOfOfficeInsightValue">
    <xs:complexContent>
      <xs:extension base="t:InsightValue">
        <xs:sequence>
          <xs:element minOccurs="0" maxOccurs="1" name="StartTime" type="xs:dateTime" />
          <xs:element minOccurs="0" maxOccurs="1" name="EndTime" type="xs:dateTime" />
          <xs:element minOccurs="0" maxOccurs="1" name="Message" type="xs:string" />
          <xs:element minOccurs="0" maxOccurs="1" name="Culture" type="xs:string" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="JobInsightValue">
    <xs:complexContent>
      <xs:extension base="t:InsightValue">
        <xs:sequence>
          <xs:element name="Company" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="CompanyDescription" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="CompanyTicker" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="CompanyLogoUrl" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="CompanyWebsiteUrl" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="CompanyLinkedInUrl" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="Title" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="StartUtcTicks" type="xs:long" minOccurs="0" maxOccurs="1"/>
          <xs:element name="EndUtcTicks" type="xs:long" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>        
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="CompanyInsightValue">
    <xs:complexContent>
      <xs:extension base="t:InsightValue">
        <xs:sequence>
          <xs:element name="Name" type="xs:string" minOccurs="1" maxOccurs="1"/>
          <xs:element name="SatoriId" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="Description" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="DescriptionAttribution" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="ImageUrl" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="ImageUrlAttribution" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="YearFound" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="FinanceSymbol" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="WebsiteUrl" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  
  <xs:complexType name="UserProfilePicture">
    <xs:complexContent>
      <xs:extension base="t:InsightValue">
        <xs:sequence>
          <xs:element name="Blob" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="PhotoSize" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="Url" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="ImageType" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="EducationInsightValue">
    <xs:complexContent>
      <xs:extension base="t:InsightValue">
        <xs:sequence>
          <xs:element name="Institute" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="Degree" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="StartUtcTicks" type="xs:long" minOccurs="0" maxOccurs="1"/>
          <xs:element name="EndUtcTicks" type="xs:long" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>        
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="SkillInsightValue">
    <xs:complexContent>
      <xs:extension base="t:InsightValue">
        <xs:sequence>
          <xs:element name="Name" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="Strength" type="xs:int" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>        
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="MeetingInsightValue">
    <xs:complexContent>
      <xs:extension base="t:InsightValue">
        <xs:sequence>
          <xs:element name="Id" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="Subject" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="StartUtcTicks" type="xs:long" minOccurs="0" maxOccurs="1"/>
          <xs:element name="EndUtcTicks" type="xs:long" minOccurs="0" maxOccurs="1"/>
          <xs:element name="Location" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="Organizer" type="t:ProfileInsightValue" minOccurs="0" maxOccurs="1"/>
          <xs:element name="Attendees" type="t:ArrayOfProfileInsightValue" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="EmailInsightValue">
    <xs:complexContent>
      <xs:extension base="t:InsightValue">
        <xs:sequence>
          <xs:element name="Id" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="ThreadId" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="Subject" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="LastEmailDateUtcTicks" type="xs:long" minOccurs="0" maxOccurs="1"/>
          <xs:element name="Body" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="LastEmailSender" type="t:ProfileInsightValue" minOccurs="0" maxOccurs="1"/>
          <xs:element name="EmailsCount" type="xs:int" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  
  <xs:complexType name="ArrayOfInsightValue">
    <xs:sequence>
      <xs:element name="Item" type="t:InsightValue" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
  
  <xs:complexType name="ArrayOfSkillInsightValue">
    <xs:sequence>
      <xs:element name="Item" type="t:SkillInsightValue" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
    
  <xs:complexType name="ArrayOfProfileInsightValue">
    <xs:sequence>
      <xs:element name="Item" type="t:ProfileInsightValue" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
  
  <xs:complexType name="ArrayOfJobInsightValue">
    <xs:sequence>
      <xs:element name="Item" type="t:JobInsightValue" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
  
  <xs:complexType name="ArrayOfCompanyInsightValue">
    <xs:sequence>
      <xs:element name="Item" type="t:CompanyInsightValue" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="InsightContent">
  </xs:complexType>

  <xs:complexType name="SingleValueInsightContent">
    <xs:complexContent>
      <xs:extension base="t:InsightContent">
        <xs:sequence>
          <xs:element name="Item" type="t:InsightValue" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>        
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="MultiValueInsightContent">
    <xs:complexContent>
      <xs:extension base="t:InsightContent">
        <xs:sequence>
          <xs:element name="ItemList" type="t:ArrayOfInsightValue" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>        
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="Insight">
    <xs:sequence>
      <xs:element name="InsightType" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="Rank" type="xs:double" minOccurs="0" maxOccurs="1" />
      <xs:element name="Content" type="t:InsightContent" minOccurs="0" maxOccurs="1" />
      <xs:element name="Text" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="ItemList" type="t:ArrayOfInsightValue" minOccurs="0" maxOccurs="1"/>
      <xs:element name="RequiresToken" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>
    
  <xs:complexType name="ComputedInsightValueProperty">
    <xs:sequence>
      <xs:element name="Key" type="xs:string" minOccurs="1" maxOccurs="1" />
      <xs:element name="Value" type="xs:string" minOccurs="1" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfComputedInsightValueProperty">
    <xs:sequence>
      <xs:element name="Property" type="t:ComputedInsightValueProperty" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  
  <xs:complexType name="ComputedInsightValue">
    <xs:complexContent>
      <xs:extension base="t:InsightValue">
        <xs:sequence>
          <xs:element name="Properties" type="t:ArrayOfComputedInsightValueProperty" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  
  <xs:complexType name="ArrayOfInsight">
    <xs:sequence>
      <xs:element name="Insight" type="t:Insight" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
    
  <xs:complexType name="PersonResponseShapeType">
    <xs:sequence>
      <xs:element name="BaseShape" type="t:DefaultShapeNamesType" />
      <xs:element name="AdditionalProperties" type="t:NonEmptyArrayOfPathsToElementType" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>
  
  <xs:complexType name="PersonType">
    <xs:sequence>
      <xs:element name="FullName" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="GivenName" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="Surname" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="PhoneNumber" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="SMSNumber" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="EmailAddress" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="Alias" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="Department" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="LinkedInProfileLink" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="Skills" type="t:ArrayOfSkillInsightValue" minOccurs="0" maxOccurs="1" />
      <xs:element name="ProfessionalBiography" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="ManagementChain" type="t:ArrayOfProfileInsightValue" minOccurs="0" maxOccurs="1" />
      <xs:element name="DirectReports" type="t:ArrayOfProfileInsightValue" minOccurs="0" maxOccurs="1" />
      <xs:element name="Peers" type="t:ArrayOfProfileInsightValue" minOccurs="0" maxOccurs="1" />
      <xs:element name="TeamSize" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="CurrentJob" type="t:ArrayOfJobInsightValue" minOccurs="0" maxOccurs="1" />
      <xs:element name="Birthday" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="Hometown" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="CurrentLocation" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="CompanyProfile" type="t:ArrayOfCompanyInsightValue" minOccurs="0" maxOccurs="1" />
      <xs:element name="Office" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="Headline" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="MutualConnections" type="t:ArrayOfProfileInsightValue" minOccurs="0" maxOccurs="1" />
      <xs:element name="Title" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="MutualManager" type="t:ProfileInsightValue" minOccurs="0" maxOccurs="1" />
      <xs:element name="Insights" type="t:ArrayOfInsight" minOccurs="0" maxOccurs="1" />
      <xs:element name="UserProfilePicture" type="t:UserProfilePicture" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfPersonType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="Person" type="t:PersonType"/>
    </xs:choice>
  </xs:complexType>

  <xs:simpleType name="TokenSourceType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None" />
      <xs:enumeration value="LinkedIn" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="PeopleTokenType">
    <xs:sequence>
      <xs:element name="TokenSource" type="t:TokenSourceType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="ExpirationDateTime" type="xs:dateTime" minOccurs="0" maxOccurs="1" />
      <xs:element name="TokenValue" type="xs:string" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>
  
  <xs:complexType name="NonEmptyArrayOfPeopleTokenType">
    <xs:sequence>
      <xs:element name="PeopleToken" type="t:PeopleTokenType" minOccurs="1" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PersonaType">
    <xs:sequence>
      <xs:element name="PersonaId" type="t:ItemIdType" minOccurs="1" maxOccurs="1" />
      <xs:element name="PersonaType" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="PersonaObjectStatus" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="CreationTime" type="xs:dateTime" minOccurs="0" maxOccurs="1" />
      <xs:element name="Bodies" type="t:ArrayOfBodyContentAttributedValuesType" minOccurs="0" />
      <xs:element name="DisplayNameFirstLastSortKey" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="DisplayNameLastFirstSortKey" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="CompanyNameSortKey" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="HomeCitySortKey" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="WorkCitySortKey" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="DisplayNameFirstLastHeader" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="DisplayNameLastFirstHeader" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="DisplayName" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="DisplayNameFirstLast" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="DisplayNameLastFirst" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="FileAs" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="FileAsId" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="DisplayNamePrefix" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="GivenName" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="MiddleName" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="Surname" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="Generation" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="Nickname" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="YomiCompanyName" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="YomiFirstName" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="YomiLastName" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="Title" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="Department" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="CompanyName" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="Location" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="EmailAddress" type="t:EmailAddressType" minOccurs="0" maxOccurs="1" />
      <xs:element name="EmailAddresses" type="t:ArrayOfEmailAddressesType" minOccurs="0" maxOccurs="1" />
      <xs:element name="PhoneNumber" type="t:PersonaPhoneNumberType" minOccurs="0" maxOccurs="1" />
      <xs:element name="ImAddress" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="HomeCity" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="WorkCity" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="RelevanceScore" type="xs:int" minOccurs="0" maxOccurs="1" />
      <xs:element name="FolderIds" type="t:ArrayOfFolderIdType" minOccurs="0" maxOccurs="1" />
      <xs:element name="Attributions" type="t:ArrayOfPersonaAttributionsType" minOccurs="0" maxOccurs="1" />
      <xs:element name="DisplayNames" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <xs:element name="FileAses" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <xs:element name="FileAsIds" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.DisplayNamePrefix-->
      <xs:element name="DisplayNamePrefixes" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.GivenName-->
      <xs:element name="GivenNames" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.MiddleName-->
      <xs:element name="MiddleNames" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.Surname-->
      <xs:element name="Surnames" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.Generation-->
      <xs:element name="Generations" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.Nickname-->
      <xs:element name="Nicknames" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.Initials-->
      <xs:element name="Initials" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.YomiCompanyName-->
      <xs:element name="YomiCompanyNames" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.YomiFirstName-->
      <xs:element name="YomiFirstNames" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.YomiLastName-->
      <xs:element name="YomiLastNames" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.BusinessPhoneNumber-->
      <xs:element name="BusinessPhoneNumbers" type="t:ArrayOfPhoneNumberAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.BusinessPhoneNumber2-->
      <xs:element name="BusinessPhoneNumbers2" type="t:ArrayOfPhoneNumberAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.HomePhone-->
      <xs:element name="HomePhones" type="t:ArrayOfPhoneNumberAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.HomePhone2-->
      <xs:element name="HomePhones2" type="t:ArrayOfPhoneNumberAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.MobilePhone-->
      <xs:element name="MobilePhones" type="t:ArrayOfPhoneNumberAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.MobilePhone2-->
      <xs:element name="MobilePhones2" type="t:ArrayOfPhoneNumberAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.AssistantPhoneNumber-->
      <xs:element name="AssistantPhoneNumbers" type="t:ArrayOfPhoneNumberAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.CallbackPhone-->
      <xs:element name="CallbackPhones" type="t:ArrayOfPhoneNumberAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.CarPhone-->
      <xs:element name="CarPhones" type="t:ArrayOfPhoneNumberAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.HomeFax-->
      <xs:element name="HomeFaxes" type="t:ArrayOfPhoneNumberAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.OrganizationMainPhone-->
      <xs:element name="OrganizationMainPhones" type="t:ArrayOfPhoneNumberAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.OtherFax-->
      <xs:element name="OtherFaxes" type="t:ArrayOfPhoneNumberAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.OtherTelephone-->
      <xs:element name="OtherTelephones" type="t:ArrayOfPhoneNumberAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.OtherPhone2-->
      <xs:element name="OtherPhones2" type="t:ArrayOfPhoneNumberAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.Pager-->
      <xs:element name="Pagers" type="t:ArrayOfPhoneNumberAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.RadioPhone-->
      <xs:element name="RadioPhones" type="t:ArrayOfPhoneNumberAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.TelexNumber-->
      <xs:element name="TelexNumbers" type="t:ArrayOfPhoneNumberAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.TTYTDDPhoneNumber-->
      <xs:element name="TTYTDDPhoneNumbers" type="t:ArrayOfPhoneNumberAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.WorkFax -->
      <xs:element name="WorkFaxes" type="t:ArrayOfPhoneNumberAttributedValuesType" minOccurs="0" />
      <!-- Values are aggregation of ContactSchema.Email1AddrType, ContactSchema.Email1DisplayNames, and ContactSchema.Email1EmailAddress-->
      <xs:element name="Emails1" type="t:ArrayOfEmailAddressAttributedValuesType" minOccurs="0" maxOccurs="1" />
      <!-- Values are aggregation of ContactSchema.Email2AddrType, ContactSchema.Email2DisplayNames, and ContactSchema.Email2EmailAddress-->
      <xs:element name="Emails2" type="t:ArrayOfEmailAddressAttributedValuesType" minOccurs="0" maxOccurs="1" />
      <!-- Values are aggregation of ContactSchema.Email3AddrType, ContactSchema.Email3DisplayNames, and ContactSchema.Email3EmailAddress-->
      <xs:element name="Emails3" type="t:ArrayOfEmailAddressAttributedValuesType" minOccurs="0" maxOccurs="1" />
      <!-- Values map to ContactSchema.BusinessHomePage-->
      <xs:element name="BusinessHomePages" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.PersonalHomePage-->
      <xs:element name="PersonalHomePages" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.OfficeLocation-->
      <xs:element name="OfficeLocations" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <xs:element name="ImAddresses" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <xs:element name="ImAddresses2" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <xs:element name="ImAddresses3" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <!-- Values are aggregation of ContactSchema.WorkAddressStreet/City/State/Country/PostalCode/PostOfficeBox-->
      <xs:element name="BusinessAddresses" type="t:ArrayOfPostalAddressAttributedValuesType" minOccurs="0" maxOccurs="1" />
      <!-- Values are aggregation of ContactSchema.HomeStreet/City/State/Country/PostalCode/PostOfficeBox-->
      <xs:element name="HomeAddresses" type="t:ArrayOfPostalAddressAttributedValuesType" minOccurs="0" maxOccurs="1" />
      <!-- Values are aggregation of ContactSchema.OtherStreet/City/State/Country/PostalCode/PostOfficeBox-->
      <xs:element name="OtherAddresses" type="t:ArrayOfPostalAddressAttributedValuesType" minOccurs="0" maxOccurs="1" />
      <!-- Values map to ContactSchema.Title-->
      <xs:element name="Titles" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.Department-->
      <xs:element name="Departments" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.CompanyName-->
      <xs:element name="CompanyNames" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.Manager-->
      <xs:element name="Managers" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.AssistantName-->
      <xs:element name="AssistantNames" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.Profession-->
      <xs:element name="Professions" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.SpouseName-->
      <xs:element name="SpouseNames" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.Children-->
      <xs:element name="Children" type="t:ArrayOfStringArrayAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.Schools-->
      <xs:element name="Schools" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.Hobbies-->
      <xs:element name="Hobbies" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.WeddingAnniversary-->
      <xs:element name="WeddingAnniversaries" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.Birthday-->
      <xs:element name="Birthdays" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <!-- Values map to ContactSchema.Location-->
      <xs:element name="Locations" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <xs:element name="InlineLinks" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <xs:element name="ItemLinkIds" type="t:ArrayOfStringArrayAttributedValuesType" minOccurs="0" />
      <xs:element name="HasActiveDeals" type="xs:string" minOccurs="0" />
      <xs:element name="IsBusinessContact" type="xs:string" minOccurs="0" />
      <xs:element name="AttributedHasActiveDeals" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <xs:element name="AttributedIsBusinessContact" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <xs:element name="SourceMailboxGuids" type="t:ArrayOfStringAttributedValuesType" minOccurs="0" />
      <xs:element name="LastContactedDate" type="xs:dateTime" minOccurs="0" />
      <!-- Values map to possibly multiple extended properties -->
      <xs:element name="ExtendedProperties" type="t:ArrayOfExtendedPropertyAttributedValueType" minOccurs="0" />
      <xs:element name="ExternalDirectoryObjectId" type="xs:string" minOccurs="0" />
      <!-- Desktop Outlook properties -->
      <xs:element name="MapiEntryId" type="xs:string" minOccurs="0" />
      <xs:element name="MapiEmailAddress" type="xs:string" minOccurs="0" />
      <xs:element name="MapiAddressType" type="xs:string" minOccurs="0" />
      <xs:element name="MapiSearchKey" type="xs:string" minOccurs="0" />
      <xs:element name="MapiTransmittableDisplayName" type="xs:string" minOccurs="0" />
      <xs:element name="MapiSendRichInfo" type="xs:boolean" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="ArrayOfPeopleType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="Persona" type="t:PersonaType"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="MailboxLocatorType">
    <xs:sequence>
      <xs:element name="ExternalDirectoryObjectId" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="LegacyDn" type="xs:string" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="GroupLocatorType">
    <xs:complexContent>
      <xs:extension base="t:MailboxLocatorType" />
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="UserLocatorType">
    <xs:complexContent>
      <xs:extension base="t:MailboxLocatorType" />
    </xs:complexContent>
  </xs:complexType>

  <xs:simpleType name="GroupMailboxConfigurationActionType">
    <xs:list>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="SetRegionalSettings"/>
          <xs:enumeration value="CreateDefaultFolders"/>
          <xs:enumeration value="SetInitialFolderPermissions"/>
          <xs:enumeration value="SetAllFolderPermissions"/>
          <xs:enumeration value="ConfigureCalendar"/>
          <xs:enumeration value="SendWelcomeMessage"/>
          <xs:enumeration value="GenerateGroupPhoto"/>
          <xs:enumeration value="AllowOnlyMembersToPost"/>
          <xs:enumeration value="ConfigureConnectors"/>
          <xs:enumeration value="ConfigureFileChangeNotification"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:list>
  </xs:simpleType>

  <xs:simpleType name="InstantSearchItemType">
    <xs:list>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="None"/>
          <xs:enumeration value="MailItem"/>
          <xs:enumeration value="MailConversation"/>
          <xs:enumeration value="CalendarItem"/>
          <xs:enumeration value="Persona"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:list>
  </xs:simpleType>

  <xs:simpleType name="InstantSearchResultType">
    <xs:list>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="None"/>
          <xs:enumeration value="Suggestions"/>
          <xs:enumeration value="ItemResults"/>
          <xs:enumeration value="ConversationResults"/>
          <xs:enumeration value="Refiners"/>
          <xs:enumeration value="SearchTerms"/>
          <xs:enumeration value="Errors"/>
          <xs:enumeration value="QueryStatistics"/>
          <xs:enumeration value="CalendarItemResults"/>
          <xs:enumeration value="PersonaResults"/>
          <xs:enumeration value="SuggestionsPrimer"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:list>
  </xs:simpleType>

  <xs:complexType name="ArrayOfItemsType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="Item" type="t:ItemType"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="ArrayOfCalendarItemsType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="CalendarItem" type="t:CalendarItemType"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="InstantSearchPayloadType">
    <xs:sequence>
      <xs:element name="SearchSessionId" type="xs:string" minOccurs="1" maxOccurs="1" />
      <xs:element name="SearchRequestId" type="xs:long" minOccurs="1" maxOccurs="1" />
      <xs:element name="ResultType" type="t:InstantSearchResultType" minOccurs="1" maxOccurs="1" />
      <xs:element name="Items" type="t:ArrayOfItemsType" minOccurs="0" maxOccurs="1" />
      <xs:element name="Conversations" type="t:ArrayOfConversationsType" minOccurs="0" maxOccurs="1" />
      <xs:element name="CalendarItems" type="t:ArrayOfCalendarItemsType" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="QueryOptionsType">
    <xs:list>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="None"/>
          <xs:enumeration value="Suggestions"/>
          <xs:enumeration value="Results"/>
          <xs:enumeration value="Refiners"/>
          <xs:enumeration value="SearchTerms"/>
          <xs:enumeration value="ExplicitSearch"/>
          <xs:enumeration value="SuggestionsPrimer"/>
          <xs:enumeration value="AllowFuzzing"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:list>
  </xs:simpleType>

  <xs:simpleType name="OneDriveViewType">
    <xs:list>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="None"/>
          <xs:enumeration value="SharedWithMe"/>
          <xs:enumeration value="MyDocuments"/>
          <xs:enumeration value="RecycleBin"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:list>
  </xs:simpleType>

  <xs:simpleType name="DelveViewType">
    <xs:list>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="None"/>
          <xs:enumeration value="Files"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:list>
  </xs:simpleType>

  <xs:simpleType name="GroupMemberIdentifierType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="ExternalDirectoryObjectId"/>
      <xs:enumeration value="LegacyExchangeDN"/>
      <xs:enumeration value="SmtpAddress"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ModernGroupTypeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None" />
      <xs:enumeration value="Private" />
      <xs:enumeration value="Secret" />
      <xs:enumeration value="Public" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="ArrayOfStringsType">
    <xs:sequence>
      <xs:element name="String" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfRealItemsType">
    <xs:sequence>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="Item" type="t:ItemType"/>
        <xs:element name="Message" type="t:MessageType"/>
        <xs:element name="SharingMessage" type="t:SharingMessageType"/>
        <xs:element name="CalendarItem" type="t:CalendarItemType"/>
        <xs:element name="Contact" type="t:ContactItemType"/>
        <xs:element name="DistributionList" type="t:DistributionListType"/>
        <xs:element name="MeetingMessage" type="t:MeetingMessageType"/>
        <xs:element name="MeetingRequest" type="t:MeetingRequestMessageType"/>
        <xs:element name="MeetingResponse" type="t:MeetingResponseMessageType"/>
        <xs:element name="MeetingCancellation" type="t:MeetingCancellationMessageType"/>
        <xs:element name="Task" type="t:TaskType"/>
        <xs:element name="PostItem" type="t:PostItemType"/>
        <xs:element name="RoleMember" type="t:RoleMemberItemType"/>
        <xs:element name="Network" type="t:NetworkItemType"/>
        <xs:element name="Person" type="t:AbchPersonItemType"/>
      </xs:choice>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="NonEmptyArrayOfAllItemsType">
    <xs:sequence>
      <xs:choice minOccurs="1" maxOccurs="unbounded">
        <xs:element name="Item" type="t:ItemType"/>
        <xs:element name="Message" type="t:MessageType"/>
        <xs:element name="SharingMessage" type="t:SharingMessageType"/>
        <xs:element name="CalendarItem" type="t:CalendarItemType"/>
        <xs:element name="Contact" type="t:ContactItemType"/>
        <xs:element name="DistributionList" type="t:DistributionListType"/>
        <xs:element name="MeetingMessage" type="t:MeetingMessageType"/>
        <xs:element name="MeetingRequest" type="t:MeetingRequestMessageType"/>
        <xs:element name="MeetingResponse" type="t:MeetingResponseMessageType"/>
        <xs:element name="MeetingCancellation" type="t:MeetingCancellationMessageType"/>
        <xs:element name="Task" type="t:TaskType"/>
        <xs:element name="PostItem" type="t:PostItemType"/>
        <xs:element name="ReplyToItem" type="t:ReplyToItemType"/>
        <xs:element name="ForwardItem" type="t:ForwardItemType"/>
        <xs:element name="ReplyAllToItem" type="t:ReplyAllToItemType"/>
        <xs:element name="AcceptItem" type="t:AcceptItemType"/>
        <xs:element name="TentativelyAcceptItem" type="t:TentativelyAcceptItemType"/>
        <xs:element name="DeclineItem" type="t:DeclineItemType"/>
        <xs:element name="CancelCalendarItem" type="t:CancelCalendarItemType" />
        <xs:element name="RemoveItem" type="t:RemoveItemType" />
        <xs:element name="SuppressReadReceipt" type="t:SuppressReadReceiptType" />
        <xs:element name="PostReplyItem" type="t:PostReplyItemType" />
        <xs:element name="AcceptSharingInvitation" type="t:AcceptSharingInvitationType" />
        <xs:element name="RoleMember" type="t:RoleMemberItemType"/>
        <xs:element name="Network" type="t:NetworkItemType"/>
        <xs:element name="Person" type="t:AbchPersonItemType"/>
      </xs:choice>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="MeetingRegistrationResponseObjectType">
    <xs:complexContent>
      <xs:extension base="t:WellKnownResponseObjectType">
        <xs:sequence>
          <xs:element name="ProposedStart" type="xs:dateTime" minOccurs="0" />
          <xs:element name="ProposedEnd" type="xs:dateTime" minOccurs="0" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="AcceptItemType">
    <xs:complexContent>
      <xs:extension base="t:MeetingRegistrationResponseObjectType"/>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="TentativelyAcceptItemType">
    <xs:complexContent>
      <xs:extension base="t:MeetingRegistrationResponseObjectType"/>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DeclineItemType">
    <xs:complexContent>
      <xs:extension base="t:MeetingRegistrationResponseObjectType"/>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ProposeNewTimeType">
    <xs:complexContent>
      <xs:extension base="t:ResponseObjectType"/>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="RemoveItemType">
    <xs:complexContent>
      <xs:extension base="t:ResponseObjectType"/>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="AddItemToMyCalendarType">
    <xs:complexContent>
      <xs:extension base="t:ResponseObjectType"/>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="PostReplyItemBaseType">
    <xs:complexContent>
      <xs:restriction base="t:ResponseObjectType">
        <xs:sequence>
          <xs:element name="Subject" type="xs:string" minOccurs="0" />
          <xs:element name="Body" type="t:BodyType" minOccurs="0" />
          <xs:element name="ReferenceItemId" type="t:ItemIdType" minOccurs="0" />
        </xs:sequence>
        <xs:attribute name="ObjectName" type="xs:string" use="prohibited" />
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PostReplyItemType">
    <xs:complexContent>
      <xs:extension base="t:PostReplyItemBaseType">
        <xs:sequence>
          <xs:element name="NewBodyContent" type="t:BodyType" minOccurs="0" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- Mime content support -->
  <xs:complexType name="MimeContentType">
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute name="CharacterSet" type="xs:string" use="optional" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <!-- Mime content UTF8 support -->
  <xs:complexType name="MimeContentUTF8Type">
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute name="CharacterSet" type="xs:string" use="optional" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <!-- Special items for creating and updating items -->

  <xs:simpleType name="MessageDispositionType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="SaveOnly" />
      <xs:enumeration value="SendOnly" />
      <xs:enumeration value="SendAndSaveCopy" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CalendarItemCreateOrDeleteOperationType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="SendToNone" />
      <xs:enumeration value="SendOnlyToAll" />
      <xs:enumeration value="SendToAllAndSaveCopy" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CalendarItemUpdateOperationType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="SendToNone" />
      <xs:enumeration value="SendOnlyToAll" />
      <xs:enumeration value="SendOnlyToChanged" />
      <xs:enumeration value="SendToAllAndSaveCopy" />
      <xs:enumeration value="SendToChangedAndSaveCopy" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="AffectedTaskOccurrencesType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="AllOccurrences"/>
      <xs:enumeration value="SpecifiedOccurrenceOnly"/>
    </xs:restriction>
  </xs:simpleType>

  <!-- - - - - - - - - - - - - - - - - - - -->
  <!--   Message type: derived from item   -->
  <!-- - - - - - - - - - - - - - - - - - - -->
  <xs:complexType name="MessageType">
    <xs:complexContent>
      <xs:extension base="t:ItemType">
        <xs:sequence>
          <xs:element name="Sender" minOccurs="0" type="t:SingleRecipientType" />
          <xs:element name="ToRecipients" type="t:ArrayOfRecipientsType" minOccurs="0" />
          <xs:element name="CcRecipients" type="t:ArrayOfRecipientsType" minOccurs="0" />
          <xs:element name="BccRecipients" type="t:ArrayOfRecipientsType" minOccurs="0" />
          <xs:element name="IsReadReceiptRequested" type="xs:boolean" minOccurs="0" />
          <xs:element name="IsDeliveryReceiptRequested" type="xs:boolean" minOccurs="0" />
          <xs:element name="ConversationIndex" type="xs:base64Binary" minOccurs="0" />
          <xs:element name="ConversationTopic" type="xs:string" minOccurs="0" />
          <xs:element name="From" type="t:SingleRecipientType" minOccurs="0" />
          <xs:element name="InternetMessageId" type="xs:string" minOccurs="0" />
          <xs:element name="IsRead" type="xs:boolean" minOccurs="0" />
          <xs:element name="IsResponseRequested" type="xs:boolean" minOccurs="0" />
          <xs:element name="References" type="xs:string" minOccurs="0" />
          <xs:element name="ReplyTo" type="t:ArrayOfRecipientsType" minOccurs="0" />
          <xs:element name="ReceivedBy" type="t:SingleRecipientType" minOccurs="0" />
          <xs:element name="ReceivedRepresenting" type="t:SingleRecipientType" minOccurs="0" />
          <xs:element name="ApprovalRequestData" type="t:ApprovalRequestDataType" minOccurs="0" />
          <xs:element name="VotingInformation" type="t:VotingInformationType" minOccurs="0" />
          <xs:element name="ReminderMessageData" type="t:ReminderMessageDataType" minOccurs="0" />
          <xs:element name="MessageSafety" type="t:MessageSafetyType" minOccurs="0" />
          <xs:element name="SenderSMTPAddress" type="t:SmtpAddressType" minOccurs="0"/>
          <xs:element name="MailboxGuids" minOccurs="0" maxOccurs="1">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="MailboxGuid" type="t:GuidType" maxOccurs="unbounded"/>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
          <xs:element name="PublishedCalendarItemIcs" type="xs:string" minOccurs="0" />
          <xs:element name="PublishedCalendarItemName" type="xs:string" minOccurs="0" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:simpleType name="TaskStatusType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="NotStarted" />
      <xs:enumeration value="InProgress" />
      <xs:enumeration value="Completed" />
      <xs:enumeration value="WaitingOnOthers" />
      <xs:enumeration value="Deferred" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="TaskDelegateStateType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="NoMatch" />
      <xs:enumeration value="OwnNew" />
      <xs:enumeration value="Owned" />
      <xs:enumeration value="Accepted" />
      <xs:enumeration value="Declined" />
      <xs:enumeration value="Max" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="TaskType">
    <xs:complexContent>
      <xs:extension base="t:ItemType">
        <xs:sequence>
          <xs:element name="ActualWork" type="xs:int" minOccurs="0" />
          <xs:element name="AssignedTime" type="xs:dateTime" minOccurs="0" />
          <xs:element name="BillingInformation" type="xs:string" minOccurs="0" />
          <xs:element name="ChangeCount" type="xs:int" minOccurs="0" />
          <xs:element name="Companies" type="t:ArrayOfStringsType" minOccurs="0" />
          <xs:element name="CompleteDate" type="xs:dateTime" minOccurs="0" />
          <xs:element name="Contacts" type="t:ArrayOfStringsType" minOccurs="0" />
          <xs:element name="DelegationState" type="t:TaskDelegateStateType" minOccurs="0" />
          <xs:element name="Delegator" type="xs:string" minOccurs="0" />
          <xs:element name="DueDate" type="xs:dateTime" minOccurs="0" />
          <xs:element name="IsAssignmentEditable" type="xs:int" minOccurs="0" />
          <xs:element name="IsComplete" type="xs:boolean" minOccurs="0" />
          <xs:element name="IsRecurring" type="xs:boolean" minOccurs="0" />
          <xs:element name="IsTeamTask" type="xs:boolean" minOccurs="0" />
          <xs:element name="Mileage" type="xs:string" minOccurs="0" />
          <xs:element name="Owner" type="xs:string" minOccurs="0" />
          <xs:element name="PercentComplete" type="xs:double" minOccurs="0" />
          <xs:element name="Recurrence" type="t:TaskRecurrenceType" minOccurs="0" />
          <xs:element name="StartDate" type="xs:dateTime" minOccurs="0" />
          <xs:element name="Status" type="t:TaskStatusType" minOccurs="0" />
          <xs:element name="StatusDescription" type="xs:string" minOccurs="0" />
          <xs:element name="TotalWork" type="xs:int" minOccurs="0" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="PostItemType">
    <xs:complexContent>
      <xs:extension base="t:ItemType">
        <xs:sequence>
          <xs:element name="ConversationIndex" type="xs:base64Binary" minOccurs="0"/>
          <xs:element name="ConversationTopic" type="xs:string" minOccurs="0"/>
          <!-- From property can only be set at creation time -->
          <xs:element name="From" type="t:SingleRecipientType" minOccurs="0"/>
          <xs:element name="InternetMessageId" type="xs:string" minOccurs="0"/>
          <xs:element name="IsRead" type="xs:boolean" minOccurs="0" />
          <!-- PostedTime is read only -->
          <xs:element name="PostedTime" type="xs:dateTime" minOccurs="0"/>
          <xs:element name="References" type="xs:string" minOccurs="0" />
          <!-- Sender can only be set at creation time -->
          <xs:element name="Sender" type="t:SingleRecipientType" minOccurs="0"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="SharingMessageType">
    <xs:complexContent>
      <xs:extension base="t:MessageType">
        <xs:sequence>
          <xs:element name="SharingMessageAction" type="t:SharingMessageActionType" minOccurs="0" />
          <xs:element name="SharingMessageActions" type="t:ArrayOfSharingMessageActionType" minOccurs="0" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ArrayOfSharingMessageActionType">
    <xs:sequence>
      <xs:element name="SharingMessageAction" type="t:SharingMessageActionType" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SharingMessageActionType">
    <xs:sequence>
      <xs:element name="Importance" type="t:SharingActionImportance" minOccurs="0" />
      <xs:element name="ActionType" type="t:SharingActionType" minOccurs="0" />
      <xs:element name="Action" type="t:SharingAction" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="SharingActionImportance">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Primary" />
      <xs:enumeration value="Secondary" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="SharingAction">
    <xs:restriction base="xs:string">
      <xs:enumeration value="AcceptAndViewCalendar" />
      <xs:enumeration value="ViewCalendar" />
      <xs:enumeration value="AddThisCalendar" />
      <xs:enumeration value="Accept" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="SharingActionType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Accept" />
    </xs:restriction>
  </xs:simpleType>

  <!-- Paging specification -->
  <xs:complexType name="BasePagingType" abstract="true">
    <xs:attribute name="MaxEntriesReturned" type="xs:int" use="optional"/>
  </xs:complexType>

  <xs:simpleType name="IndexBasePointType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Beginning" />
      <xs:enumeration value="End" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="IndexedPageViewType">
    <xs:complexContent>
      <xs:extension base="t:BasePagingType">
        <xs:attribute name="Offset" type="xs:int" use="required"/>
        <xs:attribute name="BasePoint" type="t:IndexBasePointType" use="required" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="FractionalPageViewType">
    <xs:complexContent>
      <xs:extension base="t:BasePagingType">
        <xs:attribute name="Numerator" type="xs:int" use="required" />
        <xs:attribute name="Denominator" type="xs:int" use="required" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="SeekToConditionPageViewType">
    <xs:complexContent>
      <xs:extension base="t:BasePagingType">
        <xs:sequence>
          <xs:element name="Condition" type="t:RestrictionType" minOccurs="1"/>
        </xs:sequence>
        <xs:attribute name="BasePoint" type="t:IndexBasePointType" use="required"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="CalendarViewType">
    <xs:complexContent>
      <xs:extension base="t:BasePagingType">
        <xs:attribute name="StartDate" type="xs:dateTime" use="required" />
        <xs:attribute name="EndDate" type="xs:dateTime" use="required" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ContactsViewType">
    <xs:complexContent>
      <xs:extension base="t:BasePagingType">
        <xs:attribute name="InitialName" type="xs:string" use="optional"/>
        <xs:attribute name="FinalName" type="xs:string" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- Util Service Types. -->


  <!-- ResolveNames request -->

  <xs:simpleType name="ResolveNamesSearchScopeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="ActiveDirectory" />
      <xs:enumeration value="ActiveDirectoryContacts" />
      <xs:enumeration value="Contacts" />
      <xs:enumeration value="ContactsActiveDirectory" />
    </xs:restriction>
  </xs:simpleType>

  <!-- ResolveNames response -->

  <xs:complexType name="ResolutionType">
    <xs:sequence>
      <xs:element name="Mailbox" type="t:EmailAddressType" />
      <xs:element name="Contact" type="t:ContactItemType" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfResolutionType">
    <xs:sequence>
      <xs:element name="Resolution" type="t:ResolutionType" minOccurs="0" maxOccurs="100" />
    </xs:sequence>
    <xs:attributeGroup ref="t:FindResponsePagingAttributes" />
  </xs:complexType>

  <!-- DLExpansion response -->

  <xs:complexType name="ArrayOfDLExpansionType">
    <xs:sequence>
      <xs:element name="Mailbox" type="t:EmailAddressType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
    <xs:attributeGroup ref="t:FindResponsePagingAttributes" />
  </xs:complexType>

  <!-- end of DLExpansion -->

  <!-- GetServerTimeZones response -->

  <xs:complexType name="NonEmptyArrayOfTimeZoneIdType">
    <xs:sequence>
      <xs:element name="Id" type="xs:string" maxOccurs="unbounded"  />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfTimeZoneDefinitionType">
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
      <xs:element name="TimeZoneDefinition" type="t:TimeZoneDefinitionType" />
    </xs:sequence>
  </xs:complexType>

  <!-- end of GetServerTimeZones -->


  <!-- MeetingMessage types -->
  <xs:simpleType name="MeetingRequestTypeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None" />
      <xs:enumeration value="FullUpdate" />
      <xs:enumeration value="InformationalUpdate" />
      <xs:enumeration value="NewMeetingRequest" />
      <xs:enumeration value="Outdated" />
      <xs:enumeration value="SilentUpdate" />
      <xs:enumeration value="PrincipalWantsCopy" />
    </xs:restriction>
  </xs:simpleType>

  <!-- CalendarItem Types -->

  <xs:simpleType name="ReminderMinutesBeforeStartType">
    <xs:union>
      <xs:simpleType id="ReminderMinutesBeforeStartType" >
        <xs:restriction base="xs:int">
          <xs:minInclusive value="0" />
          <xs:maxInclusive value="2629800" />
        </xs:restriction>
      </xs:simpleType>
      <xs:simpleType id="ReminderMinutesBeforeStartMarkerType">
        <xs:restriction base="xs:int">
          <xs:minInclusive value="1525252321" />
          <xs:maxInclusive value="1525252321" />
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>

  <!-- Enumeration types -->
  <xs:simpleType name="AvailabilityStatusType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Unknown" />
      <xs:enumeration value="Free" />
      <xs:enumeration value="Tentative" />
      <xs:enumeration value="Busy" />
      <xs:enumeration value="Oof" />
      <xs:enumeration value="WorkingElsewhere" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="LegacyFreeBusyType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Free" />
      <xs:enumeration value="Tentative" />
      <xs:enumeration value="Busy" />
      <xs:enumeration value="OOF" />
      <xs:enumeration value="WorkingElsewhere" />
      <xs:enumeration value="NoData" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CalendarItemTypeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Single" />
      <xs:enumeration value="Occurrence" />
      <xs:enumeration value="Exception" />
      <xs:enumeration value="RecurringMaster" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ResponseTypeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Unknown" />
      <xs:enumeration value="Organizer" />
      <xs:enumeration value="Tentative" />
      <xs:enumeration value="Accept" />
      <xs:enumeration value="Decline" />
      <xs:enumeration value="NoResponseReceived" />
    </xs:restriction>
  </xs:simpleType>

  <!-- Online Meeting type and enums -->

  <xs:complexType name="OnlineMeetingSettingsType">
    <xs:sequence>
      <xs:element name="LobbyBypass" type="t:LobbyBypassType" />
      <xs:element name="AccessLevel" type="t:OnlineMeetingAccessLevelType" />
      <xs:element name="Presenters" type="t:PresentersType" />
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="LobbyBypassType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Disabled" />
      <xs:enumeration value="EnabledForGatewayParticipants" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="OnlineMeetingAccessLevelType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Locked" />
      <xs:enumeration value="Invited" />
      <xs:enumeration value="Internal" />
      <xs:enumeration value="Everyone" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="PresentersType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Disabled" />
      <xs:enumeration value="Internal" />
      <xs:enumeration value="Everyone" />
    </xs:restriction>
  </xs:simpleType>

  <!-- Representation of attendees -->

  <xs:complexType name="AttendeeType">
    <xs:sequence>
      <xs:element name="Mailbox" type="t:EmailAddressType" />
      <xs:element name="ResponseType" type="t:ResponseTypeType" minOccurs="0" />
      <xs:element name="LastResponseTime" type="xs:dateTime" minOccurs="0" />
      <xs:element name="ProposedStart" type="xs:dateTime" minOccurs="0" />
      <xs:element name="ProposedEnd" type="xs:dateTime" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="NonEmptyArrayOfAttendeesType">
    <xs:sequence>
      <xs:element name="Attendee" type="t:AttendeeType" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <!-- Special item ids for interconverting between instances and masters -->

  <xs:complexType name="OccurrenceItemIdType">
    <xs:complexContent>
      <xs:extension base="t:BaseItemIdType">
        <xs:attribute name="RecurringMasterId" type="t:DerivedItemIdType" use="required" />
        <xs:attribute name="ChangeKey" type="xs:string" use="optional" />
        <xs:attribute name="InstanceIndex" type="xs:int" use="required" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="RecurringMasterItemIdType">
    <xs:complexContent>
      <xs:extension base="t:BaseItemIdType">
        <xs:attribute name="OccurrenceId" type="t:DerivedItemIdType" use="required" />
        <xs:attribute name="ChangeKey" type="xs:string" use="optional" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="RecurringMasterItemIdRangesType">
    <xs:complexContent>
      <xs:extension base="t:ItemIdType">
        <xs:sequence>
          <xs:element name="Ranges" type="t:ArrayOfOccurrenceRangesType" minOccurs="0"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ArrayOfOccurrenceRangesType">
    <xs:sequence>
      <xs:element name="Range" type="t:OccurrencesRangeType" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="OccurrencesRangeType">
    <xs:attribute name="Start" type="xs:dateTime" use="optional" />
    <xs:attribute name="End" type="xs:dateTime" use="optional" />
    <xs:attribute name="Count" type="xs:int" use="optional" />
    <xs:attribute name="CompareOriginalStartTime" type="xs:boolean" use="optional" />
  </xs:complexType>

  <!-- Days of the week and months-->

  <xs:simpleType name="DayOfWeekType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Sunday" />
      <xs:enumeration value="Monday" />
      <xs:enumeration value="Tuesday" />
      <xs:enumeration value="Wednesday" />
      <xs:enumeration value="Thursday" />
      <xs:enumeration value="Friday" />
      <xs:enumeration value="Saturday" />
      <xs:enumeration value="Day" />
      <xs:enumeration value="Weekday" />
      <xs:enumeration value="WeekendDay" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DaysOfWeekType">
    <xs:list itemType="t:DayOfWeekType" />
  </xs:simpleType>

  <xs:simpleType name="DayOfWeekIndexType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="First" />
      <xs:enumeration value="Second" />
      <xs:enumeration value="Third" />
      <xs:enumeration value="Fourth" />
      <xs:enumeration value="Last" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="MonthNamesType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="January" />
      <xs:enumeration value="February" />
      <xs:enumeration value="March" />
      <xs:enumeration value="April" />
      <xs:enumeration value="May" />
      <xs:enumeration value="June" />
      <xs:enumeration value="July" />
      <xs:enumeration value="August" />
      <xs:enumeration value="September" />
      <xs:enumeration value="October" />
      <xs:enumeration value="November" />
      <xs:enumeration value="December" />
    </xs:restriction>
  </xs:simpleType>

  <!-- Recurrence pattern types -->

  <xs:complexType name="RecurrencePatternBaseType" abstract="true" />

  <xs:complexType name="IntervalRecurrencePatternBaseType" abstract="true">
    <xs:complexContent>
      <xs:extension base="t:RecurrencePatternBaseType">
        <xs:sequence>
          <xs:element name="Interval" type="xs:int" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!--
    Base regeneration pattern type for tasks.
    -->

  <xs:complexType name="RegeneratingPatternBaseType" abstract="true">
    <xs:complexContent>
      <xs:extension base="t:IntervalRecurrencePatternBaseType"/>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="DailyRegeneratingPatternType">
    <xs:complexContent>
      <xs:extension base="t:RegeneratingPatternBaseType"/>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="WeeklyRegeneratingPatternType">
    <xs:complexContent>
      <xs:extension base="t:RegeneratingPatternBaseType"/>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="MonthlyRegeneratingPatternType">
    <xs:complexContent>
      <xs:extension base="t:RegeneratingPatternBaseType"/>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="YearlyRegeneratingPatternType">
    <xs:complexContent>
      <xs:extension base="t:RegeneratingPatternBaseType"/>
    </xs:complexContent>
  </xs:complexType>

  <!-- Realizable Recurrence pattern types -->

  <xs:complexType name="RelativeYearlyRecurrencePatternType">
    <xs:complexContent>
      <xs:extension base="t:RecurrencePatternBaseType">
        <xs:sequence>
          <xs:element name="DaysOfWeek" type="t:DayOfWeekType" />
          <xs:element name="DayOfWeekIndex" type="t:DayOfWeekIndexType" />
          <xs:element name="Month" type="t:MonthNamesType" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="AbsoluteYearlyRecurrencePatternType">
    <xs:complexContent>
      <xs:extension base="t:RecurrencePatternBaseType">
        <xs:sequence>
          <xs:element name="DayOfMonth" type="xs:int" />
          <xs:element name="Month" type="t:MonthNamesType" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="RelativeMonthlyRecurrencePatternType">
    <xs:complexContent>
      <xs:extension base="t:IntervalRecurrencePatternBaseType">
        <xs:sequence>
          <xs:element name="DaysOfWeek" type="t:DayOfWeekType" />
          <xs:element name="DayOfWeekIndex" type="t:DayOfWeekIndexType" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="AbsoluteMonthlyRecurrencePatternType">
    <xs:complexContent>
      <xs:extension base="t:IntervalRecurrencePatternBaseType">
        <xs:sequence>
          <xs:element name="DayOfMonth" type="xs:int" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="WeeklyRecurrencePatternType">
    <xs:complexContent>
      <xs:extension base="t:IntervalRecurrencePatternBaseType">
        <xs:sequence>
          <xs:element name="DaysOfWeek" type="t:DaysOfWeekType"/>
          <xs:element name="FirstDayOfWeek" type="t:DayOfWeekType" minOccurs="0"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="DailyRecurrencePatternType">
    <xs:complexContent>
      <xs:extension base="t:IntervalRecurrencePatternBaseType" />
    </xs:complexContent>
  </xs:complexType>

  <!-- Enhanced location types -->
  <xs:simpleType name="LocationSourceType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None" />
      <xs:enumeration value="LocationServices" />
      <xs:enumeration value="PhonebookServices" />
      <xs:enumeration value="Device" />
      <xs:enumeration value="Contact" />
      <xs:enumeration value="Resource" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="EnhancedLocationType">
    <xs:sequence>
      <xs:element name="DisplayName" type="xs:string" />
      <xs:element name="Annotation" type="xs:string"  minOccurs="0" />
      <xs:element name="PostalAddress" type="t:PersonaPostalAddressType" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <!-- Description of a time zone -->

  <xs:group name="TimeChangePatternTypes">
    <xs:sequence>
      <xs:choice>
        <xs:element name="RelativeYearlyRecurrence" type="t:RelativeYearlyRecurrencePatternType" />
        <xs:element name="AbsoluteDate" type="xs:date" />
      </xs:choice>
    </xs:sequence>
  </xs:group>

  <xs:complexType name="TimeChangeType">
    <xs:sequence>
      <xs:element name="Offset" type="xs:duration" />
      <xs:group ref="t:TimeChangePatternTypes" minOccurs="0"/>
      <xs:element name="Time" type="xs:time" />
    </xs:sequence>
    <xs:attribute name="TimeZoneName" type="xs:string" use="optional" />
  </xs:complexType>

  <xs:complexType name="TimeZoneType">
    <xs:sequence minOccurs="0" >
      <xs:element name="BaseOffset" type="xs:duration" />
      <xs:sequence minOccurs="0">
        <xs:element name="Standard" type="t:TimeChangeType"/>
        <xs:element name="Daylight" type="t:TimeChangeType"/>
      </xs:sequence>
    </xs:sequence>
    <xs:attribute name="TimeZoneName" type="xs:string" use="optional" />
  </xs:complexType>

  <!-- TimeZoneDefinitionContextType for Soap header -->

  <xs:complexType name="TimeZoneContextType">
    <xs:sequence>
      <xs:element name="TimeZoneDefinition" type="t:TimeZoneDefinitionType" minOccurs="1"/>
    </xs:sequence>
    <xs:anyAttribute namespace="http://schemas.xmlsoap.org/soap/envelope/">
      <xs:annotation>
        <xs:documentation>Allow attributes in the soap namespace to be used here</xs:documentation>
      </xs:annotation>
    </xs:anyAttribute>
  </xs:complexType>


  <xs:element name="TimeZoneContext" type="t:TimeZoneContextType" />

  <!-- Time zone definition types -->

  <xs:simpleType name="TransitionTargetKindType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Period" />
      <xs:enumeration value="Group" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="TransitionTargetType">
    <xs:simpleContent>
      <xs:extension base="xs:string" >
        <xs:attribute name="Kind" type="t:TransitionTargetKindType" use="required" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="TransitionType" abstract="false">
    <xs:sequence>
      <xs:element name="To" type="t:TransitionTargetType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AbsoluteDateTransitionType">
    <xs:complexContent>
      <xs:extension base="t:TransitionType">
        <xs:sequence>
          <xs:element name="DateTime" type="xs:dateTime" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="RecurringTimeTransitionType" abstract="true">
    <xs:complexContent>
      <xs:extension base="t:TransitionType">
        <xs:sequence>
          <xs:element name="TimeOffset" type="xs:duration" />
          <xs:element name="Month" type="xs:int" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="RecurringDateTransitionType">
    <xs:complexContent>
      <xs:extension base="t:RecurringTimeTransitionType">
        <xs:sequence>
          <xs:element name="Day" type="xs:int" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="RecurringDayTransitionType">
    <xs:complexContent>
      <xs:extension base="t:RecurringTimeTransitionType">
        <xs:sequence>
          <xs:element name="DayOfWeek" type="t:DayOfWeekType" />
          <xs:element name="Occurrence" type="xs:int" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:element name="Transition"  type="t:TransitionType"  />
  <xs:element name="AbsoluteDateTransition" type="t:AbsoluteDateTransitionType" substitutionGroup="t:Transition"/>
  <xs:element name="RecurringDayTransition" type="t:RecurringDayTransitionType" substitutionGroup="t:Transition"/>
  <xs:element name="RecurringDateTransition" type="t:RecurringDateTransitionType" substitutionGroup="t:Transition"/>

  <!-- TimeZoneDefinition -->

  <xs:complexType name="TimeZoneDefinitionType">
    <xs:sequence minOccurs="0">
      <xs:element name="Periods" type="t:NonEmptyArrayOfPeriodsType" />
      <xs:element name="TransitionsGroups" type="t:ArrayOfTransitionsGroupsType"   minOccurs="0"/>
      <xs:element name="Transitions" type="t:ArrayOfTransitionsType" minOccurs="0" />
    </xs:sequence>
    <xs:attribute name="Id" type="xs:string"/>
    <xs:attribute name="Name" type="xs:string" />
  </xs:complexType>

  <xs:complexType name="NonEmptyArrayOfPeriodsType">
    <xs:sequence>
      <xs:element name="Period" type="t:PeriodType" maxOccurs="unbounded"  />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PeriodType">
    <xs:attribute name="Bias" type="xs:duration"/>
    <xs:attribute name="Name" type="xs:string"/>
    <xs:attribute name="Id" type="xs:string"/>
  </xs:complexType>

  <xs:complexType name="ArrayOfTransitionsGroupsType">
    <xs:sequence>
      <xs:element name="TransitionsGroup" type="t:ArrayOfTransitionsType" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfTransitionsType">
    <xs:sequence>
      <xs:element ref="t:Transition" maxOccurs="unbounded" />
    </xs:sequence>
    <xs:attribute name="Id" type="xs:string"/>
  </xs:complexType>

  <!-- Recurrence range types -->

  <xs:complexType name="RecurrenceRangeBaseType" abstract="true">
    <xs:sequence>
      <xs:element name="StartDate" type="xs:date" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="NoEndRecurrenceRangeType">
    <xs:complexContent>
      <xs:extension base="t:RecurrenceRangeBaseType" />
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="EndDateRecurrenceRangeType">
    <xs:complexContent>
      <xs:extension base="t:RecurrenceRangeBaseType">
        <xs:sequence>
          <xs:element name="EndDate" type="xs:date" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="NumberedRecurrenceRangeType">
    <xs:complexContent>
      <xs:extension base="t:RecurrenceRangeBaseType">
        <xs:sequence>
          <xs:element name="NumberOfOccurrences" type="xs:int" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- The real Recurrence type -->

  <xs:group name="RecurrencePatternTypes">
    <xs:sequence>
      <xs:choice>
        <xs:element name="RelativeYearlyRecurrence" type="t:RelativeYearlyRecurrencePatternType" />
        <xs:element name="AbsoluteYearlyRecurrence" type="t:AbsoluteYearlyRecurrencePatternType" />
        <xs:element name="RelativeMonthlyRecurrence" type="t:RelativeMonthlyRecurrencePatternType" />
        <xs:element name="AbsoluteMonthlyRecurrence" type="t:AbsoluteMonthlyRecurrencePatternType" />
        <xs:element name="WeeklyRecurrence" type="t:WeeklyRecurrencePatternType" />
        <xs:element name="DailyRecurrence" type="t:DailyRecurrencePatternType" />
      </xs:choice>
    </xs:sequence>
  </xs:group>

  <xs:group name="TaskRecurrencePatternTypes">
    <xs:sequence>
      <xs:choice>
        <xs:element name="RelativeYearlyRecurrence" type="t:RelativeYearlyRecurrencePatternType"/>
        <xs:element name="AbsoluteYearlyRecurrence" type="t:AbsoluteYearlyRecurrencePatternType"/>
        <xs:element name="RelativeMonthlyRecurrence" type="t:RelativeMonthlyRecurrencePatternType"/>
        <xs:element name="AbsoluteMonthlyRecurrence" type="t:AbsoluteMonthlyRecurrencePatternType"/>
        <xs:element name="WeeklyRecurrence" type="t:WeeklyRecurrencePatternType"/>
        <xs:element name="DailyRecurrence" type="t:DailyRecurrencePatternType"/>
        <xs:element name="DailyRegeneration" type="t:DailyRegeneratingPatternType"/>
        <xs:element name="WeeklyRegeneration" type="t:WeeklyRegeneratingPatternType"/>
        <xs:element name="MonthlyRegeneration" type="t:MonthlyRegeneratingPatternType"/>
        <xs:element name="YearlyRegeneration" type="t:YearlyRegeneratingPatternType"/>
      </xs:choice>
    </xs:sequence>
  </xs:group>

  <xs:group name="RecurrenceRangeTypes">
    <xs:sequence>
      <xs:choice>
        <xs:element name="NoEndRecurrence" type="t:NoEndRecurrenceRangeType" />
        <xs:element name="EndDateRecurrence" type="t:EndDateRecurrenceRangeType" />
        <xs:element name="NumberedRecurrence" type="t:NumberedRecurrenceRangeType" />
      </xs:choice>
    </xs:sequence>
  </xs:group>

  <xs:complexType name="RecurrenceType">
    <xs:sequence>
      <xs:group ref="t:RecurrencePatternTypes" />
      <xs:group ref="t:RecurrenceRangeTypes" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="TaskRecurrenceType">
    <xs:sequence>
      <xs:group ref="t:TaskRecurrencePatternTypes"/>
      <xs:group ref="t:RecurrenceRangeTypes"/>
    </xs:sequence>
  </xs:complexType>

  <!-- Individual occurrences of an expanded Recurrence -->

  <xs:complexType name="OccurrenceInfoType">
    <xs:sequence>
      <xs:element name="ItemId" type="t:ItemIdType" />
      <xs:element name="Start" type="xs:dateTime" />
      <xs:element name="End" type="xs:dateTime" />
      <xs:element name="OriginalStart" type="xs:dateTime" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="NonEmptyArrayOfOccurrenceInfoType">
    <xs:sequence>
      <xs:element name="Occurrence" type="t:OccurrenceInfoType" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="DeletedOccurrenceInfoType">
    <xs:sequence>
      <xs:element name="Start" type="xs:dateTime" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="NonEmptyArrayOfDeletedOccurrencesType">
    <xs:sequence>
      <xs:element name="DeletedOccurrence" type="t:DeletedOccurrenceInfoType" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <!-- The main calendar item from which all others derive -->

  <xs:complexType name="CalendarItemType">
    <xs:complexContent>
      <xs:extension base="t:ItemType">
        <xs:sequence>

          <!-- iCalendar properties -->

          <xs:element name="UID" type="xs:string" minOccurs="0" />
          <xs:element name="RecurrenceId" type="xs:dateTime" minOccurs="0" />
          <xs:element name="DateTimeStamp" type="xs:dateTime" minOccurs="0" />

          <!-- Single and Occurrence only -->

          <xs:element name="Start" type="xs:dateTime" minOccurs="0" />
          <xs:element name="End" type="xs:dateTime" minOccurs="0" />

          <!-- Occurrence only -->

          <xs:element name="OriginalStart" type="xs:dateTime" minOccurs="0" />

          <xs:element name="IsAllDayEvent" type="xs:boolean" minOccurs="0" />
          <xs:element name="LegacyFreeBusyStatus" type="t:LegacyFreeBusyType" minOccurs="0" />
          <xs:element name="Location" type="xs:string" minOccurs="0" />
          <xs:element name="When" type="xs:string" minOccurs="0" />
          <xs:element name="IsMeeting" type="xs:boolean" minOccurs="0" />
          <xs:element name="IsCancelled" type="xs:boolean" minOccurs="0" />
          <xs:element name="IsRecurring" type="xs:boolean" minOccurs="0" />
          <xs:element name="MeetingRequestWasSent" type="xs:boolean" minOccurs="0" />
          <xs:element name="IsResponseRequested" type="xs:boolean" minOccurs="0" />
          <xs:element name="CalendarItemType" type="t:CalendarItemTypeType" minOccurs="0" />
          <xs:element name="MyResponseType" type="t:ResponseTypeType" minOccurs="0" />
          <xs:element name="Organizer" type="t:SingleRecipientType" minOccurs="0" />
          <xs:element name="RequiredAttendees" type="t:NonEmptyArrayOfAttendeesType" minOccurs="0" />
          <xs:element name="OptionalAttendees" type="t:NonEmptyArrayOfAttendeesType" minOccurs="0" />
          <xs:element name="Resources" type="t:NonEmptyArrayOfAttendeesType" minOccurs="0" />
          <xs:element name="InboxReminders" type="t:ArrayOfInboxReminderType" minOccurs="0" />

          <!-- Conflicting and adjacent meetings -->

          <xs:element name="ConflictingMeetingCount" type="xs:int" minOccurs="0" />
          <xs:element name="AdjacentMeetingCount" type="xs:int" minOccurs="0" />
          <xs:element name="ConflictingMeetings" type="t:NonEmptyArrayOfAllItemsType" minOccurs="0" />
          <xs:element name="AdjacentMeetings" type="t:NonEmptyArrayOfAllItemsType" minOccurs="0" />

          <xs:element name="Duration" type="xs:string" minOccurs="0" />
          <xs:element name="TimeZone" type="xs:string" minOccurs="0" />

          <xs:element name="AppointmentReplyTime" type="xs:dateTime" minOccurs="0" />
          <xs:element name="AppointmentSequenceNumber" type="xs:int" minOccurs="0" />
          <xs:element name="AppointmentState" type="xs:int" minOccurs="0" />

          <!-- Recurrence specific data, only valid if CalendarItemType is RecurringMaster -->

          <xs:element name="Recurrence" type="t:RecurrenceType" minOccurs="0" />
          <xs:element name="FirstOccurrence" type="t:OccurrenceInfoType" minOccurs="0" />
          <xs:element name="LastOccurrence" type="t:OccurrenceInfoType" minOccurs="0" />
          <xs:element name="ModifiedOccurrences" type="t:NonEmptyArrayOfOccurrenceInfoType" minOccurs="0" />
          <xs:element name="DeletedOccurrences" type="t:NonEmptyArrayOfDeletedOccurrencesType" minOccurs="0" />
          <xs:element name="MeetingTimeZone" type="t:TimeZoneType" minOccurs="0"/>
          <xs:element name="StartTimeZone" type="t:TimeZoneDefinitionType" minOccurs="0" maxOccurs="1" />
          <xs:element name="EndTimeZone" type="t:TimeZoneDefinitionType" minOccurs="0" maxOccurs="1" />

          <xs:element name="ConferenceType" type="xs:int" minOccurs="0" />
          <xs:element name="AllowNewTimeProposal" type="xs:boolean" minOccurs="0" />
          <xs:element name="IsOnlineMeeting" type="xs:boolean" minOccurs="0" />
          <xs:element name="MeetingWorkspaceUrl" type="xs:string" minOccurs="0" />
          <xs:element name="NetShowUrl" type="xs:string" minOccurs="0" />
          <xs:element name="EnhancedLocation" type="t:EnhancedLocationType" minOccurs="0" />

          <xs:element name="StartWallClock" type="xs:dateTime" minOccurs="0" maxOccurs="1" />
          <xs:element name="EndWallClock" type="xs:dateTime" minOccurs="0" maxOccurs="1" />
          <xs:element name="StartTimeZoneId" type="xs:string" minOccurs="0" maxOccurs="1" />
          <xs:element name="EndTimeZoneId" type="xs:string" minOccurs="0" maxOccurs="1" />

          <xs:element name="IntendedFreeBusyStatus" type="t:LegacyFreeBusyType" minOccurs="0" />

          <xs:element name="JoinOnlineMeetingUrl" type="xs:string" minOccurs="0" maxOccurs="1" />

          <xs:element name="OnlineMeetingSettings" type="t:OnlineMeetingSettingsType" minOccurs="0" maxOccurs="1"/>
          <xs:element name="IsOrganizer" type="xs:boolean" minOccurs="0" />
          <xs:element name="CalendarActivityData" type="t:CalendarActivityDataType" minOccurs="0" maxOccurs="1"/>
          <xs:element name="DoNotForwardMeeting" type="xs:boolean" minOccurs="0"/>             
        </xs:sequence>

      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- Getting occurrences from Recurring masters and vice versa -->

  <!--Meeting invitation-->

  <xs:complexType name="MeetingMessageType">
    <xs:complexContent>
      <xs:extension base="t:MessageType">
        <xs:sequence>
          <xs:element name="AssociatedCalendarItemId" type="t:ItemIdType" minOccurs="0"/>
          <xs:element name="IsDelegated" type="xs:boolean" minOccurs="0" />
          <xs:element name="IsOutOfDate" type="xs:boolean" minOccurs="0" />
          <xs:element name="HasBeenProcessed" type="xs:boolean" minOccurs="0" />

          <!-- Meeting response related properties -->

          <xs:element name="ResponseType" type="t:ResponseTypeType" minOccurs="0" />

          <!-- iCalendar properties -->

          <xs:element name="UID" type="xs:string" minOccurs="0" />
          <xs:element name="RecurrenceId" type="xs:dateTime" minOccurs="0" />
          <xs:element name="DateTimeStamp" type="xs:dateTime" minOccurs="0" />

          <xs:element name="IsOrganizer" type="xs:boolean" minOccurs="0" />

        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!--ChangeHighlights-->
  <xs:complexType name="ChangeHighlightsType">
    <xs:sequence>
      <xs:element name="HasLocationChanged" type="xs:boolean" minOccurs="0" />
      <xs:element name="Location" type="xs:string" minOccurs="0" />
      <xs:element name="HasStartTimeChanged" type="xs:boolean" minOccurs="0" />
      <xs:element name="Start" type="xs:dateTime" minOccurs="0" />
      <xs:element name="HasEndTimeChanged" type="xs:boolean" minOccurs="0" />
      <xs:element name="End" type="xs:dateTime" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="MeetingRequestMessageType">
    <xs:complexContent>
      <xs:extension base="t:MeetingMessageType">
        <xs:sequence>
          <!--- MeetingRequest properties -->

          <xs:element name="MeetingRequestType" type="t:MeetingRequestTypeType" minOccurs="0" />
          <xs:element name="IntendedFreeBusyStatus" type="t:LegacyFreeBusyType" minOccurs="0" />

          <!-- Calendar Properties of the associated meeting request -->

          <!-- Single and Occurrence only -->

          <xs:element name="Start" type="xs:dateTime" minOccurs="0" />
          <xs:element name="End" type="xs:dateTime" minOccurs="0" />

          <!-- Occurrence only -->

          <xs:element name="OriginalStart" type="xs:dateTime" minOccurs="0" />

          <xs:element name="IsAllDayEvent" type="xs:boolean" minOccurs="0" />
          <xs:element name="LegacyFreeBusyStatus" type="t:LegacyFreeBusyType" minOccurs="0" />
          <xs:element name="Location" type="xs:string" minOccurs="0" />
          <xs:element name="When" type="xs:string" minOccurs="0" />
          <xs:element name="IsMeeting" type="xs:boolean" minOccurs="0" />
          <xs:element name="IsCancelled" type="xs:boolean" minOccurs="0" />
          <xs:element name="IsRecurring" type="xs:boolean" minOccurs="0" />
          <xs:element name="MeetingRequestWasSent" type="xs:boolean" minOccurs="0" />
          <xs:element name="CalendarItemType" type="t:CalendarItemTypeType" minOccurs="0" />
          <xs:element name="MyResponseType" type="t:ResponseTypeType" minOccurs="0" />
          <xs:element name="Organizer" type="t:SingleRecipientType" minOccurs="0" />
          <xs:element name="RequiredAttendees" type="t:NonEmptyArrayOfAttendeesType" minOccurs="0" />
          <xs:element name="OptionalAttendees" type="t:NonEmptyArrayOfAttendeesType" minOccurs="0" />
          <xs:element name="Resources" type="t:NonEmptyArrayOfAttendeesType" minOccurs="0" />

          <!-- Conflicting and adjacent meetings -->

          <xs:element name="ConflictingMeetingCount" type="xs:int" minOccurs="0" />
          <xs:element name="AdjacentMeetingCount" type="xs:int" minOccurs="0" />
          <xs:element name="ConflictingMeetings" type="t:NonEmptyArrayOfAllItemsType" minOccurs="0" />
          <xs:element name="AdjacentMeetings" type="t:NonEmptyArrayOfAllItemsType" minOccurs="0" />

          <xs:element name="Duration" type="xs:string" minOccurs="0" />
          <xs:element name="TimeZone" type="xs:string" minOccurs="0" />

          <xs:element name="AppointmentReplyTime" type="xs:dateTime" minOccurs="0" />
          <xs:element name="AppointmentSequenceNumber" type="xs:int" minOccurs="0" />
          <xs:element name="AppointmentState" type="xs:int" minOccurs="0" />

          <!-- Recurrence specific data, only valid if CalendarItemType is RecurringMaster -->

          <xs:element name="Recurrence" type="t:RecurrenceType" minOccurs="0" />
          <xs:element name="FirstOccurrence" type="t:OccurrenceInfoType" minOccurs="0" />
          <xs:element name="LastOccurrence" type="t:OccurrenceInfoType" minOccurs="0" />
          <xs:element name="ModifiedOccurrences" type="t:NonEmptyArrayOfOccurrenceInfoType" minOccurs="0" />
          <xs:element name="DeletedOccurrences" type="t:NonEmptyArrayOfDeletedOccurrencesType" minOccurs="0" />
          <xs:element name="MeetingTimeZone" type="t:TimeZoneType" minOccurs="0" />
          <xs:element name="StartTimeZone" type="t:TimeZoneDefinitionType" minOccurs="0" maxOccurs="1" />
          <xs:element name="EndTimeZone" type="t:TimeZoneDefinitionType" minOccurs="0" maxOccurs="1" />

          <xs:element name="ConferenceType" type="xs:int" minOccurs="0" />
          <xs:element name="AllowNewTimeProposal" type="xs:boolean" minOccurs="0" />
          <xs:element name="IsOnlineMeeting" type="xs:boolean" minOccurs="0" />
          <xs:element name="MeetingWorkspaceUrl" type="xs:string" minOccurs="0" />
          <xs:element name="NetShowUrl" type="xs:string" minOccurs="0" />
          <xs:element name="EnhancedLocation" type="t:EnhancedLocationType" minOccurs="0" />
          <xs:element name="ChangeHighlights" type="t:ChangeHighlightsType" minOccurs="0" />

          <xs:element name="StartWallClock" type="xs:dateTime" minOccurs="0" maxOccurs="1" />
          <xs:element name="EndWallClock" type="xs:dateTime" minOccurs="0" maxOccurs="1" />
          <xs:element name="StartTimeZoneId" type="xs:string" minOccurs="0" maxOccurs="1" />
          <xs:element name="EndTimeZoneId" type="xs:string" minOccurs="0" maxOccurs="1" />        
          <xs:element name="DoNotForwardMeeting" type="xs:boolean" minOccurs="0"/>        
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="MeetingResponseMessageType">
    <xs:complexContent>
      <xs:extension base="t:MeetingMessageType">
        <xs:sequence>
          <xs:element name="Start" type="xs:dateTime" minOccurs="0" />
          <xs:element name="End" type="xs:dateTime" minOccurs="0" />
          <xs:element name="Location" type="xs:string" minOccurs="0" />
          <xs:element name="Recurrence" type="t:RecurrenceType" minOccurs="0" />
          <xs:element name="CalendarItemType" type="xs:string" minOccurs="0" />
          <xs:element name="ProposedStart" type="xs:dateTime" minOccurs="0" />
          <xs:element name="ProposedEnd" type="xs:dateTime" minOccurs="0" />
          <xs:element name="EnhancedLocation" type="t:EnhancedLocationType" minOccurs="0" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="MeetingCancellationMessageType">
    <xs:complexContent>
      <xs:extension base="t:MeetingMessageType">
        <xs:sequence>
          <xs:element name="Start" type="xs:dateTime" minOccurs="0" />
          <xs:element name="End" type="xs:dateTime" minOccurs="0" />
          <xs:element name="Location" type="xs:string" minOccurs="0" />
          <xs:element name="Recurrence" type="t:RecurrenceType" minOccurs="0" />
          <xs:element name="CalendarItemType" type="xs:string" minOccurs="0" />
          <xs:element name="EnhancedLocation" type="t:EnhancedLocationType" minOccurs="0" />     
           <xs:element name="DoNotForwardMeeting" type="xs:boolean" minOccurs="0"/>         
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- End of CalendarItem Types -->

  <!-- Contacts Types -->

  <xs:simpleType name="RoleMemberTypeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None" />
      <xs:enumeration value="Passport" />
      <xs:enumeration value="Everyone" />
      <xs:enumeration value="Email" />
      <xs:enumeration value="Phone" />
      <xs:enumeration value="SkypeId" />
      <xs:enumeration value="ExternalId" />
      <xs:enumeration value="Group" />
      <xs:enumeration value="Guid" />
      <xs:enumeration value="Role" />
      <xs:enumeration value="Service" />
      <xs:enumeration value="Circle" />
      <xs:enumeration value="Domain" />
      <xs:enumeration value="Partner" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ImAddressKeyType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="ImAddress1" />
      <xs:enumeration value="ImAddress2" />
      <xs:enumeration value="ImAddress3" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="EmailAddressKeyType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="EmailAddress1" />
      <xs:enumeration value="EmailAddress2" />
      <xs:enumeration value="EmailAddress3" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="AbchEmailAddressTypeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Personal" />
      <xs:enumeration value="Business" />
      <xs:enumeration value="Other" />
      <xs:enumeration value="Passport" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ContactUrlKeyType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Personal" />
      <xs:enumeration value="Business" />
      <xs:enumeration value="Attachment" />
      <xs:enumeration value="EbcDisplayDefinition" />
      <xs:enumeration value="EbcFinalImage" />
      <xs:enumeration value="EbcLogo" />
      <xs:enumeration value="Feed" />
      <xs:enumeration value="Image" />
      <xs:enumeration value="InternalMarker" />
      <xs:enumeration value="Other" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="PhoneNumberKeyType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="AssistantPhone" />
      <xs:enumeration value="BusinessFax" />
      <xs:enumeration value="BusinessPhone" />
      <xs:enumeration value="BusinessPhone2" />
      <xs:enumeration value="Callback" />
      <xs:enumeration value="CarPhone" />
      <xs:enumeration value="CompanyMainPhone" />
      <xs:enumeration value="HomeFax" />
      <xs:enumeration value="HomePhone" />
      <xs:enumeration value="HomePhone2" />
      <xs:enumeration value="Isdn" />
      <xs:enumeration value="MobilePhone" />
      <xs:enumeration value="OtherFax" />
      <xs:enumeration value="OtherTelephone" />
      <xs:enumeration value="Pager" />
      <xs:enumeration value="PrimaryPhone" />
      <xs:enumeration value="RadioPhone" />
      <xs:enumeration value="Telex" />
      <xs:enumeration value="TtyTddPhone" />
      <xs:enumeration value="BusinessMobile" />
      <xs:enumeration value="IPPhone" />
      <xs:enumeration value="Mms" />
      <xs:enumeration value="Msn" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="PhysicalAddressIndexType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None" />
      <xs:enumeration value="Home" />
      <xs:enumeration value="Business" />
      <xs:enumeration value="Other" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="PhysicalAddressKeyType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Home" />
      <xs:enumeration value="Business" />
      <xs:enumeration value="Other" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="FileAsMappingType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None" />
      <xs:enumeration value="LastCommaFirst" />
      <xs:enumeration value="FirstSpaceLast" />
      <xs:enumeration value="Company" />
      <xs:enumeration value="LastCommaFirstCompany" />
      <xs:enumeration value="CompanyLastFirst" />
      <xs:enumeration value="LastFirst" />
      <xs:enumeration value="LastFirstCompany" />
      <xs:enumeration value="CompanyLastCommaFirst" />
      <xs:enumeration value="LastFirstSuffix" />
      <xs:enumeration value="LastSpaceFirstCompany" />
      <xs:enumeration value="CompanyLastSpaceFirst" />
      <xs:enumeration value="LastSpaceFirst" />
      <xs:enumeration value="DisplayName" />
      <xs:enumeration value="FirstName" />
      <xs:enumeration value="LastFirstMiddleSuffix" />
      <xs:enumeration value="LastName" />
      <xs:enumeration value="Empty" />
    </xs:restriction>
  </xs:simpleType>

  <!-- Contact source -->

  <xs:simpleType name="ContactSourceType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="ActiveDirectory" />
      <xs:enumeration value="Store" />
    </xs:restriction>
  </xs:simpleType>

  <!-- complete name for a contact -->

  <xs:complexType name="CompleteNameType">
    <xs:sequence>
      <xs:element name="Title" type="xs:string" minOccurs="0" />
      <xs:element name="FirstName" type="xs:string" minOccurs="0" />
      <xs:element name="MiddleName" type="xs:string" minOccurs="0" />
      <xs:element name="LastName" type="xs:string" minOccurs="0" />
      <xs:element name="Suffix" type="xs:string" minOccurs="0" />
      <xs:element name="Initials" type="xs:string" minOccurs="0" />
      <xs:element name="FullName" type="xs:string" minOccurs="0" />
      <xs:element name="Nickname" type="xs:string" minOccurs="0" />
      <xs:element name="YomiFirstName" type="xs:string" minOccurs="0" />
      <xs:element name="YomiLastName" type="xs:string" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <!-- Dictionary types for items -->

  <xs:complexType name="ImAddressDictionaryEntryType">
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute name="Key" type="t:ImAddressKeyType" use="required" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>


  <xs:complexType name="ContactUrlDictionaryEntryType">
    <xs:sequence>
      <xs:element name="Type" type="t:ContactUrlKeyType" minOccurs="1" />
      <xs:element name="Name" type="xs:string" minOccurs="0" />
      <xs:element name="Address" type="xs:string" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AbchEmailAddressDictionaryEntryType">
    <xs:sequence>
      <xs:element name="Type" type="t:AbchEmailAddressTypeType" minOccurs="1" />
      <xs:element name="Address" type="xs:string" minOccurs="1" />
      <xs:element name="IsMessengerEnabled" type="xs:boolean" minOccurs="0" />
      <xs:element name="Capabilities" type="xs:long" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="EmailAddressDictionaryEntryType">
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute name="Key" type="t:EmailAddressKeyType" use="required" />
        <xs:attribute name="Name" type="xs:string" use="optional" />
        <xs:attribute name="RoutingType" type="xs:string" use="optional" />
        <xs:attribute name="MailboxType" type="t:MailboxTypeType" use="optional" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="PhoneNumberDictionaryEntryType">
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute name="Key" type="t:PhoneNumberKeyType" use="required" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="PhysicalAddressDictionaryEntryType">
    <xs:sequence>
      <xs:element name="Street" type="xs:string" minOccurs="0" />
      <xs:element name="City" type="xs:string" minOccurs="0" />
      <xs:element name="State" type="xs:string" minOccurs="0" />
      <xs:element name="CountryOrRegion" type="xs:string" minOccurs="0" />
      <xs:element name="PostalCode" type="xs:string" minOccurs="0" />
    </xs:sequence>
    <xs:attribute name="Key" type="t:PhysicalAddressKeyType" use="required" />
  </xs:complexType>

  <!-- The actual dictionaries -->

  <xs:complexType name="ContactUrlDictionaryType">
    <xs:sequence>
      <xs:element name="Url" type="t:ContactUrlDictionaryEntryType" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AbchEmailAddressDictionaryType">
    <xs:sequence>
      <xs:element name="Email" type="t:AbchEmailAddressDictionaryEntryType" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ImAddressDictionaryType">
    <xs:sequence>
      <xs:element name="Entry" type="t:ImAddressDictionaryEntryType" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="EmailAddressDictionaryType">
    <xs:sequence>
      <xs:element name="Entry" type="t:EmailAddressDictionaryEntryType" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PhoneNumberDictionaryType">
    <xs:sequence>
      <xs:element name="Entry" type="t:PhoneNumberDictionaryEntryType" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PhysicalAddressDictionaryType">
    <xs:sequence>
      <xs:element name="Entry" type="t:PhysicalAddressDictionaryEntryType" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="MemberStatusType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Unrecognized" />
      <xs:enumeration value="Normal" />
      <xs:enumeration value="Demoted" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="MembersListType">
    <xs:sequence>
      <xs:element name="Member" type="t:MemberType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="MemberType">
    <xs:sequence>
      <xs:element name="Mailbox" type="t:EmailAddressType" minOccurs="0" />
      <xs:element name="Status" type="t:MemberStatusType" minOccurs="0" />
    </xs:sequence>
    <xs:attribute name="Key" type="xs:string" use="optional" />
  </xs:complexType>

  <xs:complexType name="RoleMemberItemType">
    <xs:complexContent>
      <xs:extension base="t:ItemType">
        <xs:sequence>
          <xs:element name="DisplayName" type="xs:string" minOccurs="0" />
          <xs:element name="Type" type="t:RoleMemberTypeType" minOccurs="0" />
          <xs:element name="MemberId" type="xs:string" minOccurs="0" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="NetworkItemType">
    <xs:complexContent>
      <xs:extension base="t:ItemType">
        <xs:sequence>
          <xs:element name="DomainId" type="xs:int" minOccurs="0" />
          <xs:element name="DomainTag" type="xs:string" minOccurs="0" />
          <xs:element name="UserTileUrl" type="xs:string" minOccurs="0" />
          <xs:element name="ProfileUrl" type="xs:string" minOccurs="0" />
          <xs:element name="Settings" type="xs:int" minOccurs="0" />
          <xs:element name="IsDefault" type="xs:boolean" minOccurs="0" />
          <xs:element name="AutoLinkError" type="xs:string" minOccurs="0" />
          <xs:element name="AutoLinkSuccess" type="xs:string" minOccurs="0" />
          <xs:element name="UserEmail" type="xs:string" minOccurs="0" />
          <xs:element name="ClientPublishSecret" type="xs:string" minOccurs="0" />
          <xs:element name="ClientToken" type="xs:string" minOccurs="0" />
          <xs:element name="ClientToken2" type="xs:string" minOccurs="0" />
          <xs:element name="ContactSyncError" type="xs:string" minOccurs="0" />
          <xs:element name="ContactSyncSuccess" type="xs:string" minOccurs="0" />
          <xs:element name="ErrorOffers" type="xs:int" minOccurs="0" />
          <xs:element name="FirstAuthErrorDates" type="xs:string" minOccurs="0" />
          <xs:element name="LastVersionSaved" type="xs:int" minOccurs="0" />
          <xs:element name="LastWelcomeContact" type="xs:string" minOccurs="0" />
          <xs:element name="Offers" type="xs:int" minOccurs="0" />
          <xs:element name="PsaLastChanged" type="xs:dateTime" minOccurs="0" />
          <xs:element name="RefreshToken2" type="xs:string" minOccurs="0" />
          <xs:element name="RefreshTokenExpiry2" type="xs:string" minOccurs="0" />
          <xs:element name="SessionHandle" type="xs:string" minOccurs="0" />
          <xs:element name="RejectedOffers" type="xs:int" minOccurs="0" />
          <xs:element name="SyncEnabled" type="xs:boolean" minOccurs="0" />
          <xs:element name="TokenRefreshLastAttempted" type="xs:dateTime" minOccurs="0" />
          <xs:element name="TokenRefreshLastCompleted" type="xs:dateTime" minOccurs="0" />
          <xs:element name="PsaState" type="xs:string" minOccurs="0" />
          <xs:element name="SourceEntryID" type="xs:base64Binary" minOccurs="0" />
          <xs:element name="AccountName" type="xs:string" minOccurs="0" />
          <xs:element name="LastSync" type="xs:dateTime" minOccurs="0" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="AbchPersonItemType">
    <xs:complexContent>
      <xs:extension base="t:ItemType">
        <xs:sequence>
          <xs:element name="AntiLinkInfo" type="xs:string" minOccurs="0" />
          <xs:element name="PersonId" type="t:GuidType" minOccurs="0" />
          <xs:element name="ContactHandles" type="t:ArrayOfAbchPersonContactHandlesType" minOccurs="0" />
          <xs:element name="ContactCategories" type="t:ArrayOfStringsType" minOccurs="0" />
          <xs:element name="RelevanceOrder1" type="xs:string" minOccurs="0" />
          <xs:element name="RelevanceOrder2" type="xs:string" minOccurs="0" />
          <xs:element name="TrustLevel" type="xs:int" minOccurs="0" />
          <xs:element name="FavoriteOrder" type="xs:int" minOccurs="0" />
          <xs:element name="ExchangePersonIdGuid" type="t:GuidType" minOccurs="0" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ArrayOfAbchPersonContactHandlesType">
    <xs:sequence>
      <xs:element name="ContactHandle" type="t:AbchPersonContactHandle" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AbchPersonContactHandle">
    <xs:sequence>
      <xs:element name="SourceId" type="xs:string" minOccurs="1" maxOccurs="1" />
      <xs:element name="ObjectId" type="xs:string" minOccurs="1" maxOccurs="1" />
      <xs:element name="AccountName" type="xs:string" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfGuidType">
    <xs:sequence>
      <xs:element name="Guid" type="t:GuidType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <!-- ContactItemType -->

  <xs:complexType name="ContactItemType">
    <xs:complexContent>
      <xs:extension base="t:ItemType">
        <xs:sequence>
          <xs:element name="FileAs" type="xs:string" minOccurs="0" />
          <xs:element name="FileAsMapping" type="t:FileAsMappingType" minOccurs="0" />
          <xs:element name="DisplayName" type="xs:string" minOccurs="0" />
          <xs:element name="GivenName" type="xs:string" minOccurs="0" />
          <xs:element name="Initials" type="xs:string" minOccurs="0" />
          <xs:element name="MiddleName" type="xs:string" minOccurs="0" />
          <xs:element name="Nickname" type="xs:string" minOccurs="0" />
          <xs:element name="CompleteName" type="t:CompleteNameType" minOccurs="0" />
          <xs:element name="CompanyName" type="xs:string" minOccurs="0" />
          <xs:element name="EmailAddresses" type="t:EmailAddressDictionaryType" minOccurs="0" />
          <xs:element name="AbchEmailAddresses" type="t:AbchEmailAddressDictionaryType" minOccurs="0" />
          <xs:element name="PhysicalAddresses" type="t:PhysicalAddressDictionaryType" minOccurs="0" />
          <xs:element name="PhoneNumbers" type="t:PhoneNumberDictionaryType" minOccurs="0" />
          <xs:element name="AssistantName" type="xs:string" minOccurs="0" />
          <xs:element name="Birthday" type="xs:dateTime" minOccurs="0" />
          <xs:element name="BusinessHomePage" type="xs:anyURI" minOccurs="0" />
          <xs:element name="Children" type="t:ArrayOfStringsType" minOccurs="0" />
          <xs:element name="Companies" type="t:ArrayOfStringsType" minOccurs="0" />
          <xs:element name="ContactSource" type="t:ContactSourceType" minOccurs="0" />
          <xs:element name="Department" type="xs:string" minOccurs="0" />
          <xs:element name="Generation" type="xs:string" minOccurs="0" />
          <xs:element name="ImAddresses" type="t:ImAddressDictionaryType" minOccurs="0" />
          <xs:element name="JobTitle" type="xs:string" minOccurs="0" />
          <xs:element name="Manager" type="xs:string" minOccurs="0" />
          <xs:element name="Mileage" type="xs:string" minOccurs="0" />
          <xs:element name="OfficeLocation" type="xs:string" minOccurs="0" />
          <xs:element name="PostalAddressIndex" type="t:PhysicalAddressIndexType" minOccurs="0" />
          <xs:element name="Profession" type="xs:string" minOccurs="0" />
          <xs:element name="SpouseName" type="xs:string" minOccurs="0" />
          <xs:element name="Surname" type="xs:string" minOccurs="0" />
          <xs:element name="WeddingAnniversary" type="xs:dateTime" minOccurs="0" />
          <xs:element name="HasPicture" type="xs:boolean" minOccurs="0" />
          <xs:element name="PhoneticFullName" type="xs:string" minOccurs="0" />
          <xs:element name="PhoneticFirstName" type="xs:string" minOccurs="0" />
          <xs:element name="PhoneticLastName" type="xs:string" minOccurs="0" />
          <xs:element name="Alias" type="xs:string" minOccurs="0" />
          <xs:element name="Notes" type="xs:string" minOccurs="0" />
          <xs:element name="Photo" type="xs:base64Binary" minOccurs="0" />
          <xs:element name="UserSMIMECertificate" type="t:ArrayOfBinaryType" minOccurs="0" />
          <xs:element name="MSExchangeCertificate" type="t:ArrayOfBinaryType" minOccurs="0" />
          <xs:element name="DirectoryId" type="xs:string" minOccurs="0" />
          <xs:element name="ManagerMailbox" type="t:SingleRecipientType" minOccurs="0" />
          <xs:element name="DirectReports" type="t:ArrayOfRecipientsType" minOccurs="0" />
          <xs:element name="AccountName" type="xs:string" minOccurs="0" />
          <xs:element name="IsAutoUpdateDisabled" type="xs:boolean" minOccurs="0" />
          <xs:element name="IsMessengerEnabled" type="xs:boolean" minOccurs="0" />
          <xs:element name="Comment" type="xs:string" minOccurs="0" />
          <xs:element name="ContactShortId" type="xs:int" minOccurs="0" />
          <xs:element name="ContactType" type="xs:string" minOccurs="0" />
          <xs:element name="Gender" type="xs:string" minOccurs="0" />
          <xs:element name="IsHidden" type="xs:boolean" minOccurs="0" />
          <xs:element name="ObjectId" type="xs:string" minOccurs="0" />
          <xs:element name="PassportId" type="xs:long" minOccurs="0" />
          <xs:element name="IsPrivate" type="xs:boolean" minOccurs="0" />
          <xs:element name="SourceId" type="xs:string" minOccurs="0" />
          <xs:element name="TrustLevel" type="xs:int" minOccurs="0" />
          <xs:element name="CreatedBy" type="xs:string" minOccurs="0" />
          <xs:element name="Urls" type="t:ContactUrlDictionaryType" minOccurs="0" />
          <xs:element name="Cid" type="xs:long" minOccurs="0" />
          <xs:element name="SkypeAuthCertificate" type="xs:string" minOccurs="0" />
          <xs:element name="SkypeContext" type="xs:string" minOccurs="0" />
          <xs:element name="SkypeId" type="xs:string" minOccurs="0" />
          <xs:element name="SkypeRelationship" type="xs:string" minOccurs="0" />
          <xs:element name="YomiNickname" type="xs:string" minOccurs="0" />
          <xs:element name="XboxLiveTag" type="xs:string" minOccurs="0" />
          <xs:element name="InviteFree" type="xs:boolean" minOccurs="0" />
          <xs:element name="HidePresenceAndProfile" type="xs:boolean" minOccurs="0" />
          <xs:element name="IsPendingOutbound" type="xs:boolean" minOccurs="0" />
          <xs:element name="SupportGroupFeeds" type="xs:boolean" minOccurs="0" />
          <xs:element name="UserTileHash" type="xs:string" minOccurs="0" />
          <xs:element name="UnifiedInbox" type="xs:boolean" minOccurs="0" />
          <xs:element name="Mris" type="t:ArrayOfStringsType" minOccurs="0" />
          <xs:element name="Wlid" type="xs:string" minOccurs="0" />
          <xs:element name="AbchContactId" type="t:GuidType" minOccurs="0" />
          <xs:element name="NotInBirthdayCalendar" type="xs:boolean" minOccurs="0" />
          <xs:element name="ShellContactType" type="xs:string" minOccurs="0" />
          <xs:element name="ImMri" type="xs:string" minOccurs="0" />
          <xs:element name="PresenceTrustLevel" type="xs:int" minOccurs="0" />
          <xs:element name="OtherMri" type="xs:string" minOccurs="0" />
          <xs:element name="ProfileLastChanged" type="xs:string" minOccurs="0" />
          <xs:element name="MobileIMEnabled" type="xs:boolean" minOccurs="0" />
          <xs:element name="PartnerNetworkProfilePhotoUrl" type="xs:string" minOccurs="0" />
          <xs:element name="PartnerNetworkThumbnailPhotoUrl" type="xs:string" minOccurs="0" />
          <xs:element name="PersonId" type="xs:string" minOccurs="0" />
          <xs:element name="ConversationGuid" type="t:GuidType" minOccurs="0" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ArrayOfBinaryType">
    <xs:sequence>
      <xs:element name="Base64Binary" type="xs:base64Binary" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <!-- ContactItemType -->

  <xs:complexType name="DistributionListType">
    <xs:complexContent>
      <xs:extension base="t:ItemType">
        <xs:sequence>
          <xs:element name="DisplayName" type="xs:string" minOccurs="0" />
          <xs:element name="FileAs" type="xs:string" minOccurs="0" />
          <xs:element name="ContactSource" type="t:ContactSourceType" minOccurs="0" />

          <xs:element name="Members" type="t:MembersListType" minOccurs="0" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- End of Contacts Types-->

  <!-- Description of a search folder -->

  <xs:complexType name="SearchParametersType">
    <xs:sequence>
      <xs:element name="Restriction" type="t:RestrictionType" />
      <xs:element name="BaseFolderIds" type="t:NonEmptyArrayOfBaseFolderIdsType" />
    </xs:sequence>
    <xs:attribute name="Traversal" type="t:SearchFolderTraversalType" use="optional"/>
  </xs:complexType>

  <!-- Search expressions -->
  <xs:complexType name="ConstantValueType">
    <xs:attribute name="Value" type="xs:string" use="required" />
  </xs:complexType>

  <!-- Search expression type -->
  <xs:complexType name="SearchExpressionType" abstract="true" />
  <xs:element name="SearchExpression" type="t:SearchExpressionType" />

  <!-- GroupBy types for FindItem -->
  <xs:simpleType name="AggregateType">
    <xs:annotation>
      <xs:documentation>
        This max/min evaluation is applied to the field specified within the group by
        instance for EACH item within that group.  This determines which item from each group
        is to be selected as the representative for that group.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="Minimum"/>
      <xs:enumeration value="Maximum"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="AggregateOnType">
    <xs:annotation>
      <xs:documentation>
        Represents the field of each item to aggregate on and the qualifier to apply to that
        field in determining which item will represent the group.
      </xs:documentation>
    </xs:annotation>
    <xs:choice>
      <!-- Note that the property path here determines which property to examine on each item
            in the group for the aggregation function.  This has nothing to do with defintion what
            is in each group.  That determination has already been made via the GroupBy property path.
            -->
      <xs:element name="FieldURI" type="t:PathToUnindexedFieldType"/>
      <xs:element name="IndexedFieldURI" type="t:PathToIndexedFieldType"/>
      <xs:element name="ExtendedFieldURI" type="t:PathToExtendedFieldType"/>
    </xs:choice>
    <xs:attribute name="Aggregate" type="t:AggregateType" use="required"/>
  </xs:complexType>

  <xs:complexType name="BaseGroupByType" abstract ="true">
    <xs:attribute name="Order" type="t:SortDirectionType" use="required"/>
  </xs:complexType>

  <xs:complexType name="GroupByType">
    <xs:annotation>
      <xs:documentation>
        Allows consumers to specify arbitrary groupings for FindItem queries.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="t:BaseGroupByType">
        <xs:sequence>
          <!-- This property path represents the property that defines what is in each group.
                    All items within a given group will have the same value for this property. -->
          <xs:choice>
            <xs:element name="FieldURI" type="t:PathToUnindexedFieldType"/>
            <xs:element name="IndexedFieldURI" type="t:PathToIndexedFieldType"/>
            <xs:element name="ExtendedFieldURI" type="t:PathToExtendedFieldType"/>
          </xs:choice>
          <xs:element name="AggregateOn" type="t:AggregateOnType"/>
          <xs:element name="UseCollapsibleGroups" type="xs:boolean" minOccurs="0"/>
          <xs:element name="ItemsPerGroup" type="xs:nonNegativeInteger" minOccurs="0" />
          <xs:element name="MaxItemsPerGroup" type="xs:nonNegativeInteger" minOccurs="0" />
          <xs:element name="GroupsToExpand" type="t:ArrayOfGroupIdType" minOccurs="0" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:simpleType name="StandardGroupByType">
    <xs:annotation>
      <xs:documentation>
        Represents standard groupings for GroupBy queries.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="ConversationTopic"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="DistinguishedGroupByType">
    <xs:annotation>
      <xs:documentation>
        Allows consumers to access standard groupings for FindItem queries.  This is in
        contrast to the arbitrary (custom) groupings available via the t:GroupByType
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="t:BaseGroupByType">
        <xs:sequence>
          <xs:element name="StandardGroupBy" type="t:StandardGroupByType"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ArrayOfGroupIdType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="GroupId" type="xs:base64Binary"/>
    </xs:choice>
  </xs:complexType>

  <!-- GroupBy result types -->

  <xs:complexType name="GroupedItemsType">
    <xs:sequence>
      <xs:element name="GroupIndex" type="xs:string"/>
      <xs:element name="Items" type="t:ArrayOfRealItemsType"/>
      <xs:element name="GroupSummary" type="t:GroupSummaryType" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfGroupedItemsType">
    <xs:choice>
      <xs:element name="GroupedItems" type="t:GroupedItemsType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="GroupSummaryType">
    <xs:sequence>
      <xs:element name="GroupCount" type="xs:int" />
      <xs:element name="UnreadCount" type="xs:int" />
      <xs:element name="InstanceKey" type="xs:base64Binary" />
      <xs:element name="GroupByValue" type="xs:string" />
    </xs:sequence>
  </xs:complexType>

  <!-- Basic arithmetic operations -->

  <xs:complexType name="ExistsType">
    <xs:complexContent>
      <xs:extension base="t:SearchExpressionType">
        <xs:sequence>
          <xs:element ref="t:Path"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Exists" type="t:ExistsType" substitutionGroup="t:SearchExpression"/>

  <xs:complexType name="FieldURIOrConstantType">
    <xs:choice>
      <xs:element ref="t:Path"/>
      <xs:element name="Constant" type="t:ConstantValueType" />
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="TwoOperandExpressionType" abstract="true">
    <xs:complexContent>
      <xs:extension base="t:SearchExpressionType">
        <xs:sequence>
          <xs:element ref="t:Path"/>
          <xs:element name="FieldURIOrConstant" type="t:FieldURIOrConstantType"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- Excludes patterns can either be hex (starting with 0x or 0X) or integers -->
  <xs:simpleType name="ExcludesAttributeType">
    <xs:restriction base="xs:string">
      <xs:pattern value="((0x|0X)[0-9A-Fa-f]*)|([0-9]*)"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="ExcludesValueType">
    <xs:attribute name="Value" type="t:ExcludesAttributeType" use="required" />
  </xs:complexType>

  <xs:complexType name="ExcludesType">
    <xs:complexContent>
      <xs:extension base="t:SearchExpressionType">
        <xs:sequence>
          <xs:element ref="t:Path"/>
          <xs:element name="Bitmask" type="t:ExcludesValueType" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Excludes" type="t:ExcludesType" substitutionGroup ="t:SearchExpression"/>


  <xs:complexType name="IsEqualToType">
    <xs:complexContent>
      <xs:extension base="t:TwoOperandExpressionType"/>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="IsEqualTo" type="t:IsEqualToType" substitutionGroup ="t:SearchExpression"/>
  <xs:complexType name="IsNotEqualToType">
    <xs:complexContent>
      <xs:extension base="t:TwoOperandExpressionType"/>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="IsNotEqualTo" type="t:IsNotEqualToType" substitutionGroup="t:SearchExpression"/>
  <xs:complexType name="IsGreaterThanType">
    <xs:complexContent>
      <xs:extension base="t:TwoOperandExpressionType"/>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="IsGreaterThan" type="t:IsGreaterThanType" substitutionGroup ="t:SearchExpression"/>
  <xs:complexType name="IsGreaterThanOrEqualToType">
    <xs:complexContent>
      <xs:extension base="t:TwoOperandExpressionType"/>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="IsGreaterThanOrEqualTo" type="t:IsGreaterThanOrEqualToType" substitutionGroup ="t:SearchExpression"/>
  <xs:complexType name="IsLessThanType">
    <xs:complexContent>
      <xs:extension base="t:TwoOperandExpressionType"/>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="IsLessThan" type="t:IsLessThanType" substitutionGroup ="t:SearchExpression"/>
  <xs:complexType name="IsLessThanOrEqualToType">
    <xs:complexContent>
      <xs:extension base="t:TwoOperandExpressionType"/>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="IsLessThanOrEqualTo" type="t:IsLessThanOrEqualToType" substitutionGroup ="t:SearchExpression"/>


  <!-- Content indexing comparison -->
  <xs:simpleType name="ContainmentModeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="FullString" />
      <xs:enumeration value="Prefixed" />
      <xs:enumeration value="Substring" />
      <xs:enumeration value="PrefixOnWords" />
      <xs:enumeration value="ExactPhrase" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="ContainmentComparisonType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Exact" />
      <xs:enumeration value="IgnoreCase" />
      <xs:enumeration value="IgnoreNonSpacingCharacters" />
      <xs:enumeration value="Loose"/>
      <xs:enumeration value="IgnoreCaseAndNonSpacingCharacters" />
      <xs:enumeration value="LooseAndIgnoreCase"/>
      <xs:enumeration value="LooseAndIgnoreNonSpace"/>
      <xs:enumeration value="LooseAndIgnoreCaseAndIgnoreNonSpace"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="ContainsExpressionType">
    <xs:complexContent>
      <xs:extension base="t:SearchExpressionType">
        <xs:sequence>
          <xs:element ref="t:Path"/>
          <xs:element name="Constant" type="t:ConstantValueType" />
        </xs:sequence>
        <xs:attribute name="ContainmentMode" type="t:ContainmentModeType" use="optional" />
        <xs:attribute name="ContainmentComparison" type="t:ContainmentComparisonType" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Contains" type="t:ContainsExpressionType" substitutionGroup="t:SearchExpression"/>

  <!-- Boolean operations -->
  <xs:complexType name="NotType">
    <xs:complexContent>
      <xs:extension base="t:SearchExpressionType">
        <xs:sequence>
          <xs:element ref="t:SearchExpression"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Not" type="t:NotType" substitutionGroup="t:SearchExpression"/>

  <xs:complexType name="MultipleOperandBooleanExpressionType" abstract="true">
    <xs:complexContent>
      <xs:extension base="t:SearchExpressionType">
        <xs:sequence>
          <xs:element ref="t:SearchExpression" minOccurs="1" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="AndType">
    <xs:complexContent>
      <xs:extension base="t:MultipleOperandBooleanExpressionType"/>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="And" type="t:AndType" substitutionGroup="t:SearchExpression"/>

  <xs:complexType name="OrType">
    <xs:complexContent>
      <xs:extension base="t:MultipleOperandBooleanExpressionType"/>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Or" type="t:OrType" substitutionGroup="t:SearchExpression"/>

  <xs:complexType name="NearType">
    <xs:complexContent>
      <xs:extension base="t:MultipleOperandBooleanExpressionType">
        <xs:sequence>
          <xs:element name="Distance" type="xs:unsignedInt" />
          <xs:element name="Ordered" type="xs:boolean" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Near" type="t:NearType" substitutionGroup="t:SearchExpression"/>

  <!-- The type of object which actually encodes a restriction -->
  <xs:complexType name="RestrictionType">
    <xs:sequence>
      <xs:element ref="t:SearchExpression"/>
    </xs:sequence>
  </xs:complexType>
  <!-- Sort order specification -->
  <xs:simpleType name="SortDirectionType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Ascending" />
      <xs:enumeration value="Descending" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="FieldOrderType">
    <xs:sequence>
      <xs:element ref="t:Path"/>
    </xs:sequence>
    <xs:attribute name="Order" type="t:SortDirectionType" use="required" />
  </xs:complexType>

  <xs:complexType name="NonEmptyArrayOfFieldOrdersType">
    <xs:sequence>
      <xs:element name="FieldOrder" type="t:FieldOrderType" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <!-- Data type needed by CreateManagedFolder. -->
  <xs:complexType name="NonEmptyArrayOfFolderNamesType">
    <xs:sequence>
      <xs:element name="FolderName" type="xs:string" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <!-- Notification types -->

  <xs:simpleType name="WatermarkType">
    <xs:restriction base="t:NonEmptyStringType"/>
  </xs:simpleType>

  <xs:simpleType name="SubscriptionIdType">
    <xs:restriction base="t:NonEmptyStringType"/>
  </xs:simpleType>

  <xs:complexType name="BaseNotificationEventType">
    <xs:sequence>
      <xs:element name="Watermark" type="t:WatermarkType" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="BaseObjectChangedEventType">
    <xs:complexContent>
      <xs:extension base="t:BaseNotificationEventType">
        <xs:sequence>
          <xs:element name="TimeStamp" type="xs:dateTime" />
          <xs:choice>
            <xs:element name="FolderId" type="t:FolderIdType" />
            <xs:element name="ItemId" type="t:ItemIdType"/>
          </xs:choice>
          <xs:element name="ParentFolderId" type="t:FolderIdType" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ModifiedEventType">
    <xs:complexContent>
      <xs:extension base="t:BaseObjectChangedEventType">
        <xs:sequence>
          <xs:element name="UnreadCount" type="xs:int" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="MovedCopiedEventType">
    <xs:complexContent>
      <xs:extension base="t:BaseObjectChangedEventType">
        <xs:sequence>
          <xs:choice>
            <xs:element name="OldFolderId" type="t:FolderIdType" />
            <xs:element name="OldItemId" type="t:ItemIdType"/>
          </xs:choice>
          <xs:element name="OldParentFolderId" type="t:FolderIdType" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="NotificationType">
    <xs:sequence>
      <xs:element name="SubscriptionId" type="t:SubscriptionIdType" />
      <xs:element name="PreviousWatermark" type="t:WatermarkType" minOccurs="0" />
      <xs:element name="MoreEvents" type="xs:boolean" minOccurs="0" />
      <xs:choice maxOccurs="unbounded" minOccurs="1">
        <xs:element name="CopiedEvent" type="t:MovedCopiedEventType"/>
        <xs:element name="CreatedEvent" type="t:BaseObjectChangedEventType"/>
        <xs:element name="DeletedEvent" type="t:BaseObjectChangedEventType"/>
        <xs:element name="ModifiedEvent" type="t:ModifiedEventType"/>
        <xs:element name="MovedEvent" type="t:MovedCopiedEventType"/>
        <xs:element name="NewMailEvent" type="t:BaseObjectChangedEventType"/>
        <xs:element name="StatusEvent" type="t:BaseNotificationEventType"/>
        <xs:element name="FreeBusyChangedEvent" type="t:BaseObjectChangedEventType"/>
      </xs:choice>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="NotificationEventTypeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="CopiedEvent" />
      <xs:enumeration value="CreatedEvent" />
      <xs:enumeration value="DeletedEvent" />
      <xs:enumeration value="ModifiedEvent" />
      <xs:enumeration value="MovedEvent" />
      <xs:enumeration value="NewMailEvent" />
      <xs:enumeration value="FreeBusyChangedEvent" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="NonEmptyArrayOfNotificationEventTypesType">
    <xs:choice maxOccurs="unbounded" minOccurs="1">
      <xs:element name="EventType" type="t:NotificationEventTypeType"/>
    </xs:choice>
  </xs:complexType>

  <xs:simpleType name="SubscriptionTimeoutType">
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1" />
      <xs:maxInclusive value="1440" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="SubscriptionStatusFrequencyType">
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1" />
      <xs:maxInclusive value="1440" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="BaseSubscriptionRequestType" abstract="true">
    <xs:sequence>
      <xs:element name="FolderIds" type="t:NonEmptyArrayOfBaseFolderIdsType" minOccurs="0"/>
      <xs:element name="EventTypes" type="t:NonEmptyArrayOfNotificationEventTypesType"/>
      <xs:element name="Watermark" type="t:WatermarkType" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute name="SubscribeToAllFolders" type="xs:boolean" use="optional"/>
  </xs:complexType>
  <xs:complexType name="PushSubscriptionRequestType">
    <xs:complexContent>
      <xs:extension base="t:BaseSubscriptionRequestType">
        <xs:sequence>
          <xs:element name="StatusFrequency" type="t:SubscriptionStatusFrequencyType"/>
          <xs:element name="URL" type="xs:string"/>
          <xs:element name="CallerData" type="xs:string" minOccurs ="0" maxOccurs ="1" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PullSubscriptionRequestType">
    <xs:complexContent>
      <xs:extension base="t:BaseSubscriptionRequestType">
        <xs:sequence>
          <xs:element name="Timeout" type="t:SubscriptionTimeoutType"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="StreamingSubscriptionRequestType">
    <xs:sequence>
      <xs:element name="FolderIds"
                  type="t:NonEmptyArrayOfBaseFolderIdsType" minOccurs="0"/>
      <xs:element name="EventTypes" type="t:NonEmptyArrayOfNotificationEventTypesType"/>
    </xs:sequence>
    <xs:attribute name="SubscribeToAllFolders" type="xs:boolean" use="optional"/>
  </xs:complexType>

  <xs:simpleType name="SubscriptionStatusType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="OK" />
      <xs:enumeration value="Unsubscribe" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="NonEmptyArrayOfSubscriptionIdsType">
    <xs:sequence>
      <xs:element name="SubscriptionId" type="t:SubscriptionIdType" minOccurs="1"
                  maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="NonEmptyArrayOfNotificationsType">
    <xs:sequence>
      <xs:element name="Notification" type="t:NotificationType" minOccurs="0"
                  maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="StreamingSubscriptionConnectionTimeoutType">
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1" />
      <xs:maxInclusive value="30" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ConnectionStatusType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="OK" />
      <xs:enumeration value="Closed" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="UnifiedGroupAccessType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None" />
      <xs:enumeration value="Private" />
      <xs:enumeration value="Secret" />
      <xs:enumeration value="Public" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="SyncFolderItemsDeleteType">
    <xs:sequence>
      <xs:element name="ItemId" type="t:ItemIdType"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SyncFolderItemsReadFlagType">
    <xs:sequence>
      <xs:element name="ItemId" type="t:ItemIdType"/>
      <xs:element name="IsRead" type="xs:boolean"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SyncFolderItemsChangesType">
    <xs:sequence>
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element name="Create" type="t:SyncFolderItemsCreateOrUpdateType"/>
        <xs:element name="Update" type="t:SyncFolderItemsCreateOrUpdateType"/>
        <xs:element name="Delete" type="t:SyncFolderItemsDeleteType"/>
        <xs:element name="ReadFlagChange" type="t:SyncFolderItemsReadFlagType"/>
      </xs:choice>
    </xs:sequence>
  </xs:complexType>


  <xs:complexType name="SyncFolderHierarchyCreateOrUpdateType">
    <xs:choice>
      <xs:element name="Folder" type="t:FolderType"/>
      <xs:element name="CalendarFolder" type="t:CalendarFolderType"/>
      <xs:element name="ContactsFolder" type="t:ContactsFolderType"/>
      <xs:element name="SearchFolder" type="t:SearchFolderType"/>
      <xs:element name="TasksFolder" type="t:TasksFolderType"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="SyncFolderHierarchyDeleteType">
    <xs:sequence>
      <xs:element name="FolderId" type="t:FolderIdType"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SyncFolderHierarchyChangesType">
    <xs:sequence>
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element name="Create" type="t:SyncFolderHierarchyCreateOrUpdateType"/>
        <xs:element name="Update" type="t:SyncFolderHierarchyCreateOrUpdateType"/>
        <xs:element name="Delete" type="t:SyncFolderHierarchyDeleteType"/>
      </xs:choice>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="MaxSyncChangesReturnedType">
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1" />
      <xs:maxInclusive value="512" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="SyncFolderItemsScopeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="NormalItems" />
      <xs:enumeration value="NormalAndAssociatedItems" />
    </xs:restriction>
  </xs:simpleType>

  <!-- Availability Service types -->

  <xs:simpleType name="AvailabilityProxyRequestType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="CrossSite" />
      <xs:enumeration value="CrossForest" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="RequestTypeHeader">
    <xs:sequence>
      <xs:element name="RequestType" type="t:AvailabilityProxyRequestType" minOccurs ="1" maxOccurs ="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="MeetingAttendeeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Organizer"/>
      <xs:enumeration value="Required"/>
      <xs:enumeration value="Optional"/>
      <xs:enumeration value="Room"/>
      <xs:enumeration value="Resource"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="CalendarEventDetails">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="ID" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="Subject" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="Location" type="xs:string" />
      <xs:element minOccurs="1" maxOccurs="1" name="IsMeeting" type="xs:boolean" />
      <xs:element minOccurs="1" maxOccurs="1" name="IsRecurring" type="xs:boolean" />
      <xs:element minOccurs="1" maxOccurs="1" name="IsException" type="xs:boolean" />
      <xs:element minOccurs="1" maxOccurs="1" name="IsReminderSet" type="xs:boolean" />
      <xs:element minOccurs="1" maxOccurs="1" name="IsPrivate" type="xs:boolean" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="CalendarEvent">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="StartTime" type="xs:dateTime" />
      <xs:element minOccurs="1" maxOccurs="1" name="EndTime" type="xs:dateTime" />
      <xs:element minOccurs="1" maxOccurs="1" name="BusyType" type="t:LegacyFreeBusyType" />
      <xs:element minOccurs="0" maxOccurs="1" name="CalendarEventDetails" type="t:CalendarEventDetails" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfCalendarEvent">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="CalendarEvent" type="t:CalendarEvent" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="Duration">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="StartTime" type="xs:dateTime" />
      <xs:element minOccurs="1" maxOccurs="1" name="EndTime" type="xs:dateTime" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="EmailAddress">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="Name" type="xs:string" />
      <xs:element minOccurs="1" maxOccurs="1" name="Address" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="RoutingType" type="xs:string" />
    </xs:sequence>
  </xs:complexType>

  <xs:element name="Mailbox" type="t:EmailAddress" />

  <xs:simpleType name="FreeBusyViewType">
    <xs:list>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="None" />
          <xs:enumeration value="MergedOnly" />
          <xs:enumeration value="FreeBusy" />
          <xs:enumeration value="FreeBusyMerged" />
          <xs:enumeration value="Detailed" />
          <xs:enumeration value="DetailedMerged" />
        </xs:restriction>
      </xs:simpleType>
    </xs:list>
  </xs:simpleType>

  <xs:complexType name="FreeBusyViewOptionsType">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="TimeWindow" type="t:Duration" />
      <xs:element minOccurs="0" maxOccurs="1" name="MergedFreeBusyIntervalInMinutes" type="xs:int" />
      <xs:element minOccurs="0" maxOccurs="1" name="RequestedView" type="t:FreeBusyViewType" />
    </xs:sequence>
  </xs:complexType>

  <xs:element name="FreeBusyViewOptions" type="t:FreeBusyViewOptionsType" />

  <xs:complexType name="WorkingPeriod">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="DayOfWeek" type="t:DaysOfWeekType" />
      <xs:element minOccurs="1" maxOccurs="1" name="StartTimeInMinutes" type="xs:int" />
      <xs:element minOccurs="1" maxOccurs="1" name="EndTimeInMinutes" type="xs:int" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfWorkingPeriod">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="WorkingPeriod" type="t:WorkingPeriod" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SerializableTimeZoneTime">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="Bias" type="xs:int" />
      <xs:element minOccurs="1" maxOccurs="1" name="Time" type="xs:string" />
      <xs:element minOccurs="1" maxOccurs="1" name="DayOrder" type="xs:short" />
      <xs:element minOccurs="1" maxOccurs="1" name="Month" type="xs:short" />
      <xs:element minOccurs="1" maxOccurs="1" name="DayOfWeek" type="t:DayOfWeekType" />
      <xs:element minOccurs="0" maxOccurs="1" name="Year" type="xs:string" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SerializableTimeZone">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="Bias" type="xs:int" />
      <xs:element minOccurs="1" maxOccurs="1" name="StandardTime" type="t:SerializableTimeZoneTime" />
      <xs:element minOccurs="1" maxOccurs="1" name="DaylightTime" type="t:SerializableTimeZoneTime" />
    </xs:sequence>
  </xs:complexType>

  <xs:element name="TimeZone" type="t:SerializableTimeZone" />

  <xs:complexType name="WorkingHours">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="TimeZone" type="t:SerializableTimeZone" />
      <xs:element minOccurs="1" maxOccurs="1" name="WorkingPeriodArray" type="t:ArrayOfWorkingPeriod" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="FreeBusyView">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="FreeBusyViewType" type="t:FreeBusyViewType" />
      <xs:element minOccurs="0" maxOccurs="1" name="MergedFreeBusy" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="CalendarEventArray" type="t:ArrayOfCalendarEvent" />
      <xs:element minOccurs="0" maxOccurs="1" name="WorkingHours" type="t:WorkingHours" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="MailboxData">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="Email" type="t:EmailAddress" />
      <xs:element minOccurs="1" maxOccurs="1" name="AttendeeType" type="t:MeetingAttendeeType" />
      <xs:element minOccurs="0" maxOccurs="1" name="ExcludeConflicts" type="xs:boolean" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfMailboxData">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="MailboxData" nillable="true" type="t:MailboxData" />
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="SuggestionQuality">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Excellent" />
      <xs:enumeration value="Good" />
      <xs:enumeration value="Fair" />
      <xs:enumeration value="Poor" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="SuggestionsViewOptionsType">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="GoodThreshold" type="xs:int" />
      <xs:element minOccurs="0" maxOccurs="1" name="MaximumResultsByDay" type="xs:int" />
      <xs:element minOccurs="0" maxOccurs="1" name="MaximumNonWorkHourResultsByDay" type="xs:int" />
      <xs:element minOccurs="0" maxOccurs="1" name="MeetingDurationInMinutes" type="xs:int" />
      <xs:element minOccurs="0" maxOccurs="1" name="MinimumSuggestionQuality" type="t:SuggestionQuality" />
      <xs:element minOccurs="1" maxOccurs="1" name="DetailedSuggestionsWindow" type="t:Duration" />
      <xs:element minOccurs="0" maxOccurs="1" name="CurrentMeetingTime" type="xs:dateTime" />
      <xs:element minOccurs="0" maxOccurs="1" name="GlobalObjectId" type="xs:string" />
    </xs:sequence>
  </xs:complexType>

  <xs:element name="SuggestionsViewOptions" type="t:SuggestionsViewOptionsType" />

  <xs:complexType name="ArrayOfAttendeeConflictData">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element minOccurs="1" maxOccurs="1" name="UnknownAttendeeConflictData" nillable="true" type="t:UnknownAttendeeConflictData" />
      <xs:element minOccurs="1" maxOccurs="1" name="IndividualAttendeeConflictData" nillable="true" type="t:IndividualAttendeeConflictData" />
      <xs:element minOccurs="1" maxOccurs="1" name="TooBigGroupAttendeeConflictData" nillable="true" type="t:TooBigGroupAttendeeConflictData" />
      <xs:element minOccurs="1" maxOccurs="1" name="GroupAttendeeConflictData" nillable="true" type="t:GroupAttendeeConflictData" />
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="AttendeeConflictData" abstract="true"/>

  <xs:complexType name="UnknownAttendeeConflictData">
    <xs:complexContent mixed="false">
      <xs:extension base="t:AttendeeConflictData" />
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="TooBigGroupAttendeeConflictData">
    <xs:complexContent mixed="false">
      <xs:extension base="t:AttendeeConflictData" />
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="IndividualAttendeeConflictData">
    <xs:complexContent mixed="false">
      <xs:extension base="t:AttendeeConflictData">
        <xs:sequence>
          <xs:element minOccurs="1" maxOccurs="1" name="BusyType" type="t:LegacyFreeBusyType" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="GroupAttendeeConflictData">
    <xs:complexContent mixed="false">
      <xs:extension base="t:AttendeeConflictData">
        <xs:sequence>
          <xs:element minOccurs="1" maxOccurs="1" name="NumberOfMembers" type="xs:int" />
          <xs:element minOccurs="1" maxOccurs="1" name="NumberOfMembersAvailable" type="xs:int" />
          <xs:element minOccurs="1" maxOccurs="1" name="NumberOfMembersWithConflict" type="xs:int" />
          <xs:element minOccurs="1" maxOccurs="1" name="NumberOfMembersWithNoData" type="xs:int" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="Suggestion">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="MeetingTime" type="xs:dateTime" />
      <xs:element minOccurs="1" maxOccurs="1" name="IsWorkTime" type="xs:boolean" />
      <xs:element minOccurs="1" maxOccurs="1" name="SuggestionQuality" type="t:SuggestionQuality" />
      <xs:element minOccurs="0" maxOccurs="1" name="AttendeeConflictDataArray" type="t:ArrayOfAttendeeConflictData" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfSuggestion">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Suggestion" type="t:Suggestion" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SuggestionDayResult">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="Date" type="xs:dateTime" />
      <xs:element minOccurs="1" maxOccurs="1" name="DayQuality" type="t:SuggestionQuality" />
      <xs:element minOccurs="0" maxOccurs="1" name="SuggestionArray" type="t:ArrayOfSuggestion" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfSuggestionDayResult">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="SuggestionDayResult" type="t:SuggestionDayResult" />
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="OofState">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Disabled" />
      <xs:enumeration value="Enabled" />
      <xs:enumeration value="Scheduled" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ExternalAudience">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None" />
      <xs:enumeration value="Known" />
      <xs:enumeration value="All" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="ReplyBody">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="Message" type="xs:string" />
    </xs:sequence>
    <xs:attribute ref="xml:lang" use="optional" />
  </xs:complexType>

  <xs:complexType name="ArrayOfEventIDType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="EventToDeleteID" type="xs:string" />
    </xs:choice>
  </xs:complexType>

   <xs:complexType name="UserOofSettings">
        <xs:sequence>
            <xs:element minOccurs="1" maxOccurs="1" name="OofState" type="t:OofState" />
            <xs:element minOccurs="1" maxOccurs="1" name="ExternalAudience" type="t:ExternalAudience" />
            <xs:element minOccurs="0" maxOccurs="1" name="Duration" type="t:Duration" />
            <xs:element minOccurs="0" maxOccurs="1" name="InternalReply" type="t:ReplyBody" />
            <xs:element minOccurs="0" maxOccurs="1" name="ExternalReply" type="t:ReplyBody" />
            <xs:element minOccurs="0" maxOccurs="1" name="DeclineMeetingReply" type="t:ReplyBody" />
            <xs:element minOccurs="0" maxOccurs="1" name="DeclineEventsForScheduledOOF" type="xs:boolean" />
            <xs:element minOccurs="0" maxOccurs="1" name="DeclineAllEventsForScheduledOOF" type="xs:boolean" />
            <xs:element minOccurs="0" maxOccurs="1" name="CreateOOFEvent" type="xs:boolean" />
            <xs:element minOccurs="0" maxOccurs="1" name="OOFEventSubject" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="AutoDeclineFutureRequestsWhenOOF" type="xs:boolean" />
            <xs:element minOccurs="0" maxOccurs="1" name="OOFEventID" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="EventsToDeleteIDs" type="t:ArrayOfEventIDType" />
        </xs:sequence>
    </xs:complexType>

  <xs:element name="OofSettings" type="t:UserOofSettings" />
  <xs:element name="UserOofSettings" type="t:UserOofSettings" />

  <!-- Value used in Message Xml -->
  <xs:complexType name="Value">
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute name="Name" type="xs:string" use="required" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:element name="Value" type="t:Value"/>

  <!-- ApprovalRequestDataType -->
  <xs:complexType name="ApprovalRequestDataType">
    <xs:sequence>
      <xs:element name="IsUndecidedApprovalRequest" type="xs:boolean" minOccurs="0"/>
      <xs:element name="ApprovalDecision" type="xs:int" minOccurs="0"/>
      <xs:element name="ApprovalDecisionMaker" type="xs:string" minOccurs="0"/>
      <xs:element name="ApprovalDecisionTime" type="xs:dateTime" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <!-- ReminderMessageDataType -->
  <xs:complexType name="ReminderMessageDataType">
    <xs:sequence>
      <xs:element name="ReminderText" type="xs:string" minOccurs="0"/>
      <xs:element name="Location" type="xs:string" minOccurs="0"/>
      <xs:element name="StartTime" type="xs:dateTime" minOccurs="0"/>
      <xs:element name="EndTime" type="xs:dateTime" minOccurs="0"/>
      <xs:element name="AssociatedCalendarItemId" type="t:ItemIdType" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <!-- MessageSafetyType -->
  <xs:complexType name="MessageSafetyType">
    <xs:sequence>
      <xs:element name="MessageSafetyLevel" type="xs:int" minOccurs="0" />
      <xs:element name="MessageSafetyReason" type="xs:int" minOccurs="0" />
      <xs:element name="Info" type="xs:string" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <!-- SendPromptType -->
  <xs:simpleType name="SendPromptType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None" />
      <xs:enumeration value="Send" />
      <xs:enumeration value="VotingOption" />
    </xs:restriction>
  </xs:simpleType>

  <!-- VotingOptionDataType -->
  <xs:complexType name="VotingOptionDataType">
    <xs:sequence>
      <xs:element name="DisplayName" type="xs:string" minOccurs="0"/>
      <xs:element name="SendPrompt" type="t:SendPromptType" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfVotingOptionDataType">
    <xs:sequence>
      <xs:element name="VotingOptionData" type="t:VotingOptionDataType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <!-- VotingInformationType -->
  <xs:complexType name="VotingInformationType">
    <xs:sequence>
      <xs:element name="UserOptions" type="t:ArrayOfVotingOptionDataType" minOccurs="0"/>
      <xs:element name="VotingResponse" type="xs:string" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <!-- SP1 Id Conversion types -->
  <xs:simpleType name="IdFormatType">
    <xs:annotation>
      <xs:documentation>Surfaces the various id types that are supported for conversion</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="EwsLegacyId"/>
      <xs:enumeration value="EwsId"/>
      <xs:enumeration value="EntryId"/>
      <xs:enumeration value="HexEntryId"/>
      <xs:enumeration value="StoreId"/>
      <xs:enumeration value="OwaId"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="AlternateIdBaseType" abstract="true">
    <xs:annotation>
      <xs:documentation>
        Surfaces alternate representations of an item or folder id. No change key is included.
      </xs:documentation>
    </xs:annotation>
    <xs:attribute name="Format" type="t:IdFormatType" use="required"/>
  </xs:complexType>

  <xs:complexType name="AlternateIdType">
    <xs:annotation>
      <xs:documentation>
        Represents an alternate mailbox folder or item Id.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="t:AlternateIdBaseType">
        <xs:attribute name="Id" type="xs:string" use="required"/>
        <xs:attribute name="Mailbox" type="t:NonEmptyStringType" use="required"/>
        <xs:attribute name="IsArchive" type="xs:boolean" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="AlternatePublicFolderIdType">
    <xs:annotation>
      <xs:documentation>
        Represents an alternate public folder Id.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="t:AlternateIdBaseType">
        <xs:attribute name="FolderId" type="xs:string" use="required"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="AlternatePublicFolderItemIdType">
    <xs:annotation>
      <xs:documentation>
        Represents an alternate public folder item Id.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="t:AlternatePublicFolderIdType">
        <xs:attribute name="ItemId" type="xs:string" use="required"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="NonEmptyArrayOfAlternateIdsType">
    <xs:annotation>
      <xs:documentation>
        A non-empty array of alternate Ids.
      </xs:documentation>
    </xs:annotation>
    <xs:choice minOccurs="1" maxOccurs="unbounded">
      <xs:element name="AlternateId" type="t:AlternateIdType"/>
      <xs:element name="AlternatePublicFolderId" type="t:AlternatePublicFolderIdType"/>
      <xs:element name="AlternatePublicFolderItemId" type="t:AlternatePublicFolderItemIdType"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="UserIdType">
    <xs:sequence>
      <xs:element name="SID" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="PrimarySmtpAddress" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="DisplayName" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="DistinguishedUser" type="t:DistinguishedUserType" minOccurs="0" maxOccurs="1" />
      <xs:element name="ExternalUserIdentity" type="xs:string" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="DistinguishedUserType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Default" />
      <xs:enumeration value="Anonymous" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="ArrayOfPermissionsType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="Permission" type="t:PermissionType" />
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="ArrayOfCalendarPermissionsType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="CalendarPermission" type="t:CalendarPermissionType" />
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="ArrayOfUnknownEntriesType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="UnknownEntry" type="xs:string" />
    </xs:choice>
  </xs:complexType>

  <xs:simpleType name="PermissionReadAccessType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None" />
      <xs:enumeration value="FullDetails" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CalendarPermissionReadAccessType">
    <xs:restriction base ="xs:string">
      <xs:enumeration value="None"/>
      <xs:enumeration value="TimeOnly"/>
      <xs:enumeration value="TimeAndSubjectAndLocation"/>
      <xs:enumeration value="FullDetails"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="BasePermissionType" abstract="true">
    <xs:annotation>
      <xs:documentation>A permission on a folder</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="UserId" type="t:UserIdType" minOccurs="1" maxOccurs="1" />
      <xs:element name="CanCreateItems" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="CanCreateSubFolders" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="IsFolderOwner" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="IsFolderVisible" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="IsFolderContact" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="EditItems" type="t:PermissionActionType" minOccurs="0" maxOccurs="1" />
      <xs:element name="DeleteItems" type="t:PermissionActionType" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PermissionType">
    <xs:annotation>
      <xs:documentation>A permission on a folder</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="t:BasePermissionType">
        <xs:sequence>
          <xs:element name="ReadItems" type="t:PermissionReadAccessType" minOccurs="0" maxOccurs="1" />
          <xs:element name="PermissionLevel" type="t:PermissionLevelType" minOccurs="1" maxOccurs="1" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="CalendarPermissionType">
    <xs:complexContent>
      <xs:extension base="t:BasePermissionType">
        <xs:sequence>
          <xs:element name="ReadItems" type="t:CalendarPermissionReadAccessType" minOccurs="0" maxOccurs="1" />
          <xs:element name="CalendarPermissionLevel" type="t:CalendarPermissionLevelType" minOccurs="1" maxOccurs="1" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:simpleType name="PermissionActionType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None" />
      <xs:enumeration value="Owned" />
      <xs:enumeration value="All" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="PermissionLevelType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None" />
      <xs:enumeration value="Owner" />
      <xs:enumeration value="PublishingEditor" />
      <xs:enumeration value="Editor" />
      <xs:enumeration value="PublishingAuthor" />
      <xs:enumeration value="Author" />
      <xs:enumeration value="NoneditingAuthor" />
      <xs:enumeration value="Reviewer" />
      <xs:enumeration value="Contributor" />
      <xs:enumeration value="Custom" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CalendarPermissionLevelType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None" />
      <xs:enumeration value="Owner" />
      <xs:enumeration value="PublishingEditor" />
      <xs:enumeration value="Editor" />
      <xs:enumeration value="PublishingAuthor" />
      <xs:enumeration value="Author" />
      <xs:enumeration value="NoneditingAuthor" />
      <xs:enumeration value="Reviewer" />
      <xs:enumeration value="Contributor" />
      <xs:enumeration value="FreeBusyTimeOnly" />
      <xs:enumeration value="FreeBusyTimeAndSubjectAndLocation" />
      <xs:enumeration value="Custom" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="PermissionSetType">
    <xs:annotation>
      <xs:documentation>The set of permissions on a folder</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Permissions" type="t:ArrayOfPermissionsType" />
      <xs:element name="UnknownEntries" type="t:ArrayOfUnknownEntriesType" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="CalendarPermissionSetType">
    <xs:annotation>
      <xs:documentation>The set of permissions on a folder</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="CalendarPermissions" type="t:ArrayOfCalendarPermissionsType" />
      <xs:element name="UnknownEntries" type="t:ArrayOfUnknownEntriesType" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="EffectiveRightsType">
    <xs:sequence>
      <xs:element name="CreateAssociated" type="xs:boolean" />
      <xs:element name="CreateContents" type="xs:boolean" />
      <xs:element name="CreateHierarchy" type="xs:boolean" />
      <xs:element name="Delete" type="xs:boolean" />
      <xs:element name="Modify" type="xs:boolean" />
      <xs:element name="Read" type="xs:boolean" />
      <xs:element name="ViewPrivateItems" type="xs:boolean" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <!-- Delegate Management types -->

  <xs:complexType name="ArrayOfDelegateUserType">
    <xs:sequence>
      <xs:element name="DelegateUser" type="t:DelegateUserType" minOccurs="1" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfUserIdType">
    <xs:sequence>
      <xs:element name="UserId" type="t:UserIdType" minOccurs="1" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="DeliverMeetingRequestsType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="DelegatesOnly"/>
      <xs:enumeration value="DelegatesAndMe"/>
      <xs:enumeration value="DelegatesAndSendInformationToMe"/>
      <xs:enumeration value="NoForward"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="DelegateUserType">
    <xs:sequence>
      <xs:element name="UserId" type="t:UserIdType" minOccurs="1" maxOccurs="1" />
      <xs:element name="DelegatePermissions" type="t:DelegatePermissionsType" minOccurs="0" maxOccurs="1" />
      <xs:element name="ReceiveCopiesOfMeetingMessages" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="ViewPrivateItems" type="xs:boolean" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="DelegatePermissionsType">
    <xs:sequence>
      <xs:element name="CalendarFolderPermissionLevel" type="t:DelegateFolderPermissionLevelType" minOccurs="0" maxOccurs="1" />
      <xs:element name="TasksFolderPermissionLevel" type="t:DelegateFolderPermissionLevelType" minOccurs="0" maxOccurs="1" />
      <xs:element name="InboxFolderPermissionLevel" type="t:DelegateFolderPermissionLevelType" minOccurs="0" maxOccurs="1" />
      <xs:element name="ContactsFolderPermissionLevel" type="t:DelegateFolderPermissionLevelType" minOccurs="0" maxOccurs="1" />
      <xs:element name="NotesFolderPermissionLevel" type="t:DelegateFolderPermissionLevelType" minOccurs="0" maxOccurs="1" />
      <xs:element name="JournalFolderPermissionLevel" type="t:DelegateFolderPermissionLevelType" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="DelegateFolderPermissionLevelType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None"/>
      <xs:enumeration value="Editor"/>
      <xs:enumeration value="Reviewer"/>
      <xs:enumeration value="Author"/>
      <xs:enumeration value="Custom"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="ConflictResultsType">
    <xs:sequence>
      <xs:element name="Count" type="xs:int"/>
    </xs:sequence>
  </xs:complexType>

  <!-- MailTips Types -->

  <xs:simpleType name="MailTipTypes">
    <xs:list>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="All" />
          <xs:enumeration value="OutOfOfficeMessage" />
          <xs:enumeration value="MailboxFullStatus" />
          <xs:enumeration value="CustomMailTip" />
          <xs:enumeration value="ExternalMemberCount" />
          <xs:enumeration value="TotalMemberCount" />
          <xs:enumeration value="MaxMessageSize" />
          <xs:enumeration value="DeliveryRestriction" />
          <xs:enumeration value="ModerationStatus" />
          <xs:enumeration value="InvalidRecipient" />
          <xs:enumeration value="Scope" />
          <xs:enumeration value="RecipientSuggestions" />
          <xs:enumeration value="PreferAccessibleContent" />
        </xs:restriction>
      </xs:simpleType>
    </xs:list>
  </xs:simpleType>

  <xs:complexType name="OutOfOfficeMailTip">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="ReplyBody" type="t:ReplyBody"/>
      <xs:element minOccurs="0" maxOccurs="1" name="Duration" type="t:Duration"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SmtpDomainList">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Domain" type="t:SmtpDomain"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SmtpDomain">
    <xs:attribute name="Name" type="xs:string" use="required"/>
    <xs:attribute name="IncludeSubdomains" type="xs:boolean" use="optional"/>
  </xs:complexType>

  <xs:complexType name="MailTips">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="RecipientAddress" type="t:EmailAddressType" />
      <xs:element minOccurs="1" maxOccurs="1" name="PendingMailTips" type="t:MailTipTypes" />
      <xs:element minOccurs="0" maxOccurs="1" name="OutOfOffice" type="t:OutOfOfficeMailTip" />
      <xs:element minOccurs="0" maxOccurs="1" name="MailboxFull" type="xs:boolean" />
      <xs:element minOccurs="0" maxOccurs="1" name="CustomMailTip" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="TotalMemberCount" type="xs:int" />
      <xs:element minOccurs="0" maxOccurs="1" name="ExternalMemberCount" type="xs:int" />
      <xs:element minOccurs="0" maxOccurs="1" name="MaxMessageSize" type="xs:int" />
      <xs:element minOccurs="0" maxOccurs="1" name="DeliveryRestricted" type="xs:boolean" />
      <xs:element minOccurs="0" maxOccurs="1" name="IsModerated" type="xs:boolean" />
      <xs:element minOccurs="0" maxOccurs="1" name="InvalidRecipient" type="xs:boolean" />
      <xs:element minOccurs="0" maxOccurs="1" name="Scope" type="xs:int" />
      <xs:element minOccurs="0" maxOccurs="1" name="RecipientSuggestions" type="t:ArrayOfRecipientSuggestionsType" />
      <xs:element minOccurs="0" maxOccurs="1" name="PreferAccessibleContent" type="xs:boolean" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfRecipientSuggestionsType">
    <xs:sequence>
      <xs:element name="RecipientSuggestion" type="t:RecipientSuggestionType" minOccurs="0" maxOccurs="3" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="RecipientSuggestionType">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="DisplayName" type="xs:string" />
      <xs:element minOccurs="1" maxOccurs="1" name="EmailAddress" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  
  <!-- GetServiceConfiguration Types -->
  <xs:simpleType name="ServiceConfigurationType">
    <xs:list>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="MailTips" />
          <xs:enumeration value="UnifiedMessagingConfiguration" />
          <xs:enumeration value="ProtectionRules" />
          <xs:enumeration value="PolicyNudges" />
          <xs:enumeration value="SharePointURLs" />
          <xs:enumeration value="OfficeIntegrationConfiguration" />
        </xs:restriction>
      </xs:simpleType>
    </xs:list>
  </xs:simpleType>

  <xs:complexType name="ServiceConfiguration">
    <!-- this 'base class' is available for ErrorCode / ErrorMessage
        elements if those become necessary in the future. -->
  </xs:complexType>

  <xs:complexType name="MailTipsServiceConfiguration">
    <xs:complexContent>
      <xs:extension base="t:ServiceConfiguration">
        <xs:sequence>
          <xs:element minOccurs="1" maxOccurs="1" name="MailTipsEnabled" type="xs:boolean" />
          <xs:element minOccurs="1" maxOccurs="1" name="MaxRecipientsPerGetMailTipsRequest" type="xs:int" />
          <xs:element minOccurs="1" maxOccurs="1" name="MaxMessageSize" type="xs:int" />
          <xs:element minOccurs="1" maxOccurs="1" name="LargeAudienceThreshold" type="xs:int" />
          <xs:element minOccurs="1" maxOccurs="1" name="ShowExternalRecipientCount" type="xs:boolean" />
          <xs:element minOccurs="1" maxOccurs="1" name="InternalDomains" type="t:SmtpDomainList"/>
          <xs:element minOccurs="1" maxOccurs="1" name="PolicyTipsEnabled" type="xs:boolean" />
          <xs:element minOccurs="1" maxOccurs="1" name="LargeAudienceCap" type="xs:int" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="UnifiedMessageServiceConfiguration">
    <xs:complexContent>
      <xs:extension base="t:ServiceConfiguration">
        <xs:sequence>
          <xs:element minOccurs="1" maxOccurs="1" name="UmEnabled" type="xs:boolean" />
          <xs:element minOccurs="1" maxOccurs="1" name="PlayOnPhoneDialString" type="xs:string"/>
          <xs:element minOccurs="1" maxOccurs="1" name="PlayOnPhoneEnabled" type="xs:boolean" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="SharePointURLsServiceConfiguration">
    <xs:complexContent>
      <xs:extension base="t:ServiceConfiguration">
        <xs:sequence>
          <xs:element minOccurs="1" maxOccurs="1" name="InternalSPMySiteHostURL" type="xs:string" />
          <xs:element minOccurs="1" maxOccurs="1" name="ExternalSPMySiteHostURL" type="xs:string" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="OfficeIntegrationConfiguration">
    <xs:complexContent>
      <xs:extension base="t:ServiceConfiguration">
        <xs:sequence>
          <xs:element minOccurs="1" maxOccurs="1" name="OfficeSidebarURL" type="xs:string" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ConfigurationRequestDetailsType">
    <xs:choice minOccurs="1" maxOccurs="1">
      <xs:any processContents="skip" minOccurs="0" maxOccurs="unbounded" namespace="##any"/>
    </xs:choice>
  </xs:complexType>

  <!-- Sharing Types -->
  <xs:complexType name="ArrayOfSmtpAddressType">
    <xs:choice minOccurs="1" maxOccurs="unbounded">
      <xs:element name="SmtpAddress" type="t:NonEmptyStringType"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="ArrayOfEncryptedSharedFolderDataType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="EncryptedSharedFolderData" type="t:EncryptedSharedFolderDataType"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="EncryptedSharedFolderDataType">
    <xs:sequence>
      <xs:element name="Token" type="t:EncryptedDataContainerType"/>
      <xs:element name="Data" type="t:EncryptedDataContainerType"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="EncryptedDataContainerType">
    <xs:sequence>
      <xs:any processContents="skip" namespace="##other"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfInvalidRecipientsType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="InvalidRecipient" type="t:InvalidRecipientType"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="InvalidRecipientType">
    <xs:sequence>
      <xs:element name="SmtpAddress" type="t:NonEmptyStringType"/>
      <xs:element name="ResponseCode" type="t:InvalidRecipientResponseCodeType"/>
      <xs:element name="MessageText" type="xs:string" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="InvalidRecipientResponseCodeType">
    <xs:annotation>
      <xs:documentation>
        Represents the message keys that can be returned for invalid recipients
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="OtherError"/>
      <xs:enumeration value="RecipientOrganizationNotFederated"/>
      <xs:enumeration value="CannotObtainTokenFromSTS"/>
      <xs:enumeration value="SystemPolicyBlocksSharingWithThisRecipient"/>
      <xs:enumeration value="RecipientOrganizationFederatedWithUnknownTokenIssuer"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="AcceptSharingInvitationType">
    <xs:complexContent>
      <xs:extension base="t:ReferenceItemResponseType"/>
    </xs:complexContent>
  </xs:complexType>

  <xs:simpleType name="SharingDataType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Calendar" />
      <xs:enumeration value="Contacts" />
    </xs:restriction>
  </xs:simpleType>

  <!-- UMTypes -->
  <xs:complexType name="PhoneCallIdType">
    <xs:attribute name="Id" type="xs:string" use="required"/>
  </xs:complexType>

  <xs:complexType name="PhoneCallInformationType">
    <xs:sequence>
      <xs:element name="PhoneCallState" type="t:PhoneCallStateType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="ConnectionFailureCause" type="t:ConnectionFailureCauseType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="SIPResponseText" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="SIPResponseCode" type="xs:int" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="PhoneCallStateType">
    <xs:restriction base ="xs:string">
      <xs:enumeration value="Idle"/>
      <xs:enumeration value="Connecting"/>
      <xs:enumeration value="Alerted"/>
      <xs:enumeration value="Connected"/>
      <xs:enumeration value="Disconnected"/>
      <xs:enumeration value="Incoming"/>
      <xs:enumeration value="Transferring"/>
      <xs:enumeration value="Forwarding"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ConnectionFailureCauseType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None"/>
      <xs:enumeration value="UserBusy"/>
      <xs:enumeration value="NoAnswer"/>
      <xs:enumeration value="Unavailable"/>
      <xs:enumeration value="Other"/>
    </xs:restriction>
  </xs:simpleType>

  <!-- UserConfiguration Types -->

  <xs:complexType name="UserConfigurationNameType">
    <xs:complexContent>
      <xs:extension base="t:TargetFolderIdType">
        <xs:attribute name="Name" type="t:NonEmptyStringType" use="required"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:simpleType name="UserConfigurationDictionaryObjectTypesType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="DateTime"/>
      <xs:enumeration value="Boolean"/>
      <xs:enumeration value="Byte"/>
      <xs:enumeration value="String"/>
      <xs:enumeration value="Integer32"/>
      <xs:enumeration value="UnsignedInteger32"/>
      <xs:enumeration value="Integer64"/>
      <xs:enumeration value="UnsignedInteger64"/>
      <xs:enumeration value="StringArray"/>
      <xs:enumeration value="ByteArray"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="UserConfigurationDictionaryObjectType">
    <xs:sequence>
      <xs:element name="Type" type="t:UserConfigurationDictionaryObjectTypesType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="Value" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="UserConfigurationDictionaryEntryType">
    <xs:sequence>
      <xs:element name="DictionaryKey" type="t:UserConfigurationDictionaryObjectType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="DictionaryValue" type="t:UserConfigurationDictionaryObjectType" nillable="true" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="UserConfigurationDictionaryType">
    <xs:sequence>
      <xs:element name="DictionaryEntry" type="t:UserConfigurationDictionaryEntryType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="UserConfigurationType">
    <xs:sequence>
      <xs:element name="UserConfigurationName" type="t:UserConfigurationNameType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="ItemId" type="t:ItemIdType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Dictionary" type="t:UserConfigurationDictionaryType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="XmlData" type="xs:base64Binary" minOccurs="0" maxOccurs="1"/>
      <xs:element name="BinaryData" type="xs:base64Binary" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="UserConfigurationPropertyType">
    <xs:list>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="Id"/>
          <xs:enumeration value="Dictionary"/>
          <xs:enumeration value="XmlData"/>
          <xs:enumeration value="BinaryData"/>
          <xs:enumeration value="All"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:list>
  </xs:simpleType>

  <xs:complexType name="ProtectionRulesServiceConfiguration">
    <xs:complexContent>
      <xs:extension base="t:ServiceConfiguration">
        <xs:sequence>
          <xs:element name="Rules" type="t:ArrayOfProtectionRulesType" minOccurs="1" maxOccurs="1" />
          <xs:element name="InternalDomains" type="t:SmtpDomainList" minOccurs="1" maxOccurs="1" />
        </xs:sequence>
        <xs:attribute name="RefreshInterval" use="required">
          <xs:simpleType>
            <xs:restriction base="xs:int">
              <xs:minInclusive value="1"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ArrayOfProtectionRulesType">
    <xs:sequence>
      <xs:element name="Rule" type="t:ProtectionRuleType" minOccurs="0" maxOccurs="unbounded">
      </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ProtectionRuleType">
    <xs:sequence>
      <xs:element name="Condition" type="t:ProtectionRuleConditionType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="Action" type="t:ProtectionRuleActionType" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
    <xs:attribute name="Name" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:minLength value="1"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="UserOverridable" type="xs:boolean" use="required" />
    <xs:attribute name="Priority" use="required" >
      <xs:simpleType>
        <xs:restriction base="xs:int">
          <xs:minInclusive value="1"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>

  <xs:complexType name="ProtectionRuleConditionType">
    <xs:choice minOccurs="1" maxOccurs="1">
      <xs:element name="AllInternal" type="t:ProtectionRuleAllInternalType" />
      <xs:element name="And" type="t:ProtectionRuleAndType" />
      <xs:element name="RecipientIs" type="t:ProtectionRuleRecipientIsType" />
      <xs:element name="SenderDepartments" type="t:ProtectionRuleSenderDepartmentsType" />
      <xs:element name="True" type="t:ProtectionRuleTrueType" />
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="ProtectionRuleAndType">
    <xs:sequence>
      <xs:choice minOccurs="1" maxOccurs="unbounded">
        <xs:element name="AllInternal" type="t:ProtectionRuleAllInternalType" />
        <xs:element name="And" type="t:ProtectionRuleAndType" />
        <xs:element name="RecipientIs" type="t:ProtectionRuleRecipientIsType" />
        <xs:element name="SenderDepartments" type="t:ProtectionRuleSenderDepartmentsType" />
        <xs:element name="True" type="t:ProtectionRuleTrueType" />
      </xs:choice>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ProtectionRuleRecipientIsType">
    <xs:sequence>
      <xs:element name="Value" type="t:ProtectionRuleValueType" minOccurs="1" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ProtectionRuleSenderDepartmentsType">
    <xs:sequence>
      <xs:element name="Value" type="t:ProtectionRuleValueType" minOccurs="1" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="ProtectionRuleTrueType">
    <xs:restriction base="xs:string">
      <xs:length value="0"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ProtectionRuleAllInternalType">
    <xs:restriction base="xs:string">
      <xs:length value="0"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ProtectionRuleValueType">
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ProtectionRuleActionKindType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="RightsProtectMessage"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="ProtectionRuleActionType">
    <xs:sequence>
      <xs:element name="Argument" type="t:ProtectionRuleArgumentType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Name" use="required" type="t:ProtectionRuleActionKindType" />
  </xs:complexType>

  <xs:complexType name="ProtectionRuleArgumentType">
    <xs:attribute name="Value" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:minLength value="1"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>

  <!-- Policy Nudge Rules -->

  <xs:complexType name="PolicyNudgeRulesServiceConfiguration">
    <xs:sequence>
      <xs:any processContents="skip" minOccurs="0" maxOccurs="unbounded" namespace="##any"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfFolderIdType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="FolderId" type="t:FolderIdType" />
    </xs:choice>
  </xs:complexType>

  <!-- SetTeamMailbox -->
  <xs:simpleType name="TeamMailboxLifecycleStateType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Active" />
      <xs:enumeration value="Closed" />
      <xs:enumeration value="Unlinked" />
      <xs:enumeration value="PendingDelete" />
    </xs:restriction>
  </xs:simpleType>

  <!-- Report Message Action-->
  <xs:simpleType name="ReportMessageActionType">
    <xs:annotation>
      <xs:documentation>Surfaces the various report message action types</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="Junk"/>
      <xs:enumeration value="NotJunk"/>
      <xs:enumeration value="Phish"/>
      <xs:enumeration value="Unsubscribe"/>
    </xs:restriction>
  </xs:simpleType>

  <!-- MessageTracking -->
  <xs:complexType name="FindMessageTrackingSearchResultType">
    <xs:all>
      <xs:element name="Subject" type="xs:string" />
      <xs:element name="Sender" type="t:EmailAddressType" />
      <xs:element name="PurportedSender" type="t:EmailAddressType" minOccurs="0"/>
      <xs:element name="Recipients" type="t:ArrayOfRecipientsType" />
      <xs:element name="SubmittedTime" type="xs:dateTime" />
      <xs:element name="MessageTrackingReportId" type="t:NonEmptyStringType" />
      <xs:element name="PreviousHopServer" type="t:NonEmptyStringType" minOccurs="0" />
      <xs:element name="FirstHopServer" type="t:NonEmptyStringType" minOccurs="0" />
      <xs:element name="Properties" type="t:ArrayOfTrackingPropertiesType" minOccurs="0" />
    </xs:all>
  </xs:complexType>

  <xs:complexType name="ArrayOfFindMessageTrackingSearchResultType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="MessageTrackingSearchResult" type="t:FindMessageTrackingSearchResultType" />
    </xs:choice>
  </xs:complexType>

  <xs:simpleType name="MessageTrackingReportTemplateType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Summary" />
      <xs:enumeration value="RecipientPath" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="RecipientTrackingEventType">
    <xs:all>
      <xs:element name="Date" type="xs:dateTime" />
      <xs:element name="Recipient" type="t:EmailAddressType" />
      <xs:element name="DeliveryStatus" type="xs:string" />
      <xs:element name="EventDescription" type="xs:string" />
      <xs:element name="EventData" type="t:ArrayOfStringsType" minOccurs="0"/>
      <xs:element name="Server" type="t:NonEmptyStringType" />
      <xs:element name="InternalId" type="xs:nonNegativeInteger" />
      <xs:element name="BccRecipient" type="xs:boolean" minOccurs="0"/>
      <xs:element name="HiddenRecipient" type="xs:boolean" minOccurs="0"/>
      <xs:element name="UniquePathId" type="t:NonEmptyStringType" minOccurs="0"/>
      <xs:element name="RootAddress" type="t:NonEmptyStringType" minOccurs="0"/>
      <xs:element name="Properties" type="t:ArrayOfTrackingPropertiesType" minOccurs="0" />
    </xs:all>
  </xs:complexType>

  <xs:complexType name="MessageTrackingReportType">
    <xs:all>
      <xs:element name="Sender" type="t:EmailAddressType" minOccurs="0"/>
      <xs:element name="PurportedSender" type="t:EmailAddressType" minOccurs="0"/>
      <xs:element name="Subject" type="xs:string" minOccurs="0"/>
      <xs:element name="SubmitTime" type="xs:dateTime" minOccurs="0"/>
      <xs:element name="OriginalRecipients" type="t:ArrayOfEmailAddressesType" minOccurs="0" />
      <xs:element name="RecipientTrackingEvents" type="t:ArrayOfRecipientTrackingEventType" />
      <xs:element name="Properties" type="t:ArrayOfTrackingPropertiesType" minOccurs="0" />
    </xs:all>
  </xs:complexType>

  <xs:complexType name="TrackingPropertyType">
    <xs:sequence>
      <xs:element name="Name" type="xs:string"  minOccurs="1" maxOccurs="1"/>
      <xs:element name="Value" type="xs:string" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfTrackingPropertiesType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="TrackingPropertyType" type="t:TrackingPropertyType" />
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="ArrayOfArraysOfTrackingPropertiesType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="ArrayOfTrackingPropertiesType" type="t:ArrayOfTrackingPropertiesType" />
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="ArrayOfRecipientTrackingEventType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="RecipientTrackingEvent" type="t:RecipientTrackingEventType"/>
    </xs:choice>
  </xs:complexType>

  <!-- Rules -->
  <xs:complexType name="RulePredicateSizeRangeType">
    <xs:annotation>
      <xs:documentation>Size range type used for the WithinSizeRange rule predicate.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="MinimumSize" type="xs:int" minOccurs="0" maxOccurs="1" />
      <xs:element name="MaximumSize" type="xs:int" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="RulePredicateDateRangeType">
    <xs:annotation>
      <xs:documentation>Date range type used for the WithinDateRange rule predicate.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="StartDateTime" type="xs:dateTime" minOccurs="0" maxOccurs="1" />
      <xs:element name="EndDateTime" type="xs:dateTime" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="FlaggedForActionType">
    <xs:annotation>
      <xs:documentation>Flagged for action enumeration, currently used in FlaggedForAction rule predicate</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="Any" />
      <xs:enumeration value="Call" />
      <xs:enumeration value="DoNotForward" />
      <xs:enumeration value="FollowUp" />
      <xs:enumeration value="FYI" />
      <xs:enumeration value="Forward" />
      <xs:enumeration value="NoResponseNecessary" />
      <xs:enumeration value="Read" />
      <xs:enumeration value="Reply" />
      <xs:enumeration value="ReplyToAll" />
      <xs:enumeration value="Review" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="RulePredicatesType">
    <xs:annotation>
      <xs:documentation>Rule predicates, used as rule conditions or exceptions</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Categories" type="t:ArrayOfStringsType" minOccurs="0" maxOccurs="1" />
      <xs:element name="ContainsBodyStrings" type="t:ArrayOfStringsType" minOccurs="0" maxOccurs="1" />
      <xs:element name="ContainsHeaderStrings" type="t:ArrayOfStringsType" minOccurs="0" maxOccurs="1" />
      <xs:element name="ContainsRecipientStrings" type="t:ArrayOfStringsType" minOccurs="0" maxOccurs="1" />
      <xs:element name="ContainsSenderStrings" type="t:ArrayOfStringsType" minOccurs="0" maxOccurs="1" />
      <xs:element name="ContainsSubjectOrBodyStrings" type="t:ArrayOfStringsType" minOccurs="0" maxOccurs="1" />
      <xs:element name="ContainsSubjectStrings" type="t:ArrayOfStringsType" minOccurs="0" maxOccurs="1" />
      <xs:element name="FlaggedForAction" type="t:FlaggedForActionType" minOccurs="0" maxOccurs="1" />
      <xs:element name="FromAddresses" type="t:ArrayOfEmailAddressesType" minOccurs="0" maxOccurs="1" />
      <xs:element name="FromConnectedAccounts" type="t:ArrayOfStringsType" minOccurs="0" maxOccurs="1" />
      <xs:element name="HasAttachments" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="Importance" type="t:ImportanceChoicesType" minOccurs="0" maxOccurs="1" />
      <xs:element name="IsApprovalRequest" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="IsAutomaticForward" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="IsAutomaticReply" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="IsEncrypted" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="IsMeetingRequest" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="IsMeetingResponse" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="IsNDR" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="IsPermissionControlled" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="IsReadReceipt" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="IsSigned" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="IsVoicemail" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="ItemClasses" type="t:ArrayOfStringsType" minOccurs="0" maxOccurs="1" />
      <xs:element name="MessageClassifications" type="t:ArrayOfStringsType" minOccurs="0" maxOccurs="1" />
      <xs:element name="NotSentToMe" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="SentCcMe" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="SentOnlyToMe" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="SentToAddresses" type="t:ArrayOfEmailAddressesType" minOccurs="0" maxOccurs="1" />
      <xs:element name="SentToMe" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="SentToOrCcMe" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="Sensitivity" type="t:SensitivityChoicesType" minOccurs="0" maxOccurs="1" />
      <xs:element name="WithinDateRange" type="t:RulePredicateDateRangeType" minOccurs="0" maxOccurs="1" />
      <xs:element name="WithinSizeRange" type="t:RulePredicateSizeRangeType" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="RuleActionsType">
    <xs:annotation>
      <xs:documentation>Rule actions</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="AssignCategories" type="t:ArrayOfStringsType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="CopyToFolder" type="t:TargetFolderIdType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Delete" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ForwardAsAttachmentToRecipients" type="t:ArrayOfEmailAddressesType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ForwardToRecipients" type="t:ArrayOfEmailAddressesType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="MarkImportance" type="t:ImportanceChoicesType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="MarkAsRead" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
      <xs:element name="MoveToFolder" type="t:TargetFolderIdType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="PermanentDelete" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
      <xs:element name="RedirectToRecipients" type="t:ArrayOfEmailAddressesType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="SendSMSAlertToRecipients" type="t:ArrayOfEmailAddressesType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ServerReplyWithMessage" type="t:ItemIdType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="StopProcessingRules" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="RuleType">
    <xs:annotation>
      <xs:documentation>Rule type</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="RuleId" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="DisplayName" type="xs:string" minOccurs="1" maxOccurs="1" />
      <xs:element name="Priority" type="xs:int" minOccurs="1" maxOccurs="1" />
      <xs:element name="IsEnabled" type="xs:boolean" minOccurs="1" maxOccurs="1" />
      <xs:element name="IsNotSupported" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="IsInError" type="xs:boolean" minOccurs="0" maxOccurs="1" />
      <xs:element name="Conditions" type="t:RulePredicatesType" minOccurs="0" maxOccurs="1" />
      <xs:element name="Exceptions" type="t:RulePredicatesType" minOccurs="0" maxOccurs="1" />
      <xs:element name="Actions" type="t:RuleActionsType" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfRulesType">
    <xs:annotation>
      <xs:documentation>Array of rule objects</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Rule" type="t:RuleType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name="RuleFieldURIType">
    <xs:annotation>
      <xs:documentation>Rule field URI enumerates all possible rule fields that could trigger validation error</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="RuleId" />
      <xs:enumeration value="DisplayName" />
      <xs:enumeration value="Priority" />
      <xs:enumeration value="IsNotSupported" />
      <xs:enumeration value="Actions" />
      <xs:enumeration value="Condition:Categories" />
      <xs:enumeration value="Condition:ContainsBodyStrings" />
      <xs:enumeration value="Condition:ContainsHeaderStrings" />
      <xs:enumeration value="Condition:ContainsRecipientStrings" />
      <xs:enumeration value="Condition:ContainsSenderStrings" />
      <xs:enumeration value="Condition:ContainsSubjectOrBodyStrings" />
      <xs:enumeration value="Condition:ContainsSubjectStrings" />
      <xs:enumeration value="Condition:FlaggedForAction" />
      <xs:enumeration value="Condition:FromAddresses" />
      <xs:enumeration value="Condition:FromConnectedAccounts" />
      <xs:enumeration value="Condition:HasAttachments" />
      <xs:enumeration value="Condition:Importance" />
      <xs:enumeration value="Condition:IsApprovalRequest" />
      <xs:enumeration value="Condition:IsAutomaticForward" />
      <xs:enumeration value="Condition:IsAutomaticReply" />
      <xs:enumeration value="Condition:IsEncrypted" />
      <xs:enumeration value="Condition:IsMeetingRequest" />
      <xs:enumeration value="Condition:IsMeetingResponse" />
      <xs:enumeration value="Condition:IsNDR" />
      <xs:enumeration value="Condition:IsPermissionControlled" />
      <xs:enumeration value="Condition:IsReadReceipt" />
      <xs:enumeration value="Condition:IsSigned" />
      <xs:enumeration value="Condition:IsVoicemail" />
      <xs:enumeration value="Condition:ItemClasses" />
      <xs:enumeration value="Condition:MessageClassifications" />
      <xs:enumeration value="Condition:NotSentToMe" />
      <xs:enumeration value="Condition:SentCcMe" />
      <xs:enumeration value="Condition:SentOnlyToMe" />
      <xs:enumeration value="Condition:SentToAddresses" />
      <xs:enumeration value="Condition:SentToMe" />
      <xs:enumeration value="Condition:SentToOrCcMe" />
      <xs:enumeration value="Condition:Sensitivity" />
      <xs:enumeration value="Condition:WithinDateRange" />
      <xs:enumeration value="Condition:WithinSizeRange" />
      <xs:enumeration value="Exception:Categories" />
      <xs:enumeration value="Exception:ContainsBodyStrings" />
      <xs:enumeration value="Exception:ContainsHeaderStrings" />
      <xs:enumeration value="Exception:ContainsRecipientStrings" />
      <xs:enumeration value="Exception:ContainsSenderStrings" />
      <xs:enumeration value="Exception:ContainsSubjectOrBodyStrings" />
      <xs:enumeration value="Exception:ContainsSubjectStrings" />
      <xs:enumeration value="Exception:FlaggedForAction" />
      <xs:enumeration value="Exception:FromAddresses" />
      <xs:enumeration value="Exception:FromConnectedAccounts" />
      <xs:enumeration value="Exception:HasAttachments" />
      <xs:enumeration value="Exception:Importance" />
      <xs:enumeration value="Exception:IsApprovalRequest" />
      <xs:enumeration value="Exception:IsAutomaticForward" />
      <xs:enumeration value="Exception:IsAutomaticReply" />
      <xs:enumeration value="Exception:IsEncrypted" />
      <xs:enumeration value="Exception:IsMeetingRequest" />
      <xs:enumeration value="Exception:IsMeetingResponse" />
      <xs:enumeration value="Exception:IsNDR" />
      <xs:enumeration value="Exception:IsPermissionControlled" />
      <xs:enumeration value="Exception:IsReadReceipt" />
      <xs:enumeration value="Exception:IsSigned" />
      <xs:enumeration value="Exception:IsVoicemail" />
      <xs:enumeration value="Exception:ItemClasses" />
      <xs:enumeration value="Exception:MessageClassifications" />
      <xs:enumeration value="Exception:NotSentToMe" />
      <xs:enumeration value="Exception:SentCcMe" />
      <xs:enumeration value="Exception:SentOnlyToMe" />
      <xs:enumeration value="Exception:SentToAddresses" />
      <xs:enumeration value="Exception:SentToMe" />
      <xs:enumeration value="Exception:SentToOrCcMe" />
      <xs:enumeration value="Exception:Sensitivity" />
      <xs:enumeration value="Exception:WithinDateRange" />
      <xs:enumeration value="Exception:WithinSizeRange" />
      <xs:enumeration value="Action:AssignCategories" />
      <xs:enumeration value="Action:CopyToFolder" />
      <xs:enumeration value="Action:Delete" />
      <xs:enumeration value="Action:ForwardAsAttachmentToRecipients" />
      <xs:enumeration value="Action:ForwardToRecipients" />
      <xs:enumeration value="Action:MarkImportance" />
      <xs:enumeration value="Action:MarkAsRead" />
      <xs:enumeration value="Action:MoveToFolder" />
      <xs:enumeration value="Action:PermanentDelete" />
      <xs:enumeration value="Action:RedirectToRecipients" />
      <xs:enumeration value="Action:SendSMSAlertToRecipients" />
      <xs:enumeration value="Action:ServerReplyWithMessage" />
      <xs:enumeration value="Action:StopProcessingRules" />
      <xs:enumeration value="IsEnabled" />
      <xs:enumeration value="IsInError" />
      <xs:enumeration value="Conditions" />
      <xs:enumeration value="Exceptions" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="RuleValidationErrorCodeType">
    <xs:annotation>
      <xs:documentation>Rule validation error code describing what failed validation for each rule predicate or action.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="ADOperationFailure" />
      <xs:enumeration value="ConnectedAccountNotFound" />
      <xs:enumeration value="CreateWithRuleId" />
      <xs:enumeration value="EmptyValueFound" />
      <xs:enumeration value="DuplicatedPriority" />
      <xs:enumeration value="DuplicatedOperationOnTheSameRule" />
      <xs:enumeration value="FolderDoesNotExist" />
      <xs:enumeration value="InvalidAddress" />
      <xs:enumeration value="InvalidDateRange" />
      <xs:enumeration value="InvalidFolderId" />
      <xs:enumeration value="InvalidSizeRange" />
      <xs:enumeration value="InvalidValue" />
      <xs:enumeration value="MessageClassificationNotFound" />
      <xs:enumeration value="MissingAction" />
      <xs:enumeration value="MissingParameter" />
      <xs:enumeration value="MissingRangeValue" />
      <xs:enumeration value="NotSettable" />
      <xs:enumeration value="RecipientDoesNotExist" />
      <xs:enumeration value="RuleNotFound" />
      <xs:enumeration value="SizeLessThanZero" />
      <xs:enumeration value="StringValueTooBig" />
      <xs:enumeration value="UnsupportedAddress" />
      <xs:enumeration value="UnexpectedError" />
      <xs:enumeration value="UnsupportedRule" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="RuleValidationErrorType">
    <xs:annotation>
      <xs:documentation>Represents a single validation error on a particular rule property value, predicate property value or action property value</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="FieldURI" type="t:RuleFieldURIType" minOccurs="1" maxOccurs="1" />
      <xs:element name="ErrorCode" type="t:RuleValidationErrorCodeType" minOccurs ="1" maxOccurs="1" />
      <xs:element name="ErrorMessage" type="xs:string" minOccurs="1" maxOccurs="1" />
      <xs:element name="FieldValue" type="xs:string" minOccurs="1" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfRuleValidationErrorsType">
    <xs:annotation>
      <xs:documentation>Represents an array of rule validation errors</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Error" type="t:RuleValidationErrorType" minOccurs="1" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="RuleOperationType" abstract="true">
    <xs:annotation>
      <xs:documentation>Represents a rule operation to be performed</xs:documentation>
    </xs:annotation>
  </xs:complexType>

  <xs:complexType name="ArrayOfRuleOperationsType">
    <xs:annotation>
      <xs:documentation>Represents an array of rule operations to be performed</xs:documentation>
    </xs:annotation>
    <xs:choice minOccurs="1" maxOccurs="unbounded">
      <xs:element name="CreateRuleOperation" type="t:CreateRuleOperationType" />
      <xs:element name="SetRuleOperation" type="t:SetRuleOperationType" />
      <xs:element name="DeleteRuleOperation" type="t:DeleteRuleOperationType" />
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="CreateRuleOperationType">
    <xs:complexContent>
      <xs:extension base="t:RuleOperationType">
        <xs:sequence>
          <xs:element name="Rule" type="t:RuleType" minOccurs="1" maxOccurs="1" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="SetRuleOperationType">
    <xs:complexContent>
      <xs:extension base="t:RuleOperationType">
        <xs:sequence>
          <xs:element name="Rule" type="t:RuleType" minOccurs="1" maxOccurs="1" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="DeleteRuleOperationType">
    <xs:complexContent>
      <xs:extension base="t:RuleOperationType">
        <xs:sequence>
          <xs:element name="RuleId" type="xs:string" minOccurs="1" maxOccurs="1" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="RuleOperationErrorType">
    <xs:sequence>
      <xs:element name="OperationIndex" type="xs:int" minOccurs="1" maxOccurs="1" />
      <xs:element name="ValidationErrors" type="t:ArrayOfRuleValidationErrorsType" minOccurs="1" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfRuleOperationErrorsType">
    <xs:sequence>
      <xs:element name="RuleOperationError" type="t:RuleOperationErrorType" minOccurs="1" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <!-- Begin of mailbox search related types section -->

  <xs:simpleType name="SearchItemKindType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Email" />
      <xs:enumeration value="Meetings" />
      <xs:enumeration value="Tasks" />
      <xs:enumeration value="Notes" />
      <xs:enumeration value="Docs" />
      <xs:enumeration value="Journals" />
      <xs:enumeration value="Contacts" />
      <xs:enumeration value="Im" />
      <xs:enumeration value="Voicemail" />
      <xs:enumeration value="Faxes" />
      <xs:enumeration value="Posts" />
      <xs:enumeration value="Rssfeeds" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="ArrayOfSearchItemKindsType">
    <xs:annotation>
      <xs:documentation>
        Array of search item kind enum.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="SearchItemKind" type="t:SearchItemKindType" minOccurs="1" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="UserMailboxType">
    <xs:annotation>
      <xs:documentation>
        User Mailbox.
      </xs:documentation>
    </xs:annotation>
    <xs:attribute name="Id" type="xs:string" use="required"/>
    <xs:attribute name="IsArchive" type="xs:boolean" use="required"/>
  </xs:complexType>

  <xs:complexType name="ArrayOfUserMailboxesType">
    <xs:annotation>
      <xs:documentation>
        Array of user mailbox.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="UserMailbox" type="t:UserMailboxType" minOccurs="1" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SearchableMailboxType">
    <xs:annotation>
      <xs:documentation>
        Searchable mailbox.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Guid" type="t:GuidType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="PrimarySmtpAddress" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="IsExternalMailbox" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
      <xs:element name="ExternalEmailAddress" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="DisplayName" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="IsMembershipGroup" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
      <xs:element name="ReferenceId" type="xs:string" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfSearchableMailboxesType">
    <xs:annotation>
      <xs:documentation>
        Array of searchable mailbox.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="SearchableMailbox" type="t:SearchableMailboxType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="KeywordStatisticsSearchResultType">
    <xs:annotation>
      <xs:documentation>
        Keyword statistics search result.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Keyword" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="ItemHits" type="xs:int" minOccurs="1" maxOccurs="1"/>
      <xs:element name="Size" type="xs:long" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfKeywordStatisticsSearchResultsType">
    <xs:annotation>
      <xs:documentation>
        Array of keyword statistics result.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="KeywordStat" type="t:KeywordStatisticsSearchResultType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="MailboxStatisticsSearchResultType">
    <xs:annotation>
      <xs:documentation>
        Mailbox statistics search result.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="UserMailbox" type="t:UserMailboxType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="KeywordStatisticsSearchResult" type="t:KeywordStatisticsSearchResultType" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>


  <xs:complexType name="ExtendedAttributeType">
    <xs:annotation>
      <xs:documentation>
        Extended attributes of a target mailbox.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Name" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="Value" type="xs:string" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfExtendedAttributesType">
    <xs:annotation>
      <xs:documentation>
        Array of extended attributes of a target mailbox
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="ExtendedAttribute" type="t:ExtendedAttributeType" minOccurs="0" maxOccurs="unbounded" nillable="false"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="MailboxSearchLocationType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="PrimaryOnly" />
      <xs:enumeration value="ArchiveOnly" />
      <xs:enumeration value="All" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="MailboxSearchScopeType">
    <xs:annotation>
      <xs:documentation>
        Set of mailbox, search scope and its extended attributes.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Mailbox" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="SearchScope" type="t:MailboxSearchLocationType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="ExtendedAttributes" type="t:ArrayOfExtendedAttributesType" minOccurs="0" maxOccurs="1" nillable="false"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="NonEmptyArrayOfMailboxSearchScopesType">
    <xs:annotation>
      <xs:documentation>
        Array of mailbox and its search scope.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="MailboxSearchScope" type="t:MailboxSearchScopeType" minOccurs="1" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="MailboxQueryType">
    <xs:annotation>
      <xs:documentation>
        Pair of query and a set of mailbox search scopes.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Query" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="MailboxSearchScopes" type="t:NonEmptyArrayOfMailboxSearchScopesType" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PreviewItemMailboxType">
    <xs:annotation>
      <xs:documentation>
        Mailbox information for each preview item.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="MailboxId" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="PrimarySmtpAddress" type="xs:string" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="NonEmptyArrayOfMailboxQueriesType">
    <xs:annotation>
      <xs:documentation>
        Array of query and mailboxes.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="MailboxQuery" type="t:MailboxQueryType" minOccurs="1" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="SearchResultType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="StatisticsOnly" />
      <xs:enumeration value="PreviewOnly" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="SearchPageDirectionType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Previous" />
      <xs:enumeration value="Next" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="PreviewItemBaseShapeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Default" />
      <xs:enumeration value="Compact" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="NonEmptyArrayOfExtendedFieldURIsType">
    <xs:choice maxOccurs="unbounded">
      <xs:element name="ExtendedFieldURI" type="t:PathToExtendedFieldType"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="PreviewItemResponseShapeType">
    <xs:sequence>
      <xs:element name="BaseShape" type="t:PreviewItemBaseShapeType" minOccurs="1" maxOccurs="1" />
      <xs:element name="AdditionalProperties" type="t:NonEmptyArrayOfExtendedFieldURIsType" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SearchPreviewItemType">
    <xs:annotation>
      <xs:documentation>
        Mailbox search preview item.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Id" type="t:ItemIdType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="Mailbox" type="t:PreviewItemMailboxType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ParentId" type="t:ItemIdType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ItemClass" type="t:ItemClassType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="UniqueHash" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="SortValue" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="OwaLink" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Sender" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ToRecipients" type="t:ArrayOfSmtpAddressType" minOccurs="0"  maxOccurs="1"/>
      <xs:element name="CcRecipients" type="t:ArrayOfSmtpAddressType" minOccurs="0"  maxOccurs="1"/>
      <xs:element name="BccRecipients" type="t:ArrayOfSmtpAddressType" minOccurs="0"  maxOccurs="1"/>
      <xs:element name="CreatedTime" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ReceivedTime" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
      <xs:element name="SentTime" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Subject" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Size" type="xs:long" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Preview" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Importance" type="t:ImportanceChoicesType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Read" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
      <xs:element name="HasAttachment" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ExtendedProperties" type="t:NonEmptyArrayOfExtendedPropertyType" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfSearchPreviewItemsType">
    <xs:annotation>
      <xs:documentation>
        Array of search preview item.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="SearchPreviewItem" type="t:SearchPreviewItemType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="FailedSearchMailboxType">
    <xs:annotation>
      <xs:documentation>
        Mailbox failed on search and its error message.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Mailbox" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="ErrorCode" type="xs:int" minOccurs="1" maxOccurs="1"/>
      <xs:element name="ErrorMessage" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="IsArchive" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfFailedSearchMailboxesType">
    <xs:annotation>
      <xs:documentation>
        Array of failed mailbox and error message.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="FailedMailbox" type="t:FailedSearchMailboxType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SearchMailboxesResultType">
    <xs:annotation>
      <xs:documentation>
        Mailboxes search result.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="SearchQueries" type="t:NonEmptyArrayOfMailboxQueriesType" minOccurs="1"/>
      <xs:element name="ResultType" type="t:SearchResultType" minOccurs="1"/>
      <xs:element name="ItemCount" type="xs:long" minOccurs="1"/>
      <xs:element name="Size" type="xs:long" minOccurs="1"/>
      <xs:element name="PageItemCount" type="xs:int" minOccurs="1"/>
      <xs:element name="PageItemSize" type="xs:long" minOccurs="1"/>
      <xs:element name="KeywordStats" type="t:ArrayOfKeywordStatisticsSearchResultsType" minOccurs="0"/>
      <xs:element name="Items" type="t:ArrayOfSearchPreviewItemsType" minOccurs="0"/>
      <xs:element name="FailedMailboxes" type="t:ArrayOfFailedSearchMailboxesType" minOccurs="0"/>
      <xs:element name="Refiners" type="t:ArrayOfSearchRefinerItemsType" minOccurs="0"/>
      <xs:element name="MailboxStats" type="t:ArrayOfMailboxStatisticsItemsType" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SearchRefinerItemType">
    <xs:annotation>
      <xs:documentation>
        Search refiner item.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Name" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="Value" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="Count" type="xs:long" minOccurs="1" maxOccurs="1"/>
      <xs:element name="Token" type="xs:string" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfSearchRefinerItemsType">
    <xs:annotation>
      <xs:documentation>
        Array of search refiner item.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Refiner" type="t:SearchRefinerItemType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="OneDriveItemType">
    <xs:complexContent>
      <xs:extension base="t:ItemType">
        <xs:annotation>
          <xs:documentation>
            OneDrive search result item.
          </xs:documentation>
        </xs:annotation>
        <xs:sequence>
          <xs:element name="ResourceId" type="xs:string" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="FileItemType">
    <xs:complexContent>
      <xs:extension base="t:ItemType">
        <xs:annotation>
          <xs:documentation>
            File search result item.
          </xs:documentation>
        </xs:annotation>
        <xs:sequence>
          
          <!-- File properties -->
          <xs:element name="FileName" type="xs:string" minOccurs="0" maxOccurs="1" />
          <xs:element name="FileExtension" type="xs:string" minOccurs="0" maxOccurs="1" />
          <xs:element name="FileSize" type="xs:long" minOccurs="0" maxOccurs="1" />
          <xs:element name="FileCreatedTime" type="xs:string" minOccurs="0" maxOccurs="1" />
          <xs:element name="FileModifiedTime" type="xs:string" minOccurs="0" maxOccurs="1" />
          <xs:element name="StorageProviderContext" type="xs:string" minOccurs="0" maxOccurs="1" />
          <xs:element name="FileID" type="xs:string" minOccurs="0" maxOccurs="1" />
          <xs:element name="ItemReferenceId" type="xs:string" minOccurs="0" maxOccurs="1" />
          <xs:element name="ReferenceId" type="xs:string" minOccurs="0" maxOccurs="1" />
          <xs:element name="Sender" type="xs:string" minOccurs="0" maxOccurs="1" />
          <xs:element name="ItemReceivedTime" type="xs:string" minOccurs="0" maxOccurs="1" />
          <xs:element name="ItemPath" type="xs:string" minOccurs="0" maxOccurs="1" />
          <xs:element name="ItemSentTime" type="xs:string" minOccurs="0" maxOccurs="1" />
          <xs:element name="FileContexts" type="t:ArrayOfStringsType" minOccurs="0" maxOccurs="1" />
          <xs:element name="VisualizationContainerUrl" type="xs:string" minOccurs="0" maxOccurs="1" />
          <xs:element name="VisualizationContainerTitle" type="xs:string" minOccurs="0" maxOccurs="1" />
          <xs:element name="VisualizationAccessUrl" type="xs:string" minOccurs="0" maxOccurs="1" />
          <xs:element name="ReferenceAttachmentProviderEndpoint" type="xs:string" minOccurs="0" maxOccurs="1" />
          <xs:element name="ReferenceAttachmentProviderType" type="xs:string" minOccurs="0" maxOccurs="1" />
          <xs:element name="ItemConversationId" type="xs:string" minOccurs="0" maxOccurs="1" />
          <xs:element name="SharepointItemListId" type="t:GuidType" minOccurs="0" maxOccurs="1" />
          <xs:element name="SharepointItemListItemId" type="xs:string" minOccurs="0" maxOccurs="1" />
          <xs:element name="SharepointItemSiteId" type="t:GuidType" minOccurs="0" maxOccurs="1" />
          <xs:element name="SharepointItemSitePath" type="xs:string" minOccurs="0" maxOccurs="1" />
          <xs:element name="SharepointItemWebId" type="t:GuidType" minOccurs="0" maxOccurs="1" />
          <xs:element name="AttachmentId" type="xs:string" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- Document file item type -->
  <xs:complexType name="DocumentFileItemType">
    <xs:complexContent>
      <xs:extension base="t:FileItemType">
        <xs:sequence>
          <xs:element name="Author" type="t:ArrayOfStringsType" minOccurs="0" maxOccurs="1" />
          <xs:element name="Title" type="xs:string" minOccurs="0" maxOccurs="1" />
          <xs:element name="LastModifiedBy" type="xs:string" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  
    <xs:complexType name="DelveItemType">
    <xs:complexContent>
      <xs:extension base="t:ItemType">
        <xs:annotation>
          <xs:documentation>
            Delve search result item.
          </xs:documentation>
        </xs:annotation>
        <xs:sequence>
          <xs:element name="GraphNodeLogicalId" type="xs:string" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="MailboxStatisticsItemType">
    <xs:annotation>
      <xs:documentation>
        Mailbox statistics item.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="MailboxId" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="DisplayName" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="ItemCount" type="xs:long" minOccurs="1" maxOccurs="1"/>
      <xs:element name="Size" type="xs:long" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfMailboxStatisticsItemsType">
    <xs:annotation>
      <xs:documentation>
        Array of mailbox statistics item.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="MailboxStat" type="t:MailboxStatisticsItemType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="HoldActionType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Create" />
      <xs:enumeration value="Update" />
      <xs:enumeration value="Remove" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="HoldStatusType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="NotOnHold" />
      <xs:enumeration value="Pending" />
      <xs:enumeration value="OnHold" />
      <xs:enumeration value="PartialHold" />
      <xs:enumeration value="Failed" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="MailboxHoldStatusType">
    <xs:annotation>
      <xs:documentation>
        Mailbox hold status.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Mailbox" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="Status" type="t:HoldStatusType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="AdditionalInfo" type="xs:string" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfMailboxHoldStatusType">
    <xs:annotation>
      <xs:documentation>
        Array of mailbox hold status.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="MailboxHoldStatus" type="t:MailboxHoldStatusType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="MailboxHoldResultType">
    <xs:annotation>
      <xs:documentation>
        Mailbox hold result.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="HoldId" type="xs:string"/>
      <xs:element name="Query" type="xs:string" minOccurs="0"/>
      <xs:element name="MailboxHoldStatuses" type="t:ArrayOfMailboxHoldStatusType"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="NonEmptyArrayOfLegacyDNsType">
    <xs:sequence>
      <xs:element name="LegacyDN" type="xs:string" minOccurs="1" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="NonIndexableItemStatisticType">
    <xs:annotation>
      <xs:documentation>
        Non indexable item statistic.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Mailbox" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="ItemCount" type="xs:long" minOccurs="1" maxOccurs="1"/>
      <xs:element name="ErrorMessage" type="xs:string" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfNonIndexableItemStatisticsType">
    <xs:annotation>
      <xs:documentation>
        Array of non indexable item statistics.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="NonIndexableItemStatistic" type="t:NonIndexableItemStatisticType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="ItemIndexErrorType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None" />
      <xs:enumeration value="GenericError" />
      <xs:enumeration value="Timeout" />
      <xs:enumeration value="StaleEvent" />
      <xs:enumeration value="MailboxOffline" />
      <xs:enumeration value="AttachmentLimitReached" />
      <xs:enumeration value="MarsWriterTruncation" />
      <xs:enumeration value="DocumentParserFailure" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="NonIndexableItemDetailType">
    <xs:annotation>
      <xs:documentation>
        Non indexable item detail.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="ItemId" type="t:ItemIdType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="ErrorCode" type="t:ItemIndexErrorType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="ErrorDescription" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="IsPartiallyIndexed" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
      <xs:element name="IsPermanentFailure" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
      <xs:element name="SortValue" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="AttemptCount" type="xs:int" minOccurs="1" maxOccurs="1"/>
      <xs:element name="LastAttemptTime" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
      <xs:element name="AdditionalInfo" type="xs:string" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfNonIndexableItemDetailsType">
    <xs:annotation>
      <xs:documentation>
        Array of non indexable item details.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="NonIndexableItemDetail" type="t:NonIndexableItemDetailType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="NonIndexableItemDetailResultType">
    <xs:annotation>
      <xs:documentation>
        Non indexable item details result.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Items" type="t:ArrayOfNonIndexableItemDetailsType" minOccurs="0"/>
      <xs:element name="FailedMailboxes" type="t:ArrayOfFailedSearchMailboxesType" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="DiscoverySearchConfigurationType">
    <xs:annotation>
      <xs:documentation>
        Discovery search configuration.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="SearchId" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="SearchQuery" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="SearchableMailboxes" type="t:ArrayOfSearchableMailboxesType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="InPlaceHoldIdentity" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ManagedByOrganization" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Language" type="xs:string" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfDiscoverySearchConfigurationType">
    <xs:annotation>
      <xs:documentation>
        Array of discovery search configuration.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="DiscoverySearchConfiguration" type="t:DiscoverySearchConfigurationType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <!-- End of mailbox search related types section -->

  <!-- Retention tag guid with retention tag type attribute -->
  <xs:complexType name="RetentionTagType">
    <xs:simpleContent>
      <xs:extension base="t:GuidType">
        <xs:attribute name="IsExplicit" type="xs:boolean" use="required" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:simpleType name="UserPhotoSizeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="HR48x48" />
      <xs:enumeration value="HR64x64" />
      <xs:enumeration value="HR96x96" />
      <xs:enumeration value="HR120x120" />
      <xs:enumeration value="HR240x240" />
      <xs:enumeration value="HR360x360" />
      <xs:enumeration value="HR432x432" />
      <xs:enumeration value="HR504x504" />
      <xs:enumeration value="HR648x648" />
      <xs:enumeration value="HR1024xN" />
      <xs:enumeration value="HR1920xN" />
    </xs:restriction>
  </xs:simpleType>
  
  <xs:simpleType name="UserPhotoTypeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="UserPhoto" />
      <xs:enumeration value="ProfileHeaderPhoto" />
    </xs:restriction>
  </xs:simpleType>

  <!-- Begin of MRM related types section -->

  <xs:simpleType name="ElcFolderType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Calendar"/>
      <xs:enumeration value="Contacts"/>
      <xs:enumeration value="DeletedItems"/>
      <xs:enumeration value="Drafts"/>
      <xs:enumeration value="Inbox"/>
      <xs:enumeration value="JunkEmail"/>
      <xs:enumeration value="Journal"/>
      <xs:enumeration value="Notes"/>
      <xs:enumeration value="Outbox"/>
      <xs:enumeration value="SentItems"/>
      <xs:enumeration value="Tasks"/>
      <xs:enumeration value="All"/>
      <xs:enumeration value="ManagedCustomFolder"/>
      <xs:enumeration value="RssSubscriptions"/>
      <xs:enumeration value="SyncIssues"/>
      <xs:enumeration value="ConversationHistory"/>
      <xs:enumeration value="Personal"/>
      <xs:enumeration value="RecoverableItems"/>
      <xs:enumeration value="NonIpmRoot"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="RetentionActionType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None"/>
      <xs:enumeration value="MoveToDeletedItems"/>
      <xs:enumeration value="MoveToFolder"/>
      <xs:enumeration value="DeleteAndAllowRecovery"/>
      <xs:enumeration value="PermanentlyDelete"/>
      <xs:enumeration value="MarkAsPastRetentionLimit"/>
      <xs:enumeration value="MoveToArchive"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="RetentionPolicyTagType">
    <xs:annotation>
      <xs:documentation>
        Retention policy tag.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="DisplayName" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="RetentionId" type="t:GuidType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="RetentionPeriod" type="xs:int" minOccurs="1" maxOccurs="1"/>
      <xs:element name="Type" type="t:ElcFolderType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="RetentionAction" type="t:RetentionActionType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="Description" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="IsVisible" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
      <xs:element name="OptedInto" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
      <xs:element name="IsArchive" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
      <xs:element name="ParentLabelIdentity" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Priority" type="xs:int" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfRetentionPolicyTagsType">
    <xs:annotation>
      <xs:documentation>
        Array of retention policy tags.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="RetentionPolicyTag" type="t:RetentionPolicyTagType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="RetentionType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Delete"/>
      <xs:enumeration value="Archive"/>
    </xs:restriction>
  </xs:simpleType>

  <!-- End of MRM related types section -->

  <!-- Begin of Client Extensibility related types section -->

  <xs:simpleType name="ClientExtensionProvidedToType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Everyone" />
      <xs:enumeration value="SpecificUsers" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ClientExtensionTypeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Default" />
      <xs:enumeration value="Private" />
      <xs:enumeration value="MarketPlace" />
      <xs:enumeration value="PrivateCatalog" />
      <xs:enumeration value="MarketplacePrivateCatalog" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ClientExtensionScopeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None" />
      <xs:enumeration value="User" />
      <xs:enumeration value="Organization" />
      <xs:enumeration value="Default" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="ClientExtensionType">
    <xs:sequence>
      <xs:element name="SpecificUsers" type="t:ArrayOfStringsType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Manifest" type="xs:base64Binary" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
    <xs:attribute name="IsAvailable" type="xs:boolean" use="optional"/>
    <xs:attribute name="IsMandatory" type="xs:boolean" use="optional"/>
    <xs:attribute name="IsEnabledByDefault" type="xs:boolean" use="optional"/>
    <xs:attribute name="ProvidedTo" type="t:ClientExtensionProvidedToType" use="optional"/>
    <xs:attribute name="Type" type="t:ClientExtensionTypeType" use="optional"/>
    <xs:attribute name="Scope" type="t:ClientExtensionScopeType" use="optional"/>
    <xs:attribute name="MarketplaceAssetId" type="xs:string" use="optional"/>
    <xs:attribute name="MarketplaceContentMarket" type="xs:string" use="optional"/>
    <xs:attribute name="AppStatus" type="xs:string" use="optional"/>
    <xs:attribute name="Etoken" type="xs:string" use="optional"/>
    <xs:attribute name="InstalledDateTime" type="xs:string" use="optional"/>
  </xs:complexType>

  <xs:simpleType name="ConsentStateType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="NotResponded"/>
      <xs:enumeration value="NotConsented"/>
      <xs:enumeration value="Consented"/>
    </xs:restriction>
  </xs:simpleType>
  <!-- End of Client Extensibility related types section -->

  <!-- Begin of UCS related types section -->

  <xs:complexType name="ImGroupType">
    <xs:annotation>
      <xs:documentation>
        A Group on the ImContactList, with one or more members
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="DisplayName" type="t:NonEmptyStringType"/>
      <xs:element name="GroupType" type="t:NonEmptyStringType"/>
      <xs:element name="ExchangeStoreId" type="t:ItemIdType" minOccurs="0"/>
      <xs:element name="MemberCorrelationKey" type="t:NonEmptyArrayOfItemIdsType" minOccurs="0"/>
      <xs:element name="ExtendedProperties" type="t:NonEmptyArrayOfExtendedPropertyType" minOccurs="0"/>
      <xs:element name="SmtpAddress" type="xs:string" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfImGroupType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="ImGroup" type="t:ImGroupType"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="ImItemListType">
    <xs:annotation>
      <xs:documentation>
        IM Contact List
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Groups" type="t:ArrayOfImGroupType" minOccurs="0"/>
      <xs:element name="Personas" type="t:ArrayOfPeopleType" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <!-- UCS methods only allow specification of extended properties -->
  <xs:complexType name="NonEmptyArrayOfExtendedFieldURIs">
    <xs:choice maxOccurs="unbounded">
      <xs:element name="ExtendedProperty" type="t:PathToExtendedFieldType"/>
    </xs:choice>
  </xs:complexType>

  <!-- End of UCS related types section -->
  <!-- UM Mailbox Pin related types section  -->

  <xs:simpleType name="DisableReasonType">
    <xs:annotation>
      <xs:documentation>List of possible reasons for disabling the client extension</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="NoReason"/>
      <xs:enumeration value="OutlookClientPerformance" />
      <xs:enumeration value="OWAClientPerformance" />
      <xs:enumeration value="MobileClientPerformance" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="NonEmptyStateDefinitionType">
    <xs:choice minOccurs="0">
      <xs:element name="DeletedOccurrenceStateDefinition" type="t:DeletedOccurrenceStateDefinitionType" />
      <xs:element name="DeleteFromFolderStateDefinition" type="t:DeleteFromFolderStateDefinitionType"/>
      <xs:element name="LocationBasedStateDefinition" type="t:LocationBasedStateDefinitionType"/>
    </xs:choice>
  </xs:complexType>
  <xs:complexType name="BaseCalendarItemStateDefinitionType" />
  <xs:complexType name="DeletedOccurrenceStateDefinitionType">
    <xs:complexContent>
      <xs:extension base="t:BaseCalendarItemStateDefinitionType">
        <xs:sequence>
          <xs:element name="OccurrenceDate" type="xs:dateTime" minOccurs="1"/>
          <xs:element name="IsOccurrencePresent" type="xs:boolean" minOccurs="0"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DeleteFromFolderStateDefinitionType">
    <xs:complexContent>
      <xs:extension base="t:BaseCalendarItemStateDefinitionType" />
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="LocationBasedStateDefinitionType">
    <xs:complexContent>
      <xs:extension base="t:BaseCalendarItemStateDefinitionType">
        <xs:sequence>
          <xs:element name="OrganizerLocation" type="xs:string" minOccurs="1"/>
          <xs:element name="AttendeeLocation" type="xs:string" minOccurs="1"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:simpleType name="IconIndexType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Default" />
      <xs:enumeration value="PostItem" />
      <xs:enumeration value="MailRead" />
      <xs:enumeration value="MailUnread" />
      <xs:enumeration value="MailReplied" />
      <xs:enumeration value="MailForwarded" />
      <xs:enumeration value="MailEncrypted" />
      <xs:enumeration value="MailSmimeSigned" />
      <xs:enumeration value="MailEncryptedReplied" />
      <xs:enumeration value="MailSmimeSignedReplied" />
      <xs:enumeration value="MailEncryptedForwarded" />
      <xs:enumeration value="MailSmimeSignedForwarded" />
      <xs:enumeration value="MailEncryptedRead" />
      <xs:enumeration value="MailSmimeSignedRead" />
      <xs:enumeration value="MailIrm" />
      <xs:enumeration value="MailIrmForwarded" />
      <xs:enumeration value="MailIrmReplied" />
      <xs:enumeration value="SmsSubmitted" />
      <xs:enumeration value="SmsRoutedToDeliveryPoint" />
      <xs:enumeration value="SmsRoutedToExternalMessagingSystem" />
      <xs:enumeration value="SmsDelivered" />
      <xs:enumeration value="OutlookDefaultForContacts" />
      <xs:enumeration value="AppointmentItem" />
      <xs:enumeration value="AppointmentRecur" />
      <xs:enumeration value="AppointmentMeet" />
      <xs:enumeration value="AppointmentMeetRecur" />
      <xs:enumeration value="AppointmentMeetNY" />
      <xs:enumeration value="AppointmentMeetYes" />
      <xs:enumeration value="AppointmentMeetNo" />
      <xs:enumeration value="AppointmentMeetMaybe" />
      <xs:enumeration value="AppointmentMeetCancel" />
      <xs:enumeration value="AppointmentMeetInfo" />
      <xs:enumeration value="TaskItem" />
      <xs:enumeration value="TaskRecur" />
      <xs:enumeration value="TaskOwned" />
      <xs:enumeration value="TaskDelegated" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="MeetingSpaceTypeEnum">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Public"/>
      <xs:enumeration value="Private"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="MeetingSpaceType">
    <xs:sequence>
      <xs:element name="Id" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ChangeKey" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Type" type="t:MeetingSpaceTypeEnum" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Version" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="JoinUrl" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="DateTimeCreated" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="DateTimeModified" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ExpiryTime" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Meadata" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Tag" type="xs:string" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:element name="MeetingSpace" type="t:MeetingSpaceType"/>

    <xs:simpleType name="ParticipantActivityRole">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Organizer" />
      <xs:enumeration value="Attendee" />
      <xs:enumeration value="Presenter" />
    </xs:restriction>
  </xs:simpleType>
  
  <xs:simpleType name="ParticipantActivityMediaType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="AppSharing" />
      <xs:enumeration value="AudioVideo" />
      <xs:enumeration value="Chat" />
      <xs:enumeration value="DataConf" />
      <xs:enumeration value="Meeting" />
      <xs:enumeration value="MeetingConf" />
      <xs:enumeration value="PhoneConf" />
      <xs:enumeration value="Focus" /> 
    </xs:restriction>
  </xs:simpleType>
     
  <xs:complexType name="ParticipantActivity">
    <xs:sequence>
      <xs:element name="Id" type="t:GuidType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="CreatedBy" type="xs:string" minOccurs="1" maxOccurs="1" />
      <xs:element name="StartTime" type="xs:string" minOccurs="1" maxOccurs="1" />
      <xs:element name="EndTime" type="xs:string" minOccurs="1" maxOccurs="1" />
      <xs:element name="ClientVersion" type="xs:string" minOccurs="1" maxOccurs="1" />
      <xs:element name="Role" type="t:ParticipantActivityRole" minOccurs="1" maxOccurs="1" />
      <xs:element name="MediaType" type="t:ParticipantActivityMediaType" minOccurs="1" maxOccurs="1" />
      <xs:element name="MediaDetails" type="xs:string" minOccurs="0" maxOccurs="1" /> 
    </xs:sequence>
  </xs:complexType>
  
  <xs:complexType name="NonEmptyArrayOfParticipantActivities">
    <xs:sequence>
      <xs:element name="ParticipantActivity" type="t:ParticipantActivity" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  
  <xs:complexType name="ContentActivity">
    <xs:sequence>
      <xs:element name="Id" type="t:GuidType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="SharedBy" type="xs:string" minOccurs="1" maxOccurs="1" />
      <xs:element name="ContentLocation" type="xs:string" minOccurs="1" maxOccurs="1" />
      <xs:element name="StartTime" type="xs:string" minOccurs="1" maxOccurs="1" />
      <xs:element name="EndTime" type="xs:string" minOccurs="1" maxOccurs="1" />
      <xs:element name="Type" type="t:ContentActivityType" minOccurs="1" maxOccurs="1" />
      <xs:element name="MediaType" type="t:ContentActivityMediaType" minOccurs="1" maxOccurs="1" />
      <xs:element name="Acl" type="t:ContentActivityAcl" minOccurs="1" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>
  
  <xs:simpleType name="ContentActivityType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Poll" />
      <xs:enumeration value="WhiteBoard" />
      <xs:enumeration value="QAndA" />
      <xs:enumeration value="Chat" />
      <xs:enumeration value="Meeting" />
      <xs:enumeration value="Annotations" />
      <xs:enumeration value="SharedNotes" />
    </xs:restriction>
  </xs:simpleType>
  
  <xs:simpleType name="ContentActivityMediaType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="AppSharing" />
      <xs:enumeration value="AudioVideo" />
      <xs:enumeration value="Chat" />
      <xs:enumeration value="DataConf" />
      <xs:enumeration value="Meeting" />
      <xs:enumeration value="MeetingConf" />
      <xs:enumeration value="PhoneConf" />
    </xs:restriction>
  </xs:simpleType>
  
    <xs:simpleType name="ContentActivityAcl">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Organizer" />
      <xs:enumeration value="Presenter" />
      <xs:enumeration value="Everyone" />
    </xs:restriction>
  </xs:simpleType>
  
  <xs:complexType name="NonEmptyArrayOfContentActivities">
    <xs:sequence>
      <xs:element name="ContentActivity" type="t:ContentActivity" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
    
  <xs:complexType name="MeetingInstanceType">
    <xs:sequence>
      <xs:element name="Id" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ChangeKey" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Version" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="JoinUrl" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="DateTimeCreated" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="DateTimeModified" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Meadata" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Tag" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ParentGoid" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ParticipantActivities" type="t:NonEmptyArrayOfParticipantActivities" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ContentActivities" type="t:NonEmptyArrayOfContentActivities" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>
  
  <xs:element name="MeetingInstance" type="t:MeetingInstanceType"/>

  <!-- InstantSearch v2.0 DataTypes -->
  <xs:simpleType name="WarmupOptionsType">
    <xs:list>
      <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:enumeration value="None"/>
        <xs:enumeration value="Suggestions"/>
        <xs:enumeration value="Results"/>
        <xs:enumeration value="All"/>
      </xs:restriction>
      </xs:simpleType>
    </xs:list>
  </xs:simpleType>

  <xs:simpleType name="SearchApplicationIdType">
        <xs:restriction base="xs:string">
          <xs:enumeration value="Outlook"/>
          <xs:enumeration value="Owa"/>
          <xs:enumeration value="Paw"/>
          <xs:enumeration value="Teamspace"/>
          <xs:enumeration value="OneDrive"/>
          <xs:enumeration value="Other"/>
        </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ItemTypesFilterType">
    <xs:list>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="None"/>
          <xs:enumeration value="MailItems"/>
          <xs:enumeration value="MailConversations"/>
          <xs:enumeration value="CalendarItems"/>
          <xs:enumeration value="Contacts"/>
          <xs:enumeration value="OneDriveItems"/>
          <xs:enumeration value="FileItems"/>
          <xs:enumeration value="DelveItems"/>
          <xs:enumeration value="MessageItems"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:list>
  </xs:simpleType>

  <xs:simpleType name="SuggestionKindType">
    <xs:list>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="None"/>
          <xs:enumeration value="Keywords"/>
          <xs:enumeration value="People"/>
          <xs:enumeration value="Hashtags"/>
          <xs:enumeration value="QueryHistory"/>
          <xs:enumeration value="All"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:list>
  </xs:simpleType>

  <xs:simpleType name="RefinerTypeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None"/>
      <xs:enumeration value="To"/>
      <xs:enumeration value="From"/>
      <xs:enumeration value="Folder"/>
      <xs:enumeration value="HasAttachment"/>
      <xs:enumeration value="MailboxSource"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="SearchResultsPropertySetNameType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Default"/>
      <xs:enumeration value="Owa16"/>
      <xs:enumeration value="Outlook16"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="SearchScopeGroupsType">
    <xs:list>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="MyGroups"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:list>          
  </xs:simpleType>
   
  <xs:simpleType name="SearchScopeArchivesType">
    <xs:list>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="MainArchive"/>
          <xs:enumeration value="AuxArchive"/>
          <xs:enumeration value="All"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:list>
  </xs:simpleType>
  
  <xs:simpleType name="ExecuteSearchSortOrderType">
      <xs:restriction base="xs:string">
        <xs:enumeration value="DateTime"/>
        <xs:enumeration value="Relevance"/>
      </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="MatchOptionsType">
      <xs:restriction base="xs:string">
        <xs:enumeration value="FullString"/>
        <xs:enumeration value="Prefix"/>
      </xs:restriction>
  </xs:simpleType>  
    
  <xs:complexType name="SearchFolderScopeType">
    <xs:choice>
      <xs:element name="FolderId" type="t:FolderIdType"/>
      <xs:element name="WellKnownFolder" type="t:DistinguishedFolderIdType"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="PrimaryMailboxSearchScopeType">
    <xs:sequence>
      <xs:element name="FolderScope" type="t:SearchFolderScopeType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="IsDeepTraversal" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="LargeArchiveSearchScopeType">
    <xs:sequence>
      <xs:element name="ArchiveTypes" type="t:SearchScopeArchivesType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="GroupSearchScopeType">
    <xs:sequence>
      <xs:element name="GroupTypes" type="t:SearchScopeGroupsType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SingleLargeArchiveSearchScopeType">
    <xs:sequence>
      <xs:element name="MailboxGuid" type="t:GuidType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="FolderScope" type="t:SearchFolderScopeType" />
      <xs:element name="IsDeepTraversal" type="xs:boolean"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="OneDriveSearchScopeType">
    <xs:sequence>
      <xs:element name="OneDriveView" type="t:OneDriveViewType" minOccurs="1" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

    <xs:complexType name="DelveSearchScopeType">
    <xs:sequence>
      <xs:element name="DelveView" type="t:DelveViewType" minOccurs="1" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="CustomSearchScopeType">
    <xs:sequence>
      <xs:element name="MailboxGuid" type="t:GuidType"/>
      <xs:element name="FolderScope" type="t:SearchFolderScopeType" />
      <xs:element name="IsDeepTraversal" type="xs:boolean"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfSearchScopeType">
    <xs:sequence>
      <xs:element name="PrimaryMailboxSearchScope" type="t:PrimaryMailboxSearchScopeType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="LargeArchiveSearchScope" type="t:LargeArchiveSearchScopeType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="GroupSearchScope" type="t:GroupSearchScopeType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="CustomSearchScope" type="t:CustomSearchScopeType" minOccurs="0" maxOccurs="4"/>
      <xs:element name="OneDriveSearchScope" type="t:OneDriveSearchScopeType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="SingleLargeArchiveSearchScope" type="t:SingleLargeArchiveSearchScopeType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="DelveSearchScope" type="t:DelveSearchScopeType" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="DynamicRefinerQueryType">
    <xs:sequence>
      <xs:element name="RefinerQuery" type="xs:string" minOccurs="1" maxOccurs="1" />
      <xs:element name="TDRefinerId" type="xs:int" minOccurs="1" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ExtendedKeywordDefinitionType">
    <xs:sequence>
      <xs:element name="Keyword" type="xs:string" minOccurs="1" maxOccurs="1" />
      <xs:element name="Properties" type="t:NonEmptyArrayOfExtendedFieldURIsType" minOccurs="1" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>
        
  <xs:complexType name="SuggestionType">
    <xs:sequence>
      <xs:element name="SuggestedQuery" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="DisplayText" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="SuggestionType" type="t:SuggestionKindType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="Trigger" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="TDSuggestionId" type="xs:int"/>
      <xs:element name="IsDeletable" type="xs:boolean"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PeopleSuggestionType">
    <xs:complexContent>
      <xs:extension base="t:SuggestionType">
        <xs:sequence>
          <xs:element name="PrimarySmtpAddress" type="xs:string" minOccurs="1" maxOccurs="1"/>
          <xs:element name="PersonType" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:simpleType name="PeopleSuggestionPersonType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Unknown"/>
      <xs:enumeration value="Person"/>
      <xs:enumeration value="DistributionList"/>
      <xs:enumeration value="Room"/>
      <xs:enumeration value="Place"/>
      <xs:enumeration value="ModernGroup"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="FileSuggestionType">
    <xs:complexContent>
      <xs:extension base="t:SuggestionType">
        <xs:sequence>
          <xs:element name="FileName" type="xs:string" minOccurs="1" maxOccurs="1"/>
          <xs:element name="FileExtension" type="xs:string" minOccurs="1" maxOccurs="1"/>
          <xs:element name="FileReferenceId" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="FileTitle" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="ContainerTitle" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="ContainerUrl" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="SearchSuggestionsType">
    <xs:sequence>
      <xs:element name="TDSuggestionsBatchId" type="xs:long" minOccurs="1" maxOccurs="1"/>
      <xs:element name="TDSuggestionsInstanceId" type="t:GuidType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="Suggestions" minOccurs="0" maxOccurs="1">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Suggestion" type="t:SuggestionType" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="DiagnosticsData" type="t:SearchDiagnosticsType" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="DeleteSearchSuggestionResponseType">
    <xs:sequence>
      <xs:element name="Success" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
      <xs:element name="StatusMessage" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="DiagnosticsData" type="t:SearchDiagnosticsType" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SearchDiagnosticsStepType">
    <xs:sequence>
      <xs:element name="StartTime" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="StepTime" type="xs:long" minOccurs="0" maxOccurs="1"/>
      <xs:element name="StepType" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="AdditionalEntries" minOccurs="0" maxOccurs="1">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Entry" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SearchRefinerType">
    <xs:sequence>
      <xs:element name="RefinerType" type="t:RefinerTypeType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="Refiner" type="t:DynamicRefinerQueryType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="ResultCount" type="xs:long" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="FolderRefinerType">
    <xs:complexContent>
      <xs:extension base="t:SearchRefinerType">
        <xs:sequence>
          <xs:element name="FolderId" type="t:FolderIdType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="PeopleRefinerType">
    <xs:complexContent>
      <xs:extension base="t:SearchRefinerType">
        <xs:sequence>
          <xs:element name="DisplayName" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="SmtpAddress" type="t:SmtpAddressType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="MailboxRefinerType">
    <xs:complexContent>
      <xs:extension base="t:SearchRefinerType">
        <xs:sequence>
          <xs:element name="MailboxDisplayName" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="AttachmentRefinerType">
    <xs:complexContent>
      <xs:extension base="t:SearchRefinerType">
        <xs:sequence>
          <xs:element name="HasAttachment" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="HashtagRefinerType">
    <xs:complexContent>
      <xs:extension base="t:SearchRefinerType">
        <xs:sequence>
          <xs:element name="DisplayName" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="SearchDiagnosticsType">
    <xs:sequence>
      <xs:sequence>
        <xs:any processContents="skip" minOccurs="0" maxOccurs="unbounded" namespace="##any"/>
      </xs:sequence>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="MailboxInformationType">
    <xs:sequence>
      <xs:sequence>
        <xs:element name="MailboxGuid" type="t:GuidType"/>
        <xs:element name="MailboxAddress" type="t:SmtpAddressType"/>
        <xs:element name="MailboxDisplayName" type="xs:string"/>
      </xs:sequence>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ExecuteSearchQueryIdType">
    <xs:attribute name="Id" type="t:GuidType" use="required" />
  </xs:complexType>

  <xs:complexType name="SearchResultsType">
    <xs:sequence>
      <xs:element name="Items" minOccurs="0" maxOccurs="1">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Item" type="t:ItemType" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="Conversations" minOccurs="0" maxOccurs="1">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Conversation" type="t:ConversationType" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="People" minOccurs="0" maxOccurs="1">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Persona" type="t:PersonaType" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="MoreResultsAvailable" type="xs:boolean" minOccurs="1" maxOccurs="1" />
      <xs:element name="RefinerTelemetryBatchId" type="xs:int" minOccurs="1" maxOccurs="1" />
      <xs:element name="SearchRefiners" minOccurs="0" maxOccurs="1">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="SearchRefiner" type="t:SearchRefinerType" minOccurs="1" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="DiagnosticsData" type="t:SearchDiagnosticsType" minOccurs="0" maxOccurs="1" />
      <xs:element name="SearchResultsCount" type="xs:int" minOccurs="0" maxOccurs="1" />
      <xs:element name="TotalResultsCount" type="xs:int" minOccurs="0" maxOccurs="1" />
      <xs:element name="SearchTerms" type="t:ArrayOfStringsType" minOccurs="0" maxOccurs="1" />
      <xs:element name="QueryId" type="t:ExecuteSearchQueryIdType" minOccurs="0" maxOccurs="1" />      
      <xs:element name="MailboxesInformation" minOccurs="0" maxOccurs="1">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="MailboxInformation" type="t:MailboxInformationType" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SearchResultItemIdType">
    <xs:annotation>
      <xs:documentation>Identifier for an item in search results</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="t:ItemIdType">
        <xs:sequence>
          <xs:element name="EntryId" type="xs:base64Binary" minOccurs="0" maxOccurs="1"/>
          <xs:element name="OutlookItemId" type="xs:base64Binary" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="SearchResultConversationIdType">
    <xs:annotation>
      <xs:documentation>Identifier for a conversation item in search results</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="t:ItemIdType">
        <xs:sequence>
          <xs:element name="OutlookConversationId" type="xs:base64Binary" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- Unified Groups -->
    <xs:simpleType name="ClientIdType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Web" />
      <xs:enumeration value="Mobile" />
      <xs:enumeration value="Tablet" />
      <xs:enumeration value="Desktop" />
      <xs:enumeration value="Exchange" />
      <xs:enumeration value="Outlook" />
      <xs:enumeration value="MacOutlook" />
      <xs:enumeration value="POP3" />
      <xs:enumeration value="IMAP4" />
      <xs:enumeration value="Other" />
      <xs:enumeration value="Lync" />
      <xs:enumeration value="OutlookService" />
      <xs:enumeration value="MacMail" />
    </xs:restriction>
  </xs:simpleType>
  
  <xs:simpleType name="EntityFeedbackEntityAddSourceType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None" />
      <xs:enumeration value="EntityRelevanceApi" />
      <xs:enumeration value="EntityRelevanceApiCache" />
      <xs:enumeration value="ActiveDirectory" />
      <xs:enumeration value="ExplicitTyping" />
      <xs:enumeration value="Paste" />
      <xs:enumeration value="LocalCacheAndEntityRelevanceApi" />
      <xs:enumeration value="LocalCache" />
      <xs:enumeration value="Other" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="ArrayOfWorkHours">
    <xs:sequence>
      <xs:element name="WorkHours" type="t:WorkHoursType" minOccurs="0" maxOccurs="7" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="WorkHoursType">
    <xs:sequence>
      <xs:element name="WorkDay" type="t:SystemDayOfWeek" minOccurs="0" maxOccurs="1" />
      <xs:element name="TimeSlots" type="t:ArrayOfWorkTimeSlot" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="SystemDayOfWeek">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Sunday" />
      <xs:enumeration value="Monday" />
      <xs:enumeration value="Tuesday" />
      <xs:enumeration value="Wednesday" />
      <xs:enumeration value="Thursday" />
      <xs:enumeration value="Friday" />
      <xs:enumeration value="Saturday" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="ArrayOfWorkTimeSlot">
    <xs:sequence>
      <xs:element name="TimeSlot" type="t:WorkTimeSlot" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="WorkTimeSlot">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="StartTimeInMinutes" type="xs:int" />
      <xs:element minOccurs="1" maxOccurs="1" name="EndTimeInMinutes" type="xs:int" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AnalyzedQuery">
    <xs:sequence>
      <xs:element name="QueryLanguage" type="xs:string" minOccurs="1" maxOccurs="1" />
      <xs:element name="SearchRestrictions" type="t:RestrictionType" minOccurs="1" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ContextPropertyType">
    <xs:sequence>
      <xs:element name="Key" type="xs:string" minOccurs="1" maxOccurs="1" />
      <xs:element name="Value" type="xs:string" minOccurs="1" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfContextProperty">
    <xs:sequence>
      <xs:element name="ContextProperty" type="t:ContextPropertyType" minOccurs="1" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfEntityFeedbackEntry">
    <xs:sequence>
      <xs:element name="EntityFeedbackEntry" type="t:EntityFeedbackEntryType" minOccurs="1" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  
  <xs:complexType name="EntityFeedbackEntryType">
    <xs:sequence>
      <xs:element name="ClientEventTimeUtc" type="xs:dateTime" minOccurs="1" maxOccurs="1"/>
      <xs:element name="ClientEventTimeLocal" type="xs:dateTime" minOccurs="1" maxOccurs="1"/>
      <xs:element name="ClientSessionId" type="t:GuidType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="ClientVersion" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="ClientId" type="t:ClientIdType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="EntrySequenceNumber" type="xs:int" minOccurs="1" maxOccurs="1"/>
      <xs:element name="TransactionId" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="EventType" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="TargetEntityList" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="EntityAddSource" type="t:EntityFeedbackEntityAddSourceType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="JsonPropertyBag" type="xs:string" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfInboxReminderType">
    <xs:sequence>
      <xs:element name="InboxReminder" type="t:InboxReminderType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="InboxReminderType">
    <xs:sequence>
      <xs:element name="Id" type="t:GuidType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ReminderOffset" type="xs:int" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Message" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="IsOrganizerReminder" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
      <xs:element name="OccurrenceChange" type="t:EmailReminderChangeType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="SendOption" type="t:EmailReminderSendOption" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="EmailReminderChangeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None" />
      <xs:enumeration value="Added" />
      <xs:enumeration value="Override" />
      <xs:enumeration value="Deleted" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="EmailReminderSendOption">
    <xs:restriction base="xs:string">
      <xs:enumeration value="NotSet" />
      <xs:enumeration value="User" />
      <xs:enumeration value="AllAttendees" />
      <xs:enumeration value="Staff" />
      <xs:enumeration value="Customer" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="InsightStatusType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Created" />
      <xs:enumeration value="Active" />
      <xs:enumeration value="Dismissed" />
      <xs:enumeration value="Invalid" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="InsightContextItem">
    <xs:sequence>
      <xs:element name="Name" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="Val" type="xs:string" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfInsightContextItem">
    <xs:sequence>
      <xs:element name="Context" type="t:InsightContextItem" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  
  <xs:complexType name="InsightItemType">
    <xs:sequence>
      <xs:element name="ItemId" type="t:ItemIdType" minOccurs="1" maxOccurs="1" />
      <xs:element name="InsightId" type="t:GuidType" minOccurs="1" maxOccurs="1" />
      <xs:element name="Type" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="StartTimeUtc" type="xs:dateTime" minOccurs="0" maxOccurs="1" />
      <xs:element name="EndTimeUtc" type="xs:dateTime" minOccurs="0" maxOccurs="1" />
      <xs:element name="Status" type="t:InsightStatusType" minOccurs="0" maxOccurs="1" />
      <xs:element name="Version" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Context" type="t:ArrayOfInsightContextItem" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Text" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ApplicationsIds" type="t:ArrayOfStringsType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="SuggestedActions" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="AppContexts" type="t:ArrayOfStringsType" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>
  
  <xs:complexType name="ArrayOfInsightItemType">
    <xs:sequence>
      <xs:element name="Insight" type="t:InsightItemType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ResponseMessageInfoType">
    <xs:sequence minOccurs="0">
      <xs:element name="MessageText" type="xs:string" minOccurs="0"/>
      <xs:element name="ResponseCode" type="xs:string" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute name="ResponseClass" type="t:ResponseClassType" use="required"/>
  </xs:complexType>

  <xs:complexType name="BaseAvailabilityCalendarViewType">
    <xs:sequence>
      <xs:element name="FreeBusyViewType" type="t:FreeBusyViewType" minOccurs="1" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArrayOfPeopleQuerySource">
    <xs:sequence>
      <xs:element name="Source" type="xs:string" minOccurs="1" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="CalendarActivityDataType">
    <xs:sequence>
      <xs:element name="ActivityAction" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="ClientId" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="CasRequestId" type="t:GuidType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="IndexSelected" type="xs:int" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>
  
  <!-- Social fabric, @Mentions type -->
  <xs:complexType name="MentionActionType">
    <xs:sequence>
      <xs:element name="Id" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="CreatedBy" type="t:EmailAddressExtendedType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="CreatedDateTime" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ServerCreatedDateTime" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="DeepLink" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Application" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Mentioned" type="t:EmailAddressExtendedType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="MentionText" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ClientReference" type="xs:string" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="NonEmptyArrayOfMentionActionsType">
    <xs:sequence>
      <xs:element name="MentionAction" type="t:MentionActionType" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
  
  <!-- Social fabric, @Tag type -->
  <xs:complexType name="AppliedHashtagType">
    <xs:sequence>
      <xs:element name="Id" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="CreatedBy" type="t:EmailAddressExtendedType" minOccurs="1" maxOccurs="1"/>
    <xs:element name="CreatedDateTime" type="xs:string" minOccurs="0" maxOccurs="1"/>
    <xs:element name="ServerCreatedDateTime" type="xs:string" minOccurs="0" maxOccurs="1"/>
    <xs:element name="DeepLink" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Application" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Tag" type="xs:string" minOccurs="1" maxOccurs="1"/>
    <xs:element name="IsAutoTagged" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
    <xs:element name="IsInlined" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AppliedHashtagsPreviewType">
    <xs:sequence>
      <xs:element name="Hashtags" type="t:ArrayOfStringsType" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>


  <xs:complexType name="NonEmptyArrayOfAppliedHashtagType">
    <xs:sequence>
      <xs:element name="AppliedHashtag" type="t:AppliedHashtagType" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <!-- Social fabric, +1Like type -->
  <xs:complexType name="LikeType">
    <xs:sequence>
      <xs:element name="Id" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="CreatedBy" type="t:EmailAddressExtendedType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="CreatedDateTime" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ServerCreatedDateTime" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="DeepLink" type="xs:string" minOccurs="0" maxOccurs="1"/>
        <xs:element name="Application" type="xs:string" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="LikesPreviewType">
    <xs:sequence>
      <xs:element name="LikeCount" type="xs:int" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="MentionsPreviewType">
    <xs:sequence>
      <xs:element name="IsMentioned" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>
  
  <xs:complexType name="NonEmptyArrayOfLikeType">
    <xs:sequence>
      <xs:element name="Like" type="t:LikeType" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
  
  <!-- FindAvailableMeetingTimes Service Types -->
    <xs:complexType name="AttendeeAvailability">
        <xs:sequence>
            <xs:element name="EmailAddress" type="xs:string" />
            <xs:element name="Availability" type="t:AvailabilityStatusType" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ArrayOfMeetingLocation">
        <xs:sequence>
            <xs:element minOccurs="0" maxOccurs="unbounded" name="MeetingLocation" type="t:MeetingLocation" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ArrayOfAttendeeAvailability">
        <xs:sequence>
            <xs:element minOccurs="0" maxOccurs="unbounded" name="AttendeeAvailability" type="t:AttendeeAvailability" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="MeetingTimeCandidate">
        <xs:sequence>
            <xs:element name="MeetingTimeslot" type="t:TimeSlot" />
            <xs:element name="Confidence" type="xs:double" />
            <xs:element name="Score" type="xs:int" />
            <xs:element name="OrganizerAvailability" type="t:AvailabilityStatusType" />
            <xs:element name="AttendeeAvailabilities" type="t:ArrayOfAttendeeAvailability" />
            <xs:element name="Locations" type="t:ArrayOfMeetingLocation" />
            <xs:element name="SuggestionHint" type="xs:string" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ArrayOfMeetingTimeCandidate">
        <xs:sequence>
            <xs:element name="MeetingTimeCandidate" type="t:MeetingTimeCandidate" maxOccurs="unbounded" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="MeetingTimeCandidatesConstraintItem">
        <xs:sequence>
            <xs:element name="Email" type="xs:string" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="AttendeeConstraintItem">
        <xs:complexContent>
            <xs:extension base="t:MeetingTimeCandidatesConstraintItem" >
                <xs:sequence>
                    <xs:element name="IsRequired" type="xs:boolean" minOccurs="0" />
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="LocationConstraintItem">
        <xs:complexContent>
            <xs:extension base="t:MeetingTimeCandidatesConstraintItem" >
                <xs:sequence>
                    <xs:element name="Name" type="xs:string" minOccurs="0" />
                    <xs:element name="ResolveAvailability" type="xs:boolean" minOccurs="0" />
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="ArrayOfLocationConstraintItems">
        <xs:sequence>
            <xs:element minOccurs="0" maxOccurs="unbounded" name="LocationItem" type="t:LocationConstraintItem" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ArrayOfAttendeeConstraintItems">
        <xs:sequence>
            <xs:element minOccurs="0" maxOccurs="unbounded" name="AttendeeItem" type="t:AttendeeConstraintItem" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ArrayOfTimeSlot">
        <xs:sequence>
            <xs:element minOccurs="0" maxOccurs="unbounded" name="TimeSlot" type="t:TimeSlot" />
        </xs:sequence>
    </xs:complexType>

    <xs:simpleType name="EmptySuggestionReason">
        <xs:annotation>
            <xs:documentation>
                Reasons no suggestions are returned by FindMeetingTimeCandidates
            </xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string">
            <xs:enumeration value="Unknown"/>
            <xs:enumeration value="AttendeesUnavailable"/>
            <xs:enumeration value="LocationsUnavailable"/>
            <xs:enumeration value="OrganizerUnavailable"/>
            <xs:enumeration value="AttendeesUnavailableOrUnknown"/>
        </xs:restriction>
    </xs:simpleType>
    
    <xs:complexType name="FindMeetingTimesAttendeeConstraints">
        <xs:sequence>
            <xs:element name="AttendeeEntries" type="t:ArrayOfAttendeeConstraintItems" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="FindMeetingTimesLocationConstraints">
        <xs:sequence>
            <xs:element name="LocationEntries" type="t:ArrayOfLocationConstraintItems" minOccurs="0"/>
            <xs:element name="IsRequired" type="xs:boolean" minOccurs="0" />
            <xs:element name="SuggestLocation" type="xs:boolean" minOccurs="0" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="FindMeetingTimesSearchConstraints">
        <xs:sequence>
            <xs:element name="SearchWindows" type="t:ArrayOfTimeSlot" minOccurs="0"/>
            <xs:element name="MeetingDurationInMinutes" type="xs:int" minOccurs="0" />
            <xs:element name="ActivityDomain" type="t:ActivityDomainType" minOccurs="0" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="FindMeetingTimesConstraints">
        <xs:sequence>
            <xs:element name="MaxCandidates" type="xs:int" minOccurs="0" />
            <xs:element name="IsOrganizerOptional" type="xs:boolean" minOccurs="0" />
            <xs:element name="ReturnSuggestionHints" type="xs:boolean" minOccurs="0" />
            <xs:element name="AppName" type="xs:string" minOccurs="0" />
            <xs:element name="AppScenario" type="xs:string" minOccurs="0" />
            <xs:element name="MinimumAttendeePercentage" type="xs:double" minOccurs="0" />
        </xs:sequence>
    </xs:complexType>

    <xs:simpleType name="AddInStateType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="Flagged"/>
            <xs:enumeration value="OK"/>
            <xs:enumeration value="Removed"/>
            <xs:enumeration value="Undefined"/>
            <xs:enumeration value="WithdrawingSoon"/>
            <xs:enumeration value="Withdrawn"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="OfficeClientType">
        <xs:attribute name="Code" type="t:OfficeClientCodeType" use="required"/>
        <xs:attribute name="Version" type="t:VersionType" use="required"/>
    </xs:complexType>

    <xs:simpleType name="OfficeClientCodeType">
        <xs:restriction base="xs:string">
            <xs:pattern value="[a-zA-Z0-9]+_[a-zA-Z0-9]+"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="VersionType">
        <xs:restriction base="xs:string">
            <xs:pattern value="[0-9]{1,4}\.[0-9]{1,4}(\.[0-9]{1,4}(\.[0-9]{1,4})?)?"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="ArrayOfAppsType">
        <xs:sequence>
            <xs:element name="App" type="t:AppType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="Metadata" type="t:Metadata" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="AppType">
        <xs:sequence>
          <xs:element name="Metadata" type="t:AppMetadata" minOccurs="0" maxOccurs="1"/>        
          <xs:element name="Manifest" type="xs:base64Binary" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="Metadata">
        <xs:sequence>
            <xs:element name="CustomApps" type="xs:string" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="AppMetadata">
      <xs:sequence>
          <xs:element name="EndNodeUrl" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="AppStatus" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="ActionUrl" type="xs:string" minOccurs="0" maxOccurs="1"/>
          <xs:element name="ProductId" type="xs:string" minOccurs="0" maxOccurs="1"/>            
          <xs:element name="EnabledStatus" type="xs:boolean" minOccurs="0" maxOccurs="1"/>            
          <xs:element name="ConsentState" type="xs:string" minOccurs="0" maxOccurs="1"/>            
          <xs:element name="ExtensionType" type="xs:string" minOccurs="0" maxOccurs="1"/>            
          <xs:element name="MarketplaceAssetId" type="xs:string" minOccurs="0" maxOccurs="1"/>            
          <xs:element name="LicenseStatus" type="xs:string" minOccurs="0" maxOccurs="1"/>            
          <xs:element name="TrialExpirationDate" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
          <xs:element name="InstalledBy" type="xs:string" minOccurs="0" maxOccurs="1"/>                        
          <xs:element name="IsMandatory" type="xs:boolean" minOccurs="0" maxOccurs="1"/>                        
      </xs:sequence>
    </xs:complexType>
</xs:schema>
