{
  "type": "object",
  "properties": {
    "delivery": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "properties": {
              "target": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "entity_id": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "device_id": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "area_id": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "floor_id": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "label_id": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "email": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "phone": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "mobile_app_id": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "person_id": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "additionalProperties": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "string"
                  },
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                ]
              },
              "enabled": {
                "type": "boolean",
                "nullable": true
              },
              "data": {
                "type": "object",
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "integer"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "object",
                      "additionalProperties": true
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "object",
                      "nullable": true,
                      "description": "Must be null"
                    }
                  ]
                }
              }
            },
            "additionalProperties": false,
            "nullable": true
          }
        }
      ]
    },
    "priority": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        },
        {
          "type": "string",
          "enum": [
            "minimum",
            "low",
            "medium",
            "high",
            "critical"
          ]
        }
      ]
    },
    "require_scenarios": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "apply_scenarios": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "constrain_scenarios": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "delivery_selection": {
      "type": "string",
      "enum": [
        "explicit",
        "fixed",
        "implicit"
      ]
    },
    "recipients": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "media": {
      "type": "object",
      "properties": {
        "camera_entity_id": {
          "type": "string"
        },
        "camera_delay": {
          "type": "integer"
        },
        "camera_ptz_preset": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0
            },
            {
              "type": "string"
            }
          ]
        },
        "clip_url": {
          "type": "string"
        },
        "snapshot_url": {
          "type": "string"
        },
        "snapshot_image_path": {
          "type": "string"
        },
        "jpeg_opts": {
          "type": "object",
          "additionalProperties": true
        },
        "png_opts": {
          "type": "object",
          "additionalProperties": true
        }
      },
      "additionalProperties": false
    },
    "message_html": {
      "type": "string"
    },
    "spoken_message": {
      "type": "string"
    },
    "action_groups": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "default": []
    },
    "actions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "action_category": {
            "type": "string"
          },
          "action_url": {
            "type": "string"
          },
          "action_url_title": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "default": []
    },
    "debug": {
      "type": "boolean",
      "default": false
    },
    "force_resend": {
      "type": "boolean",
      "default": false
    },
    "data": {
      "type": "object",
      "additionalProperties": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "integer"
          },
          {
            "type": "boolean"
          },
          {
            "type": "number"
          },
          {
            "type": "object",
            "additionalProperties": true
          },
          {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          {
            "type": "object",
            "nullable": true,
            "description": "Must be null"
          }
        ]
      },
      "nullable": true
    },
    "timestamp": {
      "type": "string"
    }
  },
  "title": "Notify Action Data",
  "$id": "https://supernotify.rhizomatics.org.uk/developer/schemas/json/Notify_Action_Data.schema.json",
  "description": "Voluptuous validation schema for Notify_Action_Data",
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}