{
	"$schema": "http://json-schema.org/draft-04/schema#",
	"additionalProperties": false,
	"definitions": {
		"hotelSearchRequest": {
			"additionalProperties": false,
			"description": "Request to returns information about hotel properties that meet the requested criteria, indicating whether the requested service, rate, room stay, etc. is available within the date(s) specified. The response message may include Warnings from business processing rules, or Errors if the request did not succeed.\t",
			"properties": {
				"versionNumber": {
					"$ref": "commonTypes.json#/definitions/schemaVersion"
				},
				"hotelSearchCriteria": {
					"additionalProperties": false,
					"description": "Search criteria to a bookable hotel, which is consist of rate plans, room types and can be used for specific guest in rooms.This request criteria is for specific data range and number of nights.",
					"properties": {
						"currencyCode": {
							"$ref": "commonTypes.json#/definitions/currencyCodeType"
						},
						"languageCode": {
							"$ref": "commonTypes.json#/definitions/xs:language"
						},
						"paxNationality": {
							"$ref": "commonTypes.json#/definitions/countryCodeType"
						},
						"agentMarkup": {
							"$ref": "commonTypes.json#/definitions/agentMarkupType",
							"description": "Agent mark up."
						},
						"availabilityCriteria": {
							"$ref": "#/definitions/availabilityCriteriaType",
							"description": "Indicate the hotels availability need to be returned"
						},
						"destination": {
							"additionalProperties": false,
							"description": "Specify the hotel search location details",
							"properties": {
								"cityNumbers": {
									"$ref": "commonTypes.json#/definitions/cityNumbers"
								},
								"hotelRefs": {
									"$ref": "#/definitions/productRefCriteriaType",
									"description": "Multiple products can be specified"
								}
							},
							"oneOf": [
								{
									"required": [
										"cityNumbers"
									]
								},
								{
									"required": [
										"hotelRefs"
									]
								}
							],
							"type": "object"
						},
						"hotelCriteria": {
							"$ref": "#/definitions/hotelInfoSearchCriteria",
							"description": "Indicates the Hotel to be return with the hotel information"
						},
						"minimumMealBasis": {
							"$ref": "#/definitions/mealBasisBookingType",
							"description": "Used to search for hotels which provide minimum of this meal plan."
						},
						"priceCriteria": {
							"$ref": "#/definitions/priceCriteria",
							"description": "Price based criteria, the hotels will be returned based on this criteria"
						},
						"resultDetails": {
							"additionalProperties": false,
							"properties": {
								"returnDailyPrices": {
									"additionalProperties": false,
									"description": "Controls whether response returns all the daily price information, or just the total price for a quicker response. Default value is false",
									"$ref": "commonTypes.json#/definitions/xs:boolean"
								},
								"returnHotelInfo": {
									"additionalProperties": false,
									"description": "Controls whether response returns hotel extra information (name, category, star rating, city name). 0 - no hotel info, 1 - return hotel info. Default is 0.",
									"type": "integer"
								},
								"returnSpecialOfferDetails": {
									"additionalProperties": false,
									"description": "Controls whether response returns special offer details, this could be useful only when the client implemented to handle special offer code and values for generating description. (0 for no details required, 1 for details required). Default value is 0",
									"$ref": "commonTypes.json#/definitions/xs:integer"
								},"returnRateDetails": {
									"additionalProperties": false,
									"description": "Controls whether response returns rate details. Default value is false",
									"$ref": "commonTypes.json#/definitions/xs:boolean"
								}
							},
							"type": "object"
						},
						"rooms": {
							"additionalProperties": false,
							"description": "Collection of room stay candidate.",
							"items": {
								"$ref": "#/definitions/candidateStayType",
								"description": "Each roomBasis needs to be specified with a sequence, number of adults and number of children."
							},
							"minItems": 1,
							"type": "array"
						},
						"stayPeriod": {
							"$ref": "commonTypes.json#/definitions/stayPeriodRequestType"
						}
					},
					"required": [
						"destination",
						"rooms",
						"stayPeriod",
						"currencyCode",
						"paxNationality"
					],
					"type": "object"
				},
				"requestAuditInfo": {
					"$ref": "commonTypes.json#/definitions/requestAuditInfo",
					"description": "Point of sale information about the message initiator."
				}
			},
			"required": [
				"hotelSearchCriteria",
				"requestAuditInfo",
				"versionNumber"
			],
			"type": "object"
		},
		"alertType": {
			"additionalProperties": false,
			"description": "City level alerts",
			"properties": {
				"description": {
					"additionalProperties": false,
					"description": "Alert description",
					"$ref": "commonTypes.json#/definitions/xs:string"
				},
				"fromDate": {
					"additionalProperties": false,
					"description": "Alert valid from",
					"$ref": "commonTypes.json#/definitions/xs:date"
				},
				"title": {
					"additionalProperties": false,
					"description": "Alert title",
					"$ref": "commonTypes.json#/definitions/xs:string"
				},
				"toDate": {
					"additionalProperties": false,
					"description": "Alert valid to",
					"$ref": "commonTypes.json#/definitions/xs:date"
				}
			},
			"required": [
				"description",
				"fromDate",
				"title",
				"toDate"
			],
			"type": "object"
		},
		"availabilityCriteriaType": {
			"additionalProperties": false,
			"properties": {
				"availabilityIndicator": {
					"additionalProperties": false,
					"description": "Indicate which hotels are to be returned based on availability status: 1=All (allocation and on request), 2=Allocation only",
					"$ref": "#/definitions/returnAllocationType"
				}
			},
			"required": [
				"availabilityIndicator"
			],
			"type": "object"
		},
		"candidateStayType": {
			"additionalProperties": false,
			"description": "Each roomBasis needs to be specified with a sequence, number of adults and number of children",
			"properties": {
				"guests": {
					"additionalProperties": false,
					"description": "Collection of guest for this room.",
					"items": {
						"$ref": "#/definitions/guestCountType"
					},
					"minItems": 1,
					"type": "array"
				},
				"roomNo": {
					"additionalProperties": false,
					"description": "The Sequence number of the Room.",
					"$ref": "commonTypes.json#/definitions/xs:positiveInteger"
				}
			},
			"required": [
				"guests",
				"roomNo"
			],
			"type": "object"
		},
		"guestCountType": {
			"additionalProperties": false,
			"description": "Defines the number of guests",
			"properties": {
				"age": {
					"additionalProperties": false,
					"description": "Defines the age of a guest.",
					"$ref": "commonTypes.json#/definitions/xs:nonNegativeInteger"
				},
				"type": {
					"additionalProperties": false,
					"description": "This attribute allows representing Adult, Child",
					"$ref": "commonTypes.json#/definitions/passengerType"
				}
			},
			"required": [
				"type"
			],
			"type": "object"
		},
		"hotelCategoryType": {
			"description": "Indicate that hotels with a particular category only should be returned: 0=All, 1=Superior deluxe, 2=Deluxe, 3=Superior first, 4=First, 5=Superior tourist, 6=Tourist",
			"enum": [
				"0",
				"1",
				"2",
				"3",
				"4",
				"5",
				"6"
			],
			"maxLength": 1,
			"minLength": 1,
			"type": "string"
		},
		"hotelInfoSearchCriteria": {
			"additionalProperties": false,
			"description": "Criteria relating to hotel information",
			"properties": {
				"hotelCategories": {
					"additionalProperties": false,
					"description": "Category selections (optional). If not specified all are selected.",
					"properties": {
						"hotelCategory": {
							"anyOf": [
								{
									"additionalProperties": false,
									"$ref": "#/definitions/hotelCategoryType"
								},
								{
									"items": {
										"additionalProperties": false,
										"$ref": "#/definitions/hotelCategoryType"
									},
									"minItems": 1,
									"type": "array"
								}
							]
						}
					},
					"required": [
						"hotelCategory"
					],
					"type": "object"
				},
				"starRatings": {
					"additionalProperties": false,
					"description": "Star rating selections (optional). If not specified all are selected.",
					"properties": {
						"starRating": {
							"anyOf": [
								{
									"additionalProperties": false,
									"$ref": "#/definitions/starRatingType"
								},
								{
									"items": {
										"additionalProperties": false,
										"$ref": "#/definitions/starRatingType"
									},
									"minItems": 1,
									"type": "array"
								}
							]
						}
					},
					"required": [
						"starRating"
					],
					"type": "object"
				}
			},
			"type": "object"
		},
		"mealBasisBookingType": {
			"additionalProperties": false,
			"properties": {
				"mealBasisCode": {
					"$ref": "commonTypes.json#/definitions/mealBasisCode"
				}
			},
			"required": [
				"mealBasisCode"
			],
			"type": "object"
		},
		"priceCriteria": {
			"additionalProperties": false,
			"description": "Criteria relating to prices",
			"properties": {
				"returnBestPriceIndicator": {
					"additionalProperties": false,
					"description": "Indicate whether the best/cheapest prices to be returned or not. True - The best/cheapest price will be returned. False - All the prices will be returned.",
					"$ref": "commonTypes.json#/definitions/xs:boolean"
				}
			},
			"type": "object"
		},
		"productRefCriteriaType": {
			"additionalProperties": false,
			"description": "Indicates details of hotel reference information",
			"properties": {
				"giataCodes": {
					"additionalProperties": false,
					"items": {
						"$ref": "commonTypes.json#/definitions/xs:string"
					},
					"minItems": 1,
					"type": "array"
				},
				"productCodes": {
					"additionalProperties": false,
					"items": {
						"additionalProperties": false,
						"$ref": "commonTypes.json#/definitions/xs:string"
					},
					"minItems": 1,
					"type": "array"
				}
			},
			"oneOf": [
				{
					"required": [
						"giataCodes"
					]
				},
				{
					"required": [
						"productCodes"
					]
				}
			],
			"type": "object"
		},
		"returnAllocationType": {
			"description": "Indicate which hotels are to be returned based on availability status: 1=All (allocation and on request), 2=Allocation only",
			"type": "integer"
		},
		"starRatingType": {
			"description": "Star rating of hotel: 1-7.",
			"enum": [
				"1",
				"2",
				"3",
				"4",
				"5",
				"6",
				"7"
			],
			"maxLength": 1,
			"minLength": 1,
			"type": "string"
		}
	},
	"$ref": "#/definitions/hotelSearchRequest"
}