{
  "$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/video_hosting.json",
  "$id": "https://schemas.meta-aiml.org/v3.0.0/entity/video_hosting.json",
  "@type": "VideoHosting",
  "schemaVersion": "3.0.0",
  "aimlVersion": "3.0.0",
  "title": "Video Hosting Entity Schema",
  "description": "v3 schema for video hosting services that provide upload, processing, storage, and controlled playback delivery directly to customers.",
  "examples": [
    {
      "description": "Video hosting platform for SaaS products with embeddable players and API delivery",
      "reference": "video_hosting_example_saas_embedding"
    },
    {
      "description": "Enterprise training video repository with retention and access policy controls",
      "reference": "video_hosting_example_enterprise_training"
    }
  ],
  "type": "object",
  "additionalProperties": false,
  "allOf": [
    {
      "$ref": "../ontology/digital_entity.json"
    },
    {
      "$ref": "../archetypes/direct_service.json"
    }
  ],
  "properties": {
    "@type": {
      "const": "VideoHosting"
    },
    "ontologicalMode": {
      "const": "DigitalEntity"
    },
    "interactionArchetype": {
      "type": "array",
      "contains": {
        "const": "DirectService"
      },
      "items": {
        "type": "string",
        "enum": [
          "DirectService"
        ]
      }
    },
    "domain": {
      "const": "Media"
    },
    "businessModel": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "Subscription",
          "UsageBased",
          "Freemium"
        ]
      }
    },
    "deliveryFormat": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "WebApp",
          "API",
          "MobileApp"
        ]
      }
    },
    "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": {
        "supportsLivestreaming": {
          "type": "boolean"
        },
        "supportsEmbeddablePlayback": {
          "type": "boolean"
        },
        "transcodingProfileSet": {
          "type": "string",
          "enum": [
            "basic",
            "standard",
            "advanced"
          ]
        },
        "supportsAutomatedCaptioning": {
          "type": "boolean"
        },
        "retentionPolicyMode": {
          "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"
        },
        "community": {
          "$ref": "../components/capability_groups.json#/$defs/CommunityCapabilities"
        }
      }
    },
    "modules": {
      "type": "object",
      "properties": {
        "upload": {
          "type": "object",
          "properties": {
            "resumableUploadsEnabled": {
              "type": "boolean"
            },
            "bulkIngestionEnabled": {
              "type": "boolean"
            },
            "uploadVirusScanningEnabled": {
              "type": "boolean"
            }
          }
        },
        "processing": {
          "type": "object",
          "properties": {
            "transcodingQueuePrioritiesEnabled": {
              "type": "boolean"
            },
            "thumbnailSelectionEnabled": {
              "type": "boolean"
            },
            "qualityAnalysisEnabled": {
              "type": "boolean"
            }
          }
        },
        "delivery": {
          "type": "object",
          "properties": {
            "signedUrlsEnabled": {
              "type": "boolean"
            },
            "geoDeliveryRoutingEnabled": {
              "type": "boolean"
            },
            "playerCustomizationEnabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "structuralMetadata": {
      "type": "object",
      "properties": {
        "topology": {
          "const": "binary"
        },
        "roles": {
          "const": [
            "user",
            "platform"
          ]
        },
        "valueSource": {
          "const": "platform_provided"
        },
        "transactionFlow": {
          "const": "direct"
        },
        "networkEffects": {
          "const": "none"
        },
        "mediaPipelineMode": {
          "type": "string",
          "enum": [
            "upload_first",
            "livestream_first",
            "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",
    "capabilities",
    "structuralMetadata",
    "modules"
  ],
  "validationMetadata": {
    "schemaVersion": "3.0.0",
    "phase": "entity",
    "status": "draft",
    "lastValidated": "2026-02-20T12:00:00Z",
    "validator": "META-AIML QA"
  },
  "semanticAnnotations": {
    "classificationRationale": "VideoHosting is modeled as DigitalEntity + DirectService because the platform directly provides media ingestion, processing, and delivery capabilities.",
    "disambiguationNotes": "Different from streaming platforms where editorial content broadcasting is the primary value."
  },
  "governanceMetadata": {
    "entityVersion": "3.0.0",
    "introducedIn": "META-AIML v3.0.0",
    "stabilityLevel": "draft",
    "sdkValidationRules": [
      "RULE-VIDEO-001: @type MUST equal \"VideoHosting\"",
      "RULE-VIDEO-002: ontologicalMode MUST equal \"DigitalEntity\"",
      "RULE-VIDEO-003: interactionArchetype MUST contain \"DirectService\"",
      "RULE-VIDEO-004: capabilities.interaction MUST be present",
      "RULE-VIDEO-005: structuralMetadata.topology MUST equal \"binary\"",
      "RULE-VIDEO-006: supportsEmbeddablePlayback SHOULD be explicitly declared"
    ]
  }
}
