{
	"$schema": "http://json-schema.org/draft-04/schema#",
	"description": "Hotel booking response JSON schema",
	"additionalProperties": false,
	"definitions": {
		"bookingSearchRequest": {
			"additionalProperties": false,
			"description": "Generic service to retrieve the collection of reservation item identified by search criteria.",
			"properties": {
				"versionNumber": {
					"$ref": "commonTypes.json#/definitions/schemaVersion"
				},
				"SearchCriteria": {
					"$ref": "#/definitions/SearchCriteriaType",
					"description": "Specify the details of the booking search criteria."
				},
				"requestAuditInfo": {
					"$ref": "commonTypes.json#/definitions/requestAuditInfo",
					"description": "This holds the details about requestor and audit information."
				}
			},
			"required": [
				"SearchCriteria",
				"requestAuditInfo",
				"versionNumber"
			],
			"type": "object"
		},
		"SearchCriteriaType": {
			"additionalProperties": false,
			"description": "Specify the reservation search criteria",
			"properties": {
				"bookingSearchCriteria": {
					"additionalProperties": false,
					"description": "Specify the any one of the booking search criteria.",
					"properties": {
						"basicCriteria": {
							"additionalProperties": false,
							"description": "Specify the basic booking search criteria",
							"properties": {
								"dateRange": {
									"additionalProperties": false,
									"description": "Specify the various date ranges of the booking to search.",
									"properties": {
										"bookingDate": {
											"$ref": "#/definitions/searchDatePeriodType",
											"description": "Specify the booking date period."
										},
										"cancellationDeadlineDate": {
											"$ref": "#/definitions/searchDatePeriodType",
											"description": "Specify the cancellation deadline date range."
										},
										"cancelledDate": {
											"$ref": "#/definitions/searchDatePeriodType",
											"description": "Specify the booking cancelled Date"
										},
										"lastUpdatedDate": {
											"$ref": "#/definitions/searchDatePeriodType",
											"description": "Specify the date when booking was last updated"
										},
										"serviceDate": {
											"$ref": "#/definitions/searchDatePeriodType",
											"description": "Specify the service date  period."
										}
									},
									"type": "object"
								},
								"destination": {
									"additionalProperties": false,
									"description": "Specify the booking location details.",
									"properties": {
										"cityNumbers": {
											"$ref": "commonTypes.json#/definitions/cityNumbers"
										}
									},
									"required": [
										"cityNumbers"
									],
									"type": "object",
									"javaType": "uk.co.miki.eBiz.msi.service.json70.schema.BookingSearchDestination"
								},
								"leadPassengerName": {
									"additionalProperties": false,
									"description": "Specify the Name of the lead passenger detail",
									"$ref": "commonTypes.json#/definitions/xs:string"
								},
								"referencePoint": {
									"additionalProperties": false,
									"description": "Specify the various reference point to search for booking",
									"properties": {
										"bookingReference": {
											"additionalProperties": false,
											"description": "Specify the unique bookingReference given during reservation.",
											"$ref": "commonTypes.json#/definitions/xs:string"
										},
										"cancellationReference": {
											"additionalProperties": false,
											"description": "Specify the unique Cancellation Reference given during cancel.",
											"$ref": "commonTypes.json#/definitions/xs:string"
										},
										"clientReference": {
											"additionalProperties": false,
											"description": "Specify the client reference given during reservation.",
											"$ref": "commonTypes.json#/definitions/xs:string"
										},
										"tourReference": {
											"additionalProperties": false,
											"description": "Specify the unique tourReference give during reservation.",
											"$ref": "commonTypes.json#/definitions/xs:string"
										}
									},
									"type": "object"
								}
							},
							"type": "object"
						},
						"bookingStatus": {
							"additionalProperties": false,
							"description": "Specify the booking status",
							"$ref": "bookingCommonTypes.json#/definitions/bookingStatusType"
						},
						"paymentMethod": {
							"additionalProperties": false,
							"description": "Specify the payment method.",
							"$ref": "#/definitions/paymentMethodType"
						},
						"paymentOption": {
							"additionalProperties": false,
							"description": "Specify the payment option.",
							"$ref": "#/definitions/paymentOptionType"
						},
						"paymentStatus": {
							"additionalProperties": false,
							"description": "Specify the payment status",
							"$ref": "bookingCommonTypes.json#/definitions/paymentStatusType"
						}
					},
					"required": [
						"basicCriteria"
					],
					"type": "object"
				},
				"clientSearchCriteria": {
					"additionalProperties": false,
					"description": "Specify the client information for which the reservation need to searched.",
					"properties": {
						"branchCode": {
							"additionalProperties": false,
							"description": "Branch Code",
							"maxLength": 3,
							"minLength": 3,
							"type": "string"
						},
						"clientCode": {
							"additionalProperties": false,
							"description": "Client code",
							"maxLength": 3,
							"minLength": 3,
							"type": "string"
						},
						"userName": {
							"additionalProperties": false,
							"description": "User name of the client",
							"$ref": "commonTypes.json#/definitions/xs:string"
						}
					},
					"type": "object"
				},
				"productSearchCriteria": {
					"$ref": "#/definitions/productSearchCriteriaType",
					"description": "Specify the client information for which the reservation need to searched."
				}
			},
			"required": [
				"bookingSearchCriteria"
			],
			"type": "object"
		},
		"searchDatePeriodType": {
			"additionalProperties": false,
			"properties": {
				"endDate": {
					"additionalProperties": false,
					"description": "Specify the date",
					"$ref": "commonTypes.json#/definitions/xs:date"
				},
				"startDate": {
					"additionalProperties": false,
					"description": "Specify the date",
					"$ref": "commonTypes.json#/definitions/xs:date"
				}
			},
			"required": [
				"endDate",
				"startDate"
			],
			"type": "object"
		},
		"productSearchCriteriaType": {
			"additionalProperties": false,
			"description": "Specify the product search criteria.",
			"properties": {
				"productCode": {
					"$ref": "commonTypes.json#/definitions/productCodeType",
					"description": "Specify the product code ."
				},
				"productName": {
					"additionalProperties": false,
					"description": "Specify the product name .",
					"$ref": "commonTypes.json#/definitions/xs:string"
				},
				"productType": {
					"additionalProperties": false,
					"description": "Specify the product type.",
					"$ref": "#/definitions/EBIZproductType"
				}
			},
			"type": "object"
		},
		"paymentMethodType": {
			"description": "The defined set of the payment methods.",
			"enum": [
				"0",
				"1",
				"2",
				"3",
				"4"
			],
			"maximum": 2147483647,
			"minimum": -2147483648,
			"type": "string"
		},
		"paymentOptionType": {
			"description": "The defined set of the payment option",
			"enum": [
				"0",
				"1",
				"2"
			],
			"maximum": 2147483647,
			"minimum": -2147483648,
			"type": "string"
		},
		"EBIZproductType": {
			"description": "Defined set of products",
			"enum": [
				"3",
				"4",
				"5",
				"0"
			],
			"maximum": 2147483647,
			"minimum": -2147483648,
			"type": "string"
		}
	},
	"type": "object",
	"$ref": "#/definitions/bookingSearchRequest"
}