{
	"$schema": "http://json-schema.org/draft-04/schema#",
	"additionalProperties": false,
	"definitions": {
		"hotelSearchResponse": {
			"additionalProperties": false,
			"description": "Response to hotel search request",
			"properties": {
				"versionNumber": {
					"$ref": "commonTypes.json#/definitions/schemaVersion"
				},
				"availabilitySummary": {
					"$ref": "#/definitions/summaryInfo",
					"description": "Holds the total number of hotels processed for each availability status"
				},
				"errors": {
					"$ref": "commonTypes.json#/definitions/errors",
					"description": "Indicates the collections of error occurred in the processing of the request message."
				},
				"hotels": {
					"additionalProperties": false,
					"description": "Products returned as a result of search",
					"items": {
						"$ref": "#/definitions/productType"
					},
					"minItems": 1,
					"type": "array"
				},
				"stayPeriod": {
					"$ref": "commonTypes.json#/definitions/stayPeriodResponseType",
					"description": "Collection of product information which are related to this product only."
				},
				"responseAuditInfo": {
					"$ref": "commonTypes.json#/definitions/responseAuditInfo"
				},
				"warnings": {
					"$ref": "commonTypes.json#/definitions/warnings"
				}
			},
			"required": [
				"responseAuditInfo",
				"versionNumber"
			],
			"oneOf": [
				{
					"required": [
						"hotels"
					]
				},
				{
					"required": [
						"errors"
					]
				}
			],
			"type": "object"
		},
		"dailyPriceType": {
			"additionalProperties": false,
			"description": "Represents standard price information",
			"properties": {
				"value": {
					"$ref": "#/definitions/money"
				},
				"commissionAmount": {
					"$ref": "commonTypes.json#/definitions/xs:decimal"
				},
				"commissionRate": {
					"$ref": "commonTypes.json#/definitions/xs:decimal"
				},
				"priceType": {
					"$ref": "commonTypes.json#/definitions/xs:string"
				}
			},
			"required": [
				"priceType"
			],
			"type": "object"
		},
		"date": {
			"additionalProperties": false,
			"description": "This element holds the price breakdown per service date",
			"properties": {
				"serviceDate": {
					"$ref": "commonTypes.json#/definitions/xs:date"
				},
				"dailyAvailabilityStatus": {
					"additionalProperties": false,
					"description": "This value indicates the availability for the service date: 1=Available, 2=On request",
					"$ref": "commonTypes.json#/definitions/availabilityStatusType"
				},
				"dailyPrice": {
					"$ref": "#/definitions/searchDailyPriceType",
					"description": "Price per sub product"
				},
				"mealBasis": {
					"$ref": "commonTypes.json#/definitions/mealBasisType",
					"description": "Meal Basis Details"
				}
			},
			"required": [
				"dailyAvailabilityStatus",
				"dailyPrice",
				"mealBasis",
				"serviceDate"
			],
			"type": "object"
		},
		"hotelProductInfo": {
			"additionalProperties": false,
			"description": "Contains extra information about the product (such as hotel name, category, star rating and name of the city the hotel is settled in).",
			"properties": {
				"category": {
					"additionalProperties": false,
					"description": "The category that describes the quality of the hotel",
					"maxLength": 50,
					"type": "string"
				},
				"cityName": {
					"additionalProperties": false,
					"description": "The name of the city the hotel is settled in",
					"$ref": "commonTypes.json#/definitions/xs:string"
				},
				"hotelName": {
					"additionalProperties": false,
					"description": "The name of the hotel",
					"$ref": "commonTypes.json#/definitions/xs:string"
				},
				"starRating": {
					"additionalProperties": false,
					"description": "The star rating of the hotel",
					"$ref": "#/definitions/starRatingType"
				}
			},
			"required": [
				"cityName",
				"hotelName"
			],
			"type": "object"
		},
		"money": {
			"type": "number"
		},
		"price": {
			"additionalProperties": false,
			"properties": {
				"B2Csellable": {
					"$ref": "commonTypes.json#/definitions/xs:boolean"
				},
				"allowModifications": {
					"$ref": "commonTypes.json#/definitions/xs:nonNegativeInteger"
				},
				"extraBed": {
					"$ref": "commonTypes.json#/definitions/xs:boolean"
				},
				"packageRate": {
					"$ref": "commonTypes.json#/definitions/xs:boolean"
				},
				"roomTypeCode": {
					"$ref": "commonTypes.json#/definitions/subproductCodeType"
				},
				"paymentDueDate": {
					"additionalProperties": false,
					"$ref": "commonTypes.json#/definitions/xs:date"
				},
				"availabilityStatus": {
					"additionalProperties": false,
					"description": "This value indicates the overall availability (considering all nights of the stay if hotel): 1=Available, 2=On request",
					"type": "integer"
				},
				"cancellationPolicies": {
					"additionalProperties": false,
					"description": "Indicates the multi-tier cancellation policy related to this rate plan",
					"items": {
						"$ref": "commonTypes.json#/definitions/cancellationPolicyRecordType"
					},
					"minItems": 1,
					"type": "array"
				},
				"refundable": {
					"type": "integer"
				},
				"dates": {
					"additionalProperties": false,
					"description": "This element holds the price breakdown",
					"items": {
						"$ref": "#/definitions/date"
					},
					"minItems": 1,
					"type": "array"
				},
				"mealBasis": {
					"additionalProperties": false,
					"properties": {
						"mealBasisCode": {
							"$ref": "commonTypes.json#/definitions/mealBasisCode"
						},
						"multipleMealBasis": {
							"$ref": "commonTypes.json#/definitions/xs:boolean"
						},
						"includedMeals": {
							"additionalProperties": false,
							"description": "Meal details. Mandatory  if mealBasisCode is not Room Only",
							"items": {
								"$ref": "commonTypes.json#/definitions/mealTypeGroup"
							},
							"minItems": 1,
							"type": "array"
						}
					},
					"required": [
						"mealBasisCode"
					],
					"type": "object"
				},
				"rateIdentifier": {
					"additionalProperties": false,
					"$ref": "commonTypes.json#/definitions/xs:string"
				},
				"roomCategory": {
					"additionalProperties": false,
					"description": "Category of the room",
					"$ref": "commonTypes.json#/definitions/xs:string"
				},
				"roomDescription": {
					"additionalProperties": false,
					"description": "Room description",
					"$ref": "commonTypes.json#/definitions/xs:string"
				},
				"rateDetails": {
					"additionalProperties": false,
					"description": "Rate details.",
					"items": {
						"additionalProperties": false,
						"$ref": "commonTypes.json#/definitions/xs:string"
					},
					"minItems": 0,
					"type": "array"
				},
				"roomNumbers": {
					"additionalProperties": false,
					"description": "Room number from search request. This will only be present for room basis searches to match searched room typed with returned room type.",
					"items": {
						"additionalProperties": false,
						"$ref": "commonTypes.json#/definitions/xs:int"
					},
					"minItems": 1,
					"type": "array"
				},
				"roomRestrictions": {
					"$ref": "commonTypes.json#/definitions/roomRestrictionsType"
				},
				"roomTotalPrice": {
					"$ref": "#/definitions/searchTotalPriceType",
					"description": "Total price for all quantity of this subProduct and for all nights"
				},
				"specialOffers": {
					"$ref": "commonTypes.json#/definitions/specialOffers"
				},
				"supplierName": {
					"additionalProperties": false,
					"description": "Details to identify the supplier",
					"$ref": "commonTypes.json#/definitions/xs:string"
				}
			},
			"required": [
				"availabilityStatus",
				"cancellationPolicies",
				"refundable",
				"mealBasis",
				"rateIdentifier",
				"roomDescription",
				"roomNumbers",
				"roomTotalPrice",
				"allowModifications",
				"roomTypeCode"
			],
			"type": "object"
		},
		"productType": {
			"additionalProperties": false,
			"properties": {
				"alerts": {
					"additionalProperties": false,
					"description": "Collection of errata message information which are related to this product only.",
					"items": {
						"$ref": "commonTypes.json#/definitions/alertType"
					},
					"minItems": 1,
					"type": "array"
				},
				"currencyCode": {
					"additionalProperties": false,
					"description": "ISO Currency code",
					"$ref": "commonTypes.json#/definitions/xs:string"
				},
				"giataCode": {
					"additionalProperties": false,
					"$ref": "commonTypes.json#/definitions/xs:string"
				},
				"hotelInfo": {
					"$ref": "#/definitions/hotelProductInfo"
				},
				"productCode": {
					"additionalProperties": false,
					"description": "Unique reference to product",
					"$ref": "commonTypes.json#/definitions/xs:string"
				},
				"roomOptions": {
					"additionalProperties": false,
					"items": {
						"$ref": "#/definitions/price"
					},
					"minItems": 1,
					"type": "array"
				}
			},
			"required": [
				"currencyCode",
				"productCode",
				"roomOptions"
			],
			"type": "object"
		},
		"searchDailyPriceType": {
			"additionalProperties": false,
			"properties": {
				"commissionAmount": {
					"$ref": "commonTypes.json#/definitions/xs:decimal"
				},
				"commissionRate": {
					"$ref": "commonTypes.json#/definitions/xs:decimal"
				},
				"priceType": {
					"$ref": "commonTypes.json#/definitions/xs:positiveInteger"
				},
				"price": {
					"additionalProperties": false,
					"properties": {
						"value": {
							"$ref": "commonTypes.json#/definitions/xs:decimal"
						},
						"recommendedSellingPrice": {
							"$ref": "commonTypes.json#/definitions/xs:decimal"
						}
					},
					"type": "object"
				},
				"taxes": {
					"$ref": "commonTypes.json#/definitions/taxesType"
				}
			},
			"required": [
				"price",
				"priceType"
			],
			"type": "object"
		},
		"searchTotalPriceType": {
			"additionalProperties": false,
			"properties": {
				"commissionAmount": {
					"$ref": "commonTypes.json#/definitions/xs:decimal"
				},
				"commissionRate": {
					"$ref": "commonTypes.json#/definitions/xs:decimal"
				},
				"priceType": {
					"$ref": "commonTypes.json#/definitions/xs:positiveInteger"
				},
				"price": {
					"additionalProperties": false,
					"properties": {
						"value": {
							"$ref": "commonTypes.json#/definitions/xs:decimal"
						},
						"nonOfferPrice": {
							"$ref": "commonTypes.json#/definitions/xs:decimal"
						},
						"recommendedSellingPrice": {
							"$ref": "commonTypes.json#/definitions/xs:decimal"
						}
					},
					"type": "object"
				},
				"taxes": {
					"additionalProperties": false,
					"description": "Taxes that are included in the total price",
					"items": {
						"$ref": "commonTypes.json#/definitions/taxType",
						"description": "An individual tax."
					},
					"minItems": 1,
					"type": "array"
				}
			},
			"required": [
				"price",
				"priceType"
			],
			"type": "object",
			"javaType": "uk.co.miki.eBiz.msi.service.json70.schema.SearchTotalPrice"
		},
		"starRatingType": {
			"description": "Star rating of hotel: 1-7.",
			"enum": [
				"1",
				"2",
				"3",
				"4",
				"5",
				"6",
				"7"
			],
			"maxLength": 1,
			"minLength": 1,
			"type": "string"
		},
		"summaryInfo": {
			"additionalProperties": false,
			"description": "Holds the total number of products processed of each status",
			"properties": {
				"totalAvailable": {
					"additionalProperties": false,
					"description": "Number of products returned with status \"available\"",
					"$ref": "commonTypes.json#/definitions/xs:int"
				},
				"totalOnRequest": {
					"additionalProperties": false,
					"description": "Number of products returned with status \"on request\"",
					"$ref": "commonTypes.json#/definitions/xs:int"
				}
			},
			"required": [
				"totalAvailable",
				"totalOnRequest"
			],
			"type": "object"
		}
	},
	"$ref": "#/definitions/hotelSearchResponse"
}