<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns="http://schemas.gov.sk/form/URHH.StavyPocitadiel.OznamenieUdajovVycislenieStavuPocitadielTechnickychZariadeni/1.0"
	targetNamespace="http://schemas.gov.sk/form/URHH.StavyPocitadiel.OznamenieUdajovVycislenieStavuPocitadielTechnickychZariadeni/1.0"
	elementFormDefault="qualified">

	<xs:element name="Oznamenie">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="Hlavicka" type="HlavickaTyp"/>
				<xs:element name="StavyPocitadielTZ" type="StavyPocitadielTZTyp" maxOccurs="unbounded" />
			</xs:sequence>
		</xs:complexType>
	</xs:element>

	<xs:complexType name="HlavickaTyp">
		<xs:annotation>
			<xs:documentation>Hlavička</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="Meno" type="String_1023">
				<xs:annotation>
					<xs:documentation>Obchodné meno/Názov</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="ICO" type="ICOTyp">
				<xs:annotation>
					<xs:documentation>Identifikačné číslo organizácie</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="PravnaForma" type="xs:string">
				<xs:annotation>
					<xs:documentation>Právna forma</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="DruhHH" type="xs:int">
				<xs:annotation>
					<xs:documentation>Druh hazardnej hry</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Licencia" type="String_100">
				<xs:annotation>
					<xs:documentation>Licencia číslo</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="DatumVypracovania" type="xs:date">
				<xs:annotation>
					<xs:documentation>Dátum vypracovania</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="StavyPocitadielTZTyp">
		<xs:annotation>
			<xs:documentation>Vyčíslenie stavu počítadiel technických zariadení</xs:documentation>
		</xs:annotation>
		<xs:sequence>		
			<xs:element name="PoradoveCislo" type="xs:string">
				<xs:annotation>
					<xs:documentation>Poradové číslo</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Adresa">
				<xs:annotation>
					<xs:documentation>Adresa herne alebo kasína</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:element name="Obec" type="String_100"/>
						<xs:element name="PSC" type="PSCTyp"/>
						<xs:element name="Ulica" type="String_100" minOccurs="0"/>
						<xs:element name="Cislo">
							<xs:complexType>
								<xs:sequence>
									<xs:element name="Orientacne" type="OrientacneCisloTyp" minOccurs="0"/>
									<xs:element name="Supisne" type="SupisneCisloTyp"/>
								</xs:sequence>
							</xs:complexType>
						</xs:element>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="Nazov" type="xs:string" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Názov herne alebo kasína</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="TypTZ" type="xs:string" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Typ technického zariadenia</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="VyrobneCisloTZ" type="xs:string">
				<xs:annotation>
					<xs:documentation>Výrobné číslo technického zariadenia</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="MechanickePocitadlo" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Mechanické počítadlo</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:element name="PrijateVklady" type="PenaznaSumaTyp" minOccurs="0"/>
						<xs:element name="VyplateneVyhry" type="PenaznaSumaTyp" minOccurs="0"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="ElektronickePocitadlo" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Elektronické počítadlo</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:element name="PrijateVklady" type="PenaznaSumaTyp" minOccurs="0"/>
						<xs:element name="VyplateneVyhry" type="PenaznaSumaTyp" minOccurs="0"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="DigitalnePocitadlo" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Neresetovateľné  digitálne  počítadlo s pamäťovým modulom</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:element name="PrijateVklady" type="PenaznaSumaTyp" minOccurs="0"/>
						<xs:element name="VyplateneVyhry" type="PenaznaSumaTyp" minOccurs="0"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="Datum" type="xs:date">
				<xs:annotation>
					<xs:documentation>Dátum</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="DovodVycislenia" type="SVUTyp">
				<xs:annotation>
					<xs:documentation>Dôvod vyčíslenia stavu počítadiel</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:simpleType name="ICOTyp">
		<xs:annotation>
			<xs:documentation>Identifikačné číslo organizácie</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:pattern value="[0-9]{6}|[0-9]{8}"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="PSCTyp">
		<xs:annotation>
			<xs:documentation>Poštové smerovacie číslo</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="10"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="OrientacneCisloTyp">
		<xs:annotation>
			<xs:documentation>Orientačné číslo</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:minLength value="1"/>
			<xs:maxLength value="20"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="SupisneCisloTyp">
		<xs:annotation>
			<xs:documentation>Súpisné číslo</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:minLength value="1"/>
			<xs:maxLength value="10"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="SVUTyp">
		<xs:annotation>
			<xs:documentation>S - Spustenie, V - Výmena, U - Ukončenie </xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:pattern value="S|V|U"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="String_100">
		<xs:restriction base="xs:string">
			<xs:maxLength value="100"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="String_1023">
		<xs:restriction base="xs:string">
			<xs:maxLength value="1023"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="PenaznaSumaTyp">
		<xs:annotation>
			<xs:documentation>Penazna suma</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:decimal">
			<xs:pattern value="(0(\.[0]{1,2})?|-?(0\.([1-9][0-9]{0,1}|[0-9][1-9])|[1-9][0-9]*(\.[0-9]{1,2})?))" />
			<xs:totalDigits value="16" />
			<xs:fractionDigits value="2" />
		</xs:restriction>
	</xs:simpleType>
</xs:schema>
