{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512,
      "pattern": "^[^\\s]+$"
    },
    "projectId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512,
      "pattern": "^[^\\s]+$"
    },
    "actor": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "user",
            "agent"
          ]
        },
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        }
      },
      "required": [
        "type",
        "id"
      ]
    },
    "role": {
      "type": "string",
      "enum": [
        "manager",
        "contributor",
        "reviewer"
      ]
    },
    "grantId": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        {
          "type": "null"
        }
      ]
    },
    "version": {
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "id",
    "projectId",
    "actor",
    "role",
    "grantId",
    "version"
  ]
}