Document toolboxDocument toolbox

Vidispine

XML Schema [VC 21.3.1 GEN]

This is the XML schema used to define data types in the Vidispine API. For a snapshot of the XML schema, see http://xml.vidispine.com/schema/vidispine/

xmlSchema.xsd

API specific schema.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           targetNamespace="http://xml.vidispine.com/schema/vidispine"
           elementFormDefault="qualified"
           xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
           jaxb:version="1.0"
           xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
           jaxb:extensionBindingPrefixes="xjc" xmlns:tns="http://xml.vidispine.com/schema/vidispine">

    <xs:include schemaLocation="common.xsd"/>
    <xs:include schemaLocation="transcoder.xsd"/>

    <xs:annotation>
        <xs:appinfo>
            <jaxb:globalBindings generateIsSetMethod="true">
                <xjc:serializable uid="10000"/>
                <!--<xjc:typeSubstitution type="complex"/>-->
            </jaxb:globalBindings>
        </xs:appinfo>
    </xs:annotation>

    <xs:complexType name="AmountType">
        <xs:simpleContent>
            <xs:extension base="xs:decimal">
                <xs:attribute name="unit" type="xs:string"/>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>

    <xs:complexType name="AnalyzeAudioJobType">
        <xs:sequence>
            <xs:element name="otif" type="tns:OtifPresetType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="AnalyzeVideoJobType">
        <xs:sequence>
            <xs:element name="otif" type="tns:OtifPresetType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="AnalyzeJobDocument" type="tns:AnalyzeJobType" xmlns:tns="http://xml.vidispine.com/schema/vidispine"/>
    <xs:complexType name="AnalyzeJobType">
	<xs:sequence>
	    <xs:element name="black" minOccurs="0" maxOccurs="1">
		<xs:complexType>
		    <xs:sequence>
			<xs:element name="threshold" type="xs:float" minOccurs="0" maxOccurs="1"/>
			<xs:element name="percentage" type="xs:int" minOccurs="0" maxOccurs="1"/>
		    </xs:sequence>
		</xs:complexType>
	    </xs:element>
	    <xs:element name="bars" minOccurs="0" maxOccurs="1">
		<xs:complexType>
		    <xs:sequence>
			<xs:element name="threshold" type="xs:float" minOccurs="0" maxOccurs="1"/>
			<xs:element name="percentage" type="xs:int" minOccurs="0" maxOccurs="1"/>
		    </xs:sequence>
		</xs:complexType>
	    </xs:element>
	    <xs:element name="freeze" minOccurs="0" maxOccurs="1">
		<xs:complexType>
		    <xs:sequence>
			<xs:element name="threshold" type="xs:float" minOccurs="0" maxOccurs="1"/>
			<xs:element name="time" type="xs:float" minOccurs="0" maxOccurs="1"/>
		    </xs:sequence>
		</xs:complexType>
	    </xs:element>

	    <xs:element name="channel" type="tns:AnalyzeAudioChannelType" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element name="audio" type="tns:AnalyzeAudioJobType" minOccurs="0" maxOccurs="1"/>
        <xs:element name="video" type="tns:AnalyzeVideoJobType" minOccurs="0" maxOccurs="1"/>
        <xs:element name="highlighter" type="tns:HighlighterType" minOccurs="0" maxOccurs="1"/>
        <xs:element name="smartcrop" type="tns:SmartCropType" minOccurs="0" maxOccurs="1"/>
	</xs:sequence>
    </xs:complexType>

    <xs:complexType name="SearchResultEntryTimespanType">
        <xs:sequence>
            <xs:element name="field" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="value" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
        <xs:attribute name="start" type="xs:string" use="required"/>
        <xs:attribute name="end" type="xs:string" use="required"/>
    </xs:complexType>

    <xs:complexType name="SearchResultEntryType">
        <xs:sequence>
            <xs:choice>
                <xs:element name="item" type="tns:ItemType"/>
                <xs:element name="collection" type="tns:CollectionType"/>
                <xs:element name="shape" type="tns:ShapeType"/>
                <xs:element name="file" type="tns:FileType"/>
            </xs:choice>
            <xs:element name="timespan" type="tns:SearchResultEntryTimespanType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="start" type="xs:string" use="optional"/>
        <xs:attribute name="end" type="xs:string" use="optional"/>
        <xs:attribute name="type" type="xs:string" use="optional"/>
        <xs:attribute name="id" type="xs:string" use="optional"/>
        <xs:attribute name="parent_type" type="xs:string" use="optional"/>
        <xs:attribute name="parent_id" type="xs:string" use="optional"/>
        <xs:attribute name="base" type="xs:string" use="optional"/>
    </xs:complexType>
    <xs:element name="SearchResultDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:SearchResultType"/>
    <xs:complexType name="SearchResultType">
        <xs:sequence>
	    <xs:element name="hits" minOccurs="0" maxOccurs="1" type="xs:int"/>
	    <xs:element name="suggestion" minOccurs="0" maxOccurs="unbounded" type="tns:SuggestionResultType"/>
            <xs:element name="autocomplete" minOccurs="0" maxOccurs="unbounded" type="tns:AutocompleteResponseType"/>
            <xs:element name="entry" type="tns:SearchResultEntryType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="facet" minOccurs="0" maxOccurs="unbounded" type="tns:FacetType"/>
            <xs:element name="nextCursor" type="xs:string" maxOccurs="1" minOccurs="0"></xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="MetadataEntryListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:MetadataEntryListType2"/>
    <xs:complexType name="MetadataEntryListType2">
        <xs:sequence>
            <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:complexContent>
                        <xs:extension base="tns:MetadataEntryType">
                            <xs:attribute name="uuid" type="xs:string"/>
                        </xs:extension>
                    </xs:complexContent>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="MetadataEntryDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:MetadataEntryType" />
    <xs:complexType name="MetadataEntryType">
        <xs:sequence>
            <xs:element name="group" type="tns:MetadataGroupValueType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="field" type="tns:MetadataFieldValueType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="value" type="tns:MetadataValueType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="source" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="id" type="xs:string" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="type" type="xs:string" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="loc" type="xs:anyURI" minOccurs="1" maxOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="MetadataSchemaDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:MetadataSchemaType" />
    <xs:complexType name="MetadataSchemaType">
        <xs:sequence>
           <xs:element name="group" minOccurs="0" maxOccurs="unbounded" type="tns:MetadataSchemaGroupType"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="MetadataSchemaGroupDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:MetadataSchemaGroupType" />
    <xs:complexType name="MetadataSchemaGroupType">
       <xs:sequence>
           <xs:element name="group" minOccurs="0" maxOccurs="unbounded" type="tns:MetadataSchemaElementType"/>
           <xs:element name="field" minOccurs="0" maxOccurs="unbounded" type="tns:MetadataSchemaElementType"/>
       </xs:sequence>
       <xs:attributeGroup ref="tns:MetadataSchemaAttributes"/>
    </xs:complexType>
    <xs:element name="BeanCallbackListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:BeanCallbackListType"/>
    <xs:complexType name="BeanCallbackListType">
        <xs:sequence>
            <xs:element name="callback" type="tns:BeanCallbackType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="BeanCallbackDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:BeanCallbackType"/>
    <xs:complexType name="BeanCallbackType">
        <xs:sequence>
            <xs:element name="sourceBean" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="sourceMethod" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="destinationBean" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="destinationMethod" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="lastSuccess" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
            <xs:element name="lastFailure" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
            <xs:element name="errorMessage" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="AuditLogDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:AuditLogType"/>
    <xs:complexType name="AuditLogType">
        <xs:sequence>
            <xs:element name="count" type="xs:long" minOccurs="0" maxOccurs="1"/>
            <xs:element name="entry" type="tns:AuditLogEntryType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="AuditLogEntryType">
        <xs:sequence>
            <xs:element name="username" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="method" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="path" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="queryParameters" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="matrixParameters" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="runAs" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="contentType" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="contentLength" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="body" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="responseCode" type="xs:int" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
        <xs:attribute name="timestamp" type="xs:dateTime" use="required"/>
    </xs:complexType>
    <xs:element name="ConfigurationPropertyListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ConfigurationPropertyListType"/>
    <xs:complexType name="ConfigurationPropertyListType">
        <xs:sequence>
            <xs:element name="property" type="tns:ConfigurationPropertyType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ConfigurationPropertyDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ConfigurationPropertyType"/>
    <xs:complexType name="ConfigurationPropertyType">
        <xs:sequence>
            <xs:element name="key" minOccurs="1" maxOccurs="1" type="xs:string"/>
            <xs:element name="value" minOccurs="0" maxOccurs="1" type="xs:string"/>
        </xs:sequence>
        <xs:attribute name="lastChange" type="xs:dateTime" use="optional"/>
    </xs:complexType>

    <xs:complexType name="CollectionReorderEntryType">
        <xs:attribute name="id" use="optional" type="xs:string"/>
        <xs:attribute name="reference" use="optional" type="xs:string"/>
        <xs:attribute name="before" use="optional" type="xs:string"/>
        <xs:attribute name="after" use="optional" type="xs:string"/>
    </xs:complexType>
    <xs:element name="CollectionReorderDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:CollectionReorderType"/>
    <xs:complexType name="CollectionReorderType">
        <xs:sequence>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:element name="item" type="tns:CollectionReorderEntryType"/>
                <xs:element name="collection" type="tns:CollectionReorderEntryType"/>
                <xs:element name="library" type="tns:CollectionReorderEntryType"/>
            </xs:choice>
        </xs:sequence>
    </xs:complexType>

    <xs:element name="ExternalIdentifierNamespaceListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ExternalIdentifierNamespaceListType"/>
    <xs:complexType name="ExternalIdentifierNamespaceListType">
        <xs:sequence>
            <xs:element name="namespace" type="tns:ExternalIdentifierNamespaceType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ExternalIdentifierNamespaceDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ExternalIdentifierNamespaceType"/>
    <xs:complexType name="ExternalIdentifierNamespaceType">
        <xs:sequence>
            <xs:element name="name" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="pattern" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="priority" type="xs:int" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ExternalIdentifierListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ExternalIdentifierListType"/>
    <xs:complexType name="ExternalIdentifierListType">
        <xs:sequence>
            <xs:element name="id" type="tns:ExternalIdentifierType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ExternalIdentifierDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ExternalIdentifierType"/>
    <xs:complexType name="ExternalIdentifierType">
        <xs:sequence>
            <xs:element name="entityId" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="entityType" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="namespace" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="externalId" type="xs:string" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="MetadataFieldResultDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:MetadataFieldResultType"/>

    <xs:complexType name="MetadataFieldResultType">
        <xs:sequence>
            <xs:element name="hits" minOccurs="1" maxOccurs="1" type="xs:int"/>
            <xs:element name="group" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="value" type="tns:MetadataGroupValueType" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="definition" type="tns:MetadataFieldGroupType" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="source" minOccurs="0" maxOccurs="1">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="id" type="xs:string" minOccurs="1" maxOccurs="1"/>
                                    <xs:element name="type" type="xs:string" minOccurs="1" maxOccurs="1"/>
                                    <xs:element name="loc" type="xs:anyURI" minOccurs="1" maxOccurs="1"/>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                    </xs:sequence>
                    <xs:attribute name="name" type="xs:string" use="required"/>
                    <xs:attribute name="uuid" type="xs:string" use="required"/>
                    <xs:attribute name="start" type="xs:string" use="required"/>
                    <xs:attribute name="end" type="xs:string" use="required"/>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="MetadataFieldGroupListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:MetadataFieldGroupListType"/>
    <xs:complexType name="MetadataFieldGroupListType">
        <xs:sequence>
            <xs:element name="group" type="tns:MetadataFieldGroupType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="MetadataFieldGroupDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:MetadataFieldGroupType"/>
    <xs:complexType name="MetadataFieldGroupType">
        <xs:sequence>
            <xs:element name="name" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="schema" type="tns:MetadataSchemaElementType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="data" minOccurs="0" maxOccurs="unbounded" type="tns:KeyValuePairType"/>
            <xs:element name="field" type="tns:MetadataFieldType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="group" type="tns:MetadataFieldGroupType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="access" minOccurs="0" maxOccurs="unbounded" type="tns:MetadataFieldAccessControlType"/>
            <xs:element name="externalId" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
            <xs:element name="origin" type="xs:string" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
        <xs:attribute name="inheritance" type="xs:string" use="optional"/>
    </xs:complexType>
    <xs:element name="MetadataFieldListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:MetadataFieldListType"/>
    <xs:complexType name="MetadataFieldListType">
        <xs:sequence>
            <xs:element name="access" minOccurs="0" maxOccurs="unbounded" type="tns:MetadataFieldAccessControlType"/>
            <xs:element name="field" minOccurs="0" maxOccurs="unbounded" type="tns:MetadataFieldType"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="MetadataFieldAccessControlListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:MetadataFieldAccessControlListType"/>
    <xs:complexType name="MetadataFieldAccessControlListType">
        <xs:sequence>
            <xs:element name="access" type="tns:MetadataFieldAccessControlType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="MetadataFieldAccessControlDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:MetadataFieldAccessControlType"/>
    <xs:complexType name="MetadataFieldAccessControlType">
        <xs:sequence>
            <xs:element name="id" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
            <xs:choice minOccurs="0" maxOccurs="1">
                <xs:element name="field" type="xs:string" minOccurs="1" maxOccurs="1"/>
                <xs:element name="fieldGroup" type="xs:string" minOccurs="1" maxOccurs="1"/>
            </xs:choice>
            <xs:element name="user" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="group" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="permission" type="xs:string" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="add" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:SolrAddType"/> <!-- notoc -->
    <xs:complexType name="SolrAddType"> <!-- notoc -->
        <xs:sequence>
            <xs:element name="doc" type="tns:SolrDocumentType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="doc" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:SolrDocumentType"/> <!-- notoc -->
    <xs:complexType name="SolrDocumentType"> <!-- notoc -->
        <xs:sequence>
            <xs:element name="field" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:simpleContent>
                        <xs:extension base="xs:string">
                            <xs:attribute name="name" type="xs:string" use="required"/>
                        </xs:extension>
                    </xs:simpleContent>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="LockDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:LockType"/>
    <xs:complexType name="LockType">
        <xs:sequence>
            <xs:element name="id" type="tns:SiteIdType" minOccurs="1" maxOccurs="1"/>
            <xs:element name="user" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="expires" type="xs:dateTime" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ExceptionDocument" type="tns:ExceptionType" />
    <xs:complexType name="ExceptionType">
        <xs:choice>
            <xs:element name="notFound" type="tns:NotFoundExceptionType"/>
            <xs:element name="internalServer" type="tns:InternalServerExceptionType"/>
            <xs:element name="forbidden" type="tns:ForbiddenExceptionType"/>
            <xs:element name="notYetImplemented" type="tns:NotYetImplementedExceptionType"/>
            <xs:element name="conflict" type="tns:ConflictExceptionType"/>
            <xs:element name="invalidInput" type="tns:InvalidInputExceptionType"/>
            <xs:element name="licenseFault" type="tns:LicenseExceptionType"/>
            <xs:element name="fileAlreadyExists" type="tns:FileAlreadyExistsExceptionType"/>
            <xs:element name="notAuthorized" type="tns:NotAuthorizedExceptionType"/>
        </xs:choice>
    </xs:complexType>

    <xs:complexType name="NotFoundExceptionType">
        <xs:sequence>
            <xs:element name="type" minOccurs="0" type="xs:string" />
            <xs:element name="id" minOccurs="0" type="xs:string" />
            <xs:element name="context" minOccurs="0" type="xs:string" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="LicenseExceptionType">
        <xs:sequence>
            <xs:element name="message" minOccurs="0" type="xs:string" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="InternalServerExceptionType">
        <xs:sequence>
            <xs:element name="message" minOccurs="0" type="xs:string" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ForbiddenExceptionType">
        <xs:sequence>
            <xs:element name="context" minOccurs="0" type="xs:string" />
            <xs:element name="id" minOccurs="0" type="xs:string" />
            <xs:element name="explanation" minOccurs="0" type="xs:string" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="NotYetImplementedExceptionType">
        <xs:sequence>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ConflictExceptionType">
        <xs:sequence>
            <xs:element name="context" minOccurs="0" type="xs:string" />
            <xs:element name="id" minOccurs="0" type="xs:string" />
            <xs:element name="explanation" minOccurs="0" type="xs:string" />
            <xs:element name="value" minOccurs="0" type="xs:string" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="InvalidInputExceptionType">
        <xs:sequence>
            <xs:element name="context" minOccurs="0" type="xs:string" />
            <xs:element name="id" minOccurs="0" type="xs:string" />
            <xs:element name="explanation" minOccurs="0" type="xs:string" />
            <xs:element name="value" minOccurs="0" type="xs:string" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="FileAlreadyExistsExceptionType">
        <xs:sequence>
            <xs:element name="storageId" minOccurs="0" type="xs:string" />
            <xs:element name="fileId" minOccurs="0" type="xs:string" />
            <xs:element name="path" minOccurs="0" type="xs:string" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="NotAuthorizedExceptionType">
        <xs:sequence>
            <xs:element name="message" minOccurs="0" type="xs:string" />
        </xs:sequence>
    </xs:complexType>
    <xs:element name="AccessControlMergedGroupDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:AccessControlMergedGroupType"/>
    <xs:complexType name="AccessControlMergedGroupType">
        <xs:sequence>
            <xs:element name="access" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="group" type="xs:string" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="grantor" type="xs:string" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="permission" type="xs:string" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="type" type="xs:string" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="extradata" type="xs:string" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="collection" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="library" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="originalDisabledGrantor" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                    <xs:attribute name="rank" use="optional" type="xs:int"/>
                    <xs:attribute name="id" use="optional" type="tns:SiteIdType"/>
                    <xs:attribute name="effectivePermission" use="optional" type="xs:string"/>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="AccessControlMergedDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:AccessControlMergedType"/>
    <xs:complexType name="AccessControlMergedType">
        <xs:sequence>
            <xs:element name="query" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="username" type="xs:string" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="permission" type="xs:string" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="type" type="xs:string" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="extradata" type="xs:string" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="item" type="tns:SiteIdType" minOccurs="1" maxOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="access" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="grantor" type="xs:string" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="permission" type="xs:string" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="type" type="xs:string" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="extradata" type="xs:string" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="group" type="xs:string" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="collection" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="library" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="originalDisabledGrantor" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                    <xs:attribute name="superUser" use="optional" type="xs:boolean"/>
                    <xs:attribute name="rank" use="required" type="xs:int"/>
                    <xs:attribute name="matches" use="optional" type="xs:boolean"/>
                    <xs:attribute name="id" use="optional" type="tns:SiteIdType"/>
                    <xs:attribute name="username" use="optional" type="xs:string"/>
                    <xs:attribute name="effectivePermission" use="optional" type="xs:string"/>
                </xs:complexType>
            </xs:element>
            <xs:element name="fieldGroup" type="tns:MetadataFieldGroupPermissionType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="field" type="tns:MetadataFieldPermissionType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="MetadataFieldGroupPermissionType">
        <xs:sequence>
            <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="permission" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="fieldGroup" type="tns:MetadataFieldGroupPermissionType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="field" type="tns:MetadataFieldPermissionType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="username" use="required" type="xs:string"/>
    </xs:complexType>

    <xs:complexType name="MetadataFieldPermissionType">
        <xs:sequence>
            <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="permission" type="xs:string" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
        <xs:attribute name="username" use="required" type="xs:string"/>
    </xs:complexType>
    <xs:element name="ImportSettingsDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ImportSettingsType"/>

    <xs:complexType name="ImportSettingsType">
        <xs:sequence>
            <xs:element name="id" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="access" type="tns:AccessControlType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ScheduledRequestDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ScheduledRequestType"/>
    <xs:element name="ScheduledRequestListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ScheduledRequestListType"/>

    <xs:complexType name="ScheduledRequestListType">
        <xs:sequence>
            <xs:element name="scheduledRequest" type="tns:ScheduledRequestType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ScheduledRequestType">
        <xs:sequence>
            <xs:element name="id" type="xs:long" minOccurs="1" maxOccurs="1"/>
            <xs:element name="user" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="state" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="date" type="xs:dateTime" minOccurs="1" maxOccurs="1"/>
            <xs:element name="created" type="xs:dateTime" minOccurs="1" maxOccurs="1"/>
            <xs:element name="executed" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
            <xs:element name="request" minOccurs="1" maxOccurs="1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="uri" type="xs:string" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="method" type="xs:string" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="body" type="xs:string" minOccurs="0" maxOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="response" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="statusCode" type="xs:int" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="hasBody" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="contentType" type="xs:string" minOccurs="0" maxOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="LibrarySettingsDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:LibrarySettingsType"/>
    <xs:complexType name="LibrarySettingsType">
        <xs:sequence>
            <xs:element name="id" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="username" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="updateMode" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="autoRefresh" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="updateFrequency" type="xs:int" minOccurs="0" maxOccurs="1"/>
            <xs:element name="lastUpdate" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
            <xs:element name="query" type="tns:ItemSearchType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ImportAccessControlListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ImportAccessControlListType"/>
    <xs:complexType name="ImportAccessControlListType">
        <xs:sequence>
            <xs:element name="group" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="permission" type="xs:string" minOccurs="1" maxOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="StorageGroupListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:StorageGroupListType"/>
    <xs:complexType name="StorageGroupListType">
        <xs:sequence>
            <xs:element name="group" type="tns:StorageGroupType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="StorageGroupDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:StorageGroupType" />
    <xs:complexType name="StorageGroupType">
        <xs:sequence>
            <xs:element name="name" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="data" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="key" type="xs:string" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="value" type="xs:string" minOccurs="1" maxOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="storage" type="tns:StorageType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ProjectDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ProjectType"/>
    <xs:complexType name="ProjectType">
        <xs:sequence>
            <xs:element name="name" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="metadata" type="tns:MetadataType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ProjectVersionDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ProjectVersionType"/>
    <xs:complexType name="ProjectVersionType">
        <xs:sequence>
            <xs:element name="id" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="item" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="id" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="externalId" type="xs:string" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="uri" type="xs:string" minOccurs="0" maxOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="sequence" type="tns:SequenceType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="metadata" type="tns:MetadataType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ExternalMediaType">
        <xs:sequence>
            <xs:element name="uri" type="xs:anyURI" minOccurs="1" maxOccurs="1"/>
            <xs:element name="format" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="essenceStreamId" default="0" type="xs:int" maxOccurs="1"/>
            <xs:element name="timeBase" type="tns:TimeBaseType" minOccurs="1" maxOccurs="1"/>
            <xs:element name="samples" type="xs:integer" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ExternalVideoMediaType">
        <xs:complexContent>
            <xs:extension xmlns:tns="http://xml.vidispine.com/schema/vidispine" base="tns:ExternalMediaType">
                <xs:sequence>
                    <xs:element name="width" minOccurs="1" maxOccurs="1" type="xs:int"/>
                    <xs:element name="height" minOccurs="1" maxOccurs="1" type="xs:int"/>
                    <xs:element name="pixelAspectRatio" type="tns:AspectRatioType" minOccurs="0" maxOccurs="1"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="SequenceMediaType">
        <xs:sequence>
            <xs:choice minOccurs="1" maxOccurs="1">
                <xs:element name="externalVideoMedia" type="tns:ExternalVideoMediaType" minOccurs="1" maxOccurs="1"/>
                <xs:element name="item" type="tns:SiteIdType" minOccurs="1" maxOccurs="1"/>
            </xs:choice>
            <xs:element name="sourceTrack" minOccurs="1" maxOccurs="1" type="xs:int"/>
            <xs:element name="in" minOccurs="0" maxOccurs="1" type="tns:TimeCodeType"/>
            <xs:element name="out" minOccurs="0" maxOccurs="1" type="tns:TimeCodeType"/>
            <xs:element name="sourceIn" minOccurs="0" maxOccurs="1" type="tns:TimeCodeType"/>
            <xs:element name="sourceOut" minOccurs="0" maxOccurs="1" type="tns:TimeCodeType"/>
            <xs:element name="effect" type="tns:EffectType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="reference" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <!-- Like TransitionType, except that it uses in and out points and has user friendly color values -->
    <xs:complexType name="SequenceTransitionType">
        <xs:sequence>
            <xs:element name="in" type="tns:TimeCodeType" minOccurs="1" maxOccurs="1"/>
            <xs:element name="out" type="tns:TimeCodeType" minOccurs="1" maxOccurs="1"/>
            <xs:element name="wipe" type="xs:int" minOccurs="0"/>
            <xs:element name="transition" type="xs:string"/>
            <xs:element name="horizRepeat" type="xs:int" minOccurs="0"/>
            <xs:element name="vertRepeat" type="xs:int" minOccurs="0"/>
            <xs:element name="startPercentage" type="xs:int" minOccurs="0"/>
            <xs:element name="endPercentage" type="xs:int" minOccurs="0"/>
            <xs:element name="reverse" type="xs:boolean" minOccurs="0"/>
            <xs:element name="borderWidth" type="xs:int" minOccurs="0"/>
            <xs:element name="borderColor" type="xs:string" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="SequenceListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:SequenceListType" />
    <xs:complexType name="SequenceListType">
        <xs:sequence>
            <xs:element name="sequence" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="id" type="tns:SiteIdType" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="type" type="xs:string" minOccurs="1" maxOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="SequenceDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:SequenceType" />
    <xs:complexType name="SequenceType">
        <xs:sequence>
            <xs:element name="id" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="track" type="tns:SequenceTrackType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="override" type="tns:TranscodePresetType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="SequenceTrackType">
        <xs:sequence>
            <xs:element name="audio" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="segment" type="tns:SequenceMediaType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="transition" type="tns:SequenceTransitionType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="JobProblemListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:JobProblemListType" />
    <xs:complexType name="JobProblemListType">
        <xs:sequence>
            <xs:element name="problem" type="tns:JobProblemType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="JobProblemDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:JobProblemType" />
    <xs:complexType name="JobProblemType">
        <xs:sequence>
            <xs:element name="id" type="xs:long" minOccurs="1" maxOccurs="1"/>
            <xs:element name="type" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="data" type="tns:KeyValueType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="job" type="tns:SiteIdType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="KeyValueType">
        <xs:sequence>
            <xs:element name="key" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="value" type="xs:string" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="SearchHistoryDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:SearchHistoryListType" />
    <xs:complexType name="SearchHistoryListType">
        <xs:sequence>
            <xs:element name="search" type="tns:SearchHistoryType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="SearchHistoryType">
        <xs:sequence>
            <xs:element name="timestamp" type="xs:dateTime" minOccurs="1" maxOccurs="1"/>
            <xs:element name="user" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="query" type="tns:ItemSearchType" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ImportableFileListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ImportableFileListType" />
    <xs:complexType name="ImportableFileListType">
        <xs:sequence>
            <xs:element name="hits" minOccurs="0" maxOccurs="1" type="xs:integer" />
            <xs:element name="element" minOccurs="0" type="tns:ImportableFileType" maxOccurs="unbounded"/>
            <xs:element name="prefixes" type="tns:FilePrefixType" maxOccurs="1" minOccurs="0"></xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ImportableFileDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ImportableFileType" />
    <xs:complexType name="ImportableFileType">
        <xs:sequence>
            <xs:element name="file" type="tns:FileType" minOccurs="1" maxOccurs="1"/>
            <xs:element name="metadata" type="tns:MetadataType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="AutoImportRuleListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:AutoImportRuleListType" />
    <xs:complexType name="AutoImportRuleListType">
        <xs:sequence>
            <xs:element name="rule" type="tns:AutoImportRuleType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="AutoImportRuleDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:AutoImportRuleType" />
    <xs:complexType name="AutoImportRuleType">
        <xs:sequence>
            <xs:element name="fileNameAsTitle" type="xs:boolean" minOccurs="0" maxOccurs="1" />
            <xs:element name="storage" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="tag" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="metadata" type="tns:MetadataType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="jobmetadata" type="tns:SimpleMetadataType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="settingsId" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="projection" type="xs:string" minOccurs="0" maxOccurs="1" />
            <xs:element name="excludeFilter" type="tns:FilenameFilterType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="shapeTagFilter" type="tns:FilenameFilterType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="sequenceDefinition" type="tns:sequenceDefinitionType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="priority" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="user" type="xs:string" minOccurs="0" maxOccurs="1" />
            <xs:element name="ignoreSidecarImport" type="xs:boolean" minOccurs="0" maxOccurs="1" />
            <xs:element name="disabledSidecarExtensions" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
            <xs:element name="enabled" type="xs:boolean" minOccurs="0" maxOccurs="1" />
            <xs:element name="resourceId" type="tns:SiteIdType" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="sequenceDefinitionType">
        <xs:sequence>
            <xs:element name="sequenceMetadata" type="tns:SequenceMetaDataType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="fileSequence" type="tns:FileSequestionDefinitionType" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="SequenceMetaDataType">
        <xs:sequence>
            <xs:element name="regex" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="idGroup" type="xs:integer" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="FileSequestionDefinitionType">
        <xs:sequence>
            <xs:element name="regex" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="idGroup" type="xs:integer" minOccurs="1" maxOccurs="1"/>
            <xs:element name="numGroup" type="xs:integer" minOccurs="1" maxOccurs="1"/>
            <xs:element name="timeout" type="xs:integer" minOccurs="1" maxOccurs="1"/>
            <xs:element name="numFormat" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="FilenameFilterType">
        <xs:sequence>
            <xs:element name="pattern" type="xs:string"/>
            <xs:element name="tag" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:simpleType name="WeekDayType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="MONDAY"/>
            <xs:enumeration value="TUESDAY"/>
            <xs:enumeration value="WEDNESDAY"/>
            <xs:enumeration value="THURSDAY"/>
            <xs:enumeration value="FRIDAY"/>
            <xs:enumeration value="SATURDAY"/>
            <xs:enumeration value="SUNDAY"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:element name="FileSynchronizationInfoDocument" type="tns:FileSynchronizationInfoType"/>
    <xs:complexType name="FileSynchronizationInfoType">
        <xs:sequence>
            <xs:element name="id" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="lastUpdated" type="xs:dateTime" minOccurs="1" maxOccurs="1"/>
            <xs:element name="size" type="xs:long" minOccurs="1" maxOccurs="1"/>
            <xs:element name="state" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="hash" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="FileSynchronizationScheduleEntryType">
        <xs:sequence>
            <xs:element name="day" type="tns:WeekDayType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="start" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="end" type="xs:string" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="FileSynchronizationScheduleType">
        <xs:sequence>
            <xs:element name="entry" type="tns:FileSynchronizationScheduleEntryType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="FileSynchronizationUriMethodType">
        <xs:sequence>
            <xs:element name="scheme" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="methodType" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="FileSynchronizationCustomMethodType">
        <xs:sequence>
            <xs:element name="bean" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="additionalParameters" type="tns:SimpleMetadataType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="FileSynchronizationMethodType">
        <xs:choice>
            <xs:element name="uri" type="tns:FileSynchronizationUriMethodType"/>
            <xs:element name="custom" type="tns:FileSynchronizationCustomMethodType"/>
        </xs:choice>
    </xs:complexType>
    <xs:element name="FileSynchronizationEntryListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:FileSynchronizationEntryListType"/>
    <xs:complexType name="FileSynchronizationEntryListType">
        <xs:sequence>
            <xs:element name="entry" type="tns:FileSynchronizationEntryType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="FileSynchronizationEntryStatusType">
        <xs:sequence>
            <xs:element name="bytesWritten" type="xs:long" minOccurs="1" maxOccurs="1"/>
            <xs:element name="lastWritten" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
            <xs:element name="lastChecked" type="xs:dateTime" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="FileSynchronizationLogEntryType">
        <xs:simpleContent>
            <xs:extension base="xs:string">
                <xs:attribute name="timestamp" type="xs:dateTime" use="required"/>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>
    <xs:element name="FileSynchronizationLogDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:FileSynchronizationLogType"/>
    <xs:complexType name="FileSynchronizationLogType">
        <xs:sequence>
            <xs:element name="entry" type="tns:FileSynchronizationLogEntryType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="FileSynchronizationEntryDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:FileSynchronizationEntryType"/>
    <xs:complexType name="FileSynchronizationEntryType">
        <xs:sequence>
            <xs:element name="fileId" type="tns:SiteIdType" minOccurs="1" maxOccurs="1"/>
            <xs:element name="state" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="size" type="xs:long" minOccurs="0" maxOccurs="1"/>
            <xs:element name="hash" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="sourceSite" type="xs:string" minOccurs="1" maxOccurs="1"/>

            <xs:element name="itemId" type="tns:SiteIdType" minOccurs="1" maxOccurs="1"/>
            <xs:element name="shapeId" type="tns:SiteIdType" minOccurs="1" maxOccurs="1"/>

            <xs:element name="status" type="tns:FileSynchronizationEntryStatusType" minOccurs="0" maxOccurs="1"/>

            <xs:element name="log" type="tns:FileSynchronizationLogType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="FileSynchronizationRuleListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:FileSynchronizationRuleListType"/>
    <xs:complexType name="FileSynchronizationRuleListType">
        <xs:sequence>
            <xs:element name="rule" type="tns:FileSynchronizationRuleType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="FileSynchronizationRuleDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:FileSynchronizationRuleType"/>
    <xs:complexType name="FileSynchronizationRuleType">
        <xs:sequence>
            <xs:element name="tag" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="schedule" type="tns:FileSynchronizationScheduleType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="method" type="tns:FileSynchronizationMethodType" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:simpleType name="SyncPolicyType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="ONDEMAND"/>
            <xs:enumeration value="ALWAYS"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:element name="SiteDefinitionDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:SiteDefinitionType"/>
    <xs:complexType name="SiteDefinitionType">
        <xs:sequence>
            <xs:element name="url" type="xs:string"/>
            <xs:element name="username" type="xs:string"/>
            <xs:element name="password" type="xs:string"/>
            <xs:element name="syncPolicy" type="tns:SyncPolicyType"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ChangesetUUIDDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ChangesetUUIDType" />
    <xs:complexType name="ChangesetUUIDType">
        <xs:sequence>
            <xs:element name="uuid" type="xs:string"/>
            <xs:element name="type" type="xs:string"/>
            <xs:element name="id" type="xs:string"/>
            <xs:element name="origin" type="xs:string"/>
            <xs:element name="timestamp" type="xs:dateTime"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ChangesetUUIDListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ChangesetUUIDListType"/>
    <xs:complexType name="ChangesetUUIDListType">
        <xs:sequence>
            <xs:element name="changeset" type="tns:ChangesetUUIDType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="SiteInitializationStatusDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:SiteInitializationStatusType"/>
    <xs:complexType name="SiteInitializationStatusType">
        <xs:sequence>
            <xs:element name="started" type="xs:dateTime"/>
            <xs:element name="itemsProcessed" type="xs:integer"/>
            <xs:element name="collectionsProcessed" type="xs:integer"/>
            <xs:element name="librariesProcessed" type="xs:integer"/>
            <xs:element name="usersProcessed" type="xs:integer"/>
            <xs:element name="groupsProcessed" type="xs:integer"/>
        </xs:sequence>
    </xs:complexType>

    <xs:element name="EntitySynchronizeDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:EntitySynchronizeType" />
    <xs:complexType name="EntitySynchronizeType">
        <xs:sequence>
            <xs:element name="rule" type="tns:SiteRuleType" minOccurs="0"/>
            <xs:element name="createFileStatuses" type="xs:boolean" minOccurs="0" maxOccurs="1" />
            <xs:element name="timestamp" type="xs:dateTime" minOccurs="1" maxOccurs="1"/>
            <xs:element name="type" type="xs:string"/>
            <xs:choice>
                <xs:element name="item" type="tns:ItemSynchronizeType"/>
                <xs:element name="collection" type="tns:CollectionSynchronizeType"/>
                <xs:element name="user" type="tns:UserSynchronizeType"/>
                <xs:element name="group" type="tns:GroupSynchronizeType"/>
                <xs:element name="library" type="tns:LibrarySynchronizeType"/>
            </xs:choice>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ItemSynchronizeType">
        <xs:sequence>
            <xs:element name="delete" type="xs:boolean" />
            <xs:element name="create" type="xs:boolean" />
            <xs:element name="id" type="tns:SiteIdType" minOccurs="1" maxOccurs="1"/>
            <xs:element name="created" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
            <xs:element name="complete" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="metadata" type="tns:MetadataSynchronizeType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="shape" type="tns:ShapeSynchronizeType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="targetStorageId" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="file" type="tns:FileSynchronizeType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="access" type="tns:AccessControlSynchronizeType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="thumbnails" type="tns:ThumbnailsSynchronizeType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="partOfCollection" type="tns:SiteIdType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="partOfLibrary" type="tns:SiteIdType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="metadataGroup" type="tns:MetadataFieldGroupType" minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="CollectionSynchronizeType">
        <xs:sequence>
            <xs:element name="delete" type="xs:boolean" />
            <xs:element name="create" type="xs:boolean" />
            <xs:element name="id" type="tns:SiteIdType" minOccurs="1" maxOccurs="1"/>
            <xs:element name="name" type="xs:string" minOccurs="0"  maxOccurs="1"/>
            <xs:element name="complete" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="metadata" type="tns:MetadataSynchronizeType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="access" type="tns:AccessControlSynchronizeType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="hasItem" type="tns:HasSubEntityType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="hasLibrary" type="tns:SiteIdType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="hasCollection" type="tns:HasSubEntityType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="partOfCollection" type="tns:SiteIdType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="deletedHasItem" type="tns:SiteIdType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="deletedHasLibrary" type="tns:SiteIdType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="deletedHasCollection" type="tns:SiteIdType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="metadataGroup" type="tns:MetadataFieldGroupType" minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="LibrarySynchronizeType">
        <xs:sequence>
            <xs:element name="delete" type="xs:boolean" />
            <xs:element name="create" type="xs:boolean" />
            <xs:element name="id" type="tns:SiteIdType" minOccurs="1" maxOccurs="1"/>
            <xs:element name="complete" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="access" type="tns:AccessControlSynchronizeType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="updateMode" type="xs:string" />
            <xs:element name="updateFrequency" type="xs:string" minOccurs="0" />
            <xs:element name="searchXML" type="xs:string" minOccurs="0" />
            <xs:element name="hasItem" type="tns:HasSubEntityType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="partOfCollection" type="tns:SiteIdType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="HasSubEntityType">
        <xs:sequence>
            <xs:element name="id" type="xs:string"/>
            <xs:element name="metadataId" type="xs:string"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="UserSynchronizeType">
        <xs:sequence>
            <xs:element name="delete" type="xs:boolean"/>
            <xs:element name="create" type="xs:boolean"/>
            <xs:element name="user" type="tns:UserType"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="GroupSynchronizeType">
        <xs:sequence>
            <xs:element name="removedUser" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="removedGroup" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="removedRole" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="delete" type="xs:boolean"/>
            <xs:element name="create" type="xs:boolean"/>
            <xs:element name="group" type="tns:GroupType"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="MetadataSynchronizeType">
        <xs:sequence>
            <xs:element name="id" type="tns:SiteIdType"/>
            <xs:element name="changeSet" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="id" type="tns:SiteIdType" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="metadata" type="tns:MetadataEntryListType" minOccurs="1" maxOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ThumbnailsSynchronizeDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ThumbnailsSynchronizeType" />
    <xs:complexType name="ThumbnailsSynchronizeType">
        <xs:sequence>
            <xs:element name="thumbnail" type="tns:ThumbnailSynchronizeType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ThumbnailSynchronizeType">
        <xs:sequence>
            <xs:element name="operation" type="xs:string"/>
            <xs:element name="timecode" type="xs:string"/>
            <xs:element name="version" type="xs:integer"/>
            <xs:element name="poster" type="xs:boolean"/>
            <xs:element name="image" type="xs:string"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="MetadataEntryListType">
        <xs:sequence>
            <xs:element name="entry" type="tns:MetadataEntrySyncType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="MetadataEntrySyncType">
        <xs:sequence>
            <xs:element name="value" type="xs:string"/>
        </xs:sequence>
        <xs:attribute name="id" type="tns:SiteIdType"/>
        <xs:attribute name="start" type="xs:string"/>
        <xs:attribute name="end" type="xs:string"/>
        <xs:attribute name="name" type="xs:string"/>
        <xs:attribute name="parentUuid" type="xs:string"/>
        <xs:attribute name="reference" type="xs:boolean"/>
        <xs:attribute name="removed" type="xs:boolean"/>
        <xs:attribute name="timestamp" type="xs:long"/>
        <xs:attribute name="type" type="xs:string"/>
        <xs:attribute name="user" type="xs:string"/>
        <xs:attribute name="valueUuid" type="xs:string"/>
        <xs:attribute name="version" type="xs:integer"/>
        <xs:attribute name="metadataId" type="tns:SiteIdType"/>
        <xs:attribute name="metadataLeafId" type="tns:SiteIdType"/>
        <xs:attribute name="track" type="xs:string"/>
        <xs:attribute name="language" type="xs:string"/>
    </xs:complexType>

    <xs:complexType name="ShapeSynchronizeType">
        <xs:sequence>
            <xs:element name="delete" type="xs:boolean"/>
            <xs:element name="create" type="xs:boolean"/>
            <xs:element name="essenceVersion" type="xs:integer" minOccurs="0" maxOccurs="1"/>
            <xs:element name="id" type="tns:SiteIdType" minOccurs="1" maxOccurs="1"/>
            <xs:element name="component" type="tns:ComponentSynchronizeType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="tag" type="tns:ShapeTagSynchronizeType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="mimeType" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:simpleType name="ComponentTypeType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="AUDIO_COMPONENT"/>
            <xs:enumeration value="VIDEO_COMPONENT"/>
            <xs:enumeration value="CONTAINER_COMPONENT"/>
            <xs:enumeration value="BINARY_COMPONENT"/>
            <xs:enumeration value="DESCRIPTOR_COMPONENT"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="ComponentSynchronizeType">
        <xs:sequence>
            <xs:element name="id" type="tns:SiteIdType" minOccurs="1" maxOccurs="1"/>
            <xs:element name="file" type="tns:SiteIdType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="format" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="type" type="tns:ComponentTypeType" minOccurs="1" maxOccurs="1"/>
            <xs:choice>
                <xs:element name="audio" type="tns:AudioComponentType" minOccurs="0" maxOccurs="1"/>
                <xs:element name="container" type="tns:ContainerComponentType" minOccurs="0" maxOccurs="1"/>
                <xs:element name="video" type="tns:VideoComponentType" minOccurs="0" maxOccurs="1"/>
                <xs:element name="binary" type="tns:BinaryComponentType" minOccurs="0" maxOccurs="1"/>
                <xs:element name="descriptor" type="tns:DescriptorComponentType" minOccurs="0" maxOccurs="1"/>
            </xs:choice>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ShapeTagSynchronizeType">
        <xs:sequence>
            <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="preset" type="tns:TranscodePresetType" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="AccessControlSynchronizeType">
        <xs:sequence>
            <xs:element name="delete" type="xs:boolean"/>
            <xs:element name="create" type="xs:boolean"/>
            <xs:element name="document" type="tns:AccessControlType"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="FileSynchronizeType">
        <xs:sequence>
            <xs:element name="id" type="tns:SiteIdType" minOccurs="1" maxOccurs="1"/>
            <xs:element name="uri" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="path" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="FileSiteAvailabilityDocument" type="tns:FileSiteAvailabilityType"/>
    <xs:complexType name="FileSiteAvailabilityType">
        <xs:sequence>
            <xs:element type="xs:string" name="site" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="FileListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:FileListType" />
    <xs:complexType name="FileListType">
        <xs:sequence>
            <xs:element name="hits" type="xs:integer" minOccurs="0" maxOccurs="1"/>
            <xs:element name="file" type="tns:FileType" maxOccurs="unbounded" minOccurs="0"></xs:element>
            <xs:element name="prefixes" type="tns:FilePrefixType" maxOccurs="1" minOccurs="0"></xs:element>
            <xs:element name="nextCursor" type="xs:string" maxOccurs="1" minOccurs="0"></xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="FilePrefixType">
        <xs:sequence>
            <xs:element name="prefix" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="TransferListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:TransferListType"/>
    <xs:complexType name="TransferListType">
        <xs:sequence>
            <xs:element name="transfer" type="tns:TransferType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="TransferDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:TransferType"/>
    <xs:complexType name="TransferType">
        <xs:sequence>
            <xs:element name="name" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="state" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="priority" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="transferred" type="xs:long" minOccurs="0" maxOccurs="1"/>
            <xs:element name="fileId" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="TransferLogListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:TransferLogListType"/>
    <xs:complexType name="TransferLogListType">
        <xs:sequence>
            <xs:element name="count" type="xs:long" minOccurs="0" maxOccurs="1"/>
            <xs:element name="transferLogEntry" type="tns:TransferLogEntryType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="TransferLogEntryType">
        <xs:sequence>
            <xs:element name="id" type="xs:long" minOccurs="0" maxOccurs="1"/>
            <xs:element name="referredId" type="xs:long" minOccurs="0" maxOccurs="1"/>
            <xs:element name="timestamp" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
            <xs:element name="method" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="sourceUri" type="xs:anyURI" minOccurs="0" maxOccurs="1"/>
            <xs:element name="destinationUri" type="xs:anyURI" minOccurs="0" maxOccurs="1"/>
            <xs:element name="sourceStorage" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="destinationStorage" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="sourceFile" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="destinationFile" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="sourceItem" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="destinationItem" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="sourceShape" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="destinationShape" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="job" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="status" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="FastStartSettingType">
        <xs:sequence>
            <xs:element name="requireFastStart" type="xs:boolean" minOccurs="0" />
            <xs:element name="analyzeDuration" type="xs:boolean" minOccurs="0" />
            <xs:element name="fastStartDuration" minOccurs="0">
                <xs:complexType>
                    <xs:complexContent>
                        <xs:extension base="tns:TimeCodeType">
                            <xs:attribute name="override" type="xs:boolean" use="required"/>
                        </xs:extension>
                    </xs:complexContent>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="TranscodePresetListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:TranscodePresetListType"/>
    <xs:complexType name="TranscodePresetListType">
        <xs:sequence>
            <xs:element name="preset" type="tns:TranscodePresetType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="TranscodePresetDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:TranscodePresetType"/>
    <xs:complexType name="TranscodePresetType">
        <xs:sequence>
            <xs:element name="description" type="xs:string" minOccurs="0"/>
            <xs:element name="name" type="xs:string" minOccurs="0"/>
            <xs:element name="format" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="audio" type="tns:AudioTranscodePresetType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="audioTrack" type="tns:AudioTrackTranscodePresetType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="video" type="tns:VideoTranscodePresetType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="startTimecode" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="fastStartSetting" type="tns:FastStartSettingType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="thumbnailResolution" type="tns:ResolutionType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="thumbnailBackground" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="thumbnailPeriod" type="tns:TimeCodeType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="thumbnailPlugin" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="posterResolution" type="tns:ResolutionType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="posterBackground" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="faceDetect" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="metadata" type="tns:SimpleMetadataType" minOccurs="0" maxOccurs="1" />
            <xs:element name="preserveEDL" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="addClipName" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="overlay" minOccurs="0" maxOccurs="unbounded" type="tns:OverlayType"/>
            <xs:element name="textOverlay" minOccurs="0" maxOccurs="unbounded" type="tns:TextOverlayType"/>
            <xs:element name="preferredSourceTag" minOccurs="0" maxOccurs="1" type="xs:string"/>
            <xs:element name="script" type="xs:string" minOccurs="0"/>
            <xs:element name="shapeMetadata" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded"/>
            <!-- Controls how the maximum time period that each chunk of samples is going to be, only used for output of QuickTime files (MOV/MP4) -->
            <xs:element name="maxChunkDuration" type="tns:TimeCodeType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="demuxerSetting" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="muxerSetting" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="sequenceOutput" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="start" type="xs:int" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="width" type="xs:int" minOccurs="0" maxOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="mediaconvert" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="inputSetting" type="xs:string" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="outputSetting" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element name="other" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="AudioTranscodePresetType">
        <xs:sequence>
            <xs:element name="codec" minOccurs="0" maxOccurs="1" type="xs:string"/>
            <xs:element name="bitrate" minOccurs="0" maxOccurs="1" type="xs:int"/>
            <xs:element name="framerate" minOccurs="0" maxOccurs="1" type="tns:TimeBaseType"/>
            <xs:element name="channel" minOccurs="0" maxOccurs="unbounded" type="xs:int"/>
            <xs:element name="stream" minOccurs="0" maxOccurs="unbounded" type="xs:int"/>
            <xs:element name="preset" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
            <xs:element name="noAudio" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="setting" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="mix" type="tns:AudioTranscodePresetMixType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="otif" type="tns:OtifPresetType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="monoFile" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="allChannel" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="output" type="tns:AudioOutputType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="AudioOutputType">
        <xs:sequence>
            <xs:element name="format" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="codec" minOccurs="0" maxOccurs="1" type="xs:string"/>
            <xs:element name="bitrate" minOccurs="0" maxOccurs="1" type="xs:int"/>
            <xs:element name="framerate" minOccurs="0" maxOccurs="1" type="tns:TimeBaseType"/>
            <xs:element name="channel" minOccurs="0" maxOccurs="unbounded" type="xs:int"/>
            <xs:element name="stream" minOccurs="0" maxOccurs="unbounded" type="xs:int"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="AudioTranscodePresetMixType">
        <xs:sequence>
            <xs:element name="input" type="tns:AudioTranscodePresetChannelMixType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="silence" type="xs:boolean"/>
    </xs:complexType>

    <xs:complexType name="AudioTranscodePresetChannelMixType">
        <xs:sequence>
            <xs:element name="effect" type="tns:EffectType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="id" type="xs:int" use="optional"/>
        <xs:attribute name="stream" type="xs:unsignedShort" use="optional"/>
        <xs:attribute name="channel" type="xs:unsignedShort" use="required"/>
        <xs:attribute name="gain" type="xs:float" use="optional"/>
    </xs:complexType>

    <xs:complexType name="AudioTrackTranscodePresetType">
        <xs:sequence>
            <xs:element name="codec" minOccurs="0" maxOccurs="1" type="xs:string"/>
            <xs:element name="bitrate" minOccurs="0" maxOccurs="1" type="xs:int"/>
            <xs:element name="framerate" minOccurs="0" maxOccurs="1" type="tns:TimeBaseType"/>
            <xs:element name="channel" minOccurs="0" maxOccurs="unbounded" type="xs:int"/>
            <xs:element name="preset" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
            <xs:element name="setting" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="mix" type="tns:AudioTranscodePresetMixType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="VideoTranscodePresetType">
        <xs:sequence>
            <xs:element name="scaling" minOccurs="0" maxOccurs="1" type="tns:ScalingType"/>
            <xs:element name="codec" minOccurs="0" maxOccurs="1" type="xs:string"/>
            <xs:element name="bitrate" minOccurs="0" maxOccurs="1" type="xs:int"/>
            <xs:element name="framerate" minOccurs="0" maxOccurs="1" type="tns:TimeBaseType"/>
            <xs:element name="resolution" minOccurs="0" maxOccurs="1" type="tns:ResolutionType"/>

            <xs:element name="displayWidth" type="tns:RationalType" minOccurs="0"/>
            <xs:element name="displayHeight" type="tns:RationalType" minOccurs="0"/>
            <xs:element name="displayXOffset" type="tns:RationalType" minOccurs="0"/>
            <xs:element name="displayYOffset" type="tns:RationalType" minOccurs="0"/>
            <xs:element name="containerSAR" type="tns:AspectRatioType" minOccurs="0"/>

            <xs:element name="forceCFR" minOccurs="0" maxOccurs="1" type="xs:boolean"/>
            <xs:element name="gopSize" type="xs:int" minOccurs="0"/>
            <xs:element name="maxBFrames" type="xs:int" minOccurs="0"/>
            <xs:element name="pixelFormat" type="xs:string" minOccurs="0" />
            <xs:element name="preset" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
            <xs:element name="profile" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
            <xs:element name="noVideo" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="stripParameterSets" type="xs:boolean" minOccurs="0"/>
            <xs:element name="addParameterSets" type="xs:boolean" minOccurs="0"/>
            <xs:element name="parameterSets" type="xs:hexBinary" minOccurs="0"/>
            <xs:element name="setting" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="burnTimecode" type="xs:boolean" minOccurs="0"/>
            <xs:element name="burnSubtitles" type="xs:boolean" minOccurs="0"/>
            <xs:element name="imageQuality" type="xs:integer" minOccurs="0"/>
            <xs:element name="otif" type="tns:OtifPresetType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:simpleType name="OtifPluginType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="audio"/>
            <xs:enumeration value="video"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:element name="OtifPresetDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:OtifPresetType"/>
    <xs:complexType name="OtifPresetType">
        <xs:sequence>
            <xs:element name="uuid" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="versionMajor" type="xs:int" minOccurs="1" maxOccurs="1"/>
            <xs:element name="versionMinor" type="xs:int" minOccurs="1" maxOccurs="1"/>
            <xs:element name="versionPatch" type="xs:int" minOccurs="1" maxOccurs="1"/>
            <xs:element name="configuration" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="resource" type="tns:NameURIPairType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="OtifConfigurationDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:OtifConfigurationType"/>
    <xs:complexType name="OtifConfigurationType">
        <xs:sequence>
            <xs:element name="id" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="title" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="preset" type="tns:OtifPresetType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="instance" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="OtifConfigurationListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:OtifConfigurationListType"/>
    <xs:complexType name="OtifConfigurationListType">
        <xs:sequence>
            <xs:element name="hits" type="xs:integer" minOccurs="0" maxOccurs="1"/>
            <xs:element name="configuration" type="tns:OtifConfigurationType" maxOccurs="unbounded" minOccurs="0"></xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="OtifJobConfigurationDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:OtifJobConfigurationType"/>
    <xs:complexType name="OtifJobConfigurationType">
        <xs:sequence>
            <xs:element name="id" type="tns:SiteIdType" minOccurs="0"/>
            <xs:element name="title" type="xs:string"/>
            <xs:element name="configurations" type="tns:OtifConfigurationListType"/>
            <xs:element name="vxa" type="tns:VXAType" minOccurs="1" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="OtifJobConfigurationListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:OtifJobConfigurationListType"/>
    <xs:complexType name="OtifJobConfigurationListType">
        <xs:sequence>
            <xs:element name="hits" type="xs:integer" minOccurs="0" maxOccurs="1" />
            <xs:element name="configuration" type="tns:OtifJobConfigurationType" minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
    </xs:complexType>
    <xs:element name="OtifResourceDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:OtifResourceType"/>
    <xs:complexType name="OtifResourceType">
        <xs:sequence>
            <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="size" type="xs:int" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="OtifResourceListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:OtifResourceListType"/>
    <xs:complexType name="OtifResourceListType">
        <xs:sequence>
            <xs:element name="hits" type="xs:integer" minOccurs="0" maxOccurs="1"/>
            <xs:element name="resource" type="tns:OtifResourceType" maxOccurs="unbounded" minOccurs="0"></xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="StorageRulesDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:StorageRulesType"/>
    <xs:element name="StorageRuleDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:StorageRuleType"/>

    <xs:complexType name="StorageRulesType">
        <xs:sequence>
            <xs:element name="default" type="tns:StorageRuleType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="tag" minOccurs="0" maxOccurs="unbounded" type="tns:StorageRuleType"/>
        </xs:sequence>
    </xs:complexType>

    <xs:simpleType name="StorageCriteriaType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="bandwidth"/>
            <xs:enumeration value="capacity"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="StorageRuleType">
        <xs:sequence>
            <xs:element name="storageCount" type="xs:integer" minOccurs="0" maxOccurs="1"/>
            <xs:element name="priority" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:simpleContent>
                        <xs:extension base="tns:StorageCriteriaType">
                            <xs:attribute name="level" type="xs:integer" use="required"/>
                        </xs:extension>
                    </xs:simpleContent>
                </xs:complexType>
            </xs:element>
            <xs:element name="inherited" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="storage" type="tns:SiteIdType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="group" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="not" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="storage" type="tns:SiteIdType" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element name="group" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element name="any" type="tns:EmptyString" minOccurs="0" maxOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="pool" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="storage" type="tns:SiteIdType" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element name="group" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="appliesTo" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="id" type="xs:string" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="type" type="xs:string" minOccurs="0" maxOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="precedence" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
        <xs:attribute name="id" type="xs:string" use="optional"/>
    </xs:complexType>

    <xs:simpleType name="EmptyString">
        <xs:restriction base="xs:string">
            <xs:length value="0"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="IntegerOrEmpty">
        <!--xs:union memberTypes="xs:int tns:EmptyString"/-->
        <xs:restriction base="xs:string">
            <xs:pattern value="[0-9]{0,40}"/>
        </xs:restriction>
    </xs:simpleType>

    <!-- START GENERIC ITEM TYPES -->
    <xs:element name="ItemDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ItemType"/>
    <xs:complexType name="ItemType">
        <xs:sequence>
            <xs:element name="metadata" type="tns:MetadataType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="thumbnails" type="tns:URIListType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="posters" type="tns:URIListType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="files" type="tns:URIListType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="terse" type="tns:GenericType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="shape" type="tns:ShapeType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="merged-access" type="tns:AccessControlMergedType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="access" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="type" type="xs:string" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="permission" type="xs:string" minOccurs="1" maxOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="timespan" maxOccurs="unbounded" minOccurs="0">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="field" minOccurs="0" maxOccurs="unbounded">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/>
                                    <xs:element name="value" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                    </xs:sequence>
                    <xs:attribute name="start" type="xs:string" use="required"/>
                    <xs:attribute name="end" type="xs:string" use="required"/>
                </xs:complexType>
            </xs:element>
            <xs:element name="externalId" type="tns:ExternalIdentifierType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="id" type="tns:SiteIdType" use="optional"/>
        <xs:attribute name="start" type="xs:string" use="optional"/>
        <xs:attribute name="end" type="xs:string" use="optional"/>
        <xs:attribute name="base" type="xs:string" use="optional"/>
    </xs:complexType>

    <!--<xs:element name="TerseDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:GenericType"/>
    <xs:complexType name="TestType">
        <xs:sequence>
            <xs:element name="terse" type="vididyn:TerseType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>-->
    <xs:element name="TerseMetadataDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:GenericType"/>
    <xs:element name="TerseMetadataListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:TerseMetadataListType"/>
    <xs:complexType name="TerseMetadataListType">
        <xs:sequence>
            <xs:element name="item" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:complexContent>
                        <xs:extension base="tns:GenericType">
                            <xs:attribute name="id" type="tns:SiteIdType" use="required"/>
                        </xs:extension>
                    </xs:complexContent>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="GenericType">
        <xs:sequence>
            <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
        </xs:sequence>
    </xs:complexType>

    <!-- END GENERIC ITEM TYPES -->

<!-- START ACCESS CONTROL TYPES -->
    <xs:element name="AccessControlListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:AccessControlListType"/>
    <xs:complexType name="AccessControlListType">
        <xs:sequence>
            <xs:element name="access" type="tns:AccessControlType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="AppliesToType">
        <xs:simpleContent>
            <xs:restriction base="tns:AppliesToValueType">
                <xs:enumeration value="all"/>
                <xs:enumeration value="self"/>
                <xs:enumeration value="collection"/>
                <xs:enumeration value="library"/>
                <xs:enumeration value="item"/>
            </xs:restriction>
        </xs:simpleContent>
    </xs:complexType>

    <xs:complexType name="AppliesToValueType">
        <xs:simpleContent>
            <xs:extension base="xs:string">
                <xs:attribute name="recursive" type="xs:boolean"/>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>
    <xs:element name="AccessControlDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:AccessControlType"/>
    <xs:complexType name="AccessControlType">
        <xs:sequence>
            <xs:element name="loc" type="xs:anyURI" minOccurs="0" />
            <xs:element name="grantor" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="recursive" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="appliesTo" type="tns:AppliesToType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="permission" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="priority" type="xs:int" minOccurs="0" maxOccurs="1"/>
            <xs:element name="operation" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                    <xs:choice>
                        <xs:element name="metadata" type="tns:AccessControlMetadataType" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="shape" type="tns:AccessControlShapeType" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="uri" type="tns:AccessControlUriType" minOccurs="1" maxOccurs="1"/>
                    </xs:choice>
                </xs:complexType>
            </xs:element>
            <xs:choice>
                <xs:element name="group" type="xs:string" minOccurs="1" maxOccurs="1"/>
                <xs:element name="groupType" type="tns:GroupType" minOccurs="1" maxOccurs="1"/>
                <xs:element name="user" type="xs:string" minOccurs="1" maxOccurs="1"/>
                <xs:element name="userType" type="tns:UserType" minOccurs="1" maxOccurs="1"/>
            </xs:choice>
        </xs:sequence>
        <xs:attribute name="id" type="tns:SiteIdType"/>
    </xs:complexType>

    <xs:complexType name="AccessControlUriType">
        <xs:sequence>
            <xs:element name="type" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="AccessControlShapeType">
        <xs:sequence>
            <xs:element name="tag" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="AccessControlMetadataType">
        <xs:sequence>
            <xs:element name="field" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <!-- END ACCESS CONTROL TYPES -->
    <xs:element name="TaskDefinitionListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:TaskDefinitionListType"/>
    <xs:complexType name="TaskDefinitionListType">
        <xs:sequence>
            <xs:element name="task" type="tns:TaskDefinitionType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="metadata" type="tns:SimpleMetadataType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="TaskDefinitionDependency">
        <xs:sequence>
            <xs:element name="step" type="xs:integer" minOccurs="0" maxOccurs="1"/>
            <xs:element name="previous" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="allPrevious" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>


    <xs:element name="TaskDefinitionDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:TaskDefinitionType"/>
    <xs:complexType name="TaskDefinitionType">
        <xs:sequence>
            <!-- Optional -->
            <xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="extradata" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="flags" type="xs:integer" minOccurs="0" maxOccurs="1"/>

            <!-- Required -->
            <xs:choice>
                <xs:sequence>
                    <xs:element name="bean" type="xs:string" minOccurs="1" maxOccurs="1"/> <!-- required if not a script step -->
                    <xs:element name="method" type="xs:string" minOccurs="1" maxOccurs="1"/> <!-- required if not a script step -->
                    <xs:element name="plugin" type="xs:boolean" minOccurs="0" maxOccurs="1"/> <!-- default false -->
                </xs:sequence>
                <xs:element name="script" type="xs:string" minOccurs="1" maxOccurs="1"/>
                <xs:element name="metadata" type="tns:SimpleMetadataType" minOccurs="0" maxOccurs="1"/>
            </xs:choice>
            <xs:element name="step" type="xs:integer" minOccurs="0" maxOccurs="1"/>
            <xs:element name="dependency" type="tns:TaskDefinitionDependency" minOccurs="0" maxOccurs="1"/>
            <xs:element name="parallelDependency" type="tns:TaskDefinitionDependency" minOccurs="0" maxOccurs="1"/>
            <xs:element name="jobType" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="cleanup" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="critical" type="xs:boolean" minOccurs="0" maxOccurs="1"/><!-- default critical -->
        </xs:sequence>
        <xs:attribute name="id" type="xs:integer" use="optional"/>

    </xs:complexType>



    <!-- START NOTIFICATION TYPES -->
    <xs:element name="NotificationDocument" type="tns:NotificationType" xmlns:tns="http://xml.vidispine.com/schema/vidispine"/>
    <xs:complexType name="NotificationType">
        <xs:sequence>
            <xs:element name="action" minOccurs="1" maxOccurs="1">
                <xs:complexType>
                    <xs:choice>
                        <xs:element name="http" type="tns:NotificationHttpActionType"/>
                        <xs:element name="ejb" type="tns:NotificationEjbActionType"/>
                        <xs:element name="jms" type="tns:NotificationJmsActionType"/>
                        <xs:element name="javascript" type="tns:NotificationJavaScriptActionType"/>
                        <xs:element name="sqs" type="tns:NotificationSQSActionType"/>
                        <xs:element name="sns" type="tns:NotificationSNSActionType"/>
                    </xs:choice>
                </xs:complexType>
            </xs:element>
            <xs:element name="trigger" minOccurs="1" maxOccurs="1">
                <xs:complexType>
                    <xs:choice>
                        <xs:element name="job" type="tns:NotificationJobTriggerType"/>
                        <xs:element name="metadata" type="tns:NotificationMetadataTriggerType"/>
                        <xs:element name="item" type="tns:NotificationItemTriggerType"/>
                        <xs:element name="collection" type="tns:NotificationCollectionTriggerType"/>
                        <xs:element name="storage" type="tns:NotificationStorageTriggerType"/>
                        <xs:element name="file" type="tns:NotificationFileTriggerType"/>
			<xs:element name="group" type="tns:NotificationGroupTriggerType"/>
			<xs:element name="access" type="tns:NotificationAccessTriggerType"/>
			<xs:element name="shape" type="tns:NotificationShapeTriggerType"/>
                        <xs:element name="quota" type="tns:NotificationQuotaTriggerType"/>
                        <xs:element name="document" type="tns:NotificationDocumentTriggerType"/>
                        <xs:element name="deletionLock" type="tns:NotificationDeletionLockTriggerType"/>
                    </xs:choice>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <!-- START NOTIFICATION ACTION TYPES -->
    <xs:complexType name="NotificationActionType">
        <xs:sequence>
            <xs:element name="extradata" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="retry" type="xs:integer"  minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
        <xs:attribute name="synchronous" type="xs:boolean" use="required"/>
        <xs:attribute name="group" type="xs:string" use="optional"/>
    </xs:complexType>
    <xs:complexType name="NotificationHttpActionType">
        <xs:complexContent>
            <xs:extension base="tns:NotificationActionType">
                <xs:sequence>
                    <xs:element name="contentType" type="xs:string" minOccurs="0" maxOccurs="1"/> <!-- application/xml, application/json, text/plain -->
                    <xs:element name="url" type="xs:string" maxOccurs="1" minOccurs="1"/>
                    <xs:element name="method" type="xs:string" maxOccurs="1" minOccurs="0"/> <!-- defaults to GET -->
                    <xs:element name="timeout" type="xs:string" maxOccurs="1" minOccurs="1"/> <!-- either seconds or "none" -->
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="NotificationJmsActionType">
        <xs:complexContent>
            <xs:extension base="tns:NotificationActionType">
                <xs:sequence>
                    <xs:element name="contentType" type="xs:string" minOccurs="0" maxOccurs="1"/> <!-- application/xml, application/x-java-serialized-object (default) -->
                    <xs:element name="queueFactory" type="xs:string" maxOccurs="1" minOccurs="1"/>
                    <xs:element name="queue" type="xs:string" maxOccurs="1" minOccurs="1"/>
                    <xs:element name="username" type="xs:string" maxOccurs="1" minOccurs="0"/>
                    <xs:element name="password" type="xs:string" maxOccurs="1" minOccurs="0"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="NotificationEjbActionType">
        <xs:complexContent>
            <xs:extension base="tns:NotificationActionType">
                <xs:sequence>
                    <xs:element name="bean" type="xs:string" maxOccurs="1" minOccurs="1"/>
                    <xs:element name="method" type="xs:string" maxOccurs="1" minOccurs="1"/>
                    <xs:element name="data" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="NotificationJavaScriptActionType">
        <xs:complexContent>
            <xs:extension base="tns:NotificationActionType">
                <xs:sequence>
                    <xs:element name="script" type="xs:string" maxOccurs="1" minOccurs="1"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="NotificationSQSActionType">
        <xs:complexContent>
            <xs:extension base="tns:NotificationActionType">
                <xs:sequence>
                    <xs:element name="contentType" type="xs:string" minOccurs="0" maxOccurs="1"/>
                    <xs:element name="endpoint" type="xs:string" maxOccurs="1" minOccurs="1"/>
                    <xs:element name="queue" type="xs:string" maxOccurs="1" minOccurs="1"/>
                    <xs:element name="secret" type="xs:string" maxOccurs="1" minOccurs="0"/>
                    <xs:element name="accessKey" type="xs:string" maxOccurs="1" minOccurs="0"/>
                    <xs:element name="roleArn" type="xs:string" maxOccurs="1" minOccurs="0"/>
                    <xs:element name="roleExternalId" type="xs:string" maxOccurs="1" minOccurs="0"/>
                    <xs:element name="roleSessionName" type="xs:string" maxOccurs="1" minOccurs="0"/>
		    <xs:element name = "messageGroupId" type="xs:string" maxOccurs="1" minOccurs="0"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="NotificationSNSActionType">
        <xs:complexContent>
            <xs:extension base="tns:NotificationActionType">
                <xs:sequence>
                    <xs:element name="contentType" type="xs:string" minOccurs="0" maxOccurs="1"/>
                    <xs:element name="endpoint" type="xs:string" maxOccurs="1" minOccurs="1"/>
                    <xs:element name="topic" type="xs:string" maxOccurs="1" minOccurs="1"/>
                    <xs:element name="secret" type="xs:string" maxOccurs="1" minOccurs="0"/>
                    <xs:element name="accessKey" type="xs:string" maxOccurs="1" minOccurs="0"/>
                    <xs:element name="roleArn" type="xs:string" maxOccurs="1" minOccurs="0"/>
                    <xs:element name="roleExternalId" type="xs:string" maxOccurs="1" minOccurs="0"/>
                    <xs:element name="roleSessionName" type="xs:string" maxOccurs="1" minOccurs="0"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- END NOTIFICATION ACTION TYPES -->

    <!-- START NOTIFICATION TRIGGER TYPES -->
    <xs:element name="NotificationTriggerDocument" type="tns:NotificationTriggerType" xmlns:tns="http://xml.vidispine.com/schema/vidispine"/>

    <xs:complexType name="NotificationTriggerType">
        <xs:sequence>
            <xs:element name="type" type="xs:string" minOccurs="0" maxOccurs="1"/> <!-- type, e.g. job -->
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="NotificationJobTriggerType">
        <xs:complexContent>
            <xs:extension base="tns:NotificationTriggerType">
                <xs:sequence>
                    <xs:choice>
                        <xs:element name="update" type="xs:string"/>
                        <xs:element name="stop" type="xs:string"/>
                        <xs:element name="finished" type="xs:string"/>
                        <xs:element name="fail" type="xs:string"/>
                        <xs:element name="create" type="xs:string"/>
                    </xs:choice>
                    <xs:element type="xs:boolean" name="placeholder" minOccurs="0" maxOccurs="1"/>

                    <xs:element name="contentFilters" minOccurs="0">
                        <xs:complexType>
                            <xs:sequence>
                                <xs:element name="contentFilter" minOccurs="0" maxOccurs="unbounded" type="tns:jobNotificationContentFilter"/>
                            </xs:sequence>
                        </xs:complexType>
                    </xs:element>

                    <xs:element name="filter" minOccurs="0">
                        <xs:complexType>
                            <xs:sequence>
                                <xs:element name="type" type="xs:string" minOccurs="0" maxOccurs="1"/>
                                <xs:element name="step" type="xs:int" minOccurs="0" maxOccurs="1"/>
                                <xs:element name="jobdata" minOccurs="0" maxOccurs="1">
                                    <xs:complexType>
                                        <xs:sequence>
                                            <xs:choice>
                                                <xs:element name="key" type="xs:string" />
                                                <xs:element name="key-regex" type="xs:string" />
                                            </xs:choice>
                                            <xs:choice>
                                                <xs:element name="value" type="xs:string" />
                                                <xs:element name="value-regex" type="xs:string" />
                                            </xs:choice>
                                        </xs:sequence>
                                    </xs:complexType>
                                </xs:element>
                            </xs:sequence>
                        </xs:complexType>
                    </xs:element>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:simpleType name="jobNotificationContentFilter">
        <xs:restriction base="xs:string">
            <xs:enumeration value="jobId"/>
            <xs:enumeration value="jobState"/>
            <xs:enumeration value="user"/>
            <xs:enumeration value="startTime"/>
            <xs:enumeration value="jobType"/>
            <xs:enumeration value="jobData"/>
            <xs:enumeration value="errorMessage"/>
            <xs:enumeration value="itemId"/>
            <xs:enumeration value="totalSteps"/>
            <xs:enumeration value="currentStep"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="NotificationMetadataTriggerType">
        <xs:complexContent>
            <xs:extension base="tns:NotificationTriggerType">
                <xs:choice>
                    <xs:element name="modify">
                        <xs:complexType>
                            <xs:sequence>
                                <!-- Unset elements mean "all" -->
                                <xs:element name="field" type="xs:string" minOccurs="0" maxOccurs="1"/>
                                <xs:element name="track" type="xs:string" minOccurs="0" maxOccurs="1"/>
                                <xs:element name="language" type="xs:string" minOccurs="0" maxOccurs="1"/>
                                <xs:element name="interval" type="xs:string" minOccurs="0" maxOccurs="1"/>
                            </xs:sequence>
                        </xs:complexType>
                    </xs:element>
                </xs:choice>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="NotificationItemTriggerType">
        <xs:complexContent>
            <xs:extension base="tns:NotificationTriggerType">
                <xs:choice>
                    <xs:element name="modify" type="xs:string"/>
                    <xs:element name="delete" type="xs:string"/>
                    <xs:element name="create" type="xs:string"/>
                </xs:choice>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="NotificationCollectionTriggerType">
        <xs:complexContent>
            <xs:extension base="tns:NotificationTriggerType">
                <xs:choice>
                    <xs:element name="create" type="xs:string"/>
                    <xs:element name="delete" type="xs:string"/>
                    <xs:element name="modify" type="xs:string"/>
                    <xs:element name="item" type="tns:NotificationItemTriggerType"/>
                    <xs:element name="metadata" type="tns:NotificationMetadataTriggerType"/>
                </xs:choice>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="NotificationStorageTriggerType">
        <xs:complexContent>
            <xs:extension base="tns:NotificationTriggerType">
                <xs:choice>
                    <xs:element name="delete" type="xs:string"/>
                    <xs:element name="create" type="xs:string"/>
                    <xs:element name="filename" type="xs:string"/>
                </xs:choice>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="NotificationFileTriggerType">
        <xs:complexContent>
            <xs:extension base="tns:NotificationTriggerType">
                <xs:sequence>
                    <xs:element name="storage" type="tns:SiteIdType" minOccurs="0" />
                    <xs:choice>
                        <xs:element name="new" type="xs:string" />
                        <xs:element name="delete" type="xs:string"/>
                        <xs:element name="change" type="xs:string"/>
                        <xs:element name="hash" type="xs:string"/>
                        <xs:element name="close" type="xs:string"/>
                        <xs:element name="lost" type="xs:string"/>
                    </xs:choice>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="NotificationGroupTriggerType">
        <xs:complexContent>
            <xs:extension base="tns:NotificationTriggerType">
                <xs:choice>
                    <xs:element name="modify" type="xs:string" />
                    <xs:element name="create" type="xs:string"/>
                    <xs:element name="delete" type="xs:string"/>
                </xs:choice>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="NotificationAccessTriggerType">
	<xs:complexContent>
	    <xs:extension base="tns:NotificationTriggerType">
		<xs:choice>
		    <xs:element name="create" type="xs:string"/>
		    <xs:element name="delete" type="xs:string"/>
		    <xs:element name="change" type="xs:string"/>
		</xs:choice>
	    </xs:extension>
	</xs:complexContent>
    </xs:complexType>

    <xs:complexType name="NotificationShapeTriggerType">
	<xs:complexContent>
	    <xs:extension base="tns:NotificationTriggerType">
		<xs:choice>
		    <xs:element name="modify" type="xs:string"/>
		    <xs:element name="create" type="xs:string"/>
		    <xs:element name="delete" type="xs:string"/>
		</xs:choice>
	   </xs:extension>
	</xs:complexContent>
    </xs:complexType>

    <xs:complexType name="NotificationQuotaTriggerType">
        <xs:complexContent>
            <xs:extension base="tns:NotificationTriggerType">
                <xs:choice>
                    <xs:element name="create" type="xs:string"/>
                    <xs:element name="delete" type="xs:string"/>
                    <xs:element name="warning" type="xs:string"/>
                </xs:choice>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="NotificationDocumentTriggerType">
        <xs:complexContent>
            <xs:extension base="tns:NotificationMetadataTriggerType">
                <xs:choice>
                    <xs:element name="create" type="xs:string"/>
                    <xs:element name="delete" type="xs:string"/>
                </xs:choice>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="NotificationDeletionLockTriggerType">
        <xs:complexContent>
            <xs:extension base="tns:NotificationTriggerType">
                <xs:choice>
                    <xs:element name="create" type="xs:string"/>
                    <xs:element name="delete" type="xs:string"/>
                    <xs:element name="modify" type="xs:string"/>
                    <xs:element name="effective" type="xs:string"/>
                    <xs:element name="expire" type="xs:string"/>
                </xs:choice>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- END NOTIFICATION TRIGGER TYPES -->

<!-- END NOTIFICATION TYPES -->
    <xs:element name ="SupportedProtocolsDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:SupportedProtocolsType" />
    <xs:complexType name="SupportedProtocolsType">
        <xs:sequence>
            <xs:element name="source" minOccurs="1" maxOccurs="1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="protocol" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="output" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="protocol" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                    <xs:attribute name="shape" type="tns:SiteIdType" use="required"/>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ItemRelationDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ItemRelationType" />
    <xs:complexType name="ItemRelationType">
        <xs:sequence>
            <xs:element name="id" maxOccurs="1" minOccurs="1" type="xs:string" />
            <xs:element name="direction" maxOccurs="1" minOccurs="1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="source" type="xs:string" maxOccurs="1" minOccurs="1"/>
                        <xs:element name="target" type="xs:string" maxOccurs="1" minOccurs="1"/>
                    </xs:sequence>
                    <xs:attribute name="type" type="xs:string" use="required"/>
                </xs:complexType>
            </xs:element>
            <xs:element name="value" maxOccurs="unbounded" minOccurs="0">
                <xs:complexType>
                    <xs:simpleContent>
                        <xs:extension base="xs:string">
                            <xs:attribute name="key" type="xs:string" use="required"/>
                        </xs:extension>
                    </xs:simpleContent>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:simpleType name="SortingOrderType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="ascending"/>
            <xs:enumeration value="descending"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:element name="ItemRelationListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ItemRelationListType" />
    <xs:complexType name="ItemRelationListType">
        <xs:sequence>
            <xs:element name="relation" maxOccurs="unbounded" minOccurs="0" type="tns:ItemRelationType" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ItemSearchValueType">
        <xs:simpleContent>
            <xs:extension base="xs:string">
                <xs:attribute name="minimum" type="xs:boolean" use="optional"/>
                <xs:attribute name="maximum" type="xs:boolean" use="optional"/>
                <xs:attribute name="noescape" type="xs:boolean" use="optional"/>
                <xs:attribute name="boost" type="xs:float" use="optional"/>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>


    <xs:complexType name="SearchOperatorType">
        <xs:sequence>
            <xs:element name="text" type="tns:ItemSearchTextValueType" maxOccurs="unbounded" minOccurs="0"/>
            <xs:element name="operator" minOccurs="0" maxOccurs="unbounded" type="tns:SearchOperatorType"/>
            <xs:element name="field" minOccurs="0" maxOccurs="unbounded" type="tns:SearchFieldType"/>
            <xs:element name="group" minOccurs="0" maxOccurs="unbounded" type="tns:SearchGroupType"/>
            <xs:element name="reference" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="item" type="tns:ItemCriterionType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="shape" type="tns:ShapeCriterionType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="file" type="tns:CriterionType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="collection" type="tns:CollectionCriterionType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="operation" type="tns:SearchOperationType" use="required"/>
    </xs:complexType>

    <xs:simpleType name="SearchOperationType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="AND"/>
            <xs:enumeration value="OR"/>
            <xs:enumeration value="NOT"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="SearchFieldType">
        <xs:sequence>
            <xs:element name="name" type="xs:string" maxOccurs="1" minOccurs="1" />
            <xs:element name="value" type="tns:ItemSearchValueType" maxOccurs="unbounded" minOccurs="0" />
            <xs:element name="range" maxOccurs="unbounded" minOccurs="0">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="value" type="tns:ItemSearchValueType" maxOccurs="2" minOccurs="2" />
                    </xs:sequence>
                    <xs:attribute name="exclusiveMinimum" type="xs:boolean" use="optional"/>
                    <xs:attribute name="exclusiveMaximum" type="xs:boolean" use="optional"/>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
        <xs:attribute name="target" type="tns:SearchTargetType"/>
    </xs:complexType>

    <xs:simpleType name="SearchTargetType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="item"/>
            <xs:enumeration value="shape"/>
            <xs:enumeration value="file"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:element name="MetadataFieldGroupSearchDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ItemSearchType"/>

    <xs:complexType name="SearchGroupType">
        <xs:sequence>
            <xs:element name="name" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <!--<xs:element name="referenced" type="tns:MetadataReferencedType" minOccurs="0" maxOccurs="1"/>-->
            <xs:element name="operator" type="tns:SearchOperatorType" minOccurs="0" maxOccurs="1"/>
            <xs:choice>
                <xs:sequence>
                    <xs:element name="field" type="tns:SearchFieldType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="group" type="tns:SearchGroupType" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
                <xs:sequence>
                    <xs:element name="reference" type="xs:string" minOccurs="0" maxOccurs="1"/>
                </xs:sequence>
            </xs:choice>
        </xs:sequence>
    </xs:complexType>

    <xs:simpleType name="SearchIntervalsType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="all"/>
            <xs:enumeration value="generic"/>
            <xs:enumeration value="timed"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:element name="AutocompleteResponseDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:AutocompleteResponseType"/>
    <xs:complexType name="AutocompleteResponseType">
	<xs:sequence>
            <xs:element name="field" minOccurs="0" maxOccurs="1" type="xs:string"/>
	    <xs:element name="suggestion" minOccurs="0" maxOccurs="unbounded" type="xs:string"/>
	</xs:sequence>
    </xs:complexType>
    <xs:element name="AutocompleteRequestDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:AutocompleteRequestType"/>
    <xs:complexType name="AutocompleteRequestType">
	<xs:sequence>
	    <xs:element name="text" minOccurs="1" maxOccurs="1" type="xs:string"/>
        <xs:element name="field" minOccurs="0" maxOccurs="1" type="xs:string"/>
	    <xs:element name="maximumSuggestions" minOccurs="0" maxOccurs="1" type="xs:int"/>
	</xs:sequence>
    </xs:complexType>

    <xs:complexType name="SuggestionSearchType">
	<xs:sequence>
	    <xs:element name="maximumSuggestions" type="xs:int" minOccurs="0" maxOccurs="1"/>
	    <xs:element name="accuracy" type="xs:double" minOccurs="0" maxOccurs="1"/>
	</xs:sequence>
    </xs:complexType>

    <xs:complexType name="SuggestionResultType">
	<xs:sequence>
	    <xs:element name="term" minOccurs="1" maxOccurs="1" type="xs:string"/>
	    <xs:element name="suggestion" minOccurs="0" maxOccurs="unbounded" type="xs:string"/>
	</xs:sequence>
    </xs:complexType>
    <xs:element name="GroupSearchDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:SimpleSearchType" />
    <xs:element name="UserSearchDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:SimpleSearchType" />
    <xs:complexType name="SimpleSearchType">
        <xs:sequence>
            <xs:element name="sort" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="field" minOccurs="1" maxOccurs="1" type="xs:string"/>
                        <xs:element name="order" minOccurs="1" maxOccurs="1" type="tns:SortingOrderType"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="field" type="tns:SimpleSearchFieldType" maxOccurs="unbounded" minOccurs="0"/>
            <xs:element name="operator" type="tns:SimpleSearchOperatorType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="SimpleSearchOperatorType">
        <xs:sequence>
<!--            <xs:element name="operator" minOccurs="0" maxOccurs="unbounded" type="tns:SimpleSearchOperatorType"/>-->
            <xs:element name="field" minOccurs="0" maxOccurs="unbounded" type="tns:SimpleSearchFieldType"/>
        </xs:sequence>
        <xs:attribute name="operation" type="tns:SimpleSearchOperationType" use="required"/>
    </xs:complexType>

    <xs:complexType name="SimpleSearchFieldType">
        <xs:sequence>
            <xs:element name="name" type="xs:string" maxOccurs="1" minOccurs="1" />
            <xs:element name="value" type="xs:string" maxOccurs="1" minOccurs="1" />
        </xs:sequence>
    </xs:complexType>

    <xs:simpleType name="SimpleSearchOperationType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="AND"/>
            <xs:enumeration value="OR"/>
            <xs:enumeration value="NOT"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:element name="ShapeSearchDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ShapeSearchType" />
    <xs:complexType name="ShapeSearchType">
      <xs:complexContent>
        <xs:extension base="tns:ItemSearchType">
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
    <xs:element name="FileSearchDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:FileSearchType" />
    <xs:complexType name="FileSearchType">
      <xs:complexContent>
        <xs:extension base="tns:ItemSearchType">
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="ItemSearchTextValueType">
        <xs:simpleContent>
            <xs:extension base="xs:string">
                <xs:attribute name="noescape" type="xs:boolean" use="optional"/>
                <xs:attribute name="boost" type="xs:float" use="optional"/>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>

    <xs:complexType name="SearchFilterType">
      <xs:sequence>
        <xs:element name="operator" minOccurs="0" maxOccurs="unbounded" type="tns:SearchOperatorType"/>
        <xs:element name="field" minOccurs="0" maxOccurs="unbounded" type="tns:SearchFieldType"/>
        <xs:element name="group" minOccurs="0" maxOccurs="unbounded" type="tns:SearchGroupType"/>
        <xs:element name="reference" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element name="item" type="tns:ItemCriterionType" minOccurs="0" maxOccurs="1"/>
        <xs:element name="shape" type="tns:ShapeCriterionType" minOccurs="0" maxOccurs="1"/>
        <xs:element name="file" type="tns:CriterionType" minOccurs="0" maxOccurs="1"/>
      </xs:sequence>
      <xs:attribute name="operation" type="tns:SearchOperationType" default="AND"/>
      <xs:attribute name="name" type="xs:string"/>
    </xs:complexType>
    <xs:element name="ItemSearchDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ItemSearchType" />
    <xs:complexType name="ItemSearchType">
        <xs:sequence>
            <xs:element name="text" type="tns:ItemSearchTextValueType" maxOccurs="unbounded" minOccurs="0"/>
            <xs:element name="field" type="tns:SearchFieldType" maxOccurs="unbounded" minOccurs="0"/>
            <xs:element name="group" type="tns:SearchGroupType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="intervals" type="tns:SearchIntervalsType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="reference" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
    	    <xs:element name="operator" type="tns:SearchOperatorType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="filter" type="tns:SearchFilterType" minOccurs="0" maxOccurs="unbounded"/>

            <xs:element name="collection" type="tns:CollectionCriterionType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="item" type="tns:ItemCriterionType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="shape" type="tns:ShapeCriterionType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="file" type="tns:CriterionType" minOccurs="0" maxOccurs="1"/>

            <xs:element name="facetFilter" minOccurs="0" maxOccurs="unbounded">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="field" minOccurs="1" maxOccurs="1" type="xs:string" />
                <xs:choice>
                  <xs:element name="range" minOccurs="1" maxOccurs="1" type="tns:FacetRangeType" />
                  <xs:element name="value" minOccurs="1" maxOccurs="1" type="xs:string" />
                </xs:choice>
              </xs:sequence>
            </xs:complexType>
            </xs:element>
              <xs:element name="facet" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="field" minOccurs="1" maxOccurs="1" type="xs:string" />
                    <xs:element name="range" minOccurs="0" maxOccurs="unbounded" type="tns:FacetRangeType" />
                    <xs:element name="exclude" minOccurs="0" maxOccurs="unbounded" type="xs:string" />
                  </xs:sequence>
                  <xs:attribute name="count" default="false" type="xs:boolean" />
                  <xs:attribute name="minCount" type="xs:integer" />
                  <xs:attribute name="maxResults" type="xs:integer" />
                  <xs:attribute name="name" type="xs:string" />
                </xs:complexType>
              </xs:element>
              <xs:element name="sort" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="field" minOccurs="1" maxOccurs="1" type="xs:string" />
                    <xs:element name="order" minOccurs="1" maxOccurs="1" type="tns:SortingOrderType" />
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="highlight" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="field" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
                    <xs:element name="matchingOnly" type="xs:boolean" minOccurs="0" maxOccurs="1" />
                    <xs:element name="prefix" type="xs:string" minOccurs="0" maxOccurs="1" />
                    <xs:element name="suffix" type="xs:string" minOccurs="0" maxOccurs="1" />
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="suggestion" minOccurs="0" maxOccurs="1" type="tns:SuggestionSearchType"/>
              <xs:element name="autocomplete" minOccurs="0" maxOccurs="unbounded" type="tns:AutocompleteRequestType"/>
              <xs:element name="cursor" type="xs:string" maxOccurs="1" minOccurs="0"></xs:element>
	  </xs:sequence>
          <xs:attribute name="version" type="xs:int" use="optional"/>
    </xs:complexType>

    <xs:complexType name="CriterionType">
      <xs:sequence>
        <xs:element name="field" type="tns:SearchFieldType" maxOccurs="unbounded" minOccurs="0"/>
        <xs:element name="group" type="tns:SearchGroupType" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element name="operator" type="tns:SearchOperatorType" minOccurs="0" maxOccurs="1"/>
      </xs:sequence>
    </xs:complexType>

    <xs:complexType name="CollectionCriterionType">
      <xs:complexContent>
        <xs:extension base="tns:CriterionType">
          <xs:sequence>
            <xs:element name="collection" type="tns:CollectionCriterionType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="item" type="tns:ItemCriterionType" minOccurs="0" maxOccurs="1"/>
          </xs:sequence>
          <xs:attribute name="relation" type="tns:RelationType" use="optional"/>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="ItemCriterionType">
      <xs:complexContent>
        <xs:extension base="tns:CriterionType">
          <xs:sequence>
            <xs:element name="shape" type="tns:ShapeCriterionType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="file" type="tns:CriterionType" minOccurs="0" maxOccurs="1"/>
          </xs:sequence>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="ShapeCriterionType">
      <xs:complexContent>
        <xs:extension base="tns:CriterionType">
          <xs:sequence>
            <xs:element name="file" type="tns:CriterionType" minOccurs="0" maxOccurs="1"/>
          </xs:sequence>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>

    <xs:simpleType name="RelationType">
      <xs:restriction base="xs:string">
        <xs:enumeration value="child"/>
        <xs:enumeration value="parent"/>
        <xs:enumeration value="descendant"/>
        <xs:enumeration value="ancestor"/>
      </xs:restriction>
    </xs:simpleType>
    <xs:element name="ItemListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ItemListType" />
    <xs:complexType name="ItemListType">
        <xs:sequence>
            <xs:element name="hits" type="xs:integer" minOccurs="0" maxOccurs="1"/>
            <xs:element name="library" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="item" minOccurs="0" maxOccurs="unbounded" type="tns:ItemType"/>
	    <xs:element name="facet" minOccurs="0" maxOccurs="unbounded" type="tns:FacetType"/>
	    <xs:element name="suggestion" minOccurs="0" maxOccurs="unbounded" type="tns:SuggestionResultType"/>
            <xs:element name="autocomplete" minOccurs="0" maxOccurs="unbounded" type="tns:AutocompleteResponseType"/>
            <xs:element name="nextCursor" type="xs:string" maxOccurs="1" minOccurs="0"></xs:element>
        </xs:sequence>
    </xs:complexType>

   	<xs:element name="ShapeListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ShapeListType" />
	<xs:complexType name="ShapeListType">
        <xs:sequence>
            <xs:element name="hits" type="xs:integer" minOccurs="0" maxOccurs="1"/>
            <xs:element name="shape" minOccurs="0" maxOccurs="unbounded" type="tns:ShapeType"/>
	    	<xs:element name="facet" minOccurs="0" maxOccurs="unbounded" type="tns:FacetType"/>
	    	<xs:element name="suggestion" minOccurs="0" maxOccurs="unbounded" type="tns:SuggestionResultType"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="FacetType">
        <xs:sequence>
            <xs:element name="field" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="count" minOccurs="0" maxOccurs="unbounded" type="tns:FacetCountType"/>
            <xs:element name="range" minOccurs="0" maxOccurs="unbounded" type="tns:FacetRangeType"/>
        </xs:sequence>
        <xs:attribute name="name" type="xs:string" />
    </xs:complexType>

    <xs:complexType name="FacetCountType">
        <xs:simpleContent>
            <xs:extension base="xs:long">
                <xs:attribute name="fieldValue" type="xs:string" use="required"/>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>

    <xs:complexType name="FacetRangeType">
        <xs:simpleContent>
            <xs:extension base="tns:IntegerOrEmpty">
                <xs:attribute name="start" type="xs:string" use="required"/>
                <xs:attribute name="end" type="xs:string" use="required"/>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>
    <xs:element name="MetadataChangeSetDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:MetadataChangeSetType" />


    <xs:complexType name="MetadataChangeSetType">
        <xs:sequence>
            <xs:element name="changeSet" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="id" type="tns:SiteIdType" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="metadata" type="tns:MetadataType" minOccurs="1" maxOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="JobListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:JobListType" />
    <xs:complexType name="JobListType">
        <xs:sequence>
            <xs:element name="hits" type="xs:integer" minOccurs="0" maxOccurs="1"/>
            <xs:element name="job" type="tns:JobType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="facet" type="tns:FacetType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="notFound" type="tns:NotFoundExceptionType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="JobDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:JobType" />
    <xs:complexType name="JobType">
        <xs:sequence>
            <xs:element name="jobId" type="tns:SiteIdType" minOccurs="1" maxOccurs="1"/>
            <xs:element name="user" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="started" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
            <xs:element name="finished" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
            <xs:element name="status" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="type" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="subJob" type="tns:JobType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="priority" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="waiting" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="resourceId" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="resourceType" type="xs:string" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="requirement" type="xs:string" minOccurs="0" maxOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="currentStep" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="description" type="xs:string" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="number" type="xs:int" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="status" type="xs:string" minOccurs="1" maxOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="data" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="key" type="xs:string" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="value" type="xs:string" minOccurs="1" maxOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="totalSteps" type="xs:int" minOccurs="0" maxOccurs="1"/>
            <xs:element name="log" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="task" type="tns:JobTaskType" minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="JobTaskType">
        <xs:sequence>
            <xs:element name="step" type="xs:int" minOccurs="1" maxOccurs="1"/>
            <xs:element name="attempts" type="xs:int" minOccurs="1" maxOccurs="1"/>
            <xs:element name="status" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="timestamp" type="xs:dateTime" minOccurs="1" maxOccurs="1"/>
            <xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="progress" type="tns:JobTaskProgressType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="subStep" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="timestamp" type="xs:dateTime" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="description" type="xs:string" minOccurs="1" maxOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="errorMessage" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="totalSubTasks" type="xs:int" minOccurs="0" maxOccurs="1"/>
            <xs:element name="subTask" type="tns:JobTaskType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="id" type="xs:int" use="optional"/>
    </xs:complexType>

    <xs:complexType name="JobTaskProgressType">
        <xs:simpleContent>
            <xs:extension base="xs:decimal">
                <xs:attribute name="total" type="xs:long" use="optional"/>
                <xs:attribute name="unit" type="tns:JobTaskProgressType_unit" use="optional"/>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>

    <xs:simpleType name="JobTaskProgressType_unit">
        <xs:restriction base="xs:string">
            <xs:enumeration value="bytes"/>
            <xs:enumeration value="percent"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:element name="JobSearchDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:JobSearchType" />
    <xs:complexType name="JobSearchType">
        <xs:sequence>
            <xs:element name="facetFilter" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="field" minOccurs="1" maxOccurs="1" type="xs:string" />
                        <xs:choice>
                            <xs:element name="range" minOccurs="1" maxOccurs="1" type="tns:FacetRangeType" />
                            <xs:element name="value" minOccurs="1" maxOccurs="1" type="xs:string" />
                        </xs:choice>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="facet" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="field" minOccurs="1" maxOccurs="1" type="xs:string" />
                        <xs:element name="exclude" minOccurs="0" maxOccurs="unbounded" type="xs:string" />
                    </xs:sequence>
                    <xs:attribute name="count" default="false" type="xs:boolean" />
                    <xs:attribute name="minCount" default="0" type="xs:integer" />
                    <xs:attribute name="maxCount" default="100" type="xs:integer" />
                    <xs:attribute name="maxResults" default="100" type="xs:integer" />
                    <xs:attribute name="name" type="xs:string" />
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="StorageMethodListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:StorageMethodListType"/>
    <xs:complexType name="StorageMethodListType">
        <xs:sequence>
            <xs:element name="method" type="tns:StorageMethodType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="StorageMethodType">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="loc"  type="xs:anyURI" minOccurs="0"/>
            <xs:element name="id" type="tns:SiteIdType" minOccurs="0"/>
            <xs:element name="uri"  type="xs:anyURI"/>
            <xs:element name="bandwidth" minOccurs="0" type="xs:long"/>
            <xs:element name="read" minOccurs="1" type="xs:boolean"/>
            <xs:element name="write" minOccurs="1" type="xs:boolean"/>
            <xs:element name="browse" minOccurs="1" type="xs:boolean"/>
            <xs:element name="lastSuccess" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
            <xs:element name="lastFailure" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
            <xs:element name="failureMessage" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="type" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="metadata" type="tns:SimpleMetadataType" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
    </xs:complexType>
    <xs:element name="StorageDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:StorageType" />
    <xs:complexType name="StorageType">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="id" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="state" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="priority" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="type" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="capacity" type="xs:long" minOccurs="0" maxOccurs="1"/>
            <xs:element name="freeCapacity" minOccurs="0" type="xs:long"/>
            <xs:element name="bandwidth" minOccurs="0" type="xs:long"/>
            <xs:element name="timestamp" minOccurs="0" type="xs:dateTime"/>
            <xs:element name="method" type="tns:StorageMethodType" maxOccurs="unbounded" minOccurs="0"/>
            <xs:element name="metadata" type="tns:SimpleMetadataType" minOccurs="0" maxOccurs="1" />
            <xs:element name="lowWatermark" type="xs:long" minOccurs="0" maxOccurs="1"/>
            <xs:element name="highWatermark" type="xs:long" minOccurs="0" maxOccurs="1"/>
            <xs:element name="lowWatermarkPercentage" type="xs:int" minOccurs="0" maxOccurs="1"/>
            <xs:element name="highWatermarkPercentage" type="xs:int" minOccurs="0" maxOccurs="1"/>
            <xs:element name="autoDetect" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="bean" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="showImportables" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="projection" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="scanInterval" type="xs:int" minOccurs="0" maxOccurs="1"/>
            <xs:element name="archiveScript" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="sequence" type="tns:StorageFileSequenceType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="sequenceTimeout" type="xs:int" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="StorageFileSequenceType">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="regex" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="numGroup" type="xs:int" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="StorageListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:StorageListType"/>
    <xs:complexType name="StorageListType">
        <xs:sequence>
            <xs:element name="hits" type="xs:integer" minOccurs="0" maxOccurs="1"/>
            <xs:element name="storage" type="tns:StorageType" maxOccurs="unbounded" minOccurs="0"></xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:simpleType name="VXAStatus">
        <xs:restriction base="xs:string">
            <xs:enumeration value="OFFLINE"/>
            <xs:enumeration value="ONLINE"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="VXAStorageType">
        <xs:sequence minOccurs="1" maxOccurs="1">
            <xs:element name="name" type="xs:string" minOccurs="1"/>
            <xs:element name="id" type="xs:string" minOccurs="1"/>
            <xs:element name="path" type="xs:string" minOccurs="1"/>
            <xs:element name="isCollectionStorage" type="xs:string" minOccurs="0"/>
            <xs:element name="createProxiesStorage" type="xs:string" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="VXAVSInstanceType">
        <xs:sequence minOccurs="1" maxOccurs="1">
            <xs:element name="vsClusterAddress" type ="xs:string" minOccurs="0" maxOccurs="1"/> <!-- from VS, status only -->
            <xs:element name="uri" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="status" type="tns:VXAStatus" minOccurs="0" maxOccurs="1"/>
            <xs:element name="lastSeen" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="VXAForwardService" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ForwardServiceType"/>
    <xs:complexType name="ForwardServiceType">
        <xs:sequence minOccurs="0" maxOccurs="1">
            <xs:element name="id" type="xs:int" minOccurs="1" maxOccurs="1"/>
            <xs:element name="uri" type="xs:string" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="VXADocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:VXAType" />
    <xs:complexType name="VXAType">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="uuid" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="user" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="allStorages" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="storage" type="tns:VXAStorageType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="file" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="name" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="instance" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="vxaVersion" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="s3CredentialType" type="tns:S3CredentialType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="transcoderVersion" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="uri" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="port" type="xs:int" minOccurs="0" maxOccurs="1"/>
            <xs:element name="status" type="tns:VXAStatus" minOccurs="0" maxOccurs="1"/>
            <xs:element name="lastSeen" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
            <xs:element name="mode" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="publicKey" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="vsClusterAddress" type ="xs:string" minOccurs="0" maxOccurs="1"/> <!-- from VS to VSA -->
            <xs:element name="vsInstance" type ="tns:VXAVSInstanceType" minOccurs="0" maxOccurs="unbounded"/> <!-- from VS, status only -->
            <xs:element name="transcoder" type="tns:TranscoderType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="agentGroup" type="xs:string" minOccurs="0" maxOccurs="1"/> <!-- Agents in the same group are assumed to be able to connect to each other -->
            <xs:element name="externalUri" type="xs:string" minOccurs="0" maxOccurs="1"/> <!-- URI where the VSA can be reached, given the agentGroup -->
            <xs:element name="forwardService" type="tns:ForwardServiceType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:simpleType name="S3CredentialType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="none"/>
            <xs:enumeration value="temporary"/>
            <xs:enumeration value="secretkey"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:element name="VXAListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:VXAListType"/>
    <xs:complexType name="VXAListType">
        <xs:sequence>
            <xs:element name="hits" type="xs:integer" minOccurs="0" maxOccurs="1"/>
            <xs:element name="vxa" type="tns:VXAType" maxOccurs="unbounded" minOccurs="0"></xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:simpleType name="OSName">
        <xs:restriction base="xs:string">
            <xs:enumeration value="DEBIAN32"/>
            <xs:enumeration value="DEBIAN64"/>
            <xs:enumeration value="REDHAT32"/>
            <xs:enumeration value="REDHAT64"/>
            <xs:enumeration value="WINDOWS32"/>
            <xs:enumeration value="WINDOWS64"/>
            <xs:enumeration value="MACOSX32"/>
            <xs:enumeration value="MACOSX64"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:element name="OtifOSDocment" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:OtifOSType"/>
    <xs:complexType name="OtifOSType">
        <xs:sequence>
            <xs:element name="name" type="tns:OSName" minOccurs="1" maxOccurs="1"/>
            <xs:element name="file" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="OtifTranscoderPluginDocment" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:OtifTranscoderPluginType"/>
    <xs:complexType name="OtifTranscoderPluginType">
        <xs:sequence>
            <xs:element name="pluginType" type="tns:OtifPluginType" minOccurs="1" maxOccurs="1"/>
            <xs:element name="os" type="tns:OtifOSType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="file" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="OtifVxaPluginDocment" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:OtifVxaPluginType"/>
    <xs:complexType name="OtifVxaPluginType">
        <xs:sequence>
            <xs:element name="file" type="xs:string" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="OtifDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:OtifType" />
    <xs:complexType name="OtifType">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <!-- UUID used in presets/analyze/complex-jobs to tell which plugin to use -->
            <xs:element name="uuid" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <!-- pluginName - human readable name of plugin -->
            <xs:element name="pluginName" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <!-- vendorName Plugin vendor name -->
            <xs:element name="vendorName" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="versionMajor" type="xs:int" minOccurs="1" maxOccurs="1"/>
            <xs:element name="versionMinor" type="xs:int" minOccurs="1" maxOccurs="1"/>
            <xs:element name="versionPatch" type="xs:int" minOccurs="1" maxOccurs="1"/>
            <!-- Optional transcoderPlugin, at least one of transcoderPlugin and vxaPlugin must be present -->
            <xs:element name="transcoderPlugin" type="tns:OtifTranscoderPluginType" minOccurs="0" maxOccurs="1"/>
            <!-- Optional vxaPlugin, at least one of transcoderPlugin and vxaPlugin must be present -->
            <xs:element name="vxaPlugin" type="tns:OtifVxaPluginType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="OtifListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:OtifListType"/>
    <xs:complexType name="OtifListType">
        <xs:sequence>
            <xs:element name="hits" type="xs:integer" minOccurs="0" maxOccurs="1"/>
            <xs:element name="otif" type="tns:OtifType" maxOccurs="unbounded" minOccurs="0"></xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="VXAStorageCapacityDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:VXAStorageCapacityType" />
    <xs:complexType name="VXAStorageCapacityType">
        <xs:sequence minOccurs="1" maxOccurs="1">
            <xs:element name="free" type="xs:long" minOccurs="0" maxOccurs="1"/>
            <xs:element name="total" type="xs:long" minOccurs="0" maxOccurs="1"/>
            <xs:element name="used" type="xs:long" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="QuotaRuleListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:QuotaRuleListType"/>
    <xs:complexType name="QuotaRuleListType">
        <xs:sequence>
            <xs:element name="rule" type="tns:QuotaRuleType" minOccurs="0" maxOccurs="unbounded"></xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="QuotaRuleDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:QuotaRuleType"/>
    <xs:complexType name="QuotaRuleType">
        <xs:sequence>
            <xs:element name="id" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1"/>

            <!-- Filters -->
            <xs:choice minOccurs="0">
                <xs:element name="user" type="xs:string"/>
                <xs:element name="group" type="xs:string"/>
            </xs:choice>
            <xs:choice minOccurs="0">
                <xs:element name="collection" type="tns:SiteIdType"/>
                <xs:element name="library" type="tns:SiteIdType"/>
            </xs:choice>
            <xs:choice minOccurs="0">
                <xs:element name="storage" type="tns:SiteIdType"/>
                <xs:element name="storageGroup" type="tns:SiteIdType"/>
            </xs:choice>
            <xs:element name="tag" type="xs:string" minOccurs="0" maxOccurs="1"/>

            <!-- Resource Limits -->
            <xs:element name="resource" minOccurs="1" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="name" type="tns:QuotaResourceType" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="limit" type="xs:long" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="usage" type="xs:long" minOccurs="0" maxOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>

            <!-- Other -->
            <xs:element name="updateFrequency" type="xs:int" minOccurs="0" maxOccurs="1"/>
            <xs:element name="lastUpdate" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
            <xs:element name="externalId" type="tns:ExternalIdentifierType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:simpleType name="QuotaResourceType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="item"/>
            <xs:enumeration value="storage"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="TranscoderDirectAccess">
        <xs:sequence>
            <xs:element name="filter" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="rewrite" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element type="xs:string" name="pattern" minOccurs="1" maxOccurs="1"/>
                        <xs:element type="xs:string" name="replacement" minOccurs="1" maxOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="TranscoderType">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="type" minOccurs="0" maxOccurs="1" default="TRANSCODER">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="TRANSCODER"/>
                        <xs:enumeration value="DIRECTORY"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
            <xs:element name="url" type="xs:anyURI"></xs:element>
            <xs:element name="version" type="xs:string" minOccurs="0"></xs:element>
            <xs:element name="reverseAddress" type="xs:string" minOccurs="0"></xs:element>
            <xs:element name="reverseAddressDetected" type="xs:string" minOccurs="0"></xs:element>
            <xs:element name="directAccess" type="tns:TranscoderDirectAccess" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="state" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="job" type="tns:JobStatusType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="configuration" type="tns:TranscoderConfigurationType" minOccurs="0" maxOccurs="1" />
            <xs:element name="transcoder" type="tns:TranscoderType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="weight" type="xs:int" minOccurs="0" maxOccurs="1"/>
            <xs:element name="maxJob" type="xs:int" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="FinalCutServerType">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="url" type="xs:anyURI"></xs:element>
            <xs:element name="tag" type="xs:string"></xs:element>
            <xs:element name="state" type="xs:string" minOccurs="0" maxOccurs="1" />
            <xs:element name="metadata" type="tns:SimpleMetadataType" minOccurs="0" maxOccurs="1" />
            <xs:element name="description" type="xs:string" minOccurs="0" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="MXFServerResourceType">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="url" type="xs:anyURI"></xs:element>
            <xs:element name="workspaceUrl" type="xs:anyURI"></xs:element>
            <xs:element name="userWorkspaceUrl" type="xs:anyURI"></xs:element>
            <xs:element name="mxfServerWorkspacePath" type="xs:string"></xs:element>
            <xs:element name="mxfServerUserId" type="xs:integer"></xs:element>
            <xs:element name="mxfServerPathToStorage" type="xs:anyURI"></xs:element>
            <xs:element name="databaseName" type="xs:string"/>
            <xs:element name="storageId" type="tns:SiteIdType"></xs:element>
            <xs:element name="metadata" type="tns:SimpleMetadataType" minOccurs="0" maxOccurs="1" />
            <xs:element name="description" type="xs:string" minOccurs="0" />
            <xs:element name="atomShapes" type="xs:string" minOccurs="0" />
            <xs:element name="importShapes" type="xs:string" minOccurs="0" />
            <xs:element name="detectAtom" type="xs:boolean" minOccurs="0" />
            <xs:element name="enforceQuota" type="xs:boolean" minOccurs="0" />
            <xs:element name="fileImportPattern" type="xs:string" minOccurs="0" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="SigniantType">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="tag" type="xs:string" />
            <xs:element name="url" type="xs:anyURI" />
            <xs:element name="username" type="xs:string" />
            <xs:element name="password" type="xs:string" />
            <xs:element name="description" type="xs:string" minOccurs="0" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="NetworkType">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="netmask" type="xs:anyURI"></xs:element>
            <xs:element name="bandwidth" minOccurs="0" type="xs:long"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ThumbnailServiceType">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="path" type="xs:string"/>
            <xs:element name="state" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="lastSuccess" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
            <xs:element name="lastFailure" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
            <xs:element name="failureMessage" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="mode" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="LDAPImportType">
        <xs:sequence>
            <xs:element name="interval" type="xs:long" minOccurs="0" maxOccurs="1"/>
            <xs:element name="importOrganizationalUnits" type="xs:boolean" minOccurs="0" maxOccurs="1"/>

            <xs:sequence minOccurs="0" maxOccurs="1">
                <xs:element name="plugin" type="xs:string" minOccurs="1" maxOccurs="1"/>
                <xs:element name="pluginParameters" type="tns:SimpleMetadataType" minOccurs="1" maxOccurs="1"/>
            </xs:sequence>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="LDAPSyncType">
        <xs:complexContent>
            <xs:extension base="tns:LDAPImportType">
                <xs:sequence>
                    <xs:element name="createUsers" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
                    <xs:element name="createGroups" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="LDAPResourceType">
	<xs:sequence>
	    <!-- Required -->
	    <xs:element name="url" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
	    <xs:element name="useStartTLS" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
	    <xs:element name="userDN" type="xs:string" minOccurs="1" maxOccurs="1"/>
	    <xs:element name="usernameAttribute" type="xs:string" minOccurs="1" maxOccurs="1"/>

	    <!-- Optional -->
	    <xs:element name="userSearchFilter" type="xs:string" minOccurs="0" maxOccurs="1"/>
	    <xs:element name="bindDN" type="xs:string" minOccurs="0" maxOccurs="1"/>
	    <xs:element name="bindPassword" type="xs:string" minOccurs="0" maxOccurs="1"/>
	    <xs:element name="cacheLifetime" type="xs:long" minOccurs="0" maxOccurs="1"/>

	    <xs:element name="groupDN" type="xs:string" minOccurs="0" maxOccurs="1"/>
	    <xs:element name="groupSearchFilter" type="xs:string" minOccurs="0" maxOccurs="1"/>
	    <xs:element name="realNameAttribute" type="xs:string" minOccurs="0" maxOccurs="1"/>
	    <xs:element name="groupnameAttribute" type="xs:string" minOccurs="0" maxOccurs="1"/>
	    <xs:element name="usernameFormat" type="xs:string" minOccurs="0" maxOccurs="1"/>

      <xs:element name="secureProtocol" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="serverCertificate" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>

        <xs:element name="sync" type="tns:LDAPSyncType" minOccurs="0" maxOccurs="1"/>

        <!-- Deprecated. Use sync instead -->
	    <xs:element name="import" type="tns:LDAPImportType" minOccurs="0" maxOccurs="1"/>
	</xs:sequence>
    </xs:complexType>

    <xs:complexType name="ExternalTranscoderType">
        <xs:sequence>
            <xs:element name="source" type="xs:string" maxOccurs="1" minOccurs="1"/>
            <xs:element name="destination" type="xs:string" maxOccurs="1" minOccurs="1"/>
            <xs:element name="shapeTag" type="xs:string" maxOccurs="1" minOccurs="1"/>
            <xs:element name="timeout" type="xs:long" maxOccurs="1" minOccurs="0"/>
            <xs:element name="interval" type="xs:long" maxOccurs="1" minOccurs="0"/>
            <xs:element name="checks" type="xs:int" maxOccurs="1" minOccurs="0"/>
            <xs:element name="regex" type="xs:string" maxOccurs="1" minOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="CerifyType">
        <xs:sequence>
            <xs:element name="address" type="xs:string" maxOccurs="1" minOccurs="1"/>
            <xs:element name="mediaLocation" maxOccurs="unbounded" minOccurs="1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="name" type="xs:string" maxOccurs="1" minOccurs="1"/>
                        <xs:element name="storageMethod" type="tns:SiteIdType" maxOccurs="unbounded" minOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="cleanup" type="xs:boolean" maxOccurs="1" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ExternalTranscodeJobDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ExternalTranscodeJobType"/>
    <xs:complexType name="ExternalTranscodeJobType">
        <xs:sequence>
            <xs:element name="sourceUri" type="xs:string" maxOccurs="1" minOccurs="1"/>
            <xs:element name="format" type="xs:string" maxOccurs="1" minOccurs="1"/>
            <xs:element name="transcoder" type="tns:ExternalTranscoderType" maxOccurs="1" minOccurs="1"/>
            <xs:element name="regex" type="xs:string" maxOccurs="1" minOccurs="1"/>
            <xs:element name="storageId" type="xs:string" maxOccurs="1" minOccurs="1"/>
            <xs:element name="username" type="xs:string" maxOccurs="1" minOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="VidinetServiceType">
        <xs:sequence>
            <xs:element name="url" type="xs:anyURI" maxOccurs="1" minOccurs="1"/>
            <xs:element name="name" type="xs:string" maxOccurs="1" minOccurs="0"/>
            <xs:element name="endpoint" type="xs:anyURI" maxOccurs="1" minOccurs="0"/>
            <xs:element name="type" type="xs:string" maxOccurs="1" minOccurs="1"/>
            <xs:element name="state" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="scheme" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ResourceDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ResourceType" />
    <xs:complexType name="ResourceType">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="id" type="tns:SiteIdType" minOccurs="0"/>
            <xs:element name="state" type="xs:string" minOccurs="0"/>
            <xs:choice>
                <xs:element name="network" type="tns:NetworkType"></xs:element>
                <xs:element name="transcoder" type="tns:TranscoderType"></xs:element>
                <xs:element name="externalTranscoder" type="tns:ExternalTranscoderType"></xs:element>
                <xs:element name="cerify" type="tns:CerifyType"></xs:element>
                <xs:element name="thumbnail" type="tns:ThumbnailServiceType"></xs:element>
                <xs:element name="finalcutserver" type="tns:FinalCutServerType"></xs:element>
                <xs:element name="mxfserver" type="tns:MXFServerResourceType"></xs:element>
                <xs:element name="signiant" type="tns:SigniantType"></xs:element>
                <xs:element name="ldap" type="tns:LDAPResourceType"/>
                <xs:element name="unknown" type="xs:string"></xs:element>
                <xs:element name="cloudconvert" type="tns:CloudConvertType"></xs:element>
                <xs:element name="vidinet" type="tns:VidinetServiceType"></xs:element>
                <xs:element name="eidr" type="tns:EidrType"></xs:element>
                <xs:element name="callback" type="tns:CallbackLocationResourceType"></xs:element>
            </xs:choice>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="CallbackLocationResourceType">
        <xs:sequence>
            <xs:element name="uri" type="xs:anyURI"></xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="CallbackDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:CallbackDocumentType" />
    <xs:complexType name="CallbackDocumentType">
        <xs:sequence>
            <xs:element name="name" type="xs:string"></xs:element>
            <xs:element name="description" type="xs:string"></xs:element>
            <xs:element name="script" type="xs:string"></xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="CloudConvertType">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="apiKey" type="xs:string"></xs:element>
            <xs:element name="apiHost" type="xs:string"></xs:element>
            <xs:element name="script" type="xs:string"></xs:element>
            <xs:element name="inputMethod" type="xs:string"></xs:element>
            <xs:element name="publicAddress" type="xs:anyURI"></xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="EidrDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:EidrType" />
    <xs:complexType name="EidrType">
        <xs:sequence>
            <xs:element name="url" type="xs:anyURI" maxOccurs="1" minOccurs="1"/>
            <xs:element name="include" type="xs:string" maxOccurs="unbounded" minOccurs="0"/> <!-- default:"eidr_base"-->
            <xs:element name="partyId" type="xs:string" maxOccurs="1" minOccurs="0"/>
            <xs:element name="userId" type="xs:string" maxOccurs="1" minOccurs="0"/>
            <xs:element name="password" type="xs:string" maxOccurs="1" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ResourceListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ResourceListType" />
    <xs:complexType name="ResourceListType">
            <xs:sequence>
                <xs:element name="resource" type="tns:ResourceType" maxOccurs="unbounded" minOccurs="0"></xs:element>
            </xs:sequence>
    </xs:complexType>
    <xs:element name="ResourceTypeListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ResourceTypeListType" />
    <xs:complexType name="ResourceTypeListType">
            <xs:sequence>
                <xs:element name="resourcetype" maxOccurs="unbounded" minOccurs="0">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="type" type="xs:string"></xs:element>
                            <xs:element name="url" type="xs:anyURI" minOccurs="0"></xs:element>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
    </xs:complexType>
    <xs:element name="CostEstimateDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:CostEstimateType" />
    <xs:complexType name="CostEstimateType">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="id" type="tns:SiteIdType" minOccurs="0"/>
            <xs:element name="url" type="xs:anyURI" minOccurs="0"/>
            <xs:element name="state" type="xs:string" minOccurs="0"/>
            <xs:element name="service" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="resource" type="tns:SiteIdType"/>
                        <xs:element name="name" type="xs:string" minOccurs="0"/>
                        <xs:element name="type" type="xs:string" minOccurs="0"/>
                        <xs:element name="state" type="xs:string" minOccurs="0" />
                        <xs:element name="status" type="xs:string" minOccurs="0" />
                        <xs:element name="message" type="xs:string" minOccurs="0" />
                        <xs:element name="cost" type="tns:AmountType" minOccurs="0"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="MetadataListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:MetadataListType" />
    <xs:complexType name="MetadataListType">
        <xs:sequence>
            <xs:element name="item" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="metadata" minOccurs="0" maxOccurs="1" type="tns:MetadataType"/>
                    </xs:sequence>
                    <xs:attribute name="id" type="tns:SiteIdType" />
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="MetadataLockDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:MetadataLockType"/>
    <xs:complexType name="MetadataLockType">
        <xs:sequence>
            <xs:element name="id" type="xs:string"></xs:element>
            <xs:element name="user" type="xs:string"></xs:element>
            <xs:element name="expires" type="xs:dateTime"></xs:element>
            <xs:element name="field" type="xs:string" maxOccurs="unbounded" minOccurs="0"></xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="MetadataLockListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:MetadataLockListType"/>

    <xs:complexType name="MetadataLockListType">
        <xs:sequence>
            <xs:element name="lock" type="tns:MetadataLockType" maxOccurs="unbounded" minOccurs="0"></xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="CollectionListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:CollectionListType" />
    <xs:complexType name="CollectionListType">
        <xs:sequence>
            <xs:element name="hits" minOccurs="0" maxOccurs="1" type="xs:integer" />
            <xs:element name="collection" minOccurs="0" maxOccurs="unbounded" type="tns:CollectionType"/>
	    <xs:element name="facet" minOccurs="0" maxOccurs="unbounded" type="tns:FacetType"/>
	    <xs:element name="suggestion" minOccurs="0" maxOccurs="unbounded" type="tns:SuggestionResultType"/>
            <xs:element name="autocomplete" minOccurs="0" maxOccurs="unbounded" type="tns:AutocompleteResponseType"/>
            <xs:element name="nextCursor" type="xs:string" maxOccurs="1" minOccurs="0"></xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="CollectionDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:CollectionType" />
    <xs:complexType name="CollectionType">
        <xs:sequence>
            <xs:element name="loc" type="xs:anyURI" minOccurs="0"/>
            <xs:element name="id" type="tns:SiteIdType" minOccurs="0"/>
            <xs:element name="name" type="xs:string" minOccurs="0"/>
            <xs:element name="content" type="tns:CollectionContentType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="project" type="tns:ProjectType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="sequence" type="tns:SequenceType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="metadata" type="tns:MetadataType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="terse" type="tns:GenericType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="merged-access" type="tns:AccessControlMergedType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="externalId" type="tns:ExternalIdentifierType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="absoluteTime" type="xs:boolean"/>
    </xs:complexType>

    <xs:complexType name="CollectionContentType">
        <xs:sequence>
            <xs:element name="id" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="uri" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="type" type="tns:CollectionContentEntityTypeType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="reference" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="metadata" type="tns:SimpleMetadataType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
        <xs:attribute name="mode" type="tns:CollectionContentModeType" use="optional"/>
        <xs:attribute name="before" type="xs:string" use="optional"/>
        <xs:attribute name="after" type="xs:string" use="optional"/>
        <xs:attribute name="addItems" type="xs:boolean" use="optional"/>
    </xs:complexType>

    <xs:simpleType name="CollectionContentModeType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="add"/>
            <xs:enumeration value="remove"/>
            <xs:enumeration value="move"/>
            <xs:enumeration value="update"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="CollectionContentEntityTypeType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="item"/>
            <xs:enumeration value="library"/>
            <xs:enumeration value="collection"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:element name="UserDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:UserType" />
    <xs:complexType name="UserType">
        <xs:sequence>
            <xs:element name="id" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="loc" type="xs:anyURI" minOccurs="0" />  <!-- output only -->
            <xs:element name="userName" type="xs:string"></xs:element>
            <xs:element name="realName" type="xs:string" minOccurs="0"></xs:element>
            <xs:element name="alias" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="password" type="xs:string" minOccurs="0"></xs:element>
            <xs:element name="salt" type="xs:string" minOccurs="0" maxOccurs="1" />
            <xs:element name="groupList" type="tns:GroupListType" maxOccurs="1" minOccurs="0"></xs:element>
            <xs:element name="metadata" type="tns:SimpleMetadataType" minOccurs="0" maxOccurs="1" />
            <xs:element name="origin" type="xs:string" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
        <xs:attribute name="disabled" type="xs:boolean" use="optional"/>
        <xs:attribute name="accessPreserved" type="xs:boolean" use="optional"/>
        <xs:attribute name="remove" type="xs:boolean" use="optional"/>
    </xs:complexType>
    <xs:element name="UserListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:UserListType"/>
    <xs:complexType name="UserListType">
        <xs:sequence>
            <xs:element name="hits" type="xs:integer" minOccurs="0" maxOccurs="1"/>
            <xs:element name="user" type="tns:UserType" maxOccurs="unbounded" minOccurs="0"></xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="GroupDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:GroupType" />
    <xs:complexType name="GroupType">
        <xs:sequence>
            <xs:element name="id" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="loc" type="xs:anyURI" minOccurs="0" maxOccurs="1" /> <!-- output only -->
            <xs:element name="groupName" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="role" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="childGroupList" type="tns:GroupListType" maxOccurs="1" minOccurs="0"></xs:element>
            <xs:element name="parentGroupList" type="tns:GroupListType" maxOccurs="1" minOccurs="0"></xs:element>
            <xs:element name="userList" type="tns:UserListType" maxOccurs="1" minOccurs="0"></xs:element>
            <xs:element name="metadata" type="tns:SimpleMetadataType" minOccurs="0" maxOccurs="1" />
            <xs:element name="origin" type="xs:string" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
        <xs:attribute name="remove" type="xs:boolean" use="optional"/>
    </xs:complexType>
    <xs:element name="GroupListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:GroupListType" />
    <xs:complexType name="GroupListType">
        <xs:sequence>
            <xs:element name="hits" type="xs:integer" minOccurs="0" maxOccurs="1"/>
            <xs:element name="group" type="tns:GroupType" maxOccurs="unbounded" minOccurs="0"></xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="AuthenticationTokenDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:AuthenticationTokenType" />
    <xs:complexType name="AuthenticationTokenType">
        <xs:sequence>
            <xs:element name="token" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="user" type="xs:string" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="AccessKeyListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:AccessKeyListType" />
    <xs:complexType name="AccessKeyListType">
        <xs:sequence>
            <xs:element name="hits" type="xs:integer" minOccurs="0" maxOccurs="1"/>
            <xs:element name="key" type="tns:AccessKeyType" maxOccurs="unbounded" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="AccessKeyDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:AccessKeyType" />
    <xs:complexType name="AccessKeyType">
        <xs:sequence>
            <xs:element name="id" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="name" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="secret" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="status" minOccurs="1" maxOccurs="1">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="ACTIVE"/>
                        <xs:enumeration value="INACTIVE"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
            <xs:element name="created" type="xs:dateTime" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="SimpleMetadataDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:SimpleMetadataType" />
    <xs:element name="ConformDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ConformType" />

    <xs:complexType name="ConformType">
        <xs:sequence>
            <xs:element name="timeBase" type="tns:TimeBaseType" minOccurs="0" maxOccurs="1" />
            <xs:element name="timeline" type="tns:ConformTimelineType" minOccurs="1" maxOccurs="1" />
            <xs:element name="overlay" type="tns:ConformOverlayType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="textOverlay" type="tns:TextOverlayType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ConformOverlayType">
        <xs:sequence>
            <xs:element name="id" type="tns:SiteIdType" minOccurs="1" maxOccurs="1"/>
            <xs:element name="x" type="xs:int" minOccurs="1" maxOccurs="1"/>
            <xs:element name="y" type="xs:int" minOccurs="1" maxOccurs="1"/>
            <xs:element name="interval" type="tns:TimeIntervalType" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ConformTimelineType">
        <xs:sequence>
            <xs:element name="segment" type="tns:ConformSegmentType" minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ConformSegmentType">
        <xs:sequence>
            <xs:element name="source" type="tns:ConformSourceType" minOccurs="1" maxOccurs="1" />
            <xs:element name="destination" type="tns:ConformDestinationType" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ConformSourceType">
        <xs:sequence>
            <xs:element name="id" type="tns:SiteIdType" minOccurs="1" maxOccurs="1" />
            <xs:element name="interval" type="tns:ConformIntervalType" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ConformDestinationType">
        <xs:sequence>
            <xs:element name="interval" type="tns:ConformIntervalType" minOccurs="1" maxOccurs="1" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ConformIntervalType">
        <xs:sequence>
            <xs:element name="start" type="tns:ConformTimePointType" minOccurs="1" maxOccurs="1" />
            <xs:element name="end" type="tns:ConformTimePointType" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ConformTimePointType">
        <xs:sequence>
            <xs:element name="samples" type="xs:integer" minOccurs="1" maxOccurs="1" />
            <xs:element name="timeBase" type="tns:TimeBaseType" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
    </xs:complexType>
    <xs:element name="JobPoolDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:JobPoolType" />
    <xs:complexType name="JobPoolType">
        <xs:sequence>
            <xs:element name="priorityThreshold" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="size" type="xs:int" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="MetricsConfigurationDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:MetricsConfigurationType" />
    <xs:complexType name="MetricsConfigurationType">
        <xs:sequence>
            <xs:element name="statsd" type="tns:StatsdReporterType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="StatsdReporterType">
        <xs:complexContent>
            <xs:extension base="tns:MetricsReporterType">
                <xs:sequence maxOccurs="1" minOccurs="1">
                    <xs:element name="host" type="xs:string" minOccurs="0" maxOccurs="1"/>
                    <xs:element name="port" type="xs:int" minOccurs="0" maxOccurs="1"/>
                    <xs:element name="prefix" type="xs:string" minOccurs="0" maxOccurs="1"/>
                    <xs:element name="tags" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="MetricsReporterType">
        <xs:sequence>
            <xs:element name="exclude" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="include" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="IndexingConfigurationDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:IndexingConfigurationType" />
    <xs:complexType name="IndexingConfigurationType">
        <xs:sequence>
            <xs:choice>
                <xs:sequence>
                    <xs:element name="solrPath" type="xs:string" minOccurs="1" maxOccurs="1"/>
                </xs:sequence>
                <xs:sequence>
                    <xs:element name="solrCollection" type="xs:string" minOccurs="1" maxOccurs="1"/>
                    <xs:element name="zookeeperHost" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
                </xs:sequence>
                <xs:sequence>
                    <xs:element name="elasticsearchPath" type="xs:string" minOccurs="1" maxOccurs="1"/>
                </xs:sequence>
            </xs:choice>
            <xs:element name="commitInterval" type="xs:int" minOccurs="0" maxOccurs="1"/>
            <xs:element name="softCommitInterval" type="xs:int" minOccurs="0" maxOccurs="1"/>
            <xs:element name="autoSoftCommit" type="xs:boolean" minOccurs="0" maxOccurs="1"/>

            <xs:element name="pingAttempts" type="xs:int" minOccurs="0" maxOccurs="1"/>
            <xs:element name="pingTimeout" type="xs:int" minOccurs="0" maxOccurs="1"/>
            <xs:element name="queryTimeout" type="xs:int" minOccurs="0" maxOccurs="1"/>

            <xs:element name="fieldDefault" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="fullText" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="BulkyMetadataConfigurationDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:BulkyMetadataConfigurationType" />
    <xs:complexType name="BulkyMetadataConfigurationType">
        <xs:sequence>
            <xs:element name="uri" type="xs:anyURI" minOccurs="0" maxOccurs="1"/>
            <xs:element name="storageDisabled" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="status" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="metadataInDatabase" type="xs:long"/>
                        <xs:element name="metadataOnStorage" type="xs:long"/>
                        <xs:element name="storageStatus" type="xs:string"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="PathAliasConfigurationDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:PathAliasConfigurationType" />
    <xs:complexType name="PathAliasConfigurationType">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="alias" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="JobPoolListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:JobPoolListType" />
    <xs:complexType name="JobPoolListType">
        <xs:sequence>
            <xs:element name="concurrentJobs" type="xs:int" minOccurs="0" maxOccurs="1"/>
            <xs:element name="pool" type="tns:JobPoolType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="FtpPoolConfigurationDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:FtpPoolConfigurationType" />
    <xs:complexType name="FtpPoolConfigurationType">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="pool" type="tns:ConnectionPoolType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="TaskGroupListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:TaskGroupListType" />
    <xs:complexType name="TaskGroupListType">
        <xs:sequence>
            <xs:element name="group" type="tns:TaskGroupType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="TaskGroupDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:TaskGroupType" />
    <xs:complexType name="TaskGroupType">
        <xs:sequence>
            <xs:element name="loc" type="xs:anyURI" minOccurs="0" maxOccurs="1"/>
            <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="job" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="type" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element name="priority" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element name="user" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element name="group" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element name="data" minOccurs="0" maxOccurs="unbounded">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="key" type="xs:string" minOccurs="1" maxOccurs="1"/>
                                    <xs:element name="value" type="xs:string" minOccurs="0" maxOccurs="1"/>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="transcoder" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="id" type="xs:string" minOccurs="1" maxOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="metadata" type="tns:SimpleMetadataType" minOccurs="0" maxOccurs="1" />
            <xs:element name="priority" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="maxConcurrency" type="xs:int" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ConnectionPoolType">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="minSize" type="xs:int" />
            <xs:element name="maxSize" type="xs:int" minOccurs="0" />
            <xs:element name="evictionInterval" type="xs:int" minOccurs="0" />
            <xs:element name="minIdleTime" type="xs:int" minOccurs="0" />
        </xs:sequence>
    </xs:complexType>
    <xs:element name="SiteRuleDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:SiteRuleType" />
    <xs:complexType name="SiteRuleType">
        <xs:sequence>
            <xs:element name="id" type="tns:SiteIdType" minOccurs="0" />
            <xs:element name="site" type="xs:string" minOccurs="0" />
            <xs:element name="metadata" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="shape" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="groups" type="xs:boolean" minOccurs="0" maxOccurs="1" />
            <xs:element name="access" type="xs:boolean" minOccurs="0" maxOccurs="1" />
            <xs:element name="files" type="xs:boolean" minOccurs="0" maxOccurs="1" />
            <xs:element name="targetStorage" type="xs:string" minOccurs="0" maxOccurs="1" />
            <xs:element name="localTargetStorage" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="deleted" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="SiteRuleListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:SiteRuleListType" />

    <xs:complexType name="SiteRuleListType">
        <xs:sequence>
            <xs:element name="siteRule" type="tns:SiteRuleType" minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
    </xs:complexType>

    <xs:element name="StorageImportDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:StorageImportType" />
    <xs:complexType name="StorageImportType">
        <xs:sequence>
            <xs:element name="file" type="tns:FileImportDefType" minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="FileImportDefType" xmlns:tns="http://xml.vidispine.com/schema/vidispine">
        <xs:sequence>
            <xs:element name="fileId" type="tns:SiteIdType"/>
            <xs:element name="path" type="xs:string" />
            <xs:element name="size" type="xs:long" />
            <xs:element name="component" type="tns:SiteIdType" minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
    </xs:complexType>

    <xs:element name="VersionDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:VersionType"/>

    <xs:complexType name="VersionType" xmlns:tns="http://xml.vidispine.com/schema/vidispine">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="component" type="tns:CompType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="systemInfo" type="tns:SystemInfoType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="licenseInfo" type="tns:LicenseType" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="SystemInfoType" xmlns:tns="http://xml.vidispine.com/schema/vidispine">
        <xs:sequence maxOccurs="1" minOccurs="0">
            <xs:element name="macaddress" type="xs:string" maxOccurs="unbounded" minOccurs="0"/>
            <xs:element name="databaseSize" type="xs:long" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="CompType" xmlns:tns="http://xml.vidispine.com/schema/vidispine">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="siteId" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="version" type="xs:string" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="LicenseType" xmlns:tns="http://xml.vidispine.com/schema/vidispine">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="expiryDate" type="xs:string" minOccurs="0"/>
            <xs:element name="macaddresses" type="tns:SystemInfoType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="fileStatus" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="storageNumber" type="tns:LicenseNumberType" minOccurs="0"/>
            <xs:element name="userNumber" type="tns:LicenseNumberType" minOccurs="0"/>
            <xs:element name="itemNumber" type="tns:LicenseNumberType" minOccurs="0"/>
            <xs:element name="transcoderNumber" type="tns:LicenseNumberType" minOccurs="0"/>
            <xs:element name="databaseSizeLimit" type="tns:LicenseNumberType" minOccurs="0"/>
            <xs:element name="endCustomerCompanyname" type="xs:string" minOccurs="0"/>
            <xs:element name="endCustomerCompanyContactEmail" type="xs:string" minOccurs="0"/>
            <xs:element name="resellerCompanyName" type="xs:string" minOccurs="0"/>
            <xs:element name="resellerCompanyContactEmail" type="xs:string" minOccurs="0"/>
            <xs:element name="licenseStatus" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="codecStatus" type="tns:CodecStatusType" minOccurs="0"/>
            <xs:element name="licenseErrorStatus" type="tns:LicenseErrorType" minOccurs="0"/>
            <xs:element name="licenseType" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="MasterLicenseDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:MasterLicenseType" />
    <xs:complexType name="MasterLicenseType" xmlns:tns="http://xml.vidispine.com/schema/vidispine">
        <xs:complexContent>
            <xs:extension base="tns:LicenseType">
                <xs:sequence maxOccurs="1" minOccurs="1">
                    <xs:element name="masterIdentifier" type="xs:string" minOccurs="1" maxOccurs="1"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:element name="SlaveLicenseDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:SlaveLicenseType" />
    <xs:complexType name="SlaveLicenseType" xmlns:tns="http://xml.vidispine.com/schema/vidispine">
        <xs:complexContent>
            <xs:extension base="tns:LicenseType">
                <xs:sequence maxOccurs="1" minOccurs="1">
                    <xs:element name="masterIdentifier" type="xs:string" minOccurs="0" maxOccurs="1"/>
                    <xs:element name="slaveIdentifier" type="xs:string" minOccurs="0" maxOccurs="1"/>
                    <xs:element name="slaveInstances" type="xs:integer" minOccurs="0" maxOccurs="1"/>
                    <xs:element name="validityTime" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
                    <xs:element name="validityPeriod" type="xs:integer" minOccurs="0" maxOccurs="1"/>
                    <xs:element name="id" type="xs:string" minOccurs="0" maxOccurs="1"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:element name="SlaveLicenseListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:SlaveLicenseListType" />
    <xs:complexType name="SlaveLicenseListType" xmlns:tns="http://xml.vidispine.com/schema/vidispine">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="slaveLicense" type="tns:SlaveLicenseType" maxOccurs="unbounded" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="SlaveAuthDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:SlaveAuthType" />
    <xs:complexType name="SlaveAuthType" xmlns:tns="http://xml.vidispine.com/schema/vidispine">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="slaveId" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="slaveIp" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="slaveMac" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="requestSourceIp" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="slaveInstanceName" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="hostname" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="licenseStatus" type="tns:VersionType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="SlaveListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:SlaveListType" />
    <xs:complexType name="SlaveListType">
        <xs:sequence>
            <xs:element name="slave" type="tns:SlaveType" minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="SlaveType" xmlns:tns="http://xml.vidispine.com/schema/vidispine">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="Id" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="slaveId" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="slaveIp" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="slaveMac" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="requestSourceIp" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="slaveInstanceName" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="hostname" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="lastUpdated" type="xs:dateTime" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="SlaveAuthInfoDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:SlaveAuthInfoType" />
    <xs:complexType name="SlaveAuthInfoType" xmlns:tns="http://xml.vidispine.com/schema/vidispine">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="masterHost" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
            <xs:element name="slaveId" type="xs:string" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

     <xs:complexType name="LicenseNumberType">
        <xs:sequence minOccurs="0" maxOccurs="1">
            <xs:element name="allowed" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="current" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="CodecStatusType" xmlns:tns="http://xml.vidispine.com/schema/vidispine">
        <xs:sequence>
            <xs:element name="codec" type="tns:CodecType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="codecExtraTags" type="xs:string" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="CodecType">
        <xs:sequence>
            <xs:element name="encode" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="decode" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
        <xs:attribute name="name" type="xs:string"/>
    </xs:complexType>

    <xs:complexType name="EncodeDecodeType">
        <xs:sequence maxOccurs="1" minOccurs="0">
            <xs:element name="encode"  type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="decode"  type="xs:boolean" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>


    <xs:complexType name="LicenseErrorType" xmlns:tns="http://xml.vidispine.com/schema/vidispine">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="licenseError" type="xs:string" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>

    <!-- START PROJECT TYPES -->
    <xs:element name="ProjectFileDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ProjectFileType" />
    <xs:complexType name="ProjectFileType">
        <xs:sequence>
            <xs:element name="location" type="xs:anyURI"/>
            <xs:element name="type" type="xs:string" minOccurs="0"/>
            <xs:element name="asset" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="id" type="xs:string"/>
                        <xs:element name="name" type="xs:string"/>
                        <xs:element name="type" type="xs:string"/>
                        <xs:element name="status" type="xs:string" minOccurs="0"/>
                        <xs:element name="item" minOccurs="0" maxOccurs="unbounded">
                            <xs:complexType>
                                <xs:attribute name="id" type="tns:SiteIdType"/>
                                <xs:attribute name="shape" type="tns:SiteIdType" use="optional"/>
                                <xs:attribute name="match" type="xs:string"/>
                                <xs:attribute name="permission" type="xs:string"/>
                            </xs:complexType>
                        </xs:element>
                        <xs:element name="file" type="tns:FileReferenceType" minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="FileReferenceType">
        <xs:sequence>
            <!-- Either an id or path will be available, depending on the NLE -->
            <xs:choice>
                <xs:element name="id" type="xs:string"/>
                <xs:element name="path"  type="xs:anyURI"/>
            </xs:choice>
            <xs:element name="hash"  type="xs:string" minOccurs="0"/>
            <xs:element name="status" type="xs:string" minOccurs="0"/>
            <xs:element name="file" type="tns:FileType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ExportRequestDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ExportRequestType" />
    <xs:complexType name="ExportRequestType">
        <xs:sequence>
            <xs:element name="tag" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="format" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="content" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="storage" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="id" type="tns:SiteIdType" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="path" type="xs:anyURI" minOccurs="0" maxOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="item" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="id" type="tns:SiteIdType" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="path" type="xs:anyURI" minOccurs="1" maxOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="sequence" type="tns:SequenceType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ExportResponseDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ExportResponseType" />
    <xs:complexType name="ExportResponseType">
        <xs:sequence>
            <xs:element name="problem" type="tns:ExportProblemType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="mappings" type="tns:EssenceMappingsType" minOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ExportStatusDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ExportStatusType" />
    <xs:complexType name="ExportStatusType">
        <xs:sequence>
            <xs:element name="problem" type="tns:ExportProblemType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ExportProblemType">
        <xs:sequence>
            <xs:element name="type" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="message" type="xs:string"/>
            <xs:element name="asset" type="xs:string" minOccurs="0"/>
            <xs:element name="parameter" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="EssenceMappingsDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:EssenceMappingsType" />
    <xs:complexType name="EssenceMappingsType">
        <xs:sequence>
            <xs:element name="asset" type="tns:AssetMappingType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="file" type="tns:FileMappingType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="storage" type="tns:StorageMappingType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="AssetMappingType">
        <xs:attribute name="id" type="xs:string" use="required"/>
        <xs:attribute name="item" type="tns:SiteIdType" use="required"/>
        <xs:attribute name="shape" type="tns:SiteIdType" use="optional"/>
    </xs:complexType>

    <xs:complexType name="StorageMappingType">
        <xs:attribute name="path" type="xs:string" use="required"/>
        <xs:attribute name="id" type="tns:SiteIdType" use="required"/>
    </xs:complexType>

    <xs:complexType name="FileMappingType">
        <!-- Either an id or path should be provided, depending on the NLE -->
        <xs:attribute name="id" type="xs:string" use="optional"/>
        <xs:attribute name="path"  type="xs:anyURI" use="optional"/>
        <xs:attribute name="hash"  type="xs:string" use="optional"/>
        <xs:attribute name="size" type="xs:long" use="optional"/>
        <xs:attribute name="timestamp" type="xs:dateTime" use="optional"/>
    </xs:complexType>

    <!-- END PROJECT TYPES -->
    <xs:element name="ReindexRequestDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ReindexRequestType"/>
    <xs:complexType name="ReindexRequestType" xmlns:tns="http://xml.vidispine.com/schema/vidispine">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="index" type="xs:string" />
            <xs:element name="priority" type="xs:int" />
            <xs:element name="status" type="xs:string"/>
            <xs:element name="start" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
            <xs:element name="finish" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
            <xs:element name="indexesDone" type="xs:integer" minOccurs="0" maxOccurs="1"/>
            <xs:element name="indexesTotal" type="xs:integer" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="PlaceholderImportRequestDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:PlaceholderImportRequestType"/>
    <xs:complexType name="PlaceholderImportRequestType" xmlns:tns="http://xml.vidispine.com/schema/vidispine">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="container" type="xs:anyURI" minOccurs="0" maxOccurs="1"/>
            <xs:element name="video" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="audio" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="binary" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
            <!--<xs:element name="metadata" type="tns:MetadataType" minOccurs="0" maxOccurs="1"/>-->
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ConformRequestDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ConformRequestType"/>
    <xs:complexType name="ConformRequestType" xmlns:tns="http://xml.vidispine.com/schema/vidispine">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="conform" type="tns:ConformType" minOccurs="1" maxOccurs="1"/>
            <xs:element name="metadata" type="tns:MetadataType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="SequenceRenderRequestDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:SequenceRenderRequestType"/>
    <xs:complexType name="SequenceRenderRequestType" xmlns:tns="http://xml.vidispine.com/schema/vidispine">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="sequence" type="tns:SequenceType" minOccurs="1" maxOccurs="1"/>
            <xs:element name="metadata" type="tns:MetadataType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="VidispineServiceListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:VidispineServiceListType" />
    <xs:complexType name="VidispineServiceListType">
        <xs:sequence>
            <xs:element name="service" type="tns:VidispineServiceType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="VidispineServiceDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:VidispineServiceType"/>
    <xs:complexType name="VidispineServiceType" xmlns:tns="http://xml.vidispine.com/schema/vidispine">
        <xs:sequence>
            <xs:element name="id" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="name" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="class" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="arguments" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="isEnabled" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="isRunning" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="exception" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="exceptionTimestamp" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="thread" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="threadStatus" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="load5" type="xs:double" minOccurs="0" maxOccurs="1"/>
            <xs:element name="load60" type="xs:double" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ExportLocationListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ExportLocationListType"/>
    <xs:complexType name="ExportLocationListType" xmlns:tns="http://xml.vidispine.com/schema/vidispine">
        <xs:sequence>
            <xs:element name="exportLocation" type="tns:ExportLocationType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ExportLocationDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ExportLocationType"/>
    <xs:complexType name="ExportLocationType" xmlns:tns="http://xml.vidispine.com/schema/vidispine">
        <xs:sequence>
            <xs:element name="name" type="xs:string" minOccurs="0" />
            <xs:element name="uri" type="xs:string" minOccurs="0" /> <!-- preserved for backwards compatibility -->
            <xs:element name="uriList" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
            <xs:element name="projection" type="xs:string" minOccurs="0" />
            <xs:element name="tag" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="script" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>


    <!-- SELF TEST DOCUMENTS -->

	<xs:element name="SelfTestDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:SelfTestType"/>
	<xs:complexType name="SelfTestType">
		<xs:sequence>
			<xs:element name="message" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="test" type="tns:SelfTestType" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="name" type="xs:string" use="optional"/>
		<xs:attribute name="description" type="xs:string" use="optional"/>
		<xs:attribute name="status" type="xs:string" use="required"/>
		<xs:attribute name="took" type="xs:string" use="optional"/>
	</xs:complexType>

    <xs:complexType name="LoudnessMixType" xmlns:tns="http://xml.vidispine.com/schema/vidispine">
        <xs:sequence>
            <xs:element name="name" type="xs:string" minOccurs="0" />
            <xs:element name="weightdB" type="xs:double" minOccurs="0" />
            <xs:element name="sourceItemTrack" type="xs:string" minOccurs="0" />
            <xs:element name="sourceStream" type="xs:int" minOccurs="0" />
            <xs:element name="sourceChannel" type="xs:int" minOccurs="0" />
        </xs:sequence>
    </xs:complexType>
    <xs:element name="LoudnessDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:LoudnessType"/>
    <xs:complexType name="LoudnessType" xmlns:tns="http://xml.vidispine.com/schema/vidispine">
        <xs:sequence>
            <xs:element name="id" type="tns:SiteIdType" minOccurs="0" />
            <xs:element name="shape" type="tns:SiteIdType" minOccurs="0" />
            <xs:element name="shapeTag" type="xs:string" minOccurs="0" />
            <xs:element name="mix" type="tns:LoudnessMixType" minOccurs="0" maxOccurs="unbounded" />
            <xs:element name="start" type="xs:string" minOccurs="0" />
            <xs:element name="end" type="xs:string" minOccurs="0" />
            <xs:element name="startLoudness" type="xs:string" minOccurs="0" />
            <xs:element name="endLoudness" type="xs:string" minOccurs="0" />
            <xs:element name="startRange" type="xs:string" minOccurs="0" />
            <xs:element name="endRange" type="xs:string" minOccurs="0" />
            <xs:element name="loudnessLU" type="xs:double" minOccurs="0" />
            <xs:element name="loudnessRangeLU" type="xs:double" minOccurs="0" />
        </xs:sequence>
    </xs:complexType>
    <xs:element name="AutoProjectionRuleDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:AutoProjectionRuleType"/>

    <xs:complexType name="AutoProjectionRuleType">
        <xs:sequence>
            <xs:element name="step" type="tns:AutoProjectionStepType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="name" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="inputFilters" minOccurs="0">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="inputFilter" minOccurs="0" maxOccurs="unbounded" type="tns:AutoProjectionInputFilterType"/>
                        <xs:element name="bulkyMetadataKeysRegex" minOccurs="0" maxOccurs="1" type="xs:string"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="triggers" minOccurs="0">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="trigger" minOccurs="0" maxOccurs="unbounded" type="tns:AutoProjectionTriggerType"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:simpleType name="AutoProjectionTriggerType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="shapeMetadata"/>
            <xs:enumeration value="itemMetadata"/>
            <xs:enumeration value="bulkyMetadata"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="AutoProjectionInputFilterType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="oldMetadata"/>
            <xs:enumeration value="shapeDocument"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="AutoProjectionStepType">
        <xs:sequence>
            <xs:element name="order" type="xs:integer" default="1" minOccurs="0" maxOccurs="1"/>
            <xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:sequence>
            <xs:choice>
                <xs:element name="script" type="xs:string" minOccurs="0" maxOccurs="1"/>
                <xs:element name="xslt" type="xs:string" minOccurs="0" maxOccurs="1"/>
            </xs:choice>
        </xs:sequence>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="MetadataWrapperDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:MetadataWrapperType"/>
    <xs:complexType name="MetadataWrapperType">
        <xs:sequence>
            <xs:element name="metadata" type="tns:MetadataType" minOccurs="1" maxOccurs="1"/>
            <xs:element name="oldMetadata" type="tns:MetadataListType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="shape" type="tns:ShapeType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="shapeMetadata" type="tns:SimpleMetadataType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="bulkyMetadata" type="tns:BulkyMetadataType" minOccurs="1" maxOccurs="1"/>
            <xs:element name="oldBulkyMetadata" type="tns:BulkyMetadataType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="targetId" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ErrorLogListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ErrorLogListType" />
    <xs:complexType name="ErrorLogListType">
      <xs:sequence>
        <xs:element name="errorLog" minOccurs="0" maxOccurs="unbounded" type="tns:ErrorLogType"/>
      </xs:sequence>
    </xs:complexType>
    <xs:element name="ErrorLogDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ErrorLogType"/>
    <xs:complexType name="ErrorLogType">
        <xs:sequence>
            <xs:element name="id" type="xs:long" minOccurs="0" maxOccurs="1"/>
            <xs:element name="timestamp" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
            <xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="type" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="entityType" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="entityId" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="vsXSLTVersion" type="xs:integer"/>
    <xs:element name="ExportInformationDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ExportInformationType"/>
    <xs:complexType name="ExportInformationType">
        <xs:sequence>
            <xs:element name="metadataList" type="tns:MetadataListType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="job" type="tns:JobType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="MetadataSchemaMigrationListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:MetadataSchemaMigrationListType"/>
    <xs:complexType name="MetadataSchemaMigrationListType">
        <xs:sequence>
            <xs:element name="migration" type="tns:MetadataSchemaMigrationType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="MetadataSchemaMigrationDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:MetadataSchemaMigrationType"/>
    <xs:complexType name="MetadataSchemaMigrationType">
        <xs:sequence>
            <xs:element name="done" type="xs:boolean" minOccurs="0"/>
            <xs:element name="migrationsLeft" type="xs:integer" minOccurs="0"/>
            <xs:element name="move" type="tns:MetadataSchemaMoveOperationType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="rename" type="tns:MetadataSchemaRenameOperationType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="delete" type="tns:MetadataSchemaDeleteOperationType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="id" type="xs:integer"/>
    </xs:complexType>

    <xs:complexType name="MetadataSchemaMoveOperationType">
        <xs:sequence>
            <xs:element name="from" type="tns:MetadataSchemaHierarchyType" minOccurs="1" maxOccurs="1"/>
            <xs:element name="to" type="tns:MetadataSchemaHierarchyType" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
        <xs:attribute name="type" type="xs:string"/>
    </xs:complexType>

    <xs:complexType name="MetadataSchemaDeleteOperationType">
        <xs:sequence>
            <xs:element name="target" type="tns:MetadataSchemaHierarchyType" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
        <xs:attribute name="type" type="xs:string"/>
    </xs:complexType>

    <xs:complexType name="MetadataSchemaRenameOperationType">
        <xs:sequence>
            <xs:element name="from" type="tns:MetadataSchemaHierarchyType" minOccurs="1" maxOccurs="1"/>
            <xs:element name="to" type="xs:string" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="MetadataSchemaHierarchyType">
        <xs:choice>
            <xs:element name="group" type="tns:MetadataFieldGroupType"/>
            <xs:element name="field" type="tns:MetadataFieldType"/>
        </xs:choice>
    </xs:complexType>
	<xs:element name="EssenceVersionListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:EssenceVersionListType"/>
	<xs:complexType name="EssenceVersionListType">
		<xs:sequence>
		    <xs:element name="version" minOccurs="0" maxOccurs="unbounded">
		    	<xs:complexType>
		    		<xs:sequence>
		    			<xs:element name="id" type="xs:int" minOccurs="1" maxOccurs="1" />
		    			<xs:element name="uri" type="xs:string" minOccurs="1" maxOccurs="1" />
		    			<xs:element name="created" type="xs:dateTime" minOccurs="0" maxOccurs="1" />
		    		</xs:sequence>
		    	</xs:complexType>
		    </xs:element>
		</xs:sequence>
	</xs:complexType>

	<xs:element name="EssenceVersionDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:EssenceVersionType"/>
	<xs:complexType name="EssenceVersionType">
		<xs:sequence>
			<xs:element name="created" type="xs:dateTime" minOccurs="0" maxOccurs="1" />
			<xs:element name="shape" type="tns:ShapeType" minOccurs="0" maxOccurs="unbounded" />
		</xs:sequence>
	</xs:complexType>

  <xs:element name="DocumentListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:DocumentListType"/>
  <xs:complexType name="DocumentListType">
    <xs:sequence>
        <xs:element name="hits" type="xs:integer" minOccurs="0" maxOccurs="1"/>
        <xs:element name="document" minOccurs="0" maxOccurs="unbounded">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1" />
              <xs:element name="uri" type="xs:string" minOccurs="1" maxOccurs="1" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
    </xs:sequence>
  </xs:complexType>
    <xs:element name="VXAJobListDocument" type="tns:VXAJobListType"/>
    <xs:complexType name="VXAJobListType">
        <xs:sequence>
            <xs:element name="hits" type="xs:integer"/>
            <xs:element name="job" type="tns:VXAJobType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="VXAJobDocument" type="tns:VXAJobType"/>
    <xs:complexType name="VXAJobType">
        <xs:sequence>
            <xs:element name="vxaId" type="xs:string"/>
            <xs:element name="vxaName" type="xs:string"/>
            <xs:element name="user" type="xs:string"/>
            <xs:element name="jobId" type="xs:long"/>
            <xs:element name="uuid" type="xs:string"/>
            <xs:element name="type" type="xs:string"/>
            <xs:element name="instance" type="xs:string"/>
            <xs:element name="status" type="xs:string"/>
            <xs:element name="errorMessage" type="xs:string"/>
            <xs:element name="progress" type="xs:double"/>
            <xs:element name="itemId" type="xs:string"/>
            <xs:element name="filename" type="xs:string"/>
            <xs:element name="startTime" type="xs:dateTime"/>
            <xs:element name="plugin" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:simpleContent>
                        <xs:extension base="xs:string">
                            <xs:attribute name="name" type="xs:string"/>
                        </xs:extension>
                    </xs:simpleContent>
                </xs:complexType>
            </xs:element>
            <xs:element name="jobConfiguration" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="configuration" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="WebsocketUpdateListDocument" type="tns:WebsocketUpdateListType"/>
    <xs:complexType name="WebsocketUpdateListType">
        <xs:sequence>
            <xs:element name="entry" type="tns:WebsocketUpdateType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="WebsocketUpdateDocument" type="tns:WebsocketUpdateType"/>
    <xs:complexType name="WebsocketUpdateType">
        <xs:choice>
            <xs:element name="item" type="tns:ItemType"/>
            <xs:element name="job" type="tns:JobType"/>
            <xs:element name="vxaJob" type="tns:VXAJobType"/>
            <xs:element name="quota" type="tns:QuotaRuleType"/>
            <xs:element name="storage" type="tns:StorageType"/>
            <xs:element name="vxa" type="tns:VXAUpdateType"/>
        </xs:choice>
    </xs:complexType>
    <xs:element name="WebsocketUpdateRequestDocument" type="tns:WebsocketUpdateRequestType"/>
    <xs:complexType name="WebsocketUpdateRequestType">
        <xs:sequence>
            <xs:element name="item" type="tns:ItemSearchType" minOccurs="0"/>
            <xs:element name="job" type="tns:JobFilterType" minOccurs="0"/>
            <xs:element name="vxaJob" type="tns:JobFilterType" minOccurs="0"/>
            <xs:element name="quota" type="tns:QuotaFilterType" minOccurs="0"/>
            <xs:element name="storage" type="tns:StorageFilterType" minOccurs="0"/>
            <xs:element name="vxa" type="tns:IDFilterType" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="JobFilterType">
        <xs:sequence>
            <xs:element name="type" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="username" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="state" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="jobmetadata" type="tns:SimpleMetadataType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="QuotaFilterType">
        <xs:sequence>
            <xs:element name="username" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="groupname" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="exceeded" type="xs:boolean" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="StorageFilterType">
        <xs:sequence>
            <xs:element name="id" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="vxaId" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="IDFilterType">
        <xs:sequence>
            <xs:element name="id" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="VXAUpdateDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:VXAUpdateType" />
    <xs:complexType name="VXAUpdateType">
        <xs:sequence>
            <xs:element name="vxaId" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="user" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="added" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="deleted" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="removedShare" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="addedShare" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:simpleType name="ExportTemplateArchiveType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="ZIP"/>
            <xs:enumeration value="TAR"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="ExportTemplateCompressType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="GZ"/>
            <xs:enumeration value="BZIP2"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:group name="ExportTemplateChoiceGroup">
    <xs:choice>
        <xs:element name="archive" type="tns:ExportTemplateArchive" />
        <xs:element name="collection" type="tns:ExportTemplateCollection" />
        <xs:element name="component" type="tns:ExportTemplateComponent" />
        <xs:element name="componentfile" type="tns:ExportTemplateComponentFile" />
        <xs:element name="compress" type="tns:ExportTemplateCompress" />
        <xs:element name="dummy" type="tns:ExportTemplateDummy" />
        <xs:element name="external" type="tns:ExportTemplateExternal" />
        <xs:element name="folder" type="tns:ExportTemplateFolder" />
        <xs:element name="item" type="tns:ExportTemplateItem" />
        <xs:element name="iterate" type="tns:ExportTemplateIterate" />
        <xs:element name="library" type="tns:ExportTemplateLibrary" />
        <xs:element name="sequence" type="tns:ExportTemplateSequence" />
        <xs:element name="shape" type="tns:ExportTemplateShape" />
        <xs:element name="text" type="tns:ExportTemplateText" />
    </xs:choice>
    </xs:group>

    <xs:complexType name="ExportTemplateType">
        <xs:sequence>
            <xs:element name="tag" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="dependency" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="filter" type="xs:string" minOccurs="0"/>
            <xs:element name="pre" type="tns:ExportTemplateScript" minOccurs="0"/>
            <xs:element name="preRender" type="tns:ExportTemplateScript" minOccurs="0"/>
            <xs:group ref="tns:ExportTemplateChoiceGroup" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="path" type="xs:string" use="optional"/>
    </xs:complexType>

    <xs:complexType name="ExportTemplateFolder">
        <xs:complexContent>
            <xs:extension base="tns:ExportTemplateType"/>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="ExportTemplateArchive">
        <xs:complexContent>
            <xs:extension base="tns:ExportTemplateType">
                <xs:attribute name="method" type="tns:ExportTemplateArchiveType" use="required"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="ExportTemplateCollection">
        <xs:complexContent>
            <xs:extension base="tns:ExportTemplateType">
                <xs:sequence>
                    <xs:element name="collectionId" type="tns:SiteIdType" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="ExportTemplateLibrary">
        <xs:complexContent>
            <xs:extension base="tns:ExportTemplateType">
                <xs:sequence>
                    <xs:element name="libraryId" type="tns:SiteIdType" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="ExportTemplateCompress">
        <xs:complexContent>
            <xs:extension base="tns:ExportTemplateType">
                <xs:attribute name="method" type="tns:ExportTemplateCompressType" use="required"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="ExportTemplateItem">
        <xs:complexContent>
            <xs:extension base="tns:ExportTemplateType">
                <xs:sequence>
                    <xs:element name="itemId" type="tns:SiteIdType" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="ExportTemplateIterate">
        <xs:complexContent>
            <xs:extension base="tns:ExportTemplateType">
                <xs:sequence>
                    <xs:element name="value" type="tns:ExportTemplateScript" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="ExportTemplateShape">
        <xs:complexContent>
            <xs:extension base="tns:ExportTemplateType">
                <xs:sequence>
                    <xs:element name="shapeTag" type="xs:string" minOccurs="0" maxOccurs="1"/>
                    <xs:element name="generate" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="ExportTemplateComponent">
        <xs:complexContent>
            <xs:extension base="tns:ExportTemplateType">
                <xs:sequence>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="ExportTemplateComponentFile">
        <xs:complexContent>
            <xs:extension base="tns:ExportTemplateType">
                <xs:sequence>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="ExportTemplateSequence">
        <xs:complexContent>
            <xs:extension base="tns:ExportTemplateType">
                <xs:sequence>
                    <xs:element name="document" type="tns:ExportTemplateTextContent" minOccurs="0" maxOccurs="1"/>
                    <xs:element name="generate" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:simpleType name="ExportTemplateScript">
        <xs:restriction base="xs:string"/>
    </xs:simpleType>

    <xs:complexType name="ExportTemplateTextContent" mixed="true">
        <xs:group ref="tns:ExportTemplateChoiceGroup" minOccurs="0" maxOccurs="unbounded"/>
        <xs:attribute name="scripttags" type="xs:boolean" use="optional"/>
    </xs:complexType>

    <xs:complexType name="ExportTemplateText">
        <xs:complexContent>
            <xs:extension base="tns:ExportTemplateType">
                <xs:sequence>
                    <xs:element name="content" minOccurs="0" maxOccurs="1" type="tns:ExportTemplateTextContent"/>
                    <xs:element name="xslt" type="xs:string" minOccurs="0" maxOccurs="1"/>
                    <xs:element name="script" type="xs:string" minOccurs="0" maxOccurs="1"/>
                    <xs:element name="xml" minOccurs="0" maxOccurs="1">
                        <xs:complexType>
                            <xs:sequence>
                                <xs:any minOccurs="1" maxOccurs="1" processContents="lax"/>
                            </xs:sequence>
                            <xs:attribute name="indent" type="xs:int" use="optional"/>
                        </xs:complexType>
                    </xs:element>
                </xs:sequence>
                <xs:attribute name="charset" type="xs:string" use="optional"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="ExportTemplateExternal">
        <xs:complexContent>
            <xs:extension base="tns:ExportTemplateType">
                <xs:sequence>
                    <xs:element name="uri" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="ExportTemplateDummy">
        <xs:complexContent>
            <xs:extension base="tns:ExportTemplateType"/>
        </xs:complexContent>
    </xs:complexType>
    <xs:element name="ExportTemplateDocument" type="tns:ExportTemplateType"/>
    <xs:element name="LogReportConfigurationDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:LogReportConfigurationType" />
    <xs:complexType name="LogReportConfigurationType">
        <xs:sequence>
            <xs:element name="path" type="xs:string" minOccurs="0" maxOccurs="1"/> <!-- default: /tmp/LogReport, %TEMP%/LogReport -->
            <xs:element name="expiryTime" type="xs:double" minOccurs="0" maxOccurs="1"/> <!-- default: 7 days -->
            <xs:element name="uploadUri" type="xs:anyURI" minOccurs="0" maxOccurs="1"/>
            <xs:element name="certificate" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="clientKey" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="clientCertificate" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="WaveformDataDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:WaveformDataType" />
    <xs:complexType name="WaveformDataType">
        <xs:sequence>
            <xs:element name="value" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="data" type="xs:double" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element name="stream" type="xs:int" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="channel" type="xs:int" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="itemTrack" type="xs:string" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="fileId" type="tns:SiteIdType" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element name="filePath" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ConstraintValueListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ConstraintValueListType" />
    <xs:complexType name="ConstraintValueListType">
        <xs:sequence>
            <xs:element name="value" type="tns:constraintValueType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="constraintValueType">
        <xs:simpleContent>
            <xs:extension base="xs:string">
                <xs:attribute name="id" type="xs:string" use="required"/>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>
    <xs:element name="MetadataFieldValidationDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:MetadataFieldValidationType" />
    <xs:complexType name="MetadataFieldValidationType">
        <xs:sequence>
            <xs:element name="field" type="tns:MetadataFieldValueType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="constraint" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="field" type="tns:MetadataFieldValueType" minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="MetadataFieldValueConstraintListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:MetadataFieldValueConstraintListType" />
    <xs:complexType name="MetadataFieldValueConstraintListType">
        <xs:sequence>
            <xs:element name="constraint" type="tns:MetadataFieldValueConstraintType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="MetadataFieldValueConstraintType">
        <xs:sequence>
            <xs:element name="field" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="value" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="id" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="MetadataDatasetListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:MetadataDatasetListType"/>
    <xs:complexType name="MetadataDatasetListType">
        <xs:sequence>
            <xs:element name="hits" type="xs:integer" minOccurs="0" maxOccurs="1"/>
            <xs:element name="dataset" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1" />
                        <xs:element name="uri" type="xs:string" minOccurs="1" maxOccurs="1" />
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="CORSConfigurationDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:CORSConfigurationType"/>
    <xs:complexType name="CORSConfigurationType">
        <xs:sequence>
            <xs:element name="entry" type="tns:CORSConfigurationEntry" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="CORSConfigurationEntry">
        <xs:sequence>
            <xs:element name="request" type="tns:CORSConfigurationEntryRequest" minOccurs="1" maxOccurs="unbounded"/>
            <xs:element name="response" type="tns:CORSConfigurationEntryResponse" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="CORSConfigurationEntryRequest">
        <xs:sequence>
            <xs:element name="method" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="origin" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="originRegex" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="pathRegex" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="headerRegex" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="CORSConfigurationEntryResponse">
        <xs:sequence>
            <xs:element name="allowOrigin" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="allowMethods" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="allowHeaders" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="allowMaxAge" type="xs:int" minOccurs="0" maxOccurs="1"/>
            <xs:element name="allowOtherHeader" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="DatabasePurgingConfigurationDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:DatabasePurgingConfigurationType" />
    <xs:complexType name="DatabasePurgingConfigurationType">
        <xs:sequence>
            <xs:element name="changeLog" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="age" minOccurs="0" maxOccurs="1" type="xs:int"/> <!-- remove processed entries older than this number of minutes -->
                        <xs:element name="forceAge" minOccurs="0" maxOccurs="1" type="xs:int"/> <!-- remove any entries older than this number of minutes -->
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="auditTrail" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="age" minOccurs="0" maxOccurs="1" type="xs:int"/> <!-- remove entries older than this number of minutes -->
                        <xs:element name="uri" minOccurs="0" maxOccurs="1" type="xs:anyURI"/> <!-- store to this URI -->
                        <xs:element name="compress" minOccurs="0" maxOccurs="1" type="xs:boolean"/> <!-- store in compressed form, default true -->
                        <xs:element name="batch" minOccurs="0" maxOccurs="1" type="xs:int"/> <!-- process this number of entries each time, default 10000 (if this many number of entries do not exist, purging will pause -->
                        <xs:element name="body" minOccurs="0" maxOccurs="1" type="xs:boolean"/> <!-- include body, default false -->
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="job" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="age" minOccurs="0" maxOccurs="1" type="xs:int"/> <!-- remove entries older than this number of minutes -->
                        <xs:element name="uri" minOccurs="0" maxOccurs="1" type="xs:anyURI"/> <!-- store to this URI -->
                        <xs:element name="compress" minOccurs="0" maxOccurs="1" type="xs:boolean"/> <!-- store in compressed form, default true -->
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="transferLog" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="age" minOccurs="0" maxOccurs="1" type="xs:int"/> <!-- remove finished entries older than this number of minutes -->
                        <xs:element name="forceAge" minOccurs="0" maxOccurs="1" type="xs:int"/> <!-- remove any entries older than this number of minutes, default same as above -->
                        <xs:element name="uri" minOccurs="0" maxOccurs="1" type="xs:anyURI"/> <!-- store to this URI -->
                        <xs:element name="compress" minOccurs="0" maxOccurs="1" type="xs:boolean"/> <!-- store in compressed form, default true -->
                        <xs:element name="batch" minOccurs="0" maxOccurs="1" type="xs:int"/> <!-- process this number of entries each time, default 10000 (if this many number of entries do not exist, purging will pause -->
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="DeletionLockDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:DeletionLockType" />
    <xs:complexType name="DeletionLockType">
        <xs:sequence>
            <xs:element name="id" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="user" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="expiryTime" type="xs:dateTime" minOccurs="1" maxOccurs="1"/>
            <xs:element name="modified" type="xs:dateTime" minOccurs="1" maxOccurs="1"/>
            <xs:element name="entityType" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="entityId" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="metadata" type="tns:SimpleMetadataType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
        <xs:attribute name="isEffective" type="xs:boolean" default="false"/>
        <xs:attribute name="isInherited" type="xs:boolean" default="false"/>
        <xs:attribute name="isExpired" type="xs:boolean" default="false"/>
    </xs:complexType>
    <xs:element name="DeletionLockListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:DeletionLockListType" />
    <xs:complexType name="DeletionLockListType">
        <xs:sequence>
            <xs:element name="lock" type="tns:DeletionLockType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="OAuth2ConfigurationDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:OAuth2ConfigurationType" />
    <xs:complexType name="OAuth2ConfigurationType">
        <xs:sequence>
            <xs:element name="federationMetadataURI" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="federationMetadataInterval" type="xs:int" minOccurs="0" maxOccurs="1"/>
            <xs:element name="expectedAudience" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="validationEndpoint" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="tokenUser" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="x509Certificate" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="publicKey" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="JobPriorityConfigurationDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:JobPriorityConfigurationType"/>
    <xs:complexType name="JobPriorityConfigurationType">
        <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element name="job">
                <xs:complexType>
                    <xs:simpleContent>
                        <xs:extension base="xs:string">
                            <xs:attribute name="type" type="xs:string" use="required"/>
                        </xs:extension>
                    </xs:simpleContent>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ThumbnailSpriteSheetDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ThumbnailSpriteSheetType"/>
    <xs:complexType name="ThumbnailSpriteSheetType">
        <xs:sequence>
            <xs:element name="etag" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="url" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="path" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="thumbnail" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="width" type="xs:int"/>
                        <xs:element name="height" type="xs:int"/>
                        <xs:element name="x" type="xs:int"/>
                        <xs:element name="y" type="xs:int"/>
                        <xs:element name="timecode" type="tns:TimeCodeType"/>
                        <xs:element name="endTimecode" type="tns:TimeCodeType" minOccurs="0" />
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="AnalyzePresetDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:AnalyzePresetType" />

    <xs:complexType name="AnalyzePresetType">
        <xs:sequence>
            <xs:element name="name" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="vidispine" type="tns:AnalyzeJobType" />
            <xs:element name="data" type="tns:KeyValueType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="AnalyzePresetListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:AnalyzePresetListType" />
    <xs:complexType name="AnalyzePresetListType">
        <xs:sequence>
            <xs:element name="preset" type="tns:AnalyzePresetType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    
    <xs:element name="ServiceConfigurationResultDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ServiceConfigurationResultType"/>
    <xs:complexType name="ServiceConfigurationResultType">
        <xs:sequence>
            <xs:element name="serviceName" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="serviceId" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="configurationVersion" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="preCheck" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
            <xs:element name="success" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
            <xs:element name="message" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="executedSteps" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="order" type="xs:int"/>
                        <xs:element name="description" type="xs:string"/>
                        <xs:element name="resource" type="xs:string"/>
                        <xs:element name="result" type="xs:string"/>
                        <xs:element name="success" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="data" type="xs:string" minOccurs="0" maxOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

</xs:schema>

common.xsd

Common elements to API and Transcoder.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://xml.vidispine.com/schema/vidispine"
    elementFormDefault="qualified"
    xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
    jaxb:version="1.0"
    xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
    jaxb:extensionBindingPrefixes="xjc" xmlns:tns="http://xml.vidispine.com/schema/vidispine">

    <xs:simpleType name="SiteIdType">
        <xs:restriction base="xs:string">
            <xs:pattern value="([_A-Za-z]+-)?([A-Za-z_][A-Za-z0-9_]*-|(([A-Za-z_][A-Za-z0-9_]*)?\*))([0-9]{1}[0-9]{0,31})"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="UUIDType">
        <xs:restriction base="xs:string">
            <xs:pattern value="[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:element name="URIListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:URIListType" />
    <xs:complexType name="URIListType">
        <xs:sequence>
            <xs:element name="hits" type="xs:integer" minOccurs="0" maxOccurs="1"/>
            <xs:element name="uri" type="xs:anyURI" maxOccurs="unbounded" minOccurs="0"></xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="MetadataSchemaElementType">
        <xs:attributeGroup ref="tns:MetadataSchemaAttributes"/>
        <xs:attribute name="reference" type="xs:boolean" use="optional"/>
    </xs:complexType>

    <xs:attributeGroup name="MetadataSchemaAttributes">
        <!-- Minimum number of elements -->
        <xs:attribute name="min" type="xs:int" use="required"/>
        <!-- Maximum number of elements. A negative number is regarded as infinity. -->
        <xs:attribute name="max" type="xs:int" use="required"/>
        <xs:attribute name="name" type="xs:string" use="optional"/>
    </xs:attributeGroup>
    <xs:element name="FileDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:FileType" />
    <xs:complexType name="FileType">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="id" type="tns:SiteIdType" minOccurs="0"/>
            <xs:element name="path" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="uri"  type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="state" type="xs:string"/>
            <xs:element name="size" type="xs:long" minOccurs="0"/>
            <xs:element name="hash" type="xs:string" minOccurs="0"/>
            <xs:element name="timestamp" type="xs:dateTime" minOccurs="0"/>
            <xs:element name="refreshFlag" type="xs:int" minOccurs="0"/>
            <xs:element name="sequence" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="storage" type="tns:SiteIdType" minOccurs="0"/>
            <xs:element name="storageDefinition" type="tns:StorageType" minOccurs="0"/>
            <xs:element name="item" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="id" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="shape" minOccurs="0" maxOccurs="unbounded">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="id" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
                                    <xs:element name="component" minOccurs="0" maxOccurs="unbounded">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="id" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
                                            </xs:sequence>
                                        </xs:complexType>
                                    </xs:element>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="metadata" type="tns:SimpleMetadataType" minOccurs="0" maxOccurs="1" />
            <xs:element name="range" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:attribute name="start" type="xs:string" use="required"/>
                    <xs:attribute name="count" type="xs:long" use="required"/>
                </xs:complexType>
            </xs:element>
            <xs:element name="type" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <!-- Stuff for Shape starts here -->
    <xs:complexType name="ResolutionType">
        <xs:sequence>
            <xs:element name="width" type="xs:unsignedInt"/>
            <xs:element name="height" type="xs:unsignedInt"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="RationalType">
        <xs:sequence>
            <xs:element name="numerator" type="xs:int"/>
            <xs:element name="denominator" type="xs:int"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="TimeBaseType">
        <xs:complexContent>
            <xs:extension xmlns:tns="http://xml.vidispine.com/schema/vidispine" base="tns:RationalType"/>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="FrameRateType">
        <xs:complexContent>
            <xs:extension xmlns:tns="http://xml.vidispine.com/schema/vidispine" base="tns:RationalType"/>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="TimeCodeType">
        <xs:sequence>
            <xs:element name="samples" type="xs:long"/>
            <xs:element name="timeBase" type="tns:TimeBaseType"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="TimeIntervalType">
        <xs:sequence>
            <xs:element name="start" type="tns:TimeCodeType" minOccurs="0"/>
            <xs:element name="end"   type="tns:TimeCodeType" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="AspectRatioType">
        <xs:sequence>
            <xs:element name="horizontal" type="xs:unsignedInt"/>
            <xs:element name="vertical" type="xs:unsignedInt"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ComponentListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ComponentListType" />

    <xs:complexType name = "ComponentListType">
        <xs:sequence>
            <xs:element name="component" minOccurs="0" maxOccurs="unbounded" type="tns:ComponentType" />
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ComponentDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ComponentType" />
    <xs:complexType name="ComponentType">
        <xs:sequence>
            <xs:element name="file" type="tns:FileType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="id" type="tns:SiteIdType" minOccurs="0"/>

            <!-- Flat metadata, meaning a simple list of key-value pairs.
                 This has been put in ComponentType since both ContainerComponent and the MediaComponents
                 have metadata. In other words, files can have both global and stream-specific metadata.
            -->
            <xs:element name="metadata" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="BinaryComponentDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:BinaryComponentType" />
    <xs:complexType name="BinaryComponentType">
        <xs:complexContent>
            <xs:extension xmlns:tns="http://xml.vidispine.com/schema/vidispine" base="tns:ComponentType">
                <xs:sequence>
                    <xs:element name="format" type="xs:string" minOccurs="0"/>      <!-- Example: idv3 -->
                    <xs:element name="encoding" type="xs:string" minOccurs="0"/>    <!-- Example: base64, gzip -->
                    <xs:element name="offset" type="xs:long" minOccurs="0"/>
                    <xs:element name="length" type="xs:long" minOccurs="0"/>
                    <xs:element name="mediaInfo" type="tns:BaseMediaInfoType" minOccurs="0"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:element name="ContainerComponentDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ContainerComponentType" />
    <xs:complexType name="ContainerComponentType">
        <xs:complexContent>
            <xs:extension xmlns:tns="http://xml.vidispine.com/schema/vidispine" base="tns:ComponentType">
                <xs:sequence>
                    <xs:element name="duration" type="tns:TimeCodeType" minOccurs="0"/>
                    <xs:element name="format" type="xs:string" minOccurs="0"/>

                    <!-- Sub format.
                         This field was created for transcoder ticket #186.
                         Its exact function isn't set in stone yet.
                         Possible values:

                         * Unset
                         * "mxf_d10"
                    -->
                    <xs:element name="subFormat" type="xs:string" minOccurs="0"/>

                    <xs:element name="firstSMPTETimecode" type="xs:string" minOccurs="0"/>

                    <!-- Corresponds to StartTimecode in TimecodeComponent in MXF -->
                    <xs:element name="startTimecode" type="xs:long" minOccurs="0"/>

                    <!-- First timestamp in container -->
                    <xs:element name="startTimestamp" type="tns:TimeCodeType" minOccurs="0"/>

                    <!-- Corresponds to RoundedTimeBase in TimecodeComponent in MXF -->
                    <xs:element name="roundedTimeBase" type="xs:int" minOccurs="0"/>

                    <!-- Corresponds to DropFrame in TimecodeComponent in MXF -->
                    <xs:element name="dropFrame" type="xs:boolean" minOccurs="0"/>
                    <xs:element name="timeCodeTimeBase" type="tns:TimeBaseType" minOccurs="0" />
                    <xs:element name="mediaInfo" type="tns:BaseMediaInfoType" minOccurs="0"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:element name="DescriptorComponentDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:DescriptorComponentType" />
    <xs:complexType name="DescriptorComponentType">
        <xs:complexContent>
            <xs:extension xmlns:tns="http://xml.vidispine.com/schema/vidispine" base="tns:ComponentType">
                <xs:sequence>
                    <xs:element name="description" minOccurs="0" maxOccurs="unbounded">
                        <xs:complexType>
                            <xs:simpleContent>
                                <xs:extension base="xs:string">
                                    <xs:attribute name="type" type="xs:string" use="required"/>
                                </xs:extension>
                            </xs:simpleContent>
                        </xs:complexType>
                    </xs:element>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:element name="SubtitleComponentDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:SubtitleComponentType" />
    <xs:complexType name="SubtitleComponentType">
        <xs:complexContent>
            <xs:extension xmlns:tns="http://xml.vidispine.com/schema/vidispine" base="tns:MediaComponentType">
                <!--<xs:sequence>
                    <xs:element name="description" minOccurs="0" maxOccurs="unbounded">
                        <xs:complexType>
                            <xs:simpleContent>
                                <xs:extension base="xs:string">
                                    <xs:attribute name="type" type="xs:string" use="required"/>
                                </xs:extension>
                            </xs:simpleContent>
                        </xs:complexType>
                    </xs:element>
                </xs:sequence>-->
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>


    <xs:complexType name="EDLType">
        <xs:sequence>
            <!-- MOV specifies length in terms of the mvhd time scale, which is simply an integer.
                 In other words, NTSC files have a time scale of 2997, not 30000/1001.
                 The transcoder fixes up timestamps given from mov.c, so 1700@2997 becomes 17@NTSC and stores the corrected time scale here.
            -->
            <xs:element name="timeScale" type="tns:TimeBaseType"/>
            <!-- Explicit time base for EDLEntryType.start values.
                 The purpose of this field is to reduce confusion where exactly the time base for the start values is taken from.
                 Using this field also removes the need for running a shape deduction step in order to figure out the time base for each stream.
                 In other words: not using this field results in hairy behavior.
                 See T#208.
            -->
            <xs:element name="timeBase" type="tns:TimeBaseType" minOccurs="0"/>
            <xs:element name="entry" type="tns:EDLEntryType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="EDLEntryType">
        <xs:attribute name="start" type="xs:long" use="required"/>      <!-- In MediaComponentType/timeBase units -->
        <xs:attribute name="length" type="xs:long" use="required"/>     <!-- In EDLType/timeScale units -->
        <xs:attribute name="mediaRate" type="xs:int" use="required"/>   <!-- 16.16 fixed-point, meaning divide by 65536 to get the actual rate. Non-float to promote losslessness. Should be > 0 -->
    </xs:complexType>

    <xs:complexType name="MediaComponentType">
        <xs:complexContent>
            <xs:extension xmlns:tns="http://xml.vidispine.com/schema/vidispine" base="tns:ComponentType">
                <xs:sequence>
                    <xs:element name="codec" type="xs:string" minOccurs="0"/>
                    <xs:element name="timeBase" type="tns:TimeBaseType" minOccurs="0"/>
                    <xs:element name="itemTrack" type="xs:string" minOccurs="0"/>
                    <xs:element name="essenceStreamId" type="xs:unsignedShort" minOccurs="0"/>
                    <xs:element name="interval" type="tns:TimeIntervalType" minOccurs="0"/>
                    <xs:element name="bitrate" type="xs:unsignedInt" minOccurs="0"/>
                    <xs:element name="numberOfPackets" type="xs:long" minOccurs="0"/>
                    <xs:element name="extradata" type="xs:hexBinary" minOccurs="0"/>
                    <xs:element name="pid" type="xs:int" minOccurs="0"/>
                    <xs:element name="duration" type="tns:TimeCodeType" minOccurs="0"/>         <!-- Length of stream - may be different among components in the same file -->
                    <xs:element name="profile" type="xs:int" minOccurs="0"/>                    <!-- Corresponds to AVCodecContext::profile -->
                    <xs:element name="level" type="xs:int" minOccurs="0"/>                      <!-- Corresponds to AVCodecContext::level -->
                    <xs:element name="edl" type="tns:EDLType" minOccurs="0"/>                   <!-- Edit Decision List - derived from elst tags -->
                    <xs:element name="startTimestamp" type="tns:TimeCodeType" minOccurs="0"/>   <!-- First timestamp in media -->
                    <xs:element name="repeatCount" type="xs:unsignedLong" minOccurs="0"/>
                    <xs:element name="trackOrder" type="xs:int" minOccurs="0"/>
                    <xs:element name="segment" type="xs:int" minOccurs="0"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- Returns various fields parsed by libmediainfo -->
    <xs:complexType name="BaseMediaInfoType">
        <xs:sequence>
            <xs:element name="Bit_rate_mode" type="xs:string" minOccurs="0"/>               <!-- "Bit rate mode" like "CBR" or "VBR" -->
            <xs:element name="Source" type="xs:string" minOccurs="0"/>                      <!-- "Source". QT-ref source media file, like "media.dir/foo.m2v" -->
            <xs:element name="property" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="AudioMediaInfoType">
        <xs:complexContent>
            <xs:extension xmlns:tns="http://xml.vidispine.com/schema/vidispine" base="tns:BaseMediaInfoType">
                <xs:sequence/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="VideoMediaInfoType">
        <xs:complexContent>
            <xs:extension xmlns:tns="http://xml.vidispine.com/schema/vidispine" base="tns:BaseMediaInfoType">
                <xs:sequence>
                    <xs:element name="Format_Settings_GOP" type="xs:string" minOccurs="0"/>         <!-- "Format settings, GOP0" like "N=1" (intra-only) or "M=2, N=60" -->
                    <xs:element name="intra_dc_precision" type="xs:int" minOccurs="0"/>             <!-- "intra_dc_precision". 8, 9, 10 or 11 if set -->
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:element name="AudioComponentDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:AudioComponentType" />
    <xs:complexType name="AudioComponentType">
        <xs:complexContent>
            <xs:extension xmlns:tns="http://xml.vidispine.com/schema/vidispine" base="tns:MediaComponentType">
                <xs:sequence>
                    <xs:element name="channelCount" type="xs:unsignedShort"/>
                    <xs:element name="channelLayout" type="xs:long" minOccurs="0"/>
                    <xs:element name="sampleFormat" type="xs:string" minOccurs="0"/>
                    <xs:element name="frameSize" type="xs:unsignedInt" minOccurs="0"/>
                    <xs:element name="blockAlign" type="xs:unsignedInt" minOccurs="0"/>

                    <xs:element name="mediaInfo" type="tns:AudioMediaInfoType" minOccurs="0"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:element name="VideoComponentDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:VideoComponentType" />
    <xs:complexType name="VideoComponentType">
        <xs:complexContent>
            <xs:extension xmlns:tns="http://xml.vidispine.com/schema/vidispine" base="tns:MediaComponentType">
                <xs:sequence>
                    <xs:element name="videoStandard" minOccurs="0" maxOccurs="1">
                        <xs:complexType>
                            <xs:simpleContent>
                                <xs:extension base="xs:string">
                                    <xs:attribute name="type" type="xs:string" use="required"/>
                                </xs:extension>
                            </xs:simpleContent>
                        </xs:complexType>
                    </xs:element>
                    <xs:element name="resolution" type="tns:ResolutionType" minOccurs="0"/>
                    <xs:element name="pixelFormat" type="xs:string" minOccurs="0"/>
                    <xs:element name="maxBFrames" type="xs:unsignedShort" minOccurs="0"/>
                    <xs:element name="pixelAspectRatio" type="tns:AspectRatioType" minOccurs="0"/>

                    <!-- Field order
                            "progressive" for progressive video
                            "F1" for interlaced in "top field first" order
                            "F2" for interlaced in "bottom field first" order

                         Note that the meaning of F1 and F2 are opposite to S314m where Field 1 is the bottom (odd) field and vice versa.
                         This was not known when this element was introduced, and changing this is likely to result in problems.
                    -->
                    <xs:element name="fieldOrder" type="xs:string" minOccurs="0"/>
                    <xs:element name="codecTimeBase" type="tns:TimeBaseType" minOccurs="0"/>
                    <xs:element name="averageFrameRate" type="tns:TimeBaseType" minOccurs="0"/>
                    <xs:element name="realBaseFrameRate" type="tns:TimeBaseType" minOccurs="0"/>

                    <!-- MXF-ish display rectangle.
                         This means values straight from CDCIDescriptor for MXF,
                         but scaled down by SAR for clap in MOV.
                         In other words, "to display" space, not "displayed" (aka raster) space.
                    -->
                    <xs:element name="displayWidth" type="tns:RationalType" minOccurs="0"/>
                    <xs:element name="displayHeight" type="tns:RationalType" minOccurs="0"/>
                    <xs:element name="displayXOffset" type="tns:RationalType" minOccurs="0"/>
                    <xs:element name="displayYOffset" type="tns:RationalType" minOccurs="0"/>

                    <!-- DAR = displayWidth/displayHeight * containerSAR -->
                    <xs:element name="containerSAR" type="tns:AspectRatioType" minOccurs="0"/>

                    <xs:element name="colr_primaries" type="xs:int" minOccurs="0"/>
                    <xs:element name="colr_transfer_function" type="xs:int" minOccurs="0"/>
                    <xs:element name="colr_matrix" type="xs:int" minOccurs="0"/>
                    <xs:element name="max_packet_size" type="xs:int" minOccurs="0"/>

                    <!-- Codec-level time code information - typically set from the 25-bit value in the first MPEG-2 GOP header.
                         Use averageFrameRate in lieu of RoundedTimeBase.
                    -->
                    <xs:element name="startTimecode" type="xs:long" minOccurs="0"/>
                    <xs:element name="dropFrame" type="xs:boolean" minOccurs="0"/>

                    <!-- needed to get H.264 decoding working properly in some cases -->
                    <xs:element name="ticks_per_frame" type="xs:int" minOccurs="0"/>

		    <!-- Added for T#135 -->
		    <!-- Bit depth (default 8) -->
		    <xs:element name="bitDepth" type="xs:int" minOccurs="0"/>
		    <xs:element name="bitsPerPixel" type="xs:int" minOccurs="0"/>

		    <!-- Color primaries in string form (c.f.  colr_primaries above -->
		    <xs:element name="colorPrimaries" type="xs:string" minOccurs="0"/>

                    <xs:element name="mediaInfo" type="tns:VideoMediaInfoType" minOccurs="0"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:element name="ShapeDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ShapeType"/>
    <xs:complexType name="ShapeType">
        <xs:sequence>
            <xs:element name="id" type="tns:SiteIdType" minOccurs="0"/>
            <xs:element name="created" type="xs:dateTime" minOccurs="0" maxOccurs="1" />
            <xs:element name="essenceVersion" type="xs:int" minOccurs="0" maxOccurs="1"/>
            <xs:element name="tag" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="mimeType" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="uuid" type="tns:UUIDType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="binaryComponent" type="tns:BinaryComponentType" minOccurs="0" maxOccurs="unbounded"/>
            <!-- container is optional since we might create a ShapeType which merely helps point to source material -->
            <xs:element name="containerComponent" type="tns:ContainerComponentType" minOccurs="0"/>
            <xs:element name="descriptorComponent" type="tns:DescriptorComponentType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="audioComponent" type="tns:AudioComponentType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="videoComponent" type="tns:VideoComponentType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="subtitleComponent" type="tns:SubtitleComponentType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="metadata" minOccurs="0" maxOccurs="1" type="tns:SimpleMetadataType"/>
            <xs:element name="item" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="id" type="tns:SiteIdType" minOccurs="0" maxOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <!-- Types for bulky metadata -->
    <xs:element name="BulkyMetadataDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:BulkyMetadataType"/>
    <xs:complexType name="BulkyMetadataType">
        <xs:sequence>
            <xs:element name="field" type="tns:BulkyMetadataPairType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="id" type="tns:SiteIdType" use="optional"/>
    </xs:complexType>
    <xs:complexType name="BulkyMetadataPairType">
        <xs:sequence>
            <xs:element name="key" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:choice>
                <xs:element name="value" type="xs:string" minOccurs="1" maxOccurs="1"/>
                <xs:element name="maps" type="tns:BulkyMapListType" minOccurs="1" maxOccurs="1"/>
            </xs:choice>
        </xs:sequence>
        <xs:attribute name="start" type="xs:string" use="optional"/>
        <xs:attribute name="end" type="xs:string" use="optional"/>
        <xs:attribute name="stream" type="xs:int" use="optional"/>
        <xs:attribute name="channel" type="xs:int" use="optional"/>
        <xs:attribute name="itemTrack" type="xs:string" use="optional"/>
    </xs:complexType>
    <xs:element name="BulkyMapListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:BulkyMapListType"/>
    <xs:complexType name="BulkyMapListType">
        <xs:sequence>
            <xs:element name="map" type="tns:BulkyMapType" minOccurs="1" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="BulkyMapType">
        <xs:sequence>
            <xs:element name="entry" type="tns:BulkyMapEntryType" minOccurs="1" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="BulkyMapEntryType">
        <xs:simpleContent>
            <xs:extension base="xs:string">
                <xs:attribute name="key" type="xs:string" use="required"/>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>



    <!-- Types for requesting merging according to a timeline (aka pasting together resources) -->
    <xs:element name="TimelineJobRequestDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:TimelineJobRequestType" />
    <xs:complexType name="TimelineJobRequestType">
        <xs:complexContent>
            <xs:extension base="tns:TranscoderJobType">
        <xs:sequence>
            <xs:element name="outputUri" type="xs:anyURI"/>
            <xs:element name="containerFormat" type="xs:string"/>
            <xs:element name="stream" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="input" maxOccurs="unbounded">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="uri" type="xs:anyURI"/>
                                    <xs:element name="stream" type="xs:unsignedShort"/>
                                    <xs:element name="interval" type="tns:TimeIntervalType"/>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                    </xs:sequence>
                </xs:complexType>

            </xs:element>

            <!--xs:choice>
                <xs:element name="simpleTimeline" type="tns:SimpleTimelineType"/>
                <xs:element name="timeline" type="tns:TimelineType"/>
            </xs:choice>
            <xs:element name="thumbnailResourceUri" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/-->
        </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="ComplexJobOTIFType">
        <xs:sequence>
            <xs:element name="trackerPlugin" type="xs:string" minOccurs="1"/>
            <xs:element name="versionMajor" type="xs:int" minOccurs="1"/>
            <xs:element name="versionMinor" type="xs:int" minOccurs="1"/>
            <xs:element name="versionPatch" type="xs:int" minOccurs="1"/>
            <xs:element name="bulkyMetadataURI" type="xs:anyURI" minOccurs="0" maxOccurs="1" />
            <xs:element name="configuration" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="resource" type="tns:NameURIPairType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <!-- Types for requesting a more complex "map this to that" type of transcode job -->
    <xs:complexType name="ComplexJobOutputType">
        <xs:sequence>
            <!-- Use multiple id element to multiplex the encoded data to multiple
                 files without having to encode more than once
            -->
            <xs:element name="id" type="xs:int" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="start" type="tns:TimeCodeType" minOccurs="0"/>
            <xs:element name="codec" type="xs:string" minOccurs="0"/>

            <!-- FOURCC. Corresponds to codec_tag in libav* terms,
                 hence the name. Typically a four-character ASCII string.
                 May need to be fairly arbitrary constants though, so
                 an xs:string is insufficient. Hence an int is used.

                 An earlier way of setting the codecTag for four-character
                 strings was to set the first character as the LSB and so on.
                 In other words:
                  "ai55" -> 'a' + ('i' << 8) + ('5' << 16) + ('5' << 24)
                 However, this use has been deprecated.

                 Instead, just set the codecTagString to the character string, as in
                 <codecTagString>ai55</codecTagString>
            -->
            <xs:element name="codecTag" type="xs:unsignedInt" minOccurs="0"/>
            <xs:element name="codecTagString" type="xs:string" minOccurs="0"/>

            <!-- Name that the muxer should use in the output file for the codec.
                 Corresponds to codec_name in libav*.
            -->
            <xs:element name="codecName" type="xs:string" minOccurs="0"/>

            <xs:element name="bitrate" type="xs:unsignedInt" minOccurs="0"/>
            <xs:element name="timeBase" type="tns:TimeBaseType" minOccurs="0"/>

            <!-- Profile/presets to use.
                 MainConcept examples: "ipod", "baseline", "main", "high".
                 For libavcodec, see presets/ directory. Examples: "main", "normal", "hq".
            -->
            <xs:element name="preset" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>

            <!-- Edit Decision List -->
            <xs:element name="edl" type="tns:EDLType" minOccurs="0"/>

            <xs:element name="setting" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded"/>

            <xs:element name="objectTracking" type="tns:ComplexJobOTIFType" minOccurs="0" maxOccurs="1"/>

            <xs:element name="metadata" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ComplexJobAudioOutputType">
        <xs:complexContent>
            <xs:extension xmlns:tns="http://xml.vidispine.com/schema/vidispine" base="tns:ComplexJobOutputType">
                <xs:sequence>
                    <!-- See generateThumbnails/uri -->
                    <xs:element name="thumbnailUri" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>    <!-- If set, upload thumbnail to specified URIs -->
                    <xs:choice minOccurs="0" maxOccurs="1" >
                        <xs:element name="channelLayout" type="xs:long"/>           <!-- binary representation, ex: 5.1 => 1551, see ffmpeg channel_layout.h -->

                        <!--* name can be one or several of the following notations,
                            * separated by '+' or '|':
                            * - the name of an usual channel layout (mono, stereo, 4.0, quad, 5.0,
                            *   5.0(side), 5.1, 5.1(side), 7.1, 7.1(wide), downmix);
                            * - the name of a single channel (FL, FR, FC, LFE, BL, BR, FLC, FRC, BC,
                            *   SL, SR, TC, TFL, TFC, TFR, TBL, TBC, TBR, DL, DR);
                            * - a number of channels, in decimal, followed by 'c', yielding
                            *   the default channel layout for that number of channels (@see
                            *   av_get_default_channel_layout);
                            * - a channel layout mask, in hexadecimal starting with "0x" (see the
                            *   AV_CH_* macros).
                            *
                            * Example: "stereo+FC" = "2c+FC" = "2c+1c" = "0x7" git -->
                        <xs:element name="channelLayoutName" type="xs:string"/>
                    </xs:choice>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="OverlayType">
        <xs:sequence>
            <!-- URI for image to overlay
                 Should use a pixel format suitable for alpha blending,
                 like 8-bit RGBA.
            -->
            <xs:element name="uri" type="xs:anyURI" maxOccurs="unbounded"/>
            <xs:element name="range" type="tns:SequenceRangeType" maxOccurs="unbounded"/>
            <xs:element name="id" minOccurs="0" maxOccurs="1" type="tns:SiteIdType"/>

            <!-- Coordinates in video to place overlay at. Can be negative -->
            <xs:element name="x" type="xs:int"/>
            <xs:element name="y" type="xs:int"/>

            <!-- Optional: time interval to perform overlay in -->
            <xs:element name="interval" type="tns:TimeIntervalType" minOccurs="0"/>
            <xs:element name="opacity" minOccurs="0" maxOccurs="1" type="xs:int"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="TextOverlayType">
        <xs:sequence>
            <xs:element name="text" type="tns:TextRenditionType"/>

            <!-- Optional: time interval to perform overlay in -->
            <xs:element name="interval" type="tns:TimeIntervalType" minOccurs="0"/>
            <xs:element name="opacity" minOccurs="0" maxOccurs="1" type="xs:int"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ComplexJobVideoOutputType">
        <xs:complexContent>
            <xs:extension xmlns:tns="http://xml.vidispine.com/schema/vidispine" base="tns:ComplexJobOutputType">
                <xs:sequence>
                    <xs:element name="scaling" minOccurs="0" maxOccurs="1" type="tns:ScalingType"/>

                    <!-- Deprecated. Use <scaling> instead -->
                    <xs:element name="resolution" type="tns:ResolutionType" minOccurs="0"/>

                    <!-- Pixel format to use, like "yuv420p", "yuv422p", "uyvy422" etc. -->
                    <xs:element name="pixelFormat" type="xs:string" minOccurs="0"/>

                    <xs:element name="gopSize" type="xs:unsignedShort" minOccurs="0"/>
                    <xs:element name="maxBFrames" type="xs:unsignedShort" minOccurs="0"/>

                    <!-- rc_buffer_size, size of VBV buffer -->
                    <xs:element name="rcBufferSize" type="xs:unsignedInt" minOccurs="0"/>

                    <!-- rc_initial_buffer_occupancy. Should equal rc_buffer_size
                         when encoding CBR
                    -->
                    <xs:element name="rcInitialBufferOccupancy" type="xs:unsignedInt" minOccurs="0"/>

                    <!-- Minimum and maximum bitrate. Typically used for CBR output.
                         Note that for CBR, such as IMX50, you must also set
                         rcBufferSize and rcInitialOccupancy appropriately.
                         In the IMX50 case they should both be at least 2 Mbit
                         and equal.
                    -->
                    <xs:element name="minBitrate" type="xs:unsignedInt" minOccurs="0"/>
                    <xs:element name="maxBitrate" type="xs:unsignedInt" minOccurs="0"/>

                    <xs:element name="colorSiting" type="xs:unsignedShort" minOccurs="0"/>   <!-- Color Siting info for MXF output, see SMPTE 377M, E.2.35 -->
                    <xs:element name="generateThumbnails" minOccurs="0">
                        <xs:complexType>
                            <xs:sequence>
                                <!-- If set, send thumbnails to the specified URI, replacing "callback" with the licensing IP.
                                     For example, if the transcoder has been given a license by 12.34.56.78 then setting this to

                                      http://callback:8080/API/item/VX-1234/thumbnail

                                     results in a thumbnail at 0@PAL being PUT to:

                                      http://12.34.56.78:8080/API/item/VX-1234/thumbnail/0@PAL
                                -->
                                <xs:element name="uri" type="xs:anyURI" maxOccurs="unbounded"/>
                                <xs:element name="minDelay" type="tns:TimeCodeType" minOccurs="0"/>
                                <xs:element name="maxDelay" type="tns:TimeCodeType" minOccurs="0"/>
                                <xs:element name="background" type="xs:string" minOccurs="0" maxOccurs="1"/>
                                <!-- If set, use scene change detection instead of grabbing one frame every 10th second.
                                     This only has to be set - its value can be anything, even the empty string.
                                     It should really be an optional boolean, but we keep it as an optional string for backward compatibility.
                                -->
                                <xs:element name="detectorPlugin" type="xs:string" minOccurs="0"/>
                                <xs:element name="resolution" type="tns:ResolutionType" minOccurs="0"/>
                                <xs:element name="period" type="tns:TimeCodeType" minOccurs="0" maxOccurs="1"/>
                                <xs:element name="bulkyMetadataURI" type="xs:anyURI" minOccurs="0" maxOccurs="1" />
                            </xs:sequence>
                        </xs:complexType>
                    </xs:element>
                    <xs:element name="generatePosters" minOccurs="0">
                        <xs:complexType>
                            <xs:sequence>
                                <xs:element name="background" type="xs:string" minOccurs="0" maxOccurs="1"/>
                                <xs:element name="resolution" type="tns:ResolutionType" minOccurs="0"/>
                                <!-- See generateThumbnails/uri -->
                                <xs:element name="uri" type="xs:anyURI" maxOccurs="unbounded"/>
                                <xs:element name="timeCode" type="tns:TimeCodeType" maxOccurs="unbounded"/>
                                <xs:element name="format" type="xs:string" minOccurs="0" maxOccurs="1"/>
                                <xs:element name="setting" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded"/>
                            </xs:sequence>
                            <xs:attribute name="smallPosters" type="xs:boolean" use="optional"/>
                        </xs:complexType>
                    </xs:element>
                    <xs:element name="detectFaces" minOccurs="0">
                        <xs:complexType>
                            <xs:sequence>
                                <xs:element name="metadataUri" type="xs:anyURI"/>
                                <xs:element name="faceDetectorPlugin" type="xs:string"/>    <!-- maps to TranscoderConfigurationDocument/faceDetectorPlugin/alias -->
                            </xs:sequence>
                        </xs:complexType>
                    </xs:element>
                    <xs:element name="overlay" type="tns:OverlayType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="textOverlay" type="tns:TextOverlayType" minOccurs="0" maxOccurs="unbounded"/>

                    <!-- If set, strip SPS/PPS from packets before handing them off to the muxer.
                         This is required when muxing AVC-Intra for Avid Media Composer, and possibly FCP.
                    -->
                    <xs:element name="stripParameterSets" type="xs:boolean" minOccurs="0"/>

                    <!-- If set, add SPS/PPS to the first packet output by the demuxer for this stream.
                         The data is taken from extradata - set extradata as well if it is not
                         present or if it is incorrect
                    -->
                    <xs:element name="addParameterSets" type="xs:boolean" minOccurs="0"/>

                    <!-- If set, explicitly use this for the parameter set data.
                         If not set, then whatever the demuxer reports as extradata for this stream will be used.
                    -->
                    <xs:element name="parameterSets" type="xs:hexBinary" minOccurs="0"/>

                    <!-- If set, use this level.
                         For H.264, the value of this should be ten times the decimal value of the level.
                         In other words, 1.0 -> 10, 5.1 -> 51 etc.
                         This applies for both libx264 and MainConcept.
                         If used, then profile should also be set (via <preset>).
                    -->
                    <xs:element name="level" type="xs:int" minOccurs="0"/>

                    <!-- Deprecated -->
                    <xs:element name="disableFrameDupDrop" type="xs:boolean" minOccurs="0" />

                    <!-- Use <forceCFR> to force the output to be CFR, according to <timeBase>.
                         For instance, if timeBase = 1/25 then the transcoder will take all frames
                         from the input and make all of them 40 ms long.
                         This is useful for formats where the first few frames have bad durations,
                         or where the framerate of the entire file is demonstrably wrong.
                         Not used when remuxing.
                    -->
                    <xs:element name="forceCFR" type="xs:boolean" minOccurs="0" />

                    <!-- If true, burn the input file's timecode in the output -->
                    <xs:element name="burnTimecode" type="xs:boolean" minOccurs="0" />

                    <!-- Only used for image transcodes -->
                    <xs:element name="imageQuality" type="xs:integer" minOccurs="0" />

                    <!-- MXF-ish display rectangle.
                         This means values straight from CDCIDescriptor for MXF,
                         but scaled down by SAR for clap in MOV.
                         In other words, "to display" space, not "displayed" (aka raster) space.
                    -->
                    <xs:element name="displayWidth" type="tns:RationalType" minOccurs="0"/>
                    <xs:element name="displayHeight" type="tns:RationalType" minOccurs="0"/>
                    <xs:element name="displayXOffset" type="tns:RationalType" minOccurs="0"/>
                    <xs:element name="displayYOffset" type="tns:RationalType" minOccurs="0"/>

                    <!-- DAR = displayWidth/displayHeight * containerSAR -->
                    <xs:element name="containerSAR" type="tns:AspectRatioType" minOccurs="0"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!--
        ScalingType

        Used to set cropping and scaling parameters to the transcoder.

        By default, the transcoder will attempt to maintain the display aspect
        ratio (DAR) of the cropped input. Use targetDAR to specify a different
        DAR to maintain.

        The transcoder will typically try to adjust the PAR so that the cropped
        picture ends up with the correct DAR. This minimizes the amount of
        processing required. Use pixelAspectRatio to set the PAR explicitly, in
        which case either width or height will be adjusted to maintain DAR.

        Use width and height to scale in those dimensions. If only one of them
        is set and PAR is set, the other one will be adjusted so the result
        matches the target DAR. If both are set and and PAR is set, the
        transcoder will take them as is.

        Setting neither width nor height while PAR is set results in undefined
        behavior.

        The transcoder will always double-check the resulting dimensions and PAR
        against the desired DAR. If there's a mismatch, the job will fail. If
        you want to force the transcoder to accept your settings, set targetDAR
        manually to the resulting DAR.
    -->
    <xs:complexType name="ScalingType">
        <xs:sequence>
            <xs:element name="width" minOccurs="0" maxOccurs="1" type="xs:unsignedInt"/>
            <xs:element name="height" minOccurs="0" maxOccurs="1" type="xs:unsignedInt"/>

            <!-- Specifies the number of pixels to crop out of each side.
                 Be careful when cropping odd numbers of pixels in any dimension
                 that is subsampled. For instance, cropping an odd number of
                 lines in YUV 4:2:0. This will cause the chroma siting to shift.
            -->
            <xs:element name="top" minOccurs="0" maxOccurs="1" type="xs:int"/>
            <xs:element name="bottom" minOccurs="0" maxOccurs="1" type="xs:int"/>
            <xs:element name="left" minOccurs="0" maxOccurs="1" type="xs:int"/>
            <xs:element name="right" minOccurs="0" maxOccurs="1" type="xs:int"/>
            <xs:element name="padColor" minOccurs="0" maxOccurs="1" type="xs:string"/> <!-- HTML (#rrggbb), if crop is negative -->

            <!-- Specifies rotation. If no resolution/PAR is set, the PAR
                 and resolution of the input is inverted to (hopefully)
                 result in a pixel-to-pixel accurate flipping.
                 Valid values are "left", "right" and "upsidedown" for 90, -90 and
                 180 degrees rotation, respectively
            -->
            <xs:element name="rotate" minOccurs="0" maxOccurs="1" type="xs:string"/>

            <!-- PAR -->
            <xs:element name="pixelAspectRatio" minOccurs="0" maxOccurs="1" type="tns:AspectRatioType"/>

            <!-- Desired display aspect ratio -->
            <xs:element name="targetDAR" minOccurs="0" maxOccurs="1" type="tns:AspectRatioType"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ComplexJobSubtitleOutputType">
        <xs:complexContent>
            <xs:extension xmlns:tns="http://xml.vidispine.com/schema/vidispine" base="tns:ComplexJobOutputType">
                <xs:sequence/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="BorderType">
        <!-- Alpha + RGB color of border -->
        <xs:attribute name="a" type="xs:unsignedByte" use="required"/>
        <xs:attribute name="r" type="xs:unsignedByte" use="required"/>
        <xs:attribute name="g" type="xs:unsignedByte" use="required"/>
        <xs:attribute name="b" type="xs:unsignedByte" use="required"/>

        <!-- Width of border in pixels in display space -->
        <xs:attribute name="width" type="xs:unsignedByte" use="required"/>
    </xs:complexType>

    <xs:complexType name="TransitionType">
        <xs:sequence>
            <xs:element name="duration" type="tns:TimeCodeType"/>
            <xs:choice>
                <!-- SMPTE wipe code (see S258m) -->
                <xs:element name="wipe" type="xs:int"/>

                <!-- Other transition, like "CrossDissolve". Corresponds to Fabric's transitionSubTypeType -->
                <xs:element name="transition" type="xs:string"/>
            </xs:choice>
	    <xs:element name="horizRepeat" type="xs:int" minOccurs="0"/>
	    <xs:element name="vertRepeat" type="xs:int" minOccurs="0"/>

            <!-- startPercentage and endPercentage can optionally be used to override the normal 0-100% transition range -->
            <xs:element name="startPercentage" type="xs:int" minOccurs="0"/>
            <xs:element name="endPercentage" type="xs:int" minOccurs="0"/>

            <!-- If set and true, reverse the direction of the wipe -->
            <xs:element name="reverse" type="xs:boolean" minOccurs="0"/>

            <xs:element name="border" type="tns:BorderType" minOccurs="0"/>
            <xs:element name="color" type="xs:string" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>

    <!-- Generic "I want this stream from that input" type. Works for both audio and video -->
    <xs:complexType name="ComplexJobInputType">
        <xs:sequence>
            <xs:element name="id" type="xs:int"/>
            <xs:element name="stream" type="xs:unsignedShort"/>

            <!-- Optional: transition effect to use when this input is followed by another input in a timeline -->
            <xs:element name="transition" type="tns:TransitionType" minOccurs="0"/>

            <!-- Optional: Use this to set settings for decoders -->
            <xs:element name="setting" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <!--
          Input type for grabbing a specific channel from an input audio stream.
          Several of these as inputs in a connection make it possible to create a new stream from M existing channels in N input streams.
    -->
    <xs:complexType name="ComplexJobAudioChannelMapInputType">
        <xs:complexContent>
            <xs:extension xmlns:tns="http://xml.vidispine.com/schema/vidispine" base="tns:ComplexJobInputType">
                <xs:sequence>
                    <xs:element name="channel" type="xs:unsignedShort"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- Input type for joining together several mono audio sequences
         In other words, this type defines a mono timeline.
         The mono intervals specified by each ComplexJobAudioChannelMapInputType
         element in this type are joined together to produce the output.

         Several ComplexJobAudioChannelSequenceInputType elements are used in
         ComplexJobType to produce a full timeline - one for each channel.

         Note that if no channels need to be extracted separately a
         ComplexJobInputType array should be use instead (see
         ComplexJobType/connection/input).
    -->
    <xs:complexType name="ComplexJobAudioChannelSequenceInputType">
        <xs:sequence>
            <xs:element name="input" type="tns:ComplexJobAudioChannelMapInputType" minOccurs="1" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ComplexJobMixType">
        <xs:sequence>
            <xs:element name="effect" type="tns:EffectType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="id" type="xs:int" use="required"/>
        <xs:attribute name="stream" type="xs:unsignedShort" use="required"/>
        <xs:attribute name="channel" type="xs:unsignedShort" use="required"/>
        <xs:attribute name="gain" type="xs:float" use="required"/>              <!-- linear; 1.0 = 0 dB etc. -->
    </xs:complexType>

    <xs:complexType name="ComplexJobMixInputType">
       <xs:sequence>
            <xs:element name="mix" type="tns:ComplexJobMixType" minOccurs="1" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <!-- Used to request extraction of various types of metadata from input files to be reported to a resource as BulkyMetadata -->
    <xs:complexType name="ComplexJobBulkyMetadataRequestType">
        <xs:sequence>
            <xs:element name="targetUri" type="xs:anyURI"/>                                 <!-- URI to write BulkyMetadata to -->
            <xs:element name="failIfTimecodeNotPresent" type="xs:boolean" minOccurs="0"/>   <!-- If true, fail the job if we didn't find a single timecode -->
        </xs:sequence>
    </xs:complexType>

    <!-- Information needed by the PartialFileDemuxer -->
    <xs:complexType name="PartialFileDemuxerInfoType">
        <xs:sequence>
            <!-- The user can either use a full desriptor or give a URI pointing to one -->
            <xs:choice>
                <xs:element name="descriptor" type="tns:PartialFileDescriptorType"/>
                <xs:element name="descriptorLocation" type="xs:anyURI"/>
            </xs:choice>

            <!-- Offset into original file that ComplexJobType/input/uri
                 consists of. In other words, how far into the file the binary
                 blob was cut.
            -->
            <xs:element name="byteOffset" type="xs:long" minOccurs="0"/>
            <xs:element name="adjustForPTSPredecessors" type="xs:boolean" minOccurs="0" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ComplexJobAtomType">
        <xs:attribute name="uri" type="xs:anyURI" use="required"/>

        <!-- generated if not set -->
        <xs:attribute name="sourcePackageID" type="tns:UMIDType" use="optional"/>
    </xs:complexType>

    <xs:complexType name="AnalyzeAudioChannelType">
        <xs:sequence>
            <xs:element name="tone" type="xs:float" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>

        <!-- Which channel in which stream to use these tones and thresholds for -->
        <xs:attribute name="stream" type="xs:unsignedShort" use="optional"/>
        <xs:attribute name="channel" type="xs:unsignedShort" use="optional"/>

        <!-- Silence threshold. Linear value proportional to maximum sample value.
             In other words:
              0.0  = -inf dB
              0.001=  -30 dB (default)
              1.0  =    0 dB
        -->
        <xs:attribute name="thresh" type="xs:float" use="optional"/>
    </xs:complexType>

    <xs:complexType name="AnalyzeAudioType">
        <xs:sequence>
            <xs:element name="otif" type="tns:ComplexJobOTIFType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="AnalyzeVideoType">
        <xs:sequence>
            <xs:element name="otif" type="tns:ComplexJobOTIFType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="HighlighterType">
        <xs:sequence>
            <xs:element name="model" type="xs:string" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="SmartCropType">
        <xs:sequence>
            <xs:element name="aspect" type="xs:string" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <!-- Used for analyzing input video. See transcoder tickets #82 and #83 -->
    <xs:complexType name="ComplexJobAnalyzeType">
        <xs:sequence>
            <xs:element name="channel" type="tns:AnalyzeAudioChannelType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="audio" type="tns:AnalyzeAudioType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="video" type="tns:AnalyzeVideoType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="highlighter" type="tns:HighlighterType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="smartcrop" type="tns:SmartCropType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
        <xs:attribute name="metadataUri" type="xs:anyURI" use="required"/>

        <!-- Thresholds are relative to the maximum pixel value, meaning values around 0-0.1 are reasonable -->
        <xs:attribute name="blackThresh" type="xs:float" use="optional"/>
        <xs:attribute name="blackPercentage" type="xs:int" use="optional"/>
        <xs:attribute name="barsThresh" type="xs:float" use="optional"/>
        <xs:attribute name="barsPercentage" type="xs:int" use="optional"/>
        <xs:attribute name="freezeThresh" type="xs:float" use="optional"/>
        <xs:attribute name="freezeTime" type="xs:float" use="optional"/>
    </xs:complexType>

    <!-- Used for pairing a resource with a name in the OTIF type -->
    <xs:complexType name="NameURIPairType">
        <xs:sequence>
            <xs:element name="name" minOccurs="1" maxOccurs="1" type="xs:string"/>
            <xs:element name="uri" minOccurs="1" maxOccurs="1" type="xs:anyURI"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="TranscoderJobType">
        <xs:sequence>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ComplexJobOutputFormatType">
        <xs:sequence>
            <xs:element name="id" type="xs:int"/>

            <xs:choice>
                <!-- Normal single-file output -->
                <xs:element name="uri" type="xs:anyURI"/>

                <xs:element name="range" type="tns:SequenceRangeType"/>
                <!-- For multi-OPAtom output (mxf_multiatom*)
                    The number of connections to the muxer must equal the number of atom elements here
                -->
                <xs:element name="atom" type="tns:ComplexJobAtomType" maxOccurs="unbounded"/>
            </xs:choice>

            <xs:element name="containerFormat" type="xs:string"/>
            <xs:element name="overlay" type="tns:OverlayType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="textOverlay" type="tns:TextOverlayType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="dms1Source" minOccurs="0">
                <xs:complexType>
                    <xs:choice>
                        <xs:element name="demuxerId" type="xs:int"/>
                        <xs:element name="metadata" type="tns:DMS1Type"/>
                    </xs:choice>
                </xs:complexType>
            </xs:element>
            <!-- DEPRECATED: String representation of the SMPTE 12M time code to use for the first frame -->
            <xs:element name="initialSMPTETimecode" type="xs:string" minOccurs="0"/>

            <!-- Corresponds to StartTimecode in TimecodeComponent in MXF -->
            <xs:element name="startTimecode" type="xs:long" minOccurs="0"/>

            <!-- Corresponds to RoundedTimeBase in TimecodeComponent in MXF -->
            <xs:element name="roundedTimeBase" type="xs:int" minOccurs="0"/>

            <!-- Corresponds to DropFrame in TimecodeComponent in MXF -->
            <xs:element name="dropFrame" type="xs:boolean" minOccurs="0"/>

            <!-- Set to true if muxing MOV and the user wants the job to fail if any stream lacks an estimate for numberOfPackets -->
            <xs:element name="requireFaststart" type="xs:boolean" minOccurs="0"/>
            <!-- Set to desired bitrate for CBR muxing: Mainly used for mpegts -->
            <xs:element name="muxrate" type="xs:unsignedInt" minOccurs="0"/>

            <!-- If using a muxer that supports outputing a PartialFileDescriptorDocument,
                 setting this causes the resulting document to be written
                 to the specified URI when the job finishes.
            -->
            <xs:element name="pfdTargetUri" type="xs:anyURI" minOccurs="0"/>

            <!-- Material and tape packages to use in the file -->
            <xs:element name="mxfPackages" type="tns:MXFPackagesType" minOccurs="0"/>

            <!-- Global flat metadata -->
            <xs:element name="metadata" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded"/>

            <!-- MaterialPackage -> Name for MXF.
                 Not applicable to most other formats (except maybe MOV).
            -->
            <xs:element name="clipName" type="xs:string" minOccurs="0"/>

            <!-- Controls how the maximum time period that each chunk of samples is going to be, only used for output of QuickTime files (MOV/MP4) -->
            <xs:element name="maxChunkDuration" type="tns:TimeCodeType" minOccurs="0"/>

            <xs:element name="setting" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:element name="ComplexJobDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ComplexJobType" />
    <xs:element name="ImageJobDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ComplexJobType" />
    <xs:complexType name="ComplexJobType">
        <xs:complexContent>
            <xs:extension base="tns:TranscoderJobType">
        <xs:sequence>
            <xs:element name="input" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="id" type="xs:int"/>

                        <!-- Use multiple URIs if transcoding image sequences -->
                        <xs:element name="uri" type="xs:anyURI" maxOccurs="unbounded"/>

                        <xs:element name="range" type="tns:SequenceRangeType" maxOccurs="unbounded"/>

                        <xs:element name="partialFile" type="tns:PartialFileDemuxerInfoType" minOccurs="0"/>
                        <xs:element name="interval" type="tns:TimeIntervalType" minOccurs="0"/>

                        <!-- If set to true, then interval applies to DTS, not PTS.
                             This may be useful if remuxing and the input file lacks PTS:es.
                             We almost always want to filter frames/packets on PTS though.
                             Use of this is discouraged for now.
                        -->
                        <xs:element name="intervalIsDts" type="xs:boolean" minOccurs="0"/>

                        <xs:element name="dms1TargetUri" type="xs:anyURI" minOccurs="0"/>
                        <!-- faststartDuration is needed if muxing MOV and faststart is desired and the number of packets for each stream in the input is unknown or wrong.
                             The transcoder will make an estimate for the number of packets and the muxer will use that to reserve space in the header for the moov tag.
                             Set this value to the length of the input if known through some other means or failing that, set it to a high value like ten hours.

                             The override attribute should be set to true if the transcoder is wrong regarding the duration of the input or the number of packets for some stream.
                        -->
                        <xs:element name="faststartDuration" minOccurs="0">
                            <xs:complexType>
                                <xs:complexContent>
                                    <xs:extension base="tns:TimeCodeType">
                                        <xs:attribute name="override" type="xs:boolean" use="required"/>
                                    </xs:extension>
                                </xs:complexContent>
                            </xs:complexType>
                        </xs:element>
                        <xs:element name="bulkyMetadataRequest" type="tns:ComplexJobBulkyMetadataRequestType" minOccurs="0"/>
                        <!-- Both of these elemets are hacks to handle broken files. The integer is the index of the videostream to which the hack should be applied. -->
                        <xs:element name="scanForStartPTS" type="xs:int" minOccurs="0" />
                        <xs:element name="doubleDurationHack" type="xs:int" minOccurs="0" />

                        <!-- Optional: Use this to set settings for demuxers -->
                        <xs:element name="demuxerSetting" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded"/>

                        <xs:element name="analyze" type="tns:ComplexJobAnalyzeType" minOccurs="0"/>
                        <!-- Use for setting a page number (in PDFs) -->
                        <xs:element name="pageno" type="xs:int" minOccurs="0" maxOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="output" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:complexContent>
                        <xs:extension xmlns:tns="http://xml.vidispine.com/schema/vidispine" base="tns:ComplexJobOutputFormatType"/>
                    </xs:complexContent>
                </xs:complexType>
            </xs:element>
            <xs:element name="connection" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:choice>
                            <!-- Use of more than one input means that the streams should be concatenated -->
                            <xs:element name="input" type="tns:ComplexJobInputType" minOccurs="1" maxOccurs="unbounded"/>
                            <!-- Used to extract and interleave channels from multiple input streams into this audio stream -->
                            <xs:element name="audioChannelMapInput" type="tns:ComplexJobAudioChannelMapInputType" minOccurs="1" maxOccurs="unbounded"/>
                            <!-- Used to interleave several mono timelines into this audio stream -->
                            <xs:element name="audioChannelSequenceInput" type="tns:ComplexJobAudioChannelSequenceInputType" minOccurs="1" maxOccurs="unbounded"/>

                            <!-- Used to mix several mono streams into one multi-channel stream
                                 Each audioMixInput element specifies the mix matrix for one mono channel in this stream -->
                            <xs:element name="audioMixInput" type="tns:ComplexJobMixInputType" minOccurs="1" maxOccurs="unbounded"/>
                        </xs:choice>
                        <xs:choice>
                            <xs:element name="audioOutput" type="tns:ComplexJobAudioOutputType"/>
                            <xs:element name="videoOutput" type="tns:ComplexJobVideoOutputType"/>
                            <xs:element name="subtitleOutput" type="tns:ComplexJobSubtitleOutputType"/>
                        </xs:choice>
                        <!-- PID, or similar per-stream ID for use by the muxer -->
                        <xs:element name="pid" type="xs:int" minOccurs="0"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="XMPReadOperation">
        <xs:sequence>
            <xs:element name="id" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="uri" type="xs:anyURI" minOccurs="1" maxOccurs="1"/>
            <xs:element name="setting" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="XMPWriteOperation">
        <xs:sequence>
            <xs:element name="id" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="uri" type="xs:anyURI" minOccurs="1" maxOccurs="1"/>
            <xs:element name="setting" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="xmp" type="xs:string" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="XMPJobDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:XMPJobType" />
    <xs:complexType name="XMPJobType">
        <xs:complexContent>
            <xs:extension base="tns:TranscoderJobType">
                <xs:sequence>
                    <xs:element name="read" type="tns:XMPReadOperation" minOccurs="0" maxOccurs="unbounded" />
                    <xs:element name="write" type="tns:XMPWriteOperation" minOccurs="0" maxOccurs="unbounded" />
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="TransferOperation">
        <xs:sequence>
            <xs:element name="id" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="sourceUri" type="xs:anyURI" minOccurs="1" maxOccurs="unbounded"/>
            <xs:element name="destinationUri" type="xs:anyURI" minOccurs="1" maxOccurs="unbounded"/>
            <xs:element name="setting" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="TransferJobDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:TransferJobType" />
    <xs:complexType name="TransferJobType">
        <xs:complexContent>
            <xs:extension base="tns:TranscoderJobType">
                <xs:sequence>
                    <xs:element name="transfer" type="tns:TransferOperation" minOccurs="0" maxOccurs="unbounded" />
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="HashComputeOperation">
        <xs:sequence>
            <xs:element name="id" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="uri" type="xs:anyURI" minOccurs="1" maxOccurs="1"/>
            <xs:element name="function" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="setting" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="HashJobDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:HashJobType" />
    <xs:complexType name="HashJobType">
        <xs:complexContent>
            <xs:extension base="tns:TranscoderJobType">
                <xs:sequence>
                    <xs:element name="compute" type="tns:HashComputeOperation" minOccurs="0" maxOccurs="unbounded" />
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:element name="ShapeDeductionJobDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:ShapeDeductionJobType" />
    <xs:complexType name="ShapeDeductionJobType">
        <xs:complexContent>
            <xs:extension base="tns:TranscoderJobType">
        <xs:sequence>
            <xs:element name="input" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="id" type="xs:string" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="uri" type="xs:anyURI" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="range" type="tns:SequenceRangeType" maxOccurs="unbounded"/>
                        <xs:element name="image" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="useMediaInfo" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="verbose" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="setting" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded"/>
                        <!-- Use for setting a page number (in PDFs) -->
                        <xs:element name="pageno" type="xs:int" minOccurs="0" maxOccurs="1"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:element name="DurationJobDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:DurationJobType" />
    <xs:complexType name="DurationJobType">
        <xs:complexContent>
            <xs:extension base="tns:TranscoderJobType">
        <xs:sequence>
            <xs:element name="input" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="id" type="xs:string" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="uri" type="xs:anyURI" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="setting" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- Types used for defining a MOV index generation job -->
    <xs:element name="MOVIndexJobDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:MOVIndexJobType"/>
    <xs:complexType name="MOVIndexJobType">
        <xs:complexContent>
            <xs:extension base="tns:TranscoderJobType">
        <xs:sequence>
            <xs:element name="targetUri" type="xs:anyURI"/>         <!-- http://example.com/index.mov -->
            <xs:element name="source" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="uri" type="xs:anyURI"/>   <!-- absolute URI to derive index from. example: http://example.com/essence/video.m2v -->
                        <xs:element name="alias" type="xs:anyURI" minOccurs="0"/> <!-- relative URI to write to file. example:     essence/video.m2v -->
                        <xs:element name="absoluteAlias" type="xs:anyURI" minOccurs="0"/> <!-- absolute URI to write to file. example:     /mnt/something/essence/video.m2v -->
                        <xs:element name="setting" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:element name="MXFTimecodeExtractionJobDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:MXFTimecodeExtractionJobType"/>
    <xs:complexType name="MXFTimecodeExtractionJobType">
        <xs:complexContent>
            <xs:extension base="tns:TranscoderJobType">
        <xs:sequence>
            <xs:element name="sourceUri" type="xs:anyURI"/>         <!-- URI to read MXF from -->
            <xs:element name="targetUri" type="xs:anyURI"/>         <!-- URI to write BulkyMetadata to -->
        </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- Generates an Op1b MXF file that points to several pieces of external essence -->
    <xs:element name="MXFOp1bJobDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:MXFOp1bJobType"/>
    <xs:complexType name="MXFOp1bJobType">
        <xs:complexContent>
            <xs:extension base="tns:TranscoderJobType">
        <xs:sequence>
            <xs:element name="output" type="xs:anyURI"/>        <!-- URI to write to -->
            <xs:element name="reference" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <!-- URI to read metadata from. Usually equal to locator[0] -->
                        <xs:element name="source" type="xs:anyURI"/>
                        <!-- List of stream the user wants to include in this reference -->
                        <xs:element name="stream" type="xs:unsignedShort" maxOccurs="unbounded"/>
                        <!--
                             locator: List of network locators (URIs) to external essence, ordered by preference.
                                      Relative URIs should go first, absolute URIs as fallbacks near the end.
                                 Ex.: <locator>essence/video.m2v</locator>
                                      <locator>ftp://example.com/essence/video.m2v</locator>
                        -->
                        <xs:element name="locator" type="xs:anyURI" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:element name="SegmentationJobDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:SegmentationJobType"/>
    <xs:complexType name="SegmentationJobType">
        <xs:complexContent>
            <xs:extension base="tns:TranscoderJobType">
        <xs:sequence>
            <!-- URI to material to segment. example: http://example.com/video.ts -->
            <xs:element name="input" type="xs:anyURI"/>
            <!-- URI to write playlist to when done. example: http://example.com/foo.m3u -->
            <xs:element name="playlistOutput" type="xs:anyURI"/>
            <!-- The prefix and postfix combine with a number to form the full URI. example:

                     prefix = "http://example.com/media/segment"
                    postfix = ".ts"
                  segment 1 = http://example.com/media/segment1.ts
                  segment 2 = http://example.com/media/segment2.ts etc.
            -->
            <xs:element name="segmentUriPrefix" type="xs:string"/>
            <xs:element name="segmentUriPostfix" type="xs:string"/>
            <!-- Container format to use for all segments. example: "mpegts" -->
            <xs:element name="containerFormat" type="xs:string"/>
            <!-- Suggested length of each segment. The transcoder will do its best if this is not a multiple of the GOP length -->
            <xs:element name="segmentLength" type="tns:TimeCodeType"/>
        </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:element name="AAFGeneratorJobDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:AAFGeneratorJobType" />
    <xs:complexType name="AAFGeneratorJobType">
        <xs:complexContent>
            <xs:extension base="tns:TranscoderJobType">
                <xs:sequence>
                    <xs:choice>
                        <xs:element name="aaf" type="xs:hexBinary" />
                        <xs:element name="xml" type="xs:string" />
                    </xs:choice>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- XML types for NLEJob -->

    <xs:complexType name="SubClipType">
        <xs:attribute name="id" type="xs:int" use="required"/>
        <xs:attribute name="start" type="xs:int" use="required"/>
        <xs:attribute name="length" type="xs:unsignedInt" use="required"/>
    </xs:complexType>

    <xs:complexType name="ClipType">
        <xs:sequence>
            <xs:element name="subClip" type="tns:SubClipType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="uri" type="xs:anyURI" use="optional"/>
        <xs:attribute name="stream" type="xs:unsignedShort" use="optional"/>
        <xs:attribute name="id" type="xs:anyURI" use="optional"/>
        <xs:attribute name="track" type="xs:unsignedShort" use="optional"/>
    </xs:complexType>

    <xs:complexType name="VideoClipType">
        <xs:complexContent>
            <xs:extension xmlns:tns="http://xml.vidispine.com/schema/vidispine" base="tns:ClipType">
                <xs:attribute name="directCopy" type="xs:boolean" use="optional"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="AudioClipType">
        <xs:complexContent>
            <xs:extension xmlns:tns="http://xml.vidispine.com/schema/vidispine" base="tns:ClipType">
                <xs:attribute name="channel" type="xs:unsignedShort" use="required"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="TextRenditionType">
        <xs:sequence>
            <xs:element name="line" type="xs:string" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="align" type="xs:string" use="optional"/>        <!-- Text alignment. May be "center" (default), "left" or "right" -->
        <xs:attribute name="x" type="xs:int" use="optional"/>               <!-- detault = 0. Center of text box relative to the center of the frame, in pre-SAR pixels  (X part) -->
        <xs:attribute name="y" type="xs:int" use="optional"/>               <!-- default = 0. Center of text box relative to the center of the frame, in pre-SAR pixels  (Y part) -->
        <xs:attribute name="xRel" type="xs:double" use="optional"/>               <!-- optional, overrides x if set, in units of full width -->
        <xs:attribute name="yRel" type="xs:double" use="optional"/>               <!-- optional, overrides y if set, in units of full height -->
        <xs:attribute name="horizontalBase" type="xs:string" use="optional"/>     <!-- optional, only used if xRel is set, specifies if corner specifies left of test box, center (default), or right -->
        <xs:attribute name="verticalBase" type="xs:string" use="optional"/>       <!-- optional, only used if yRel is set, specifies if corner specifies top of test box, middle (default), or bottom -->
        <xs:attribute name="font" type="xs:string" use="optional"/>         <!-- default = "Arial". Font to use -->
        <xs:attribute name="size" type="xs:unsignedInt" use="optional"/>    <!-- default = 12. Size of font in pixels -->
        <xs:attribute name="sizeRel" type="xs:double" use="optional"/>    <!-- optional, overrides size if set, size of font in units of full height -->
        <xs:attribute name="r" type="xs:unsignedByte" use="optional"/>      <!-- default = 255. Text color, red -->
        <xs:attribute name="g" type="xs:unsignedByte" use="optional"/>      <!-- default = 255. Text color, green -->
        <xs:attribute name="b" type="xs:unsignedByte" use="optional"/>      <!-- default = 255. Text color, blue -->
        <xs:attribute name="a" type="xs:unsignedByte" use="optional"/>      <!-- default = 255. Text color, alpha -->

        <!-- Outline type. Values:
               "none" = No outline (default)
                "box" = Draw solid box behind text, SVT style
             "stroke" = Stroke text
        -->
        <xs:attribute name="outline" type="xs:string" use="optional"/>

        <!--    "box": How much larger the box is on each side compared to the text's bounding box
             "stroke": How far out the font is stroked
        -->
        <xs:attribute name="outlineSize" type="xs:unsignedInt" use="optional"/>

        <xs:attribute name="outlineR" type="xs:unsignedByte" use="optional"/>      <!-- default = 0. Outline color, red -->
        <xs:attribute name="outlineG" type="xs:unsignedByte" use="optional"/>      <!-- default = 0. Outline color, green -->
        <xs:attribute name="outlineB" type="xs:unsignedByte" use="optional"/>      <!-- default = 0. Outline color, blue -->
        <xs:attribute name="outlineA" type="xs:unsignedByte" use="optional"/>      <!-- default = 255. Outline color, alpha -->
        <xs:attribute name="language" type="xs:string" use="optional"/>            <!-- ISO-639 -->
    </xs:complexType>

    <xs:complexType name="SubtitleClipType">
        <xs:complexContent>
            <xs:extension xmlns:tns="http://xml.vidispine.com/schema/vidispine" base="tns:TextRenditionType">
                <xs:attribute name="id" type="xs:int" use="required"/>
                <xs:attribute name="length" type="xs:unsignedInt" use="required"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- Like TransitionType, except we use xs:unsignedInt for duration and only attributes -->
    <xs:complexType name="NLEJobTransitionType">
        <xs:sequence>
            <xs:element name="border" type="tns:BorderType" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="length" type="xs:unsignedInt" use="required"/>
        <xs:attribute name="wipe" type="xs:int" use="optional"/>
        <xs:attribute name="transition" type="xs:string" use="optional"/>
        <xs:attribute name="horizRepeat" type="xs:int" use="optional"/>
        <xs:attribute name="vertRepeat" type="xs:int" use="optional"/>
        <xs:attribute name="startPercentage" type="xs:int" use="optional"/>
        <xs:attribute name="endPercentage" type="xs:int" use="optional"/>
        <xs:attribute name="reverse" type="xs:boolean" use="optional"/>

        <xs:attribute name="color" type="xs:string" use="optional"/>

        <!-- For internal transcoder use when cutting NLEJobDocuments -->
        <xs:attribute name="delta" type="xs:unsignedInt" use="optional"/>
    </xs:complexType>

    <xs:complexType name="TrackSegmentType">
        <xs:sequence>
            <xs:element name="effect" type="tns:EffectType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="transition" type="tns:NLEJobTransitionType" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="fillerLength" type="xs:unsignedInt" use="optional"/>    <!-- filler, with the value being the length to fill -->
        <xs:attribute name="subClip" type="xs:int" use="optional"/>                 <!-- ID of subClip -->
    </xs:complexType>

    <xs:complexType name="EffectPointType">
        <xs:attribute name="value" type="xs:float" use="required"/>

        <!-- The position of this value relative to the segment -->
        <xs:attribute name="position" type="xs:int" use="required"/>
    </xs:complexType>

    <xs:complexType name="EffectParameterType">
        <xs:sequence>
            <!-- Points are used for changing a parameter's value over time -->
            <xs:element name="point" type="tns:EffectPointType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="name" type="xs:string" use="required"/>

        <!-- Setting this value causes it to be applied to the segment's entire interval.
             In other words, it makes the parameter non-temporal.
        -->
        <xs:attribute name="value" type="xs:float" use="optional"/>
    </xs:complexType>

    <xs:complexType name="EffectType">
        <xs:sequence>
            <xs:element name="timeBase" type="tns:TimeBaseType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="parameter" type="tns:EffectParameterType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="name" type="xs:string" use="required"/>
    </xs:complexType>


    <xs:complexType name="TrackType">
        <xs:sequence>
            <xs:element name="segment" type="tns:TrackSegmentType" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="NLEJobSequenceType">
        <xs:sequence>
            <xs:element name="track" type="tns:TrackType" maxOccurs="unbounded"/>   <!-- List of tracks in ascending priority -->
        </xs:sequence>
        <xs:attribute name="color" type="xs:string" use="optional"/>
        <xs:attribute name="id" type="xs:int" use="required"/>
        <xs:attribute name="length" type="xs:unsignedInt" use="required"/>
    </xs:complexType>

    <xs:complexType name="NLEJobVideoOutputType">
        <xs:sequence>
            <xs:element name="preset" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="uri" type="xs:anyURI" use="optional"/>                  <!-- used when outputing OPAtom -->
        <xs:attribute name="sequence" type="xs:int" use="required"/>
        <xs:attribute name="codec" type="xs:string" use="required"/>
        <xs:attribute name="bitrate" type="xs:unsignedInt" use="required"/>
        <xs:attribute name="pixelFormat" type="xs:string" use="optional"/>          <!-- needed for choosing between DV variants -->
        <xs:attribute name="gopSize" type="xs:unsignedShort" use="optional"/>       <!-- set to zero for intra-only -->
        <xs:attribute name="maxBFrames" type="xs:unsignedShort" use="optional"/>    <!-- maximum number of B-frames between P-frames. zero disables B-frames -->
    </xs:complexType>

    <xs:complexType name="NLEJobAudioOutputType">
        <xs:sequence>
            <xs:element name="sequence" type="xs:int" maxOccurs="unbounded"/>       <!-- Audio sequences are mono, which means we need one sequence per output channel -->
            <xs:choice minOccurs="0" maxOccurs="1" >
                <xs:element name="channelLayout" type="xs:long"/>           <!-- binary representation, ex: 5.1 => 1551, see ffmpeg channel_layout.h -->

                <!--* name can be one or several of the following notations,
                    * separated by '+' or '|':
                    * - the name of an usual channel layout (mono, stereo, 4.0, quad, 5.0,
                    *   5.0(side), 5.1, 5.1(side), 7.1, 7.1(wide), downmix);
                    * - the name of a single channel (FL, FR, FC, LFE, BL, BR, FLC, FRC, BC,
                    *   SL, SR, TC, TFL, TFC, TFR, TBL, TBC, TBR, DL, DR);
                    * - a number of channels, in decimal, followed by 'c', yielding
                    *   the default channel layout for that number of channels (@see
                    *   av_get_default_channel_layout);
                    * - a channel layout mask, in hexadecimal starting with "0x" (see the
                    *   AV_CH_* macros).
                    *
                    * Example: "stereo+FC" = "2c+FC" = "2c+1c" = "0x7" git -->
                <xs:element name="channelLayoutName" type="xs:string"/>
            </xs:choice>
        </xs:sequence>
        <xs:attribute name="uri" type="xs:anyURI" use="optional"/>                  <!-- used when outputing OPAtom -->
        <xs:attribute name="codec" type="xs:string" use="required"/>
        <xs:attribute name="bitrate" type="xs:unsignedInt" use="optional"/>         <!-- not applicable to PCM -->
    </xs:complexType>

    <xs:complexType name="NLEJobOutputType">
        <xs:sequence>
            <xs:element name="video" type="tns:NLEJobVideoOutputType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="audio" type="tns:NLEJobAudioOutputType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="uri" type="xs:anyURI" use="optional"/>                  <!-- unique URIs are set in each <video> and <audio> element when outputing OPAtoms, hence optional here -->
        <xs:attribute name="containerFormat" type="xs:string" use="required"/>
        <xs:attribute name="umid" type="tns:UMIDType" use="optional"/>              <!-- Should be set when outputing OPAtom - generated otherwise -->

        <!-- MaterialPackage -> Name for MXF.
             Not applicable to most other formats (except maybe MOV).
        -->
        <xs:attribute name="clipName" type="xs:string" use="optional"/>
    </xs:complexType>

    <xs:complexType name="NLEJob2VideoOutputType">
        <xs:complexContent>
            <xs:extension xmlns:tns="http://xml.vidispine.com/schema/vidispine" base="tns:ComplexJobVideoOutputType">
                <xs:sequence>
                    <xs:element name="uri" type="xs:anyURI" minOccurs="0" maxOccurs="1" />                  <!-- used when outputing OPAtom -->
                    <xs:element name="sequence" type="xs:int" minOccurs="1" />
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="NLEJob2MixTypeInput">
        <xs:sequence>
            <xs:element name="effect" type="tns:EffectType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="sequence" type="xs:int" use="required"/>
        <xs:attribute name="gain" type="xs:float" use="required"/>
    </xs:complexType>

    <xs:complexType name="NLEJob2MixType">
        <xs:sequence>
            <xs:element name="input" type="tns:NLEJob2MixTypeInput" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="NLEJob2AudioOutputType">
        <xs:complexContent>
            <xs:extension xmlns:tns="http://xml.vidispine.com/schema/vidispine" base="tns:ComplexJobAudioOutputType">
                <xs:sequence>
                    <xs:element name="uri" type="xs:anyURI" minOccurs="0" maxOccurs="1" />                  <!-- used when outputing OPAtom -->
                    <xs:element name="sequence" type="xs:int" maxOccurs="unbounded" />
                    <xs:element name="mix" type="tns:NLEJob2MixType" maxOccurs="unbounded" />
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="NLEJob2OutputType">
        <xs:sequence>
            <xs:element name="format" type="tns:ComplexJobOutputFormatType" minOccurs="1" maxOccurs="1"/>
            <xs:element name="video" type="tns:NLEJob2VideoOutputType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="audio" type="tns:NLEJob2AudioOutputType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="NLEJobDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:NLEJobType"/>
    <xs:complexType name="NLEJobType">
        <xs:complexContent>
            <xs:extension base="tns:TranscoderJobType">
        <xs:sequence>
            <xs:element name="frameRate" type="tns:FrameRateType"/>
            <xs:element name="width" type="xs:unsignedShort"/>
            <xs:element name="height" type="xs:unsignedShort"/>
            <xs:element name="dar" type="tns:AspectRatioType"/>
            <xs:element name="sampleRate" type="xs:unsignedInt"/>

            <!-- What frame to pause the rendering at.
                 See ticket #106.
            -->
            <xs:element name="pauseFrame" type="xs:unsignedInt" minOccurs="0"/>

            <xs:element name="videoClip" type="tns:VideoClipType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="audioClip" type="tns:AudioClipType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="subtitleClip" type="tns:SubtitleClipType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="sequence" type="tns:NLEJobSequenceType" maxOccurs="unbounded"/>
            <xs:element name="output" type="tns:NLEJobOutputType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="output2" type="tns:NLEJob2OutputType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- QueueJob -->
    <xs:element name="QueueJobDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:QueueJobType"/>
    <xs:complexType name="QueueJobType">
        <xs:sequence>
            <!-- Ordered list of jobs to run. Recursion (putting QueueJobs in job elements) is allowed -->
            <xs:element name="job" type="tns:JobRequestChoiceType" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <!-- For specifying one of the valid job request types.
         Also useful since a virtual funtion in the Job class can return JobRequestChoiceType and have each implementation fill in the correct request -->
    <xs:complexType name="JobRequestChoiceType">
        <xs:choice>
            <xs:element name="timelineRequest" type="tns:TimelineJobRequestType"/>
            <xs:element name="complexRequest" type="tns:ComplexJobType"/>
            <xs:element name="movIndexRequest" type="tns:MOVIndexJobType"/>
            <xs:element name="mxfTimecodeExtractionRequest" type="tns:MXFTimecodeExtractionJobType"/>
            <xs:element name="mxfOp1bRequest" type="tns:MXFOp1bJobType"/>
            <xs:element name="segmentationRequest" type="tns:SegmentationJobType"/>
            <xs:element name="nleRequest" type="tns:NLEJobType"/>
            <xs:element name="queueRequest" type="tns:QueueJobType"/>
            <xs:element name="durationRequest" type="tns:DurationJobType"/>
            <xs:element name="shapeDeductionRequest" type="tns:ShapeDeductionJobType"/>
            <xs:element name="xmpRequest" type="tns:XMPJobType"/>
            <xs:element name="hashRequest" type="tns:HashJobType"/>
            <xs:element name="transferRequest" type="tns:TransferJobType"/>
            <xs:element name="aafGeneratorRequest" type="tns:AAFGeneratorJobType"/>
        </xs:choice>
    </xs:complexType>

    <xs:complexType name="JobLogEntryType">
        <xs:simpleContent>
            <xs:extension base="xs:string">
                <xs:attribute name="timestamp" type="xs:dateTime"/>
                <xs:attribute name="level" type="xs:string"/>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>

    <xs:complexType name="SequenceRangeType">
        <xs:simpleContent>
            <xs:extension base="xs:string">
                <xs:attribute name="start" type="xs:long" use="required"/>
                <xs:attribute name="width" type="xs:int" use="optional" />
                <xs:attribute name="count" type="xs:long" use="optional"/>
                <xs:attribute name="wildcard" type="xs:string" use="required"/>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>

    <xs:complexType name="JobInputProgressType">
        <xs:sequence>
            <!-- Highest (timestamp + duration - startTime) of all packets processed for this input so far -->
            <xs:element name="mediaTime" type="tns:TimeCodeType"/>

            <!-- Duration of file, if known -->
            <xs:element name="duration" type="tns:TimeCodeType" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>

    <!-- For returning job status in various cases -->
    <xs:element name="JobStatusDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:JobStatusType" />
    <xs:complexType name="JobStatusType">
        <xs:sequence>
            <xs:element name="statusUri" type="xs:anyURI"/>                               <!-- URI from to which a JobStatusRequestDocument can be sent to poll status -->
            <xs:element name="id" type="tns:SiteIdType"/>
            <xs:element name="isRunning" type="xs:boolean"/>
            <xs:element name="isPaused" type="xs:boolean"/>
            <xs:element name="walltime" type="xs:double"/>
            <xs:element name="exitcode" type="xs:int" minOccurs="0"/>                     <!-- Exit code if done running -->
            <xs:element name="message" type="xs:string" minOccurs="0"/>                   <!-- Possible exit message (exceptions, malformed requests etc.) -->
            <xs:element name="log" type="tns:JobLogEntryType"
                minOccurs="0" maxOccurs="unbounded"/>                                     <!-- Log entries with timestamps and levels -->
            <xs:element name="request" type="tns:JobRequestChoiceType" minOccurs="0"/>    <!-- the request that started this job -->
            <xs:element name="inputProgress" type="tns:JobInputProgressType"
                minOccurs="0" maxOccurs="unbounded"/>                                     <!-- Amount of media processed per input file -->
            <xs:element name="progress" type="xs:float" minOccurs="0"/>                   <!-- Overvall percentage of media processed so far.
                                                                                               It is only set if all inputs have known durations -->
            <xs:element name="estimatedTimeLeft" type="xs:float" minOccurs="0"/>          <!-- walltime/(progress/100) - walltime -->
            <xs:element name="thumbnail" type="tns:ThumbnailInfoType"
                minOccurs="0" maxOccurs="unbounded" />                                    <!-- Info on thumbnails generated -->
            <xs:element name="shapeDeductionResponse" type="tns:ShapeDeductionResponse" minOccurs="0" maxOccurs="unbounded" />
            <xs:element name="durationResponse" type="tns:DurationResponse" minOccurs="0" maxOccurs="unbounded" />
            <xs:element name="xmpResponse" type="tns:XMPResponse" minOccurs="0" maxOccurs="unbounded" />
            <xs:element name="hashResponse" type="tns:HashResponse" minOccurs="0" maxOccurs="unbounded" />
            <xs:element name="transferResponse" type="tns:TransferResponse" minOccurs="0" maxOccurs="unbounded" />
            <xs:element name="aafGeneratorResponse" type="tns:AAFGeneratorResponse" minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="XMPResponse">
        <xs:sequence>
            <xs:element name="id" type="xs:string" />
            <xs:element name="uri" type="xs:anyURI" />
            <xs:element name="xmp" type="xs:string" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="HashResponse">
        <xs:sequence>
            <xs:element name="id" type="xs:string" />
            <xs:element name="uri" type="xs:anyURI" />
            <xs:element name="function" type="xs:string" />
            <xs:choice>
                <xs:element name="hash" type="xs:string" />
                <xs:element name="error" type="xs:string" />
            </xs:choice>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="TransferResponse">
        <xs:sequence>
            <xs:element name="id" type="xs:string" />
            <xs:element name="sourceUri" type="xs:anyURI" minOccurs="1" maxOccurs="unbounded" />
            <xs:element name="destinationUri" type="xs:anyURI" minOccurs="1" maxOccurs="unbounded" />
            <xs:element name="error" type="xs:string" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ShapeDeductionResponse">
        <xs:sequence>
            <xs:element name="id" type="xs:string" />
            <xs:element name="uri" type="xs:anyURI" minOccurs="0" maxOccurs="1"/>
            <xs:element name="range" type="tns:SequenceRangeType" maxOccurs="unbounded"/>
            <xs:element name="shape" type="tns:ShapeType" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="DurationResponse">
        <xs:sequence>
            <xs:element name="id" type="xs:string" />
            <xs:element name="uri" type="xs:anyURI" />
            <xs:element name="duration" type="tns:DurationType" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="AAFGeneratorResponse">
        <xs:sequence>
            <xs:choice>
                <xs:element name="aaf" type="xs:hexBinary" />
                <xs:element name="xml" type="xs:string" />
            </xs:choice>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ThumbnailInfoType">
        <xs:sequence>
            <xs:element name="timeCode" type="tns:TimeCodeType" />
            <xs:element name="uri" type="xs:string" />
        </xs:sequence>
    </xs:complexType>
    <xs:element name="JobStatusListDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:JobStatusListType" />

    <xs:complexType name="JobStatusListType">
        <xs:sequence>
            <xs:element name="hits" type="xs:int" minOccurs="0" maxOccurs="1"/>
            <xs:element name="job" type="tns:JobStatusType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <!-- Deprecated -->
    <xs:element name="SimpleTimelineDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:SimpleTimelineType" />
    <xs:complexType name="SimpleTimelineType">
        <xs:sequence>
            <xs:element name="destinationURI" type="xs:string"/>
            <xs:element name="source" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="sequence" type="xs:int"/>             <!-- For guaranteeing ordering -->
                        <xs:choice>                                             <!-- Use URI when talking to transcoder -->
                            <xs:element name="uri" type="xs:anyURI"/>
                            <xs:element name="siteId" type="tns:SiteIdType"/>
                        </xs:choice>
                        <xs:element name="interval"
                                        type="tns:TimeIntervalType"/>                   <!-- Interval to use -->
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="TimelineDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:TimelineType" />
    <xs:complexType name="TimelineType">
        <xs:sequence>
            <xs:element name="destination" type="tns:ShapeType"/>
            <xs:element name="track">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="source" minOccurs="0" maxOccurs="unbounded">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="sequence" type="xs:int"/>             <!-- For guaranteeing ordering -->
                                    <xs:choice>                                             <!-- Use URI when talking to transcoder -->
                                        <xs:element name="uri" type="xs:anyURI"/>
                                        <xs:element name="siteId" type="tns:SiteIdType"/>
                                    </xs:choice>
                                    <xs:element name="track" type="xs:string"/>             <!-- Which track in the source to use for this segment -->
                                    <xs:element name="interval"
                                        type="tns:TimeIntervalType"/>                   <!-- Interval to use -->
                                    <xs:element name="transition"
                                        type="tns:TimeCodeType" minOccurs="0"/>         <!-- Length of transition period following the interval, if any -->
                                    <xs:element name="effect"
                                        type="xs:string" minOccurs="0"/>                <!-- Transition effect to use. Default if not set -->

                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                    </xs:sequence>
                    <xs:attribute name="index" type="xs:string"/>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <!-- Types used for indexing files on tape and other media where seeking is very expensive -->
    <xs:complexType name="PartialFileRandomIndexType">
        <xs:sequence>
            <xs:element name="packet" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:attribute name="pts" type="xs:long"/>             <!-- In MediaComponentType/timeBase units -->
                    <xs:attribute name="dts" type="xs:long"/>             <!-- In MediaComponentType/timeBase units -->
                    <xs:attribute name="offset" type="xs:unsignedLong"/>
                    <xs:attribute name="length" type="xs:unsignedInt"/>
                    <xs:attribute name="duration" type="xs:unsignedInt"/> <!-- In MediaComponentType/timeBase units -->
                    <xs:attribute name="stream" type="xs:unsignedByte"/>  <!-- References MediaComponentType/essenceStreamId -->
                    <xs:attribute name="isKeyFrame" type="xs:boolean"/>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="PartialFileDVDescriptorType">
        <xs:sequence>
            <xs:element name="frameSize" type="xs:unsignedInt"/>
            <xs:element name="frameCount" type="xs:unsignedInt"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="PartialFileDescriptorDocument" type="tns:PartialFileDescriptorType"/>
    <xs:complexType name="PartialFileDescriptorType">
        <xs:sequence>
            <xs:element name="label" type="xs:string" minOccurs="0"/>

            <xs:element name="transcoderVersion" type="xs:string" minOccurs="0"/>

            <!-- Corresponds to StartTimecode in TimecodeComponent in MXF -->
            <xs:element name="startTimecode" type="xs:long" minOccurs="0"/>

            <!-- Corresponds to RoundedTimeBase in TimecodeComponent in MXF -->
            <xs:element name="roundedTimeBase" type="xs:int" minOccurs="0"/>

            <!-- Corresponds to DropFrame in TimecodeComponent in MXF -->
            <xs:element name="dropFrame" type="xs:boolean" minOccurs="0"/>

            <xs:element name="containerComponent" type="tns:ContainerComponentType" minOccurs="0"/>
            <xs:element name="audioStream" type="tns:AudioComponentType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="videoStream" type="tns:VideoComponentType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:choice>
                <xs:element name="dvDescriptor" type="tns:PartialFileDVDescriptorType"/>    <!-- Used for DV -->
                <xs:element name="index" type="tns:PartialFileRandomIndexType"/>            <!-- Used for MXF, AVI and similar -->
            </xs:choice>
        </xs:sequence>
    </xs:complexType>

    <!-- Types for requesting a byte range for a time interval in a PartialFileDescriptorDocument -->
    <xs:element name="ByteRangeRequestDocument" type="tns:ByteRangeRequestType"/>
    <xs:complexType name="ByteRangeRequestType">
        <xs:sequence>
            <xs:element name="interval" type="tns:TimeIntervalType"/>
            <xs:element name="descriptor" type="tns:PartialFileDescriptorType"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ByteRangeResponseDocument" type="tns:ByteRangeResponseType"/>
    <xs:complexType name="ByteRangeResponseType">
        <xs:sequence>
            <xs:element name="start" type="xs:unsignedLong"/>
            <xs:element name="end" type="xs:unsignedLong"/>
        </xs:sequence>
    </xs:complexType>

    <!-- XML types for dealing with DMS-1 metadata in MXF -->
    <xs:simpleType name="InstanceUID">
        <xs:restriction base="xs:hexBinary"/>
    </xs:simpleType>
    <xs:simpleType name="ULType">   <!-- "UL" seems a bit short, so I'm picking ULType -->
        <xs:restriction base="xs:hexBinary"/>
    </xs:simpleType>
    <xs:complexType name="MDObjectBase">
        <xs:attribute name="name" type="xs:string" use="optional"/>
        <xs:attribute name="ul" type="tns:ULType" use="required"/>
    </xs:complexType>
    <xs:complexType name="MDObjectWeakReference">
        <xs:complexContent>
            <xs:extension xmlns:tns="http://xml.vidispine.com/schema/vidispine" base="tns:MDObjectBase">
                <xs:sequence>
                    <xs:element name="target" type="tns:InstanceUID"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="MDObjectLeaf">
        <xs:complexContent>
            <xs:extension xmlns:tns="http://xml.vidispine.com/schema/vidispine" base="tns:MDObjectBase">
                <xs:sequence>
                    <xs:choice>
                        <xs:element name="hexValue" type="xs:hexBinary"/>
                        <xs:element name="stringValue" type="xs:string"/>
                    </xs:choice>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="MDObjectNode">
        <xs:complexContent>
            <xs:extension xmlns:tns="http://xml.vidispine.com/schema/vidispine" base="tns:MDObjectBase">
                <xs:sequence>
                    <xs:element name="leaf" type="tns:MDObjectLeaf" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="child" type="tns:MDObjectNode" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="strongReference" type="tns:MDObjectStrongReference" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="weakReference" type="tns:MDObjectWeakReference" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
                <xs:attribute name="instanceUid" type="tns:InstanceUID" use="optional"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="MDObjectStrongReference">
        <xs:complexContent>
            <xs:extension xmlns:tns="http://xml.vidispine.com/schema/vidispine" base="tns:MDObjectNode">
                <xs:attribute name="referenceUl" type="tns:ULType" use="required"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="MDSegment">
        <xs:sequence>
            <xs:element name="interval" type="tns:TimeIntervalType"/>
            <xs:element name="dms1Framework" type="tns:MDObjectNode"/>  <!-- DMS-1 scene or clip framework -->
        </xs:sequence>
    </xs:complexType>
    <xs:element name="DMS1Document" type="tns:DMS1Type"/>
    <xs:complexType name="DMS1Type">
        <xs:sequence>
            <xs:element name="partition" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="materialPackage" minOccurs="0" maxOccurs="unbounded">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="staticTrack" minOccurs="0" maxOccurs="unbounded">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="dms1Framework" type="tns:MDObjectNode"/>  <!-- DMS-1 production framework -->
                                            </xs:sequence>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="eventTrack" minOccurs="0" maxOccurs="unbounded">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="segment" type="tns:MDSegment" minOccurs="0" maxOccurs="unbounded"/>
                                            </xs:sequence>
                                        </xs:complexType>
                                    </xs:element>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                    </xs:sequence>
                    <xs:attribute name="offset" type="xs:long"/>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:simpleType name="UMIDType">
        <xs:restriction base="xs:hexBinary">
            <!-- UMIDs are 256 bits -->
            <xs:minLength value="32"/>
            <xs:maxLength value="32"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="MXFTimestampType">
        <xs:sequence>
            <!-- Corresponds to mxfTimestamp in libMXF -->
            <xs:element name="year" type="xs:short"/>
            <xs:element name="month" type="xs:unsignedByte"/>
            <xs:element name="day" type="xs:unsignedByte"/>
            <xs:element name="hour" type="xs:unsignedByte"/>
            <xs:element name="min" type="xs:unsignedByte"/>
            <xs:element name="sec" type="xs:unsignedByte"/>
            <xs:element name="qmsec" type="xs:unsignedByte"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="PackageTrackType">
        <xs:sequence>
            <xs:element name="name" type="xs:string"/>

            <!-- Physical track ID, like audio channels -->
            <xs:element name="number" type="xs:int"/>

            <xs:element name="isPicture" type="xs:boolean"/>

            <xs:element name="is50FPS" minOccurs="0" maxOccurs="1" type="xs:boolean"/>

	    <xs:element name="frameRate" minOccurs="0" maxOccurs="1" type="tns:FrameRateType" />

            <!-- Length of track in edit units -->
            <xs:element name="length" type="xs:int"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="MaterialPackageTrackType">
        <xs:complexContent>
            <xs:extension base="tns:PackageTrackType">
                <xs:sequence>
                    <xs:element name="sourcePackageID" type="tns:UMIDType"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="TapePackageTrackType">
        <xs:complexContent>
            <xs:extension base="tns:PackageTrackType">
                <xs:sequence>
                    <xs:element name="trackID" type="xs:int"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="PackageType">
        <xs:sequence>
            <xs:element name="umid" type="tns:UMIDType"/>
            <xs:element name="timestamp" type="tns:MXFTimestampType"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="MaterialPackageType">
        <xs:complexContent>
            <xs:extension base="tns:PackageType">
                <xs:sequence>
                    <xs:element name="track" type="tns:MaterialPackageTrackType" minOccurs="1" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="TapePackageType">
        <xs:complexContent>
            <xs:extension base="tns:PackageType">
                <xs:sequence>
                    <xs:element name="track" type="tns:TapePackageTrackType" minOccurs="1" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- Needed for muxing OpAtom -->
    <xs:complexType name="MXFPackagesType">
        <xs:sequence>
            <xs:element name="materialPackage" type="tns:MaterialPackageType"/>
            <xs:element name="tapePackage" type="tns:TapePackageType" minOccurs="0"/>

            <!-- Material package track to link to file package track, like "V1" -->
            <xs:element name="materialTrackName" type="xs:string"/>

            <!-- Tape package track to link file package track to, like "V1".
                 Must be set if tapePackage is set.
            -->
            <xs:element name="tapeTrackName" type="xs:string" minOccurs="0"/>
	    <xs:element name="projectEditRate" type="tns:FrameRateType" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
    </xs:complexType>

    <!--- START METADATA TYPES -->

    <xs:complexType name="KeyValuePairType">
        <xs:sequence>
            <xs:element name="key" minOccurs="1" maxOccurs="1" type="xs:string"/>
            <xs:element name="value" minOccurs="1" maxOccurs="1" type="xs:string"/>
        </xs:sequence>
    </xs:complexType>

    <!--
         MetadataReferenceType is only used when posting new metadata.
         They only need to be unique within the same MetadataDocument.
         The middleware will transform them to proper UUIDs, unless they already formatted as UUIDs pointing to existing metadata.
     -->
    <xs:simpleType name="MetadataReferenceType">
        <xs:restriction base="xs:string"/>
    </xs:simpleType>

    <xs:complexType name="MetadataGroupValueType">
        <xs:sequence>
            <xs:element name="name" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="id" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
            <xs:element name="referenced" type="tns:MetadataReferencedType" minOccurs="0" maxOccurs="1"/>
            <xs:choice>
                <xs:sequence>
                    <xs:element name="field" type="tns:MetadataFieldValueType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="group" type="tns:MetadataGroupValueType" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
                <xs:sequence>
                    <xs:element name="reference" type="tns:MetadataReferenceType" minOccurs="1" maxOccurs="1"/>
                </xs:sequence>
            </xs:choice>
            <xs:element name="data" minOccurs="0" maxOccurs="unbounded" type="tns:KeyValuePairType"/>
        </xs:sequence>
        <xs:attributeGroup ref="tns:MetadataValueAttributes"/>
        <xs:attribute name="inheritance" type="xs:string" use="optional"/>
        <xs:attribute name="cycle" type="xs:boolean" use="optional"/>
    </xs:complexType>

    <xs:complexType name="MetadataFieldValueType">
        <xs:sequence>
            <xs:element name="name" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="id" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
            <xs:element name="referenced" type="tns:MetadataReferencedType" minOccurs="0" maxOccurs="1"/>
            <xs:choice>
                <xs:element name="value" type="tns:MetadataValueType" minOccurs="0" maxOccurs="unbounded"/>
                <xs:element name="reference" type="tns:MetadataReferenceType" minOccurs="1" maxOccurs="1"/>
            </xs:choice>
            <xs:element name="data" minOccurs="0" maxOccurs="unbounded" type="tns:KeyValuePairType"/>
            <xs:element name="type" minOccurs="0" maxOccurs="1" type="tns:MetadataFieldType"/>
        </xs:sequence>
        <xs:attributeGroup ref="tns:MetadataValueAttributes"/>
        <xs:attribute name="track" type="xs:string" use="optional"/>
        <xs:attribute name="inheritance" type="xs:string" use="optional"/>
    </xs:complexType>

    <xs:complexType name="MetadataReferencedType">
        <xs:attribute name="id" type="xs:string" use="required"/>
        <xs:attribute name="uuid" type="xs:string" use="required"/>
        <xs:attribute name="type" type="xs:string" use="required"/>
    </xs:complexType>

    <xs:complexType name="MetadataValueType">
        <xs:simpleContent>
            <xs:extension base="xs:string">
                <xs:attributeGroup ref="tns:MetadataValueAttributes"/>
                <xs:attribute name="lang" type="xs:language" use="optional"/>
                <xs:attribute name="id" type="xs:string" use="optional"/>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>

    <xs:attributeGroup name="MetadataValueAttributes">
        <xs:attribute name="uuid" type="tns:MetadataReferenceType" use="optional"/>
        <xs:attribute name="user" type="xs:string" use="optional"/>
        <xs:attribute name="timestamp" type="xs:dateTime" use="optional"/>
        <xs:attribute name="change" type="tns:SiteIdType" use="optional"/>
        <xs:attribute name="conflict" type="xs:boolean" use="optional"/>
        <xs:attribute name="mode"  type="tns:MetadataModeType" use="optional"/>
    </xs:attributeGroup>

    <xs:simpleType name="MetadataModeType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="add"/>
            <xs:enumeration value="remove"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:element name="MetadataDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:MetadataType" />
    <xs:complexType name="MetadataType">
        <xs:sequence maxOccurs="1" minOccurs="1">
            <xs:element name="revision" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="template" type="xs:string" minOccurs="0" maxOccurs="1"/> <!-- obsolete -->
            <xs:element name="group" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="timespan" maxOccurs="unbounded" minOccurs="0">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="field" type="tns:MetadataFieldValueType" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element name="group" type="tns:MetadataGroupValueType" minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                    <xs:attribute name="start" type="xs:string" />
                    <xs:attribute name="end" type="xs:string" />
                    <xs:attribute name="base" type="xs:string" />
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <!-- END METADATA TYPES -->

    <!-- START METADATA FIELD TYPE TYPES -->

    <xs:simpleType name="MetadataFieldTypeType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="date"/>
            <xs:enumeration value="date-noindex"/>
            <xs:enumeration value="date-sortable"/>
            <xs:enumeration value="float"/>
            <xs:enumeration value="float-noindex"/>
            <xs:enumeration value="float-sortable"/>
            <xs:enumeration value="integer"/>
            <xs:enumeration value="integer-noindex"/>
            <xs:enumeration value="integer-sortable"/>
            <xs:enumeration value="long"/>
            <xs:enumeration value="long-noindex"/>
            <xs:enumeration value="string"/>
            <xs:enumeration value="string-sortable"/>
            <xs:enumeration value="string-exact"/>
            <xs:enumeration value="string-exact-sortable"/>
            <xs:enumeration value="string-noindex"/>
            <xs:enumeration value="boolean"/>
            <xs:enumeration value="boolean-noindex"/>
            <xs:enumeration value="timeCode"/>
            <xs:enumeration value="timeCode-noindex"/>

        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="MetadataFieldIndexType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="noindex"/>
            <xs:enumeration value="index"/>
            <xs:enumeration value="extend"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="MetadataFieldFloatType">
        <xs:sequence>
            <xs:element name="minInclusive" type="xs:double" minOccurs="0" maxOccurs="1"/>
            <xs:element name="maxInclusive" type="xs:double" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="MetadataFieldIntegerType">
        <xs:sequence>
            <xs:element name="minInclusive" type="xs:int" minOccurs="0" maxOccurs="1"/>
            <xs:element name="maxInclusive" type="xs:int" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="MetadataFieldLongType">
        <xs:sequence>
            <xs:element name="minInclusive" type="xs:long" minOccurs="0" maxOccurs="1"/>
            <xs:element name="maxInclusive" type="xs:long" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="MetadataFieldStringType">
        <xs:sequence>
            <xs:element name="minLength" type="xs:int" minOccurs="0" maxOccurs="1"/>
            <xs:element name="maxLength" type="xs:int" minOccurs="0" maxOccurs="1"/>
            <xs:element name="pattern" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="MetadataFieldDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:MetadataFieldType" />
    <xs:complexType name="MetadataFieldType">
        <xs:sequence>
            <xs:element name="name" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="schema" type="tns:MetadataSchemaElementType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="type" type="tns:MetadataFieldTypeType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="index" type="tns:MetadataFieldIndexType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="fullText" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="caseSensitiveSorting" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
            <xs:element name="constraint" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="dataset" type="xs:string" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="levelProperty" type="xs:string" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="levelValue" type="xs:string" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="value" type="xs:string" minOccurs="1" maxOccurs="1"/>
                        <xs:choice>
                            <xs:element name="validationGroup" type="xs:string" minOccurs="0" maxOccurs="1"/>
                            <xs:element name="parent" type="xs:string" minOccurs="0" maxOccurs="1"/>
                        </xs:choice>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:choice minOccurs="0" maxOccurs="1">
                <xs:element name="floatRestriction" type="tns:MetadataFieldFloatType"/>
                <xs:element name="integerRestriction" type="tns:MetadataFieldIntegerType"/>
                <xs:element name="longRestriction" type="tns:MetadataFieldLongType"/>
                <xs:element name="stringRestriction" type="tns:MetadataFieldStringType"/>
            </xs:choice>
            <xs:element name="data" minOccurs="0" maxOccurs="unbounded" type="tns:KeyValuePairType"/>
            <xs:element name="values" minOccurs="0" maxOccurs="1" type="tns:SimpleMetadataType"/>
            <xs:element name="defaultValue" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="externalId" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
            <xs:element name="origin" type="xs:string" minOccurs="0" maxOccurs="1" />
            <xs:element name="boost" type="xs:float" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
        <xs:attribute name="system" type="xs:string" use="optional"/>
        <xs:attribute name="sortable" type="xs:boolean" use="optional"/>
        <xs:attribute name="inheritance" type="xs:string" use="optional"/>
    </xs:complexType>

    <!-- END METADATA FIELD TYPE TYPES -->

    <xs:complexType name="SimpleMetadataType">
        <xs:sequence>
            <!-- TODO: use tns:KeyValuePairType instead -->
            <xs:element name="field" minOccurs="0" maxOccurs="unbounded" >
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="key" type="xs:string" minOccurs="1" maxOccurs="1" />
                        <xs:element name="value" type="xs:string" />
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <!-- Decode/encode permissions and license document. Wildcards are allowed.
         Example how a license document allowing any input to be transcoded to H.264+MP3 might look like:
             <TranscoderLicenseStatusDocument>
                 <mayDecode>*</mayDecode>
                 <mayEncode>*mp3*</mayEncode>
                 <mayEncode>*264*</mayEncode>
             </TranscoderLicenseStatusDocument>
    -->
    <xs:element name="TranscoderLicenseStatusDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:TranscoderLicenseStatusType"/>
    <xs:complexType name="TranscoderLicenseStatusType">
        <xs:sequence>
            <xs:element name="mayDecode" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="mayEncode" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="production" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <!-- Returned by the transcoder's duration resource -->
    <xs:element name="DurationDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:DurationType"/>
    <xs:complexType name="DurationType">
        <xs:sequence>
            <!-- duration = max_x{ptsInterval.end_x} - min_x{ptsInterval.start_x} -->
            <xs:element name="duration" type="tns:TimeCodeType"/>

            <!-- Information about the individual video streams
                 duration = stream.end - stream.start
            -->
            <xs:element name="stream" type="tns:StreamIntervalType" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="StreamIntervalType">
        <xs:complexContent>
            <xs:extension xmlns:tns="http://xml.vidispine.com/schema/vidispine" base="tns:TimeIntervalType">
                <!-- AKA essenceStreamId -->
                <xs:attribute name="index" type="xs:unsignedShort" use="required"/>

                <!-- number of frames decoded -->
                <xs:attribute name="numberOfFrames" type="xs:int" use="required"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:element name="TranscoderVersionDocument" xmlns:tns="http://xml.vidispine.com/schema/vidispine" type="tns:TranscoderVersionType"/>
    <xs:complexType name="TranscoderVersionType">
        <xs:sequence>
            <xs:element name="version" type="xs:string" minOccurs="1" maxOccurs="1" />
            <xs:element name="submodule" maxOccurs="unbounded" minOccurs="0">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="version" type="xs:string" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="info" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded" />
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="feature" maxOccurs="unbounded" minOccurs="0">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="version" type="xs:string" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="info" type="tns:KeyValuePairType" minOccurs="0" maxOccurs="unbounded" />
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>


</xs:schema>

transcoder.xsd

Common elements to API and Transcoder.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://xml.vidispine.com/schema/vidispine"
    elementFormDefault="qualified"
    xmlns:tns="http://xml.vidispine.com/schema/vidispine">
    <!-- Schemas for transcoder configurations -->
    <xs:simpleType name="GUIDType">
        <xs:restriction base="xs:string">
            <xs:pattern value="(\{([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}\})"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:complexType name="CarbonPreset">
        <xs:sequence>
            <xs:element name="name" type="xs:string"/>
            <xs:element name="description" type="xs:string"/>
            <xs:element name="containerFormat" type="xs:string"/>
            <xs:element name="videoCodec" type="xs:string"/>
            <xs:element name="audioCodec" type="xs:string"/>
            <xs:element name="displayAspectRatio" type="tns:AspectRatioType"/>
            <xs:element name="GUID" type="tns:GUIDType"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="PluginType">
        <xs:sequence>
            <xs:element name="alias" type="xs:string"/>
            <xs:element name="fileName" type="xs:string"/>  <!-- Name of .dll/.so file -->
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="AddressPortType">
        <xs:sequence>
            <xs:choice>
                <xs:element name="host" type="xs:string"/>
                <xs:element name="address" type="xs:string"/>
            </xs:choice>
            <xs:element name="port" type="xs:int"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="StatsDRecieverType">
        <xs:sequence>
            <xs:element name="destination" type="tns:AddressPortType"/>
            <xs:element name="prefix" type="xs:string" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>
    <xs:simpleType name="REDDecoderType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="CPU"/>
            <xs:enumeration value="CUDA"/> <!-- default, will fall back to CPU if CUDA is not available -->
            <xs:enumeration value="OPENCL"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:element name="TranscoderConfigurationDocument" type="tns:TranscoderConfigurationType" />
    <xs:complexType name="TranscoderConfigurationType">
            <xs:sequence>
                <!-- TODO: replace these two with an AddressPortType element -->
                <xs:element name="address" type="xs:string"/>
                <xs:element name="port" type="xs:int"/>

                <!-- Number of threads to use in encoders.
                     Applies mostly to MainConcept and libx264 as of writing.

                      Not set = Leave thread count alone. This means a single thread for libavcodec, auto for MainConcept.
                      0       = Auto.
                      >=1     = Use specified number of threads. Should be somewhere around 150% of the number of cores.
                -->
                <xs:element name="encoderThreads" type="xs:int" minOccurs="0"/>
                <xs:element name="decoderOfferThreads" type="xs:int" minOccurs="0"/>
                <xs:element name="apiUsername" type="xs:string"/>
                <xs:element name="apiPassword" type="xs:string"/>

                <!-- If set, grab TranscoderLicenseStatusDocuments from apiURL/API/transcoder-validate
                     Else, wait for such documents to be PUT on /license
                     See T#114
                -->
                <xs:element name="apiURL" type="tns:AddressPortType" minOccurs="0"/>
                <xs:element name="thumbnailResolution" type="tns:ResolutionType"/>
                <xs:element name="thumbnailPeriod" type="tns:TimeCodeType" minOccurs="0" />
                <xs:element name="bilinearEffects" type="xs:boolean"/>              <!-- If true, use bilinear filtering for effects -->
                <xs:element name="carbonServer" minOccurs="0" maxOccurs="unbounded" type="tns:AddressPortType"/>
                <xs:element name="carbonPreset" type="tns:CarbonPreset" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element name="faceDetectorPlugin" type="tns:PluginType" minOccurs="0" maxOccurs="unbounded"/>
                <xs:element name="dataPath" type="xs:string"/>
                <xs:element name="presetPath" type="xs:string"/>
                <xs:element name="tempPath" type="xs:string" minOccurs="0" />
                <xs:element name="proresDecoder" minOccurs="0" type="tns:AddressPortType"/>
                <xs:element name="proresEncoder" minOccurs="0" type="tns:AddressPortType"/>
                <xs:element name="vp6Encoder" minOccurs="0" type="tns:AddressPortType"/>
                <xs:element name="vp6EncoderPoolSize" minOccurs="0" type="xs:int"/>
                <xs:element name="logo" minOccurs="0" type="xs:string"/>
                <xs:element name="imagemagick" minOccurs="0" maxOccurs="unbounded" type="tns:KeyValuePairType"/>
                <xs:element name="logLevel" minOccurs="0" type="xs:string"/>
                <xs:element name="statsd" type="tns:StatsDRecieverType" minOccurs="0" maxOccurs="unbounded"/>
                <xs:element name="readBufferLength" type="xs:int" minOccurs="0"/>
                <xs:element name="dataBufferSize" type="xs:int" minOccurs="0"/>
                <xs:element name="dataBufferWriteSize" type="xs:int" minOccurs="0"/>
                <xs:element name="dataBufferFlushTime" type="xs:int" minOccurs="0"/>
                <xs:element name="colorProfilePath" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
                <xs:element name="redDecoderType" type="tns:REDDecoderType" minOccurs="0" maxOccurs="1"/>
            </xs:sequence>
    </xs:complexType>

    <!-- Schemas for communicating with Carbon -->
    <xs:complexType name="CarbonJobInfoType">
        <xs:sequence>
            <xs:element name="Failures" minOccurs="0">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="Warnings" type="xs:string" minOccurs="0"/>
                        <xs:element name="Errors" type="xs:string" minOccurs="0"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
        <xs:attribute name="Name" type="xs:string" use="required"/>
        <xs:attribute name="GUID" type="tns:GUIDType" use="required"/>
        <xs:attribute name="State" type="xs:string" use="required"/>
        <xs:attribute name="Status" type="xs:string" use="required"/>
        <xs:attribute name="Progress.DWD" type="xs:int" use="required"/>
        <xs:attribute name="Speed.DBL" type="xs:double" use="optional"/>                <!-- Not documented -->
        <xs:attribute name="Description" type="xs:string" use="required"/>
        <xs:attribute name="User" type="xs:string" use="required"/>
        <xs:attribute name="SourceDescription" type="xs:string" use="required"/>
        <xs:attribute name="AgentIP" type="xs:string" use="required"/>
        <xs:attribute name="Priority.DWD" type="xs:int" use="required"/>
        <xs:attribute name="Capabilities.DWD" type="xs:int" use="optional"/>            <!-- Not documented -->
        <xs:attribute name="DeleteProcessedSource.DWD" type="xs:int" use="optional"/>   <!-- Not documented -->
        <xs:attribute name="DeleteRealAsset.DWD" type="xs:int" use="optional"/>         <!-- Not documented -->
        <xs:attribute name="CheckInTime" type="xs:string" use="required"/>
        <xs:attribute name="CheckInTime_CNLT" type="xs:string" use="required"/>
        <xs:attribute name="CheckInTime_SCM" type="xs:string" use="required"/>
        <xs:attribute name="CheckInTimePrecise.QWD" type="xs:long" use="optional"/>     <!-- Not documented -->
        <xs:attribute name="StartTime" type="xs:string" use="optional"/>
        <xs:attribute name="StartTime_CNLT" type="xs:string" use="optional"/>
        <xs:attribute name="StartTime_SCM" type="xs:string" use="optional"/>
        <xs:attribute name="CompletedTime" type="xs:string" use="optional"/>
        <xs:attribute name="CompletedTime_CNLT" type="xs:string" use="optional"/>
        <xs:attribute name="CompletedTime_SCM" type="xs:string" use="optional"/>
        <xs:attribute name="Error" type="xs:string" use="optional"/>                    <!-- Not documented -->
    </xs:complexType>
    <xs:element name="Reply">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="JobInfo" type="tns:CarbonJobInfoType" minOccurs="0"/>
            </xs:sequence>
            <xs:attribute name="GUID" type="tns:GUIDType" use="optional"/>
            <xs:attribute name="Success" type="xs:string" use="required"/>
            <xs:attribute name="Error" type="xs:string" use="optional"/>
            <xs:attribute name="NrOfJobs.DWD" type="xs:int" use="optional"/>
        </xs:complexType>
    </xs:element>
</xs:schema>