<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema
  xmlns="http://rest.immobilienscout24.de/schema/platform/gis/1.0"
  xmlns:common="http://rest.immobilienscout24.de/schema/common/1.0"
  targetNamespace="http://rest.immobilienscout24.de/schema/platform/gis/1.0"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  elementFormDefault="unqualified"
  attributeFormDefault="unqualified"
  version="1.0">

  <xs:import namespace="http://rest.immobilienscout24.de/schema/common/1.0"/>

  <xs:element name="continents">
    <xs:annotation>
      <xs:documentation xml:lang="en">Represents a list of continents.</xs:documentation>
      <xs:documentation xml:lang="de-DE">Repräsentiert eine Liste von Kontinenten.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Continent" maxOccurs="unbounded" minOccurs="0">
          <xs:complexType>
            <xs:attributeGroup ref="common:Reference"/>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="countries">
    <xs:annotation>
      <xs:documentation xml:lang="en">Represents a list of countries.</xs:documentation>
      <xs:documentation xml:lang="de-DE">Repräsentiert eine Liste von Ländern.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Country" maxOccurs="unbounded" minOccurs="0">
          <xs:complexType>
            <xs:attributeGroup ref="common:Reference"/>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="regions">
    <xs:annotation>
      <xs:documentation xml:lang="en">Represents a list of regions.</xs:documentation>
      <xs:documentation xml:lang="de-DE">Repräsentiert eine Liste von Bundesländern.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Region" maxOccurs="unbounded" minOccurs="0">
          <xs:complexType>
            <xs:attributeGroup ref="common:Reference"/>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="cities">
    <xs:annotation>
      <xs:documentation xml:lang="en">Represents a list of cities.</xs:documentation>
      <xs:documentation xml:lang="de-DE">Repräsentiert eine Liste von Städten/Kreisen.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="City" maxOccurs="unbounded" minOccurs="0">
          <xs:complexType>
            <xs:attributeGroup ref="common:Reference"/>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="quarters">
    <xs:annotation>
      <xs:documentation xml:lang="en">Represents a list of quarters.</xs:documentation>
      <xs:documentation xml:lang="de-DE">Repräsentiert eine Liste von Bezirken/Gemeinden.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Quarter" maxOccurs="unbounded" minOccurs="0">
          <xs:complexType>
            <xs:attributeGroup ref="common:Reference"/>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="continent" type="common:Continent"/>
  <xs:element name="country" type="common:Country"/>
  <xs:element name="region" type="common:Region"/>
  <xs:element name="city" type="common:City"/>
  <xs:element name="quarter" type="common:Quarter"/>

  <xs:complexType name="GeoCodedAddress">
    <xs:annotation>
      <xs:documentation xml:lang="en">An address with its geocoding information.</xs:documentation>
      <xs:documentation xml:lang="de-DE">Eine Adresse mit zugehöriger Geokodierungs-Information.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="address" type="common:Address">
        <xs:annotation>
          <xs:documentation xml:lang="en">The address</xs:documentation>
          <xs:documentation xml:lang="de-DE">Die Adresse</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="wgs84Coordinate" type="common:Wgs84Coordinate">
        <xs:annotation>
          <xs:documentation xml:lang="en">WGS84 coordinates</xs:documentation>
          <xs:documentation xml:lang="de-DE">WGS84 Koordinaten</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="geoCodingPrecision" type="common:GeoCodingPrecisionType">
        <xs:annotation>
          <xs:documentation xml:lang="en">The precision of the geocoding.</xs:documentation>
          <xs:documentation xml:lang="de-DE">Die Genauigkeit der Geokodierung.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="geoCodingHierarchy" type="common:GeoHierarchy">
        <xs:annotation>
          <xs:documentation xml:lang="en">The geo-hierarchy information.</xs:documentation>
          <xs:documentation xml:lang="de-DE">Die Geo-Hierarchie-Informationen.</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:element name="geoCodedAddressList">
    <xs:annotation>
      <xs:documentation xml:lang="en">A list of geocoded addresses.</xs:documentation>
      <xs:documentation xml:lang="de-DE">Eine Liste mit geokodierten Adressen.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="geoCodedAddress" type="GeoCodedAddress" minOccurs="0" maxOccurs="unbounded">
          <xs:annotation>
            <xs:documentation xml:lang="en">An address with its geocoding information.</xs:documentation>
            <xs:documentation xml:lang="de-DE">Eine Adresse mit zugehöriger Geokodierungs-Information.
            </xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <!-- geoHierarchyInfo is not used anymore -->
  <xs:element name="geoHierarchyInfo">
    <xs:complexType>
      <xs:sequence>
        <xs:annotation>
          <xs:documentation>geo info hierarchy</xs:documentation>
        </xs:annotation>
        <xs:element name="regionId" type="xs:int" minOccurs="0" maxOccurs="1"></xs:element>
        <xs:element name="cityId" type="xs:int" minOccurs="0" maxOccurs="1"></xs:element>
        <xs:element name="districtId" type="xs:int" minOccurs="0" maxOccurs="1"></xs:element>
        <xs:element name="postalCode" type="xs:string" minOccurs="0" maxOccurs="1"></xs:element>
        <xs:element name="neighbourhoodId" type="xs:long" minOccurs="0" maxOccurs="1"></xs:element>
        <xs:element name="gkz" type="xs:string" minOccurs="0" maxOccurs="1"></xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
