{
	"$schema": "http://json-schema.org/draft-04/schema#",
	"description": "Hotel prebook request JSON schema",
	"type": "object",
	"additionalProperties": false,
	"definitions": {
		"hotelPrebookRequest": {
			"description": "Prebook request",
			"type": "object",
			"properties": {
				"versionNumber": {
					"$ref": "commonTypes.json#/definitions/schemaVersion"
				},
				"prebook": {
					"type": "object",
					"properties": {
						"currencyCode": {
							"$ref": "commonTypes.json#/definitions/currencyCodeType"
						},
						"languageCode": {
							"$ref": "commonTypes.json#/definitions/xs:language"
						},
						"paxNationality": {
							"$ref": "commonTypes.json#/definitions/countryCodeType"
						},
						"priceChangeTolerance": {
							"$ref": "commonTypes.json#/definitions/xs:integer"
						},
						"productCode": {
							"$ref": "commonTypes.json#/definitions/productCodeType",
							"description": "Unique reference to product"
						},
						"giataCode": {
							"additionalProperties": false,
							"$ref": "commonTypes.json#/definitions/xs:string"
						},
						"hotel": {
							"$ref": "#/definitions/hotelPrebookItemType"
						},
						"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"
						},
						"returnRateDetails": {
							"additionalProperties": false,
							"description": "Controls whether response json returns the rate details information. Default value is false",
							"$ref": "commonTypes.json#/definitions/xs:boolean"
						},
						"immediateConfirmationRequired": {
							"additionalProperties": false,
							"description": "false=Prebook can be made for on request, true=Prebook will be filtered for immediately confirmation only",
							"type": "boolean"
						}
					},
					"required": [
						"hotel",
						"currencyCode",
						"paxNationality",
						"priceChangeTolerance"
					],
					"oneOf": [
						{
							"required": [
								"productCode"
							]
						},
						{
							"required": [
								"giataCode"
							]
						}
					],
					"additionalProperties": false,
					"javaType": "uk.co.miki.eBiz.msi.service.json70.schema.RequestPrebook"
				},
				"requestAuditInfo": {
					"$ref": "commonTypes.json#/definitions/requestAuditInfo"
				}
			},
			"required": [
				"versionNumber",
				"prebook",
				"requestAuditInfo"
			],
			"additionalProperties": false
		},
		"prebookItemType": {
			"description": "Prebook details",
			"type": "object",
			"properties": {
				"itemNumber": {
					"$ref": "commonTypes.json#/definitions/xs:positiveInteger"
				},
				"hotel": {
					"$ref": "#/definitions/hotelPrebookItemType"
				}
			},
			"required": [
				"itemNumber",
				"hotel"
			],
			"oneOf": [
				{
					"required": [
						"productCode"
					]
				},
				{
					"required": [
						"giataCode"
					]
				}
			],
			"additionalProperties": false
		},
		"hotelPrebookItemType": {
			"description": "Detail information of the hotel",
			"type": "object",
			"properties": {
				"rooms": {
					"description": "This element indicates the number of rooms required",
					"type": "array",
					"minItems": 1,
					"items": {
						"$ref": "#/definitions/prebookRoomType",
						"description": "Specify the each room details."
					},
					"additionalProperties": false
				},
				"stayPeriod": {
					"$ref": "commonTypes.json#/definitions/stayPeriodRequestType"
				}
			},
			"required": [
				"rooms",
				"stayPeriod"
			],
			"additionalProperties": false,
			"javaType": "uk.co.miki.eBiz.msi.service.json70.schema.PrebookRequestHotel"
		},
		"prebookRoomType": {
			"description": "The sub product information required is simple - code names per room for every room prebooked",
			"type": "object",
			"properties": {
				"roomNo": {
					"$ref": "commonTypes.json#/definitions/xs:positiveInteger"
				},
				"roomTypeCode": {
					"$ref": "commonTypes.json#/definitions/subproductCodeType"
				},
				"guests": {
					"description": "Collection of room stay candidate.",
					"type": "array",
					"minItems": 1,
					"items": {
						"$ref": "bookingCommonTypes.json#/definitions/prebookGuestCountType",
						"description": "Each roomBasis needs to be specified with a sequence, number of adults and number of children."
					},
					"additionalProperties": false
				},
				"rateIdentifier": {
					"additionalProperties": false,
					"$ref": "commonTypes.json#/definitions/xs:string"
				},
				"roomTotalPrice": {
					"additionalProperties": false,
					"description": "Total price for this room and for all nights. This does not include the cost for any optional or upgrade requests.",
					"$ref": "commonTypes.json#/definitions/xs:decimal"
				}
			},
			"required": [
				"roomNo",
				"roomTypeCode",
				"guests",
				"rateIdentifier",
				"roomTotalPrice"
			],
			"additionalProperties": false,
			"javaType": "uk.co.miki.eBiz.msi.service.json70.schema.PrebookRequestRoom"
		}
	},
	"$ref": "#/definitions/hotelPrebookRequest"
}