<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:element name="input">
		<xs:complexType>
			<xs:annotation>
				<xs:documentation>Function to allow authorized users to Update Partner Data</xs:documentation>
			</xs:annotation>
			<xs:sequence>
				<xs:element name="username" maxOccurs="1">
					<xs:simpleType>
						<xs:restriction base="xs:string"/>
					</xs:simpleType>
				</xs:element>
				<xs:element name="password" maxOccurs="1">
					<xs:simpleType>
						<xs:restriction base="xs:string"/>
					</xs:simpleType>
				</xs:element>
				<xs:element name="Object" type="Object" minOccurs="1" maxOccurs="unbounded"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:complexType name="Object">
		<xs:annotation>
			<xs:documentation>Partner Object and data to be updated</xs:documentation>
		</xs:annotation>
		<xs:all>
			<xs:element name="PartnerUpdateList" type="PartnerUpdateList" minOccurs="0" >
				<!-- Identifies the object to be updated -->
			</xs:element>
		</xs:all>
	</xs:complexType>
	<xs:complexType name="PartnerUpdateList">
		<xs:annotation>
			<xs:documentation>Partner List</xs:documentation>
		</xs:annotation>
		<xs:all>
			<xs:element name="Partner" type="Partner" minOccurs="0" >
				<!-- Identifies the partner to be updated -->
			</xs:element>
		</xs:all>
	</xs:complexType>
	<xs:complexType name="Partner">
		<xs:annotation>
			<xs:documentation>Partner Object and data to be updated</xs:documentation>
		</xs:annotation>
		<xs:all>
			<xs:element name="PartnerID" minOccurs="0" >
				<xs:simpleType>
					<xs:restriction base="xs:decimal">
						<xs:pattern value="\d{1,7}"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="AgreementList" type="AgreementList" minOccurs="0" >
				<!-- List of agreements to process for the partner -->
			</xs:element>
		</xs:all>
	</xs:complexType>
	<xs:complexType name="AgreementList">
		<xs:annotation>
			<xs:documentation>Agreements to be updated</xs:documentation>
		</xs:annotation>
		<xs:all>
			<xs:element name="Agreement" type="Agreement" minOccurs="0">
				<!-- Allows a partner to do business with the SBA -->
			</xs:element>
		</xs:all>
	</xs:complexType>
	<xs:complexType name="Agreement">
		<xs:annotation>
			<xs:documentation>Agreement to be updated</xs:documentation>
		</xs:annotation>
		<xs:all>
			<xs:element name="Action" minOccurs="0">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:minLength value="1"/>
						<xs:maxLength value="10"/>
						<xs:enumeration value="Add"/>
						<xs:enumeration value="Renew"/>
						<xs:enumeration value="Terminate"/>
						<xs:enumeration value="Update"/>
						<!-- If given, it cannot be empty. -->
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="AgrmtTyp" minOccurs="0">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:minLength value="1"/>  <!-- If given, it cannot be empty. -->
						<xs:maxLength value="20"/>  
						<xs:enumeration value="7(a) Short-term"/> <!-- 7(a) Short-Term Loan Guaranty Agreement (Deferred Participation)		   -->  
						<xs:enumeration value="ALP"/> <!-- Accredited Lenders Program (ALP)						   -->
						<xs:enumeration value="ARC"/> <!-- ARC Loan Program ARRA-506							   -->
						<xs:enumeration value="CAI"/> <!-- Community Advantage Initiative						   -->
						<xs:enumeration value="CDC"/>  <!-- CDC application submitted to D/O, HQ decides				   -->
						<xs:enumeration value="CLP"/>	<!-- Certified Lenders Program (CLP) Supplemental Guaranty Agreement		   -->
						<xs:enumeration value="Community Express"/>  <!-- Community Express Supplemental Loan Guarantee Agreement			   -->
						<xs:enumeration value="EWCP"/>	<!-- Export Working Capital Program Supplemental Guaranty Agreement		   -->
						<xs:enumeration value="ExportExpress"/>	 <!-- ExportExpress Supplemental Loan Guarantee Agreement			   -->
						<xs:enumeration value="General 7(a)"/>	<!-- 7(a) Loan Guaranty Agreement (Deferred Participation)			   -->
						<xs:enumeration value="IDAP"/>	 <!-- Immediate Disaster Assistance Program - Farm Act Guaranty Business Loans	   -->
						<xs:enumeration value="ILP"/>	 <!-- Intermediary Lending Program - Jobs Act					   -->
						<xs:enumeration value="MicroLoans"/> <!-- MicroLoan application submitted to D/O, HQ decides				   -->
						<xs:enumeration value="NTAP"/>	  <!-- Non-Lending Technical Assistance Agreement					   -->
						<xs:enumeration value="PCLP"/> <!-- Premier Certified Lenders Program (PCLP) Loan Guaranty Agreement		   -->
						<xs:enumeration value="PLP"/>	 <!-- Preferred Lenders Program (PLP) Supplemental Guaranty Agreement		   -->
						<xs:enumeration value="PLP EWCP"/>  <!-- Preferred Lenders Program (PLP) for EWCP Supplemental Guaranty Agreement	   -->
						<xs:enumeration value="PTX"/>	   <!-- Patriot Loan Express Program						   -->
						<xs:enumeration value="Priority CDC"/> <!-- Priority CDC Districts would monitor status (some get automatic by being ALP) -->
						<xs:enumeration value="S503"/>	   <!-- 504 First Mortgage Loan Pools ARRA-503					   -->
						<xs:enumeration value="SAB Caplines"/>	<!-- SAB Caplines Lender Qualification Survey Form				   -->
						<xs:enumeration value="SBAExpress"/>	  <!-- SBAExpress Supplemental Loan Guarantee Agreement				   -->
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="AgrmtEffDt" type="xs:string" minOccurs="0"/><!-- mm/dd/yyyy -->
			<xs:element name="AgrmtExprDt" type="xs:string" minOccurs="0"/><!-- mm/dd/yyyy -->
			<xs:element name="TerminationDt" type="xs:string" minOccurs="0"/><!-- mm/dd/yyyy -->
			<xs:element name="TerminationReasonCode" type="xs:string" minOccurs="0"/>
		</xs:all>
	</xs:complexType>
</xs:schema>
