﻿<?xml version="1.0" encoding="utf-8"?>
<schema xmlns:expertreport="https://webservices.idosplatform.nl/expertreport/" xmlns:common="https://webservices.idosplatform.nl/common/" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="https://webservices.idosplatform.nl/expertreport/" elementFormDefault="qualified">
  <import namespace="https://webservices.idosplatform.nl/common/" schemaLocation="https://webservices.idosplatform.nl/Contracts/Common.xsd" />
  <simpleType name="ReportTypeType">
    <restriction base="string">
      <enumeration value="Valuation" />
    </restriction>
  </simpleType>
  <complexType name="ExpertType">
    <sequence minOccurs="1" maxOccurs="1">
      <element name="UserOrganisationId" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>The technical id of the returned User Organisation</documentation>
        </annotation>
        <simpleType>
          <restriction base="common:PositiveIntegerType" />
        </simpleType>
      </element>
      <element name="ShortName" minOccurs="1" maxOccurs="1">
        <annotation>
          <documentation>Short name of the User Organisation. Is unique within the system.</documentation>
        </annotation>
        <simpleType>
          <restriction base="string">
            <minLength value="1" />
            <maxLength value="250" />
          </restriction>
        </simpleType>
      </element>
    </sequence>
  </complexType>
  <complexType name="ReportType">
    <annotation>
      <documentation>Report retrieve type</documentation>
    </annotation>
    <sequence minOccurs="1" maxOccurs="1">
      <element name="Id" minOccurs="1" maxOccurs="1">
        <simpleType>
          <restriction base="common:PositiveIntegerType" />
        </simpleType>
      </element>
      <element name="Title" nillable="false" minOccurs="1" maxOccurs="1">
        <simpleType>
          <restriction base="string">
            <minLength value="1" />
          </restriction>
        </simpleType>
      </element>
      <element name="Expert" type="expertreport:ExpertType" nillable="false" minOccurs="1" maxOccurs="1" />
      <element name="StartDate" type="date" nillable="false" minOccurs="1" maxOccurs="1" />
      <element name="EndDate" type="date" nillable="true" minOccurs="0" maxOccurs="1" />
      <element name="Type" type="expertreport:ReportTypeType" minOccurs="1" maxOccurs="1" />
      <element name="IsActive" type="boolean" nillable="false" minOccurs="1" maxOccurs="1" />
    </sequence>
  </complexType>
  <element name="GetExpertReportsByDossierIdRequest">
    <annotation>
      <documentation>
				Dutch functional name: "Opvragen Deskundigenrapporten voor dossier"
			</documentation>
    </annotation>
    <complexType>
      <complexContent>
        <extension base="common:WithOnbehalfUserRequest">
          <sequence minOccurs="1" maxOccurs="1">
            <element name="DossierId" minOccurs="1" maxOccurs="1">
              <annotation>
                <documentation>Technical ID of the dossier for which to retrieve the expert reports</documentation>
              </annotation>
              <simpleType>
                <restriction base="common:PositiveIntegerType" />
              </simpleType>
            </element>
            <element name="IsActive" type="common:IsActiveType" default="Active" nillable="true" minOccurs="0" maxOccurs="1">
              <annotation>
                <documentation>
					  All: Return all expert reports in Dossier(active and inactive).
					  Active: Return only active expert reports in Dossier (DEFAULT).
					  Inactive: Return only inactive expert reports in Dossier.
				  </documentation>
              </annotation>
            </element>
          </sequence>
        </extension>
      </complexContent>
    </complexType>
  </element>
  <element name="GetExpertReportsByDossierIdResponse">
    <complexType>
      <sequence minOccurs="1" maxOccurs="1">
        <element name="ExpertReports" type="expertreport:ReportType" minOccurs="0" maxOccurs="unbounded">
          <annotation>
            <documentation>
            </documentation>
          </annotation>
        </element>
      </sequence>
    </complexType>
  </element>
  <element name="DownloadReportAsZipByIdRequest">
    <annotation>
      <documentation>
				Dutch functional name: "Opvragen REPORT document als .zip bestand"
			</documentation>
    </annotation>
    <complexType>
      <complexContent>
        <extension base="common:WithOnbehalfUserRequest">
          <sequence minOccurs="1" maxOccurs="1">
            <element name="ReportId" minOccurs="1" maxOccurs="1">
              <annotation>
                <documentation>Technical ID of document to retrieve</documentation>
              </annotation>
              <simpleType>
                <restriction base="common:PositiveIntegerType" />
              </simpleType>
            </element>
          </sequence>
        </extension>
      </complexContent>
    </complexType>
  </element>
  <element name="DownloadReportAsZipByIdResponse">
    <complexType>
      <sequence minOccurs="1" maxOccurs="1">
        <element name="Report" type="common:DocumentType" minOccurs="1" maxOccurs="1">
          <annotation>
            <documentation>
            </documentation>
          </annotation>
        </element>
      </sequence>
    </complexType>
  </element>
</schema>