<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

  <xs:simpleType name="InformationClassEnum">
    <xs:restriction base="xs:NCName">
      <xs:enumeration value="User"/>
      <xs:enumeration value="Computer"/>
      <xs:enumeration value="VirtualSession"/>
      <xs:enumeration value="Ticket"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="PolicyEnum">
    <xs:restriction base="xs:NCName">
      <xs:enumeration value="Default"/>
      <xs:enumeration value="Mandatory"/>
      <xs:enumeration value="Hidden"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="TicketCompletitionPolicyEnum">
    <xs:restriction base="xs:NCName">
      <xs:enumeration value="IfRequired"/>
      <xs:enumeration value="false"/>
      <xs:enumeration value="true"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="HorizontalAlignmentEnum">
    <xs:restriction base="xs:NCName">
      <xs:enumeration value="Default"/>
      <xs:enumeration value="Right"/>
      <xs:enumeration value="Center"/>
      <xs:enumeration value="Left"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="StringNode">
    <xs:attribute name="Policy" type="PolicyEnum" use="required"/>
    <xs:attribute name="Value" type="xs:string" use="required"/>
  </xs:complexType>

  <xs:complexType name="IntegerNode">
    <xs:attribute name="Policy" type="PolicyEnum" use="required"/>
    <xs:attribute name="Value" type="xs:integer" use="required"/>
  </xs:complexType>

  <xs:complexType name="BoolNode">
    <xs:attribute name="Policy" type="PolicyEnum" use="required"/>
    <xs:attribute name="Value" type="xs:boolean" use="required"/>
  </xs:complexType>

  <xs:complexType name="PolicyNode">
    <xs:attribute name="Policy" type="PolicyEnum" use="required"/>
  </xs:complexType>

  <xs:element name="F4SD-Global-Configuration">
    <xs:complexType>
      <xs:all>
        <xs:element name="ShouldSkipSlimView" minOccurs="0" maxOccurs="1">
          <xs:complexType><xs:complexContent><xs:extension base="BoolNode"></xs:extension></xs:complexContent></xs:complexType>
        </xs:element>
        <xs:element name="SmallViewAlignment" minOccurs="0" maxOccurs="1">
          <xs:complexType> <xs:complexContent><xs:extension base="PolicyNode">
                <xs:attribute name="Value" type="HorizontalAlignmentEnum" use="required"/>
          </xs:extension></xs:complexContent></xs:complexType>
        </xs:element>
        <xs:element name="FavouriteBarAlignment" minOccurs="0" maxOccurs="1">
          <xs:complexType>
            <xs:complexContent>
              <xs:extension base="PolicyNode">
                <xs:attribute name="Value" type="HorizontalAlignmentEnum" use="required"/>
              </xs:extension>
            </xs:complexContent>
          </xs:complexType>
        </xs:element>
        <xs:element ref="InformationClassSearchPriority" minOccurs="0" maxOccurs="1"/>
        <xs:element ref="TicketConfiguration" minOccurs="0" maxOccurs="1"/>
      </xs:all>
    </xs:complexType>
  </xs:element>

  <xs:element name="InformationClassSearchPriority">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="PolicyNode">
          <xs:sequence>
            <xs:element ref="InformationClass" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="InformationClass">
    <xs:complexType>
        <xs:attribute name="Type" type="InformationClassEnum" use="required"/>
    </xs:complexType>
    </xs:element>

  <xs:element name="TicketConfiguration">
    <xs:complexType>
      <xs:all>
        <xs:element name="NotesMandatory" minOccurs="0" maxOccurs="1">
          <xs:complexType>
            <xs:complexContent>
              <xs:extension base="BoolNode"></xs:extension>
            </xs:complexContent>
          </xs:complexType>
        </xs:element>
        <xs:element name="DisableAutomaticTimeTracking" minOccurs="0" maxOccurs="1">
          <xs:complexType>
            <xs:complexContent>
              <xs:extension base="BoolNode"></xs:extension>
            </xs:complexContent>
          </xs:complexType>
        </xs:element>
        <xs:element name="CompletitionPolicy" minOccurs="0" maxOccurs="1">
          <xs:complexType>
            <xs:complexContent>
              <xs:extension base="PolicyNode">
                <xs:attribute name="Value" type="TicketCompletitionPolicyEnum" use="required"/>
              </xs:extension>
            </xs:complexContent>
          </xs:complexType>
        </xs:element>
        <xs:element name="ShowOverview" minOccurs="0" maxOccurs="1">
          <xs:complexType>
            <xs:complexContent>
              <xs:extension base="BoolNode"></xs:extension>
            </xs:complexContent>
          </xs:complexType>
        </xs:element>
        <xs:element name="OverviewPollingPersonal" minOccurs="0" maxOccurs="1">
          <xs:complexType>
            <xs:complexContent>
              <xs:extension base="PolicyNode">
                <xs:attribute name="Value" type="xs:positiveInteger" use="required"/>
              </xs:extension>
            </xs:complexContent>
          </xs:complexType>
        </xs:element>
        <xs:element name="OverviewPollingRole" minOccurs="0" maxOccurs="1">
          <xs:complexType>
            <xs:complexContent>
              <xs:extension base="PolicyNode">
                <xs:attribute name="Value" type="xs:positiveInteger" use="required"/>
              </xs:extension>
            </xs:complexContent>
          </xs:complexType>
        </xs:element>
      </xs:all>
    </xs:complexType>
  </xs:element>
  
</xs:schema>
