{
	"$schema": "http://json-schema.org/draft-04/schema#",
	"description": "Comment describing your JSON Schema",
	"definitions": {
		"hotelModificationItemType": {
			"type": "object",
			"properties": {
				"tourReference": {
					"description": "The unique reservation reference of the item for which modification was requested",
					"type": "string"
				},
				"hotel": {
					"$ref": "#/definitions/hotel"
				},
				"immediateConfirmationRequired": {
					"$ref": "commonTypes.json#/definitions/immediateConfirmationRequired"
				}
			},
			"required": [
				"tourReference"
			],
			"additionalProperties": false
		},
		"hotel": {
			"type": "object",
			"properties": {
				"changeNameAndPreference": {
					"$ref": "#/definitions/changeNameAndPreference"
				},
				"changeStayPeriod": {
					"$ref": "#/definitions/changeStayPeriodRequestType"
				},
				"removeRooms": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/removeRoomType"
					}
				}
			},
			"additionalProperties": false,
			"oneOf": [
				{
					"required": [
						"changeNameAndPreference"
					]
				},
				{
					"required": [
						"changeStayPeriod"
					]
				},
				{
					"required": [
						"removeRooms"
					]
				}
			]
		},
		"changeNameAndPreference": {
			"type": "object",
			"properties": {
				"changePreferences": {
					"$ref": "bookingCommonTypes.json#/definitions/preferencesType"
				},
				"changeName": {
					"type": "object",
					"properties": {
						"leadPaxName": {
							"$ref": "commonTypes.json#/definitions/paxNameType"
						},
						"room": {
							"type": "array",
							"items": {
								"$ref": "#/definitions/roomNameChangeType"
							}
						}
					},
					"required": [
						"leadPaxName",
						"room"
					],
					"additionalProperties": false
				}
			},
			"additionalProperties": false
		},
		"roomNameChangeType": {
			"type": "object",
			"properties": {
				"roomTypeCode": {
					"description": "The unique code for the room.Miki code representing room type.",
					"type": "string"
				},
				"roomNo": {
					"description": "The Sequence number of the Room.",
					"type": "number"
				},
				"rateIdentifier": {
					"type": "string"
				},
				"guests": {
					"type": "array",
					"items": {
						"$ref": "bookingCommonTypes.json#/definitions/bookingGuestCountType"
					}
				}
			},
			"required": [
				"roomTypeCode",
				"roomNo",
				"guests"
			],
			"additionalProperties": false
		},
		"changeStayPeriodRequestType": {
			"type": "object",
			"properties": {
				"checkindate": {
					"$ref": "commonTypes.json#/definitions/xs:date"
				},
				"numberOfNights": {
					"$ref": "commonTypes.json#/definitions/xs:positiveInteger"
				}
			},
			"required": [
				"checkindate",
				"numberOfNights"
			],
			"additionalProperties": false
		},
		"removeRoomType": {
			"type": "object",
			"properties": {
				"roomTypeCode": {
					"type": "string"
				},
				"roomNo": {
					"$ref": "commonTypes.json#/definitions/xs:positiveInteger"
				},
				"rateIdentifier": {
					"type": "string"
				}
			},
			"required": [
				"roomTypeCode",
				"roomNo"
			],
			"additionalProperties": false
		},
		"modifyCostResponseType": {
			"description": "This element has the cost for modification and the reservation items",
			"type": "object",
			"properties": {
				"tourReference": {
					"$ref": "bookingCommonTypes.json#/definitions/tourReferenceType"
				},
				"tourStatus": {
					"$ref": "bookingCommonTypes.json#/definitions/bookingStatusType"
				},
				"currentTotalPrice": {
					"$ref": "commonTypes.json#/definitions/priceWithTaxes"
				},
				"newTotalPrice": {
					"$ref": "commonTypes.json#/definitions/priceWithTaxes"
				},
				"tourTotalModificationCharge": {
					"description": "Total Charges for Modification",
					"type": "number"
				},
				"roomModificationChargeDetails": {
					"$ref": "#/definitions/modificationChargeType"
				},
				"tourDetail": {
					"description": "This element contains the modified reservation items and it will be presented only if the modification is successful.",
					"type": "object",
					"properties": {
						"modResponse": {
							"$ref": "#/definitions/modifyResponseType"
						},
						"paymentInfo": {
							"$ref": "bookingCommonTypes.json#/definitions/paymentResponseType"
						}
					},
					"additionalProperties": false
				}
			},
			"required": [
				"tourReference",
				"tourStatus",
				"currentTotalPrice",
				"newTotalPrice"
			],
			"additionalProperties": false
		},
		"modificationChargeType": {
			"description": "Contains the modification charges which are appllied to this booking",
			"type": "object",
			"properties": {
				"roomCancellationChargeDetails": {
					"description": "Full details and the cancellation charge along with the how the cancellation charge is calculated per Night.",
					"type": "object",
					"properties": {
						"roomCancellationChargeDetail": {
							"type": "array",
							"items": {
								"$ref": "#/definitions/canceltemType"
							}
						}
					},
					"required": [
						"roomCancellationChargeDetail"
					],
					"additionalProperties": false
				}
			},
			"additionalProperties": false
		},
		"canceltemType": {
			"description": "Cancellation charge for each segments in the item",
			"type": "object",
			"properties": {
				"roomTypeCode": {
					"description": "The unique segment code",
					"type": "string"
				},
				"roomNo": {
					"description": "The sequence number of the booked Room.",
					"type": "number"
				},
				"roomTotalCancellationCharge": {
					"description": "The charge details for this particular segment",
					"type": "number"
				},
				"cancellationPolicy": {
					"description": "Cancellation Policy that is applied to calculate the cancellation charge",
					"type": "object",
					"properties": {
						"cancelllationPolicy": {
							"$ref": "commonTypes.json#/definitions/cancellationPolicyRecordType"
						},
						"appliesTo": {
							"type": "string"
						}
					},
					"additionalProperties": false
				}
			},
			"required": [
				"roomTypeCode",
				"roomNo",
				"roomTotalCancellationCharge"
			],
			"additionalProperties": false
		},
		"modifyResponseType": {
			"description": "Detail of the modify item",
			"type": "object",
			"properties": {
				"currencyCode": {
					"$ref": "commonTypes.json#/definitions/currencyCodeType"
				},
				"clientRef": {
					"description": "The client's reference for the booking",
					"type": "string"
				},
				"bookingReference": {
					"description": "Unique reservation number for all the items in the nooking request.",
					"type": "string"
				},
				"paymentDueDate": {
					"description": "Payment due date applicable to this booking.",
					"type": "string"
				},
				"item": {
					"$ref": "hotelBookingResponse.json#/definitions/bookingResponseItemType"
				},
				"departureDate": {
					"type": "string"
				},
				"charge": {
					"type": "object",
					"properties": {
						"bookingcharge": {
							"$ref": "commonTypes.json#/definitions/priceType"
						},
						"additionalCharge": {
							"$ref": "commonTypes.json#/definitions/priceType"
						},
						"modificationCharge": {
							"$ref": "commonTypes.json#/definitions/priceType"
						}
					},
					"additionalProperties": false
				},
				"commission": {
					"$ref": "commonTypes.json#/definitions/priceType"
				}
			},
			"required": [
				"currencyCode",
				"clientRef",
				"bookingReference",
				"item"
			],
			"additionalProperties": false
		},
		"modifyDepartureDateType": {
			"description": "Modify the booking reference ",
			"type": "object",
			"properties": {
				"bookingReference": {
					"$ref": "commonTypes.json#/definitions/bookingReferenceType"
				},
				"departureDate": {
					"$ref": "commonTypes.json#/definitions/xs:date"
				}
			},
			"additionalProperties": false
		},
		"modifyClientReferenceType": {
			"type": "object",
			"properties": {
				"bookingReference": {
					"$ref": "commonTypes.json#/definitions/bookingReferenceType"
				},
				"clientReference": {
					"$ref": "bookingCommonTypes.json#/definitions/clientReferenceType"
				}
			},
			"additionalProperties": false
		}
	}
}