<?xml version="1.0" encoding="utf-8" ?>
<xs:schema targetNamespace="urn:defra.gov.uk:ESP:SeedCerts" xmlns:gt="http://www.govtalk.gov.uk/Schemas/govtalk/core"
	xmlns:SeedCerts="urn:defra.gov.uk:ESP:SeedCerts" xmlns:xs="http://www.w3.org/2001/XMLSchema"
	elementFormDefault="qualified" attributeFormDefault="unqualified" version="13.0" id="SC_Enforcements">
	<xs:annotation>
		<xs:documentation>
			This Schema is used to submit enforcement changes through to NIAB - there are three types
			of updates that this can contain. 1) Company Details, 2) Crop Inspectors, 3) Licensed Seed Testing Station
		</xs:documentation>
		<xs:appinfo>Defra, Seed Certification, Enforcements, NIAB</xs:appinfo>
	</xs:annotation>
	<xs:include schemaLocation="SC_Common.xsd"/>
	<xs:element name="Enforcements" type="SeedCerts:NIAB_SC_ADMIN_Type">
		<xs:annotation>
			<xs:documentation>Root node for Seed Certs NIAB enforcements update.</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:complexType name="NIAB_SC_ADMIN_Type">
		<xs:sequence>
			<xs:choice>
				<xs:element name="CompanyDetails" type="SeedCerts:CompanyInformationType" />
				<xs:element name="CropInspectorDetails" type="SeedCerts:CropInspectorType" />
				<xs:element name="SeedTestStationDetails" type="SeedCerts:SeedTestingStationType" />
			</xs:choice>
		</xs:sequence>
	</xs:complexType>
	<!-- start of CompanyInformationType type definition -->
	<xs:complexType name="CompanyInformationType">
		<xs:annotation>
			<xs:documentation>Structure containing all company information</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="MessageCreationTimestamp" type="xs:dateTime" minOccurs="0" />
			<xs:element name="ActionType" type="SeedCerts:ActionType">
				<xs:annotation>
					<xs:documentation>Action type performed by the message</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="CompanyName" type="SeedCerts:ShortStringType" />
			<xs:element name="ApplicantNo" type="SeedCerts:OfficialNumberType" />
			<xs:element name="RegistrationExt" type="SeedCerts:RegistrationExType"/>
			<xs:element name="PremisesName" type="SeedCerts:LongStringType" minOccurs="0" />
			<xs:element name="AddressLine1" type="SeedCerts:AddressLineType" />
			<xs:element name="AddressLine2" type="SeedCerts:AddressLineType" minOccurs="0" />
			<xs:element name="AddressLine3" type="SeedCerts:AddressLineType" minOccurs="0" />
			<xs:element name="AddressLine4" type="SeedCerts:AddressLineType" minOccurs="0" />
			<xs:element name="Town" type="SeedCerts:AddressTownType" minOccurs="0" />
			<xs:element name="Postcode" type="gt:AddressPostCodeUKtype" minOccurs="0" />
			<xs:element name="CountyCode" type="SeedCerts:CountyCodeType" minOccurs="0" />
			<xs:element name="TelephoneNumber" type="gt:TelephoneNumberType" minOccurs="0" />
			<xs:element name="FaxNumber" type="gt:TelephoneNumberType" minOccurs="0" />
			<xs:element name="DateDeregistered" type="xs:date" minOccurs="0" />
		</xs:sequence>
	</xs:complexType>
	<!-- end of CompanyInformationType type definition -->
	<!-- start of CropInspectorType type definition -->
	<xs:complexType name="CropInspectorType">
		<xs:annotation>
			<xs:documentation>Structure containing all crop inspector information</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="MessageCreationTimestamp" type="xs:dateTime" minOccurs="0" />
			<xs:element name="ActionType" type="SeedCerts:ActionType">
				<xs:annotation>
					<xs:documentation>Action type performed by the message</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="PersonId" type="xs:int" />
			<xs:element name="Title" type="SeedCerts:PersonTitleType" />
			<xs:element name="Forename" type="SeedCerts:PersonForenameType" />
			<xs:element name="Surname" type="SeedCerts:PersonSurnameType" />
			<xs:element name="AddressLine1" type="SeedCerts:AddressLineType" />
			<xs:element name="AddressLine2" type="SeedCerts:AddressLineType" minOccurs="0" />
			<xs:element name="AddressLine3" type="SeedCerts:AddressLineType" minOccurs="0" />
			<xs:element name="AddressLine4" type="SeedCerts:AddressLineType" minOccurs="0" />
			<xs:element name="Town" type="SeedCerts:AddressTownType" minOccurs="0" />
			<xs:element name="Postcode" type="gt:AddressPostCodeUKtype" minOccurs="0" />
			<xs:element name="CountyCode" type="SeedCerts:CountyCodeType" minOccurs="0" />
			<xs:element name="TelephoneNumber" type="gt:TelephoneNumberType" minOccurs="0" />
			<xs:element name="LicenceNumber" type="SeedCerts:LicenceNumberType" />
			<xs:element name="Freelance" type="SeedCerts:YesNoType" />
			<xs:element name="CompanyRegistrationNumber" type="SeedCerts:CompanyRegNumberType" minOccurs="0" />
			<xs:element name="Suffix" type="SeedCerts:SuffixType" minOccurs="0" />
			<xs:element name="LicenceDetails" type="SeedCerts:LicenceDetailsType" minOccurs="0" maxOccurs="unbounded" />
		</xs:sequence>
	</xs:complexType>
	<!-- end of CropInspectorType type definition -->
	<!-- start of SeedTestingStationType type definition -->
	<xs:complexType name="SeedTestingStationType">
		<xs:annotation>
			<xs:documentation>Structure containing all seed testing station</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="MessageCreationTimestamp" type="xs:dateTime" minOccurs="0" />
			<xs:element name="ActionType" type="SeedCerts:ActionType">
				<xs:annotation>
					<xs:documentation>Action type performed by the message</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="StationNo" type="SeedCerts:StationNumberType" />
			<xs:element name="StationName" type="SeedCerts:ShortStringType" />
			<xs:element name="DateStationClosed" type="xs:date" minOccurs="0" />
			<xs:element name="AddressLine1" type="SeedCerts:AddressLineType" />
			<xs:element name="AddressLine2" type="SeedCerts:AddressLineType" minOccurs="0" />
			<xs:element name="AddressLine3" type="SeedCerts:AddressLineType" minOccurs="0" />
			<xs:element name="AddressLine4" type="SeedCerts:AddressLineType" minOccurs="0" />
			<xs:element name="Town" type="SeedCerts:AddressTownType" minOccurs="0" />
			<xs:element name="Postcode" type="gt:AddressPostCodeUKtype" minOccurs="0" />
			<xs:element name="CountyCode" type="SeedCerts:CountyCodeType" minOccurs="0" />
			<xs:element name="TelephoneNumber" type="gt:TelephoneNumberType" minOccurs="0" />
			<xs:element name="FaxNumber" type="gt:TelephoneNumberType" minOccurs="0" />
			<xs:element name="ResponsiblePersonDetails" type="SeedCerts:SeedTestStationPersonResponsibleType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="LicencedSpeciesDetails" type="SeedCerts:LicenceSpeciesDetailsType" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<!-- end of SeedTestingStationType type definition -->
	<!-- start of LicenceDetailsType type definition -->
	<xs:complexType name="LicenceDetailsType">
		<xs:annotation>
			<xs:documentation>Structure containing standard Address data</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="PersonId" type="xs:int" />
			<xs:element name="LicenceCategory" type="SeedCerts:LicenceCategoryType" />
			<xs:element name="Status" type="SeedCerts:LicenceCategoryStatusType" />
			<xs:element name="Year1" type="SeedCerts:YearType" />
			<xs:element name="YearPassed" type="SeedCerts:YearType" />
			<xs:element name="RetestDue" type="SeedCerts:YearType" />
			<xs:element name="DateCommitment" type="xs:date" minOccurs="0" />
		</xs:sequence>
	</xs:complexType>
	<!-- end of LicenceDetailsType type definition -->
	<!-- start of SeedTestStationPersonResponsibleType type definition -->
	<xs:complexType name="SeedTestStationPersonResponsibleType">
		<xs:annotation>
			<xs:documentation>Structure containing standard Address data</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="StationNo" type="SeedCerts:StationNumberType" />
			<xs:element name="Title" type="SeedCerts:PersonTitleType" minOccurs="0" />
			<xs:element name="FirstInitial" type="SeedCerts:PersonSingleInitialType" minOccurs="0" />
			<xs:element name="OtherInitials" type="SeedCerts:ShortStringType" minOccurs="0" />
			<xs:element name="Surname" type="SeedCerts:PersonSurnameType" minOccurs="0" />
		</xs:sequence>
	</xs:complexType>
	<!-- end of SeedTestStationPersonResponsibleType type definition -->
	<!-- start of CompanyPersonResponsibleType type definition -->
	<xs:complexType name="CompanyPersonResponsibleType">
		<xs:annotation>
			<xs:documentation>Structure containing standard Address data</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="ApplicantNo" type="SeedCerts:ShortStringType" />
			<xs:element name="Title" type="gt:CitizenNameTitleType" minOccurs="0" />
			<xs:element name="FirstInitial" type="SeedCerts:ShortStringType" minOccurs="0" />
			<xs:element name="OtherInitials" type="SeedCerts:ShortStringType" minOccurs="0" />
			<xs:element name="Surname" type="gt:CitizenNameSurnameType" />
		</xs:sequence>
	</xs:complexType>
	<!-- end of CompanyPersonResponsibleType type definition -->
	<!-- start of LicenceSpeciesDetailsType type definition -->
	<xs:complexType name="LicenceSpeciesDetailsType">
		<xs:sequence>
			<xs:element name="StationNo" type="SeedCerts:StationNumberType" />
			<xs:element name="NIABMainKind" type="SeedCerts:NIABKindCodeType" />
		</xs:sequence>
	</xs:complexType>
	<!-- end of LicenceSpeciesDetailsType type definition -->
</xs:schema>
