﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns="http://refdatabase.refdata.ch/V2/Partner_in" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://refdatabase.refdata.ch/V2/Partner_in" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2015-02" id="Partner_in">
  <xs:element name="PARTNER_IN">
    <xs:annotation>
      <xs:documentation xml:lang="EN">Address information of partners</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="TYPE">
          <xs:annotation>
            <xs:documentation xml:lang="EN">Search Type</xs:documentation>
          </xs:annotation>
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:maxLength value="1"/>
              <xs:enumeration value="ALL">
                <xs:annotation>
                  <xs:documentation xml:lang="EN">ALL</xs:documentation>
                </xs:annotation>
              </xs:enumeration>
              <xs:enumeration value="DATE">
                <xs:annotation>
                  <xs:documentation xml:lang="EN">Get By Date, all records modified since the date</xs:documentation>
                </xs:annotation>
              </xs:enumeration>
              <xs:enumeration value="GLN">
                <xs:annotation>
                  <xs:documentation xml:lang="EN">Search by Gln</xs:documentation>
                </xs:annotation>
              </xs:enumeration>
              <xs:enumeration value="NAME">
                <xs:annotation>
                  <xs:documentation xml:lang="EN">Search by Name</xs:documentation>
                </xs:annotation>
              </xs:enumeration>
            </xs:restriction>
          </xs:simpleType>
        </xs:element>
        <xs:element name="PTYPE">
          <xs:annotation>
            <xs:documentation xml:lang="EN">Partner Type, JUR or NAT</xs:documentation>
          </xs:annotation>
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:maxLength value="1"/>
              <xs:enumeration value="JUR">
                <xs:annotation>
                  <xs:documentation xml:lang="EN">JUR</xs:documentation>
                </xs:annotation>
              </xs:enumeration>
              <xs:enumeration value="NAT">
                <xs:annotation>
                  <xs:documentation xml:lang="EN">NAT</xs:documentation>
                </xs:annotation>
              </xs:enumeration>
              <xs:enumeration value="ALL">
                <xs:annotation>
                  <xs:documentation xml:lang="EN">NAT + JUR</xs:documentation>
                </xs:annotation>
              </xs:enumeration>
            </xs:restriction>
          </xs:simpleType>
        </xs:element>
        <xs:element name="TERM" nillable="false">
          <xs:annotation>
            <xs:documentation xml:lang="EN">Search Term dependant of the search type: DATE -> mutationDate (dd.MM.yyyy), GLN -> Gln, NAME -> Name</xs:documentation>
          </xs:annotation>
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:maxLength value="20"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
