{
	"$schema": "http://json-schema.org/draft-04/schema#",
	"description": "Hotel prebook response JSON schema",
	"type": "object",
	"additionalProperties": false,
	"definitions": {
		"hotelPrebookResponse": {
			"description": "Response to prebook request",
			"type": "object",
			"properties": {
				"versionNumber": {
					"$ref": "commonTypes.json#/definitions/schemaVersion"
				},
				"prebook": {
					"description": "If this element is present, the prebook is confirmed",
					"type": "object",
					"properties": {
						"currencyCode": {
							"$ref": "commonTypes.json#/definitions/currencyCodeType"
						},
						"giataCode": {
							"additionalProperties": false,
							"$ref": "commonTypes.json#/definitions/xs:string"
						},
						"rooms": {
							"description": "This will be added only when returnFullPrebookDetail is true",
							"type": "array",
							"minItems": 1,
							"items": {
								"$ref": "bookingCommonTypes.json#/definitions/prebookRoomOptionTypeResponse"
							},
							"additionalProperties": false
						},
						"stayPeriod": {
							"$ref": "commonTypes.json#/definitions/stayPeriodResponseType",
							"description": "Service Date Range "
						},
						"productCode": {
							"$ref": "commonTypes.json#/definitions/productCodeType",
							"description": "Unique reference to product"
						}						
					},
					"required": [
						"currencyCode",
						"productCode",
						"rooms",
						"stayPeriod"
					],
					"additionalProperties": false
				},
				"errors": {
					"$ref": "commonTypes.json#/definitions/errors",
					"description": "Collection of errors happen during the prebook of items."
				},
				"responseAuditInfo": {
					"$ref": "commonTypes.json#/definitions/responseAuditInfo",
					"description": "Standard audit information sent with responses"
				},
				"warnings": {
					"$ref": "commonTypes.json#/definitions/warnings"
				}
			},
			"required": [
				"versionNumber",
				"responseAuditInfo"
			],
			"additionalProperties": false
		},
		"prebookResponseItemType": {
			"description": "Contains the details of the Prebook item.",
			"type": "object",
			"properties": {
				"itemNumber": {
					"$ref": "commonTypes.json#/definitions/xs:positiveInteger"
				},
				"giataCode": {
					"additionalProperties": false,
					"$ref": "commonTypes.json#/definitions/xs:string"
				},
				"hotel": {
					"type": "object",
					"properties": {
						"rooms": {
							"description": "This will be added only when returnFullPrebookDetail is true",
							"type": "array",
							"minItems": 1,
							"items": {
								"$ref": "bookingCommonTypes.json#/definitions/prebookRoomOptionType"
							},
							"additionalProperties": false
						},
						"stayPeriod": {
							"$ref": "commonTypes.json#/definitions/stayPeriodResponseType",
							"description": "Service Date Range "
						}
					},
					"required": [
						"stayPeriod"
					],
					"additionalProperties": false,
					"javaType": "uk.co.miki.eBiz.msi.service.json70.schema.PrebookResponseHotel"
				},
				"productCode": {
					"$ref": "commonTypes.json#/definitions/productCodeType",
					"description": "Unique reference to product"
				}
			},
			"required": [
				"itemTotalPrice",
				"productCode"
			],
			"additionalProperties": false,
			"javaType": "uk.co.miki.eBiz.msi.service.json70.schema.PrebookResponseItem"
		}
	},
	"$ref": "#/definitions/hotelPrebookResponse"
}