<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:efti-aap="http://efti.fi/v1/aap"
            xmlns:efti-si="http://efti.fi/v1/aap/search-identifier-response"
            xmlns:efti-ft021="urn:eu:move:eFTI:data:standard:ReusableAggregateBusinessInformationEntity:34"
            targetNamespace="http://efti.fi/v1/aap/search-identifier-response"
            elementFormDefault="qualified">

    <xsd:import namespace="http://efti.fi/v1/aap"
                schemaLocation="./v1-common.xsd"/>
    <xsd:import
            namespace="urn:eu:move:eFTI:data:standard:ReusableAggregateBusinessInformationEntity:34"
            schemaLocation="../move.eu/Semantic%20XML%20Schemas/FTI021/FTI021s_urn_eu_move_eFTI_data_standard_ReusableAggregateBusinessInformationEntity_34.xsd"/>

    <xsd:element name="searchIdentifierResponse" type="efti-si:SearchIdentifierResponse"/>

    <xsd:complexType name="SearchIdentifierResponse">
        <xsd:annotation>
            <xsd:documentation>
                Response payload to the identifier request. Includes gate statuses and results from all gates.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="gate" type="efti-si:GateStatus" minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element name="result" type="efti-si:SearchIdentifierResponseResult" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="SearchIdentifierResponseResult">
        <xsd:sequence>
            <xsd:element name="uil" type="efti-aap:UIL"/>
            <xsd:element name="consignment" type="efti-ft021:IDSetCriteriaType"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="GatesResponse">
        <xsd:sequence>
            <xsd:element name="gate" type="xsd:token" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="GateStatus">
        <xsd:attribute name="gateId" type="xsd:token" use="required"/>
        <!-- TODO v1: status -->
        <xsd:attribute name="status" type="xsd:token" use="required"/>
    </xsd:complexType>

</xsd:schema>
