<xs:schema xmlns="http://ivis.eps.gov.lv/XMLSchemas/100580/SocialMonitoring/v1-0" xmlns:sm="http://ivis.eps.gov.lv/XMLSchemas/100580/SocialMonitoring/v1-0" xmlns:vidc="http://ivis.eps.gov.lv/XMLSchemas/100580/Comm/v1-0" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ivis.eps.gov.lv/XMLSchemas/100580/SocialMonitoring/v1-0" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0" id="NoResidentsExchange.xsd">
  <xs:annotation>
    <xs:appinfo>
      <Metadata xmlns="http://ivis.eps.gov.lv/XMLSchemas/100001/IVIS/v1-0">
        <Contributor CodeListCodeValue="100580" Href="https://www.vid.gov.lv">Valsts ieņēmumu dienests</Contributor>
        <Creator CodeListCodeValue="100580" Href="https://www.vid.gov.lv">Valsts ieņēmumu dienests</Creator>
        <Date>
          <Created>2025-09-05Z</Created>
          <Modified>2025-09-05Z</Modified>
        </Date>
        <Description>
          <Default>Datu apmaiņas struktūras informācijai par fizisko personu rezidences statusu. Izmantotie saīsinājumi: VSAOI - Valsts sociālās apdrošināšanas obligātās iemaksas; SSIMC - State social insurance mandatory contributions.</Default>
        </Description>
        <Format>
          <Default>text/xml</Default>
        </Format>
        <Identifier Scheme="URN">URN:IVIS:100001:xsd-100580-NoResidentsExchange-1.0</Identifier>
        <Language>LV</Language>
        <Publisher CodeListCodeValue="100001">Valsts informācijas sistēmu savietotājs (VISS)</Publisher>
        <Relation>
          <ConformsTo Href="URN:IVIS:100001:DOC-FR-XML">XML shēmu izstrādes vadlīnijas</ConformsTo>
        </Relation>
        <Status>
          <Default>CANDIDATE</Default>
          <Version>1.0</Version>
        </Status>
        <Subject>
          <Category>Nodokļi</Category>
          <Keyword>autoratlīdzība</Keyword>
          <Keyword>VSAOI</Keyword>
          <Keyword>VSAA</Keyword>
          <Keyword>VID</Keyword>
          <Keyword>Valsts ieņēmumu dienests</Keyword>
          <Keyword>DIT</Keyword>
          <Keyword>datu apmaiņa</Keyword>
        </Subject>
        <Title>
          <Default>NoResidentsExchange</Default>
        </Title>
      </Metadata>
    </xs:appinfo>
  </xs:annotation>
  <xs:import namespace="http://ivis.eps.gov.lv/XMLSchemas/100580/Comm/v1-0" schemaLocation="http://ivis.eps.gov.lv/XMLSchemas/100580/Comm/v1-0/Comm.xsd" />
  <xs:include schemaLocation="NoResidentsObject.xsd" />
  <xs:element name="NoResidentsChanges" type="sm:NoResidentsChangesPacketStructure">
    <xs:annotation>
      <xs:documentation xml:lang="lv">Neriezidentu (NEREZIDENTI) sūtījuma pakete</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="NoResidentsChangesPacketStructure">
    <xs:annotation>
      <xs:documentation xml:lang="lv">Autoratlīdzības saņēmēja deklarāciju (ASD) sūtījuma paketes struktūra</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="SubjectTypeCode" type="SubjectTypeCodeType" fixed="NEREZIDENTI">
        <xs:annotation>
          <xs:documentation xml:lang="lv">Sūtījumā iekļauto datu izmaiņu datu kopas kods (vienmēr "NEREZIDENTI")</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="PacketId" type="sm:PacketIdType">
        <xs:annotation>
          <xs:documentation xml:lang="lv">Sūtījuma paketes identifikators</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ReportingInfo" type="ReportingInfoStructure">
        <xs:annotation>
          <xs:documentation xml:lang="lv">Informācija par datu izmaiņu apkopojumu</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SubjectStateList" type="sm:NoResidentsChangeListStructure">
        <xs:annotation>
          <xs:documentation xml:lang="lv">Nerezidentu datu saraksts</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="RelatedMessageId" type="sm:PacketIdType" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="lv">Saistītā ziņojuma (konsolidētā datu pieprasījuma) identifikators</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="NoResidentsChangeListStructure">
    <xs:annotation>
      <xs:documentation xml:lang="lv">Autoratlīdzības saņēmēju deklarāciju (ASD) saraksta struktūra</xs:documentation>
    </xs:annotation>
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
      <xs:element name="SubjectState" type="sm:NoResidentsChangeRecordStructure">
        <xs:annotation>
          <xs:documentation xml:lang="lv">Nerezidenta dati</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="NoResidentsChangeRecordStructure">
    <xs:annotation>
      <xs:documentation xml:lang="lv">Autoratlīdzības saņēmēja deklarācijas (ASD) ieraksta izmaiņu struktūra</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="SubjectReferenceId" type="SubjectReferenceIdType">
        <xs:annotation>
          <xs:documentation xml:lang="lv">Identifikators identificē ierakstu.
šablons: NEREZ-{id_persona_fiziska}, piemēram, NEREZ-90009091111		</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Operation" type="sm:OperationType">
        <xs:annotation>
          <xs:documentation xml:lang="lv">Ieraksta labošanas pazīme:
createOrUpdate = jauns vai mainīti dati;
delete = ieraksts dzēsts</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="StateSince" type="sm:DateTimeType">
        <xs:annotation>
          <xs:documentation xml:lang="lv">Pēdējo izmaiņu datums un laiks</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SubjectData" type="NoResidentsDataStructure" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="lv">Dati par nerezidentiem (NEREZIDENTI) un to nerezidences periodiem</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:schema>