{
  "type": "object",
  "properties": {
    "pmcId": {
      "type": "string"
    },
    "unitId": {
      "type": "string"
    },
    "unitTypeId": {
      "type": ["null","string"]
    },
    "name": {
      "type": "string",
      "minLength":1
    },
    "isAvailableForBooking": {
      "type": "boolean",
      "default": false
    },
    "buildingCategory" : {
      "type": ["null", "string"],
      "enum": ["", "hotel", "bedAndBreakfast", "condo", "apartment", "home"],
      "default": ""
    },
    "buildingType": {
      "type": ["null", "string"],
      "enum": ["", "hotel", "allInclusive", "inn", "lodge", "bedAndBreakfast", "cottage", "condo", "townhome", "apartment", "vacationHome", "cabinLodgeCottage", "chalet", "villa"],
      "default": ""
    },
    "geoLocation": {
      "type": ["null", "object"],
      "properties": {
        "latitude": {
          "type": "number"
        },
        "longitude": {
          "type": "number"
        }
      }
    },
    "bedroomCount": {
      "type": "integer",
      "default": 1,
      "minimum": 1
    },
    "bathroomCount": {
      "type": "integer",
      "default": 0
    },
    "fullBathrooms": {
      "type": "integer",
      "default": 0
    },
    "threeQuarterBathrooms": {
      "type": "integer",
      "default": 0
    },
    "halfBathrooms": {
      "type": "integer",
      "default": 0
    },
    "occupancy": {
      "type": "integer",
      "default": 0
    },
    "description": {
      "type": ["null","string"]
    },
    "descriptionText": {
      "type": ["null", "string"]
    },
    "amenities": {
      "type": "array",
      "default": []
    },
    "location": {
      "type": "object",
      "properties": {
        "country": {
          "type": "string",
          "minLength":1
        },
        "subdivision": {
          "type": "string",
          "minLength":1
        },
        "city": {
          "type": "string",
          "minLength":1
        },
        "address": {
          "type": "string",
          "minLength":1
        },
        "address2": {
          "type": "string"
        },
        "postal": {
          "type": "string",
          "minLength":1
        }
      },
      "required": ["country", "city", "address"],
      "additionalProperties": false
    },
    "currencyCode": {
      "type": ["null", "string"]
    },
    "ratePlans": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "minItems": 1,
      "uniqueItems": true
    },
    "disclaimer": {
      "type": "string",
      "minlength": 1
    },
    "taxIdNumber": {
      "type": "string",
      "minlength": 1
    },
    "permitNumber": {
      "type": "string",
      "minlength": 1
    },
    "unitNumber": {
      "type": "string"
    },
    "checkInTime": {
      "type": "string"
    },
    "checkOutTime": {
      "type": "string"
    },
    "checkInInformationRanges": {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "addendum": {
            "type": "string"
          },
          "endDate": {
            "type": "string"
          },
          "instructions": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "startDate": {
            "type": "string"
          }
        }
      }
    }
  },
  "required": ["pmcId", "name"],
  "additionalProperties": false
}
