<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--
  ~ Copyright (C) 2010-2022 Evolveum and contributors
  ~
  ~ Licensed under the EUPL-1.2 or later.
  --><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://prism.evolveum.com/xml/ns/public/annotation-3" xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3" xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb" xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3" xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3" xmlns:tns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" elementFormDefault="qualified" jaxb:extensionBindingPrefixes="xjc" jaxb:version="3.0" targetNamespace="http://midpoint.evolveum.com/xml/ns/public/common/common-3">

    <xsd:annotation>
        <xsd:documentation>
            Schema for model context serialization as well as for the tracing feature.
        </xsd:documentation>
    </xsd:annotation>

    <!-- Don't provide schemaLocation here, as it causes xjc to really contact the URIs (!) -->
    <xsd:import namespace="http://prism.evolveum.com/xml/ns/public/annotation-3" schemaLocation="../annotation-3.xsd"/>
    <xsd:import namespace="http://prism.evolveum.com/xml/ns/public/types-3" schemaLocation="../types-3.xsd"/>
    <xsd:import namespace="http://prism.evolveum.com/xml/ns/public/query-3" schemaLocation="../query-3.xsd"/>

    <xsd:include schemaLocation="common-core-3.xsd"/>

    <xsd:complexType name="LensContextType">
        <xsd:annotation>
            <xsd:documentation>
                A serialization of model context, i.e. a context of an operation in the model.
                In particular, this type is storing data for LensContext class.
            </xsd:documentation>
            <xsd:appinfo>
                <a:container/>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="requestIdentifier" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        Unique identifier of a request (operation).
                    </xsd:documentation>
                    <xsd:appinfo>
                        <a:since>4.0</a:since>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="state" type="c:ModelStateType">
                <xsd:annotation>
                    <xsd:documentation>
                        TODO
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="channel" type="xsd:anyURI">
                <xsd:annotation>
                    <xsd:documentation>
                        TODO
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="focusContext" type="tns:LensFocusContextType">
                <xsd:annotation>
                    <xsd:documentation>
                        TODO
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="projectionContext" type="tns:LensProjectionContextType">
                <xsd:annotation>
                    <xsd:documentation>
                        TODO
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="focusClass" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        TODO
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="projectionClass" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        TODO
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="doReconciliationForAllProjections" type="xsd:boolean">
                <xsd:annotation>
                    <xsd:documentation>
                        True if we want to reconcile all accounts in this context.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="executionPhaseOnly" type="xsd:boolean">
                <xsd:annotation>
                    <xsd:documentation>
                        If set to true then all operations are considered to be
                        in execution phase - for the purpose of authorizations and auditing.
                        This is used in case that the whole operation (context) is a
                        secondary change, e.g. in case that persona is provisioned.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="projectionWave" type="xsd:int">
                <xsd:annotation>
                    <xsd:documentation>
                        Current wave of computation and execution.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="executionWave" type="xsd:int">
                <xsd:annotation>
                    <xsd:documentation>
                        Current wave of execution.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="options" type="c:ModelExecuteOptionsType">
                <xsd:annotation>
                    <xsd:documentation>
                        TODO
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="lazyAuditRequest" type="xsd:boolean"/>
            <xsd:element minOccurs="0" name="requestAudited" type="xsd:boolean"/>
            <xsd:element minOccurs="0" name="executionAudited" type="xsd:boolean"/>
            <xsd:element minOccurs="0" name="requestAuthorized" type="xsd:boolean"/>
            <xsd:element minOccurs="0" name="stats" type="tns:LensContextStatsType"/>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="rottenExecutedDeltas" type="tns:LensObjectDeltaOperationType">
                <xsd:annotation>
                    <xsd:documentation>
                        TODO
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="requestMetadata" type="tns:MetadataType">
                <xsd:annotation>
                    <xsd:documentation>
                        Metadata of the request. Metadata recorded when the operation has started.
                        Currently only the requestTimestamp and requestorRef are meaningful. But
                        later other metadata may be used.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="ownerOid" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        OID of the context owner. This is currently used with personas.
                        This is the owner of a created or modified persona.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="sequences" type="c:LensContextSequencesType">
                <xsd:annotation>
                    <xsd:documentation>
                        Information about current values of sequences that are used in this clockwork execution.
                        When a value is here it means that it is allocated in the respective sequence object!
                    </xsd:documentation>
                    <xsd:appinfo>
                        <a:since>4.5</a:since>
                        <a:since>4.0.5</a:since>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="id" type="xsd:long"/>
    </xsd:complexType>

    <xsd:complexType name="LensContextSequencesType">
        <xsd:annotation>
            <xsd:documentation>
                Values of sequences used in the computation.
            </xsd:documentation>
            <xsd:appinfo>
                <a:container/>
                <a:since>4.5</a:since>
                <a:since>4.0.5</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="sequenceValue" type="c:LensContextSequenceValueType"/>
        </xsd:sequence>
        <xsd:attribute name="id" type="xsd:long"/>
    </xsd:complexType>

    <xsd:complexType name="LensContextSequenceValueType">
        <xsd:annotation>
            <xsd:documentation>
                Value of a sequence used in the computation.
            </xsd:documentation>
            <xsd:appinfo>
                <a:container/>
                <a:since>4.5</a:since>
                <a:since>4.0.5</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="sequenceRef" type="c:ObjectReferenceType">
                <xsd:annotation>
                    <xsd:documentation>
                        Sequence whose value is recorded here.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <a:objectReferenceTargetType>c:SequenceType</a:objectReferenceTargetType>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="value" type="xsd:long">
                <xsd:annotation>
                    <xsd:documentation>
                        The value used in the computation.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="id" type="xsd:long"/>
    </xsd:complexType>

    <xsd:complexType name="LensElementContextType">
        <xsd:annotation>
            <xsd:documentation>
                TODO
            </xsd:documentation>
            <xsd:appinfo>
                <a:container/>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="objectOldRef" type="c:ObjectReferenceType">
                <xsd:annotation>
                    <xsd:appinfo>
                        <a:composite>true</a:composite>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="objectCurrentRef" type="c:ObjectReferenceType">
                <xsd:annotation>
                    <xsd:appinfo>
                        <a:composite>true</a:composite>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="objectNewRef" type="c:ObjectReferenceType">
                <xsd:annotation>
                    <xsd:appinfo>
                        <a:composite>true</a:composite>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="primaryDelta" type="t:ObjectDeltaType">
                <xsd:annotation>
                    <xsd:documentation>
                        TODO
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="secondaryDelta" type="t:ObjectDeltaType">
                <xsd:annotation>
                    <xsd:documentation>
                        TODO
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="executedDeltas" type="tns:LensObjectDeltaOperationType">
                <xsd:annotation>
                    <xsd:documentation>
                        TODO
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="objectTypeClass" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        TODO
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="oid" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        TODO
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="iteration" type="xsd:int">
                <xsd:annotation>
                    <xsd:documentation>
                        TODO
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="iterationToken" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        TODO
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="synchronizationIntent" type="c:SynchronizationIntentType">
                <xsd:annotation>
                    <xsd:documentation>
                        Initial intent regarding the account. It indicated what the initiator of the operation WANTS TO DO with the context.
                        If set to null then the decision is left to "the engine". Null is also a typical value
                        when the context is created. It may be pre-set under some circumstances, e.g. if an account is being unlinked.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="fresh" type="xsd:boolean">
                <xsd:annotation>
                    <xsd:documentation>
                        For diagnostics only. (Is not unwrapped.)
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="id" type="xsd:long"/>
    </xsd:complexType>

    <xsd:complexType name="LensFocusContextType">
        <xsd:annotation>
            <xsd:documentation>
                TODO
            </xsd:documentation>
            <xsd:appinfo>
                <a:container/>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:LensElementContextType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="secondaryDeltas" type="tns:ObjectDeltaWavesType">
                        <xsd:annotation>
                            <xsd:documentation>
                                TODO
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="lensFocusContext" type="tns:LensFocusContextType"/>     <!-- seems to be necessary for PrismContainerDefinition for LFCT to be created -->

    <xsd:complexType name="LensProjectionContextType">
        <xsd:annotation>
            <xsd:documentation>
                TODO
            </xsd:documentation>
            <xsd:appinfo>
                <a:container/>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:LensElementContextType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="syncDelta" type="t:ObjectDeltaType">
                        <xsd:annotation>
                            <xsd:documentation>
                                TODO
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="syncAbsoluteTrigger" type="xsd:boolean">
                        <xsd:annotation>
                            <xsd:documentation>
                                TODO
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="wave" type="xsd:int">
                        <xsd:annotation>
                            <xsd:documentation>
                                The wave in which this resource should be processed. Initial value of -1 means "undetermined".
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="completed" type="xsd:boolean">
                        <xsd:annotation>
                            <xsd:documentation>
                                Was the processing of this projection (in its execution wave) complete?
                            </xsd:documentation>
                            <xsd:appinfo>
                                <a:since>4.2</a:since>
                                <a:experimental>true</a:experimental>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="resourceShadowDiscriminator" type="c:ShadowDiscriminatorType">
                        <xsd:annotation>
                            <xsd:documentation>
                                Definition of account type.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="fullShadow" type="xsd:boolean">
                        <xsd:annotation>
                            <xsd:documentation>
                                TODO
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="isAssigned" type="xsd:boolean">
                        <xsd:annotation>
                            <xsd:documentation>
                                True if the account is "legal" (assigned to the user). It may be false for accounts that are either
                                found to be illegal by live sync, were unassigned from user, etc.
                                If set to null the situation is not yet known. Null is a typical value when the context is constructed.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="isAssignedOld" type="xsd:boolean">
                        <xsd:annotation>
                            <xsd:documentation>
                                "Old" version of isAssigned.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="isActive" type="xsd:boolean">
                        <xsd:annotation>
                            <xsd:documentation>
                                True if the account should be part of the synchronization. E.g. outbound expression should be applied to it.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="isLegal" type="xsd:boolean">
                        <xsd:annotation>
                            <xsd:documentation>
                                True if there is a valid assignment for this projection and/or the policy allows such projection to exist.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="isLegalOld" type="xsd:boolean">
                        <xsd:annotation>
                            <xsd:documentation>
                                True if there is a valid assignment for this projection and/or the policy allows such projection to exist.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="isExists" type="xsd:boolean">
                        <xsd:annotation>
                            <xsd:documentation>
                                TODO
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="synchronizationPolicyDecision" type="c:SynchronizationPolicyDecisionType">
                        <xsd:annotation>
                            <xsd:documentation>
                                Decision regarding the account. It indicated what the engine has DECIDED TO DO with the context.
                                If set to null no decision was made yet. Null is also a typical value when the context is created.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="doReconciliation" type="xsd:boolean">
                        <xsd:annotation>
                            <xsd:documentation>
                                True if we want to reconcile account in this context.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="synchronizationSituationDetected" type="c:SynchronizationSituationType">
                        <xsd:annotation>
                            <xsd:documentation>
                                TODO
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="synchronizationSituationResolved" type="c:SynchronizationSituationType">
                        <xsd:annotation>
                            <xsd:documentation>
                                TODO
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="projectionSecurityPolicyRef" type="c:ObjectReferenceType">
                        <xsd:annotation>
                            <xsd:appinfo>
                                <a:objectReferenceTargetType>c:SecurityPolicyType</a:objectReferenceTargetType>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="accountPasswordPolicyRef" type="c:ObjectReferenceType">
                        <xsd:annotation>
                            <xsd:appinfo>
                                <a:objectReferenceTargetType>c:ValuePolicyType</a:objectReferenceTargetType>
                                <a:removed>true</a:removed>
                                <a:removedSince>4.8</a:removedSince>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="lensProjectionContext" type="tns:LensProjectionContextType"/>     <!-- seems to be necessary for PrismContainerDefinition for LFCT to be created -->

    <xsd:complexType name="ObjectDeltaWavesType">
        <xsd:sequence>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="wave" type="tns:ObjectDeltaWaveType"/>
        </xsd:sequence>
        <xsd:attribute name="waveCount" type="xsd:int"/>
    </xsd:complexType>

    <xsd:complexType name="ObjectDeltaWaveType">
        <xsd:annotation>
            <xsd:documentation>
                TODO
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="delta" type="t:ObjectDeltaType"/>
        </xsd:sequence>
        <xsd:attribute name="number" type="xsd:int"/>

    </xsd:complexType>

    <xsd:complexType name="LensObjectDeltaOperationType">
        <xsd:annotation>
            <xsd:documentation>
                TODO
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="objectDeltaOperation" type="c:ObjectDeltaOperationType"/>
            <xsd:element name="audited" type="xsd:boolean"/>
            <xsd:element minOccurs="0" name="wave" type="xsd:int"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:element name="modelContext" type="tns:LensContextType">
        <xsd:annotation>
            <xsd:documentation>
                TODO
            </xsd:documentation>
            <xsd:appinfo>
                <a:indexed>false</a:indexed>
                <a:minOccurs>0</a:minOccurs>
                <a:maxOccurs>1</a:maxOccurs>
            </xsd:appinfo>
        </xsd:annotation>
    </xsd:element>

    <xsd:element name="skipModelContextProcessing" type="xsd:boolean">
        <xsd:annotation>
            <xsd:documentation>
                TODO
            </xsd:documentation>
            <xsd:appinfo>
                <a:minOccurs>0</a:minOccurs>
                <a:maxOccurs>1</a:maxOccurs>
            </xsd:appinfo>
        </xsd:annotation>
    </xsd:element>

    <xsd:complexType name="LensContextStatsType">
        <xsd:sequence>
            <xsd:element minOccurs="0" name="requestTimestamp" type="xsd:dateTime"/>
        </xsd:sequence>
    </xsd:complexType>

    <!-- IMPORTANT: when adding attributes here, update also PolicyRuleTypeUtil.triggerCollectionsEqual -->
    <xsd:complexType name="EvaluatedPolicyRuleTriggerType">
        <xsd:annotation>
            <xsd:appinfo>
                <a:schemaMigration>
                    <a:element>tns:constraint</a:element>
                    <a:version>4.0</a:version>
                    <a:operation>removed</a:operation>
                </a:schemaMigration>
                <a:schemaMigration>
                    <a:element>tns:assignmentPath</a:element>
                    <a:version>4.0</a:version>
                    <a:operation>removed</a:operation>
                </a:schemaMigration>
                <a:schemaMigration>
                    <a:element>tns:directOwnerRef</a:element>
                    <a:version>4.0</a:version>
                    <a:operation>removed</a:operation>
                </a:schemaMigration>
                <a:schemaMigration>
                    <a:element>tns:directOwnerDisplayName</a:element>
                    <a:version>4.0</a:version>
                    <a:operation>removed</a:operation>
                </a:schemaMigration>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="ref" type="xsd:int"/>
            <xsd:element minOccurs="0" name="triggerId" type="xsd:int"/>       <!-- not 'id' to avoid collisions with container identifiers -->
            <xsd:element minOccurs="0" name="ruleName" type="xsd:string"/>
            <xsd:element minOccurs="0" name="constraintName" type="xsd:string"/>
            <xsd:element minOccurs="0" name="constraintKind" type="tns:PolicyConstraintKindType"/>
            <xsd:element minOccurs="0" name="message" type="tns:LocalizableMessageType"/>
            <xsd:element minOccurs="0" name="shortMessage" type="tns:LocalizableMessageType"/>
            <xsd:element minOccurs="0" name="presentationOrder" type="xsd:int"/>
            <xsd:element minOccurs="0" name="final" type="xsd:boolean"/>
            <xsd:element minOccurs="0" name="hidden" type="xsd:boolean"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="evaluatedPolicyRuleTrigger" type="tns:EvaluatedPolicyRuleTriggerType"/>

    <xsd:complexType name="EvaluatedStateTriggerType">
        <xsd:complexContent>
            <xsd:extension base="tns:EvaluatedPolicyRuleTriggerType">
                <xsd:sequence>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="evaluatedStateTrigger" type="tns:EvaluatedStateTriggerType"/>

    <xsd:complexType name="EvaluatedHasAssignmentTriggerType">
        <xsd:complexContent>
            <xsd:extension base="tns:EvaluatedPolicyRuleTriggerType">
                <xsd:sequence>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="evaluatedHasAssignmentTrigger" type="tns:EvaluatedHasAssignmentTriggerType"/>

    <xsd:complexType name="EvaluatedMultiplicityTriggerType">
        <xsd:complexContent>
            <xsd:extension base="tns:EvaluatedPolicyRuleTriggerType">
                <xsd:sequence>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="evaluatedMultiplicityTrigger" type="tns:EvaluatedMultiplicityTriggerType"/>

    <xsd:complexType name="EvaluatedTimeValidityTriggerType">
        <xsd:complexContent>
            <xsd:extension base="tns:EvaluatedPolicyRuleTriggerType">
                <xsd:sequence>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="evaluatedTimeValidityTrigger" type="tns:EvaluatedTimeValidityTriggerType"/>

    <xsd:complexType name="EvaluatedModificationTriggerType">
        <xsd:complexContent>
            <xsd:extension base="tns:EvaluatedPolicyRuleTriggerType">
                <xsd:sequence>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="evaluatedModificationTrigger" type="tns:EvaluatedModificationTriggerType"/>

    <xsd:complexType name="EvaluatedEmbeddingTriggerType">  <!-- TODO name -->
        <xsd:complexContent>
            <xsd:extension base="tns:EvaluatedPolicyRuleTriggerType">
                <xsd:sequence>
                    <xsd:element maxOccurs="unbounded" minOccurs="0" name="embedded" type="tns:EvaluatedPolicyRuleTriggerType"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:complexType name="EvaluatedTransitionTriggerType">
        <xsd:complexContent>
            <xsd:extension base="tns:EvaluatedEmbeddingTriggerType">
                <xsd:sequence>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="evaluatedTransitionTrigger" type="tns:EvaluatedTransitionTriggerType"/>

    <xsd:complexType name="EvaluatedLogicalTriggerType">
        <xsd:complexContent>
            <xsd:extension base="tns:EvaluatedEmbeddingTriggerType">
                <xsd:sequence>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="evaluatedLogicalTrigger" type="tns:EvaluatedLogicalTriggerType"/>

    <xsd:complexType name="EvaluatedExclusionTriggerType">
        <xsd:complexContent>
            <xsd:extension base="tns:EvaluatedPolicyRuleTriggerType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="conflictingObjectRef" type="c:ObjectReferenceType"/>
                    <xsd:element minOccurs="0" name="conflictingObjectDisplayName" type="t:PolyStringType"/>
                    <xsd:element minOccurs="0" name="conflictingObjectPath" type="tns:AssignmentPathType"/>
                    <xsd:element minOccurs="0" name="conflictingAssignment" type="tns:AssignmentType"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="evaluatedExclusionTrigger" type="tns:EvaluatedExclusionTriggerType"/>

    <xsd:complexType name="EvaluatedRequirementTriggerType">
        <xsd:complexContent>
            <xsd:extension base="tns:EvaluatedPolicyRuleTriggerType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="requirementObjectRef" type="c:ObjectReferenceType"/>
                    <xsd:element minOccurs="0" name="requirementObjectArchetypeRef" type="c:ObjectReferenceType"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="evaluatedRequirementTrigger" type="tns:EvaluatedExclusionTriggerType"/>

    <!-- IMPORTANT: when adding attributes here, update also PolicyRuleTypeUtil.triggerCollectionsEqual -->
    <xsd:complexType name="EvaluatedSituationTriggerType">
        <xsd:complexContent>
            <xsd:extension base="tns:EvaluatedPolicyRuleTriggerType">
                <xsd:sequence>
                    <xsd:element maxOccurs="unbounded" minOccurs="0" name="sourceRule" type="tns:EvaluatedPolicyRuleType"/>     <!-- TODO -->
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="evaluatedSituationTrigger" type="tns:EvaluatedSituationTriggerType"/>

    <xsd:complexType name="EvaluatedCollectionStatsTriggerType">
        <xsd:complexContent>
            <xsd:extension base="tns:EvaluatedPolicyRuleTriggerType">
                <xsd:sequence>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="evaluatedCollectionStatsTrigger" type="tns:EvaluatedCollectionStatsTriggerType"/>

    <xsd:complexType name="EvaluatedPolicyRuleType">
        <xsd:annotation>
            <xsd:appinfo>
                <a:schemaMigration>
                    <a:element>tns:policyRule</a:element>
                    <a:version>4.0</a:version>
                    <a:operation>removed</a:operation>
                </a:schemaMigration>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <!-- TODO use some kind of pointer here (otherwise it produces very long data e.g. in trigger info in assignments) -->
            <xsd:element minOccurs="0" name="ruleName" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        TODO
                    </xsd:documentation>
                    <xsd:appinfo>
                        <a:since>3.7</a:since>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="assignmentPath" type="tns:AssignmentPathType">
                <xsd:annotation>
                    <xsd:documentation>
                        TODO
                    </xsd:documentation>
                    <xsd:appinfo>
                        <a:since>3.7</a:since>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="directOwnerRef" type="c:ObjectReferenceType">
                <xsd:annotation>
                    <xsd:documentation>
                        TODO
                    </xsd:documentation>
                    <xsd:appinfo>
                        <a:since>3.7</a:since>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="directOwnerDisplayName" type="t:PolyStringType">
                <xsd:annotation>
                    <xsd:documentation>
                        TODO
                    </xsd:documentation>
                    <xsd:appinfo>
                        <a:since>3.7</a:since>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="trigger" type="tns:EvaluatedPolicyRuleTriggerType"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="evaluatedPolicyRule" type="tns:EvaluatedPolicyRuleType"/>

    <xsd:complexType name="AssignmentPathType">
        <xsd:annotation>
            <xsd:documentation>
                Sequence of assignment paths, e.g. one chain of evaluated assignments.
            </xsd:documentation>
            <xsd:appinfo>
                <a:container/>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="segment" type="tns:AssignmentPathSegmentType"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="AssignmentPathSegmentType">
        <xsd:annotation>
            <xsd:documentation>
                One segment in the assignment path.
            </xsd:documentation>
            <xsd:appinfo>
                <a:container/>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="segmentOrder" type="xsd:int">
                <xsd:annotation>
                    <xsd:documentation>
                        Order of this segment in the whole assignment path.
                        First segment is numbered 1.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="sourceRef" type="c:ObjectReferenceType"/>
            <xsd:element minOccurs="0" name="sourceDisplayName" type="t:PolyStringType"/>
            <xsd:element minOccurs="0" name="assignment" type="c:AssignmentType"/>
            <xsd:element minOccurs="0" name="assignmentId" type="xsd:long"/>
            <xsd:element minOccurs="0" name="targetRef" type="c:ObjectReferenceType"/>
            <xsd:element minOccurs="0" name="targetDisplayName" type="t:PolyStringType"/>
            <xsd:element minOccurs="0" name="matchingOrder" type="xsd:boolean"/>
            <xsd:element minOccurs="0" name="isAssignment" type="xsd:boolean"/>
            <!-- TODO maybe also evaluation order -->
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="TraceType">
        <xsd:annotation>
            <xsd:documentation>
                Root type for tracing information that is embedded in OperationResult objects.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="text" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        Unstructured text information to be used when existing structure is not sufficient.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="id" type="xsd:long"/>
    </xsd:complexType>
    <xsd:element name="trace" type="tns:TraceType"/>

    <xsd:complexType name="ClockworkTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Abstract trace for clockwork events. It contains outputLensContext but usually only minimal information
                is there (e.g. state and waves).
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:TraceType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="inputLensContext" type="tns:LensContextType">
                        <xsd:annotation>
                            <xsd:documentation>
                                Lens (model) context at input.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="outputLensContext" type="tns:LensContextType">
                        <xsd:annotation>
                            <xsd:documentation>
                                Lens (model) context at output.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="inputLensContextText" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>
                                Lens (model) context at input (text dump).
                            </xsd:documentation>
                            <xsd:appinfo>
                                <a:since>4.0.1</a:since>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="outputLensContextText" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>
                                Lens (model) context at output (text dump).
                            </xsd:documentation>
                            <xsd:appinfo>
                                <a:since>4.0.1</a:since>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="clockworkTraceType" type="tns:ClockworkTraceType"/>

    <xsd:complexType name="ClockworkRunTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Trace for Clockwork.run operation.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:ClockworkTraceType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="focusName" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>
                                Focus name (at output).
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="clockworkRunTrace" type="tns:ClockworkRunTraceType"/>

    <xsd:complexType name="ClockworkClickTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Trace for Clockwork.click operation.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:ClockworkTraceType">
                <xsd:sequence>
                    <!-- temporary - for backwards compatibility only -->
                    <xsd:element minOccurs="0" name="state" type="tns:ModelStateType"/>
                    <xsd:element minOccurs="0" name="projectionWave" type="xsd:int"/>
                    <xsd:element minOccurs="0" name="executionWave" type="xsd:int"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="clockworkClickTrace" type="tns:ClockworkClickTraceType"/>

    <xsd:complexType name="ProjectorRunTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Trace for Projector.project operation.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:ClockworkTraceType">
                <xsd:sequence>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="projectorRunTrace" type="tns:ProjectorRunTraceType"/>

    <xsd:complexType name="ProjectorComponentTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Trace for Projector component operation.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:ClockworkTraceType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="resourceShadowDiscriminator" type="tns:ShadowDiscriminatorType">
                        <xsd:annotation>
                            <xsd:documentation>
                                Which projection context is being processed? (Present only if applicable.)
                            </xsd:documentation>
                            <xsd:appinfo>
                                <a:experimental>true</a:experimental>
                                <a:since>4.2</a:since>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="projectorComponentTrace" type="tns:ProjectorComponentTraceType"/>

    <xsd:complexType name="FocusLoadedTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Information about focus being loaded.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:ClockworkTraceType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="focusLoadedRef" type="c:ObjectReferenceType">
                        <xsd:annotation>
                            <xsd:appinfo>
                                <a:since>4.1</a:since>
                                <a:composite>true</a:composite>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="focusLoadedTrace" type="tns:FocusLoadedTraceType"/>

    <xsd:complexType name="FullShadowLoadedTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Information about full shadow being loaded.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:ClockworkTraceType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="shadowLoadedRef" type="c:ObjectReferenceType">
                        <xsd:annotation>
                            <xsd:appinfo>
                                <a:since>4.1</a:since>
                                <a:composite>true</a:composite>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="resourceName" type="t:PolyStringType">
                        <xsd:annotation>
                            <xsd:appinfo>
                                <a:since>4.1</a:since>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="reason" type="xsd:string">
                        <xsd:annotation>
                            <xsd:appinfo>
                                <a:since>4.2</a:since>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="fullShadowLoadedTrace" type="tns:FullShadowLoadedTraceType"/>

    <xsd:complexType name="ModelExecuteDeltaTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Trace for model's delta execution.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:TraceType">
                <xsd:sequence>
                    <xsd:element name="delta" type="tns:LensObjectDeltaOperationType"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="modelExecuteDeltaTrace" type="tns:ModelExecuteDeltaTraceType"/>

    <xsd:complexType name="ProvisioningOperationTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Trace for provisioning operation.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:TraceType">
                <xsd:sequence>
                    <!-- TODO -->
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="provisioningOperationTrace" type="tns:ProvisioningOperationTraceType"/>

    <xsd:complexType name="RepositoryOperationTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Trace for repository operation.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:TraceType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="cache" type="xsd:boolean">
                        <xsd:annotation>
                            <xsd:documentation>
                                Is this at the RepositoryCache level?
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="cacheUse" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>
                                How was the cache used?
                                DEPRECATED - remove!
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="globalCacheUse" type="tns:CacheUseTraceType">
                        <xsd:annotation>
                            <xsd:documentation>
                                How was the cache used?
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="localCacheUse" type="tns:CacheUseTraceType">
                        <xsd:annotation>
                            <xsd:documentation>
                                How was the cache used?
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="repositoryOperationTrace" type="tns:RepositoryOperationTraceType"/>

    <xsd:complexType name="RepositoryAddTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Trace for repository ADD operation.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:RepositoryOperationTraceType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="objectRef" type="c:ObjectReferenceType">
                        <xsd:annotation>
                            <xsd:documentation>
                                Object to be added.
                            </xsd:documentation>
                            <xsd:appinfo>
                                <a:composite>true</a:composite>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="options" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>
                                Options (stringified).
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="oid" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>
                                OID resulting from the operation.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="repositoryAddTrace" type="tns:RepositoryAddTraceType"/>

    <xsd:complexType name="RepositoryModifyTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Trace for repository MODIFY operation.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:RepositoryOperationTraceType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="objectType" type="xsd:QName">
                        <xsd:annotation>
                            <xsd:documentation>
                                Object to be modified.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="oid" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>
                                OID of the object to be modified.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element maxOccurs="unbounded" minOccurs="0" name="modification" type="t:ItemDeltaType">
                        <xsd:annotation>
                            <xsd:documentation>
                                Delta(s) to be applied.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="options" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>
                                Options (stringified).
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="repositoryModifyTrace" type="tns:RepositoryModifyTraceType"/>

    <xsd:complexType name="RepositoryDeleteTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Trace for repository DELETE operation.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:RepositoryOperationTraceType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="objectType" type="xsd:QName">
                        <xsd:annotation>
                            <xsd:documentation>
                                Type of the object to be deleted.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="oid" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>
                                OID of the object to be deleted.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="repositoryDeleteTrace" type="tns:RepositoryDeleteTraceType"/>

    <xsd:complexType name="RepositoryGetObjectTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Trace for repository getObject operation.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:RepositoryOperationTraceType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="objectType" type="xsd:QName">
                        <xsd:annotation>
                            <xsd:documentation>
                                Type of the object to be deleted.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="oid" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>
                                OID of the object to be deleted.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="options" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>
                                Options (stringified).
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="objectRef" type="c:ObjectReferenceType">
                        <xsd:annotation>
                            <xsd:documentation>
                                Object that was retrieved.
                            </xsd:documentation>
                            <xsd:appinfo>
                                <a:composite>true</a:composite>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="repositoryGetObjectTrace" type="tns:RepositoryGetObjectTraceType"/>

    <xsd:complexType name="RepositoryGetTraceType">
        <xsd:annotation>
            <xsd:documentation>
                TEMPORARY - REMOVE
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:RepositoryGetObjectTraceType">
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="repositoryGetTrace" type="tns:RepositoryGetTraceType"/>

    <xsd:complexType name="RepositorySearchTraceType">
        <xsd:annotation>
            <xsd:documentation>
                TEMPORARY - REMOVE
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:RepositorySearchObjectsTraceType">
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="repositorySearchTrace" type="tns:RepositorySearchTraceType"/>

    <xsd:complexType name="RepositoryGetVersionTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Trace for repository getVersion operation.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:RepositoryOperationTraceType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="objectType" type="xsd:QName">
                        <xsd:annotation>
                            <xsd:documentation>
                                Type of the object to be deleted.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="oid" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>
                                OID of the object to be deleted.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="options" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>
                                Options (stringified).
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="version" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>
                                Object version that was retrieved.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="repositoryGetVersionTrace" type="tns:RepositoryGetVersionTraceType"/>

    <xsd:complexType name="RepositorySearchObjectsTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Trace for repository searchObjects/searchObjectsIterative operation.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
                <a:schemaContext>
                    <a:typePath>objectType</a:typePath>
                </a:schemaContext>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:RepositoryOperationTraceType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="objectType" type="xsd:QName">
                        <xsd:annotation>
                            <xsd:documentation>
                                Type of the objects to be searched for.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="query" type="q:QueryType">
                        <xsd:annotation>
                            <xsd:documentation>
                                Object query.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="options" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>
                                Options (stringified).
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="resultSize" type="xsd:int">
                        <xsd:annotation>
                            <xsd:documentation>
                                Number of objects found.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element maxOccurs="unbounded" minOccurs="0" name="objectRef" type="c:ObjectReferenceType">
                        <xsd:annotation>
                            <xsd:documentation>
                                Objects that were retrieved.
                            </xsd:documentation>
                            <xsd:appinfo>
                                <a:composite>true</a:composite>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="repositorySearchObjectsTrace" type="tns:RepositorySearchObjectsTraceType"/>

    <xsd:complexType name="ResourceObjectConstructionEvaluationTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Trace for evaluation resource object construction.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.2</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:TraceType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="construction" type="tns:ConstructionType"/>
                    <xsd:element minOccurs="0" name="resourceShadowDiscriminator" type="c:ShadowDiscriminatorType"/>
                    <xsd:element minOccurs="0" name="assignmentPath" type="c:AssignmentPathType"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="resourceObjectConstructionEvaluationTrace" type="tns:ResourceObjectConstructionEvaluationTraceType"/>

    <xsd:complexType name="MappingEvaluationTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Trace for mapping evaluation operation.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:TraceType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="mappingKind" type="tns:MappingKindType"/>
                    <xsd:element minOccurs="0" name="mapping" type="tns:AbstractMappingType"/>
                    <xsd:element minOccurs="0" name="containingObjectRef" type="tns:ObjectReferenceType"/>
                    <xsd:element minOccurs="0" name="timeFrom" type="xsd:dateTime"/>
                    <xsd:element minOccurs="0" name="timeTo" type="xsd:dateTime"/>
                    <xsd:element minOccurs="0" name="nextRecomputeTime" type="xsd:dateTime"/>
                    <xsd:element minOccurs="0" name="timeConstraintValid" type="xsd:boolean"/>
                    <xsd:element minOccurs="0" name="conditionResultOld" type="xsd:boolean"/>
                    <xsd:element minOccurs="0" name="conditionResultNew" type="xsd:boolean"/>
                    <xsd:element minOccurs="0" name="implicitSourcePath" type="t:ItemPathType"/>
                    <xsd:element minOccurs="0" name="implicitTargetPath" type="t:ItemPathType"/>
                    <xsd:element minOccurs="0" name="targetPathOverride" type="t:ItemPathType">
                        <xsd:annotation>
                            <xsd:appinfo>
                                <a:since>4.6</a:since>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="pushChangesRequested" type="xsd:boolean">
                        <xsd:annotation>
                            <xsd:appinfo>
                                <a:since>4.2</a:since>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element maxOccurs="unbounded" minOccurs="0" name="source" type="tns:MappingSourceEvaluationTraceType">
                        <xsd:annotation>
                            <xsd:appinfo>
                                <a:since>4.0.1</a:since>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element maxOccurs="unbounded" minOccurs="0" name="deletedFromRange" type="xsd:anyType">
                        <xsd:annotation>
                            <xsd:documentation>
                                Values that have been deleted because of their presence in the mapping range.
                                (I.e. not because of the expression evaluation.)
                                (Currently not filled-in.)
                            </xsd:documentation>
                            <xsd:appinfo>
                                <a:since>4.2</a:since>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="output" type="t:DeltaSetTripleType">
                        <xsd:annotation>
                            <xsd:appinfo>
                                <a:since>4.0.1</a:since>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="pushChanges" type="xsd:boolean">
                        <xsd:annotation>
                            <xsd:appinfo>
                                <a:since>4.2</a:since>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="stateProperties" type="tns:MappingStatePropertiesType">
                        <xsd:annotation>
                            <xsd:appinfo>
                                <a:since>4.4</a:since>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="textTrace" type="xsd:string"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="mappingEvaluationTrace" type="tns:MappingEvaluationTraceType"/>

    <xsd:complexType name="MappingStatePropertiesType">
        <xsd:annotation>
            <xsd:documentation>
                Mapping state properties after evaluation.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.4</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="property" type="tns:MappingStatePropertyType"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="MappingStatePropertyType">
        <xsd:annotation>
            <xsd:documentation>
                Mapping state property. We keep only the string representation of the value.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.4</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="name" type="xsd:string"/>
            <xsd:element minOccurs="0" name="value" type="xsd:string"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="AbstractSourceEvaluationTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Information about mapping or expression source during evaluation.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0.1</a:since> <!-- just abstracted from MappingSourceEvaluationTraceType -->
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="name" type="xsd:QName"/>
            <xsd:element minOccurs="0" name="itemDeltaItem" type="t:ItemDeltaItemType"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="MappingSourceEvaluationTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Information about mapping source during evaluation.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0.1</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:AbstractSourceEvaluationTraceType"/>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="mappingSourceEvaluationTrace" type="tns:MappingSourceEvaluationTraceType"/>

    <xsd:complexType name="ExpressionSourceEvaluationTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Information about mapping source during evaluation.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.2</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:AbstractSourceEvaluationTraceType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="deltaSetTriple" type="t:DeltaSetTripleType">
                        <xsd:annotation>
                            <xsd:documentation>
                                Source processed into delta set triple.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="expressionSourceEvaluationTrace" type="tns:ExpressionSourceEvaluationTraceType"/>

    <xsd:simpleType name="MappingKindType">
        <xsd:annotation>
            <xsd:documentation>
                Kind of mapping.
            </xsd:documentation>
            <xsd:appinfo>
                <a:since>4.0</a:since>
                <a:experimental>true</a:experimental>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="outbound">
                <xsd:annotation>
                    <xsd:documentation>
                        Resource outbound mapping.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="OUTBOUND"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="inbound">
                <xsd:annotation>
                    <xsd:documentation>
                        Resource inbound mapping.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="INBOUND"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="template">
                <xsd:annotation>
                    <xsd:documentation>
                        Object template mapping.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="TEMPLATE"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="assigned">
                <xsd:annotation>
                    <xsd:documentation>
                        Assigned "focus mapping".
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="ASSIGNED"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="autoAssign">
                <xsd:annotation>
                    <xsd:documentation>
                        Role auto-assign mapping.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="AUTO_ASSIGN"/>
                        <a:since>4.1</a:since>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="construction">
                <xsd:annotation>
                    <xsd:documentation>
                        Mapping used in a construction.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="CONSTRUCTION"/>
                        <a:since>4.1</a:since>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="policyRuleCondition">
                <xsd:annotation>
                    <xsd:documentation>
                        Condition for policy rule.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="POLICY_RULE_CONDITION"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="assignmentCondition">
                <xsd:annotation>
                    <xsd:documentation>
                        Condition for assignment or inducement.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="ASSIGNMENT_CONDITION"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="condition">
                <xsd:annotation>
                    <xsd:documentation>
                        Other conditions.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="CONDITION"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="other">
                <xsd:annotation>
                    <xsd:documentation>
                        Other kind of mapping. (To be specified later.)
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="OTHER"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:complexType name="ExpressionEvaluationTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Trace for expression evaluation operation.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.2</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:TraceType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="expressionEvaluator" type="tns:ExpressionEvaluatorWrapperType"/>
                    <xsd:element maxOccurs="unbounded" minOccurs="0" name="source" type="tns:ExpressionSourceEvaluationTraceType"/>
                    <!-- variables (in the future) -->
                    <xsd:element minOccurs="0" name="skipEvaluationPlus" type="xsd:boolean"/>
                    <xsd:element minOccurs="0" name="skipEvaluationMinus" type="xsd:boolean"/>
                    <xsd:element minOccurs="0" name="contextDescription" type="xsd:string"/>
                    <xsd:element minOccurs="0" name="localContextDescription" type="xsd:string"/>
                    <xsd:element minOccurs="0" name="output" type="t:DeltaSetTripleType"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="expressionEvaluationTrace" type="tns:ExpressionEvaluationTraceType"/>

    <xsd:complexType name="ExpressionEvaluatorWrapperType">
        <xsd:annotation>
            <xsd:documentation>
                Wrapper for expression evaluator. (Very experimental.) Not a container!
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:since>4.2</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" ref="tns:expressionEvaluator"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="expressionEvaluatorWrapper" type="tns:ExpressionEvaluatorWrapperType"/>

    <xsd:complexType name="ValueTransformationExpressionEvaluationTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Trace for expression evaluation operation in AbstractValueTransformationExpressionEvaluator.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.2</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:ExpressionEvaluationTraceType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="evaluationMode" type="tns:ValueTransformationEvaluationModeType"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="valueTransformationExpressionEvaluationTrace" type="tns:ValueTransformationExpressionEvaluationTraceType"/>

    <xsd:simpleType name="ValueTransformationEvaluationModeType">
        <xsd:annotation>
            <xsd:documentation>
                TODO
            </xsd:documentation>
            <xsd:appinfo>
                <a:since>4.2</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="singleShot">
                <xsd:annotation>
                    <xsd:documentation>
                        Single-shot (absolute) evaluation.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="SINGLE_SHOT"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="combinatorial">
                <xsd:annotation>
                    <xsd:documentation>
                        Combinatorial (relative) evaluation.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="COMBINATORIAL"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:complexType name="ValueTransformationTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Trace for transformation of a tuple of values.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0.1</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:TraceType">
                <xsd:sequence>
                    <xsd:element maxOccurs="unbounded" minOccurs="0" name="input" type="tns:NamedValueType">
                        <xsd:annotation>
                            <xsd:documentation>
                                Selected values from individual sources. Variable values are not stored here.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="inputOrigin" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>
                                String representation of the input origin.
                                P means plus, M means minus, Z means zero for each input in question.
                                (This awkward form was chosen because multivalued properties in containers
                                have no guaranteed value ordering.)
                            </xsd:documentation>
                            <xsd:appinfo>
                                <a:since>4.2</a:since>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="destination" type="t:PlusMinusZeroType">
                        <xsd:annotation>
                            <xsd:documentation>
                                To what set should the output go? (Named "outputSet" in the algorithm since 4.2.)
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="conditionResult" type="xsd:boolean">
                        <xsd:annotation>
                            <xsd:documentation>
                                Result of the condition evaluation.
                            </xsd:documentation>
                            <xsd:appinfo>
                                <a:since>4.2</a:since>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element maxOccurs="unbounded" minOccurs="0" name="output" type="tns:AnyValueType">
                        <xsd:annotation>
                            <xsd:documentation>
                                Result of the transformation. (Named "transformationResult" in the algorithm since 4.2.)
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="comment" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>
                                Free-form comment from the algorithm.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="localContextDescription" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>
                                Local context of value transformation (free-form).
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="valueTransformationTrace" type="tns:ValueTransformationTraceType"/>

    <xsd:complexType name="ScriptEvaluationTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Trace for script evaluation operation.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:TraceType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="scriptExpressionEvaluator" type="tns:ScriptExpressionEvaluatorType">
                        <xsd:annotation>
                            <xsd:appinfo>
                                <a:since>4.0.1</a:since>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element maxOccurs="unbounded" minOccurs="0" name="variable" type="tns:ScriptVariableEvaluationTraceType">
                        <xsd:annotation>
                            <xsd:appinfo>
                                <a:since>4.0.1</a:since>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element maxOccurs="unbounded" minOccurs="0" name="result" type="tns:AnyValueType">
                        <xsd:annotation>
                            <xsd:appinfo>
                                <a:since>4.0.1</a:since>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="scriptEvaluationTrace" type="tns:ScriptEvaluationTraceType"/>

    <xsd:complexType name="ScriptVariableEvaluationTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Information about script variable during evaluation.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0.1</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="name" type="xsd:QName"/>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="alias" type="xsd:QName"/>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="value" type="tns:AnyValueType"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="scriptVariableEvaluationTrace" type="tns:ScriptVariableEvaluationTraceType"/>

    <xsd:complexType name="ItemConsolidationTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Trace for item consolidation.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.2</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:TraceType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="itemPath" type="t:ItemPathType"/>
                    <xsd:element minOccurs="0" name="deltaSetTriple" type="t:DeltaSetTripleType"/>
                    <xsd:element minOccurs="0" name="existingItem" type="t:ItemType"/>
                    <xsd:element maxOccurs="unbounded" minOccurs="0" name="aprioriDelta" type="t:ItemDeltaType"/>
                    <xsd:element minOccurs="0" name="equivalenceClassCount" type="xsd:int"/>
                    <xsd:element maxOccurs="unbounded" minOccurs="0" name="resultingDelta" type="t:ItemDeltaType"/>
                    <!-- We could maybe add the parameters here -->
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="itemConsolidationTrace" type="tns:ItemConsolidationTraceType"/>

    <xsd:complexType name="AssignmentEvaluationTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Trace for assignment evaluation operation.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:TraceType">
                <xsd:sequence>
                    <!-- TODO: assignment ItemDeltaItem as a wrapping object -->
                    <xsd:element name="assignmentOld" type="c:AssignmentType"/>
                    <xsd:element name="assignmentDelta" type="t:ItemDeltaType"/>
                    <xsd:element name="assignmentNew" type="c:AssignmentType"/>
                    <xsd:element name="primaryAssignmentMode" type="t:PlusMinusZeroType"/>
                    <xsd:element name="evaluateOld" type="xsd:boolean"/>
                    <!-- TODO source as object -->
                    <xsd:element minOccurs="0" name="textSource" type="xsd:string"/>
                    <xsd:element name="sourceDescription" type="xsd:string"/>
                    <!-- TODO machine-readable result -->
                    <xsd:element minOccurs="0" name="textResult" type="xsd:string"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="assignmentEvaluationTrace" type="tns:AssignmentEvaluationTraceType"/>

    <xsd:complexType name="AssignmentSegmentEvaluationTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Trace for assignment evaluation operation.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:TraceType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="segment" type="tns:AssignmentPathSegmentType"/>
                    <xsd:element minOccurs="0" name="mode" type="t:PlusMinusZeroType"/>
                    <xsd:element minOccurs="0" name="textResult" type="xsd:string"/>
                    <!-- TODO result as object -->
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="assignmentSegmentEvaluationTrace" type="tns:AssignmentSegmentEvaluationTraceType"/>

    <xsd:complexType name="PolicyConstraintEvaluationTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Trace for policy constraint evaluation operation.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0.1</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:TraceType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" ref="tns:abstractPolicyConstraint"/>
                    <xsd:element minOccurs="0" name="trigger" type="tns:EvaluatedPolicyRuleTriggerType"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="policyConstraintEvaluationTrace" type="tns:PolicyConstraintEvaluationTraceType"/>

    <xsd:complexType name="PolicyRuleEvaluationTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Trace for policy rule evaluation operation.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0.1</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:TraceType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="policyRule" type="tns:PolicyRuleType"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="policyRuleEvaluationTrace" type="tns:PolicyRuleEvaluationTraceType"/>

    <xsd:complexType name="ApprovalProcessStartInstructionCreationTraceType">
        <xsd:annotation>
            <xsd:documentation>
                Trace for operation(s) that create approval process start instruction(s).
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0.1</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:TraceType">
                <xsd:sequence>
                    <!-- PcpStartInstruction or StartInstruction is basically a wrapper for CaseType -->
                    <xsd:element maxOccurs="unbounded" minOccurs="0" name="caseRef" type="tns:ObjectReferenceType">
                        <xsd:annotation>
                            <xsd:appinfo>
                                <a:composite>true</a:composite>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="approvalProcessStartInstructionCreationTrace" type="tns:ApprovalProcessStartInstructionCreationTraceType"/>

    <xsd:complexType name="CacheUseTraceType">
        <xsd:annotation>
            <xsd:documentation>

            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="category" type="tns:CacheUseCategoryTraceType"/>
            <xsd:element minOccurs="0" name="comment" type="xsd:string"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="cacheUseTrace" type="tns:CacheUseTraceType"/>

    <xsd:simpleType name="CacheUseCategoryTraceType">
        <xsd:annotation>
            <xsd:documentation>
                How was the cache used?
            </xsd:documentation>
            <xsd:appinfo>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="hit">
                <xsd:annotation>
                    <xsd:documentation>
                        Cache hit was encountered.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="HIT"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="weakHit">
                <xsd:annotation>
                    <xsd:documentation>
                        Cache "weak hit" was encountered. (E.g. the version had to be checked but was found OK.)
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="WEAK_HIT"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="miss">
                <xsd:annotation>
                    <xsd:documentation>
                        Cache miss was encountered.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="MISS"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="pass">
                <xsd:annotation>
                    <xsd:documentation>
                        Cache was passed through.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="PASS"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="notAvailable">
                <xsd:annotation>
                    <xsd:documentation>
                        Cache was not available.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="NOT_AVAILABLE"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="notApplicable">
                <xsd:annotation>
                    <xsd:documentation>
                        Cache was not applicable for given kind of operation.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="NOT_APPLICABLE"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:complexType name="TracingProfileType">
        <xsd:annotation>
            <xsd:documentation>
                Describes how the tracing is to be done.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
                <a:naturalKey>tns:name</a:naturalKey>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="name" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        Name of the tracing profile.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="displayName" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        Name of the tracing profile.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="visible" type="xsd:boolean">
                <xsd:annotation>
                    <xsd:documentation>
                        Should be this profile visible in GUI? (experimental/temporary)
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="default" type="xsd:boolean">
                <xsd:annotation>
                    <xsd:documentation>
                        Is this the default profile?
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="ref" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        References to tracing profile(s) this one is derived from.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="fileNamePattern" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        Pattern of the file name. Can use macros like %{timestamp}, %{testName}, %{testNameShort},
                        %{focusName}, %{milliseconds}, etc.

                        The default is trace-%{timestamp} e.g. trace-2019-06-24-19-14-49-503.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="objectNamePattern" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        Pattern for the repo object. The default is the same as the file name.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="createTraceFile" type="xsd:boolean">
                <xsd:annotation>
                    <xsd:documentation>
                        Whether the trace file is to be created. (Default is true.)
                        A value of false is useful e.g. in tests where we might want to collect trace information
                        but don't need to store it for external use.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <a:since>4.0.1</a:since>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="createRepoObject" type="xsd:boolean">
                <xsd:annotation>
                    <xsd:documentation>
                        Whether the repository object pointing to the stored trace is to be created. (Default is true.)
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="compressOutput" type="xsd:boolean">
                <xsd:annotation>
                    <xsd:documentation>
                        Whether the output is to be compressed when saving. (Default is true.)
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="hideDeploymentInformation" type="xsd:boolean">
                <xsd:annotation>
                    <xsd:documentation>
                        Whether to hide or include deployment information (except for subscription identifier) in the trace.
                        Default is false, i.e. the deployment information is included.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element default="true" minOccurs="0" name="measureCpuTime" type="xsd:boolean">
                <xsd:annotation>
                    <xsd:documentation>
                        Whether to measure CPU time per operation.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <a:since>4.3</a:since>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="operationMonitoring" type="tns:OperationMonitoringType">
                <xsd:annotation>
                    <xsd:documentation>
                        What monitored operations to trace.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <a:experimental>true</a:experimental>
                        <a:since>4.4</a:since>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="collectLogEntries" type="xsd:boolean">
                <xsd:annotation>
                    <xsd:documentation>
                        Whether to collect log entries. (Default is false.)
                        Temporary. Will be replaced with something more elaborate.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="loggingOverride" type="tns:LoggingOverrideType">
                <xsd:annotation>
                    <xsd:documentation>
                        How to override logging while this tracing profile is active.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element default="5" minOccurs="0" name="recordObjectsFound" type="xsd:int">
                <xsd:annotation>
                    <xsd:documentation>
                        How many objects found (e.g. in search operations) we want to store.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <a:since>4.0.1</a:since>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>
            <xsd:element default="10" minOccurs="0" name="recordObjectReferencesFound" type="xsd:int">
                <xsd:annotation>
                    <xsd:documentation>
                        How many objects references found (e.g. in search operations) we want to store.
                        This starts counting after full objects are stored.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <a:since>4.0.1</a:since>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="tracingTypeProfile" type="tns:TracingTypeProfileType">
                <xsd:annotation>
                    <xsd:documentation>
                        How to profile individual operations.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="id" type="xsd:long"/>
    </xsd:complexType>
    <xsd:element name="tracingProfile" type="tns:TracingProfileType"/>

    <xsd:complexType name="TracingTypeProfileType">
        <xsd:annotation>
            <xsd:documentation>
                Describes how the tracing of specific type is to be done.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
                <a:naturalKey>tns:operationType</a:naturalKey>
                <a:naturalKey>tns:level</a:naturalKey>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="operationType" type="xsd:QName">
                <xsd:annotation>
                    <xsd:documentation>
                        Operation(s) to which this tracing type profile is applied.
                        (Represented as QNames of corresponding TraceType subtypes.)
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="level" type="tns:TracingLevelType">
                <xsd:annotation>
                    <xsd:documentation>
                        Level of details to be stored when tracing this operation type.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="id" type="xsd:long"/>
    </xsd:complexType>
    <xsd:element name="tracingTypeProfile" type="tns:TracingTypeProfileType"/>

    <xsd:simpleType name="TracingRootType">
        <xsd:annotation>
            <xsd:documentation>
                Points at which tracing can be requested.
                Each of them has to implement appropriate logic to start tracing and store the result.

                EXPERIMENTAL
            </xsd:documentation>
            <xsd:appinfo>
                <a:since>4.0</a:since>
                <a:experimental>true</a:experimental>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="clockworkRun">
                <xsd:annotation>
                    <xsd:documentation>
                        Clockwork.run execution.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="CLOCKWORK_RUN"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="activityItemProcessing">
                <xsd:annotation>
                    <xsd:documentation>
                        Item processing within an activity.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="ACTIVITY_ITEM_PROCESSING"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="asynchronousMessageProcessing">
                <xsd:annotation>
                    <xsd:documentation>
                        Processing of asynchronous message.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="ASYNCHRONOUS_MESSAGE_PROCESSING"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="liveSyncChangeProcessing">
                <xsd:annotation>
                    <xsd:documentation>
                        Processing of live sync change event.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="LIVE_SYNC_CHANGE_PROCESSING"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="retrievedResourceObjectProcessing">
                <xsd:annotation>
                    <xsd:documentation>
                        Processing of object retrieved from a resource (e.g. when doing import or reconciliation).
                        CURRENTLY NOT IMPLEMENTED
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="RETRIEVED_RESOURCE_OBJECT_PROCESSING"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="workflowOperation">
                <xsd:annotation>
                    <xsd:documentation>
                        Processing of workflow operation.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="WORKFLOW_OPERATION"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="TracingLevelType">
        <xsd:annotation>
            <xsd:documentation>
                Level of tracing.

                EXPERIMENTAL
            </xsd:documentation>
            <xsd:appinfo>
                <a:since>4.0</a:since>
                <a:experimental>true</a:experimental>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="off">
                <xsd:annotation>
                    <xsd:documentation>
                        There is no tracing at this trace point. TraceType is simply not created.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="OFF"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="minimal">
                <xsd:annotation>
                    <xsd:documentation>
                        Only minimal tracing is done. This level is meant to provide information needed to understand what's
                        going on at particular tracing point, but with none to minimal performance penalty: typically when doing
                        performance analysis. So information that is stored should be quickly obtainable and should not take
                        too much space.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="MINIMAL"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="normal">
                <xsd:annotation>
                    <xsd:documentation>
                        Standard tracing, designed to provide as much information as practically possible for general
                        troubleshooting. It is accepted that it comes with a performance penalty e.g. when serializing
                        model context at many places.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="NORMAL"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="detailed">
                <xsd:annotation>
                    <xsd:documentation>
                        Detailed tracing, designed to troubleshoot a specific component. This is a level that would produce
                        over-sized traces when enabled globally.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="DETAILED"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:complexType name="OperationMonitoringType">
        <xsd:annotation>
            <xsd:documentation>
                What monitored operations to trace.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.4</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="operation" type="tns:MonitoredOperationType">
                <xsd:annotation>
                    <xsd:documentation>
                        Monitored operation(s) to be included in traces. (The default is all.)
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element default="full" minOccurs="0" name="level" type="tns:OperationMonitoringLevelType">
                <xsd:annotation>
                    <xsd:documentation>
                        Level of monitoring (e.g. whether to measure the time as well.)
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="id" type="xsd:long"/>
    </xsd:complexType>
    <xsd:element name="operationMonitoring" type="tns:OperationMonitoringType"/>

    <xsd:simpleType name="OperationMonitoringLevelType">
        <xsd:annotation>
            <xsd:documentation>
                Monitored operation.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="count">
                <xsd:annotation>
                    <xsd:documentation>
                        Watching only the operation count.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="COUNT"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="full">
                <xsd:annotation>
                    <xsd:documentation>
                        Watching in the full: currently this means both operation count and the time spent.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="FULL"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:complexType name="TraceDictionaryType">
        <xsd:annotation>
            <xsd:documentation>
                Object dictionary. Very experimental.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="identifier" type="xsd:int">
                <xsd:annotation>
                    <xsd:documentation>
                        Identifier of the dictionary. Used when multiple dictionaries are to be merged.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <a:since>4.0.1</a:since>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="entry" type="tns:TraceDictionaryEntryType">
                <xsd:annotation>
                    <xsd:documentation>
                        Single entry.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="id" type="xsd:long"/>
    </xsd:complexType>
    <xsd:element name="traceDictionary" type="tns:TraceDictionaryType"/>

    <xsd:complexType name="TraceDictionaryEntryType">
        <xsd:annotation>
            <xsd:documentation>
                One object.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="identifier" type="xsd:int">
                <xsd:annotation>
                    <xsd:documentation>
                        Entry identifier.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="originDictionaryId" type="xsd:int">
                <xsd:annotation>
                    <xsd:documentation>
                        Identifier of the dictionary in which this entry was originally created.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <a:since>4.0.1</a:since>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="object" type="tns:ObjectReferenceType">
                <xsd:annotation>
                    <xsd:documentation>
                        Object. The reference must contain full object.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <a:composite>true</a:composite>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="id" type="xsd:long"/>
    </xsd:complexType>
    <xsd:element name="traceDictionaryEntry" type="tns:TraceDictionaryEntryType"/>

    <xsd:complexType name="TracingOutputType">
        <xsd:annotation>
            <xsd:documentation>
                Output of the tracing.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="metadata" type="tns:TracingOutputMetadataType">
                <xsd:annotation>
                    <xsd:documentation>
                        Metadata e.g. time of creation, etc.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="environment" type="tns:TracingEnvironmentType">
                <xsd:annotation>
                    <xsd:documentation>
                        Description of the environment where the trace was captured. E.g. the deployment information,
                        enclosing task, and so on.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="result" type="tns:OperationResultType">
                <xsd:annotation>
                    <xsd:documentation>
                        Operation result tree.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="dictionary" type="tns:TraceDictionaryType">
                <xsd:annotation>
                    <xsd:documentation>
                        Object dictionary.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="id" type="xsd:long"/>
    </xsd:complexType>
    <xsd:element name="tracingOutput" type="tns:TracingOutputType"/>

    <xsd:complexType name="TracingOutputMetadataType">
        <xsd:annotation>
            <xsd:documentation>
                Metadata e.g. time of creation, etc.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="createTimestamp" type="xsd:dateTime">
                <xsd:annotation>
                    <xsd:documentation>
                        When the tracing output was created.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="creatorRef" type="tns:ObjectReferenceType">
                <xsd:annotation>
                    <xsd:documentation>
                        The creator.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="profile" type="tns:TracingProfileType">
                <xsd:annotation>
                    <xsd:documentation>
                        Tracing profile used.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="id" type="xsd:long"/>
    </xsd:complexType>
    <xsd:element name="tracingOutputMetadata" type="tns:TracingOutputMetadataType"/>

    <xsd:complexType name="TracingEnvironmentType">
        <xsd:annotation>
            <xsd:documentation>
                Description of the environment where the trace was captured. E.g. the deployment information,
                enclosing task, and so on.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="deployment" type="tns:DeploymentInformationType">
                <xsd:annotation>
                    <xsd:documentation>
                        Information about the deployment. Subscription information is excluded.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="taskRef" type="tns:ObjectReferenceType">
                <xsd:annotation>
                    <xsd:documentation>
                        Enclosing task. Some parts (e.g. operation result children) are excluded to save space.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <a:composite>true</a:composite>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="nodeRef" type="tns:ObjectReferenceType">
                <xsd:annotation>
                    <xsd:documentation>
                        Selected information about the current node. Sensitive parts (e.g. IP addresses) are excluded.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <a:composite>true</a:composite>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="id" type="xsd:long"/>
    </xsd:complexType>
    <xsd:element name="tracingEnvironment" type="tns:TracingEnvironmentType"/>

    <xsd:complexType name="LoggingOverrideType">
        <xsd:annotation>
            <xsd:documentation>
                Information how to override logging configuration.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimenta>true</a:experimenta>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="levelOverride" type="tns:ClassLoggerLevelOverrideType">
                <xsd:annotation>
                    <xsd:documentation>
                        Overridden level(s) for particular logger(s).
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="id" type="xsd:long"/>
    </xsd:complexType>
    <xsd:element name="loggingOverride" type="tns:LoggingOverrideType"/>

    <xsd:complexType name="ClassLoggerLevelOverrideType">
        <xsd:annotation>
            <xsd:documentation>
                Information how to override logging level for specified logger(s).
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimenta>true</a:experimenta>
                <a:container>true</a:container>
                <a:since>4.0</a:since>
                <a:naturalKey>tns:logger</a:naturalKey>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="logger" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        Loggers to override. All loggers with a given prefixes will be overridden using the specified level.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="level" type="tns:LoggingLevelType">
                <xsd:annotation>
                    <xsd:documentation>
                        Level to set for given loggers.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="id" type="xsd:long"/>
    </xsd:complexType>
    <xsd:element name="classLoggerLevelOverride" type="tns:ClassLoggerLevelOverrideType"/>

    <xsd:complexType name="AnyValueType">
        <xsd:annotation>
            <xsd:documentation>
                Any value (property, reference, container).
                EXPERIMENTAL

                This is a workaround to avoid using xsd:anyType directly in a container. It is mapped to a property;
                however, it cannot be always serialized as a property.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:since>4.0.1</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="value" type="xsd:anyType">
                <xsd:annotation>
                    <xsd:appinfo>
                        <a:rawType>true</a:rawType>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="textValue" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        If the value is not directly representable in XML/JSON/YAML we at least store its text version
                        (debugDump or toString or similar) here.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="anyValue" type="tns:AnyValueType"/>

    <xsd:complexType name="NamedValueType">
        <xsd:annotation>
            <xsd:documentation>
                Any value (property, reference, container) along with its name.

                This is a workaround to avoid using xsd:anyType directly in a container. It is mapped to a property;
                however, it cannot be always serialized as a property.
            </xsd:documentation>
            <xsd:appinfo>
                <a:experimental>true</a:experimental>
                <a:since>4.0.1</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:AnyValueType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="name" type="xsd:QName"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="namedValue" type="tns:NamedValueType"/>

    <!--    <xsd:complexType name="AnyValuesType">-->
    <!--        <xsd:annotation>-->
    <!--            <xsd:documentation>-->
    <!--                List of any value (property, reference, container).-->
    <!--                EXPERIMENTAL-->

    <!--                This is a workaround to avoid using xsd:anyType directly in a container. It is mapped to a property;-->
    <!--                however, it cannot be always serialized as a property.-->
    <!--            </xsd:documentation>-->
    <!--            <xsd:appinfo>-->
    <!--                <a:experimental>true</a:experimental>-->
    <!--                <a:since>4.0.1</a:since>-->
    <!--            </xsd:appinfo>-->
    <!--        </xsd:annotation>-->
    <!--        <xsd:sequence>-->
    <!--            <xsd:element name="value" type="tns:AnyValueType" minOccurs="0" maxOccurs="unbounded">-->
    <!--                <xsd:annotation>-->
    <!--                    <xsd:appinfo>-->
    <!--                        <a:rawType>true</a:rawType>-->
    <!--                    </xsd:appinfo>-->
    <!--                </xsd:annotation>-->
    <!--            </xsd:element>-->
    <!--        </xsd:sequence>-->
    <!--    </xsd:complexType>-->
    <!--    <xsd:element name="anyValues" type="tns:AnyValuesType" />-->

    <xsd:simpleType name="OperationKindType">
        <xsd:annotation>
            <xsd:documentation>
                Kind of operation (captured by OperationResult).
                HIGHLY EXPERIMENTAL. Maybe it will be scrapped in the near future.
            </xsd:documentation>
            <xsd:appinfo>
                <a:since>4.1</a:since>
                <a:experimental>true</a:experimental>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="clockworkExecution">
                <xsd:annotation>
                    <xsd:documentation>
                        Whole execution (run) of the clockwork.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="CLOCKWORK_EXECUTION"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="clockworkClick">
                <xsd:annotation>
                    <xsd:documentation>
                        Single click of the clockwork.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="CLOCKWORK_CLICK"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="projectorExecution">
                <xsd:annotation>
                    <xsd:documentation>
                        Execution of the projector.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="PROJECTOR_EXECUTION"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="resourceObjectConstructionEvaluation">
                <xsd:annotation>
                    <xsd:documentation>
                        Evaluation of a resource object construction.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="RESOURCE_OBJECT_CONSTRUCTION_EVALUATION"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="mappingEvaluation">
                <xsd:annotation>
                    <xsd:documentation>
                        Evaluation of a mapping.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="MAPPING_EVALUATION"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="assignmentEvaluation">
                <xsd:annotation>
                    <xsd:documentation>
                        Evaluation of an assignment.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="ASSIGNMENT_EVALUATION"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="scriptEvaluation">
                <xsd:annotation>
                    <xsd:documentation>
                        Evaluation of a script.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="SCRIPT_EVALUATION"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="repositoryCache">
                <xsd:annotation>
                    <xsd:documentation>
                        Repository cache operation.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="REPOSITORY_CACHE"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="repository">
                <xsd:annotation>
                    <xsd:documentation>
                        Repository operation.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="REPOSITORY"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="focusLoadCheck">
                <xsd:annotation>
                    <xsd:documentation>
                        Check whether focus should be loaded.
                        TODO really?
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="FOCUS_LOAD_CHECK"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="focusLoad">
                <xsd:annotation>
                    <xsd:documentation>
                        Focus load check that resulted in focus being loaded.
                        TODO really?
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="FOCUS_LOAD"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="projectionLoad">
                <xsd:annotation>
                    <xsd:documentation>
                        Projection load.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="PROJECTION_LOAD"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="fullProjectionLoad">
                <xsd:annotation>
                    <xsd:documentation>
                        Full projection load.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="FULL_PROJECTION_LOAD"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="focusChangeExecution">
                <xsd:annotation>
                    <xsd:documentation>
                        Execution of focus change.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="FOCUS_CHANGE_EXECUTION"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="projectionChangeExecution">
                <xsd:annotation>
                    <xsd:documentation>
                        Execution of projection change.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="PROJECTION_CHANGE_EXECUTION"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="provisioning">
                <xsd:annotation>
                    <xsd:documentation>
                        Provisioning API operation.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="PROVISIONING"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="connector">
                <xsd:annotation>
                    <xsd:documentation>
                        Connector operation.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="CONNECTOR"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="other">
                <xsd:annotation>
                    <xsd:documentation>
                        Other kind of operation.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="OTHER"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="modelAudit">
                <xsd:annotation>
                    <xsd:documentation>
                        Recording audit in model.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="MODEL_AUDIT"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:complexType name="TraceVisualizationInstructionsType">
        <xsd:annotation>
            <xsd:documentation>
                How to visualize trace file.
            </xsd:documentation>
            <xsd:appinfo>
                <a:container>true</a:container>
                <a:experimental>true</a:experimental>
                <a:since>4.1</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="instruction" type="tns:TraceVisualizationInstructionType"/>
            <xsd:element minOccurs="0" name="columns" type="tns:TraceVisualizationColumnsType"/>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="dataFlow" type="tns:TraceDataFlowVisualizationInstructionType">
                <xsd:annotation>
                    <xsd:documentation>
                        Specification of the data flow(s) to be visualized.
                        Currently not implemented.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="traceVisualizationInstructions" type="tns:TraceVisualizationInstructionsType"/>

    <xsd:complexType name="TraceVisualizationInstructionType">
        <xsd:annotation>
            <xsd:documentation>
                How to visualize trace file.
            </xsd:documentation>
            <xsd:appinfo>
                <a:container>true</a:container>
                <a:experimental>true</a:experimental>
                <a:since>4.1</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="order" type="xsd:int"/>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="selector" type="tns:TraceSelectorType">
                <xsd:annotation>
                    <xsd:documentation>
                        Any of these selectors may match. (TODO reconsider)
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="visualization" type="tns:TraceVisualizationType"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="traceVisualizationInstruction" type="tns:TraceVisualizationInstructionType"/>

    <xsd:complexType name="TraceVisualizationColumnsType">
        <xsd:annotation>
            <xsd:documentation>
                What columns to visualize?
                Volatile - will be changed soon.
                E.g. we want to specify exact order of columns.
            </xsd:documentation>
            <xsd:appinfo>
                <a:container>true</a:container>
                <a:experimental>true</a:experimental>
                <a:since>4.1</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="invocationId" type="xsd:boolean"/>
            <xsd:element minOccurs="0" name="duration" type="xsd:boolean"/>
            <xsd:element minOccurs="0" name="durationBefore" type="xsd:boolean"/>
            <!-- The following two be replaced by references to enums instead of strings -->
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="countFor" type="xsd:string"/>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="timeFor" type="xsd:string"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="traceVisualizationColumns" type="tns:TraceVisualizationColumnsType"/>

    <xsd:complexType name="TraceSelectorType">
        <xsd:annotation>
            <xsd:documentation>
                Selects an operation trace. If more conditions are specified, all of them must apply.
            </xsd:documentation>
            <xsd:appinfo>
                <a:container>true</a:container>
                <a:experimental>true</a:experimental>
                <a:since>4.1</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="traceType" type="xsd:QName">
                <xsd:annotation>
                    <xsd:documentation>
                        Type of the trace to match. Applies if any of the types match.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="operationKind" type="tns:OperationKindType">
                <xsd:annotation>
                    <xsd:documentation>
                        Kind of operation to match. Applies if any of the kinds matches.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="traceSelector" type="tns:TraceSelectorType"/>

    <xsd:complexType name="TraceVisualizationType">
        <xsd:annotation>
            <xsd:documentation>
                How a traced operation is to be visualized.
            </xsd:documentation>
            <xsd:appinfo>
                <a:container>true</a:container>
                <a:experimental>true</a:experimental>
                <a:since>4.1</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="generic" type="tns:GenericTraceVisualizationType">
                <xsd:annotation>
                    <xsd:documentation>
                        Generic visualization type (off, one-liner, detailed). TODO.
                        The interpretation is left to the particular trace visualizer.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="data" type="tns:TraceDataSelectionType">
                <xsd:annotation>
                    <xsd:documentation>
                        What kind of data are to be shown?
                        The interpretation is left to the particular trace visualizer.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="traceVisualization" type="tns:TraceVisualizationType"/>

    <xsd:simpleType name="GenericTraceVisualizationType">
        <xsd:annotation>
            <xsd:documentation>
                Generic visualization type (off, one-liner, detailed). TODO.
            </xsd:documentation>
            <xsd:appinfo>
                <a:since>4.1</a:since>
                <a:experimental>true</a:experimental>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="stop">
                <xsd:annotation>
                    <xsd:documentation>
                        The trace nor its children are not visualized.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="STOP"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="hide">
                <xsd:annotation>
                    <xsd:documentation>
                        The trace is not visualized. But its children could be.
                        This is the default.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="HIDE"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="oneLine">
                <xsd:annotation>
                    <xsd:documentation>
                        The trace is visualized in "one-line" mode. No details.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="ONE_LINE"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="brief">
                <xsd:annotation>
                    <xsd:documentation>
                        The trace is visualized in brief form - potentially multiline but less detailed.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="BRIEF"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="detailed">
                <xsd:annotation>
                    <xsd:documentation>
                        The trace is visualized in details.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="DETAILED"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="full">
                <xsd:annotation>
                    <xsd:documentation>
                        The trace is visualized in full details.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="FULL"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="TraceDataSelectionType">
        <xsd:annotation>
            <xsd:documentation>
                Generic data selection rule.
            </xsd:documentation>
            <xsd:appinfo>
                <a:since>4.1</a:since>
                <a:experimental>true</a:experimental>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="none">
                <xsd:annotation>
                    <xsd:documentation>
                        No "instance" data shown.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="NONE"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="nonOperational">
                <xsd:annotation>
                    <xsd:documentation>
                        Non-operational data shown.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="NON_OPERATIONAL"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="all">
                <xsd:annotation>
                    <xsd:documentation>
                        All data is shown.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="ALL"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:complexType name="TraceDataFlowVisualizationInstructionType">
        <xsd:annotation>
            <xsd:documentation>
                Specification of the data flow(s) to be visualized.
            </xsd:documentation>
            <xsd:appinfo>
                <a:container>true</a:container>
                <a:experimental>true</a:experimental>
                <a:since>4.1</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="item" type="t:ItemPathType">
                <xsd:annotation>
                    <xsd:documentation>
                        Initial set of items to be shown.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="lookBackward" type="xsd:boolean">
                <xsd:annotation>
                    <xsd:documentation>
                        Whether to look backward i.e. to the source(s) for specified item(s).
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="lookForward" type="xsd:boolean">
                <xsd:annotation>
                    <xsd:documentation>
                        Whether to look forward i.e. to the target(s) derived from specified item(s).
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="traceDataFlowVisualizationInstruction" type="tns:TraceDataFlowVisualizationInstructionType"/>
</xsd:schema>