﻿<?xml version="1.0" encoding="utf-8"?>
<schema xmlns:coverage="https://webservices.idosplatform.nl/coverage/" xmlns:common="https://webservices.idosplatform.nl/common/" xmlns:premium="https://webservices.idosplatform.nl/premium/" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="https://webservices.idosplatform.nl/coverage/" elementFormDefault="qualified">
  <import namespace="https://webservices.idosplatform.nl/common/" schemaLocation="https://webservices.idosplatform.nl/Contracts/Common.xsd" />
  <import namespace="https://webservices.idosplatform.nl/premium/" schemaLocation="https://webservices.idosplatform.nl/Contracts/Premium_2.30.xsd" />
  <complexType name="BaseCoverageByObjectListType" abstract="true">
    <annotation>
      <documentation>Base type for Group and Object coverage information</documentation>
    </annotation>
    <sequence minOccurs="1" maxOccurs="1">
      <element name="Id" nillable="false" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>Unique technical id of the returned Coverage</documentation>
        </annotation>
        <simpleType>
          <restriction base="common:PositiveIntegerType" />
        </simpleType>
      </element>
      <element name="ObjectListId" nillable="false" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>Unique technical id of the Objectlist this coverage is part of</documentation>
        </annotation>
        <simpleType>
          <restriction base="common:PositiveIntegerType" />
        </simpleType>
      </element>
      <element name="RiskTypeId" nillable="true" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>Unique technical id of the risktype of this coverage</documentation>
        </annotation>
        <simpleType>
          <restriction base="common:PositiveIntegerType" />
        </simpleType>
      </element>
      <element name="CoverTypeId" nillable="true" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>Unique technical id of the covertype of this coverage</documentation>
        </annotation>
        <simpleType>
          <restriction base="common:PositiveIntegerType" />
        </simpleType>
      </element>
      <element name="InsuredValue" nillable="true" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>The insured value</documentation>
        </annotation>
        <simpleType>
          <restriction base="decimal" />
        </simpleType>
      </element>
      <element name="CurrencyId" nillable="true" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>Technical id of the currency of this coverage</documentation>
        </annotation>
        <simpleType>
          <restriction base="common:PositiveIntegerType" />
        </simpleType>
      </element>
      <element name="FromDate" type="date" nillable="true" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>The first date this coverage is active on</documentation>
        </annotation>
      </element>
      <element name="EndDate" type="date" nillable="true" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>EndDate is up to and including</documentation>
        </annotation>
      </element>
      <element name="HasValuation" type="boolean" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>Indication whether the coverage has any valuation reports attached</documentation>
        </annotation>
      </element>
      <element name="Characteristics" minOccurs="1" maxOccurs="1">
        <complexType>
          <sequence minOccurs="0" maxOccurs="unbounded">
            <element name="Characteristic" type="coverage:CharacteristicType" minOccurs="0" maxOccurs="unbounded">
              <annotation>
                <documentation>Characteristic of the coverage</documentation>
              </annotation>
            </element>
          </sequence>
        </complexType>
      </element>
      <element name="CreatedByUserId" nillable="false" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>Unique technical id of the User that created the returned Premium</documentation>
        </annotation>
        <simpleType>
          <restriction base="common:PositiveIntegerType" />
        </simpleType>
      </element>
      <element name="CreatedDateTime" type="dateTime" nillable="false" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>DateTime when this coverage was created</documentation>
        </annotation>
      </element>
    </sequence>
  </complexType>
  <complexType name="GroupCoverageByObjectListType">
    <annotation>
      <documentation>Group coverage information</documentation>
    </annotation>
    <complexContent>
      <extension base="coverage:BaseCoverageByObjectListType">
        <sequence>
          <element name="ObjectGroupId" nillable="true" minOccurs="1" maxOccurs="1">
            <annotation>
              <documentation>Filled when coverage is for object group</documentation>
            </annotation>
            <simpleType>
              <restriction base="common:PositiveIntegerType" />
            </simpleType>
          </element>
          <element name="ObjectGroupVersion" nillable="true" minOccurs="1" maxOccurs="1">
            <annotation>
              <documentation>Filled when coverage is for object group</documentation>
            </annotation>
            <simpleType>
              <restriction base="common:PositiveIntegerType" />
            </simpleType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="BaseCoverageByObjectType" abstract="true">
    <annotation>
      <documentation>Base type for Group and Object coverage information</documentation>
    </annotation>
    <sequence minOccurs="1" maxOccurs="1">
      <element name="Id" nillable="false" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>Unique technical id of the returned Coverage</documentation>
        </annotation>
        <simpleType>
          <restriction base="common:PositiveIntegerType" />
        </simpleType>
      </element>
      <element name="RiskTypeId" nillable="true" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>Unique technical id of the risktype of this coverage</documentation>
        </annotation>
        <simpleType>
          <restriction base="common:PositiveIntegerType" />
        </simpleType>
      </element>
      <element name="CoverTypeId" nillable="true" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>Unique technical id of the covertype of this coverage</documentation>
        </annotation>
        <simpleType>
          <restriction base="common:PositiveIntegerType" />
        </simpleType>
      </element>
      <element name="InsuredValue" nillable="true" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>The insured value</documentation>
        </annotation>
        <simpleType>
          <restriction base="decimal" />
        </simpleType>
      </element>
      <element name="CurrencyId" nillable="true" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>Technical id of the currency of this coverage</documentation>
        </annotation>
        <simpleType>
          <restriction base="common:PositiveIntegerType" />
        </simpleType>
      </element>
      <element name="FromDate" type="date" nillable="true" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>The first date this coverage is active on</documentation>
        </annotation>
      </element>
      <element name="EndDate" type="date" nillable="true" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>EndDate is up to and including</documentation>
        </annotation>
      </element>
      <element name="HasValuation" type="boolean" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>Indication whether the coverage has any valuation reports attached</documentation>
        </annotation>
      </element>
      <element name="Characteristics" minOccurs="1" maxOccurs="1">
        <complexType>
          <sequence minOccurs="0" maxOccurs="unbounded">
            <element name="Characteristic" type="coverage:CharacteristicType" minOccurs="0" maxOccurs="unbounded">
              <annotation>
                <documentation>Characteristic of the coverage</documentation>
              </annotation>
            </element>
          </sequence>
        </complexType>
      </element>
      <element name="CreatedByUserId" nillable="false" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>Unique technical id of the User that created the returned Premium</documentation>
        </annotation>
        <simpleType>
          <restriction base="common:PositiveIntegerType" />
        </simpleType>
      </element>
      <element name="CreatedDateTime" type="dateTime" nillable="false" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>DateTime when this coverage was created</documentation>
        </annotation>
      </element>
    </sequence>
  </complexType>
  <complexType name="ObjectCoverageByObjectListType">
    <annotation>
      <documentation>Object coverage information</documentation>
    </annotation>
    <complexContent>
      <extension base="coverage:BaseCoverageByObjectListType">
        <sequence>
          <element name="ObjectId" nillable="true" minOccurs="1" maxOccurs="1">
            <annotation>
              <documentation>Filled when coverage is for object</documentation>
            </annotation>
            <simpleType>
              <restriction base="common:PositiveIntegerType" />
            </simpleType>
          </element>
          <element name="ObjectVersion" nillable="true" minOccurs="1" maxOccurs="1">
            <annotation>
              <documentation>Filled when coverage is for object</documentation>
            </annotation>
            <simpleType>
              <restriction base="common:PositiveIntegerType" />
            </simpleType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="ObjectCoverageByObjectType">
    <annotation>
      <documentation>Object coverage information</documentation>
    </annotation>
    <complexContent>
      <extension base="coverage:BaseCoverageByObjectType">
        <sequence>
          <element name="ObjectVersion" nillable="true" minOccurs="1" maxOccurs="1">
            <annotation>
              <documentation>Filled when coverage is for object</documentation>
            </annotation>
            <simpleType>
              <restriction base="common:PositiveIntegerType" />
            </simpleType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="CoveragesByObjectListType">
    <choice maxOccurs="unbounded">
      <element name="GroupCoverage" type="coverage:GroupCoverageByObjectListType" />
      <element name="ObjectCoverage" type="coverage:ObjectCoverageByObjectListType" />
    </choice>
  </complexType>
  <complexType name="CoveragesByObjectType">
    <sequence minOccurs="0" maxOccurs="unbounded">
      <element name="ObjectCoverage" type="coverage:ObjectCoverageByObjectType" />
    </sequence>
  </complexType>
  <element name="GetCoveragesByObjectListIdRequest">
    <annotation>
      <documentation>
                Dutch functional name: "Opvragen DEKKINGEN voor OBJECTEN LIJST"
            </documentation>
    </annotation>
    <complexType>
      <complexContent>
        <extension base="common:WithOnbehalfUserRequest">
          <sequence minOccurs="1" maxOccurs="1">
            <element name="ObjectListId" minOccurs="1" maxOccurs="1">
              <annotation>
                <documentation>Unique technical id of the Objectlist</documentation>
              </annotation>
              <simpleType>
                <restriction base="common:PositiveIntegerType" />
              </simpleType>
            </element>
            <element name="Paging" type="common:PagingRequestType" nillable="false" minOccurs="1" maxOccurs="1" />
          </sequence>
        </extension>
      </complexContent>
    </complexType>
  </element>
  <element name="GetCoveragesByObjectListIdResponse">
    <complexType>
      <sequence minOccurs="1" maxOccurs="1">
        <element name="Coverages" type="coverage:CoveragesByObjectListType" minOccurs="1" maxOccurs="1">
          <annotation>
            <documentation>List of coverages that are part of the specified objectlist</documentation>
          </annotation>
        </element>
        <element name="Paging" type="common:PagingResponseType" nillable="false" minOccurs="1" maxOccurs="1" />
      </sequence>
    </complexType>
  </element>
  <complexType abstract="true" name="BaseCreateCoverageType">
    <annotation>
      <documentation>Base type for creating Group and Object coverage information</documentation>
    </annotation>
    <sequence minOccurs="1" maxOccurs="1">
      <element name="RiskTypeId" minOccurs="1" maxOccurs="1" nillable="true">
        <annotation>
          <documentation>Unique technical id of the risk type of this coverage</documentation>
        </annotation>
        <simpleType>
          <restriction base="common:PositiveIntegerType" />
        </simpleType>
      </element>
      <element name="CoverTypeId" minOccurs="1" maxOccurs="1" nillable="true">
        <annotation>
          <documentation>Unique technical id of the cover type of this coverage</documentation>
        </annotation>
        <simpleType>
          <restriction base="common:PositiveIntegerType" />
        </simpleType>
      </element>
      <element name="InsuredValue" minOccurs="1" maxOccurs="1" nillable="true">
        <annotation>
          <documentation>The insured value</documentation>
        </annotation>
        <simpleType>
          <restriction base="decimal" />
        </simpleType>
      </element>
      <element name="CurrencyId" minOccurs="1" maxOccurs="1" nillable="true">
        <annotation>
          <documentation>Technical id of the currency of this coverage</documentation>
        </annotation>
        <simpleType>
          <restriction base="common:PositiveIntegerType" />
        </simpleType>
      </element>
      <element name="FromDate" type="date" minOccurs="1" maxOccurs="1" nillable="true">
        <annotation>
          <documentation>The first date this coverage is active on</documentation>
        </annotation>
      </element>
      <element name="Premium" minOccurs="1" maxOccurs="1" nillable="false" type="coverage:CreateCoveragePremiumType">
        <annotation>
          <documentation>The premium data for this coverage</documentation>
        </annotation>
      </element>
      <element name="Characteristics" minOccurs="1" maxOccurs="1">
        <complexType>
          <sequence minOccurs="0" maxOccurs="unbounded">
            <element name="Characteristic" type="coverage:CharacteristicType" minOccurs="0" maxOccurs="unbounded">
              <annotation>
                <documentation>Characteristic of the coverage</documentation>
              </annotation>
            </element>
          </sequence>
        </complexType>
      </element>
    </sequence>
  </complexType>
  <complexType name="CharacteristicType">
    <sequence minOccurs="1" maxOccurs="1">
      <element name="Name" minOccurs="1" maxOccurs="1" nillable="false">
        <annotation>
          <documentation>Name of the characteristic. If the characteristic already exists (case insensitive) on dossier or user organisation level, the existing characteristic is linked to this coverage. Otherwise a new characteristic is created and linked to this coverage on dossier level.</documentation>
        </annotation>
        <simpleType>
          <restriction base="string" />
        </simpleType>
      </element>
    </sequence>
  </complexType>
  <complexType name="CreateCoveragePremiumType">
    <sequence minOccurs="1" maxOccurs="1">
      <choice>
        <element name="PremiumRate" type="premium:PremiumRateType" />
        <element name="PremiumValue" type="premium:PremiumValueType" />
      </choice>
    </sequence>
  </complexType>
  <complexType name="CreateCoverageType">
    <annotation>
      <documentation>Object coverage information</documentation>
    </annotation>
    <complexContent>
      <extension base="coverage:BaseCreateCoverageType">
        <sequence>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="CreateCoveragesType">
    <sequence maxOccurs="unbounded">
      <element name="Coverage" type="coverage:CreateCoverageType" />
    </sequence>
  </complexType>
</schema>