{
  "$schema": "http://json-schema.org/draft-04/schema",
  "id": "campaign-delivery.json",
  "type": "object",
  "properties": {
    "campaignId": {
      "readonly": true,
      "type": "integer"
    },
    "campaignName": {
      "readonly": true,
      "type": "string",
      "minLength": 3,
      "maxLength": 100
    },
    "campaignSubject": {
      "readonly": true,
      "type": "string",
      "minLength": 3,
      "maxLength": 100
    },
    "subscriberEmail": {
      "readonly": true,
      "type": "string",
      "minLength": 3,
      "maxLength": 100,
      "format": "email"
    },
    "deliveryStatus": {
      "readonly": true,
      "type": [ "string", "null" ],
      "enum": [
        "opened",
        "notOpened",
        "hardBounced",
        "softBounced"
      ]
    },
    "lastOpenDate": {
      "readonly": true,
      "type": "string",
      "format": "date-time"
    },
    "opensCount": {
      "readonly": true,
      "type": "integer"
    },
    "clicksCount": {
      "readonly": true,
      "type": "integer"
    },
    "_links": {
      "readonly": true,
      "$ref": "link-collection.json"
    }
  }
}