{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "eventType": {
      "type": "string"
    },
    "payloadVersion": {
      "type": "string"
    },
    "correlationId": {
      "type": "string"
    },
    "timestamp": {
      "type": "string"
    },
    "case": {
      "type": "object",
      "properties": {
        "uuid": {
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "number": {
          "type": "string",
          "description": "claim number, max size = 50"
        },
        "token": {
          "type": "string",
          "description": "unique identifier for a claim, format - c.20ea9579-6ae7-4022-a6e6-334c90390051"
        },
        "caseType": {
          "type": "string",
          "description": "e.g.: privateMedicalInsuranceClaim, motorClaim, buildingClaim, buildingRiskAssessment, contentClaim, contentItemization"
        },
        "sourceSystem": {
          "type": "string"
        }
      },
      "required": [
        "caseType"
      ]
    },
    "to": {
      "type": "object",
      "properties": {
        "fullName": {
          "type": "string"
        },
        "username": {
          "type": "string"
        },
        "userType": {
          "type": "string"
        },
        "email": {
          "type": "string"
        }
      }
    },
    "from": {
      "type": "object",
      "properties": {
        "fullName": {
          "type": "string"
        },
        "username": {
          "type": "string"
        },
        "userType": {
          "type": "string"
        },
        "email": {
          "type": "string"
        }
      }
    },
    "message": {
      "type": "object",
      "properties": {
        "subject": {
          "type": "string"
        },
        "messageContent": {
          "type": "string"
        }
      }
    }
  },
  "required": [
    "eventType",
    "timestamp",
    "case"
  ]
}