<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.opentravel.org/OTA/2003/05" elementFormDefault="qualified" version="1.005" id="OTA2006A">
	<xs:include schemaLocation="OTA_HotelCommonTypes.xsd"/>
	<xs:include schemaLocation="OTA_CommonTypes.xsd"/>
	<xs:include schemaLocation="OTA_AirCommonTypes.xsd"/>
	<xs:include schemaLocation="OTA_SimpleTypes.xsd"/>
	<xs:include schemaLocation="OTA_CommonPrefs.xsd"/>
	<xs:include schemaLocation="OTA_HotelPreferences.xsd"/>
	<xs:include schemaLocation="OTA_Profile.xsd"/>
	<xs:include schemaLocation="OTA_VehicleCommonTypes.xsd"/>
	<xs:include schemaLocation="OTA_AirPreferences.xsd"/>
	<xs:annotation>
		<xs:documentation xml:lang="en">All Schema files in the OTA specification are made available according to the terms defined by the OTA License Agreement at http://www.opentravel.org/ota_downloads_form.cfm</xs:documentation>
	</xs:annotation>
	<xs:element name="OTA_HotelAvailRQ">
		<xs:annotation>
			<xs:documentation xml:lang="en">Requests availability of hotel properties by specific criteria that may include: dates, date ranges, price range, room types, regular and qualifying rates, and/or services and amenities. The availability message can be used to get an initial availability or to get availability for the purpose of modifying an existing reservation.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element name="POS" type="POS_Type" minOccurs="0">
					<xs:annotation>
						<xs:documentation xml:lang="en">Point of sale object. </xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="AvailRequestSegments">
					<xs:complexType>
						<xs:complexContent>
							<xs:extension base="AvailRequestSegmentsType">
								<xs:attribute name="MaximumWaitTime" type="xs:decimal" use="optional">
									<xs:annotation>
										<xs:documentation xml:lang="en">The value of this attribute will be a decimal field identifying the maximum number of seconds the responding application has to respond to the request.  For example, suppose a client requests 10 OTA 'AvailRequestSegment' items but can only wait up to 4.0 seconds max.  If only 6 segments were collected within the time-frame, the client would only receive those 6 segments within one response message. </xs:documentation>
									</xs:annotation>
								</xs:attribute>
							</xs:extension>
						</xs:complexContent>
					</xs:complexType>
				</xs:element>
				<xs:element name="HotelReservationIDs" type="HotelReservationIDsType" minOccurs="0">
					<xs:annotation>
						<xs:documentation xml:lang="en">Collection of Hotel Reservation IDs associated with a given reservation, used when asking for availability for the purpose of modifying an existing reservation.</xs:documentation>
					</xs:annotation>
				</xs:element>
			</xs:sequence>
			<xs:attributeGroup ref="OTA_PayloadStdAttributes"/>
			<xs:attribute name="SummaryOnly" type="xs:boolean" use="optional"/>
			<xs:attribute name="SortOrder" use="optional" default="A">
				<xs:simpleType>
					<xs:restriction base="AlphaLength1">
						<xs:enumeration value="A"/>
						<xs:enumeration value="D"/>
						<xs:enumeration value="N"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="AvailRatesOnly" type="xs:boolean" use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="en">A boolean flag that indicates the response should include ONLY those rates that are available in the date range specified, or whether rates that are NOT available should be shown. "Yes" returns only available rates; "No" returns all rates.</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="BestOnly" type="xs:boolean" use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="en">A boolean flag that indicates the response message should send back only the best rate available at the hotel property, as there could be multiple room types and rates that meet the requested criteria (e.g.: rate range). Allowing that the term "best rate" is subjective, the intent means the lowest rate that meets the category of the input criteria, and may have the effect of limiting the return to one rate quote as opposed to multiples.</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="RateRangeOnly" type="xs:boolean" use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="en">A boolean flag that indicates the response message should send back only those rates that are available within the range of the minimum and maximum amount specified.</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="ExactMatchOnly" type="xs:boolean" use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="en">A boolean flag that indicates the response message should send back only those rates that are an exact match to the requested criteria.</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="AllowPartialAvail" type="xs:boolean" use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="en">A boolean flag that indicates the response message should include availability and rates  that do not span the complete stay.</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="RequestedCurrency" type="AlphaLength3" use="optional"/>
			<xs:attribute name="IsModify" type="xs:boolean" use="optional" default="false">
				<xs:annotation>
					<xs:documentation xml:lang="en">Indicates that this is an availibility request for a modification to an existing reservation.</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attributeGroup ref="MaxResponsesGroup"/>
			<xs:attribute name="SearchCacheLevel" use="optional">
				<xs:simpleType>
					<xs:restriction base="xs:NMTOKEN">
						<xs:enumeration value="Live"/>
						<xs:enumeration value="VeryRecent"/>
						<xs:enumeration value="LessRecent"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:complexType name="AvailRequestSegmentsType">
		<xs:sequence>
			<xs:element name="AvailRequestSegment" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation xml:lang="en">To accommodate the ability to perform multiple requests within one message, the availability request contains the repeating element, BookingSegment. Each booking segment includes a collection of criteria that requests a bookable entity, which may include designated rate plans, room types, amenities or services, and the request can be used for guest rooms or other inventory items for which availability is sought. Each Booking Segment would be presumed to have a unique date range for each request.</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:element name="StayDateRange" type="DateTimeSpanType" minOccurs="0">
							<xs:annotation>
								<xs:documentation xml:lang="en">Range of dates, or fixed set of dates for Availability Request. Date range can also be specified by using 	start 	dates 	and 	number of nights (minimum, maximum or fixed).               **This element is maintained at this level to support those who have implemented this message prior to 2005B.  For new implementations consider using this element under HotelSearchCriteria.**</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="RateRange" minOccurs="0" maxOccurs="5">
							<xs:annotation>
								<xs:documentation xml:lang="en">Requested rate or rate range. Repeats to allow the identification of multiple ranges for multiple room stay candidates. **This element is maintained at this level to support those who have implemented this message prior to 2005B.  For new implementations consider using this element under HotelSearchCriteria.**</xs:documentation>
							</xs:annotation>
							<xs:complexType>
							
										<xs:attribute name="RoomStayCandidateRPH" type="RPH_Type" use="optional">
											<xs:annotation>
												<xs:documentation xml:lang="en">Used to associate a rate range with a room stay candidate.</xs:documentation>
											</xs:annotation>
										</xs:attribute>
										<xs:attributeGroup ref="RateRangeGroup"/>
								
							</xs:complexType>
						</xs:element>
						<xs:element name="RatePlanCandidates" type="RatePlanCandidatesType" minOccurs="0">
							<xs:annotation>
								<xs:documentation xml:lang="en">**This element is maintained at this level to support those who have implemented this message prior to 2005B.  For new implementations consider using this element under HotelSearchCriteria.**</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="Profiles" type="ProfilesType" minOccurs="0">
							<xs:annotation>
								<xs:documentation xml:lang="en">A collection of profile objects or unique IDs of profiles.
 **This element is maintained at this level to support those who have implemented this message prior to 2005B.  For new implementations consider using this element under HotelSearchCriteria.**</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="RoomStayCandidates" minOccurs="0">
							<xs:annotation>
								<xs:documentation xml:lang="en">Collection of room stay candidates. **This element is maintained at this level to support those who have implemented this message prior to 2005B.  For new implementations consider using this element under HotelSearchCriteria.**</xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:sequence>
									<xs:element name="RoomStayCandidate" maxOccurs="unbounded">
										<xs:annotation>
											<xs:documentation xml:lang="en">Element used to identify available room products.</xs:documentation>
										</xs:annotation>
										<xs:complexType>
											<xs:complexContent>
												<xs:extension base="RoomStayCandidateType">
													<xs:attribute name="IsAlternate" type="xs:boolean" use="optional" default="false">
														<xs:annotation>
															<xs:documentation xml:lang="en">Indicates the segment of the RoomStay is an alternate offer. Default=false.</xs:documentation>
														</xs:annotation>
													</xs:attribute>
												</xs:extension>
											</xs:complexContent>
										</xs:complexType>
									</xs:element>
								</xs:sequence>
							</xs:complexType>
						</xs:element>
						<xs:element name="HotelSearchCriteria" type="HotelSearchCriteriaType" minOccurs="0"/>
						<xs:element ref="TPA_Extensions" minOccurs="0"/>
					</xs:sequence>
					<xs:attribute name="AvailReqType">
						<xs:annotation>
							<xs:documentation xml:lang="en">An enumerated type that indicates whether the availability request is for a room or non-room 	product, 	such 	as 	amenities or other activities (e.g.: banquet, conference room, etc.). Values: Room,  NonRoom, Both.</xs:documentation>
						</xs:annotation>
						<xs:simpleType>
							<xs:restriction base="StringLength1to16">
								<xs:enumeration value="Room"/>
								<xs:enumeration value="NonRoom"/>
								<xs:enumeration value="Both"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:attribute>
					<xs:attribute name="MoreDataEchoToken" type="StringLength1to128">
						<xs:annotation>
							<xs:documentation xml:lang="en">The availability response returns the attribute if there were additional rates that could not fit within 	the 	availability response.  The text value should be echoed in this availability request to indicate where to begin the next block of availability data.		</xs:documentation>
						</xs:annotation>
					</xs:attribute>
					<xs:attributeGroup ref="ResponseTypeGroup"/>
					<xs:attribute name="InfoSource" type="InfoSourceType" use="optional">
						<xs:annotation>
							<xs:documentation xml:lang="en">Used to specify the source of the data being exchanged as determined by trading partners. </xs:documentation>
						</xs:annotation>
					</xs:attribute>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
</xs:schema>

