{
  "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": {}
                      },
                      "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": {}
                      },
                      "phone": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "mobile_app_id": {
                        "type": "array",
                        "items": {}
                      },
                      "person_id": {
                        "type": "array",
                        "items": {}
                      }
                    },
                    "additionalProperties": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "string"
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              },
              "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": "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": {}
    },
    "media": {
      "type": "object",
      "properties": {
        "camera_entity_id": {},
        "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": {},
        "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": {
      "allOf": [
        {
          "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"
              },
              "level": {
                "type": "string",
                "enum": [
                  "action",
                  "notification"
                ]
              }
            },
            "additionalProperties": true
          }
        },
        {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        }
      ],
      "default": []
    },
    "debug": {
      "type": "boolean",
      "default": false
    },
    "force_resend": {
      "type": "boolean",
      "default": false
    },
    "dry_run": {
      "type": "string",
      "enum": [
        "live",
        "simulate"
      ],
      "default": "live"
    },
    "data": {
      "type": "object",
      "additionalProperties": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "integer"
          },
          {
            "type": "boolean"
          },
          {
            "type": "number"
          },
          {
            "type": "object",
            "additionalProperties": true
          },
          {
            "type": "array",
            "items": {}
          },
          {
            "type": "object",
            "nullable": true,
            "description": "Must be null"
          }
        ]
      },
      "nullable": true
    },
    "timestamp": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "target": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "entity_id": {
              "type": "array",
              "items": {}
            },
            "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": {}
            },
            "phone": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "mobile_app_id": {
              "type": "array",
              "items": {}
            },
            "person_id": {
              "type": "array",
              "items": {}
            },
            "exclude": {
              "type": "object",
              "properties": {
                "entity_id": {
                  "type": "array",
                  "items": {}
                },
                "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"
                  }
                }
              },
              "additionalProperties": false
            }
          },
          "additionalProperties": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {}
        }
      ]
    },
    "extra_data": {
      "type": "object",
      "additionalProperties": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "integer"
          },
          {
            "type": "boolean"
          },
          {
            "type": "number"
          },
          {
            "type": "object",
            "additionalProperties": true
          },
          {
            "type": "array",
            "items": {}
          },
          {
            "type": "object",
            "nullable": true,
            "description": "Must be null"
          }
        ]
      },
      "nullable": true
    },
    "custom_target": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "delivery_control": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "properties": {
              "target": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "entity_id": {
                        "type": "array",
                        "items": {}
                      },
                      "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": {}
                      },
                      "phone": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "mobile_app_id": {
                        "type": "array",
                        "items": {}
                      },
                      "person_id": {
                        "type": "array",
                        "items": {}
                      }
                    },
                    "additionalProperties": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "string"
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              },
              "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": "object",
                      "nullable": true,
                      "description": "Must be null"
                    }
                  ]
                }
              }
            },
            "additionalProperties": false,
            "nullable": true
          }
        },
        {
          "type": "object",
          "nullable": true,
          "description": "Must be null"
        }
      ]
    },
    "camera_entity_id": {},
    "clip_url": {
      "type": "string"
    },
    "snapshot_url": {
      "type": "string"
    }
  },
  "additionalProperties": true,
  "title": "Notify Action",
  "$id": "https://supernotify.rhizomatics.org.uk/latest/developer/schemas/json/Notify_Action.schema.json",
  "description": "Voluptuous validation schema for Notify_Action",
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}