{
  "$defs": {
    "AuthorisationRegime": {
      "description": "Authorisation regime.",
      "oneOf": [
        {
          "const": "specific",
          "description": "Specific per sub-processor.",
          "type": "string"
        },
        {
          "const": "general_with_objection",
          "description": "General with right of objection.",
          "type": "string"
        }
      ]
    },
    "Confidentiality": {
      "description": "Cross-cutting confidentiality classification used across privacy,\nsecurity, knowledge, IR pillars. Default rendering rule: `corpospec-report`\nexcludes `Restricted | BoardOnly | InvestorOnly` records from public output\nunless an explicit audience parameter overrides. See BDR 0076 §1.",
      "oneOf": [
        {
          "const": "public",
          "description": "Safe to publish anywhere.",
          "type": "string"
        },
        {
          "const": "customer",
          "description": "Visible to customers under standard ToS.",
          "type": "string"
        },
        {
          "const": "internal",
          "description": "Employees and contractors only.",
          "type": "string"
        },
        {
          "const": "restricted",
          "description": "Need-to-know subset of internal.",
          "type": "string"
        },
        {
          "const": "board_only",
          "description": "Board members and direct staff.",
          "type": "string"
        },
        {
          "const": "investor_only",
          "description": "Existing investors + prospective with NDA.",
          "type": "string"
        }
      ]
    },
    "IsoCountry": {
      "description": "ISO 3166-1 alpha-2 country code.",
      "pattern": "^[A-Z]{2}$",
      "type": "string"
    },
    "IsoDate": {
      "description": "ISO 8601 date (YYYY-MM-DD).",
      "format": "date",
      "type": "string"
    },
    "PathRef": {
      "description": "Path-based cross-reference relative to .corpospec/ root.\nPattern: `^[a-z0-9_-]+(/[a-z0-9_.-]+)+$`",
      "pattern": "^[a-z0-9_-]+(/[a-z0-9_.-]+)+$",
      "type": "string"
    },
    "SubprocessorStatus": {
      "description": "Sub-processor onboarding lifecycle.",
      "oneOf": [
        {
          "enum": [
            "active",
            "suspended"
          ],
          "type": "string"
        },
        {
          "const": "pending",
          "description": "Awaiting authorisation / objection-period running.",
          "type": "string"
        },
        {
          "const": "objected",
          "description": "Controller objected — engagement halted.",
          "type": "string"
        },
        {
          "const": "decommissioned",
          "description": "Engagement ended.",
          "type": "string"
        }
      ]
    },
    "SubprocessorTransferMechanism": {
      "description": "Transfer mechanism (when sub-processor is in a third country).",
      "enum": [
        "adequacy",
        "scc",
        "bcr",
        "dp_framework",
        "derogation",
        "none_applicable"
      ],
      "type": "string"
    }
  },
  "$id": "https://corpospec.com/schemas/v0.16.0/subprocessor.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Sub-processor entry (one record per (parent processor, sub-\nprocessor) pair).",
  "properties": {
    "authorisation_regime": {
      "$ref": "#/$defs/AuthorisationRegime"
    },
    "authorised_on": {
      "$ref": "#/$defs/IsoDate",
      "description": "Authorisation date."
    },
    "confidentiality": {
      "$ref": "#/$defs/Confidentiality"
    },
    "controller_objected": {
      "description": "Whether the controller has objected.",
      "type": "boolean"
    },
    "data_categories": {
      "description": "Categories of personal data sub-processed.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "decommissioned_on": {
      "anyOf": [
        {
          "$ref": "#/$defs/IsoDate"
        },
        {
          "type": "null"
        }
      ],
      "description": "When the entry was decommissioned (if applicable)."
    },
    "flow_down_dpa_ref": {
      "anyOf": [
        {
          "$ref": "#/$defs/PathRef"
        },
        {
          "type": "null"
        }
      ],
      "description": "PathRef to flow-down DPA (Art. 28(4))."
    },
    "id": {
      "$ref": "#/$defs/PathRef"
    },
    "jurisdiction": {
      "$ref": "#/$defs/IsoCountry"
    },
    "name": {
      "description": "Sub-processor display name.",
      "type": "string"
    },
    "objected_on": {
      "anyOf": [
        {
          "$ref": "#/$defs/IsoDate"
        },
        {
          "type": "null"
        }
      ]
    },
    "objection_period_end": {
      "anyOf": [
        {
          "$ref": "#/$defs/IsoDate"
        },
        {
          "type": "null"
        }
      ],
      "description": "Objection-period end date (typically authorised_on + 30 days\nunder general regime)."
    },
    "parent_dpa": {
      "$ref": "#/$defs/PathRef",
      "description": "PathRef to the parent DPA / processor we engage."
    },
    "parent_processor": {
      "$ref": "#/$defs/PathRef",
      "description": "PathRef to the parent processor vendor record."
    },
    "public_listing_ref": {
      "anyOf": [
        {
          "$ref": "#/$defs/PathRef"
        },
        {
          "type": "null"
        }
      ],
      "description": "PathRef to a public catalogue page (for B2B transparency)."
    },
    "purpose": {
      "description": "Purpose for engagement.",
      "type": "string"
    },
    "status": {
      "$ref": "#/$defs/SubprocessorStatus"
    },
    "subject_categories": {
      "description": "Categories of data subjects affected.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "transfer_mechanism": {
      "$ref": "#/$defs/SubprocessorTransferMechanism",
      "description": "Transfer mechanism (if applicable)."
    }
  },
  "required": [
    "id",
    "parent_dpa",
    "parent_processor",
    "name",
    "jurisdiction",
    "purpose",
    "data_categories",
    "subject_categories",
    "authorisation_regime",
    "authorised_on",
    "controller_objected",
    "transfer_mechanism",
    "status",
    "confidentiality"
  ],
  "title": "SubprocessorEntry",
  "type": "object",
  "x-corpospec-pillar": "privacy"
}