<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema elementFormDefault="qualified"
	targetNamespace="https://anpassungshandbuch.dvgw-sc.de/schnittstelle/2.6"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ah="https://anpassungshandbuch.dvgw-sc.de/schnittstelle/2.6/types/"
	xmlns="https://anpassungshandbuch.dvgw-sc.de/schnittstelle/2.6">

	<xsd:import schemaLocation="DVGW_Anpassungshandbuch_Types_2P6.xsd"
		namespace="https://anpassungshandbuch.dvgw-sc.de/schnittstelle/2.6/types/"></xsd:import>

	<xsd:element name="HoleGeraeteErfahrungRequest">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="apikey" minOccurs="1" maxOccurs="1">
					<xsd:simpleType>
						<xsd:restriction base="xsd:string">
							<xsd:length value="20"></xsd:length>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:element>
				<xsd:choice minOccurs="1">
					<xsd:element name="suche">
						<xsd:simpleType>
							<xsd:restriction base="xsd:string">
								<xsd:minLength value="1"></xsd:minLength>
								<xsd:maxLength value="100"></xsd:maxLength>
							</xsd:restriction>
						</xsd:simpleType>
					</xsd:element>
					<xsd:element name="id" type="xsd:positiveInteger"></xsd:element>
					<xsd:element name="seit" type="xsd:dateTime"></xsd:element>
				</xsd:choice>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="HoleGeraeteResponse">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="Stammdaten" type="StammdatenTyp"
							 maxOccurs="1" minOccurs="1"></xsd:element>
				<xsd:element name="Geraet" type="HoleGeraetTyp"
							 maxOccurs="unbounded" minOccurs="0"></xsd:element>
				<xsd:element name="GeloeschteGeraeteId" type="xsd:positiveInteger"
							 maxOccurs="unbounded" minOccurs="0"></xsd:element>
				<xsd:element name="NichtFreigegebeneGeraeteId" type="xsd:positiveInteger"
							 maxOccurs="unbounded" minOccurs="0"></xsd:element>
				<xsd:element name="DubletteGeraete" type="DubletteGeraetTyp"
							 maxOccurs="unbounded" minOccurs="0"></xsd:element>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<xsd:complexType name="HoleGeraetTyp">
		<xsd:sequence>
			<xsd:element name="Stammdaten" type="HoleGeraeteGeraeteStammdatenTyp"
				maxOccurs="1" minOccurs="1"></xsd:element>
			<xsd:element name="Marke" type="ah:MarkeTyp" maxOccurs="1"
				minOccurs="1"></xsd:element>
			<xsd:element name="Hersteller" type="ah:HerstellerTyp"
				maxOccurs="1" minOccurs="1"></xsd:element>
			<xsd:element name="Geraetetypbezeichnung" type="ah:String_max255"
				maxOccurs="1" minOccurs="1"></xsd:element>
			<xsd:element name="MaterialLieferant" maxOccurs="unbounded"
				minOccurs="0" type="HoleGeraeteMaterialLieferantTyp"></xsd:element>
			<xsd:element name="EnergieInKw" type="ah:EnergieInKwTyp"
				maxOccurs="1" minOccurs="0"></xsd:element>
			<xsd:element name="Duesenzahl" type="xsd:nonNegativeInteger"
				maxOccurs="1" minOccurs="0"></xsd:element>
			<xsd:element name="Duesenbezeichnung" type="ah:String_max255"
				maxOccurs="1" minOccurs="0"></xsd:element>
			<xsd:element name="Duesenbohrung" type="ah:String_max255"
				maxOccurs="1" minOccurs="0"></xsd:element>
			<xsd:element name="Duesendruck" type="ah:DuesendruckTyp"
				maxOccurs="1" minOccurs="0"></xsd:element>
			<xsd:element name="Duesenwechsel" type="ah:DuesenwechselEnum"
				maxOccurs="1" minOccurs="1"></xsd:element>
			<xsd:element name="Bemerkung" type="ah:String_max65535"
				maxOccurs="1" minOccurs="0"></xsd:element>
			<xsd:element name="Baujahr" type="ah:BaujahrTyp"
				maxOccurs="1" minOccurs="0"></xsd:element>
			<xsd:element name="EndeDuesenbereitstellung" type="ah:YearTyp" maxOccurs="1" minOccurs="0"></xsd:element>				
			<xsd:element name="EndeErsatzteilversorgung" type="ah:YearTyp" maxOccurs="1" minOccurs="0"></xsd:element>		
			<xsd:element name="Herstellernummer" type="ah:String_max100"
				maxOccurs="1" minOccurs="0"></xsd:element>
			<xsd:element name="AnpassungKommentar" type="ah:String_max65535"
				maxOccurs="1" minOccurs="0"></xsd:element>
			<xsd:element name="Anhang" type="xsd:anyURI" maxOccurs="1"
				minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						Dieses Element enthält eine URL zu einem
						ZIP-Archiv, das alle für das Gerät hinterlegte Dokumente enthält.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="id" type="xsd:positiveInteger" use="required"></xsd:attribute>
		<xsd:attribute name="version" type="xsd:positiveInteger"
			use="required"></xsd:attribute>
	</xsd:complexType>

	<xsd:complexType name="HoleGeraeteGeraeteStammdatenTyp">
		<xsd:sequence>
			<xsd:element name="FuehrungsgroesseWerte" type="ah:FuehrungsgroesseWertTyp" maxOccurs="1" minOccurs="1"></xsd:element>
		</xsd:sequence>
		<xsd:attribute name="AnpassungMoeglichCode" type="xsd:positiveInteger"
			use="required"></xsd:attribute>
		<xsd:attribute name="AnpassungszeitpunktErfahrungCode"
			use="optional">
			<xsd:simpleType>
				<xsd:restriction base="xsd:string">
					<xsd:minLength value="1"></xsd:minLength>
					<xsd:maxLength value="10"></xsd:maxLength>
				</xsd:restriction>
			</xsd:simpleType>
		</xsd:attribute>
		<xsd:attribute name="AnpassungszeitpunktHerstellerCode"
			use="optional">
			<xsd:simpleType>
				<xsd:restriction base="xsd:string">
					<xsd:minLength value="1"></xsd:minLength>
					<xsd:maxLength value="3"></xsd:maxLength>
				</xsd:restriction>
			</xsd:simpleType>
		</xsd:attribute>
		<xsd:attribute name="BrennerartCode" type="xsd:positiveInteger"
			use="optional"></xsd:attribute>
		<xsd:attribute name="GeraeteartCode" type="xsd:nonNegativeInteger"
			use="required"></xsd:attribute>
		<xsd:attribute name="GeraetezuordnungCode" type="xsd:positiveInteger"
			use="required"></xsd:attribute>
		<xsd:attribute name="GeraetegruppeCode" type="xsd:positiveInteger"
			use="optional"></xsd:attribute>			
		<xsd:attribute name="PreisgruppeCode" type="xsd:positiveInteger"
			use="optional"></xsd:attribute>
		<xsd:attribute name="HerstellernummerBezeichnungCode"
			type="xsd:positiveInteger" use="optional"></xsd:attribute>
	</xsd:complexType>

	<xsd:complexType name="StammdatenTyp">
		<xsd:sequence>
			<xsd:element name="AnpassungMoeglich" type="ah:AnpassungMoeglichTyp"
				maxOccurs="unbounded" minOccurs="0"></xsd:element>
			<xsd:element name="AnpassungszeitpunktErfahrung" type="ah:AnpassungszeitpunktErfahrungTyp"
				maxOccurs="unbounded" minOccurs="0"></xsd:element>
			<xsd:element name="AnpassungszeitpunktHersteller" type="ah:AnpassungszeitpunktHerstellerTyp"
				maxOccurs="unbounded" minOccurs="0"></xsd:element>
			<xsd:element name="Brennerart" type="ah:BrennerartTyp"
				maxOccurs="unbounded" minOccurs="0"></xsd:element>
			<xsd:element name="Geraeteart" type="ah:GeraeteartTyp"
				maxOccurs="unbounded" minOccurs="0"></xsd:element>
			<xsd:element name="Geraetegruppe" type="ah:GeraetegruppeTyp"
				maxOccurs="unbounded" minOccurs="0"></xsd:element>	
			<xsd:element name="Geraetezuordnung" type="ah:GeraetezuordnungTyp"
				maxOccurs="unbounded" minOccurs="0"></xsd:element>
			<xsd:element name="Preisgruppe" type="ah:PreisgruppeTyp"
				maxOccurs="unbounded" minOccurs="0"></xsd:element>
			<xsd:element name="HerstellernummerBezeichnung" type="ah:HerstellernummerBezeichnungTyp"
				maxOccurs="unbounded" minOccurs="0"></xsd:element>
			<xsd:element name="GeraeteAnhangTyp" type="ah:GeraeteAnhangTypTyp"
				maxOccurs="unbounded" minOccurs="0"></xsd:element>
			<xsd:element name="Fuehrungsgroesse" type="ah:FuehrungsgroesseTyp"
				maxOccurs="unbounded" minOccurs="0"></xsd:element>
			<xsd:element name="Hersteller" type="ah:HerstellerTypStammdaten"
				 maxOccurs="unbounded" minOccurs="0"></xsd:element>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:complexType name="HoleGeraeteMaterialLieferantTyp">
		<xsd:sequence>
			<xsd:element name="Hersteller" type="ah:HerstellerTyp"
				maxOccurs="1" minOccurs="1"></xsd:element>
			<xsd:element name="Bestellnummer" type="ah:String_max65535"
				maxOccurs="1" minOccurs="1"></xsd:element>
			<xsd:element name="Menge" type="xsd:positiveInteger"
				maxOccurs="1" minOccurs="0"></xsd:element>
			<xsd:element name="Kommentar" type="ah:String_max65535"
				maxOccurs="1" minOccurs="0"></xsd:element>
		</xsd:sequence>
		<xsd:attribute name="id" type="xsd:positiveInteger" use="required"></xsd:attribute>
	</xsd:complexType>

	<xsd:complexType name="DubletteGeraetTyp">
		<xsd:attribute name="geraeteId" type="xsd:positiveInteger"
			use="required"></xsd:attribute>
		<xsd:attribute name="dubletteId" type="xsd:positiveInteger"
			use="required"></xsd:attribute>
	<xsd:attribute name="dubletteTyp" type="ah:String_max65535"></xsd:attribute>						
	</xsd:complexType>

</xsd:schema>