<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema name="publishReprogrammingServiceRequest"
	targetNamespace="urn:neolog:cockpit:TripReprogrammingRequestService"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns="urn:neolog:cockpit:TripReprogrammingRequestService">
	<xsd:import namespace="http://schemas.xmlsoap.org/soap/envelope/" schemaLocation="envelope.xsd"/>

	<!-- Restrições de ids Integer -->
	<xsd:simpleType name="idIntType">
		<xsd:restriction base="xsd:integer">
			<xsd:minExclusive value="0" />
			<xsd:maxExclusive value="10000000000" />
		</xsd:restriction>
	</xsd:simpleType>
	
	<!-- Restrições de ids String -->
	<xsd:simpleType name="sourceIdType">
		<xsd:restriction base="xsd:string">
			<xsd:whiteSpace value="collapse" />
			<xsd:minLength value="1" />
			<xsd:maxLength value="30" />
		</xsd:restriction>
	</xsd:simpleType>
	
	<!-- Restrições de descrição com 255 chars -->
	<xsd:simpleType name="description255Type">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="255" />
		</xsd:restriction>
	</xsd:simpleType>

	<!-- Restrições de status de reprogramação (enum) -->
	<xsd:simpleType name="reprogrammingStatusEnum">
		<xsd:restriction base="xsd:integer">
			<xsd:minInclusive value="0" />
			<xsd:maxInclusive value="3" />
		</xsd:restriction>
	</xsd:simpleType>
	
	<!-- Definição do elemento Load -->
	<xsd:complexType name="load">
		<xsd:sequence>
			<xsd:element name="loadId" type="idIntType"
				minOccurs="1" maxOccurs="1" nillable="false" />
				
			<xsd:element name="loadSourceId" type="sourceIdType"
				minOccurs="0" maxOccurs="1" nillable="false" />						
		</xsd:sequence>
	</xsd:complexType>
	
	<!-- Definição do tipo attributes -->
	<xsd:complexType name="attributes">
		<xsd:sequence>
			<xsd:element maxOccurs="unbounded" minOccurs="1" name="attribute">
				<xsd:complexType>
					<xsd:sequence>			
						<xsd:element name="name" type="description255Type"
							minOccurs="1" maxOccurs="1" nillable="false">
							<xsd:annotation>
								<xsd:appinfo source="http://sap.com/xi/TextID">b00968982ec011e0cce8541f5192a615
								</xsd:appinfo>
							</xsd:annotation>
						</xsd:element>	
						<xsd:element name="value" type="description255Type"
							minOccurs="1" maxOccurs="1" nillable="false">
							<xsd:annotation>
								<xsd:appinfo source="http://sap.com/xi/TextID">b00968982ec011e0cce8541f5192a615
								</xsd:appinfo>
							</xsd:annotation>
						</xsd:element>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>	
	
	<!-- Definição do elemento Trip -->
	<xsd:complexType name="trip">
		<xsd:sequence>
			<xsd:element name="tripId" type="idIntType"
				minOccurs="1" maxOccurs="1" nillable="false">
				<xsd:annotation>
					<xsd:appinfo source="http://sap.com/xi/TextID">8f26f130443e11e0ba71544b7c5d4810
					</xsd:appinfo>
				</xsd:annotation>						
			</xsd:element>
			<xsd:element name="loads" minOccurs="1" maxOccurs="1"
					nillable="false">
					
					<xsd:complexType>
						<xsd:sequence>
							<xsd:element name="load" type="load"
								minOccurs="1" maxOccurs="unbounded" nillable="false">
								
							</xsd:element>
						</xsd:sequence>
					</xsd:complexType>
			</xsd:element>
			
			<xsd:element name="attributes" type="attributes"
				minOccurs="0" maxOccurs="1" nillable="false">
				<xsd:annotation>
					<xsd:appinfo source="http://sap.com/xi/TextID">b00941772ec011e0a8ce541f5192a615
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:element>	
		</xsd:sequence>
	</xsd:complexType>

	<!-- Reprogramming Request -->
	<xsd:element name="publishReprogrammingService">
		<xsd:annotation>
			<xsd:appinfo source="http://sap.com/xi/TextID">cd3977e02ec711e08968541f5192a615
			</xsd:appinfo>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="regionSourceId" type="sourceIdType"
					minOccurs="1" maxOccurs="1" nillable="false">
					<xsd:annotation>
						<xsd:appinfo source="http://sap.com/xi/TextID">b00968852ec011e0c99e541f5192a615
						</xsd:appinfo>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="basketSourceId" type="sourceIdType"
					minOccurs="0" maxOccurs="1" nillable="false">
					<xsd:annotation>
						<xsd:appinfo source="http://sap.com/xi/TextID">8f26f130443e11e0ba71544b7c5d4810
						</xsd:appinfo>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="trips" minOccurs="1" maxOccurs="1"
					nillable="false">
					<xsd:annotation>
						<xsd:appinfo source="http://sap.com/xi/TextID">cd3977e12ec711e0913a541f5192a615
						</xsd:appinfo>
					</xsd:annotation>
					<xsd:complexType>
						<xsd:sequence>
							<xsd:element name="trip" type="trip"
								minOccurs="1" maxOccurs="unbounded" nillable="false">
								<xsd:annotation>
									<xsd:appinfo source="http://sap.com/xi/TextID">8f26f130443e11e0ba71544b7c5d4810
									</xsd:appinfo>
								</xsd:annotation>
							</xsd:element>
						</xsd:sequence>
					</xsd:complexType>
				</xsd:element>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<!-- Reprogramming Response -->
	<xsd:element name="publishReprogrammingServiceResponse">
		<xsd:annotation>
			<xsd:appinfo source="http://sap.com/xi/TextID">cdbabd96450711e0b3b00050569574b0
			</xsd:appinfo>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="Result" minOccurs="1" maxOccurs="1"
					nillable="false">
					<xsd:annotation>
						<xsd:appinfo source="http://sap.com/xi/TextID">30c83351443f11e0becd544b7c5d4810
						</xsd:appinfo>
					</xsd:annotation>
					<xsd:complexType>
						<xsd:sequence>
							<xsd:element name="item" maxOccurs="unbounded" minOccurs="1">
								<xsd:complexType>
									<xsd:sequence>
										<xsd:element name="Regionsourceid" type="sourceIdType" maxOccurs="1" minOccurs="1" nillable="false">
										</xsd:element>
										<xsd:element name="Tripid" type="idIntType" maxOccurs="1" minOccurs="1" nillable="false">
										</xsd:element>
										<xsd:element name="Status" type="reprogrammingStatusEnum" maxOccurs="1" minOccurs="1" nillable="false">
										</xsd:element>
									</xsd:sequence>
								</xsd:complexType>
							</xsd:element>
						</xsd:sequence>
					</xsd:complexType>
				</xsd:element>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

</xsd:schema>