<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns="https://emsfs.autodesk.com/schema/deployment/customization/1/0"
	targetNamespace="https://emsfs.autodesk.com/schema/deployment/customization/1/0"
	attributeFormDefault="unqualified" elementFormDefault="qualified">
	<xs:attributeGroup name="version">
		<xs:attribute name="version" fixed="1.0" use="required" />
	</xs:attributeGroup>
	<xs:element name="Customization">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="Identity" type="IdentityType"
					minOccurs="1" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>Identity of the Application. UPI2 is being
							generated by master tool.
						</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="Controls">
					<xs:complexType>
						<xs:choice maxOccurs="unbounded" minOccurs="0">
							<xs:element type="HeadingType" name="Heading">
								<xs:annotation>
									<xs:documentation>Heading control details goes here
									</xs:documentation>
								</xs:annotation>
							</xs:element>
							<xs:element type="CheckBoxType" name="CheckBox">
								<xs:annotation>
									<xs:documentation>Checkbox control details goes here
									</xs:documentation>
								</xs:annotation>
							</xs:element>
							<xs:element type="InputTextType" name="InputText">
								<xs:annotation>
									<xs:documentation>Text control details goes here
									</xs:documentation>
								</xs:annotation>
							</xs:element>
							<xs:element type="RadioButtonType" name="RadioButton">
								<xs:annotation>
									<xs:documentation>RadioButton control details goes here
									</xs:documentation>
								</xs:annotation>
							</xs:element>
							<xs:element type="DropDownListType"
								name="DropDownList">
								<xs:annotation>
									<xs:documentation>DropDownList control details goes here
									</xs:documentation>
								</xs:annotation>
							</xs:element>
						</xs:choice>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
			<xs:attributeGroup ref="version" />
		</xs:complexType>
	</xs:element>
	<xs:complexType name="IdentityType">
		<xs:sequence>
			<xs:element name="UPI2" type="GuidPattern" minOccurs="0">
				<xs:annotation>
					<xs:documentation>(optional) Will be generated by master tool
					</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Signature" type="xs:string" minOccurs="0"/>
            <xs:element name="Revision" type="xs:positiveInteger" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="HeadingType">
		<xs:simpleContent>
			<xs:extension base="xs:string">
				<xs:attribute type="xs:string" name="label"
					use="required">
					<xs:annotation>
						<xs:documentation>LabelId used for this textbox control and later
							referred in localization resources for locale content
						</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute type="xs:string" name="defaultValue" />
				<xs:attribute type="xs:boolean" name="isBold"
					default="true">
					<xs:annotation>
						<xs:documentation>Flag to identify if this label to be displayed
							in bold letters.
						</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute type="xs:positiveInteger" name="sequence"
					use="required">
					<xs:annotation>
						<xs:documentation>Specify the display order of this UI control
						</xs:documentation>
					</xs:annotation>
				</xs:attribute>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:simpleType name="GuidPattern">
		<xs:annotation>
			<xs:documentation>Regex: Well-formed guid, uppercase, with enclosing
				braces
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:pattern
				value="\{[0-F]{8}-[0-F]{4}-[0-F]{4}-[0-F]{4}-[0-F]{12}\}" />
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="InputTextType">
        <xs:annotation>
        	<xs:documentation>Used for TextBox Control</xs:documentation>
        </xs:annotation>
        <xs:simpleContent>
			<xs:extension base="xs:string">
				<xs:attribute type="xs:string" name="propertyRefId"
					use="required">
					<xs:annotation>
						<xs:documentation>
							RefId used by Applications to store user
							entered text value.
						</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute type="xs:string" name="label"
					use="required">
					<xs:annotation>
						<xs:documentation>
							LabelId used for this textbox control and
							later referred in localization resources for
							locale content
						</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute type="xs:string" name="defaultValue" />
				<xs:attribute type="xs:boolean" name="required"
					use="required">
					<xs:annotation>
						<xs:documentation>
							Flag to indicate this field is required. Example: If "true", User must enter/provide data in this text field
						</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute type="xs:positiveInteger" name="maxLength"
					use="required" />
				<xs:attribute type="xs:boolean" name="isBold"
					default="false">
					<xs:annotation>
						<xs:documentation>
							Flag to identify if this label to be
							displayed in bold letters.
						</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute type="xs:positiveInteger" name="sequence"
					use="required">
					<xs:annotation>
						<xs:documentation>
							Specify the display order of this UI control
						</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute name="type" use="required">
					<xs:annotation>
						<xs:documentation>
							Choose one of the enums in order to enable
							UI validation. text/filepath/ipaddress/upload/folderpath
						</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:annotation>
							<xs:documentation>
								This is required in order to enable UI
								validation
							</xs:documentation>
						</xs:annotation>
						<xs:restriction base="xs:string">
							<xs:enumeration value="filepath">
								<xs:annotation>
									<xs:documentation>
										This option enables to enforce
										platform specific path
										validation
									</xs:documentation>
								</xs:annotation>
							</xs:enumeration>
							<xs:enumeration value="ipaddress">
								<xs:annotation>
									<xs:documentation>
										This option enables ipaddress
										validation
									</xs:documentation>
								</xs:annotation>
							</xs:enumeration>
							<xs:enumeration value="text">
								<xs:annotation>
									<xs:documentation>
										This option treats as regular
										text without any exclusive
										validation rules other than
										maxlength
									</xs:documentation>
								</xs:annotation>
							</xs:enumeration>
							<xs:enumeration value="upload">
								<xs:annotation>
									<xs:documentation>
										Choose this option if this field
										is used for custom file (single file) (ex: settings file)
										and needs to be included/copied in 
										deployment image 
									</xs:documentation>
								</xs:annotation>
							</xs:enumeration>
							<xs:enumeration value="multiupload">
								<xs:annotation>
									<xs:documentation>
										Choose this option if this field
										is used for uploading multiple files(ex: settings files)
										and needs to be included/copied in 
										deployment image
									</xs:documentation>
								</xs:annotation>
							</xs:enumeration>
							<xs:enumeration value="folderpath">
								<xs:annotation>
									<xs:documentation>
										This option enables folderpath
										validation
									</xs:documentation>
								</xs:annotation>
							</xs:enumeration>
						</xs:restriction>
					</xs:simpleType>
				</xs:attribute>
				<xs:attribute name="fileExtension" type="xs:string">
					<xs:annotation>
						<xs:documentation>This is mandatory if type is "upload". 
						This attribute applies to ONLY of type "upload" or "filepath".
						Provide list of comma separated file extensions supported/allowed by the product.
                        Example: ".xml, .ini, .arg"
                        One usage is Custom Settings Files field. If this is provided, UI will enforce validation and ONLY allow supported file extension/s listed here.</xs:documentation>
					</xs:annotation></xs:attribute>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="OptionType">
		<xs:simpleContent>
			<xs:extension base="xs:string">
				<xs:attribute type="xs:string" name="optValue"
					use="required">
					<xs:annotation>
						<xs:documentation>Value to be mapped to "propertyRefId" key in
							case selected
						</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute type="xs:string" name="label"
					use="required">
					<xs:annotation>
						<xs:documentation>LabelId used for this option and later
							referred
							in localization resources for locale content.
						</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute type="xs:string" name="descriptionLabel">
					<xs:annotation>
						<xs:documentation>LabelId used for this option description and
							later
							referred in localization resources for locale content
						</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute type="xs:boolean" name="isBold"
					default="false">
					<xs:annotation>
						<xs:documentation>Flag to identify if this label to be displayed
							in bold letters.
						</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute type="xs:positiveInteger" name="sequence"
					use="required">
					<xs:annotation>
						<xs:documentation>Specify the display order of this UI control
						</xs:documentation>
					</xs:annotation>
				</xs:attribute>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="CheckBoxType">
		<xs:simpleContent>
			<xs:extension base="xs:string">
				<xs:attribute type="xs:string" name="propertyRefId"
					use="required">
					<xs:annotation>
						<xs:documentation>RefId used by Applications to store user
							selected option.
						</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute type="xs:string" name="chkValue"
					use="required">
					<xs:annotation>
						<xs:documentation>Value to be mapped to "propertyRefId" key in
							case checked.
						</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute type="xs:string" name="unChkValue">
					<xs:annotation>
						<xs:documentation>Value to be mapped to "propertyRefId" key in
							case unchecked. If this attribute is not provided "false" will be
							mapped to "propertyRefId" key
						</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute type="xs:string" name="label"
					use="required">
					<xs:annotation>
						<xs:documentation>LabelId used for this checkbox control and later
							referred in localization resources for locale content.
						</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute type="xs:boolean" name="selected">
					<xs:annotation>
						<xs:documentation>Flag to indicate this checkbox is selected by
							default
						</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute type="xs:boolean" name="required">
					<xs:annotation>
						<xs:documentation>Flag to indicate this field is required. Example if "true",  User must select checkbox
						</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute type="xs:boolean" name="isBold"
					default="false">
					<xs:annotation>
						<xs:documentation>Flag to identify if this label to be displayed
							in bold letters.
						</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute type="xs:positiveInteger" name="sequence"
					use="required">
					<xs:annotation>
						<xs:documentation>Specify the display order of this UI control
						</xs:documentation>
					</xs:annotation>
				</xs:attribute>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="DropDownListType">
		<xs:sequence>
			<xs:element type="OptionType" name="Option" minOccurs="1"
				maxOccurs="unbounded" />
		</xs:sequence>
		<xs:attribute type="xs:string" name="propertyRefId"
			use="required">
			<xs:annotation>
				<xs:documentation>RefId used by Applications to store user selected
					option.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute type="xs:string" name="label"
			use="required">
			<xs:annotation>
				<xs:documentation>LabelId used for this RadioButton group control
					and later
					referred in localization resource for locale content
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute type="xs:string" name="defaultValue"
			use="required">
			<xs:annotation>
				<xs:documentation>One among the optValue defined in Option under DropDownList. This value 
				is used as default selection for DropDownList
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute type="xs:boolean" name="isBold"
			default="false">
			<xs:annotation>
				<xs:documentation>Flag to identify if this label to be displayed in
					bold letters.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute type="xs:positiveInteger" name="sequence"
			use="required">
			<xs:annotation>
				<xs:documentation>Specify the display order of this UI control
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="RadioButtonType">
		<xs:sequence>
			<xs:element type="OptionType" name="Option" minOccurs="1"
				maxOccurs="unbounded" />
		</xs:sequence>
		<xs:attribute type="xs:string" name="propertyRefId"
			use="required">
			<xs:annotation>
				<xs:documentation>RefId used by Applications to store user selected
					option.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute type="xs:string" name="label"
			use="required">
			<xs:annotation>
				<xs:documentation>LabelId used for this RadioButton group control
					and later
					referred in localization resource for locale content
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute type="xs:string" name="defaultValue"
			use="required">
			<xs:annotation>
				<xs:documentation>One among the optValue defined in Option under RadioButton. This value 
				is used as default selection for RadioButton
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute type="xs:boolean" name="isBold"
			default="false">
			<xs:annotation>
				<xs:documentation>Flag to identify if this label to be displayed in
					bold letters.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute type="xs:positiveInteger" name="sequence"
			use="required">
			<xs:annotation>
				<xs:documentation>Specify the display order of this UI control
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
</xs:schema>
