<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:m="http://www.caiso.com/soa/2008-05-21/IntertieRDT.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.caiso.com/soa/2008-05-21/IntertieRDT.xsd" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:element name="IntertieRDT" type="m:IntertieRDT"/>
	<xs:complexType name="IntertieRDT">
		<xs:sequence>
			<xs:element name="MessageHeader" type="m:MessageHeader" minOccurs="0"/>
			<xs:element name="MessagePayload" type="m:MessagePayload"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="MessageHeader">
		<xs:annotation>
			<xs:documentation>Message header containing descriptive information about the message.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="TimeDate" type="xs:dateTime">
				<xs:annotation>
					<xs:documentation>Application level relevant time and date for when this  instance of the message was produced.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Source" type="xs:string">
				<xs:annotation>
					<xs:documentation>Source system that publishes the message. For CAISO, examples include ADS, ALFS, CAP, CRR, EMS, ETCC, FNM, IFM, MF, PI, RLC, RTM, SaMC, SIBR, SLIC, etc.</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="MessagePayload">
		<xs:sequence>
			<xs:element name="MasterFileRDTRecord" type="m:MasterFileRDTRecord" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>This class captures group-by attributes used by MPs to retrieve or submit RTDs (Generator or Intertie RTDs)</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="MasterFileRDTRecord">
		<xs:sequence>
			<xs:element name="RDTEffectiveDate" type="xs:dateTime"/>
			<xs:element name="SchedulingCoordinator" type="xs:string"/>
			<xs:element name="Comment" type="xs:string" minOccurs="0"/>
			<xs:element name="RegisteredInterTie" type="m:RegisteredInterTie" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>This class represents the inter tie resource</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="RegisteredInterTie">
		<xs:sequence>
			<xs:element name="mrid" type="m:mrid">
				<xs:annotation>
					<xs:documentation>MRID stands for master resource identifier which should be globally unique.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="mustOfferFlag" type="m:YesNo" minOccurs="0">
				<xs:annotation>
					<xs:documentation>An identifier of a resource that has a must offer obligation, either due to a RA obligation or through other obligation (ie future capacity market procurement, RCST, etc.)</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="mustOfferObligationQualified" type="m:MOOQualifiedEnumeration" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Must Offer Obligation Qualified Flag: Y - Resource is Must Offer N - Resource is not Must Offer R - Resource is eligible for Must Offer based on RA Capacity or RCST designation in any given trading hour</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="resourceAdequacyFlag" type="m:YesNo" minOccurs="0">
				<xs:annotation>
					<xs:documentation>An identifier of a resource that is under the Resource Adeqacy (RA) program.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="energyProductType" type="m:energyProductType" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Under each major product type, the commodity type can be applied to further specify the type. Possible values are but not limited to: a) Firm Energy ("FIRM") b) Non-Firm Energy ("NFRM") c) Dynamic Interchange ("DYN") d) Wheeling ("WHEEL") e) Unit Contingency ("UCTG") Proposed by the service definition team</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="minHourlyBlockLimit" type="xs:integer" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Represents the maximum number of consecutive Trading Hours that an Intertie resource can be bid in, if a Minimum Hourly Block is specified in the Bid.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="WheelingCounterParty" type="m:MktResWheelingCounterParty" minOccurs="0"/>
			<xs:element name="ResourceCertification" type="m:IntertieRDTResCertification" minOccurs="0">
				<xs:annotation>
					<xs:documentation>This class represent the resource certification for a specific product type. For example, a resource is certified for Non-Spinning reserve for RTM.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="ResourceCapacity" type="m:MasterfileRDTResCapacity" minOccurs="0" maxOccurs="3">
				<xs:annotation>
					<xs:documentation>This class model the various capacities of a resource. A resource may have numbers of capacities related to operating, ancillary services, energy trade and so forth. The types are but not limited to: Ancillary Service Regulation Up Regulation Dn Spinning Reserve Non-Spinning Reserve Operating Reserve RUC Energy Trade</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:simpleType name="mrid">
		<xs:restriction base="xs:string">
			<xs:maxLength value="32"/>
			<xs:minLength value="1"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="YesNo">
		<xs:restriction base="xs:string">
			<xs:enumeration value="YES"/>
			<xs:enumeration value="NO"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="MOOQualifiedEnumeration">
		<xs:annotation>
			<xs:documentation>Y - Resource is Must Offer N - Resource is not Must Offer R - Resource is eligible for Must Offer based on RA Capacity or RCST designation in any given trading hour</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="Y"/>
			<xs:enumeration value="N"/>
			<xs:enumeration value="R"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="energyProductType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="FIRM"/>
			<xs:enumeration value="NFRM"/>
			<xs:enumeration value="WHL"/>
			<xs:enumeration value="UCTG"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="MktResWheelingCounterParty">
		<xs:sequence>
			<xs:element name="mrid" type="m:mrid">
				<xs:annotation>
					<xs:documentation>MRID stands for master resource identifier which should be globally unique.</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="IntertieRDTResCertification">
		<xs:sequence>
			<xs:element name="certifiedNonspinDAM" type="m:YesNo" minOccurs="0"/>
			<xs:element name="certifiedNonspinRTM" type="m:YesNo" minOccurs="0"/>
			<xs:element name="certifiedSpin" type="m:YesNo" minOccurs="0"/>
			<xs:element name="certifiedRUC" type="m:YesNo" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="MasterfileRDTResCapacity">
		<xs:sequence>
			<xs:element name="capacityType" type="m:capacityType">
				<xs:annotation>
					<xs:documentation>capacity type The types are but not limited to: Regulation Up Regulation Dn Spinning Reserve Non-Spinning Reserve FOO capacity MOO capacity</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="defaultCapacity" type="m:ActivePower">
				<xs:annotation>
					<xs:documentation>default capacity</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:simpleType name="capacityType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="SR"/>
			<xs:enumeration value="NR"/>
			<xs:enumeration value="RR"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="ActivePower">
		<xs:annotation>
			<xs:documentation>Product of RMS value of the voltage and the RMS value of the in-phase component of the current (Megawatt)</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="value" type="xs:float" minOccurs="0"/>
			<xs:element name="units" type="xs:string" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
</xs:schema>

