{
  "type": "object",
  "properties": {
    "archiveId": {
      "type": "string"
    },
    "evidenceVersion": {
      "type": "integer",
      "minimum": 1
    },
    "mode": {
      "type": "string",
      "enum": [
        "TIMESTAMP",
        "HASH_TREE"
      ]
    },
    "dataReference": {
      "type": "string",
      "format": "uri"
    },
    "approvalId": {
      "type": "string"
    },
    "reason": {
      "type": "string"
    }
  },
  "required": [
    "archiveId",
    "evidenceVersion",
    "mode",
    "reason"
  ],
  "additionalProperties": false,
  "allOf": [
    {
      "if": {
        "properties": {
          "mode": {
            "const": "HASH_TREE"
          }
        },
        "required": [
          "mode"
        ]
      },
      "then": {
        "required": [
          "dataReference",
          "approvalId"
        ]
      }
    }
  ],
  "examples": [
    {
      "archiveId": "arc-test-001",
      "evidenceVersion": 1,
      "mode": "HASH_TREE",
      "dataReference": "https://storage.example.invalid/test/object-001",
      "approvalId": "approval-test-001",
      "reason": "Scheduled synthetic test"
    }
  ]
}
