{
  "$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/file_hosting.json",
  "$id": "https://schemas.meta-aiml.org/v3.0.0/entity/file_hosting.json",
  "@type": "FileHosting",
  "schemaVersion": "3.0.0",
  "aimlVersion": "3.0.0",
  "title": "File Hosting Entity Schema",
  "description": "v3 schema for cloud file hosting platforms that provide storage, sharing, synchronization, and file lifecycle control directly to users and organizations.",
  "examples": [
    {
      "description": "Cloud storage platform with version history and secure link sharing",
      "reference": "file_hosting_example_cloud_storage"
    },
    {
      "description": "Enterprise file repository with retention rules and access governance",
      "reference": "file_hosting_example_enterprise_repository"
    }
  ],
  "type": "object",
  "additionalProperties": false,
  "allOf": [
    {
      "$ref": "../ontology/digital_entity.json"
    },
    {
      "$ref": "../archetypes/direct_service.json"
    }
  ],
  "properties": {
    "@type": {
      "const": "FileHosting"
    },
    "ontologicalMode": {
      "const": "DigitalEntity"
    },
    "interactionArchetype": {
      "type": "array",
      "contains": {
        "const": "DirectService"
      },
      "items": {
        "type": "string",
        "enum": [
          "DirectService"
        ]
      }
    },
    "domain": {
      "const": "Technology"
    },
    "businessModel": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "Subscription",
          "Freemium",
          "UsageBased"
        ]
      }
    },
    "deliveryFormat": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "WebApp",
          "MobileApp",
          "DesktopApp",
          "API"
        ]
      }
    },
    "name": {
      "$ref": "../components/multilingual_format.json#/$defs/LocalizedText"
    },
    "description": {
      "$ref": "../components/multilingual_format.json#/$defs/LocalizedText"
    },
    "shortDescription": {
      "type": "string"
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "foundingDate": {
      "type": "string",
      "format": "date"
    },
    "properties": {
      "type": "object",
      "properties": {
        "storageClasses": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "standard",
              "archive",
              "cold",
              "compliance"
            ]
          }
        },
        "supportsVersionHistory": {
          "type": "boolean"
        },
        "supportsExternalLinkSharing": {
          "type": "boolean"
        },
        "supportsClientSideEncryption": {
          "type": "boolean"
        },
        "defaultRetentionMode": {
          "type": "string",
          "enum": [
            "manual",
            "time_based",
            "policy_based"
          ]
        }
      }
    },
    "capabilities": {
      "type": "object",
      "required": [
        "interaction"
      ],
      "properties": {
        "interaction": {
          "$ref": "../components/capability_groups.json#/$defs/InteractionCapabilities"
        },
        "content": {
          "$ref": "../components/capability_groups.json#/$defs/ContentCapabilities"
        },
        "financial": {
          "$ref": "../components/capability_groups.json#/$defs/FinancialCapabilities"
        },
        "commerce": {
          "$ref": "../components/capability_groups.json#/$defs/CommerceCapabilities"
        }
      }
    },
    "modules": {
      "type": "object",
      "properties": {
        "storage": {
          "type": "object",
          "properties": {
            "quotaManagementEnabled": {
              "type": "boolean"
            },
            "tieringPoliciesEnabled": {
              "type": "boolean"
            },
            "lifecycleTransitionsEnabled": {
              "type": "boolean"
            }
          }
        },
        "sync": {
          "type": "object",
          "properties": {
            "deltaSyncEnabled": {
              "type": "boolean"
            },
            "selectiveSyncEnabled": {
              "type": "boolean"
            },
            "conflictResolutionPolicies": {
              "type": "boolean"
            }
          }
        },
        "accessControl": {
          "type": "object",
          "properties": {
            "roleBasedPermissionsEnabled": {
              "type": "boolean"
            },
            "temporaryLinksEnabled": {
              "type": "boolean"
            },
            "downloadRestrictionsEnabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "structuralMetadata": {
      "type": "object",
      "properties": {
        "topology": {
          "const": "binary"
        },
        "roles": {
          "const": [
            "user",
            "platform"
          ]
        },
        "valueSource": {
          "const": "platform_provided"
        },
        "transactionFlow": {
          "const": "direct"
        },
        "networkEffects": {
          "const": "none"
        },
        "dataDurabilityTiering": {
          "type": "string",
          "enum": [
            "single_tier",
            "multi_tier",
            "adaptive"
          ]
        }
      }
    },
    "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",
    "capabilities",
    "structuralMetadata",
    "modules"
  ],
  "validationMetadata": {
    "schemaVersion": "3.0.0",
    "phase": "entity",
    "status": "draft",
    "lastValidated": "2026-02-20T12:00:00Z",
    "validator": "META-AIML QA"
  },
  "semanticAnnotations": {
    "classificationRationale": "FileHosting is modeled as DigitalEntity + DirectService because storage and synchronization capabilities are provided directly by the platform.",
    "disambiguationNotes": "Different from decentralized protocol storage networks and from content marketplaces."
  },
  "governanceMetadata": {
    "entityVersion": "3.0.0",
    "introducedIn": "META-AIML v3.0.0",
    "stabilityLevel": "draft",
    "sdkValidationRules": [
      "RULE-FH-001: @type MUST equal \"FileHosting\"",
      "RULE-FH-002: ontologicalMode MUST equal \"DigitalEntity\"",
      "RULE-FH-003: interactionArchetype MUST contain \"DirectService\"",
      "RULE-FH-004: capabilities.interaction MUST be present",
      "RULE-FH-005: structuralMetadata.topology MUST equal \"binary\"",
      "RULE-FH-006: storageClasses SHOULD be explicitly declared"
    ]
  }
}
