﻿<?xml version="1.0" encoding="utf-8"?>
<schema xmlns:premium="https://webservices.idosplatform.nl/premium/" xmlns:common="https://webservices.idosplatform.nl/common/" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="https://webservices.idosplatform.nl/premium/" elementFormDefault="qualified">
  <import namespace="https://webservices.idosplatform.nl/common/" schemaLocation="https://webservices.idosplatform.nl/Contracts/Common.xsd" />
  <simpleType name="PremiumBase">
    <restriction base="string">
      <enumeration value="InsuredValue">
        <annotation>
          <documentation>Dutch functional name: 'VERZEKERD BEDRAG'</documentation>
        </annotation>
      </enumeration>
      <enumeration value="CatalogusValue">
        <annotation>
          <documentation>Dutch functional name: 'CATALOGUS WAARDE'</documentation>
        </annotation>
      </enumeration>
      <enumeration value="DayValue">
        <annotation>
          <documentation>Dutch functional name: 'DAG WAARDE'</documentation>
        </annotation>
      </enumeration>
      <enumeration value="CoverBaseValue">
        <annotation>
          <documentation>Dutch functional name: 'PREMIEGRONDSLAG'</documentation>
        </annotation>
      </enumeration>
      <enumeration value="SingleLossLimitValue">
        <annotation>
          <documentation>Dutch functional name: 'VORKBEDRAG'</documentation>
        </annotation>
      </enumeration>
    </restriction>
  </simpleType>
  <simpleType name="PremiumUnit">
    <restriction base="string">
      <enumeration value="Percentage" />
      <enumeration value="Promillage" />
    </restriction>
  </simpleType>
  <complexType name="BasePremiumByObjectListType" abstract="true">
    <annotation>
      <documentation>Base type for Group and Object premium 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 Premium</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 Object List this Premium 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 Risk Type
                    </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 Cover Type</documentation>
        </annotation>
        <simpleType>
          <restriction base="common:PositiveIntegerType" />
        </simpleType>
      </element>
      <element name="IsFixed" type="boolean" nillable="false" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>True if there is a fixed value specified. False if it is calculated using a base and rate</documentation>
        </annotation>
      </element>
      <element name="Unit" nillable="true" minOccurs="1" maxOccurs="1" type="premium:PremiumUnit">
        <annotation>
          <documentation>Filled if not IsFixed</documentation>
        </annotation>
      </element>
      <element name="Rate" nillable="true" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>Filled if not IsFixed. Dutch functional name: "VOET"</documentation>
        </annotation>
        <simpleType>
          <restriction base="decimal">
            <minInclusive value="0" />
            <maxInclusive value="99.999999999999999999" />
            <fractionDigits value="18" />
          </restriction>
        </simpleType>
      </element>
      <element name="Base" nillable="true" minOccurs="1" maxOccurs="1" type="premium:PremiumBase">
        <annotation>
          <documentation>Filled if not IsFixed and available for Dossier ProductType. Dutch functional name: "BASIS"</documentation>
        </annotation>
      </element>
      <element name="Amount" nillable="true" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>Dutch functional name: "JAARPREMIE"</documentation>
        </annotation>
        <simpleType>
          <restriction base="decimal" />
        </simpleType>
      </element>
      <element name="CurrencyId" nillable="true" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>Unique technical id of the Currency used for this Premium</documentation>
        </annotation>
        <simpleType>
          <restriction base="common:PositiveIntegerType" />
        </simpleType>
      </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 the Premium was created
                    </documentation>
        </annotation>
      </element>
      <element name="LastModifiedByUserId" nillable="false" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>Unique technical id of the User that last modified the returned Premium</documentation>
        </annotation>
        <simpleType>
          <restriction base="common:PositiveIntegerType" />
        </simpleType>
      </element>
      <element name="LastModifiedDateTime" type="dateTime" nillable="false" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>
                        DateTime when the Premium was last modified
                    </documentation>
        </annotation>
      </element>
    </sequence>
  </complexType>
  <complexType name="BasePremiumByObjectType" abstract="true">
    <annotation>
      <documentation>Base type for Group and Object premium 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 Premium</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 Risk Type
                    </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 Cover Type</documentation>
        </annotation>
        <simpleType>
          <restriction base="common:PositiveIntegerType" />
        </simpleType>
      </element>
      <element name="IsFixed" type="boolean" nillable="false" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>True if there is a fixed value specified. False if it is calculated using a base and rate</documentation>
        </annotation>
      </element>
      <element name="Unit" nillable="true" minOccurs="1" maxOccurs="1" type="premium:PremiumUnit">
        <annotation>
          <documentation>Filled if not IsFixed</documentation>
        </annotation>
      </element>
      <element name="Rate" nillable="true" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>Filled if not IsFixed. Dutch functional name: "VOET"</documentation>
        </annotation>
        <simpleType>
          <restriction base="decimal">
            <minInclusive value="0" />
            <maxInclusive value="99.999999999999999999" />
            <fractionDigits value="18" />
          </restriction>
        </simpleType>
      </element>
      <element name="Base" nillable="true" minOccurs="1" maxOccurs="1" type="premium:PremiumBase">
        <annotation>
          <documentation>Filled if not IsFixed and available for Dossier ProductType. Dutch functional name: "BASIS"</documentation>
        </annotation>
      </element>
      <element name="Amount" nillable="true" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>Dutch functional name: "JAARPREMIE"</documentation>
        </annotation>
        <simpleType>
          <restriction base="decimal" />
        </simpleType>
      </element>
      <element name="CurrencyId" nillable="true" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>Unique technical id of the Currency used for this Premium</documentation>
        </annotation>
        <simpleType>
          <restriction base="common:PositiveIntegerType" />
        </simpleType>
      </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 the Premium was created
                    </documentation>
        </annotation>
      </element>
      <element name="LastModifiedByUserId" nillable="false" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>Unique technical id of the User that last modified the returned Premium</documentation>
        </annotation>
        <simpleType>
          <restriction base="common:PositiveIntegerType" />
        </simpleType>
      </element>
      <element name="LastModifiedDateTime" type="dateTime" nillable="false" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>
                        DateTime when the Premium was last modified
                    </documentation>
        </annotation>
      </element>
    </sequence>
  </complexType>
  <complexType name="GroupPremiumByObjectListType">
    <annotation>
      <documentation>Group premium information</documentation>
    </annotation>
    <complexContent>
      <extension base="premium:BasePremiumByObjectListType">
        <sequence>
          <element name="ObjectGroupId" nillable="true" minOccurs="1" maxOccurs="1">
            <annotation>
              <documentation>Filled when premium 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 premium is for object group</documentation>
            </annotation>
            <simpleType>
              <restriction base="common:PositiveIntegerType" />
            </simpleType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="ObjectPremiumByObjectListType">
    <annotation>
      <documentation>Object premium information</documentation>
    </annotation>
    <complexContent>
      <extension base="premium:BasePremiumByObjectListType">
        <sequence>
          <element name="ObjectId" nillable="true" minOccurs="1" maxOccurs="1">
            <annotation>
              <documentation>Filled when premium 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 premium is for object</documentation>
            </annotation>
            <simpleType>
              <restriction base="common:PositiveIntegerType" />
            </simpleType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="ObjectPremiumByObjectType">
    <annotation>
      <documentation>Object premium information</documentation>
    </annotation>
    <complexContent>
      <extension base="premium:BasePremiumByObjectType">
        <sequence>
          <element name="ObjectVersion" nillable="true" minOccurs="1" maxOccurs="1">
            <annotation>
              <documentation>Filled when premium is for object</documentation>
            </annotation>
            <simpleType>
              <restriction base="common:PositiveIntegerType" />
            </simpleType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="PremiumsByObjectListType">
    <choice maxOccurs="unbounded">
      <element name="GroupPremium" type="premium:GroupPremiumByObjectListType" />
      <element name="ObjectPremium" type="premium:ObjectPremiumByObjectListType" />
    </choice>
  </complexType>
  <complexType name="PremiumsByObjectType">
    <sequence minOccurs="0" maxOccurs="unbounded">
      <element name="ObjectPremium" type="premium:ObjectPremiumByObjectType" />
    </sequence>
  </complexType>
  <element name="GetPremiumsByObjectListIdRequest">
    <annotation>
      <documentation>
                Dutch functional name: "Opvragen PREMIES voor OBJECTEN LIJST"
            </documentation>
    </annotation>
    <complexType>
      <complexContent>
        <extension base="common:WithOnbehalfUserOrEmailRequest">
          <sequence minOccurs="1" maxOccurs="1">
            <element name="ObjectListId" minOccurs="1" maxOccurs="1">
              <annotation>
                <documentation>
                                    Unique technical id of the Object List
                                </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="GetPremiumsByObjectListIdResponse">
    <complexType>
      <sequence minOccurs="1" maxOccurs="1">
        <element name="Premiums" type="premium:PremiumsByObjectListType" minOccurs="1" maxOccurs="1">
          <annotation>
            <documentation>
                            Premiums in the specified Object List
                        </documentation>
          </annotation>
        </element>
        <element name="Paging" type="common:PagingResponseType" nillable="false" minOccurs="1" maxOccurs="1" />
      </sequence>
    </complexType>
  </element>
  <complexType name="PremiumValueType">
    <sequence minOccurs="1" maxOccurs="1">
      <element name="PremiumValue" minOccurs="1" maxOccurs="1" nillable="false">
        <simpleType>
          <restriction base="decimal">
            <minInclusive value="0" />
            <maxInclusive value="9999999999999.99" />
            <fractionDigits value="2" />
          </restriction>
        </simpleType>
      </element>
      <element name="PremiumValueCurrencyId" minOccurs="1" maxOccurs="1" nillable="false">
        <annotation>
          <documentation>Unique technical identifier of the currency used for the premium value</documentation>
        </annotation>
        <simpleType>
          <restriction base="common:PositiveIntegerType" />
        </simpleType>
      </element>
    </sequence>
  </complexType>
  <complexType name="PremiumRateType">
    <sequence minOccurs="1" maxOccurs="1">
      <element name="Rate" minOccurs="1" maxOccurs="1" nillable="false">
        <simpleType>
          <restriction base="decimal">
            <minInclusive value="0" />
            <maxInclusive value="99.999999999999999999" />
            <fractionDigits value="18" />
          </restriction>
        </simpleType>
      </element>
      <element name="PremiumUnit" type="premium:PremiumUnit" minOccurs="1" maxOccurs="1" nillable="false" />
      <element name="PremiumBase" type="premium:PremiumBase" minOccurs="1" maxOccurs="1" nillable="false" />
    </sequence>
  </complexType>
</schema>