<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://www.gnre.pe.gov.br" 
	elementFormDefault="qualified" 
	attributeFormDefault="unqualified" 
	xmlns:xs="http://www.w3.org/2001/XMLSchema" 
	xmlns="http://www.gnre.pe.gov.br" >
	<xs:include schemaLocation="tiposBasicoGNRE_v1.00.xsd" />
	<xs:element name="TRetLote_GNRE">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="ambiente" maxOccurs="1" minOccurs="1">
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:enumeration value="1"></xs:enumeration>
							<xs:enumeration value="2"></xs:enumeration>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="situacaoRecepcao" maxOccurs="1" minOccurs="1">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="codigo" maxOccurs="1"
								minOccurs="1">
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:pattern
											value="[1-9][0-9]{2}">
										</xs:pattern>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="descricao" maxOccurs="1"
								minOccurs="1">
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:maxLength value="255"></xs:maxLength>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="guiaErro" type="xs:int"
								maxOccurs="1" minOccurs="0">
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="recibo" maxOccurs="1" minOccurs="0">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="numero" maxOccurs="1" minOccurs="1">
								<xs:annotation>
									<xs:documentation>
										Número do recibo de gerado pelo
										portal GNRE
									</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:pattern value="([0-9]{10}|[0-9]{14})"></xs:pattern>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="dataHoraRecibo"
								type="TDataHora" maxOccurs="1" minOccurs="1">
                                <xs:annotation>
                                	<xs:documentation>Data e Hora do recebimento do lote</xs:documentation>
                                </xs:annotation>
							</xs:element>
							<xs:element name="tempoEstimadoProc"
								type="xs:int" maxOccurs="1" minOccurs="1">
                                <xs:annotation>
                                	<xs:documentation>Tempo estimado para processamento do lote em ms.</xs:documentation>
                                </xs:annotation>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
</xs:schema>