{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "PropertyList",
    "description": "This is the document root element. It contains a sequence of Property elements.",
    "items": {
        "$ref": "#/definitions/Property"
    },
    "type": "array",
    "definitions": {
        "LargeThumbnailURL": {
            "type": "object",
            "required": [
                "height",
                "width",
                "url"
            ],
            "properties": {
                "url": {
                    "type": "string",
                    "format": "iri"
                },
                "height": {
                    "type": "integer"
                },
                "width": {
                    "type": "integer"
                }
            }
        },
        "ThumbnailURL": {
            "type": "object",
            "required": [
                "height",
                "width",
                "url"
            ],
            "properties": {
                "url": {
                    "type": "string",
                    "format": "iri"
                },
                "height": {
                    "type": "integer"
                },
                "width": {
                    "type": "integer"
                }
            }
        },
        "SmallAvatarURL": {
            "type": "object",
            "required": [
                "height",
                "width",
                "url"
            ],
            "properties": {
                "url": {
                    "type": "string",
                    "format": "iri"
                },
                "height": {
                    "type": "integer"
                },
                "width": {
                    "type": "integer"
                }
            }
        },
        "LargeAvatarURL": {
            "type": "object",
            "required": [
                "height",
                "width",
                "url"
            ],
            "properties": {
                "url": {
                    "type": "string",
                    "format": "iri"
                },
                "height": {
                    "type": "integer"
                },
                "width": {
                    "type": "integer"
                }
            }
        },
        "FullSizeURL": {
            "type": "object",
            "required": [
                "height",
                "width",
                "url"
            ],
            "properties": {
                "url": {
                    "type": "string",
                    "format": "iri"
                },
                "height": {
                    "type": "integer"
                },
                "width": {
                    "type": "integer"
                }
            }
        },
        "StandardSizeURL": {
            "type": "object",
            "required": [
                "height",
                "width",
                "url"
            ],
            "properties": {
                "url": {
                    "type": "string",
                    "format": "iri"
                },
                "height": {
                    "type": "integer"
                },
                "width": {
                    "type": "integer"
                }
            }
        },
        "OriginalSizeURL": {
            "type": "object",
            "required": [
                "height",
                "width",
                "url"
            ],
            "properties": {
                "url": {
                    "type": "string",
                    "format": "iri"
                },
                "height": {
                    "type": "integer"
                },
                "width": {
                    "type": "integer"
                }
            }
        },
        "Photo": {
            "type": "object",
            "properties": {
                "ThumbnailURL": {
                    "$ref": "#/definitions/ThumbnailURL"
                },
                "LargeThumbnailURL": {
                    "$ref": "#/definitions/LargeThumbnailURL"
                },
                "FullSizeURL": {
                    "$ref": "#/definitions/FullSizeURL"
                },
                "StandardSizeURL": {
                    "$ref": "#/definitions/StandardSizeURL"
                },
                "OriginalSizeURL": {
                    "$ref": "#/definitions/OriginalSizeURL"
                }
            }
        },
        "Author": {
            "type": "object",
            "description": "Information about the author of the review.",
            "properties": {
                "AuthorName": {
                    "type": "string",
                    "description": "The displayable name of the review author. May be either first name and last initial, or screen name."
                },
                "Location": {
                    "type": "string",
                    "description": "The location of the review author."
                },
                "SmallAvatarURL": {
                    "$ref": "#/definitions/SmallAvatarURL",
                    "description": "The 50x50 avatar url for the author."
                },
                "LargeAvatarURL": {
                    "$ref": "#/definitions/LargeAvatarURL",
                    "description": "The 205x205 avatar url for the author."
                }
            }
        },
        "ReviewSubRatingType": {
            "type": "object",
            "required": [
                "name"
            ],
            "properties": {
                "value": {
                    "type": "number"
                },
                "name": {
                    "type": "string",
                    "description": "Name of the subrating. Current subrating names are: Value, Rooms, Location, Cleanliness, Service, SleepQuality."
                }
            }
        },
        "ReviewSubRatings": {
            "type": "array",
            "items": {
                "$ref": "#/definitions/ReviewSubRatingType"
            },
            "minItems": 0
        },
        "ReviewDetail": {
            "type": "object",
            "description": "An individual detail field for the review. These include date of stay, purpose of trip, traveled with, and recommend.",
            "required": [
                "name"
            ],
            "properties": {
                "value": {
                    "type": "string"
                },
                "name": {
                    "type": "string",
                    "description": "Name of the detail field. Current detail fields are: DateOfVisit, PurposeOfTrip, TraveledWith, Recommend."
                }
            }
        },
        "ReviewDetails": {
            "description": "Detailed information fields for the review.",
            "type": "array",
            "items": {
                "$ref": "#/definitions/ReviewDetail"
            },
            "minItems": 0
        },
        "ManagementResponse": {
            "type": "object",
            "description": "Management response for the review.",
            "required": [
                "id"
            ],
            "properties": {
                "ModerationStatus": {
                    "type": "string",
                    "enum": [
                        "New",
                        "Published",
                        "Removed"
                    ]
                },
                "DatePublished": {
                    "type": "string"
                },
                "Language": {
                    "type": "string"
                },
                "Text": {
                    "type": "string"
                },
                "Author": {
                    "$ref": "#/definitions/Author"
                },
                "id": {
                    "type": "integer"
                }
            }
        },
        "Review": {
            "type": "object",
            "description": "A review submitted for this property via the review collection platform. 'id' is the ID of the review on TA.",
            "required": [
                "id"
            ],
            "properties": {
                "ModerationStatus": {
                    "type": "string",
                    "description": "Current moderation status of the review.",
                    "enum": [
                        "New",
                        "Published",
                        "Removed"
                    ]
                },
                "DatePublished": {
                    "type": "string",
                    "description": "The date and time the review was published on the site. Format 'yyyy-MM-dd'T'HH:mm:ss.SSSZ' (i.e., 2001-07-04T12:08:56.235-0700)."
                },
                "ReviewURL": {
                    "type": "string",
                    "description": "The URL for the review on TripAdvisor"
                },
                "MoreReviewsURL": {
                    "type": "string",
                    "description": "The URL for more reviews on TripAdvisor"
                },
                "Rating": {
                    "type": "integer",
                    "description": "The overall rating of the review."
                },
                "RatingImageURL": {
                    "type": "string",
                    "format": "iri"
                },
                "Language": {
                    "type": "string",
                    "description": "The language of the review."
                },
                "MachineTranslated": {
                    "type": "boolean"
                },
                "Title": {
                    "type": "string",
                    "description": "The title of the review."
                },
                "Text": {
                    "type": "string",
                    "description": "The review text."
                },
                "Author": {
                    "$ref": "#/definitions/Author",
                    "description": "Information about the author of the review."
                },
                "TripType": {
                    "type": "string",
                    "description": "The type of trip"
                },
                "ReviewSubRatings": {
                    "$ref": "#/definitions/ReviewSubRatings",
                    "description": "Review subratings."
                },
                "ReviewDetails": {
                    "$ref": "#/definitions/ReviewDetails"
                },
                "ManagementResponse": {
                    "$ref": "#/definitions/ManagementResponse"
                },
                "Photo": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/Photo"
                    },
                    "minItems": 0
                },
                "id": {
                    "type": "integer"
                }
            }
        },
        "SubRatings": {
            "type": "array",
            "items": {
                "$ref": "#/definitions/ReviewSubRatingType"
            },
            "minItems": 1
        },
        "Reviews": {
            "type": "array",
            "description": "List of recently added or modified reviews for this property submitted via the review collection platform.",
            "items": {
                "$ref": "#/definitions/Review"
            },
            "minItems": 0
        },
        "Property": {
            "type": "object",
            "description": "A Property represents a property on TripAdvisor. 'id' is the TA ID. * 'type' is currently always 'hotel'. 'rating' is the overall property rating on TA.",
            "required": [
                "id"
            ],
            "properties": {
                "Name": {
                    "type": "string",
                    "description": "Name of the property as listed on TA."
                },
                "RatingImageURL": {
                    "type": "string",
                    "format": "iri"
                },
                "AverageRating": {
                    "type": "number",
                    "description": "The average rating for the property on TA"
                },
                "ReviewCount": {
                    "type": "integer",
                    "description": "The review count for the property on TA"
                },
                "SubRatings": {
                    "$ref": "#/definitions/SubRatings",
                    "description": "Aggregated subratings."
                },
                "Reviews": {
                    "$ref": "#/definitions/Reviews"
                },
                "id": {
                    "type": "integer"
                },
                "cityId": {
                    "type": "integer"
                },
                "countryId": {
                    "type": "integer"
                }
            }
        }
    }
}