{
  "type": "object",
  "properties": {
    "person": {
      "type": "string"
    },
    "user_id": {
      "type": "string"
    },
    "alias": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "enabled": {
      "type": "boolean",
      "default": true
    },
    "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"
          }
        }
      ]
    },
    "phone_number": {
      "type": "string"
    },
    "mobile_discovery": {
      "type": "boolean",
      "default": true
    },
    "mobile_devices": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "manufacturer": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "class": {
            "type": "string"
          },
          "mobile_app_id": {
            "type": "string"
          },
          "device_tracker": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": true
          }
        },
        "additionalProperties": false
      },
      "default": []
    },
    "delivery": {
      "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
      },
      "default": {}
    }
  },
  "additionalProperties": false,
  "title": "Recipient Definition",
  "$id": "https://supernotify.rhizomatics.org.uk/developer/schemas/json/Recipient_Definition.schema.json",
  "description": "Voluptuous validation schema for Recipient_Definition",
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}