<?xml version="1.0" encoding="utf-8"?>
<xsd:schema id="hpcs2008-soa"
    targetNamespace="http://schemas.microsoft.com/HPCS2008/hpcbp/soa"
    elementFormDefault="qualified"
    xmlns:hpcs2008-soa="http://schemas.microsoft.com/HPCS2008/hpcbp/soa"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>

  <xsd:complexType name="JobUnitType_Type">
    <xsd:sequence>
      <xsd:element ref="hpcs2008-soa:JobUnitTypeEnumeration" minOccurs="1" />     
    </xsd:sequence>
    <xsd:attribute name="min" type="xsd:positiveInteger"  use="required"/>
    <xsd:attribute name="max" type="xsd:positiveInteger"  use="required"/>
  </xsd:complexType>

  <xsd:element name="JobUnitTypeEnumeration" type="hpcs2008-soa:JobUnitTypeEnumeration_Type"/>

  <xsd:simpleType name="JobUnitTypeEnumeration_Type">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="Node"/>
      <xsd:enumeration value="Core"/>
      <xsd:enumeration value="Socket"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="JobPriorityEnumeration_Type">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="Lowest" />
      <xsd:enumeration value="BelowNormal" />
      <xsd:enumeration value="Normal" />
      <xsd:enumeration value="AboveNormal" />
      <xsd:enumeration value="Highest" />
    </xsd:restriction>
  </xsd:simpleType>
  
  <xsd:element name="ResourceUnitType" type="hpcs2008-soa:JobUnitType_Type"/>
  <xsd:element name="JobPriorityEnumeration" type="hpcs2008-soa:JobPriorityEnumeration_Type"/>
  <xsd:element name="HPCS2008SOAJob" type="hpcs2008-soa:HPCS2008SOAJob_Type" />
  
  <xsd:complexType name="HPCS2008SOAJob_Type">
    <xsd:sequence>
      <xsd:element name="JobTemplate" type="xsd:string" minOccurs="0" />
      <xsd:element name="NodeGroup" type="xsd:string" minOccurs="0" />
      <xsd:element name="JobPriority" type="hpcs2008-soa:JobPriorityEnumeration_Type" minOccurs="0" />
      <xsd:element name="Project" type="xsd:string" minOccurs="0" />
      <xsd:element name="RequestedNodes" type="xsd:string" minOccurs="0" />
      <xsd:element ref="hpcs2008-soa:ResourceUnitType" minOccurs="0" />
      <xsd:element name="Runtime" type="xsd:int" minOccurs="0" />
      <xsd:element name="ServiceJobName" type="xsd:string" minOccurs="0" />
      <xsd:element name="ShareSession" type="xsd:boolean" minOccurs="0" />
      <xsd:element name="Secure" type="xsd:boolean" minOccurs="0" />
      <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="ServiceName" type="xsd:string"  use="required"/>
    <xsd:attribute name="AllocationGrowLoadRatioThreshold" type="xsd:int" use="optional"  />
    <xsd:attribute name="AllocationShrinkLoadRatioThreshold" type="xsd:int" use="optional"  />
    <xsd:attribute name="ClientConnectionTimeout" type="xsd:int" use="optional"  />
    <xsd:attribute name="SessionIdleTimeout" type="xsd:int" use="optional"  />
    <xsd:attribute name="ClientIdleTimeout" type="xsd:int" use="optional"  />
    <xsd:attribute name="ServiceStatUpdateInterval" type="xsd:int" use="optional"  />

    <xsd:anyAttribute namespace="##other" processContents="lax"/>
  </xsd:complexType>
</xsd:schema>
