<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns="http://schemas.gov.sk/form/URHH.ZiadostIL.PredkladanieUdajovOTechnickychZariadeniachNaPrevadzkovanieStavkovychHierABinga/1.0"
	targetNamespace="http://schemas.gov.sk/form/URHH.ZiadostIL.PredkladanieUdajovOTechnickychZariadeniachNaPrevadzkovanieStavkovychHierABinga/1.0"
	elementFormDefault="qualified">

	<xs:element name="Predkladanie">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="Hlavicka" type="HlavickaTyp"/>
				<xs:element name="TechnickeZariadenie" type="TechnickeZariadenieTyp" maxOccurs="unbounded" />
				<xs:element name="Spolu" type="SpoluTyp"/>
			</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="Dodatok" type="xs:int">
				<xs:annotation>
					<xs:documentation>Dodatok číslo</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="ZaciatocnyPocetHP" type="NezaporneCeleCisloTyp">
				<xs:annotation>
					<xs:documentation>Začiatočný počet herní alebo prevádzok</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="KonecnyPocetHP" type="NezaporneCeleCisloTyp">
				<xs:annotation>
					<xs:documentation>Konečný počet herní alebo prevádzok</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:element name="Rozhodnutie" type="NezaporneCeleCisloTyp">
				<xs:annotation>
					<xs:documentation>Príloha k rozhodnutiu č.</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="TechnickeZariadenieTyp">
		<xs:annotation>
			<xs:documentation>Udaje o technickom zariadeni na prevádzkovanie stávkových hier a binga</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 prevádzky</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"/>
						<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 prevádzky</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:choice>
				<xs:element name="PP" type="JednotkaTyp">
					<xs:annotation>
						<xs:documentation>Povolenie prevádzkovania v herni alebo prevádzke</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="PZ" type="JednotkaTyp">
					<xs:annotation>
						<xs:documentation>Zrušenie prevádzkovania v herni alebo prevádzke</xs:documentation>
					</xs:annotation>
				</xs:element>
			</xs:choice>
			<xs:choice>
				<xs:element name="O" type="JednotkaTyp">
					<xs:annotation>
						<xs:documentation>Herňa alebo prevádzka s obsluhou</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="T" type="JednotkaTyp">
					<xs:annotation>
						<xs:documentation>Herňa alebo prevádzka so stávkovými terminálmi</xs:documentation>
					</xs:annotation>
				</xs:element>
			</xs:choice>
			<xs:choice>
				<xs:element name="H" type="JednotkaTyp">
					<xs:annotation>
						<xs:documentation>Herňa</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="P" type="JednotkaTyp">
					<xs:annotation>
						<xs:documentation>Prevádzka</xs:documentation>
					</xs:annotation>
				</xs:element>
			</xs:choice>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="SpoluTyp">
		<xs:annotation>
			<xs:documentation>Spolu: </xs:documentation>
		</xs:annotation> 
		<xs:sequence>
			<xs:element name="PP" type="NezaporneCeleCisloTyp">
				<xs:annotation>
					<xs:documentation>Celkový počet povolení prevádzkovania v herni alebo prevádzke</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="PZ" type="NezaporneCeleCisloTyp">
				<xs:annotation>
					<xs:documentation>Celkový počet zrušení prevádzkovania v herni alebo prevádzke</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="H" type="NezaporneCeleCisloTyp">
				<xs:annotation>
					<xs:documentation>Celkový počet herní</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="P" type="NezaporneCeleCisloTyp">
				<xs:annotation>
					<xs:documentation>Celkový počet prevádzok</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="JednotkaTyp">
		<xs:annotation>
			<xs:documentation>Uvadza sa *1*</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:pattern value="1"/>
		</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="NezaporneCeleCisloTyp">
		<xs:annotation>
			<xs:documentation>Nezáporné celé čislo (0-2147483647)</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:int">
			<xs:minInclusive value="0"/>
		</xs:restriction>
	</xs:simpleType>
</xs:schema>