{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "@context": [
    "https://schemas.meta-aiml.org/v3.0.0/context.jsonld"
  ],
  "@id": "https://schemas.meta-aiml.org/v3.0.0/entity/hotel.json",
  "$id": "https://schemas.meta-aiml.org/v3.0.0/entity/hotel.json",
  "@type": "Hotel",
  "schemaVersion": "3.0.0",
  "aimlVersion": "3.0.0",
  "title": "Hotel Entity Schema",
  "description": "v3 schema for accommodation providers delivering lodging services directly to guests at physical properties with reservation, stay, and guest service operations.",
  "examples": [
    {
      "description": "Business hotel with digital check-in and conference room booking",
      "reference": "hotel_example_business"
    },
    {
      "description": "Resort hotel with package plans and family-oriented amenities",
      "reference": "hotel_example_resort"
    }
  ],
  "type": "object",
  "additionalProperties": false,
  "allOf": [
    {
      "$ref": "../ontology/physical_entity.json"
    },
    {
      "$ref": "../archetypes/direct_service.json"
    }
  ],
  "properties": {
    "@type": {
      "const": "Hotel"
    },
    "ontologicalMode": {
      "const": "PhysicalEntity"
    },
    "interactionArchetype": {
      "type": "array",
      "contains": {
        "const": "DirectService"
      },
      "items": {
        "type": "string",
        "enum": [
          "DirectService"
        ]
      }
    },
    "domain": {
      "const": "Hospitality"
    },
    "businessModel": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "Transactional",
          "PackagePricing",
          "Subscription"
        ]
      }
    },
    "deliveryFormat": {
      "type": "array",
      "contains": {
        "const": "PhysicalLocation"
      },
      "items": {
        "type": "string",
        "enum": [
          "PhysicalLocation",
          "WebApp",
          "MobileApp"
        ]
      }
    },
    "name": {
      "$ref": "../components/multilingual_format.json#/$defs/LocalizedText"
    },
    "description": {
      "$ref": "../components/multilingual_format.json#/$defs/LocalizedText"
    },
    "shortDescription": {
      "$ref": "../components/multilingual_format.json#/$defs/LocalizedTextOrString"
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "foundingDate": {
      "type": "string",
      "format": "date"
    },
    "properties": {
      "type": "object",
      "properties": {
        "propertyType": {
          "type": "string",
          "enum": [
            "hotel",
            "resort",
            "boutique",
            "aparthotel",
            "hostel"
          ]
        },
        "starCategory": {
          "type": "integer",
          "minimum": 1,
          "maximum": 5
        },
        "roomCount": {
          "type": "integer",
          "minimum": 1
        },
        "checkInTime": {
          "type": "string",
          "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
        },
        "checkOutTime": {
          "type": "string",
          "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
        },
        "supportsLongStay": {
          "type": "boolean"
        },
        "contactPoints": {
          "type": "array",
          "items": {
            "$ref": "../components/common_defs.json#/$defs/ContactPoint"
          }
        },
        "socialProfiles": {
          "type": "array",
          "items": {
            "$ref": "../components/common_defs.json#/$defs/SocialProfile"
          }
        },
        "identifiers": {
          "type": "array",
          "items": {
            "$ref": "../components/common_defs.json#/$defs/Identifier"
          }
        }
      }
    },
    "capabilities": {
      "type": "object",
      "required": [
        "interaction",
        "booking"
      ],
      "properties": {
        "interaction": {
          "$ref": "../components/capability_groups.json#/$defs/InteractionCapabilities"
        },
        "booking": {
          "$ref": "../components/capability_groups.json#/$defs/BookingCapabilities"
        },
        "financial": {
          "$ref": "../components/capability_groups.json#/$defs/FinancialCapabilities"
        },
        "location": {
          "$ref": "../components/capability_groups.json#/$defs/LocationCapabilities"
        },
        "amenities": {
          "$ref": "../components/capability_groups.json#/$defs/AmenitiesCapabilities"
        }
      }
    },
    "modules": {
      "type": "object",
      "required": [
        "location"
      ],
      "properties": {
        "location": {
          "type": "object",
          "properties": {
            "address": {
              "$ref": "../components/address_format.json#/$defs/PostalAddress"
            },
            "geoCoordinates": {
              "$ref": "../components/address_format.json#/$defs/GeoCoordinates"
            }
          }
        },
        "inventory": {
          "type": "object",
          "properties": {
            "roomTypeCatalog": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "dynamicPricingEnabled": {
              "type": "boolean"
            },
            "overbookingProtectionEnabled": {
              "type": "boolean"
            }
          }
        },
        "guestServices": {
          "type": "object",
          "properties": {
            "digitalKeyEnabled": {
              "type": "boolean"
            },
            "conciergeChatEnabled": {
              "type": "boolean"
            },
            "roomServiceOrderingEnabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "structuralMetadata": {
      "type": "object",
      "properties": {
        "topology": {
          "const": "binary"
        },
        "roles": {
          "const": [
            "user",
            "platform"
          ]
        },
        "valueSource": {
          "const": "platform_provided"
        },
        "transactionFlow": {
          "const": "direct"
        },
        "networkEffects": {
          "const": "none"
        },
        "serviceOrientation": {
          "type": "string",
          "enum": [
            "short_stay",
            "extended_stay",
            "hybrid"
          ]
        }
      }
    },
    "targetAudience": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "siteCapabilities": {
      "type": "object",
      "properties": {
        "supportedDevices": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "desktop",
              "mobile",
              "tablet"
            ]
          }
        },
        "languages": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "accessibilityFeatures": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    }
  },
  "required": [
    "@type",
    "ontologicalMode",
    "interactionArchetype",
    "domain",
    "name",
    "description",
    "deliveryFormat",
    "modules",
    "capabilities",
    "structuralMetadata"
  ],
  "validationMetadata": {
    "schemaVersion": "3.0.0",
    "phase": "entity",
    "status": "draft",
    "lastValidated": "2026-02-20T12:00:00Z",
    "validator": "META-AIML QA"
  },
  "semanticAnnotations": {
    "classificationRationale": "Hotel is modeled as PhysicalEntity + DirectService because accommodation is physically delivered at property location by the service provider.",
    "disambiguationNotes": "Different from listing aggregators and travel marketplaces that primarily mediate third-party inventory."
  },
  "governanceMetadata": {
    "entityVersion": "3.0.0",
    "introducedIn": "META-AIML v3.0.0",
    "stabilityLevel": "draft",
    "sdkValidationRules": [
      "RULE-HOTL-001: @type MUST equal \"Hotel\"",
      "RULE-HOTL-002: ontologicalMode MUST equal \"PhysicalEntity\"",
      "RULE-HOTL-003: interactionArchetype MUST contain \"DirectService\"",
      "RULE-HOTL-004: deliveryFormat MUST contain \"PhysicalLocation\"",
      "RULE-HOTL-005: modules.location MUST be present",
      "RULE-HOTL-006: capabilities.interaction MUST be present"
    ]
  }
}
