<?xml version="1.0" encoding="utf-8"?>
<schema targetNamespace="http://ws.infotorg.no/xml/TRank/ReelleRettighetshavere/2020-03-25/ReelleRettighetshavere.xsd"
        xmlns:tns="http://ws.infotorg.no/xml/TRank/ReelleRettighetshavere/2020-03-25/ReelleRettighetshavere.xsd"
        xmlns:feil="http://ws.infotorg.no/xml/Feil/Feil.xsd"
        xmlns="http://www.w3.org/2001/XMLSchema">


    <annotation>
        <documentation xml:lang="no">
            Datatyper for Reelle rettighetshavere.

            © 2020 TietoEVRY
            Forfatter: Christer Svenning &lt;christer.svenning@tietoevry.com&gt;
        </documentation>
    </annotation>


    <!-- Request -->
    <element name="hentReelleRettighetshavere">
        <complexType>
            <sequence>
                <element name="companynumber" type="int" minOccurs="1" maxOccurs="1">
                    <annotation>
                        <documentation xml:lang="no">Organisasjonsnummer</documentation>
                    </annotation>
                </element>
                <element name="model" type="string" minOccurs="1" maxOccurs="1">
                    <annotation>
                        <documentation xml:lang="no">Model (simcon,integrated,vp,control choose one, or the ones you need separated with comma without space)</documentation>
                    </annotation>
                </element>
                <element name="threshold_integrated" type="float" minOccurs="0" maxOccurs="1">
                    <annotation>
                        <documentation xml:lang="no">threshold_integrated</documentation>
                    </annotation>
                </element>
                <element name="threshold_simcon" type="int" minOccurs="0" maxOccurs="1">
                    <annotation>
                        <documentation xml:lang="no">threshold_simcon values 10 or 25</documentation>
                    </annotation>
                </element>
                <element name="threshold_control_share" type="float" minOccurs="0" maxOccurs="1">
                    <annotation>
                        <documentation xml:lang="no">threshold_control_share</documentation>
                    </annotation>
                </element>
                <element name="threshold_control_control" type="float" minOccurs="0" maxOccurs="1">
                    <annotation>
                        <documentation xml:lang="no">threshold_control_control</documentation>
                    </annotation>
                </element>
                <element name="include_legal" type="boolean" minOccurs="0" maxOccurs="1">
                    <annotation>
                        <documentation xml:lang="no">include_legal</documentation>
                    </annotation>
                </element>
                <element name="include_unidentified" type="boolean" minOccurs="0" maxOccurs="1">
                    <annotation>
                        <documentation xml:lang="no">include_unidentified</documentation>
                    </annotation>
                </element>
                <element name="include_roles" type="boolean" minOccurs="0" maxOccurs="1">
                    <annotation>
                        <documentation xml:lang="no">include_roles</documentation>
                    </annotation>
                </element>
            </sequence>
        </complexType>
    </element>

    <!-- Response -->
    <element name="ReelleRettighetshavere" type="tns:ReelleRettighetshavereType"/>

    <complexType name="ReelleRettighetshavereType">
        <sequence>
            <element name="meta" type="tns:meta" />
            <element name="request" type="tns:request" />
            <element name="subject" type="tns:subject" />
            <element name="beneficial_owners" type="tns:beneficial" />
            <element name="legal_persons" type="tns:legal" />
            <element name="company_roles" type="tns:comproles" />
        </sequence>
    </complexType>

    <complexType name="meta">
        <sequence>
            <element name="dump_date" type="dateTime" nillable="true" minOccurs="0"/>
        </sequence>
    </complexType>

    <complexType name="request">
        <all>
            <element name="model" type="string" nillable="true" minOccurs="0"/>
            <element name="companynumber" type="string" nillable="true" minOccurs="0"/>
            <element name="threshold_integrated" type="string" nillable="true" minOccurs="0"/>
            <element name="threshold_simcon" type="string" nillable="true" minOccurs="0"/>
            <element name="threshold_control_share" type="string" nillable="true" minOccurs="0"/>
            <element name="threshold_control_control" type="string" nillable="true" minOccurs="0"/>
            <element name="include_legal" type="string" nillable="true" minOccurs="0"/>
            <element name="include_unidentified" type="string" nillable="true" minOccurs="0"/>
            <element name="include_roles" type="string" nillable="true" minOccurs="0"/>
        </all>
    </complexType>

    <complexType name="subject">
        <all>
            <element name="account_date" nillable="true" minOccurs="0" type="date"/>
            <element name="accum_date" nillable="true" minOccurs="0" type="date"/>
            <element name="sum_votes" nillable="true" minOccurs="0" type="float"/>
            <element name="completeness" nillable="true" minOccurs="0" type="float"/>
            <element name="country" nillable="true" minOccurs="0" type="string"/>
            <element name="dept" nillable="true" minOccurs="0" type="long"/>
            <element name="dept_cred_inst" nillable="true" minOccurs="0" type="int"/>
            <element name="deleted_date" nillable="true" minOccurs="0" type="date"/>
            <element name="domain" nillable="true" minOccurs="0" type="string"/>
            <element name="employees" nillable="true" minOccurs="0" type="string"/>
            <element name="entity_type" nillable="true" minOccurs="0" type="string"/>
            <element name="equity" nillable="true" minOccurs="0" type="int"/>
            <element name="f_date" nillable="true" minOccurs="0" type="date"/>
            <element name="gender" nillable="true" minOccurs="0" type="string"/>
            <element name="id" nillable="true" minOccurs="0" type="string"/>
            <element name="incorp_date" nillable="true" minOccurs="0" type="date"/>
            <element name="listing_status" nillable="true" minOccurs="0" type="string"/>
            <element name="max_shareholder_distance" nillable="true" minOccurs="0" type="int"/>
            <element name="nacecode" nillable="true" minOccurs="0" type="string"/>
            <element name="name" nillable="true" minOccurs="0" type="string"/>
            <element name="num_shareholders_direct" nillable="true" minOccurs="0" type="int"/>
            <element name="num_shareholders_total" nillable="true" minOccurs="0" type="int"/>
            <element name="op_profit" nillable="true" minOccurs="0" type="int"/>
            <element name="place" nillable="true" minOccurs="0" type="string"/>
            <element name="privileged_ssn" nillable="true" minOccurs="0" type="string"/>
            <element name="revenue" nillable="true" minOccurs="0" type="int"/>
            <element name="self_ownership" nillable="true" minOccurs="0" type="float"/>
            <element name="group_solidity" nillable="true" minOccurs="0" type="float"/>
            <element name="group_dept_cred_inst" nillable="true" minOccurs="0" type="float"/>
            <element name="group_equity" nillable="true" minOccurs="0" type="int"/>
            <element name="group_op_profit" nillable="true" minOccurs="0" type="int"/>
            <element name="group_dept" nillable="true" minOccurs="0" type="float"/>
            <element name="group_revenue" nillable="true" minOccurs="0" type="int"/>
            <element name="share_classes" nillable="true" minOccurs="0" type="int"/>
            <element name="share_classes_applied" nillable="true" minOccurs="0" type="boolean"/>
            <element name="share_classes_indirect" nillable="true" minOccurs="0" type="boolean"/>
            <element name="solidity" nillable="true" minOccurs="0" type="int"/>
            <element name="street_addr" nillable="true" minOccurs="0" type="string"/>
            <element name="unidentified" nillable="true" minOccurs="0" type="boolean"/>
            <element name="zip" nillable="true" minOccurs="0" type="string"/>
        </all>
    </complexType>

    <complexType name="beneficial">
        <sequence>
            <element name="beneficial_owner" nillable="true" minOccurs="0" maxOccurs="unbounded">
                <complexType>
                    <all>
                        <element name="id" nillable="true" minOccurs="0" type="string"/>
                        <element name="name" nillable="true" minOccurs="0" type="string"/>
                        <element name="f_date" nillable="true" minOccurs="0" type="date"/>
                        <element name="entity_type" nillable="true" minOccurs="0" type="string"/>
                        <element name="street_addr" nillable="true" minOccurs="0" type="string"/>
                        <element name="zip" nillable="true" minOccurs="0" type="string"/>
                        <element name="place" nillable="true" minOccurs="0" type="string"/>
                        <element name="country" nillable="true" minOccurs="0" type="string"/>
                        <element name="gender" nillable="true" minOccurs="0" type="string"/>
                        <element name="privileged_ssn" nillable="true" minOccurs="0" type="string"/>
                        <element name="unidentified" nillable="true" minOccurs="0" type="boolean"/>
                        <element name="ownership" nillable="true" minOccurs="0" type="tns:ownership"/>
                        <element name="bo_roles" nillable="true" minOccurs="0" type="tns:bo_roles"/>
                        <element name="models" nillable="true" minOccurs="0" type="tns:models"/>
                        <element name="bo_selfowned_owners" nillable="true" minOccurs="0" type="tns:selfowned"/>
                        <element name="in_mother" nillable="true" minOccurs="0" type="tns:mother"/>
                        <element name="max_controlled_votes" nillable="true" minOccurs="0" type="int"/>
                    </all>
                </complexType>
            </element>
        </sequence>
    </complexType>

    <complexType name="comproles">
        <sequence>
            <element name="company_role" nillable="true" minOccurs="0" maxOccurs="unbounded">
                <complexType>
                    <all>
                        <element name="id" nillable="true" minOccurs="0" type="string"/>
                        <element name="name" nillable="true" minOccurs="0" type="string"/>
                        <element name="f_date" nillable="true" minOccurs="0" type="date"/>
                        <element name="entity_type" nillable="true" minOccurs="0" type="string"/>
                        <element name="street_addr" nillable="true" minOccurs="0" type="string"/>
                        <element name="zip" nillable="true" minOccurs="0" type="string"/>
                        <element name="place" nillable="true" minOccurs="0" type="string"/>
                        <element name="country" nillable="true" minOccurs="0" type="string"/>
                        <element name="gender" nillable="true" minOccurs="0" type="string"/>
                        <element name="privileged_ssn" nillable="true" minOccurs="0" type="string"/>
                        <element name="unidentified" nillable="true" minOccurs="0" type="boolean"/>
<!--                        <element name="ownership" nillable="true" minOccurs="0" type="tns:ownership"/>-->
                        <!--                        <element name="bo_roles" nillable="true" minOccurs="0" maxOccurs="unbounded" type="tns:models"/>-->
                        <element name="role_names" nillable="true" minOccurs="0" type="tns:rolenames"/>
                        <!--                        <element name="bo_selfowned_owner" nillable="true" minOccurs="0" maxOccurs="unbounded" type="tns:models"/>-->
                        <element name="in_mother" nillable="true" minOccurs="0" type="tns:mother"/>
                    </all>
                </complexType>
            </element>
        </sequence>
    </complexType>

    <complexType name="legal">
        <sequence>
            <element name="legal_person" nillable="true" minOccurs="0" maxOccurs="unbounded">
                <complexType>
                    <all>
                        <element name="id" nillable="true" minOccurs="0" type="string"/>
                        <element name="name" nillable="true" minOccurs="0" type="string"/>
                        <element name="dept" nillable="true" minOccurs="0" type="long"/>
                        <element name="equity" nillable="true" minOccurs="0" type="int"/>
                        <element name="f_date" nillable="true" minOccurs="0" type="date"/>
                        <element name="sum_votes" nillable="true" minOccurs="0" type="float"/>
                        <element name="accum_date" nillable="true" minOccurs="0" type="date"/>
                        <element name="account_date" nillable="true" minOccurs="0" type="date"/>
                        <element name="incorp_date" nillable="true" minOccurs="0" type="date"/>
                        <element name="entity_type" nillable="true" minOccurs="0" type="string"/>
                        <element name="max_controlled_votes" nillable="true" minOccurs="0" type="int"/>
                        <element name="dept_cred_inst" nillable="true" minOccurs="0" type="int"/>
                        <element name="domain" nillable="true" minOccurs="0" type="string"/>
                        <element name="listing_status" nillable="true" minOccurs="0" type="string"/>
                        <element name="employees" nillable="true" minOccurs="0" type="string"/>
                        <element name="nacecode" nillable="true" minOccurs="0" type="string"/>
                        <element name="street_addr" nillable="true" minOccurs="0" type="string"/>
                        <element name="zip" nillable="true" minOccurs="0" type="string"/>
                        <element name="place" nillable="true" minOccurs="0" type="string"/>
                        <element name="country" nillable="true" minOccurs="0" type="string"/>
                        <element name="gender" nillable="true" minOccurs="0" type="string"/>
                        <element name="group_solidity" nillable="true" minOccurs="0" type="float"/>
                        <element name="group_dept_cred_inst" nillable="true" minOccurs="0" type="int"/>
                        <element name="group_dept" nillable="true" minOccurs="0" type="float"/>
                        <element name="group_equity" nillable="true" minOccurs="0" type="int"/>
                        <element name="group_revenue" nillable="true" minOccurs="0" type="int"/>
                        <element name="group_op_profit" nillable="true" minOccurs="0" type="int"/>
                        <element name="share_classes_indirect" nillable="true" minOccurs="0" type="boolean"/>
                        <element name="share_classes" nillable="true" minOccurs="0" type="int"/>
                        <element name="op_profit" nillable="true" minOccurs="0" type="int"/>
                        <element name="revenue" nillable="true" minOccurs="0" type="int"/>
                        <element name="solidity" nillable="true" minOccurs="0" type="int"/>
                        <element name="share_classes_applied" nillable="true" minOccurs="0" type="boolean"/>
                        <element name="privileged_ssn" nillable="true" minOccurs="0" type="string"/>
                        <element name="unidentified" nillable="true" minOccurs="0" type="boolean"/>
                        <element name="ownership" nillable="true" minOccurs="0" type="tns:ownership"/>
                        <!--                        <element name="bo_roles" nillable="true" minOccurs="0" maxOccurs="unbounded" type="tns:models"/>-->
                        <element name="models" nillable="true" minOccurs="0" type="tns:models"/>
                        <!--                        <element name="bo_selfowned_owner" nillable="true" minOccurs="0" maxOccurs="unbounded" type="tns:models"/>-->
                        <element name="in_mother" nillable="true" minOccurs="0" type="tns:mother"/>
                    </all>
                </complexType>
            </element>
        </sequence>
    </complexType>

    <complexType name="selfowned">
        <sequence>
            <element name="bo_selfowned_owner" nillable="true" minOccurs="0" maxOccurs="unbounded">
                <complexType>
                    <all>
                        <element name="id" nillable="true" minOccurs="0" type="string"/>
                        <element name="name" nillable="true" minOccurs="0" type="string"/>
                        <element name="dept" nillable="true" minOccurs="0" type="long"/>
                        <element name="equity" nillable="true" minOccurs="0" type="int"/>
                        <element name="f_date" nillable="true" minOccurs="0" type="date"/>
                        <element name="domain" nillable="true" minOccurs="0" type="string"/>
                        <element name="accum_date" nillable="true" minOccurs="0" type="date"/>
                        <element name="account_date" nillable="true" minOccurs="0" type="date"/>
                        <element name="incorp_date" nillable="true" minOccurs="0" type="date"/>
                        <element name="entity_type" nillable="true" minOccurs="0" type="string"/>
                        <element name="listing_status" nillable="true" minOccurs="0" type="string"/>
                        <element name="employees" nillable="true" minOccurs="0" type="string"/>
                        <element name="nacecode" nillable="true" minOccurs="0" type="string"/>
                        <element name="street_addr" nillable="true" minOccurs="0" type="string"/>
                        <element name="zip" nillable="true" minOccurs="0" type="string"/>
                        <element name="place" nillable="true" minOccurs="0" type="string"/>
                        <element name="country" nillable="true" minOccurs="0" type="string"/>
                        <element name="gender" nillable="true" minOccurs="0" type="string"/>
                        <element name="share_classes_indirect" nillable="true" minOccurs="0" type="boolean"/>
                        <element name="share_classes" nillable="true" minOccurs="0" type="int"/>
                        <element name="op_profit" nillable="true" minOccurs="0" type="int"/>
                        <element name="group_solidity" nillable="true" minOccurs="0" type="float"/>
                        <element name="group_dept_cred_inst" nillable="true" minOccurs="0" type="int"/>
                        <element name="group_dept" nillable="true" minOccurs="0" type="float"/>
                        <element name="group_equity" nillable="true" minOccurs="0" type="int"/>
                        <element name="dept_cred_inst" nillable="true" minOccurs="0" type="int"/>
                        <element name="group_revenue" nillable="true" minOccurs="0" type="int"/>
                        <element name="group_op_profit" nillable="true" minOccurs="0" type="int"/>
                        <element name="revenue" nillable="true" minOccurs="0" type="int"/>
                        <element name="solidity" nillable="true" minOccurs="0" type="int"/>
                        <element name="share_classes_applied" nillable="true" minOccurs="0" type="boolean"/>
                        <element name="privileged_ssn" nillable="true" minOccurs="0" type="string"/>
                        <element name="unidentified" nillable="true" minOccurs="0" type="boolean"/>
                        <element name="ownership" nillable="true" minOccurs="0" type="tns:ownership"/>
                        <element name="bo_roles" nillable="true" minOccurs="0" type="tns:bo_roles"/>
                        <element name="models" nillable="true" minOccurs="0" type="tns:models"/>
                        <!--                        <element name="bo_selfowned_owner" nillable="true" minOccurs="0" maxOccurs="unbounded" type="tns:models"/>-->
                        <element name="in_mother" nillable="true" minOccurs="0" type="tns:mother"/>
                    </all>
                </complexType>
            </element>
        </sequence>
    </complexType>


    <complexType name="ownership">
    <all>
        <element name="direct" nillable="true" minOccurs="0" type="float"/>
        <element name="voting_rights" nillable="true" minOccurs="0" type="boolean"/>
        <element name="total" nillable="true" minOccurs="0" type="float"/>
        <element name="integrated" nillable="true" minOccurs="0" type="float"/>
        <element name="star" nillable="true" minOccurs="0" type="boolean"/>
        <element name="voting_power" nillable="true" minOccurs="0" type="float"/>
        <element name="suspect" nillable="true" minOccurs="0" type="boolean"/>
        <element name="max_controlled_votes" nillable="true" minOccurs="0" type="float"/>
        <element name="level" nillable="true" minOccurs="0" type="int"/>
    </all>
    </complexType>

    <complexType name="mother">
        <all>
            <element name="account_date" nillable="true" minOccurs="0" type="date"/>
            <element name="accum_date" nillable="true" minOccurs="0" type="date"/>
            <element name="completeness" nillable="true" minOccurs="0" type="float"/>
            <element name="dept" nillable="true" minOccurs="0" type="long"/>
            <element name="dept_cred_inst" nillable="true" minOccurs="0" type="int"/>
            <element name="domain" nillable="true" minOccurs="0" type="string"/>
            <element name="employees" nillable="true" minOccurs="0" type="string"/>
            <element name="entity_type" nillable="true" minOccurs="0" type="string"/>
            <element name="equity" nillable="true" minOccurs="0" type="int"/>
            <element name="id" nillable="true" minOccurs="0" type="string"/>
            <element name="incorp_date" nillable="true" minOccurs="0" type="date"/>
            <element name="listing_status" nillable="true" minOccurs="0" type="string"/>
            <element name="max_shareholder_distance" nillable="true" minOccurs="0" type="int"/>
            <element name="nacecode" nillable="true" minOccurs="0" type="string"/>
            <element name="name" nillable="true" minOccurs="0" type="string"/>
            <element name="num_shareholders_direct" nillable="true" minOccurs="0" type="int"/>
            <element name="num_shareholders_total" nillable="true" minOccurs="0" type="int"/>
            <element name="op_profit" nillable="true" minOccurs="0" type="int"/>
            <element name="group_solidity" nillable="true" minOccurs="0" type="float"/>
            <element name="group_dept_cred_inst" nillable="true" minOccurs="0" type="int"/>
            <element name="group_dept" nillable="true" minOccurs="0" type="float"/>
            <element name="group_equity" nillable="true" minOccurs="0" type="int"/>
            <element name="group_revenue" nillable="true" minOccurs="0" type="int"/>
            <element name="group_op_profit" nillable="true" minOccurs="0" type="int"/>
            <element name="ownership" nillable="true" minOccurs="0" type="tns:ownership"/>
            <element name="place" nillable="true" minOccurs="0" type="string"/>
            <element name="revenue" nillable="true" minOccurs="0" type="int"/>
<!--            <element name="self_ownership" nillable="true" minOccurs="0" type="int"/>-->
            <element name="share_classes" nillable="true" minOccurs="0" type="int"/>
            <element name="share_classes_applied" nillable="true" minOccurs="0" type="boolean"/>
            <element name="share_classes_indirect" nillable="true" minOccurs="0" type="boolean"/>
            <element name="solidity" nillable="true" minOccurs="0" type="int"/>
            <element name="street_addr" nillable="true" minOccurs="0" type="string"/>
            <element name="zip" nillable="true" minOccurs="0" type="string"/>
        </all>
    </complexType>

    <complexType name="models">
        <sequence>
            <element name="model" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
        </sequence>
    </complexType>

    <complexType name="bo_roles">
        <sequence>
            <element name="bo_role" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
        </sequence>
    </complexType>

    <complexType name="rolenames">
        <sequence>
            <element name="role" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
        </sequence>
    </complexType>

</schema>



