<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.qualcomm.com/debugpolicy"
	xmlns:tns="http://www.qualcomm.com/debugpolicy">

    <element name="debugpolicy">
    	<complexType>
    		<sequence>
    			<element name="metadata" type="tns:metadata" maxOccurs="1" minOccurs="1"></element>
    			<element name="file_properties" type="tns:complex_file_properties" maxOccurs="1" minOccurs="1"></element>
    		</sequence>
    	</complexType></element>

    <complexType name="metadata">
    	<sequence>
    		<element name="chipset" type="string"></element>
    		<element name="version" type="string"></element>
    	</sequence>
    </complexType>

    <complexType name="complex_file_properties">
        <all>
        	<element name="revision" maxOccurs="1" minOccurs="1" type="unsignedInt">

        	</element>
        	<element name="serial_number_start" maxOccurs="1"
        		minOccurs="0" type="unsignedInt">
        	</element>
        	<element name="serial_number_end" maxOccurs="1"
        		minOccurs="0" type="unsignedInt">
        	</element>
        	
        	<element name="flags" type="tns:complex_flags" />
        	<element name="image_bit_map" maxOccurs="1" minOccurs="0" type="tns:complex_image_bit_map" />
        	<element name="image_id_list" maxOccurs="1" minOccurs="0" type="tns:complex_image_id_list" />
            <element name="root_cert_hash_list" type="tns:complex_root_cert_hash_list" />
            <element name="serial_num_list" maxOccurs="1" minOccurs="0" type="tns:complex_serial_num_list"/>
            <element name="root_cert_hash_qti_list" maxOccurs="1" minOccurs="0" type="tns:complex_root_cert_hash_qti_list" />
            <element name="elf" type="tns:complex_elf" />
        </all>
    </complexType>

    <complexType name="complex_flags">
        <sequence>
            <element name="flag" maxOccurs="64" minOccurs="0">
            	<complexType>
    				<all>
                        <element name="bit_pos" type="int" />
                        <element name="value" type="boolean"/>
    				</all>
            	</complexType>
            </element>
        </sequence>
    </complexType>
    
    <complexType name="complex_image_bit_map">
        <sequence>
            <element name="swid" maxOccurs="32" minOccurs="0">
            	<complexType>
    				<all>
                        <element name="bit_pos" type="int" />
                        <element name="value" type="boolean"/>
    				</all>
            	</complexType>
            </element>
        </sequence>
    </complexType>

    <complexType name="complex_image_id_list">
        <sequence>
            <element name="image_id" maxOccurs="32" minOccurs="0" type="string">
            </element>
        </sequence>
    </complexType>

    <complexType name="complex_root_cert_hash_list">
        <sequence>
            <element name="root_cert_hash" maxOccurs="4"
            	minOccurs="0" type="string">
            </element>
        </sequence>
    </complexType>

    <complexType name="complex_serial_num_list">
        <sequence>
            <element name="serial_num" maxOccurs="200"
                minOccurs="0" type="string">
            </element>
        </sequence>
    </complexType>
    
    <complexType name="complex_root_cert_hash_qti_list">
        <sequence>
            <element name="root_cert_hash_qti" maxOccurs="4"
            	minOccurs="0" type="string">
            </element>
        </sequence>
    </complexType>
    
	<complexType name="complex_elf">
        <all>
        	<element name="elf_class" type="unsignedInt" maxOccurs="1" minOccurs="1"/>
        	<element name="phys_addr" type="string">
        	</element>
        </all>
    </complexType>

</schema>