<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
  <!-- Bank Suite API, /banksuite/bic/ response. Every leaf is a string and may be empty. -->
  <xs:complexType name="record">
    <xs:sequence>
      <xs:element name="office_type" type="xs:string"/>
      <xs:element name="legal_type" type="xs:string"/>
      <xs:element name="institution_status" type="xs:string"/>
      <xs:element name="iso_lei_code" type="xs:string"/>
      <xs:element name="bic8" type="xs:string"/>
      <xs:element name="branch_bic" type="xs:string"/>
      <xs:element name="bic" type="xs:string"/>
      <xs:element name="chips_uid" type="xs:string"/>
      <xs:element name="national_id" type="xs:string"/>
      <xs:element name="connected_bic" type="xs:string"/>
      <xs:element name="institution_name" type="xs:string"/>
      <xs:element name="branch_information" type="xs:string"/>
      <xs:element name="pob_number" type="xs:string"/>
      <xs:element name="street_address_1" type="xs:string"/>
      <xs:element name="street_address_2" type="xs:string"/>
      <xs:element name="street_address_3" type="xs:string"/>
      <xs:element name="street_address_4" type="xs:string"/>
      <xs:element name="city" type="xs:string"/>
      <xs:element name="cps" type="xs:string"/>
      <xs:element name="zip_code" type="xs:string"/>
      <xs:element name="country_name" type="xs:string"/>
      <xs:element name="iso_country_code" type="xs:string"/>
      <xs:element name="subtype_indicator" type="xs:string"/>
      <xs:element name="network_connectivity" type="xs:string"/>
      <xs:element name="service_codes" type="xs:string"/>
    </xs:sequence>
  </xs:complexType>
  <xs:element name="result">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="query">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="bic" type="xs:string"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="success" type="xs:string"/>
        <xs:element name="records_displayed" type="xs:string"/>
        <xs:element name="records_found" type="xs:string"/>
        <xs:element name="directory_results">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="row" type="record" minOccurs="0" maxOccurs="unbounded"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="error">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="code" type="xs:string"/>
              <xs:element name="message" type="xs:string"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
