<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
			targetNamespace="http://ws.ge.co.nz/ext/bob/xsd/complex/2" 
			xmlns="http://ws.ge.co.nz/ext/bob/xsd/complex/2" 
			xmlns:st="http://ws.ge.co.nz/ext/bob/xsd/simple/2"
			elementFormDefault="qualified" 
			version="2.1">

	<xsd:import namespace="http://ws.ge.co.nz/ext/bob/xsd/simple/2" 
				schemaLocation="http://ws.ge.co.nz/ext/bob/xsd/SimpleTypes_2_1.xsd"/>
	<!--xsd:include schemaLocation="SimpleTypes_2_1.xsd"/-->

	<xsd:complexType name="RecipientType">
		<xsd:attribute name="Company" type="st:lengthFive" use="required"/>
		<xsd:attribute name="Application" type="st:lengthFive" use="required"/>
	</xsd:complexType>

	<xsd:complexType name="SenderType">
		<xsd:attribute name="Company" type="st:lengthFive" use="required"/>
		<xsd:attribute name="Application" type="st:lengthFive" use="required"/>
		<xsd:attribute name="Initiator" type="st:lengthFive"/>
	</xsd:complexType>

	<xsd:complexType name="EnvelopeType">
		<xsd:sequence>
			<xsd:element name="Sender" type="SenderType"/>
			<xsd:element name="Recipient" type="RecipientType"/>
			<xsd:element name="MsgID">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:pattern value="[A-Z0-9]{5}-[A-Z0-9]{5}-[0-9]{5}-[0-9]{3}-[0-9]{3}"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:complexType name="InstallAddressType">
		<xsd:sequence>
			<xsd:element ref="Unit" minOccurs="0"/>
			<xsd:element ref="StreetNumber"/>
			<xsd:element ref="StreetName"/>
			<xsd:element ref="Suburb"/>
			<xsd:element ref="Town"/>
			<xsd:element ref="Region" minOccurs="0"/>
			<xsd:element ref="PostCode" minOccurs="0"/>
			<xsd:element ref="BuildingType" minOccurs="0"/>
			<xsd:element ref="PropertyName" minOccurs="0"/>
			<xsd:element ref="LotFireDairy" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:complexType name="PostalAddressType">
		<xsd:sequence>
			<xsd:element ref="FreeForm"/>
			<xsd:element ref="Unit"/>
			<xsd:element ref="StreetNumber"/>
			<xsd:element ref="StreetName"/>
			<xsd:element ref="POBox"/>
			<xsd:element ref="Suburb"/>
			<xsd:element ref="Town"/>
			<xsd:element ref="PostCode"/>
			<xsd:element ref="ZipCode"/>
			<xsd:element ref="Country"/>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:complexType name="PhoneType">
		<xsd:simpleContent>
			<xsd:extension base="st:phoneNumberType">
				<xsd:attribute name="Type" type="st:phoneType" use="required"/>
			</xsd:extension>
		</xsd:simpleContent>
	</xsd:complexType>

	<xsd:complexType name="WorkOrderType">
		<xsd:attribute name="Ref" type="st:lengthTen" use="required"/>
		<xsd:attribute name="Status" use="required">
			<xsd:simpleType>
				<xsd:restriction base="xsd:string">
					<xsd:enumeration value="Request"/>
					<xsd:enumeration value="Accept"/>
					<xsd:enumeration value="Decline"/>
					<xsd:enumeration value="Complete"/>
					<xsd:enumeration value="Incomplete"/>
				</xsd:restriction>
			</xsd:simpleType>
		</xsd:attribute>
		<xsd:attribute name="Date" type="xsd:date" use="required"/>
		<xsd:attribute name="Time" type="xsd:time" use="required"/>
	</xsd:complexType>

	<xsd:element name="Country" type="st:lengthThirty"/>
	<xsd:element name="BuildingType" type="st:lengthThirty"/>
	<xsd:element name="FreeForm" type="st:lengthThirty"/>
	<xsd:element name="LotFireDairy" type="st:lengthFive"/>
	<xsd:element name="POBox" type="st:lengthTwenty"/>
	<xsd:element name="PostCode" type="st:lengthThirteen"/>
	<xsd:element name="PropertyName" type="st:lengthThirty"/>
	<xsd:element name="Region" type="st:lengthThirty"/>
	<xsd:element name="StreetNumber" type="st:lengthEight"/>
	<xsd:element name="StreetName" type="st:lengthFifty"/>
	<xsd:element name="Suburb" type="st:lengthTwenty">
		<xsd:annotation>
			<xsd:documentation>Mandatory. Describes the suburb or town of the address.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="Town" type="st:lengthTwenty">
		<xsd:annotation>
			<xsd:documentation>Mandatory. Town or city name. E.g. Kaitaia</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="Unit" type="st:lengthSix">
		<xsd:annotation>
			<xsd:documentation>Optional. Describes the apartment or unit (or otherwise sub compartment) of the address.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="ZipCode" type="st:lengthThirteen"/>
</xsd:schema>