{
  "openapi": "3.1.0",
  "info": {
    "title": "UniFi Protect API",
    "version": "0.0.0"
  },
  "servers": [
    {
      "url": "https://api.ui.com/v1/connector/consoles/{consoleId}/proxy/protect/integration",
      "description": "UniFi API Cloud Connector",
      "variables": {
        "consoleId": {
          "default": "942A6FF664C0000000000964970E0000000009E710560000000068A9873F:9999999999",
          "description": "ID of the console to proxy requests to"
        }
      }
    },
    {
      "url": "https://{consoleIP}/proxy/protect/integration",
      "description": "Local Console",
      "variables": {
        "consoleIP": {
          "default": "192.168.0.1",
          "description": "IP address of the console on the local network"
        }
      }
    }
  ],
  "paths": {
    "/v1/meta/info": {
      "get": {
        "summary": "Get application information",
        "description": "Get generic information about the Protect application",
        "tags": [
          "Information about application"
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "applicationVersion"
                  ],
                  "properties": {
                    "applicationVersion": {
                      "$ref": "#/components/schemas/protectVersion"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/viewers/{id}": {
      "get": {
        "summary": "Get viewer details",
        "description": "Get detailed information about a specific viewer",
        "tags": [
          "Viewer information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of viewer",
            "schema": {
              "$ref": "#/components/schemas/viewerId"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/viewer"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Patch viewer settings",
        "description": "Patch the settings for a specific viewer",
        "tags": [
          "Viewer information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of viewer",
            "schema": {
              "$ref": "#/components/schemas/viewerId"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "$ref": "#/components/schemas/name"
                  },
                  "liveview": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/liveviewId"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/viewer"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/viewers": {
      "get": {
        "summary": "Get all viewers",
        "description": "Get detailed information about all viewers",
        "tags": [
          "Viewer information & management"
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/viewer"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/liveviews/{id}": {
      "get": {
        "summary": "Get live view details",
        "description": "Get detailed information about a specific live view",
        "tags": [
          "Live view management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of liveview",
            "schema": {
              "$ref": "#/components/schemas/liveviewId"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/liveview"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Patch live view configuration",
        "description": "Patch the configuration about a specific live view",
        "tags": [
          "Live view management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of liveview",
            "schema": {
              "$ref": "#/components/schemas/liveviewId"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/liveview"
                  }
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/liveview"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/liveviews": {
      "get": {
        "summary": "Get all live views",
        "description": "Get detailed information about all live views",
        "tags": [
          "Live view management"
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/liveview"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create live view",
        "description": "Create a new live view",
        "tags": [
          "Live view management"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/liveview"
                  }
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/liveview"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/subscribe/devices": {
      "get": {
        "summary": "Get update messages about devices",
        "description": "A WebSocket subscription which broadcasts all changes happening to Protect-managed hardware devices",
        "tags": [
          "WebSocket updates"
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/deviceEvent"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/subscribe/events": {
      "get": {
        "summary": "Get Protect event messages",
        "description": "A WebSocket subscription that broadcasts Protect events",
        "tags": [
          "WebSocket updates"
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/eventAdd"
                    },
                    {
                      "$ref": "#/components/schemas/eventUpdate"
                    }
                  ],
                  "discriminator": {
                    "propertyName": "type",
                    "mapping": {
                      "add": "#/components/schemas/eventAdd",
                      "update": "#/components/schemas/eventUpdate"
                    }
                  },
                  "description": "An event that was created or updated"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cameras/{id}/ptz/patrol/start/{slot}": {
      "post": {
        "summary": "Start a camera PTZ patrol",
        "description": "Start a camera PTZ patrol",
        "tags": [
          "Camera PTZ control & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of camera",
            "schema": {
              "$ref": "#/components/schemas/cameraId"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "slot",
            "description": "The slot number (0-4) of the patrol that is currently running, or null if no patrol is running",
            "schema": {
              "$ref": "#/components/schemas/activePatrolSlotString"
            },
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "The camera PTZ patrol was started successfully."
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cameras/{id}/ptz/patrol/stop": {
      "post": {
        "summary": "Stop active camera PTZ patrol",
        "description": "Stop active camera PTZ patrol",
        "tags": [
          "Camera PTZ control & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of camera",
            "schema": {
              "$ref": "#/components/schemas/cameraId"
            },
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "The camera PTZ patrol was stopped successfully."
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cameras/{id}/ptz/goto/{slot}": {
      "post": {
        "summary": "Move PTZ camera to preset",
        "description": "Adjust the PTZ camera position to a specified preset",
        "tags": [
          "Camera PTZ control & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of camera",
            "schema": {
              "$ref": "#/components/schemas/cameraId"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "slot",
            "description": "Which slot this preset belongs to (-1 home preset, >=0 other presets).",
            "schema": {
              "type": "string",
              "description": "Which slot this preset belongs to (-1 home preset, >=0 other presets).",
              "examples": [
                "-1",
                "0",
                "2",
                "8",
                "9"
              ]
            },
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "The PTZ camera was moved to the given preset successfully."
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/alarm-manager/webhook/{id}": {
      "post": {
        "summary": "Send a webhook to the alarm manager",
        "description": "Send a webhook to the alarm manager to trigger configured alarms",
        "tags": [
          "Alarm manager integration"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "User defined string used to trigger only specific alarms. Alarm should be configured with the same ID to be triggered.",
            "schema": {
              "$ref": "#/components/schemas/alarmTriggerId"
            },
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "Webhook was sent to alarm manager successfully"
          },
          "400": {
            "description": "Bad request response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/idRequiredError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arm-profiles": {
      "get": {
        "summary": "Get all arm profiles",
        "description": "Get a list of all arm profiles. Only available when using local alarm manager.",
        "tags": [
          "Arm profile management"
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/armProfile"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create arm profile",
        "description": "Create a new arm profile. Only available when using local alarm manager.",
        "tags": [
          "Arm profile management"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "$ref": "#/components/schemas/armProfileName"
                  },
                  "automations": {
                    "$ref": "#/components/schemas/automations"
                  },
                  "schedules": {
                    "$ref": "#/components/schemas/schedules"
                  },
                  "recordEverything": {
                    "$ref": "#/components/schemas/recordEverything"
                  },
                  "activationDelay": {
                    "$ref": "#/components/schemas/activationDelay"
                  }
                },
                "required": [
                  "name",
                  "automations",
                  "schedules",
                  "recordEverything",
                  "activationDelay"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/armProfile"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arm-profiles/settings": {
      "patch": {
        "summary": "Set current arm profile",
        "description": "Set the current arm profile to be used when enabling the arm alarm. Only available when using local alarm manager.",
        "tags": [
          "Arm profile management"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "armProfileId": {
                    "$ref": "#/components/schemas/armProfileId"
                  }
                },
                "required": [
                  "armProfileId"
                ]
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Arm profile settings updated successfully"
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arm-profiles/{id}": {
      "patch": {
        "summary": "Update arm profile",
        "description": "Update an existing arm profile. Only available when using local alarm manager.",
        "tags": [
          "Arm profile management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of armProfile",
            "schema": {
              "$ref": "#/components/schemas/armProfileId"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "$ref": "#/components/schemas/armProfileName"
                  },
                  "automations": {
                    "$ref": "#/components/schemas/automations"
                  },
                  "schedules": {
                    "$ref": "#/components/schemas/schedules"
                  },
                  "recordEverything": {
                    "$ref": "#/components/schemas/recordEverything"
                  },
                  "activationDelay": {
                    "$ref": "#/components/schemas/activationDelay"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/armProfile"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete arm profile",
        "description": "Delete an arm profile by ID. Only available when using local alarm manager.",
        "tags": [
          "Arm profile management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of armProfile",
            "schema": {
              "$ref": "#/components/schemas/armProfileId"
            },
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "Arm profile deleted successfully"
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arm-profiles/enable": {
      "post": {
        "summary": "Enable arm alarm",
        "description": "Enable the arm alarm feature using the currently selected arm profile. Only available when using local alarm manager.",
        "tags": [
          "Arm profile management"
        ],
        "responses": {
          "204": {
            "description": "Arm alarm enabled successfully"
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arm-profiles/disable": {
      "post": {
        "summary": "Disable arm alarm",
        "description": "Disable the arm alarm feature. Only available when using local alarm manager.",
        "tags": [
          "Arm profile management"
        ],
        "responses": {
          "204": {
            "description": "Arm alarm disabled successfully"
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/lights/{id}": {
      "get": {
        "summary": "Get light details",
        "description": "Get detailed information about a specific light",
        "tags": [
          "Light information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of light",
            "schema": {
              "$ref": "#/components/schemas/lightId"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/light"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Patch light settings",
        "description": "Patch the settings for a specific light",
        "tags": [
          "Light information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of light",
            "schema": {
              "$ref": "#/components/schemas/lightId"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "$ref": "#/components/schemas/name"
                  },
                  "isLightForceEnabled": {
                    "$ref": "#/components/schemas/isLightForceEnabled"
                  },
                  "lightModeSettings": {
                    "$ref": "#/components/schemas/lightModeSettings"
                  },
                  "lightDeviceSettings": {
                    "$ref": "#/components/schemas/lightDeviceSettings"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/light"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/lights": {
      "get": {
        "summary": "Get all lights",
        "description": "Get detailed information about all lights",
        "tags": [
          "Light information & management"
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/light"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cameras/{id}": {
      "get": {
        "summary": "Get camera details",
        "description": "Get detailed information about a specific camera",
        "tags": [
          "Camera information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of camera",
            "schema": {
              "$ref": "#/components/schemas/cameraId"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/camera"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Patch camera settings",
        "description": "Patch the settings for a specific camera",
        "tags": [
          "Camera information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of camera",
            "schema": {
              "$ref": "#/components/schemas/cameraId"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The name of the device."
                  },
                  "osdSettings": {
                    "type": "object",
                    "properties": {
                      "isNameEnabled": {
                        "$ref": "#/components/schemas/osdIsNameEnabled"
                      },
                      "isDateEnabled": {
                        "$ref": "#/components/schemas/osdIsDateEnabled"
                      },
                      "isLogoEnabled": {
                        "$ref": "#/components/schemas/osdIsLogoEnabled"
                      },
                      "isDebugEnabled": {
                        "$ref": "#/components/schemas/osdIsDebugEnabled"
                      },
                      "overlayLocation": {
                        "$ref": "#/components/schemas/osdOverlayLocation"
                      }
                    },
                    "additionalProperties": false,
                    "description": "On Screen Display settings.",
                    "title": "osdSettings"
                  },
                  "ledSettings": {
                    "type": "object",
                    "properties": {
                      "isEnabled": {
                        "$ref": "#/components/schemas/ledIsEnabled"
                      },
                      "welcomeLed": {
                        "$ref": "#/components/schemas/ledWelcomeLed"
                      },
                      "floodLed": {
                        "$ref": "#/components/schemas/ledFloodLed"
                      }
                    },
                    "additionalProperties": false,
                    "description": "LED settings.",
                    "title": "ledSettings"
                  },
                  "lcdMessage": {
                    "$ref": "#/components/schemas/lcdMessage",
                    "description": "Message that's set on the LCD screen (for doorbells and/or other devices with LCD screens). To upload image assets for the LCD screen, use the `/files/{fileType}` endpoint."
                  },
                  "micVolume": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/micVolume"
                      }
                    ],
                    "minimum": 1
                  },
                  "videoMode": {
                    "$ref": "#/components/schemas/videoMode"
                  },
                  "hdrType": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/hdrType"
                      }
                    ],
                    "description": "High Dynamic Range (HDR) mode setting.",
                    "enum": [
                      "auto",
                      "on",
                      "off"
                    ],
                    "x-enum-descriptions": [
                      "Recommended, the system automatically adjusts the HDR level.",
                      "Forces HDR to be always enabled as the highest level.",
                      "Disables HDR completely."
                    ],
                    "x-enum-varnames": [
                      "auto",
                      "on",
                      "off"
                    ]
                  },
                  "smartDetectSettings": {
                    "type": "object",
                    "properties": {
                      "objectTypes": {
                        "$ref": "#/components/schemas/objectTypes"
                      },
                      "audioTypes": {
                        "$ref": "#/components/schemas/audioTypes"
                      }
                    },
                    "additionalProperties": false,
                    "description": "Smart detection settings for the camera.",
                    "title": "smartDetectSettings"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/camera"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cameras": {
      "get": {
        "summary": "Get all cameras",
        "description": "Get detailed information about all cameras",
        "tags": [
          "Camera information & management"
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/camera"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cameras/{id}/rtsps-stream": {
      "post": {
        "summary": "Create RTSPS streams for camera",
        "description": "Returns RTSPS stream URLs for specified quality levels",
        "tags": [
          "Camera information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of camera",
            "schema": {
              "$ref": "#/components/schemas/cameraId"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "qualities": {
                    "$ref": "#/components/schemas/createdQualities"
                  }
                },
                "required": [
                  "qualities"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/createdRtspsStreams"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete camera RTSPS stream",
        "description": "Remove the RTSPS stream for a specified camera",
        "tags": [
          "Camera information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of camera",
            "schema": {
              "$ref": "#/components/schemas/cameraId"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "qualities",
            "description": "The array of quality levels for the RTSPS streams to be removed. All qualities (high, medium, low) are available for all cameras. The package quality is only available for cameras with hasPackageCamera: true.",
            "schema": {
              "$ref": "#/components/schemas/removedQualities"
            },
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "RTSPS stream successfully removed"
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Get RTSPS streams for camera",
        "description": "Returns existing RTSPS stream URLs for camera",
        "tags": [
          "Camera information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of camera",
            "schema": {
              "$ref": "#/components/schemas/cameraId"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/existingRtspsStreams"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cameras/{id}/snapshot": {
      "get": {
        "summary": "Get camera snapshot",
        "description": "Get a snapshot image from a specific camera. Use channel=package for cameras with a package camera (hasPackageCamera: true).",
        "tags": [
          "Camera information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of camera",
            "schema": {
              "$ref": "#/components/schemas/cameraId"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "channel",
            "description": "Camera channel to capture snapshot from. Use \"package\" for cameras with a package camera (hasPackageCamera: true).",
            "schema": {
              "$ref": "#/components/schemas/snapshotChannel"
            }
          },
          {
            "in": "query",
            "name": "highQuality",
            "description": "Whether to force 1080P or higher resolution snapshot",
            "schema": {
              "$ref": "#/components/schemas/forceHighQuality"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Camera snapshot",
            "content": {
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "503": {
            "description": "The camera is offline or not reachable."
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cameras/{id}/disable-mic-permanently": {
      "post": {
        "summary": "Permanently disable camera microphone",
        "description": "Disable the microphone for a specific camera. This action cannot be undone unless the camera is reset.",
        "tags": [
          "Camera information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of camera",
            "schema": {
              "$ref": "#/components/schemas/cameraId"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/camera"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cameras/{id}/talkback-session": {
      "post": {
        "summary": "Create talkback session for camera",
        "description": "Returns the talkback stream URL and audio configuration for a specific camera",
        "tags": [
          "Camera information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of camera",
            "schema": {
              "$ref": "#/components/schemas/cameraId"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/talkbackSession"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sensors/{id}": {
      "get": {
        "summary": "Get sensor details",
        "description": "Get detailed information about a specific sensor",
        "tags": [
          "Sensor information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of sensor",
            "schema": {
              "$ref": "#/components/schemas/sensorId"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/sensor"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Patch sensor settings",
        "description": "Patch the settings for a specific sensor",
        "tags": [
          "Sensor information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of sensor",
            "schema": {
              "$ref": "#/components/schemas/sensorId"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "$ref": "#/components/schemas/name"
                  },
                  "lightSettings": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/lightSettings"
                      }
                    ],
                    "additionalProperties": false
                  },
                  "humiditySettings": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/humiditySettings"
                      }
                    ],
                    "additionalProperties": false
                  },
                  "temperatureSettings": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/temperatureSettings"
                      }
                    ],
                    "additionalProperties": false
                  },
                  "motionSettings": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/motionSettings"
                      }
                    ],
                    "additionalProperties": false
                  },
                  "glassBreakSettings": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/glassBreakSettings"
                      }
                    ],
                    "additionalProperties": false
                  },
                  "scheduleMode": {
                    "type": "string",
                    "enum": [
                      "always",
                      "when_armed"
                    ]
                  },
                  "armProfileIds": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "maxItems": 32
                  },
                  "hasCustomSensitivityWhenArmed": {
                    "type": "boolean"
                  },
                  "alarmSettings": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/alarmSettings"
                      }
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/sensor"
                }
              }
            }
          },
          "409": {
            "description": "This operation is not supported for this sensor"
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sensors": {
      "get": {
        "summary": "Get all sensors",
        "description": "Get detailed information about all sensors",
        "tags": [
          "Sensor information & management"
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/sensor"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sirens/{id}": {
      "get": {
        "summary": "Get siren details",
        "description": "Get detailed information about a specific siren",
        "tags": [
          "Siren information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of siren",
            "schema": {
              "$ref": "#/components/schemas/sirenId"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/siren"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Patch siren settings",
        "description": "Patch the settings for a specific siren",
        "tags": [
          "Siren information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of siren",
            "schema": {
              "$ref": "#/components/schemas/sirenId"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "$ref": "#/components/schemas/name"
                  },
                  "volume": {
                    "$ref": "#/components/schemas/sirenVolume"
                  },
                  "ledSettings": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/sirenLedSettingsExternal"
                      }
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/siren"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sirens": {
      "get": {
        "summary": "Get all sirens",
        "description": "Get detailed information about all sirens",
        "tags": [
          "Siren information & management"
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/siren"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sirens/{id}/play": {
      "post": {
        "summary": "Play siren",
        "description": "Activate the siren alarm for the specified duration. The siren status will be tracked and can be stopped early using the stop endpoint.",
        "tags": [
          "Siren information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of siren",
            "schema": {
              "$ref": "#/components/schemas/sirenId"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "duration": {
                    "$ref": "#/components/schemas/sirenDurationSeconds",
                    "description": "Duration of the siren activation in seconds. Defaults to 5 seconds."
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The siren was activated successfully."
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sirens/{id}/stop": {
      "post": {
        "summary": "Stop siren",
        "description": "Stop an active siren.",
        "tags": [
          "Siren information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of siren",
            "schema": {
              "$ref": "#/components/schemas/sirenId"
            },
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "The siren was stopped successfully."
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sirens/{id}/test-sound": {
      "post": {
        "summary": "Test siren sound",
        "description": "Test the siren sound for 5 seconds at the specified volume.",
        "tags": [
          "Siren information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of siren",
            "schema": {
              "$ref": "#/components/schemas/sirenId"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "volume": {
                    "$ref": "#/components/schemas/sirenVolume",
                    "description": "The volume for testing the siren sound. Defaults to the configured device volume."
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The siren sound test was initiated successfully."
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/fobs/{id}": {
      "get": {
        "summary": "Get fob details",
        "description": "Get detailed information about a specific fob",
        "tags": [
          "Fob information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of fob",
            "schema": {
              "$ref": "#/components/schemas/fobId"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/fob"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Patch fob settings",
        "description": "Patch the settings for a specific fob",
        "tags": [
          "Fob information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of fob",
            "schema": {
              "$ref": "#/components/schemas/fobId"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "$ref": "#/components/schemas/name"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/fob"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/fobs": {
      "get": {
        "summary": "Get all fobs",
        "description": "Get detailed information about all fobs",
        "tags": [
          "Fob information & management"
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/fob"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/relays/{id}": {
      "get": {
        "summary": "Get relay details",
        "description": "Get detailed information about a specific relay",
        "tags": [
          "Relay information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of relay",
            "schema": {
              "$ref": "#/components/schemas/relayId"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/relay"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Patch relay settings",
        "description": "Patch the settings for a specific relay",
        "tags": [
          "Relay information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of relay",
            "schema": {
              "$ref": "#/components/schemas/relayId"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "$ref": "#/components/schemas/name"
                  },
                  "ledSettings": {
                    "type": "object",
                    "properties": {
                      "isEnabled": {
                        "$ref": "#/components/schemas/relayLedIsEnabled"
                      }
                    },
                    "description": "Status LED settings.",
                    "title": "relayLedSettings"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/relay"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/relays": {
      "get": {
        "summary": "Get all relays",
        "description": "Get detailed information about all relays",
        "tags": [
          "Relay information & management"
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/relay"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/relays/{id}/outputs/{outputId}/activate": {
      "post": {
        "summary": "Activate relay output",
        "description": "Control a relay output state. Use \"state\" to set a specific state (on/off), or omit to toggle. When state is \"on\", you can optionally provide \"pulseDuration\" to auto-turn off after the specified milliseconds.",
        "tags": [
          "Relay information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of relay",
            "schema": {
              "$ref": "#/components/schemas/relayId"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "outputId",
            "description": "Output channel ID (0 or 1)",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Output channel ID (0 or 1)"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "on",
                      "off"
                    ],
                    "description": "Desired output state. If omitted, toggles the current state."
                  },
                  "pulseDuration": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Auto-off duration in milliseconds (only applies when state is \"on\"). If greater than 0, the output auto-turns off after the specified duration."
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The relay output activation was initiated successfully."
          },
          "503": {
            "description": "The relay is offline or not reachable."
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/speakers/{id}": {
      "get": {
        "summary": "Get speaker details",
        "description": "Get detailed information about a specific speaker",
        "tags": [
          "Speaker information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of speaker",
            "schema": {
              "$ref": "#/components/schemas/speakerId"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/speaker"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Patch speaker settings",
        "description": "Patch the settings for a specific speaker",
        "tags": [
          "Speaker information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of speaker",
            "schema": {
              "$ref": "#/components/schemas/speakerId"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "$ref": "#/components/schemas/name"
                  },
                  "volume": {
                    "$ref": "#/components/schemas/speakerVolume"
                  },
                  "micVolume": {
                    "$ref": "#/components/schemas/speakerMicVolume"
                  },
                  "isMicEnabled": {
                    "$ref": "#/components/schemas/speakerIsMicEnabled"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/speaker"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/speakers": {
      "get": {
        "summary": "Get all speakers",
        "description": "Get detailed information about all speakers",
        "tags": [
          "Speaker information & management"
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/speaker"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/speakers/{id}/test-sound": {
      "post": {
        "summary": "Test speaker sound",
        "description": "Test the speaker sound at the specified volume.",
        "tags": [
          "Speaker information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of speaker",
            "schema": {
              "$ref": "#/components/schemas/speakerId"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "volume": {
                    "$ref": "#/components/schemas/speakerVolume",
                    "description": "The volume for testing the speaker sound. Defaults to the configured device volume."
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The speaker sound test was initiated successfully."
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/bridges/{id}": {
      "get": {
        "summary": "Get bridge details",
        "description": "Get detailed information about a specific bridge",
        "tags": [
          "Bridge information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of bridge",
            "schema": {
              "$ref": "#/components/schemas/bridgeId"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/bridge"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Patch bridge settings",
        "description": "Patch the settings for a specific bridge",
        "tags": [
          "Bridge information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of bridge",
            "schema": {
              "$ref": "#/components/schemas/bridgeId"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "$ref": "#/components/schemas/name"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/bridge"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/bridges": {
      "get": {
        "summary": "Get all bridges",
        "description": "Get detailed information about all bridges",
        "tags": [
          "Bridge information & management"
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/bridge"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/link-stations/{id}": {
      "get": {
        "summary": "Get link station details",
        "description": "Get detailed information about a specific link station (non-alarm hub gateways)",
        "tags": [
          "Link station information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of linkStation",
            "schema": {
              "$ref": "#/components/schemas/linkStationId"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/linkStation"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Patch link station settings",
        "description": "Patch the settings for a specific link station",
        "tags": [
          "Link station information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of linkStation",
            "schema": {
              "$ref": "#/components/schemas/linkStationId"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "$ref": "#/components/schemas/name"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/linkStation"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/link-stations": {
      "get": {
        "summary": "Get all link stations",
        "description": "Get detailed information about all link stations (non-alarm hub gateways)",
        "tags": [
          "Link station information & management"
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/linkStation"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/alarm-hubs/{id}": {
      "get": {
        "summary": "Get alarm hub details",
        "description": "Get detailed information about a specific alarm hub",
        "tags": [
          "Alarm hub information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of linkStation",
            "schema": {
              "$ref": "#/components/schemas/linkStationId"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/linkStation"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Patch alarm hub settings",
        "description": "Patch the settings for a specific alarm hub",
        "tags": [
          "Alarm hub information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of linkStation",
            "schema": {
              "$ref": "#/components/schemas/linkStationId"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "$ref": "#/components/schemas/name"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/linkStation"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/alarm-hubs": {
      "get": {
        "summary": "Get all alarm hubs",
        "description": "Get detailed information about all alarm hubs",
        "tags": [
          "Alarm hub information & management"
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/linkStation"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/alarm-hubs/{id}/outputs/{outputId}/trigger": {
      "post": {
        "summary": "Trigger alarm hub output",
        "description": "Trigger an alarm hub output channel. Can be used to turn on/off connected devices like sirens, lights, or other actuators.",
        "tags": [
          "Alarm hub information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of linkStation",
            "schema": {
              "$ref": "#/components/schemas/linkStationId"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "outputId",
            "description": "Output channel ID (0 or 1)",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Output channel ID (0 or 1)"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enable": {
                    "type": "boolean",
                    "description": "Set to true to turn on, false to turn off. If omitted, toggles the current state.",
                    "examples": [
                      true
                    ]
                  },
                  "delay": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Delay in milliseconds before the output activates",
                    "examples": [
                      0
                    ]
                  },
                  "duration": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Duration in milliseconds to keep the output active. 0 means indefinite until manually turned off.",
                    "examples": [
                      5000
                    ]
                  }
                },
                "additionalProperties": false,
                "description": "Trigger output request body"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The output trigger was initiated successfully."
          },
          "503": {
            "description": "The alarm hub is offline or not reachable."
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/nvrs": {
      "get": {
        "summary": "Get NVR details",
        "description": "Get detailed information about the NVR",
        "tags": [
          "NVR information & management"
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/nvr"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{fileType}": {
      "post": {
        "summary": "Upload device asset file",
        "description": "Upload a new device asset file",
        "tags": [
          "Device asset file management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "fileType",
            "description": "Device asset file type",
            "schema": {
              "$ref": "#/components/schemas/assetFileType"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "string",
                "format": "binary",
                "description": "A binary file with one of these MIME types: image/gif, image/jpeg, image/png, audio/mpeg, audio/mp4, audio/wave, audio/x-caf}"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed and persisted device asset",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/fileSchema"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Get device asset files",
        "description": "Get a list of all device asset files",
        "tags": [
          "Device asset file management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "fileType",
            "description": "Device asset file type",
            "schema": {
              "$ref": "#/components/schemas/assetFileType"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Device asset list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/fileSchema"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chimes/{id}": {
      "get": {
        "summary": "Get chime details",
        "description": "Get detailed information about a specific chime",
        "tags": [
          "Chime information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of chime",
            "schema": {
              "$ref": "#/components/schemas/chimeId"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/chime"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Patch chime settings",
        "description": "Patch the settings for a specific chime",
        "tags": [
          "Chime information & management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of chime",
            "schema": {
              "$ref": "#/components/schemas/chimeId"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The name of the device."
                  },
                  "cameraIds": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/cameraId"
                    },
                    "description": "The list of (doorbell-only) cameras which this chime is paired to."
                  },
                  "ringSettings": {
                    "type": "array",
                    "items": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/ringSettings"
                        }
                      ],
                      "additionalProperties": false
                    },
                    "description": "List of custom ringtone settings for (doorbell-only) cameras paired to this chime."
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/chime"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chimes": {
      "get": {
        "summary": "Get all chimes",
        "description": "Get detailed information about all chimes",
        "tags": [
          "Chime information & management"
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/chime"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{id}": {
      "get": {
        "summary": "Get user details",
        "description": "Get detailed information about a specific Protect user.",
        "tags": [
          "Protect User information"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of user",
            "schema": {
              "$ref": "#/components/schemas/userId"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/user"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users": {
      "get": {
        "summary": "Get all users",
        "description": "Get all Protect users. Users are filtered based on access permissions.",
        "tags": [
          "Protect User information"
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/user"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ulp-users/{id}": {
      "get": {
        "summary": "Get identity user details",
        "description": "Get detailed information about a specific UniFi Identity user.",
        "tags": [
          "UniFi Identity User information"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The primary key of ulpUser",
            "schema": {
              "$ref": "#/components/schemas/ulpUserId"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ulpUser"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ulp-users": {
      "get": {
        "summary": "Get all identity users",
        "description": "Get all UniFi Identity users with enrolled credentials (NFC cards, fingerprints).",
        "tags": [
          "UniFi Identity User information"
        ],
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ulpUser"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/pos/cameras/{id}/transactions": {
      "post": {
        "summary": "Ingest a POS transaction",
        "description": "Records a point of sale transaction as a camera event so the transaction details can be overlaid on recorded footage. Requires write access to the target camera. Footage capture is best-effort: the overlay only appears where the target camera was recording the transaction window (e.g. cameras in detections or adaptive recording modes), and a backdated timestamp may fall outside retained footage. A 200 response confirms the event was recorded, not that video exists for the window.",
        "tags": [
          "Point of sale event ingestion"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Camera id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/posTransactionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/posTransactionResponse"
                }
              }
            }
          },
          "409": {
            "description": "A transaction with the same externalId for this camera is already being processed; retry shortly."
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/genericError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "protectVersion": {
        "type": "string",
        "description": "Protect application version",
        "examples": [
          "1.0.0"
        ],
        "title": "protectVersion"
      },
      "posTransactionRequest": {
        "type": "object",
        "required": [
          "type",
          "externalId",
          "amount"
        ],
        "properties": {
          "type": {
            "enum": [
              "sale",
              "refund"
            ],
            "description": "Transaction type"
          },
          "externalId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "Caller-supplied transaction id, unique per camera. Used for best-effort idempotency within a short window (in-memory, per-process; it resets on restart, so a retry after a restart or after the window elapses may create a duplicate event)."
          },
          "amount": {
            "type": "number",
            "minimum": 0,
            "description": "Transaction total amount"
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3,
            "pattern": "^[A-Z]{3}$",
            "description": "Uppercase ISO 4217 currency code, e.g. USD"
          },
          "lineItems": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "title",
                "quantity"
              ],
              "properties": {
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255,
                  "description": "Line item title"
                },
                "quantity": {
                  "type": "integer",
                  "minimum": 1,
                  "description": "Line item quantity"
                }
              },
              "additionalProperties": false
            },
            "maxItems": 200,
            "description": "Purchased line items"
          },
          "location": {
            "type": "object",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255,
                "description": "Location or register identifier"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255,
                "description": "Human-readable location or register name"
              }
            },
            "additionalProperties": false
          },
          "paymentTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "maxItems": 20,
            "description": "Payment method names"
          },
          "timestamp": {
            "type": "integer",
            "minimum": 1,
            "description": "Transaction time in epoch milliseconds. Must be within the last 24 hours and no more than 5 minutes ahead of server time; out-of-range values are rejected. A value within the allowed skew is clamped to now."
          }
        },
        "additionalProperties": false,
        "description": "A POS transaction to overlay on camera footage",
        "title": "posTransactionRequest"
      },
      "posTransactionResponse": {
        "type": "object",
        "required": [
          "created"
        ],
        "properties": {
          "created": {
            "type": "boolean",
            "description": "True when a new event was created; false when an event with the same externalId was already ingested (eventId echoes the existing one). Idempotency is best-effort - see the externalId description."
          },
          "eventId": {
            "type": "string",
            "description": "Id of the created (or previously created) event"
          }
        },
        "description": "Result of POS transaction ingestion",
        "title": "posTransactionResponse"
      },
      "genericError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "Error message",
            "examples": [
              "Unexpected API error occurred"
            ]
          },
          "name": {
            "type": "string",
            "description": "Name of the error",
            "examples": [
              "API_ERROR"
            ]
          },
          "cause": {
            "type": "object",
            "additionalProperties": {},
            "description": "An optional nested cause for the parent error",
            "examples": [
              {
                "error": "Unexpected functionality error",
                "name": "UNKNOWN_ERROR"
              }
            ]
          }
        },
        "required": [
          "error",
          "name"
        ],
        "title": "genericError"
      },
      "viewerId": {
        "type": "string",
        "description": "The primary key of viewer",
        "examples": [
          "66d025b301ebc903e80003ea",
          "672094f900e26303e800062a"
        ],
        "title": "viewerId"
      },
      "viewer": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/viewerId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/viewerModelKey"
          },
          "state": {
            "$ref": "#/components/schemas/deviceState"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/deviceType"
          },
          "guid": {
            "$ref": "#/components/schemas/deviceGuid"
          },
          "mac": {
            "$ref": "#/components/schemas/mac"
          },
          "liveview": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/liveviewId"
              },
              {
                "type": "null"
              }
            ]
          },
          "streamLimit": {
            "$ref": "#/components/schemas/streamLimit"
          }
        },
        "required": [
          "id",
          "modelKey",
          "state",
          "name",
          "type",
          "guid",
          "mac",
          "liveview",
          "streamLimit"
        ],
        "title": "viewer"
      },
      "viewerModelKey": {
        "type": "string",
        "const": "viewer",
        "description": "The model key of the viewer",
        "title": "viewerModelKey"
      },
      "deviceState": {
        "type": "string",
        "enum": [
          "CONNECTED",
          "CONNECTING",
          "DISCONNECTED"
        ],
        "description": "Connection state of the device.",
        "examples": [
          "CONNECTED",
          "CONNECTING",
          "DISCONNECTED"
        ],
        "title": "deviceState"
      },
      "name": {
        "type": "string",
        "description": "The name of the device.",
        "examples": [
          "Front Door",
          "Office Entrance",
          "Server Room"
        ],
        "title": "name"
      },
      "deviceType": {
        "type": [
          "string",
          "null"
        ],
        "description": "The device model name.",
        "examples": [
          "UVC Micro"
        ],
        "title": "deviceType"
      },
      "deviceGuid": {
        "type": [
          "string",
          "null"
        ],
        "description": "Stable identifier for the device model.",
        "examples": [
          "6b8fdd7c-7e4c-4156-bb39-be05ca855491"
        ],
        "title": "deviceGuid"
      },
      "mac": {
        "type": "string",
        "description": "The primary MAC address of the device.",
        "examples": [
          "24A43C3DFEB9",
          "D021F98B6AED"
        ],
        "title": "mac"
      },
      "liveviewId": {
        "type": "string",
        "description": "The primary key of liveview",
        "examples": [
          "66d025b301ebc903e80003ea",
          "672094f900e26303e800062a"
        ],
        "title": "liveviewId"
      },
      "streamLimit": {
        "type": "number",
        "description": "Count of maximum supported parallel live streams.",
        "examples": [
          1,
          16
        ],
        "title": "streamLimit"
      },
      "liveview": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/liveviewId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/liveviewModelKey"
          },
          "name": {
            "type": "string",
            "description": "The name of this live view."
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether this live view is the default one for all viewers."
          },
          "isGlobal": {
            "type": "boolean",
            "description": "Whether this live view is global and available system-wide to all users"
          },
          "owner": {
            "$ref": "#/components/schemas/userId"
          },
          "layout": {
            "type": "number",
            "minimum": 1,
            "maximum": 26,
            "description": "The number of slots this live view contains. Which as a consequence also affects the layout of the live view.",
            "examples": [
              9,
              4
            ]
          },
          "slots": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "cameras": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/cameraId"
                  }
                },
                "cycleMode": {
                  "type": "string",
                  "enum": [
                    "motion",
                    "time"
                  ],
                  "description": "Whether to switch to next camera in slot based on motion events or a strict time interval"
                },
                "cycleInterval": {
                  "type": "number",
                  "description": "How long should each camera stream be shown for in seconds until we cycle to the next camera",
                  "examples": [
                    10,
                    30
                  ]
                }
              },
              "required": [
                "cameras",
                "cycleMode",
                "cycleInterval"
              ],
              "description": "Which cameras will be visible in a given slot and how will they be cycled through"
            },
            "description": "List of cameras visible in each given slot. And cycling settings for each slot if it has multiple cameras listed."
          }
        },
        "required": [
          "id",
          "modelKey",
          "name",
          "isDefault",
          "isGlobal",
          "owner",
          "layout",
          "slots"
        ],
        "title": "liveview"
      },
      "liveviewModelKey": {
        "type": "string",
        "const": "liveview",
        "description": "The model key of the liveview",
        "title": "liveviewModelKey"
      },
      "userId": {
        "type": "string",
        "description": "The primary key of user",
        "examples": [
          "66d025b301ebc903e80003ea",
          "672094f900e26303e800062a"
        ],
        "title": "userId"
      },
      "cameraId": {
        "type": "string",
        "description": "The primary key of camera",
        "examples": [
          "66d025b301ebc903e80003ea",
          "672094f900e26303e800062a"
        ],
        "title": "cameraId"
      },
      "deviceEvent": {
        "anyOf": [
          {
            "oneOf": [
              {
                "$ref": "#/components/schemas/deviceAdd"
              },
              {
                "$ref": "#/components/schemas/deviceUpdate"
              },
              {
                "$ref": "#/components/schemas/deviceRemove"
              }
            ],
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "add": "#/components/schemas/deviceAdd",
                "update": "#/components/schemas/deviceUpdate",
                "remove": "#/components/schemas/deviceRemove"
              }
            },
            "description": "A device which was created, updated or deleted"
          },
          {
            "oneOf": [
              {
                "$ref": "#/components/schemas/devicesAdd"
              },
              {
                "$ref": "#/components/schemas/devicesBulkUpdate"
              },
              {
                "$ref": "#/components/schemas/devicesBulkRemove"
              }
            ],
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "add": "#/components/schemas/devicesAdd",
                "update": "#/components/schemas/devicesBulkUpdate",
                "remove": "#/components/schemas/devicesBulkRemove"
              }
            },
            "description": "Devices which were created, updated or deleted"
          }
        ],
        "description": "Device(s) which was created, updated or deleted"
      },
      "deviceAdd": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "add"
          },
          "item": {
            "$ref": "#/components/schemas/device"
          }
        },
        "required": [
          "type",
          "item"
        ],
        "title": "deviceAdd"
      },
      "device": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/nvr"
          },
          {
            "$ref": "#/components/schemas/camera"
          },
          {
            "$ref": "#/components/schemas/chime"
          },
          {
            "$ref": "#/components/schemas/light"
          },
          {
            "$ref": "#/components/schemas/viewer"
          },
          {
            "$ref": "#/components/schemas/speaker"
          },
          {
            "$ref": "#/components/schemas/bridge"
          },
          {
            "$ref": "#/components/schemas/sensor"
          },
          {
            "$ref": "#/components/schemas/siren"
          },
          {
            "$ref": "#/components/schemas/fob"
          },
          {
            "$ref": "#/components/schemas/relay"
          },
          {
            "$ref": "#/components/schemas/aiProcessor"
          },
          {
            "$ref": "#/components/schemas/aiPort"
          },
          {
            "$ref": "#/components/schemas/linkStation"
          }
        ],
        "discriminator": {
          "propertyName": "modelKey",
          "mapping": {
            "nvr": "#/components/schemas/nvr",
            "camera": "#/components/schemas/camera",
            "chime": "#/components/schemas/chime",
            "light": "#/components/schemas/light",
            "viewer": "#/components/schemas/viewer",
            "speaker": "#/components/schemas/speaker",
            "bridge": "#/components/schemas/bridge",
            "sensor": "#/components/schemas/sensor",
            "siren": "#/components/schemas/siren",
            "fob": "#/components/schemas/fob",
            "relay": "#/components/schemas/relay",
            "aiprocessor": "#/components/schemas/aiProcessor",
            "aiport": "#/components/schemas/aiPort",
            "linkstation": "#/components/schemas/linkStation"
          }
        }
      },
      "nvr": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/nvrId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/nvrModelKey"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/nvrType"
          },
          "guid": {
            "$ref": "#/components/schemas/nvrGuid"
          },
          "mac": {
            "$ref": "#/components/schemas/mac"
          },
          "doorbellSettings": {
            "$ref": "#/components/schemas/doorbellSettings"
          },
          "armMode": {
            "$ref": "#/components/schemas/nvrArmMode"
          }
        },
        "required": [
          "id",
          "modelKey",
          "name",
          "type",
          "guid",
          "mac",
          "doorbellSettings",
          "armMode"
        ],
        "title": "nvr"
      },
      "nvrId": {
        "type": "string",
        "description": "The primary key of nvr",
        "examples": [
          "66d025b301ebc903e80003ea",
          "672094f900e26303e800062a"
        ],
        "title": "nvrId"
      },
      "nvrModelKey": {
        "type": "string",
        "const": "nvr",
        "description": "The model key of the nvr",
        "title": "nvrModelKey"
      },
      "nvrType": {
        "type": "string",
        "description": "The NVR model name.",
        "examples": [
          "UNVR-PRO",
          "UDM-PRO",
          "UNKNOWN"
        ],
        "title": "nvrType"
      },
      "nvrGuid": {
        "type": [
          "string",
          "null"
        ],
        "description": "GUID of the NVR",
        "title": "nvrGuid"
      },
      "doorbellSettings": {
        "type": "object",
        "properties": {
          "defaultMessageText": {
            "type": "string",
            "description": "Default text to display on the LCD screen.",
            "examples": [
              "WELCOME"
            ]
          },
          "defaultMessageResetTimeoutMs": {
            "type": "number",
            "description": "Default timeout for resetting LCD screen to the default message.",
            "examples": [
              60000
            ]
          },
          "customMessages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of custom doorbell messages.",
            "examples": [
              [
                "Do Not Disturb",
                "Leave Package at Door"
              ],
              []
            ]
          },
          "customImages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "preview": {
                  "type": "string",
                  "examples": [
                    "34225b30-fe6a-11af-1690-29424bd911c2.png.gif"
                  ]
                },
                "sprite": {
                  "type": "string",
                  "examples": [
                    "34225b30-fe6a-11af-1690-29424bd911c2.png"
                  ]
                }
              },
              "required": [
                "preview",
                "sprite"
              ]
            },
            "description": "A list of custom doorbell images for client preview."
          }
        },
        "title": "doorbellSettings"
      },
      "nvrArmMode": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "arming",
              "armed",
              "breach",
              "disabled"
            ]
          },
          "armProfileId": {
            "type": [
              "string",
              "null"
            ]
          },
          "armedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "willBeArmedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "breachDetectedAt": {
            "type": [
              "number",
              "null"
            ]
          },
          "breachEventCount": {
            "type": "number"
          },
          "breachTriggerEventId": {
            "type": [
              "string",
              "null"
            ]
          },
          "breachEventId": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "status",
          "armProfileId",
          "armedAt",
          "willBeArmedAt",
          "breachDetectedAt",
          "breachEventCount",
          "breachTriggerEventId",
          "breachEventId"
        ],
        "title": "nvrArmMode"
      },
      "camera": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/cameraId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/cameraModelKey"
          },
          "state": {
            "$ref": "#/components/schemas/deviceState"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/deviceType"
          },
          "guid": {
            "$ref": "#/components/schemas/deviceGuid"
          },
          "mac": {
            "$ref": "#/components/schemas/mac"
          },
          "isMicEnabled": {
            "$ref": "#/components/schemas/isMicEnabled"
          },
          "osdSettings": {
            "$ref": "#/components/schemas/osdSettings"
          },
          "ledSettings": {
            "$ref": "#/components/schemas/ledSettings"
          },
          "lcdMessage": {
            "$ref": "#/components/schemas/lcdMessageUnion"
          },
          "micVolume": {
            "$ref": "#/components/schemas/micVolume"
          },
          "activePatrolSlot": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/activePatrolSlot"
              },
              {
                "type": "null"
              }
            ]
          },
          "videoMode": {
            "$ref": "#/components/schemas/videoMode"
          },
          "hdrType": {
            "$ref": "#/components/schemas/hdrType"
          },
          "featureFlags": {
            "$ref": "#/components/schemas/cameraFeatureFlags"
          },
          "smartDetectSettings": {
            "$ref": "#/components/schemas/smartDetectSettings"
          },
          "hasPackageCamera": {
            "$ref": "#/components/schemas/hasPackageCamera"
          }
        },
        "required": [
          "id",
          "modelKey",
          "state",
          "name",
          "type",
          "guid",
          "mac",
          "isMicEnabled",
          "osdSettings",
          "ledSettings",
          "lcdMessage",
          "micVolume",
          "activePatrolSlot",
          "videoMode",
          "hdrType",
          "featureFlags",
          "smartDetectSettings",
          "hasPackageCamera"
        ],
        "title": "camera"
      },
      "cameraModelKey": {
        "type": "string",
        "const": "camera",
        "description": "The model key of the camera",
        "title": "cameraModelKey"
      },
      "isMicEnabled": {
        "type": "boolean",
        "description": "Whether or not the microphone on camera is enabled",
        "title": "isMicEnabled"
      },
      "osdSettings": {
        "type": "object",
        "properties": {
          "isNameEnabled": {
            "$ref": "#/components/schemas/osdIsNameEnabled"
          },
          "isDateEnabled": {
            "$ref": "#/components/schemas/osdIsDateEnabled"
          },
          "isLogoEnabled": {
            "$ref": "#/components/schemas/osdIsLogoEnabled"
          },
          "isDebugEnabled": {
            "$ref": "#/components/schemas/osdIsDebugEnabled"
          },
          "overlayLocation": {
            "$ref": "#/components/schemas/osdOverlayLocation"
          }
        },
        "required": [
          "isNameEnabled",
          "isDateEnabled",
          "isLogoEnabled",
          "isDebugEnabled",
          "overlayLocation"
        ],
        "description": "On Screen Display settings.",
        "title": "osdSettings"
      },
      "osdIsNameEnabled": {
        "type": "boolean",
        "description": "Whether to show the name in the OSD.",
        "title": "osdIsNameEnabled"
      },
      "osdIsDateEnabled": {
        "type": "boolean",
        "description": "Whether to show the date in the OSD.",
        "title": "osdIsDateEnabled"
      },
      "osdIsLogoEnabled": {
        "type": "boolean",
        "description": "Whether to show the logo in the bottom right corner.",
        "title": "osdIsLogoEnabled"
      },
      "osdIsDebugEnabled": {
        "type": "boolean",
        "description": "Whether debug info is enabled.",
        "title": "osdIsDebugEnabled"
      },
      "osdOverlayLocation": {
        "type": "string",
        "enum": [
          "topLeft",
          "topMiddle",
          "topRight",
          "bottomLeft",
          "bottomMiddle",
          "bottomRight"
        ],
        "description": "The location of the overlay on the screen.",
        "examples": [
          "bottomRight",
          "topLeft"
        ],
        "title": "osdOverlayLocation"
      },
      "ledSettings": {
        "type": "object",
        "properties": {
          "isEnabled": {
            "$ref": "#/components/schemas/ledIsEnabled"
          },
          "welcomeLed": {
            "$ref": "#/components/schemas/ledWelcomeLed"
          },
          "floodLed": {
            "$ref": "#/components/schemas/ledFloodLed"
          }
        },
        "required": [
          "isEnabled",
          "welcomeLed",
          "floodLed"
        ],
        "description": "LED settings.",
        "title": "ledSettings"
      },
      "ledIsEnabled": {
        "type": "boolean",
        "description": "Indicates whether the status LED is enabled.",
        "title": "ledIsEnabled"
      },
      "ledWelcomeLed": {
        "type": "boolean",
        "description": "Indicates whether the welcome LED is enabled.",
        "title": "ledWelcomeLed"
      },
      "ledFloodLed": {
        "type": "boolean",
        "description": "Indicates whether the flood LED is enabled.",
        "title": "ledFloodLed"
      },
      "lcdMessageUnion": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "LEAVE_PACKAGE_AT_DOOR",
              "DO_NOT_DISTURB",
              "CUSTOM_MESSAGE",
              "IMAGE"
            ]
          },
          "resetAt": {
            "type": [
              "number",
              "null"
            ],
            "description": "UNIX timestamp when doorbell message should be removed (if not set then `nvr.doorbellSettings.defaultMessageResetTimeoutMs` is used, if set to `null` then interpreted as \"forever\")"
          },
          "text": {
            "type": "string"
          }
        },
        "title": "lcdMessageUnion"
      },
      "micVolume": {
        "type": "number",
        "minimum": 0,
        "maximum": 100,
        "description": "Mic volume: a number from 0-100.",
        "examples": [
          50,
          100
        ],
        "title": "micVolume"
      },
      "activePatrolSlot": {
        "type": "number",
        "title": "activePatrolSlot",
        "description": "The slot number (0-4) of the patrol that is currently running, or null if no patrol is running",
        "examples": [
          0,
          1,
          2,
          3,
          4
        ]
      },
      "videoMode": {
        "type": "string",
        "enum": [
          "default",
          "highFps",
          "sport",
          "slowShutter",
          "lprReflex",
          "lprNoneReflex"
        ],
        "description": "Current video mode of the camera",
        "examples": [
          "highFps",
          "default"
        ],
        "title": "videoMode"
      },
      "hdrType": {
        "type": "string",
        "enum": [
          "auto",
          "on",
          "off"
        ],
        "description": "High Dynamic Range (HDR) mode setting.",
        "examples": [
          "auto",
          "off"
        ],
        "title": "hdrType"
      },
      "cameraFeatureFlags": {
        "type": "object",
        "properties": {
          "supportFullHdSnapshot": {
            "type": "boolean",
            "description": "Whether camera support full HD or higher resolution snapshot"
          },
          "hasHdr": {
            "type": "boolean",
            "description": "Whether the camera supports High Dynamic Range mode"
          },
          "smartDetectTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "person",
                "vehicle",
                "package",
                "licensePlate",
                "face",
                "animal"
              ]
            },
            "description": "What smart detection object types do the camera support."
          },
          "smartDetectAudioTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "alrmSmoke",
                "alrmCmonx",
                "alrmSiren",
                "alrmBabyCry",
                "alrmSpeak",
                "alrmBark",
                "alrmBurglar",
                "alrmCarHorn",
                "alrmGlassBreak"
              ]
            },
            "description": "What smart detection audio types do the camera support."
          },
          "videoModes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "default",
                "highFps",
                "homekit",
                "sport",
                "slowShutter",
                "lprReflex",
                "lprNoneReflex"
              ]
            },
            "description": "A list of supported video modes by the camera"
          },
          "hasMic": {
            "type": "boolean",
            "description": "Whether the camera has a microphone"
          },
          "hasLedStatus": {
            "type": "boolean",
            "description": "Whether the camera has LED status"
          },
          "hasSpeaker": {
            "type": "boolean",
            "description": "Whether the camera has a speaker to support talkback"
          }
        },
        "required": [
          "supportFullHdSnapshot",
          "hasHdr",
          "smartDetectTypes",
          "smartDetectAudioTypes",
          "videoModes",
          "hasMic",
          "hasLedStatus",
          "hasSpeaker"
        ],
        "title": "cameraFeatureFlags"
      },
      "smartDetectSettings": {
        "type": "object",
        "properties": {
          "objectTypes": {
            "$ref": "#/components/schemas/objectTypes"
          },
          "audioTypes": {
            "$ref": "#/components/schemas/audioTypes"
          }
        },
        "required": [
          "objectTypes",
          "audioTypes"
        ],
        "description": "Smart detection settings for the camera.",
        "title": "smartDetectSettings"
      },
      "objectTypes": {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "person",
            "vehicle",
            "package",
            "licensePlate",
            "face",
            "animal"
          ]
        },
        "title": "objectTypes"
      },
      "audioTypes": {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "alrmSmoke",
            "alrmCmonx",
            "alrmSiren",
            "alrmBabyCry",
            "alrmSpeak",
            "alrmBark",
            "alrmBurglar",
            "alrmCarHorn",
            "alrmGlassBreak"
          ]
        },
        "title": "audioTypes"
      },
      "hasPackageCamera": {
        "type": "boolean",
        "description": "Whether the camera has a package camera.",
        "title": "hasPackageCamera"
      },
      "chime": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/chimeId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/chimeModelKey"
          },
          "state": {
            "$ref": "#/components/schemas/deviceState"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/deviceType"
          },
          "guid": {
            "$ref": "#/components/schemas/deviceGuid"
          },
          "mac": {
            "$ref": "#/components/schemas/mac"
          },
          "cameraIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/cameraId"
            },
            "description": "The list of (doorbell-only) cameras which this chime is paired to."
          },
          "ringSettings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ringSettings"
            },
            "description": "List of custom ringtone settings for (doorbell-only) cameras paired to this chime."
          }
        },
        "required": [
          "id",
          "modelKey",
          "state",
          "name",
          "type",
          "guid",
          "mac",
          "cameraIds",
          "ringSettings"
        ],
        "title": "chime"
      },
      "chimeId": {
        "type": "string",
        "description": "The primary key of chime",
        "examples": [
          "66d025b301ebc903e80003ea",
          "672094f900e26303e800062a"
        ],
        "title": "chimeId"
      },
      "chimeModelKey": {
        "type": "string",
        "const": "chime",
        "description": "The model key of the chime",
        "title": "chimeModelKey"
      },
      "ringSettings": {
        "type": "object",
        "properties": {
          "cameraId": {
            "$ref": "#/components/schemas/cameraId",
            "description": "Which paired (doorbell-only) camera do these settings refer to."
          },
          "repeatTimes": {
            "type": "number",
            "minimum": 1,
            "maximum": 10,
            "description": "How many times should the ringtone be repeated",
            "examples": [
              3,
              1
            ]
          },
          "ringtoneId": {
            "$ref": "#/components/schemas/ringtoneId",
            "description": "The ID of the ringtone that should be played when the (doorbell-only) camera is rung."
          },
          "volume": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "description": "How loud should the ringtone be played. 0 being silent and 100 the loudest.",
            "examples": [
              100,
              80
            ]
          }
        },
        "required": [
          "cameraId",
          "repeatTimes",
          "ringtoneId",
          "volume"
        ],
        "title": "ringSettings"
      },
      "ringtoneId": {
        "type": "string",
        "description": "The primary key of ringtone",
        "examples": [
          "66d025b301ebc903e80003ea",
          "672094f900e26303e800062a"
        ],
        "title": "ringtoneId"
      },
      "light": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/lightId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/lightModelKey"
          },
          "state": {
            "$ref": "#/components/schemas/deviceState"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/deviceType"
          },
          "guid": {
            "$ref": "#/components/schemas/deviceGuid"
          },
          "mac": {
            "$ref": "#/components/schemas/mac"
          },
          "lightModeSettings": {
            "$ref": "#/components/schemas/lightModeSettings"
          },
          "lightDeviceSettings": {
            "$ref": "#/components/schemas/lightDeviceSettings"
          },
          "isDark": {
            "$ref": "#/components/schemas/isDark"
          },
          "isLightOn": {
            "$ref": "#/components/schemas/isLightOn"
          },
          "isLightForceEnabled": {
            "$ref": "#/components/schemas/isLightForceEnabled"
          },
          "lastMotion": {
            "$ref": "#/components/schemas/lastMotion"
          },
          "isPirMotionDetected": {
            "$ref": "#/components/schemas/isPirMotionDetected"
          },
          "camera": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/cameraId"
              },
              {
                "type": "null"
              }
            ],
            "description": "Which camera is configured to be paired to this light."
          }
        },
        "required": [
          "id",
          "modelKey",
          "state",
          "name",
          "type",
          "guid",
          "mac",
          "lightModeSettings",
          "lightDeviceSettings",
          "isDark",
          "isLightOn",
          "isLightForceEnabled",
          "lastMotion",
          "isPirMotionDetected",
          "camera"
        ],
        "title": "light"
      },
      "lightId": {
        "type": "string",
        "description": "The primary key of light",
        "examples": [
          "66d025b301ebc903e80003ea",
          "672094f900e26303e800062a"
        ],
        "title": "lightId"
      },
      "lightModelKey": {
        "type": "string",
        "const": "light",
        "description": "The model key of the light",
        "title": "lightModelKey"
      },
      "lightModeSettings": {
        "type": "object",
        "properties": {
          "mode": {
            "$ref": "#/components/schemas/lightMode"
          },
          "enableAt": {
            "$ref": "#/components/schemas/enableAt"
          }
        },
        "description": "Settings for when and how your light gets activated",
        "title": "lightModeSettings"
      },
      "lightMode": {
        "anyOf": [
          {
            "type": "string",
            "const": "always"
          },
          {
            "type": "string",
            "const": "motion"
          },
          {
            "type": "string",
            "const": "off"
          }
        ],
        "description": "When will floodlight turn on.",
        "title": "lightMode"
      },
      "enableAt": {
        "anyOf": [
          {
            "type": "string",
            "const": "fulltime"
          },
          {
            "type": "string",
            "const": "dark"
          }
        ],
        "description": "At what time is the lighting mode relevant and acted upon (this has no effect when mode is off).",
        "title": "enableAt"
      },
      "lightDeviceSettings": {
        "type": "object",
        "properties": {
          "isIndicatorEnabled": {
            "type": "boolean",
            "description": "Turn on/off floodlight status LED indicator."
          },
          "pirDuration": {
            "type": "number",
            "minimum": 0,
            "description": "How long the light stays on after a motion event in milliseconds.",
            "examples": [
              30000,
              15000
            ]
          },
          "pirSensitivity": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "description": "How sensitive is the PIR to motion (0-100)%.",
            "examples": [
              50,
              80
            ]
          },
          "ledLevel": {
            "type": "number",
            "minimum": 1,
            "maximum": 6,
            "description": "Brightness level of the main LED (1-6).",
            "examples": [
              6,
              3
            ]
          }
        },
        "description": "Hardware settings for light device.",
        "title": "lightDeviceSettings"
      },
      "isDark": {
        "type": "boolean",
        "description": "Whether the light is currently sensing that it's in a dark scene.",
        "title": "isDark"
      },
      "isLightOn": {
        "type": "boolean",
        "description": "Whether the light has its main LED currently enabled.",
        "title": "isLightOn"
      },
      "isLightForceEnabled": {
        "type": "boolean",
        "description": "Whether the light has its main LED currently force-enabled.",
        "title": "isLightForceEnabled"
      },
      "lastMotion": {
        "type": [
          "number",
          "null"
        ],
        "description": "Unix timestamp of the last time the PIR motion-detection was triggered.",
        "examples": [
          1445408038748
        ],
        "title": "lastMotion"
      },
      "isPirMotionDetected": {
        "type": "boolean",
        "description": "Whether the light PIR is currently detecting motion",
        "title": "isPirMotionDetected"
      },
      "speaker": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/speakerId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/speakerModelKey"
          },
          "state": {
            "$ref": "#/components/schemas/deviceState"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/deviceType"
          },
          "guid": {
            "$ref": "#/components/schemas/deviceGuid"
          },
          "mac": {
            "$ref": "#/components/schemas/mac"
          },
          "volume": {
            "$ref": "#/components/schemas/speakerVolume"
          },
          "micVolume": {
            "$ref": "#/components/schemas/speakerMicVolume"
          },
          "isMicEnabled": {
            "$ref": "#/components/schemas/speakerIsMicEnabled"
          },
          "speakerState": {
            "$ref": "#/components/schemas/speakerState"
          },
          "featureFlags": {
            "$ref": "#/components/schemas/speakerFeatureFlags"
          }
        },
        "required": [
          "id",
          "modelKey",
          "state",
          "name",
          "type",
          "guid",
          "mac",
          "volume",
          "micVolume",
          "isMicEnabled",
          "speakerState",
          "featureFlags"
        ],
        "title": "speaker"
      },
      "speakerId": {
        "type": "string",
        "description": "The primary key of speaker",
        "examples": [
          "66d025b301ebc903e80003ea",
          "672094f900e26303e800062a"
        ],
        "title": "speakerId"
      },
      "speakerModelKey": {
        "type": "string",
        "const": "speaker",
        "description": "The model key of the speaker",
        "title": "speakerModelKey"
      },
      "speakerVolume": {
        "type": "integer",
        "minimum": 0,
        "maximum": 100,
        "description": "Speaker volume: a number from 0-100.",
        "examples": [
          80
        ],
        "title": "speakerVolume"
      },
      "speakerMicVolume": {
        "type": "integer",
        "minimum": 0,
        "maximum": 100,
        "description": "Mic volume: a number from 0-100.",
        "examples": [
          80
        ],
        "title": "speakerMicVolume"
      },
      "speakerIsMicEnabled": {
        "type": "boolean",
        "description": "Whether or not the microphone on the speaker is enabled.",
        "examples": [
          true
        ],
        "title": "speakerIsMicEnabled"
      },
      "speakerState": {
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/speakerStateStatus"
          },
          "mode": {
            "$ref": "#/components/schemas/speakerStateMode"
          }
        },
        "required": [
          "status",
          "mode"
        ],
        "description": "Real-time state of Speaker",
        "title": "speakerState"
      },
      "speakerStateStatus": {
        "type": "string",
        "enum": [
          "idle",
          "streaming",
          "playing",
          "tts_playing",
          "uploading"
        ],
        "description": "Current status of the speaker",
        "examples": [
          "idle"
        ],
        "title": "speakerStateStatus"
      },
      "speakerStateMode": {
        "type": "string",
        "enum": [
          "listen",
          "talk"
        ],
        "description": "Current mode of the speaker",
        "examples": [
          "listen"
        ],
        "title": "speakerStateMode"
      },
      "speakerFeatureFlags": {
        "type": "object",
        "properties": {
          "hasMic": {
            "$ref": "#/components/schemas/speakerFeatureFlagsHasMic"
          }
        },
        "required": [
          "hasMic"
        ],
        "description": "Feature flags of the speaker",
        "title": "speakerFeatureFlags"
      },
      "speakerFeatureFlagsHasMic": {
        "type": "boolean",
        "description": "Whether the device has a microphone.",
        "examples": [
          true,
          false
        ],
        "title": "speakerFeatureFlagsHasMic"
      },
      "bridge": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/bridgeId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/bridgeModelKey"
          },
          "state": {
            "$ref": "#/components/schemas/deviceState"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/deviceType"
          },
          "guid": {
            "$ref": "#/components/schemas/deviceGuid"
          },
          "mac": {
            "$ref": "#/components/schemas/mac"
          },
          "platform": {
            "$ref": "#/components/schemas/bridgePlatform"
          },
          "clients": {
            "$ref": "#/components/schemas/bridgeClients"
          },
          "maxClients": {
            "$ref": "#/components/schemas/bridgeMaxClients"
          }
        },
        "required": [
          "id",
          "modelKey",
          "state",
          "name",
          "type",
          "guid",
          "mac",
          "platform",
          "clients",
          "maxClients"
        ],
        "title": "bridge"
      },
      "bridgeId": {
        "type": "string",
        "description": "The primary key of bridge",
        "examples": [
          "66d025b301ebc903e80003ea",
          "672094f900e26303e800062a"
        ],
        "title": "bridgeId"
      },
      "bridgeModelKey": {
        "type": "string",
        "const": "bridge",
        "description": "The model key of the bridge",
        "title": "bridgeModelKey"
      },
      "bridgePlatform": {
        "type": [
          "string",
          "null"
        ],
        "description": "The bridge platform",
        "examples": [
          "mt7621",
          "mt7622"
        ],
        "title": "bridgePlatform"
      },
      "bridgeClients": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Array of IoT devices mac that bridge is reserving for",
        "examples": [
          [
            "AABBCCDDEEFF",
            "112233445566"
          ],
          []
        ],
        "title": "bridgeClients"
      },
      "bridgeMaxClients": {
        "type": "number",
        "description": "The max acceptable client number of a V2 bridge. V1 bridge does not support this feature.",
        "examples": [
          7,
          0
        ],
        "title": "bridgeMaxClients"
      },
      "sensor": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/sensorId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/sensorModelKey"
          },
          "state": {
            "$ref": "#/components/schemas/deviceState"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/deviceType"
          },
          "guid": {
            "$ref": "#/components/schemas/deviceGuid"
          },
          "mac": {
            "$ref": "#/components/schemas/mac"
          },
          "mountType": {
            "$ref": "#/components/schemas/sensorMountType"
          },
          "batteryStatus": {
            "$ref": "#/components/schemas/batteryStatus"
          },
          "featureFlags": {
            "$ref": "#/components/schemas/sensorFeatureFlags"
          },
          "stats": {
            "$ref": "#/components/schemas/sensorStats"
          },
          "lightSettings": {
            "$ref": "#/components/schemas/lightSettings"
          },
          "humiditySettings": {
            "$ref": "#/components/schemas/humiditySettings"
          },
          "temperatureSettings": {
            "$ref": "#/components/schemas/temperatureSettings"
          },
          "isOpened": {
            "$ref": "#/components/schemas/sensorIsOpened"
          },
          "openStatusChangedAt": {
            "$ref": "#/components/schemas/sensorOpenStatusChangedAt"
          },
          "isMotionDetected": {
            "$ref": "#/components/schemas/sensorIsMotionDetected"
          },
          "motionDetectedAt": {
            "$ref": "#/components/schemas/sensorMotionDetectedAt"
          },
          "motionSettings": {
            "$ref": "#/components/schemas/motionSettings"
          },
          "glassBreakSettings": {
            "$ref": "#/components/schemas/glassBreakSettings"
          },
          "scheduleMode": {
            "$ref": "#/components/schemas/sensorScheduleMode"
          },
          "armProfileIds": {
            "$ref": "#/components/schemas/sensorArmProfileIds"
          },
          "hasCustomSensitivityWhenArmed": {
            "$ref": "#/components/schemas/sensorHasCustomSensitivityWhenArmed"
          },
          "alarmTriggeredAt": {
            "$ref": "#/components/schemas/sensorAlarmTriggeredAt"
          },
          "alarmSettings": {
            "$ref": "#/components/schemas/alarmSettings"
          },
          "leakDetectedAt": {
            "$ref": "#/components/schemas/sensorLeakDetectedAt"
          },
          "externalLeakDetectedAt": {
            "$ref": "#/components/schemas/sensorExternalLeakDetectedAt"
          },
          "leakSettings": {
            "$ref": "#/components/schemas/leakSettings"
          },
          "tamperingDetectedAt": {
            "$ref": "#/components/schemas/tamperingDetectedAt"
          },
          "wirelessConnectionState": {
            "$ref": "#/components/schemas/wirelessConnectionState"
          }
        },
        "required": [
          "id",
          "modelKey",
          "state",
          "name",
          "type",
          "guid",
          "mac",
          "mountType",
          "batteryStatus",
          "stats",
          "lightSettings",
          "humiditySettings",
          "temperatureSettings",
          "isOpened",
          "openStatusChangedAt",
          "isMotionDetected",
          "motionDetectedAt",
          "motionSettings",
          "glassBreakSettings",
          "scheduleMode",
          "armProfileIds",
          "hasCustomSensitivityWhenArmed",
          "alarmTriggeredAt",
          "alarmSettings",
          "leakDetectedAt",
          "externalLeakDetectedAt",
          "leakSettings",
          "tamperingDetectedAt",
          "wirelessConnectionState"
        ],
        "title": "sensor"
      },
      "sensorId": {
        "type": "string",
        "description": "The primary key of sensor",
        "examples": [
          "66d025b301ebc903e80003ea",
          "672094f900e26303e800062a"
        ],
        "title": "sensorId"
      },
      "sensorModelKey": {
        "type": "string",
        "const": "sensor",
        "description": "The model key of the sensor",
        "title": "sensorModelKey"
      },
      "sensorMountType": {
        "type": "string",
        "enum": [
          "door",
          "window",
          "garage",
          "leak",
          "none"
        ],
        "description": "Mounting type of the sensor.",
        "examples": [
          "door",
          "none"
        ],
        "title": "sensorMountType"
      },
      "batteryStatus": {
        "type": "object",
        "properties": {
          "percentage": {
            "type": [
              "number",
              "null"
            ],
            "description": "Battery charge level from 0 to 100 (%).",
            "examples": [
              95,
              50
            ]
          },
          "isLow": {
            "type": "boolean",
            "description": "Low battery charge level flag."
          }
        },
        "description": "[DEPRECATED] Use wirelessConnectionState.batteryStatus instead. Battery status.",
        "title": "batteryStatus"
      },
      "sensorFeatureFlags": {
        "type": "object",
        "properties": {
          "temperature": {
            "$ref": "#/components/schemas/sensorIntegrationFeatureCapability",
            "description": "Matches `stats.temperature` and `temperatureSettings`."
          },
          "humidity": {
            "$ref": "#/components/schemas/sensorIntegrationFeatureCapability",
            "description": "Matches `stats.humidity` and `humiditySettings`."
          },
          "light": {
            "$ref": "#/components/schemas/sensorIntegrationFeatureCapability",
            "description": "Matches `stats.light` and `lightSettings`."
          },
          "motion": {
            "$ref": "#/components/schemas/sensorIntegrationFeatureCapability",
            "description": "Matches motion state and `motionSettings`."
          },
          "waterLeak": {
            "$ref": "#/components/schemas/sensorIntegrationFeatureCapability",
            "description": "Matches leak state and `leakSettings`."
          },
          "open": {
            "$ref": "#/components/schemas/sensorIntegrationFeatureCapability",
            "description": "Matches entry/door-window/garage open state (`isOpened`)."
          },
          "tamper": {
            "$ref": "#/components/schemas/sensorIntegrationFeatureCapability",
            "description": "Matches tamper detection (`tamperingDetectedAt`)."
          },
          "smoke": {
            "$ref": "#/components/schemas/sensorIntegrationFeatureCapability",
            "description": "Matches smoke / CO alarm surfaces (`alarmSettings`, `alarmTriggeredAt`)."
          }
        },
        "description": "Sensor feature flags.",
        "title": "sensorFeatureFlags"
      },
      "sensorIntegrationFeatureCapability": {
        "type": "object",
        "properties": {
          "channelCount": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "description": "If a capability key is absent (`undefined`), the capability should be treated as not supported. When present, a positive value indicates how many independent channels of that measurement or input the sensor exposes. For example, two temperature probes would report as two channels.",
            "examples": [
              1,
              2
            ]
          }
        },
        "required": [
          "channelCount"
        ],
        "additionalProperties": false,
        "description": "Capability slice for integration responses: how many channels the device provides for one domain (see `channelCount`).",
        "title": "sensorIntegrationFeatureCapability"
      },
      "sensorStats": {
        "type": "object",
        "properties": {
          "light": {
            "type": "object",
            "properties": {
              "value": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/sensorValue"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "$ref": "#/components/schemas/sensorStatus"
              }
            },
            "description": "Ambient light value (Lux)."
          },
          "humidity": {
            "type": "object",
            "properties": {
              "value": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/sensorValue"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "$ref": "#/components/schemas/sensorStatus"
              }
            },
            "description": "Relative humidity value (%)."
          },
          "temperature": {
            "type": "object",
            "properties": {
              "value": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/sensorValue"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "$ref": "#/components/schemas/sensorStatus"
              }
            },
            "description": "Temperature value (Celsius)."
          }
        },
        "description": "Sensor statistics.",
        "title": "sensorStats"
      },
      "sensorValue": {
        "type": "number",
        "description": "Decimal value of the metric measured by the sensor",
        "examples": [
          22.5,
          65
        ],
        "title": "sensorValue"
      },
      "sensorStatus": {
        "type": "string",
        "enum": [
          "neutral",
          "low",
          "safe",
          "high",
          "unknown"
        ],
        "description": "What range does the measured metric fall into",
        "title": "sensorStatus",
        "examples": [
          "high"
        ]
      },
      "lightSettings": {
        "type": "object",
        "properties": {
          "isEnabled": {
            "type": "boolean",
            "description": "Enable ambient light sensor."
          },
          "margin": {
            "type": "number",
            "description": "Ambient light threshold detection hysteresis margin (Lux). Read-only value decided by sensor implementation.",
            "examples": [
              10
            ]
          },
          "lowThreshold": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 1,
            "maximum": 503192,
            "description": "Ambient light interrupt threshold low level from 1 to 503192 (Lux).",
            "examples": [
              20
            ]
          },
          "highThreshold": {
            "type": [
              "number",
              "null"
            ],
            "description": "Ambient light interrupt threshold high level from 1 to 503192 (Lux).",
            "examples": [
              100
            ]
          }
        },
        "description": "Ambient light sensor settings.",
        "title": "lightSettings"
      },
      "humiditySettings": {
        "type": "object",
        "properties": {
          "isEnabled": {
            "type": "boolean",
            "description": "Enable relative humidity sensor."
          },
          "margin": {
            "type": "number",
            "description": "Humidity threshold detection hysteresis margin (%). Read-only value decided by sensor implementation.",
            "examples": [
              1
            ]
          },
          "lowThreshold": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 1,
            "maximum": 99,
            "description": "Humidity low level threshold from 1 to 99 (%).",
            "examples": [
              30
            ]
          },
          "highThreshold": {
            "type": [
              "number",
              "null"
            ],
            "description": "Humidity high level threshold from 1 to 99 (%).",
            "examples": [
              80
            ]
          }
        },
        "description": "Relative humidity sensor settings.",
        "title": "humiditySettings"
      },
      "temperatureSettings": {
        "type": "object",
        "properties": {
          "isEnabled": {
            "type": "boolean",
            "description": "Enable temperature sensor."
          },
          "margin": {
            "type": "number",
            "description": "Temperature threshold detection hysteresis margin (C). Read-only value decided by sensor implementation.",
            "examples": [
              0.1
            ]
          },
          "lowThreshold": {
            "type": [
              "number",
              "null"
            ],
            "minimum": -39,
            "maximum": 124,
            "description": "Temperature low level threshold from -39 to 124 (C).",
            "examples": [
              20
            ]
          },
          "highThreshold": {
            "type": [
              "number",
              "null"
            ],
            "description": "Temperature high level threshold from -39 to 124 (C).",
            "examples": [
              25
            ]
          }
        },
        "description": "Temperature sensor settings.",
        "title": "temperatureSettings"
      },
      "sensorIsOpened": {
        "type": [
          "boolean",
          "null"
        ],
        "description": "Whether the door/window/garage is opened.",
        "title": "sensorIsOpened"
      },
      "sensorOpenStatusChangedAt": {
        "type": [
          "number",
          "null"
        ],
        "description": "Unix timestamp when the door/window/garage was last opened or closed, nullable.",
        "examples": [
          1445408038748
        ],
        "title": "sensorOpenStatusChangedAt"
      },
      "sensorIsMotionDetected": {
        "type": "boolean",
        "description": "Whether sensor is currently detecting the motion.",
        "title": "sensorIsMotionDetected"
      },
      "sensorMotionDetectedAt": {
        "type": [
          "number",
          "null"
        ],
        "description": "Unix timestamp when the last motion was detected.",
        "examples": [
          1445408038748
        ],
        "title": "sensorMotionDetectedAt"
      },
      "motionSettings": {
        "type": "object",
        "properties": {
          "isEnabled": {
            "type": "boolean",
            "description": "Enable motion sensor."
          },
          "sensitivity": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "description": "Motion sensitivity (0-100) used when system is not armed or when no armed override is set.",
            "examples": [
              50,
              100
            ]
          },
          "sensitivityWhenArmed": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "description": "Motion sensitivity (0-100) used when the system is armed and `hasCustomSensitivityWhenArmed` is true on the sensor.",
            "examples": [
              50
            ]
          }
        },
        "description": "Motion sensor settings.",
        "title": "motionSettings"
      },
      "glassBreakSettings": {
        "type": "object",
        "properties": {
          "isEnabled": {
            "type": "boolean",
            "description": "Enable glass break sensor."
          },
          "sensitivity": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "description": "Glass break sensitivity (0-100) used when system is not armed or when no armed override is set.",
            "examples": [
              25
            ]
          },
          "sensitivityWhenArmed": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "description": "Glass break sensitivity (0-100) used when the system is armed and `hasCustomSensitivityWhenArmed` is true on the sensor.",
            "examples": [
              50
            ]
          }
        },
        "description": "Glass break sensor settings.",
        "title": "glassBreakSettings"
      },
      "sensorScheduleMode": {
        "type": "string",
        "enum": [
          "always",
          "when_armed"
        ],
        "description": "When armed-mode detection runs: `always` or only `when_armed`. Applies to both glass break and motion together.",
        "title": "sensorScheduleMode"
      },
      "sensorArmProfileIds": {
        "type": [
          "array",
          "null"
        ],
        "items": {
          "type": "string",
          "maxLength": 64
        },
        "maxItems": 32,
        "description": "When `scheduleMode` is `when_armed`, restricts armed-mode detection to these arm profile ids. Empty or null = all profiles.",
        "title": "sensorArmProfileIds"
      },
      "sensorHasCustomSensitivityWhenArmed": {
        "type": "boolean",
        "description": "When true, glass break and motion both use their respective `sensitivityWhenArmed` value while the system is armed.",
        "title": "sensorHasCustomSensitivityWhenArmed"
      },
      "sensorAlarmTriggeredAt": {
        "type": [
          "number",
          "null"
        ],
        "description": "Unix timestamp when the smoke or carbon monoxide alarm was triggered, nullable.",
        "examples": [
          1445408038748
        ],
        "title": "sensorAlarmTriggeredAt"
      },
      "alarmSettings": {
        "type": "object",
        "properties": {
          "isEnabled": {
            "type": "boolean",
            "description": "Enable smoke and carbon monoxide alarm sensor."
          }
        },
        "description": "Smoke and carbon monoxide alarm sensor settings.",
        "title": "alarmSettings"
      },
      "sensorLeakDetectedAt": {
        "type": [
          "number",
          "null"
        ],
        "description": "Unix timestamp when the sensor detected a water leak, nullable.",
        "examples": [
          1445408038748
        ],
        "title": "sensorLeakDetectedAt"
      },
      "sensorExternalLeakDetectedAt": {
        "type": [
          "number",
          "null"
        ],
        "description": "Unix timestamp when the sensor detected an external water leak, nullable.",
        "examples": [
          1445408038748
        ],
        "title": "sensorExternalLeakDetectedAt"
      },
      "leakSettings": {
        "type": "object",
        "properties": {
          "isInternalEnabled": {
            "type": "boolean",
            "description": "Enable internal water leak detection."
          },
          "isExternalEnabled": {
            "type": "boolean",
            "description": "Enable external water leak detection."
          }
        },
        "description": "Leak sensor settings.",
        "title": "leakSettings"
      },
      "tamperingDetectedAt": {
        "type": [
          "number",
          "null"
        ],
        "description": "Unix timestamp when the sensor detected tampering, nullable.",
        "examples": [
          1445408038748
        ],
        "title": "tamperingDetectedAt"
      },
      "wirelessConnectionState": {
        "type": "object",
        "properties": {
          "signalState": {
            "$ref": "#/components/schemas/signalState"
          },
          "batteryStatus": {
            "$ref": "#/components/schemas/wirelessBatteryStatus"
          },
          "bridge": {
            "$ref": "#/components/schemas/wirelessBridgeId"
          }
        },
        "required": [
          "signalState",
          "batteryStatus",
          "bridge"
        ],
        "description": "Wireless connection state including signal quality, battery status, and bridge connection.",
        "title": "wirelessConnectionState"
      },
      "signalState": {
        "type": "object",
        "properties": {
          "signalQuality": {
            "$ref": "#/components/schemas/signalQuality"
          },
          "signalStrength": {
            "$ref": "#/components/schemas/signalStrength"
          }
        },
        "required": [
          "signalQuality",
          "signalStrength"
        ],
        "description": "Signal state.",
        "title": "signalState"
      },
      "signalQuality": {
        "type": [
          "number",
          "null"
        ],
        "description": "Percent representation of Bluetooth signal strength.",
        "examples": [
          85
        ],
        "title": "signalQuality"
      },
      "signalStrength": {
        "type": [
          "number",
          "null"
        ],
        "description": "dBm value of Bluetooth signal strength.",
        "examples": [
          -45
        ],
        "title": "signalStrength"
      },
      "wirelessBatteryStatus": {
        "type": "object",
        "properties": {
          "percentage": {
            "$ref": "#/components/schemas/wirelessBatteryPercentage"
          },
          "isLow": {
            "$ref": "#/components/schemas/wirelessBatteryIsLow"
          }
        },
        "required": [
          "percentage",
          "isLow"
        ],
        "description": "Battery status.",
        "title": "wirelessBatteryStatus"
      },
      "wirelessBatteryPercentage": {
        "type": [
          "number",
          "null"
        ],
        "description": "Battery charge level from 0 to 100 (%).",
        "examples": [
          95,
          50
        ],
        "title": "wirelessBatteryPercentage"
      },
      "wirelessBatteryIsLow": {
        "type": "boolean",
        "description": "Low battery charge level flag.",
        "title": "wirelessBatteryIsLow"
      },
      "wirelessBridgeId": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/bridgeId"
          },
          {
            "type": "null"
          }
        ],
        "description": "The ID of the bridge this device is connected through.",
        "title": "wirelessBridgeId"
      },
      "siren": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/sirenId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/sirenModelKey"
          },
          "state": {
            "$ref": "#/components/schemas/deviceState"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/deviceType"
          },
          "guid": {
            "$ref": "#/components/schemas/deviceGuid"
          },
          "mac": {
            "$ref": "#/components/schemas/mac"
          },
          "volume": {
            "$ref": "#/components/schemas/sirenVolume"
          },
          "ledSettings": {
            "$ref": "#/components/schemas/sirenLedSettingsExternal"
          },
          "sirenStatus": {
            "$ref": "#/components/schemas/sirenStatus"
          },
          "connectionType": {
            "$ref": "#/components/schemas/sirenConnectionType"
          },
          "wirelessConnectionState": {
            "$ref": "#/components/schemas/wirelessConnectionState"
          }
        },
        "required": [
          "id",
          "modelKey",
          "state",
          "name",
          "type",
          "guid",
          "mac",
          "volume",
          "ledSettings",
          "sirenStatus",
          "connectionType",
          "wirelessConnectionState"
        ],
        "title": "siren"
      },
      "sirenId": {
        "type": "string",
        "description": "The primary key of siren",
        "examples": [
          "66d025b301ebc903e80003ea",
          "672094f900e26303e800062a"
        ],
        "title": "sirenId"
      },
      "sirenModelKey": {
        "type": "string",
        "const": "siren",
        "description": "The model key of the siren",
        "title": "sirenModelKey"
      },
      "sirenVolume": {
        "type": "integer",
        "minimum": 1,
        "maximum": 100,
        "description": "Volume: a number from 1-100.",
        "examples": [
          80,
          50
        ],
        "title": "sirenVolume"
      },
      "sirenLedSettingsExternal": {
        "type": "object",
        "properties": {
          "isEnabled": {
            "$ref": "#/components/schemas/sirenLedIsEnabled"
          }
        },
        "required": [
          "isEnabled"
        ],
        "description": "Status LED settings.",
        "title": "sirenLedSettingsExternal"
      },
      "sirenLedIsEnabled": {
        "type": "boolean",
        "description": "Enable status LED.",
        "examples": [
          true
        ],
        "title": "sirenLedIsEnabled"
      },
      "sirenStatus": {
        "type": "object",
        "properties": {
          "isActive": {
            "$ref": "#/components/schemas/sirenStatusIsActive"
          },
          "activatedAt": {
            "$ref": "#/components/schemas/sirenStatusActivatedAt"
          },
          "duration": {
            "$ref": "#/components/schemas/sirenStatusDuration"
          }
        },
        "required": [
          "isActive",
          "activatedAt",
          "duration"
        ],
        "description": "Status of the siren",
        "title": "sirenStatus"
      },
      "sirenStatusIsActive": {
        "type": "boolean",
        "description": "Whether the siren is active.",
        "examples": [
          true,
          false
        ],
        "title": "sirenStatusIsActive"
      },
      "sirenStatusActivatedAt": {
        "type": [
          "number",
          "null"
        ],
        "description": "Timestamp when the siren was activated.",
        "examples": [
          1445408038748
        ],
        "title": "sirenStatusActivatedAt"
      },
      "sirenStatusDuration": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/sirenDuration"
          },
          {
            "type": "null"
          }
        ],
        "title": "sirenStatusDuration"
      },
      "sirenDuration": {
        "anyOf": [
          {
            "type": "number",
            "const": 5000
          },
          {
            "type": "number",
            "const": 10000
          },
          {
            "type": "number",
            "const": 20000
          },
          {
            "type": "number",
            "const": 30000
          }
        ],
        "description": "Duration of the siren activation in milliseconds.",
        "examples": [
          5000,
          10000,
          20000,
          30000
        ],
        "title": "sirenDuration"
      },
      "sirenConnectionType": {
        "type": "string",
        "enum": [
          "ucp4",
          "lora"
        ],
        "description": "The connection type of the siren.",
        "examples": [
          "lora",
          "ucp4"
        ],
        "title": "sirenConnectionType"
      },
      "fob": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/fobId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/fobModelKey"
          },
          "state": {
            "$ref": "#/components/schemas/deviceState"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/deviceType"
          },
          "guid": {
            "$ref": "#/components/schemas/deviceGuid"
          },
          "mac": {
            "$ref": "#/components/schemas/mac"
          },
          "awayState": {
            "$ref": "#/components/schemas/fobAwayState"
          },
          "buttonLabels": {
            "$ref": "#/components/schemas/fobButtonLabels"
          },
          "featureFlags": {
            "$ref": "#/components/schemas/fobFeatureFlags"
          },
          "wirelessConnectionState": {
            "$ref": "#/components/schemas/wirelessConnectionState"
          }
        },
        "required": [
          "id",
          "modelKey",
          "state",
          "name",
          "type",
          "guid",
          "mac",
          "awayState",
          "buttonLabels",
          "featureFlags",
          "wirelessConnectionState"
        ],
        "title": "fob"
      },
      "fobId": {
        "type": "string",
        "description": "The primary key of fob",
        "examples": [
          "66d025b301ebc903e80003ea",
          "672094f900e26303e800062a"
        ],
        "title": "fobId"
      },
      "fobModelKey": {
        "type": "string",
        "const": "fob",
        "description": "The model key of the fob",
        "title": "fobModelKey"
      },
      "fobAwayState": {
        "type": "string",
        "enum": [
          "ONLINE",
          "RECENTLY_SEEN",
          "NO_RECENT_HEARTBEAT",
          "DEVICE_LOST"
        ],
        "description": "Fob presence/away state.",
        "examples": [
          "ONLINE",
          "DEVICE_LOST"
        ],
        "title": "fobAwayState"
      },
      "fobButtonLabels": {
        "type": "string",
        "enum": [
          "securityActions",
          "positionHint"
        ],
        "description": "Label style applied when this fob is rendered in button selection lists.",
        "examples": [
          "securityActions"
        ],
        "title": "fobButtonLabels"
      },
      "fobFeatureFlags": {
        "type": "object",
        "properties": {
          "buttons": {
            "$ref": "#/components/schemas/fobButtons"
          }
        },
        "required": [
          "buttons"
        ],
        "description": "Feature flags for the fob.",
        "examples": [
          {
            "buttons": [
              "arm",
              "disarm",
              "panic"
            ]
          }
        ],
        "title": "fobFeatureFlags"
      },
      "fobButtons": {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "function",
            "alarmHubButton",
            "arm",
            "disarm",
            "night",
            "panic",
            "left",
            "right",
            "input1",
            "input2",
            "main"
          ]
        },
        "description": "Available button types on the fob.",
        "examples": [
          [
            "arm",
            "disarm",
            "panic"
          ]
        ],
        "title": "fobButtons"
      },
      "relay": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/relayId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/relayModelKey"
          },
          "state": {
            "$ref": "#/components/schemas/deviceState"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/deviceType"
          },
          "guid": {
            "$ref": "#/components/schemas/deviceGuid"
          },
          "mac": {
            "$ref": "#/components/schemas/mac"
          },
          "ledSettings": {
            "$ref": "#/components/schemas/relayLedSettings"
          },
          "outputs": {
            "$ref": "#/components/schemas/relayOutputs"
          },
          "inputs": {
            "$ref": "#/components/schemas/relayInputs"
          },
          "wirelessConnectionState": {
            "$ref": "#/components/schemas/wirelessConnectionState"
          }
        },
        "required": [
          "id",
          "modelKey",
          "state",
          "name",
          "type",
          "guid",
          "mac",
          "ledSettings",
          "outputs",
          "inputs",
          "wirelessConnectionState"
        ],
        "title": "relay"
      },
      "relayId": {
        "type": "string",
        "description": "The primary key of relay",
        "examples": [
          "66d025b301ebc903e80003ea",
          "672094f900e26303e800062a"
        ],
        "title": "relayId"
      },
      "relayModelKey": {
        "type": "string",
        "const": "relay",
        "description": "The model key of the relay",
        "title": "relayModelKey"
      },
      "relayLedSettings": {
        "type": "object",
        "properties": {
          "isEnabled": {
            "$ref": "#/components/schemas/relayLedIsEnabled"
          }
        },
        "required": [
          "isEnabled"
        ],
        "description": "Status LED settings.",
        "title": "relayLedSettings"
      },
      "relayLedIsEnabled": {
        "type": "boolean",
        "description": "Enable status LED.",
        "examples": [
          true
        ],
        "title": "relayLedIsEnabled"
      },
      "relayOutputs": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/relayOutput"
        },
        "title": "relayOutputs"
      },
      "relayOutput": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/relayOutputId"
          },
          "name": {
            "$ref": "#/components/schemas/relayOutputName"
          },
          "type": {
            "$ref": "#/components/schemas/relayOutputType"
          },
          "delay": {
            "$ref": "#/components/schemas/relayOutputDelay"
          },
          "pulseDuration": {
            "$ref": "#/components/schemas/relayOutputPulseDuration"
          },
          "state": {
            "$ref": "#/components/schemas/relayOutputState"
          },
          "rebootState": {
            "$ref": "#/components/schemas/relayOutputRebootState"
          }
        },
        "required": [
          "id",
          "name",
          "type",
          "delay",
          "pulseDuration",
          "state",
          "rebootState"
        ],
        "description": "Relay output channels.",
        "title": "relayOutput"
      },
      "relayOutputId": {
        "type": "number",
        "description": "The channel index of the relay output.",
        "examples": [
          0
        ],
        "title": "relayOutputId"
      },
      "relayOutputName": {
        "type": [
          "string",
          "null"
        ],
        "description": "User-friendly name for this relay output.",
        "examples": [
          "Garage Door"
        ],
        "title": "relayOutputName"
      },
      "relayOutputType": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "garageDoor",
          "gate",
          "valve",
          "siren",
          "custom"
        ],
        "description": "The type of device connected to this relay output.",
        "examples": [
          "garageDoor"
        ],
        "title": "relayOutputType"
      },
      "relayOutputDelay": {
        "type": [
          "number",
          "null"
        ],
        "description": "Server-side delay in milliseconds before activation (0 = no delay, null = use default).",
        "examples": [
          0
        ],
        "title": "relayOutputDelay"
      },
      "relayOutputPulseDuration": {
        "type": [
          "number",
          "null"
        ],
        "description": "Auto-off duration in milliseconds (0 = permanent on until manually turned off, null = use default).",
        "examples": [
          1000
        ],
        "title": "relayOutputPulseDuration"
      },
      "relayOutputState": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "on",
          "off",
          "offOtp"
        ],
        "description": "The current state of the relay output.",
        "examples": [
          "off"
        ],
        "title": "relayOutputState"
      },
      "relayOutputRebootState": {
        "type": "string",
        "enum": [
          "restore",
          "on",
          "off"
        ],
        "description": "The state the relay output should be set to after a reboot/power cycle.",
        "examples": [
          "off"
        ],
        "title": "relayOutputRebootState"
      },
      "relayInputs": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/relayInput"
        },
        "title": "relayInputs"
      },
      "relayInput": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/relayInputId"
          },
          "name": {
            "$ref": "#/components/schemas/relayInputName"
          },
          "state": {
            "$ref": "#/components/schemas/relayInputState"
          },
          "actionTrigger": {
            "$ref": "#/components/schemas/relayInputActionTrigger"
          },
          "actionType": {
            "$ref": "#/components/schemas/relayInputActionType"
          },
          "actionOutputId": {
            "$ref": "#/components/schemas/relayInputActionOutputId"
          }
        },
        "required": [
          "id",
          "name",
          "state",
          "actionTrigger",
          "actionType",
          "actionOutputId"
        ],
        "description": "Relay input channels.",
        "title": "relayInput"
      },
      "relayInputId": {
        "type": "number",
        "description": "The channel index of the relay input.",
        "examples": [
          0
        ],
        "title": "relayInputId"
      },
      "relayInputName": {
        "type": [
          "string",
          "null"
        ],
        "description": "User-friendly name for this relay input.",
        "examples": [
          "Door Sensor"
        ],
        "title": "relayInputName"
      },
      "relayInputState": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "on",
          "off"
        ],
        "description": "The current state of the relay input.",
        "examples": [
          "off"
        ],
        "title": "relayInputState"
      },
      "relayInputActionTrigger": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "switchedOn",
          "switchedOff"
        ],
        "description": "The trigger event that activates the action.",
        "examples": [
          "switchedOn"
        ],
        "title": "relayInputActionTrigger"
      },
      "relayInputActionType": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "setOutputOn",
          "setOutputOff",
          "toggleOutput",
          "followInput"
        ],
        "description": "The type of action to perform when triggered.",
        "examples": [
          "toggleOutput"
        ],
        "title": "relayInputActionType"
      },
      "relayInputActionOutputId": {
        "type": [
          "number",
          "null"
        ],
        "description": "The index of the output to control when triggered.",
        "examples": [
          0
        ],
        "title": "relayInputActionOutputId"
      },
      "aiProcessor": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/deviceId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/aiprocessorModelKey"
          },
          "state": {
            "$ref": "#/components/schemas/deviceState"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/deviceType"
          },
          "guid": {
            "$ref": "#/components/schemas/deviceGuid"
          },
          "mac": {
            "$ref": "#/components/schemas/mac"
          }
        },
        "required": [
          "id",
          "modelKey",
          "state",
          "name",
          "type",
          "guid",
          "mac"
        ],
        "title": "aiProcessor"
      },
      "deviceId": {
        "type": "string",
        "description": "The primary key of device",
        "examples": [
          "66d025b301ebc903e80003ea",
          "672094f900e26303e800062a"
        ],
        "title": "deviceId"
      },
      "aiprocessorModelKey": {
        "type": "string",
        "const": "aiprocessor",
        "description": "The model key of the aiprocessor",
        "title": "aiprocessorModelKey"
      },
      "aiPort": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/deviceId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/aiportModelKey"
          },
          "state": {
            "$ref": "#/components/schemas/deviceState"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/deviceType"
          },
          "guid": {
            "$ref": "#/components/schemas/deviceGuid"
          },
          "mac": {
            "$ref": "#/components/schemas/mac"
          }
        },
        "required": [
          "id",
          "modelKey",
          "state",
          "name",
          "type",
          "guid",
          "mac"
        ],
        "title": "aiPort"
      },
      "aiportModelKey": {
        "type": "string",
        "const": "aiport",
        "description": "The model key of the aiport",
        "title": "aiportModelKey"
      },
      "linkStation": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/linkStationId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/linkstationModelKey"
          },
          "state": {
            "$ref": "#/components/schemas/deviceState"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/deviceType"
          },
          "guid": {
            "$ref": "#/components/schemas/deviceGuid"
          },
          "mac": {
            "$ref": "#/components/schemas/mac"
          },
          "isAlarmHub": {
            "$ref": "#/components/schemas/linkStationIsAlarmHub"
          },
          "ledSettings": {
            "$ref": "#/components/schemas/linkStationLedSettings"
          },
          "lastEvent": {
            "$ref": "#/components/schemas/linkStationLastEvent"
          },
          "alarmHub": {
            "$ref": "#/components/schemas/alarmHubStatus"
          }
        },
        "required": [
          "id",
          "modelKey",
          "state",
          "name",
          "type",
          "guid",
          "mac",
          "isAlarmHub",
          "ledSettings",
          "lastEvent"
        ],
        "title": "linkStation"
      },
      "linkStationId": {
        "type": "string",
        "description": "The primary key of linkStation",
        "examples": [
          "66d025b301ebc903e80003ea",
          "672094f900e26303e800062a"
        ],
        "title": "linkStationId"
      },
      "linkstationModelKey": {
        "type": "string",
        "const": "linkstation",
        "description": "The model key of the linkstation",
        "title": "linkstationModelKey"
      },
      "linkStationIsAlarmHub": {
        "type": "boolean",
        "description": "Whether the linkstation is an alarm hub.",
        "title": "linkStationIsAlarmHub"
      },
      "linkStationLedSettings": {
        "type": "object",
        "properties": {
          "isEnabled": {
            "$ref": "#/components/schemas/linkStationLedIsEnabled"
          }
        },
        "required": [
          "isEnabled"
        ],
        "description": "Status LED settings.",
        "title": "linkStationLedSettings"
      },
      "linkStationLedIsEnabled": {
        "type": "boolean",
        "description": "Whether the status LED is enabled.",
        "title": "linkStationLedIsEnabled"
      },
      "linkStationLastEvent": {
        "type": [
          "number",
          "null"
        ],
        "description": "Timestamp when any last event was detected.",
        "examples": [
          1445408038748
        ],
        "title": "linkStationLastEvent"
      },
      "alarmHubStatus": {
        "type": "object",
        "properties": {
          "armed": {
            "type": "string",
            "enum": [
              "on",
              "off"
            ]
          },
          "battery": {
            "type": "object",
            "properties": {
              "charging": {
                "type": "string",
                "enum": [
                  "on",
                  "off"
                ]
              },
              "connection": {
                "type": "string",
                "enum": [
                  "connected",
                  "disconnected"
                ]
              },
              "voltage": {
                "type": "number"
              },
              "batteryStatus": {
                "type": "string",
                "enum": [
                  "ok",
                  "low",
                  "critical"
                ]
              }
            }
          },
          "buckboost": {
            "type": "string",
            "enum": [
              "on",
              "off"
            ]
          },
          "connector": {
            "type": "object",
            "properties": {
              "emergency": {
                "type": "object",
                "properties": {
                  "+": {
                    "type": "string",
                    "enum": [
                      "connected",
                      "disconnected"
                    ]
                  },
                  "-": {
                    "type": "string",
                    "enum": [
                      "connected",
                      "disconnected"
                    ]
                  }
                },
                "required": [
                  "+",
                  "-"
                ]
              },
              "12v": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "+": {
                      "type": "string",
                      "enum": [
                        "connected",
                        "disconnected"
                      ]
                    },
                    "-": {
                      "type": "string",
                      "enum": [
                        "connected",
                        "disconnected"
                      ]
                    }
                  },
                  "required": [
                    "+",
                    "-"
                  ]
                }
              },
              "relay": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "com": {
                      "type": "string",
                      "enum": [
                        "connected",
                        "disconnected"
                      ]
                    },
                    "nc": {
                      "type": "string",
                      "enum": [
                        "connected",
                        "disconnected"
                      ]
                    },
                    "no": {
                      "type": "string",
                      "enum": [
                        "connected",
                        "disconnected"
                      ]
                    }
                  },
                  "required": [
                    "com",
                    "nc",
                    "no"
                  ]
                }
              },
              "tb": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "+": {
                      "type": "string",
                      "enum": [
                        "connected",
                        "disconnected"
                      ]
                    },
                    "-": {
                      "type": "string",
                      "enum": [
                        "connected",
                        "disconnected"
                      ]
                    }
                  },
                  "required": [
                    "+",
                    "-"
                  ]
                }
              },
              "battery": {
                "type": "string",
                "enum": [
                  "connected",
                  "disconnected"
                ]
              },
              "poeout": {
                "type": "string",
                "enum": [
                  "connected",
                  "disconnected"
                ]
              }
            }
          },
          "cover": {
            "type": "object",
            "properties": {
              "distance": {
                "type": "integer"
              },
              "status": {
                "type": "string",
                "enum": [
                  "open",
                  "close"
                ]
              }
            }
          },
          "currentMeterChannelStatus": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "criticalAlarm": {
                  "type": "string",
                  "enum": [
                    "normal",
                    "alert"
                  ]
                },
                "criticalThreshold": {
                  "type": "number"
                },
                "value": {
                  "type": "number"
                },
                "warningAlarm": {
                  "type": "string",
                  "enum": [
                    "normal",
                    "alert"
                  ]
                },
                "warningThreshold": {
                  "type": "number"
                }
              },
              "required": [
                "criticalAlarm",
                "criticalThreshold",
                "value",
                "warningAlarm",
                "warningThreshold"
              ]
            }
          },
          "currentMeterStatus": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "critical": {
                  "type": "string",
                  "enum": [
                    "normal",
                    "alert"
                  ]
                },
                "efuse": {
                  "type": "string",
                  "enum": [
                    "normal",
                    "warning",
                    "fault"
                  ]
                },
                "enable": {
                  "type": "string",
                  "enum": [
                    "on",
                    "off"
                  ]
                },
                "powerValid": {
                  "type": "string",
                  "enum": [
                    "normal",
                    "alert"
                  ]
                },
                "timingControl": {
                  "type": "string",
                  "enum": [
                    "normal",
                    "alert"
                  ]
                },
                "warning": {
                  "type": "string",
                  "enum": [
                    "normal",
                    "alert"
                  ]
                }
              },
              "required": [
                "critical",
                "efuse",
                "enable",
                "powerValid",
                "timingControl",
                "warning"
              ]
            }
          },
          "inputPower": {
            "type": "object",
            "properties": {
              "bt": {
                "type": "string",
                "enum": [
                  "low",
                  "high"
                ]
              },
              "typ1": {
                "type": "string",
                "enum": [
                  "low",
                  "high"
                ]
              },
              "typ2": {
                "type": "string",
                "enum": [
                  "low",
                  "high"
                ]
              }
            }
          },
          "poeout": {
            "type": "object",
            "properties": {
              "connection": {
                "type": "string",
                "enum": [
                  "connected",
                  "disconnected"
                ]
              },
              "powerSupply": {
                "type": "string",
                "enum": [
                  "on",
                  "off"
                ]
              }
            }
          },
          "powerMeter": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "alarm": {
                  "type": "string",
                  "enum": [
                    "normal",
                    "alert"
                  ]
                },
                "current": {
                  "type": "number"
                },
                "efuse": {
                  "type": "string",
                  "enum": [
                    "normal",
                    "warning",
                    "fault"
                  ]
                },
                "enable": {
                  "type": "string",
                  "enum": [
                    "on",
                    "off"
                  ]
                },
                "power": {
                  "type": "number"
                },
                "powerThreshold": {
                  "type": "number"
                },
                "voltage": {
                  "type": "number"
                }
              },
              "required": [
                "alarm",
                "current",
                "efuse",
                "enable",
                "power",
                "powerThreshold",
                "voltage"
              ]
            }
          },
          "output": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "enable": {
                  "type": "string",
                  "enum": [
                    "on",
                    "off"
                  ]
                },
                "active": {
                  "type": "string",
                  "enum": [
                    "on",
                    "off"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "wet",
                    "dry"
                  ]
                },
                "delay": {
                  "type": "integer"
                },
                "duration": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "enable",
                "active",
                "status"
              ]
            }
          },
          "input": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "enable": {
                  "type": "string",
                  "enum": [
                    "on",
                    "off"
                  ]
                },
                "type": {
                  "anyOf": [
                    {
                      "type": "string",
                      "const": "no"
                    },
                    {
                      "type": "string",
                      "const": "nc"
                    }
                  ]
                },
                "eolr": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 2
                },
                "resistor": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 10
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "normal",
                    "alarm",
                    "fault",
                    "short",
                    "cut"
                  ]
                },
                "trigger": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "inputType": {
                  "type": "string",
                  "enum": [
                    "MOTION",
                    "ENTRY",
                    "SMOKE",
                    "GLASS_BREAK",
                    "EMERGENCY_BUTTON"
                  ]
                },
                "allowedArmingProfiles": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "triggerWhenDisarmed": {
                  "type": "string",
                  "enum": [
                    "on",
                    "off"
                  ]
                },
                "triggerOnCurrentArmingProfile": {
                  "type": "string",
                  "enum": [
                    "on",
                    "off"
                  ]
                },
                "lastTriggeredAt": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "cameraId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "powerReset": {
                  "type": "boolean"
                }
              },
              "required": [
                "enable",
                "type",
                "eolr",
                "resistor",
                "status",
                "trigger"
              ]
            }
          },
          "inputTerminalStatus": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "plusPinStatus": {
                  "type": "string",
                  "enum": [
                    "disabled",
                    "idle",
                    "not-connected",
                    "tamper",
                    "triggered",
                    "cut",
                    "short"
                  ]
                },
                "minusPinStatus": {
                  "type": "string",
                  "enum": [
                    "disabled",
                    "idle",
                    "not-connected",
                    "tamper",
                    "triggered",
                    "cut",
                    "short"
                  ]
                },
                "terminalStatus": {
                  "type": "string",
                  "enum": [
                    "disabled",
                    "idle",
                    "not-connected",
                    "tamper",
                    "triggered",
                    "cut",
                    "short",
                    "partially-connected"
                  ]
                },
                "idleSubState": {
                  "type": "string",
                  "enum": [
                    "open",
                    "closed"
                  ]
                }
              },
              "required": [
                "plusPinStatus",
                "minusPinStatus",
                "terminalStatus"
              ]
            }
          },
          "outputTerminalStatus": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "pins": {
                  "type": "object",
                  "properties": {
                    "no": {
                      "type": "string",
                      "enum": [
                        "disabled",
                        "idle",
                        "not-connected",
                        "tamper",
                        "triggered",
                        "cut",
                        "short"
                      ]
                    },
                    "com": {
                      "type": "string",
                      "enum": [
                        "disabled",
                        "idle",
                        "not-connected",
                        "tamper",
                        "triggered",
                        "cut",
                        "short"
                      ]
                    },
                    "nc": {
                      "type": "string",
                      "enum": [
                        "disabled",
                        "idle",
                        "not-connected",
                        "tamper",
                        "triggered",
                        "cut",
                        "short"
                      ]
                    }
                  },
                  "required": [
                    "no",
                    "com",
                    "nc"
                  ]
                },
                "statusLabel": {
                  "type": "string",
                  "enum": [
                    "disabled",
                    "off",
                    "active"
                  ]
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "dry-contact",
                    "powered-12v"
                  ]
                },
                "efuseAlert": {
                  "type": "string",
                  "enum": [
                    "none",
                    "high-current",
                    "over-current"
                  ]
                },
                "wiredPins": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "+",
                      "-",
                      "nc",
                      "no",
                      "com"
                    ]
                  }
                }
              },
              "required": [
                "pins",
                "statusLabel",
                "mode",
                "efuseAlert",
                "wiredPins"
              ]
            }
          },
          "emergencyTerminalStatus": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "plusPinStatus": {
                "type": "string",
                "enum": [
                  "disabled",
                  "idle",
                  "not-connected",
                  "tamper",
                  "triggered",
                  "cut",
                  "short"
                ]
              },
              "minusPinStatus": {
                "type": "string",
                "enum": [
                  "disabled",
                  "idle",
                  "not-connected",
                  "tamper",
                  "triggered",
                  "cut",
                  "short"
                ]
              },
              "terminalStatus": {
                "type": "string",
                "enum": [
                  "disabled",
                  "idle",
                  "not-connected",
                  "tamper",
                  "triggered",
                  "cut",
                  "short",
                  "partially-connected"
                ]
              },
              "idleSubState": {
                "type": "string",
                "enum": [
                  "open",
                  "closed"
                ]
              }
            },
            "required": [
              "plusPinStatus",
              "minusPinStatus",
              "terminalStatus"
            ]
          },
          "auxiliaryPowerTerminalStatus": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "plusPinStatus": {
                  "type": "string",
                  "enum": [
                    "disabled",
                    "idle",
                    "not-connected",
                    "tamper",
                    "triggered",
                    "cut",
                    "short"
                  ]
                },
                "minusPinStatus": {
                  "type": "string",
                  "enum": [
                    "disabled",
                    "idle",
                    "not-connected",
                    "tamper",
                    "triggered",
                    "cut",
                    "short"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "not-connected",
                    "partially-connected",
                    "connected"
                  ]
                },
                "currentMa": {
                  "type": "number"
                },
                "loadPercent": {
                  "type": "number"
                }
              },
              "required": [
                "plusPinStatus",
                "minusPinStatus",
                "status"
              ]
            }
          }
        },
        "required": [
          "armed",
          "buckboost",
          "currentMeterChannelStatus",
          "currentMeterStatus",
          "powerMeter",
          "output",
          "input"
        ],
        "description": "Alarm hub status and configuration. Only present when isAlarmHub is true.",
        "title": "alarmHubStatus"
      },
      "deviceUpdate": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "update"
          },
          "item": {
            "$ref": "#/components/schemas/devicePartialWithReference"
          }
        },
        "required": [
          "type",
          "item"
        ],
        "title": "deviceUpdate"
      },
      "devicePartialWithReference": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/nvrPartialWithReference"
          },
          {
            "$ref": "#/components/schemas/cameraPartialWithReference"
          },
          {
            "$ref": "#/components/schemas/chimePartialWithReference"
          },
          {
            "$ref": "#/components/schemas/lightPartialWithReference"
          },
          {
            "$ref": "#/components/schemas/viewerPartialWithReference"
          },
          {
            "$ref": "#/components/schemas/speakerPartialWithReference"
          },
          {
            "$ref": "#/components/schemas/bridgePartialWithReference"
          },
          {
            "$ref": "#/components/schemas/sensorPartialWithReference"
          },
          {
            "$ref": "#/components/schemas/sirenPartialWithReference"
          },
          {
            "$ref": "#/components/schemas/fobPartialWithReference"
          },
          {
            "$ref": "#/components/schemas/relayPartialWithReference"
          },
          {
            "$ref": "#/components/schemas/aiProcessorPartialWithReference"
          },
          {
            "$ref": "#/components/schemas/aiPortPartialWithReference"
          },
          {
            "$ref": "#/components/schemas/linkStationPartialWithReference"
          }
        ],
        "discriminator": {
          "propertyName": "modelKey",
          "mapping": {
            "nvr": "#/components/schemas/nvrPartialWithReference",
            "camera": "#/components/schemas/cameraPartialWithReference",
            "chime": "#/components/schemas/chimePartialWithReference",
            "light": "#/components/schemas/lightPartialWithReference",
            "viewer": "#/components/schemas/viewerPartialWithReference",
            "speaker": "#/components/schemas/speakerPartialWithReference",
            "bridge": "#/components/schemas/bridgePartialWithReference",
            "sensor": "#/components/schemas/sensorPartialWithReference",
            "siren": "#/components/schemas/sirenPartialWithReference",
            "fob": "#/components/schemas/fobPartialWithReference",
            "relay": "#/components/schemas/relayPartialWithReference",
            "aiprocessor": "#/components/schemas/aiProcessorPartialWithReference",
            "aiport": "#/components/schemas/aiPortPartialWithReference",
            "linkstation": "#/components/schemas/linkStationPartialWithReference"
          }
        }
      },
      "nvrPartialWithReference": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/nvrId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/nvrModelKey"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/nvrType"
          },
          "guid": {
            "$ref": "#/components/schemas/nvrGuid"
          },
          "mac": {
            "$ref": "#/components/schemas/mac"
          },
          "doorbellSettings": {
            "$ref": "#/components/schemas/doorbellSettings"
          },
          "armMode": {
            "$ref": "#/components/schemas/nvrArmMode"
          }
        },
        "required": [
          "id",
          "modelKey"
        ],
        "title": "nvrPartialWithReference"
      },
      "cameraPartialWithReference": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/cameraId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/cameraModelKey"
          },
          "state": {
            "$ref": "#/components/schemas/deviceState"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/deviceType"
          },
          "guid": {
            "$ref": "#/components/schemas/deviceGuid"
          },
          "mac": {
            "$ref": "#/components/schemas/mac"
          },
          "isMicEnabled": {
            "$ref": "#/components/schemas/isMicEnabled"
          },
          "osdSettings": {
            "$ref": "#/components/schemas/osdSettings"
          },
          "ledSettings": {
            "$ref": "#/components/schemas/ledSettings"
          },
          "lcdMessage": {
            "$ref": "#/components/schemas/lcdMessageUnion"
          },
          "micVolume": {
            "$ref": "#/components/schemas/micVolume"
          },
          "activePatrolSlot": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/activePatrolSlot"
              },
              {
                "type": "null"
              }
            ]
          },
          "videoMode": {
            "$ref": "#/components/schemas/videoMode"
          },
          "hdrType": {
            "$ref": "#/components/schemas/hdrType"
          },
          "featureFlags": {
            "$ref": "#/components/schemas/cameraFeatureFlags"
          },
          "smartDetectSettings": {
            "$ref": "#/components/schemas/smartDetectSettings"
          },
          "hasPackageCamera": {
            "$ref": "#/components/schemas/hasPackageCamera"
          }
        },
        "required": [
          "id",
          "modelKey"
        ],
        "title": "cameraPartialWithReference"
      },
      "chimePartialWithReference": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/chimeId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/chimeModelKey"
          },
          "state": {
            "$ref": "#/components/schemas/deviceState"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/deviceType"
          },
          "guid": {
            "$ref": "#/components/schemas/deviceGuid"
          },
          "mac": {
            "$ref": "#/components/schemas/mac"
          },
          "cameraIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/cameraId"
            },
            "description": "The list of (doorbell-only) cameras which this chime is paired to."
          },
          "ringSettings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ringSettings"
            },
            "description": "List of custom ringtone settings for (doorbell-only) cameras paired to this chime."
          }
        },
        "required": [
          "id",
          "modelKey"
        ],
        "title": "chimePartialWithReference"
      },
      "lightPartialWithReference": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/lightId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/lightModelKey"
          },
          "state": {
            "$ref": "#/components/schemas/deviceState"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/deviceType"
          },
          "guid": {
            "$ref": "#/components/schemas/deviceGuid"
          },
          "mac": {
            "$ref": "#/components/schemas/mac"
          },
          "lightModeSettings": {
            "$ref": "#/components/schemas/lightModeSettings"
          },
          "lightDeviceSettings": {
            "$ref": "#/components/schemas/lightDeviceSettings"
          },
          "isDark": {
            "$ref": "#/components/schemas/isDark"
          },
          "isLightOn": {
            "$ref": "#/components/schemas/isLightOn"
          },
          "isLightForceEnabled": {
            "$ref": "#/components/schemas/isLightForceEnabled"
          },
          "lastMotion": {
            "$ref": "#/components/schemas/lastMotion"
          },
          "isPirMotionDetected": {
            "$ref": "#/components/schemas/isPirMotionDetected"
          },
          "camera": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/cameraId"
              },
              {
                "type": "null"
              }
            ],
            "description": "Which camera is configured to be paired to this light."
          }
        },
        "required": [
          "id",
          "modelKey"
        ],
        "title": "lightPartialWithReference"
      },
      "viewerPartialWithReference": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/viewerId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/viewerModelKey"
          },
          "state": {
            "$ref": "#/components/schemas/deviceState"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/deviceType"
          },
          "guid": {
            "$ref": "#/components/schemas/deviceGuid"
          },
          "mac": {
            "$ref": "#/components/schemas/mac"
          },
          "liveview": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/liveviewId"
              },
              {
                "type": "null"
              }
            ]
          },
          "streamLimit": {
            "$ref": "#/components/schemas/streamLimit"
          }
        },
        "required": [
          "id",
          "modelKey"
        ],
        "title": "viewerPartialWithReference"
      },
      "speakerPartialWithReference": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/speakerId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/speakerModelKey"
          },
          "state": {
            "$ref": "#/components/schemas/deviceState"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/deviceType"
          },
          "guid": {
            "$ref": "#/components/schemas/deviceGuid"
          },
          "mac": {
            "$ref": "#/components/schemas/mac"
          },
          "volume": {
            "$ref": "#/components/schemas/speakerVolume"
          },
          "micVolume": {
            "$ref": "#/components/schemas/speakerMicVolume"
          },
          "isMicEnabled": {
            "$ref": "#/components/schemas/speakerIsMicEnabled"
          },
          "speakerState": {
            "$ref": "#/components/schemas/speakerState"
          },
          "featureFlags": {
            "$ref": "#/components/schemas/speakerFeatureFlags"
          }
        },
        "required": [
          "id",
          "modelKey"
        ],
        "title": "speakerPartialWithReference"
      },
      "bridgePartialWithReference": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/bridgeId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/bridgeModelKey"
          },
          "state": {
            "$ref": "#/components/schemas/deviceState"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/deviceType"
          },
          "guid": {
            "$ref": "#/components/schemas/deviceGuid"
          },
          "mac": {
            "$ref": "#/components/schemas/mac"
          },
          "platform": {
            "$ref": "#/components/schemas/bridgePlatform"
          },
          "clients": {
            "$ref": "#/components/schemas/bridgeClients"
          },
          "maxClients": {
            "$ref": "#/components/schemas/bridgeMaxClients"
          }
        },
        "required": [
          "id",
          "modelKey"
        ],
        "title": "bridgePartialWithReference"
      },
      "sensorPartialWithReference": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/sensorId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/sensorModelKey"
          },
          "state": {
            "$ref": "#/components/schemas/deviceState"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/deviceType"
          },
          "guid": {
            "$ref": "#/components/schemas/deviceGuid"
          },
          "mac": {
            "$ref": "#/components/schemas/mac"
          },
          "mountType": {
            "$ref": "#/components/schemas/sensorMountType"
          },
          "batteryStatus": {
            "$ref": "#/components/schemas/batteryStatus"
          },
          "featureFlags": {
            "$ref": "#/components/schemas/sensorFeatureFlags"
          },
          "stats": {
            "$ref": "#/components/schemas/sensorStats"
          },
          "lightSettings": {
            "$ref": "#/components/schemas/lightSettings"
          },
          "humiditySettings": {
            "$ref": "#/components/schemas/humiditySettings"
          },
          "temperatureSettings": {
            "$ref": "#/components/schemas/temperatureSettings"
          },
          "isOpened": {
            "$ref": "#/components/schemas/sensorIsOpened"
          },
          "openStatusChangedAt": {
            "$ref": "#/components/schemas/sensorOpenStatusChangedAt"
          },
          "isMotionDetected": {
            "$ref": "#/components/schemas/sensorIsMotionDetected"
          },
          "motionDetectedAt": {
            "$ref": "#/components/schemas/sensorMotionDetectedAt"
          },
          "motionSettings": {
            "$ref": "#/components/schemas/motionSettings"
          },
          "glassBreakSettings": {
            "$ref": "#/components/schemas/glassBreakSettings"
          },
          "scheduleMode": {
            "$ref": "#/components/schemas/sensorScheduleMode"
          },
          "armProfileIds": {
            "$ref": "#/components/schemas/sensorArmProfileIds"
          },
          "hasCustomSensitivityWhenArmed": {
            "$ref": "#/components/schemas/sensorHasCustomSensitivityWhenArmed"
          },
          "alarmTriggeredAt": {
            "$ref": "#/components/schemas/sensorAlarmTriggeredAt"
          },
          "alarmSettings": {
            "$ref": "#/components/schemas/alarmSettings"
          },
          "leakDetectedAt": {
            "$ref": "#/components/schemas/sensorLeakDetectedAt"
          },
          "externalLeakDetectedAt": {
            "$ref": "#/components/schemas/sensorExternalLeakDetectedAt"
          },
          "leakSettings": {
            "$ref": "#/components/schemas/leakSettings"
          },
          "tamperingDetectedAt": {
            "$ref": "#/components/schemas/tamperingDetectedAt"
          },
          "wirelessConnectionState": {
            "$ref": "#/components/schemas/wirelessConnectionState"
          }
        },
        "required": [
          "id",
          "modelKey"
        ],
        "title": "sensorPartialWithReference"
      },
      "sirenPartialWithReference": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/sirenId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/sirenModelKey"
          },
          "state": {
            "$ref": "#/components/schemas/deviceState"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/deviceType"
          },
          "guid": {
            "$ref": "#/components/schemas/deviceGuid"
          },
          "mac": {
            "$ref": "#/components/schemas/mac"
          },
          "volume": {
            "$ref": "#/components/schemas/sirenVolume"
          },
          "ledSettings": {
            "$ref": "#/components/schemas/sirenLedSettingsExternal"
          },
          "sirenStatus": {
            "$ref": "#/components/schemas/sirenStatus"
          },
          "connectionType": {
            "$ref": "#/components/schemas/sirenConnectionType"
          },
          "wirelessConnectionState": {
            "$ref": "#/components/schemas/wirelessConnectionState"
          }
        },
        "required": [
          "id",
          "modelKey"
        ],
        "title": "sirenPartialWithReference"
      },
      "fobPartialWithReference": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/fobId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/fobModelKey"
          },
          "state": {
            "$ref": "#/components/schemas/deviceState"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/deviceType"
          },
          "guid": {
            "$ref": "#/components/schemas/deviceGuid"
          },
          "mac": {
            "$ref": "#/components/schemas/mac"
          },
          "awayState": {
            "$ref": "#/components/schemas/fobAwayState"
          },
          "buttonLabels": {
            "$ref": "#/components/schemas/fobButtonLabels"
          },
          "featureFlags": {
            "$ref": "#/components/schemas/fobFeatureFlags"
          },
          "wirelessConnectionState": {
            "$ref": "#/components/schemas/wirelessConnectionState"
          }
        },
        "required": [
          "id",
          "modelKey"
        ],
        "title": "fobPartialWithReference"
      },
      "relayPartialWithReference": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/relayId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/relayModelKey"
          },
          "state": {
            "$ref": "#/components/schemas/deviceState"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/deviceType"
          },
          "guid": {
            "$ref": "#/components/schemas/deviceGuid"
          },
          "mac": {
            "$ref": "#/components/schemas/mac"
          },
          "ledSettings": {
            "$ref": "#/components/schemas/relayLedSettings"
          },
          "outputs": {
            "$ref": "#/components/schemas/relayOutputs"
          },
          "inputs": {
            "$ref": "#/components/schemas/relayInputs"
          },
          "wirelessConnectionState": {
            "$ref": "#/components/schemas/wirelessConnectionState"
          }
        },
        "required": [
          "id",
          "modelKey"
        ],
        "title": "relayPartialWithReference"
      },
      "aiProcessorPartialWithReference": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/deviceId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/aiprocessorModelKey"
          },
          "state": {
            "$ref": "#/components/schemas/deviceState"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/deviceType"
          },
          "guid": {
            "$ref": "#/components/schemas/deviceGuid"
          },
          "mac": {
            "$ref": "#/components/schemas/mac"
          }
        },
        "required": [
          "id",
          "modelKey"
        ],
        "title": "aiProcessorPartialWithReference"
      },
      "aiPortPartialWithReference": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/deviceId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/aiportModelKey"
          },
          "state": {
            "$ref": "#/components/schemas/deviceState"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/deviceType"
          },
          "guid": {
            "$ref": "#/components/schemas/deviceGuid"
          },
          "mac": {
            "$ref": "#/components/schemas/mac"
          }
        },
        "required": [
          "id",
          "modelKey"
        ],
        "title": "aiPortPartialWithReference"
      },
      "linkStationPartialWithReference": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/linkStationId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/linkstationModelKey"
          },
          "state": {
            "$ref": "#/components/schemas/deviceState"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/deviceType"
          },
          "guid": {
            "$ref": "#/components/schemas/deviceGuid"
          },
          "mac": {
            "$ref": "#/components/schemas/mac"
          },
          "isAlarmHub": {
            "$ref": "#/components/schemas/linkStationIsAlarmHub"
          },
          "ledSettings": {
            "$ref": "#/components/schemas/linkStationLedSettings"
          },
          "lastEvent": {
            "$ref": "#/components/schemas/linkStationLastEvent"
          },
          "alarmHub": {
            "$ref": "#/components/schemas/alarmHubStatus"
          }
        },
        "required": [
          "id",
          "modelKey"
        ],
        "title": "linkStationPartialWithReference"
      },
      "deviceRemove": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "remove"
          },
          "item": {
            "$ref": "#/components/schemas/deviceReference"
          }
        },
        "required": [
          "type",
          "item"
        ],
        "title": "deviceRemove"
      },
      "deviceReference": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/nvrReference"
          },
          {
            "$ref": "#/components/schemas/cameraReference"
          },
          {
            "$ref": "#/components/schemas/chimeReference"
          },
          {
            "$ref": "#/components/schemas/lightReference"
          },
          {
            "$ref": "#/components/schemas/viewerReference"
          },
          {
            "$ref": "#/components/schemas/speakerReference"
          },
          {
            "$ref": "#/components/schemas/bridgeReference"
          },
          {
            "$ref": "#/components/schemas/sensorReference"
          },
          {
            "$ref": "#/components/schemas/sirenReference"
          },
          {
            "$ref": "#/components/schemas/fobReference"
          },
          {
            "$ref": "#/components/schemas/relayReference"
          },
          {
            "$ref": "#/components/schemas/aiProcessorReference"
          },
          {
            "$ref": "#/components/schemas/aiPortReference"
          },
          {
            "$ref": "#/components/schemas/linkStationReference"
          }
        ],
        "discriminator": {
          "propertyName": "modelKey",
          "mapping": {
            "nvr": "#/components/schemas/nvrReference",
            "camera": "#/components/schemas/cameraReference",
            "chime": "#/components/schemas/chimeReference",
            "light": "#/components/schemas/lightReference",
            "viewer": "#/components/schemas/viewerReference",
            "speaker": "#/components/schemas/speakerReference",
            "bridge": "#/components/schemas/bridgeReference",
            "sensor": "#/components/schemas/sensorReference",
            "siren": "#/components/schemas/sirenReference",
            "fob": "#/components/schemas/fobReference",
            "relay": "#/components/schemas/relayReference",
            "aiprocessor": "#/components/schemas/aiProcessorReference",
            "aiport": "#/components/schemas/aiPortReference",
            "linkstation": "#/components/schemas/linkStationReference"
          }
        }
      },
      "nvrReference": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/nvrId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/nvrModelKey"
          }
        },
        "required": [
          "id",
          "modelKey"
        ],
        "title": "nvrReference"
      },
      "cameraReference": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/cameraId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/cameraModelKey"
          }
        },
        "required": [
          "id",
          "modelKey"
        ],
        "title": "cameraReference"
      },
      "chimeReference": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/chimeId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/chimeModelKey"
          }
        },
        "required": [
          "id",
          "modelKey"
        ],
        "title": "chimeReference"
      },
      "lightReference": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/lightId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/lightModelKey"
          }
        },
        "required": [
          "id",
          "modelKey"
        ],
        "title": "lightReference"
      },
      "viewerReference": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/viewerId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/viewerModelKey"
          }
        },
        "required": [
          "id",
          "modelKey"
        ],
        "title": "viewerReference"
      },
      "speakerReference": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/speakerId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/speakerModelKey"
          }
        },
        "required": [
          "id",
          "modelKey"
        ],
        "title": "speakerReference"
      },
      "bridgeReference": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/bridgeId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/bridgeModelKey"
          }
        },
        "required": [
          "id",
          "modelKey"
        ],
        "title": "bridgeReference"
      },
      "sensorReference": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/sensorId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/sensorModelKey"
          }
        },
        "required": [
          "id",
          "modelKey"
        ],
        "title": "sensorReference"
      },
      "sirenReference": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/sirenId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/sirenModelKey"
          }
        },
        "required": [
          "id",
          "modelKey"
        ],
        "title": "sirenReference"
      },
      "fobReference": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/fobId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/fobModelKey"
          }
        },
        "required": [
          "id",
          "modelKey"
        ],
        "title": "fobReference"
      },
      "relayReference": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/relayId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/relayModelKey"
          }
        },
        "required": [
          "id",
          "modelKey"
        ],
        "title": "relayReference"
      },
      "aiProcessorReference": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/deviceId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/aiprocessorModelKey"
          }
        },
        "required": [
          "id",
          "modelKey"
        ],
        "title": "aiProcessorReference"
      },
      "aiPortReference": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/deviceId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/aiportModelKey"
          }
        },
        "required": [
          "id",
          "modelKey"
        ],
        "title": "aiPortReference"
      },
      "linkStationReference": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/linkStationId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/linkstationModelKey"
          }
        },
        "required": [
          "id",
          "modelKey"
        ],
        "title": "linkStationReference"
      },
      "devicesAdd": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "add"
          },
          "item": {
            "$ref": "#/components/schemas/deviceBulk"
          }
        },
        "required": [
          "type",
          "item"
        ],
        "title": "devicesAdd"
      },
      "deviceBulk": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/nvrId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/nvrId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/nvrModelKey"
              },
              "name": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/nvrType"
              },
              "guid": {
                "$ref": "#/components/schemas/nvrGuid"
              },
              "mac": {
                "$ref": "#/components/schemas/mac"
              },
              "doorbellSettings": {
                "$ref": "#/components/schemas/doorbellSettings"
              },
              "armMode": {
                "$ref": "#/components/schemas/nvrArmMode"
              }
            },
            "required": [
              "id",
              "modelKey",
              "name",
              "type",
              "guid",
              "mac",
              "doorbellSettings",
              "armMode"
            ],
            "title": "nvr"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/cameraId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/cameraId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/cameraModelKey"
              },
              "state": {
                "$ref": "#/components/schemas/deviceState"
              },
              "name": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/deviceType"
              },
              "guid": {
                "$ref": "#/components/schemas/deviceGuid"
              },
              "mac": {
                "$ref": "#/components/schemas/mac"
              },
              "isMicEnabled": {
                "$ref": "#/components/schemas/isMicEnabled"
              },
              "osdSettings": {
                "$ref": "#/components/schemas/osdSettings"
              },
              "ledSettings": {
                "$ref": "#/components/schemas/ledSettings"
              },
              "lcdMessage": {
                "$ref": "#/components/schemas/lcdMessageUnion"
              },
              "micVolume": {
                "$ref": "#/components/schemas/micVolume"
              },
              "activePatrolSlot": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/activePatrolSlot"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "videoMode": {
                "$ref": "#/components/schemas/videoMode"
              },
              "hdrType": {
                "$ref": "#/components/schemas/hdrType"
              },
              "featureFlags": {
                "$ref": "#/components/schemas/cameraFeatureFlags"
              },
              "smartDetectSettings": {
                "$ref": "#/components/schemas/smartDetectSettings"
              },
              "hasPackageCamera": {
                "$ref": "#/components/schemas/hasPackageCamera"
              }
            },
            "required": [
              "id",
              "modelKey",
              "state",
              "name",
              "type",
              "guid",
              "mac",
              "isMicEnabled",
              "osdSettings",
              "ledSettings",
              "lcdMessage",
              "micVolume",
              "activePatrolSlot",
              "videoMode",
              "hdrType",
              "featureFlags",
              "smartDetectSettings",
              "hasPackageCamera"
            ],
            "title": "camera"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/chimeId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/chimeId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/chimeModelKey"
              },
              "state": {
                "$ref": "#/components/schemas/deviceState"
              },
              "name": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/deviceType"
              },
              "guid": {
                "$ref": "#/components/schemas/deviceGuid"
              },
              "mac": {
                "$ref": "#/components/schemas/mac"
              },
              "cameraIds": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/cameraId"
                },
                "description": "The list of (doorbell-only) cameras which this chime is paired to."
              },
              "ringSettings": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ringSettings"
                },
                "description": "List of custom ringtone settings for (doorbell-only) cameras paired to this chime."
              }
            },
            "required": [
              "id",
              "modelKey",
              "state",
              "name",
              "type",
              "guid",
              "mac",
              "cameraIds",
              "ringSettings"
            ],
            "title": "chime"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/lightId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/lightId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/lightModelKey"
              },
              "state": {
                "$ref": "#/components/schemas/deviceState"
              },
              "name": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/deviceType"
              },
              "guid": {
                "$ref": "#/components/schemas/deviceGuid"
              },
              "mac": {
                "$ref": "#/components/schemas/mac"
              },
              "lightModeSettings": {
                "$ref": "#/components/schemas/lightModeSettings"
              },
              "lightDeviceSettings": {
                "$ref": "#/components/schemas/lightDeviceSettings"
              },
              "isDark": {
                "$ref": "#/components/schemas/isDark"
              },
              "isLightOn": {
                "$ref": "#/components/schemas/isLightOn"
              },
              "isLightForceEnabled": {
                "$ref": "#/components/schemas/isLightForceEnabled"
              },
              "lastMotion": {
                "$ref": "#/components/schemas/lastMotion"
              },
              "isPirMotionDetected": {
                "$ref": "#/components/schemas/isPirMotionDetected"
              },
              "camera": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/cameraId"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Which camera is configured to be paired to this light."
              }
            },
            "required": [
              "id",
              "modelKey",
              "state",
              "name",
              "type",
              "guid",
              "mac",
              "lightModeSettings",
              "lightDeviceSettings",
              "isDark",
              "isLightOn",
              "isLightForceEnabled",
              "lastMotion",
              "isPirMotionDetected",
              "camera"
            ],
            "title": "light"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/viewerId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/viewerId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/viewerModelKey"
              },
              "state": {
                "$ref": "#/components/schemas/deviceState"
              },
              "name": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/deviceType"
              },
              "guid": {
                "$ref": "#/components/schemas/deviceGuid"
              },
              "mac": {
                "$ref": "#/components/schemas/mac"
              },
              "liveview": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/liveviewId"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "streamLimit": {
                "$ref": "#/components/schemas/streamLimit"
              }
            },
            "required": [
              "id",
              "modelKey",
              "state",
              "name",
              "type",
              "guid",
              "mac",
              "liveview",
              "streamLimit"
            ],
            "title": "viewer"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/speakerId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/speakerId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/speakerModelKey"
              },
              "state": {
                "$ref": "#/components/schemas/deviceState"
              },
              "name": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/deviceType"
              },
              "guid": {
                "$ref": "#/components/schemas/deviceGuid"
              },
              "mac": {
                "$ref": "#/components/schemas/mac"
              },
              "volume": {
                "$ref": "#/components/schemas/speakerVolume"
              },
              "micVolume": {
                "$ref": "#/components/schemas/speakerMicVolume"
              },
              "isMicEnabled": {
                "$ref": "#/components/schemas/speakerIsMicEnabled"
              },
              "speakerState": {
                "$ref": "#/components/schemas/speakerState"
              },
              "featureFlags": {
                "$ref": "#/components/schemas/speakerFeatureFlags"
              }
            },
            "required": [
              "id",
              "modelKey",
              "state",
              "name",
              "type",
              "guid",
              "mac",
              "volume",
              "micVolume",
              "isMicEnabled",
              "speakerState",
              "featureFlags"
            ],
            "title": "speaker"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/bridgeId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/bridgeId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/bridgeModelKey"
              },
              "state": {
                "$ref": "#/components/schemas/deviceState"
              },
              "name": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/deviceType"
              },
              "guid": {
                "$ref": "#/components/schemas/deviceGuid"
              },
              "mac": {
                "$ref": "#/components/schemas/mac"
              },
              "platform": {
                "$ref": "#/components/schemas/bridgePlatform"
              },
              "clients": {
                "$ref": "#/components/schemas/bridgeClients"
              },
              "maxClients": {
                "$ref": "#/components/schemas/bridgeMaxClients"
              }
            },
            "required": [
              "id",
              "modelKey",
              "state",
              "name",
              "type",
              "guid",
              "mac",
              "platform",
              "clients",
              "maxClients"
            ],
            "title": "bridge"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/sensorId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/sensorId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/sensorModelKey"
              },
              "state": {
                "$ref": "#/components/schemas/deviceState"
              },
              "name": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/deviceType"
              },
              "guid": {
                "$ref": "#/components/schemas/deviceGuid"
              },
              "mac": {
                "$ref": "#/components/schemas/mac"
              },
              "mountType": {
                "$ref": "#/components/schemas/sensorMountType"
              },
              "batteryStatus": {
                "$ref": "#/components/schemas/batteryStatus"
              },
              "featureFlags": {
                "$ref": "#/components/schemas/sensorFeatureFlags"
              },
              "stats": {
                "$ref": "#/components/schemas/sensorStats"
              },
              "lightSettings": {
                "$ref": "#/components/schemas/lightSettings"
              },
              "humiditySettings": {
                "$ref": "#/components/schemas/humiditySettings"
              },
              "temperatureSettings": {
                "$ref": "#/components/schemas/temperatureSettings"
              },
              "isOpened": {
                "$ref": "#/components/schemas/sensorIsOpened"
              },
              "openStatusChangedAt": {
                "$ref": "#/components/schemas/sensorOpenStatusChangedAt"
              },
              "isMotionDetected": {
                "$ref": "#/components/schemas/sensorIsMotionDetected"
              },
              "motionDetectedAt": {
                "$ref": "#/components/schemas/sensorMotionDetectedAt"
              },
              "motionSettings": {
                "$ref": "#/components/schemas/motionSettings"
              },
              "glassBreakSettings": {
                "$ref": "#/components/schemas/glassBreakSettings"
              },
              "scheduleMode": {
                "$ref": "#/components/schemas/sensorScheduleMode"
              },
              "armProfileIds": {
                "$ref": "#/components/schemas/sensorArmProfileIds"
              },
              "hasCustomSensitivityWhenArmed": {
                "$ref": "#/components/schemas/sensorHasCustomSensitivityWhenArmed"
              },
              "alarmTriggeredAt": {
                "$ref": "#/components/schemas/sensorAlarmTriggeredAt"
              },
              "alarmSettings": {
                "$ref": "#/components/schemas/alarmSettings"
              },
              "leakDetectedAt": {
                "$ref": "#/components/schemas/sensorLeakDetectedAt"
              },
              "externalLeakDetectedAt": {
                "$ref": "#/components/schemas/sensorExternalLeakDetectedAt"
              },
              "leakSettings": {
                "$ref": "#/components/schemas/leakSettings"
              },
              "tamperingDetectedAt": {
                "$ref": "#/components/schemas/tamperingDetectedAt"
              },
              "wirelessConnectionState": {
                "$ref": "#/components/schemas/wirelessConnectionState"
              }
            },
            "required": [
              "id",
              "modelKey",
              "state",
              "name",
              "type",
              "guid",
              "mac",
              "mountType",
              "batteryStatus",
              "stats",
              "lightSettings",
              "humiditySettings",
              "temperatureSettings",
              "isOpened",
              "openStatusChangedAt",
              "isMotionDetected",
              "motionDetectedAt",
              "motionSettings",
              "glassBreakSettings",
              "scheduleMode",
              "armProfileIds",
              "hasCustomSensitivityWhenArmed",
              "alarmTriggeredAt",
              "alarmSettings",
              "leakDetectedAt",
              "externalLeakDetectedAt",
              "leakSettings",
              "tamperingDetectedAt",
              "wirelessConnectionState"
            ],
            "title": "sensor"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/sirenId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/sirenId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/sirenModelKey"
              },
              "state": {
                "$ref": "#/components/schemas/deviceState"
              },
              "name": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/deviceType"
              },
              "guid": {
                "$ref": "#/components/schemas/deviceGuid"
              },
              "mac": {
                "$ref": "#/components/schemas/mac"
              },
              "volume": {
                "$ref": "#/components/schemas/sirenVolume"
              },
              "ledSettings": {
                "$ref": "#/components/schemas/sirenLedSettingsExternal"
              },
              "sirenStatus": {
                "$ref": "#/components/schemas/sirenStatus"
              },
              "connectionType": {
                "$ref": "#/components/schemas/sirenConnectionType"
              },
              "wirelessConnectionState": {
                "$ref": "#/components/schemas/wirelessConnectionState"
              }
            },
            "required": [
              "id",
              "modelKey",
              "state",
              "name",
              "type",
              "guid",
              "mac",
              "volume",
              "ledSettings",
              "sirenStatus",
              "connectionType",
              "wirelessConnectionState"
            ],
            "title": "siren"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/fobId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/fobId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/fobModelKey"
              },
              "state": {
                "$ref": "#/components/schemas/deviceState"
              },
              "name": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/deviceType"
              },
              "guid": {
                "$ref": "#/components/schemas/deviceGuid"
              },
              "mac": {
                "$ref": "#/components/schemas/mac"
              },
              "awayState": {
                "$ref": "#/components/schemas/fobAwayState"
              },
              "buttonLabels": {
                "$ref": "#/components/schemas/fobButtonLabels"
              },
              "featureFlags": {
                "$ref": "#/components/schemas/fobFeatureFlags"
              },
              "wirelessConnectionState": {
                "$ref": "#/components/schemas/wirelessConnectionState"
              }
            },
            "required": [
              "id",
              "modelKey",
              "state",
              "name",
              "type",
              "guid",
              "mac",
              "awayState",
              "buttonLabels",
              "featureFlags",
              "wirelessConnectionState"
            ],
            "title": "fob"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/relayId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/relayId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/relayModelKey"
              },
              "state": {
                "$ref": "#/components/schemas/deviceState"
              },
              "name": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/deviceType"
              },
              "guid": {
                "$ref": "#/components/schemas/deviceGuid"
              },
              "mac": {
                "$ref": "#/components/schemas/mac"
              },
              "ledSettings": {
                "$ref": "#/components/schemas/relayLedSettings"
              },
              "outputs": {
                "$ref": "#/components/schemas/relayOutputs"
              },
              "inputs": {
                "$ref": "#/components/schemas/relayInputs"
              },
              "wirelessConnectionState": {
                "$ref": "#/components/schemas/wirelessConnectionState"
              }
            },
            "required": [
              "id",
              "modelKey",
              "state",
              "name",
              "type",
              "guid",
              "mac",
              "ledSettings",
              "outputs",
              "inputs",
              "wirelessConnectionState"
            ],
            "title": "relay"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/deviceId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/deviceId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/aiprocessorModelKey"
              },
              "state": {
                "$ref": "#/components/schemas/deviceState"
              },
              "name": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/deviceType"
              },
              "guid": {
                "$ref": "#/components/schemas/deviceGuid"
              },
              "mac": {
                "$ref": "#/components/schemas/mac"
              }
            },
            "required": [
              "id",
              "modelKey",
              "state",
              "name",
              "type",
              "guid",
              "mac"
            ],
            "title": "aiProcessor"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/deviceId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/deviceId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/aiportModelKey"
              },
              "state": {
                "$ref": "#/components/schemas/deviceState"
              },
              "name": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/deviceType"
              },
              "guid": {
                "$ref": "#/components/schemas/deviceGuid"
              },
              "mac": {
                "$ref": "#/components/schemas/mac"
              }
            },
            "required": [
              "id",
              "modelKey",
              "state",
              "name",
              "type",
              "guid",
              "mac"
            ],
            "title": "aiPort"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/linkStationId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/linkStationId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/linkstationModelKey"
              },
              "state": {
                "$ref": "#/components/schemas/deviceState"
              },
              "name": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/deviceType"
              },
              "guid": {
                "$ref": "#/components/schemas/deviceGuid"
              },
              "mac": {
                "$ref": "#/components/schemas/mac"
              },
              "isAlarmHub": {
                "$ref": "#/components/schemas/linkStationIsAlarmHub"
              },
              "ledSettings": {
                "$ref": "#/components/schemas/linkStationLedSettings"
              },
              "lastEvent": {
                "$ref": "#/components/schemas/linkStationLastEvent"
              },
              "alarmHub": {
                "$ref": "#/components/schemas/alarmHubStatus"
              }
            },
            "required": [
              "id",
              "modelKey",
              "state",
              "name",
              "type",
              "guid",
              "mac",
              "isAlarmHub",
              "ledSettings",
              "lastEvent"
            ],
            "title": "linkStation"
          }
        ]
      },
      "devicesBulkUpdate": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "update"
          },
          "item": {
            "$ref": "#/components/schemas/deviceBulkPartialWithReference"
          }
        },
        "required": [
          "type",
          "item"
        ],
        "title": "devicesBulkUpdate"
      },
      "deviceBulkPartialWithReference": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/nvrId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/nvrId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/nvrModelKey"
              },
              "name": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/nvrType"
              },
              "guid": {
                "$ref": "#/components/schemas/nvrGuid"
              },
              "mac": {
                "$ref": "#/components/schemas/mac"
              },
              "doorbellSettings": {
                "$ref": "#/components/schemas/doorbellSettings"
              },
              "armMode": {
                "$ref": "#/components/schemas/nvrArmMode"
              }
            },
            "required": [
              "id",
              "modelKey"
            ],
            "title": "nvr"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/cameraId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/cameraId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/cameraModelKey"
              },
              "state": {
                "$ref": "#/components/schemas/deviceState"
              },
              "name": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/deviceType"
              },
              "guid": {
                "$ref": "#/components/schemas/deviceGuid"
              },
              "mac": {
                "$ref": "#/components/schemas/mac"
              },
              "isMicEnabled": {
                "$ref": "#/components/schemas/isMicEnabled"
              },
              "osdSettings": {
                "$ref": "#/components/schemas/osdSettings"
              },
              "ledSettings": {
                "$ref": "#/components/schemas/ledSettings"
              },
              "lcdMessage": {
                "$ref": "#/components/schemas/lcdMessageUnion"
              },
              "micVolume": {
                "$ref": "#/components/schemas/micVolume"
              },
              "activePatrolSlot": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/activePatrolSlot"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "videoMode": {
                "$ref": "#/components/schemas/videoMode"
              },
              "hdrType": {
                "$ref": "#/components/schemas/hdrType"
              },
              "featureFlags": {
                "$ref": "#/components/schemas/cameraFeatureFlags"
              },
              "smartDetectSettings": {
                "$ref": "#/components/schemas/smartDetectSettings"
              },
              "hasPackageCamera": {
                "$ref": "#/components/schemas/hasPackageCamera"
              }
            },
            "required": [
              "id",
              "modelKey"
            ],
            "title": "camera"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/chimeId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/chimeId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/chimeModelKey"
              },
              "state": {
                "$ref": "#/components/schemas/deviceState"
              },
              "name": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/deviceType"
              },
              "guid": {
                "$ref": "#/components/schemas/deviceGuid"
              },
              "mac": {
                "$ref": "#/components/schemas/mac"
              },
              "cameraIds": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/cameraId"
                },
                "description": "The list of (doorbell-only) cameras which this chime is paired to."
              },
              "ringSettings": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ringSettings"
                },
                "description": "List of custom ringtone settings for (doorbell-only) cameras paired to this chime."
              }
            },
            "required": [
              "id",
              "modelKey"
            ],
            "title": "chime"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/lightId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/lightId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/lightModelKey"
              },
              "state": {
                "$ref": "#/components/schemas/deviceState"
              },
              "name": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/deviceType"
              },
              "guid": {
                "$ref": "#/components/schemas/deviceGuid"
              },
              "mac": {
                "$ref": "#/components/schemas/mac"
              },
              "lightModeSettings": {
                "$ref": "#/components/schemas/lightModeSettings"
              },
              "lightDeviceSettings": {
                "$ref": "#/components/schemas/lightDeviceSettings"
              },
              "isDark": {
                "$ref": "#/components/schemas/isDark"
              },
              "isLightOn": {
                "$ref": "#/components/schemas/isLightOn"
              },
              "isLightForceEnabled": {
                "$ref": "#/components/schemas/isLightForceEnabled"
              },
              "lastMotion": {
                "$ref": "#/components/schemas/lastMotion"
              },
              "isPirMotionDetected": {
                "$ref": "#/components/schemas/isPirMotionDetected"
              },
              "camera": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/cameraId"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Which camera is configured to be paired to this light."
              }
            },
            "required": [
              "id",
              "modelKey"
            ],
            "title": "light"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/viewerId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/viewerId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/viewerModelKey"
              },
              "state": {
                "$ref": "#/components/schemas/deviceState"
              },
              "name": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/deviceType"
              },
              "guid": {
                "$ref": "#/components/schemas/deviceGuid"
              },
              "mac": {
                "$ref": "#/components/schemas/mac"
              },
              "liveview": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/liveviewId"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "streamLimit": {
                "$ref": "#/components/schemas/streamLimit"
              }
            },
            "required": [
              "id",
              "modelKey"
            ],
            "title": "viewer"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/speakerId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/speakerId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/speakerModelKey"
              },
              "state": {
                "$ref": "#/components/schemas/deviceState"
              },
              "name": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/deviceType"
              },
              "guid": {
                "$ref": "#/components/schemas/deviceGuid"
              },
              "mac": {
                "$ref": "#/components/schemas/mac"
              },
              "volume": {
                "$ref": "#/components/schemas/speakerVolume"
              },
              "micVolume": {
                "$ref": "#/components/schemas/speakerMicVolume"
              },
              "isMicEnabled": {
                "$ref": "#/components/schemas/speakerIsMicEnabled"
              },
              "speakerState": {
                "$ref": "#/components/schemas/speakerState"
              },
              "featureFlags": {
                "$ref": "#/components/schemas/speakerFeatureFlags"
              }
            },
            "required": [
              "id",
              "modelKey"
            ],
            "title": "speaker"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/bridgeId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/bridgeId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/bridgeModelKey"
              },
              "state": {
                "$ref": "#/components/schemas/deviceState"
              },
              "name": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/deviceType"
              },
              "guid": {
                "$ref": "#/components/schemas/deviceGuid"
              },
              "mac": {
                "$ref": "#/components/schemas/mac"
              },
              "platform": {
                "$ref": "#/components/schemas/bridgePlatform"
              },
              "clients": {
                "$ref": "#/components/schemas/bridgeClients"
              },
              "maxClients": {
                "$ref": "#/components/schemas/bridgeMaxClients"
              }
            },
            "required": [
              "id",
              "modelKey"
            ],
            "title": "bridge"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/sensorId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/sensorId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/sensorModelKey"
              },
              "state": {
                "$ref": "#/components/schemas/deviceState"
              },
              "name": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/deviceType"
              },
              "guid": {
                "$ref": "#/components/schemas/deviceGuid"
              },
              "mac": {
                "$ref": "#/components/schemas/mac"
              },
              "mountType": {
                "$ref": "#/components/schemas/sensorMountType"
              },
              "batteryStatus": {
                "$ref": "#/components/schemas/batteryStatus"
              },
              "featureFlags": {
                "$ref": "#/components/schemas/sensorFeatureFlags"
              },
              "stats": {
                "$ref": "#/components/schemas/sensorStats"
              },
              "lightSettings": {
                "$ref": "#/components/schemas/lightSettings"
              },
              "humiditySettings": {
                "$ref": "#/components/schemas/humiditySettings"
              },
              "temperatureSettings": {
                "$ref": "#/components/schemas/temperatureSettings"
              },
              "isOpened": {
                "$ref": "#/components/schemas/sensorIsOpened"
              },
              "openStatusChangedAt": {
                "$ref": "#/components/schemas/sensorOpenStatusChangedAt"
              },
              "isMotionDetected": {
                "$ref": "#/components/schemas/sensorIsMotionDetected"
              },
              "motionDetectedAt": {
                "$ref": "#/components/schemas/sensorMotionDetectedAt"
              },
              "motionSettings": {
                "$ref": "#/components/schemas/motionSettings"
              },
              "glassBreakSettings": {
                "$ref": "#/components/schemas/glassBreakSettings"
              },
              "scheduleMode": {
                "$ref": "#/components/schemas/sensorScheduleMode"
              },
              "armProfileIds": {
                "$ref": "#/components/schemas/sensorArmProfileIds"
              },
              "hasCustomSensitivityWhenArmed": {
                "$ref": "#/components/schemas/sensorHasCustomSensitivityWhenArmed"
              },
              "alarmTriggeredAt": {
                "$ref": "#/components/schemas/sensorAlarmTriggeredAt"
              },
              "alarmSettings": {
                "$ref": "#/components/schemas/alarmSettings"
              },
              "leakDetectedAt": {
                "$ref": "#/components/schemas/sensorLeakDetectedAt"
              },
              "externalLeakDetectedAt": {
                "$ref": "#/components/schemas/sensorExternalLeakDetectedAt"
              },
              "leakSettings": {
                "$ref": "#/components/schemas/leakSettings"
              },
              "tamperingDetectedAt": {
                "$ref": "#/components/schemas/tamperingDetectedAt"
              },
              "wirelessConnectionState": {
                "$ref": "#/components/schemas/wirelessConnectionState"
              }
            },
            "required": [
              "id",
              "modelKey"
            ],
            "title": "sensor"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/sirenId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/sirenId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/sirenModelKey"
              },
              "state": {
                "$ref": "#/components/schemas/deviceState"
              },
              "name": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/deviceType"
              },
              "guid": {
                "$ref": "#/components/schemas/deviceGuid"
              },
              "mac": {
                "$ref": "#/components/schemas/mac"
              },
              "volume": {
                "$ref": "#/components/schemas/sirenVolume"
              },
              "ledSettings": {
                "$ref": "#/components/schemas/sirenLedSettingsExternal"
              },
              "sirenStatus": {
                "$ref": "#/components/schemas/sirenStatus"
              },
              "connectionType": {
                "$ref": "#/components/schemas/sirenConnectionType"
              },
              "wirelessConnectionState": {
                "$ref": "#/components/schemas/wirelessConnectionState"
              }
            },
            "required": [
              "id",
              "modelKey"
            ],
            "title": "siren"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/fobId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/fobId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/fobModelKey"
              },
              "state": {
                "$ref": "#/components/schemas/deviceState"
              },
              "name": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/deviceType"
              },
              "guid": {
                "$ref": "#/components/schemas/deviceGuid"
              },
              "mac": {
                "$ref": "#/components/schemas/mac"
              },
              "awayState": {
                "$ref": "#/components/schemas/fobAwayState"
              },
              "buttonLabels": {
                "$ref": "#/components/schemas/fobButtonLabels"
              },
              "featureFlags": {
                "$ref": "#/components/schemas/fobFeatureFlags"
              },
              "wirelessConnectionState": {
                "$ref": "#/components/schemas/wirelessConnectionState"
              }
            },
            "required": [
              "id",
              "modelKey"
            ],
            "title": "fob"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/relayId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/relayId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/relayModelKey"
              },
              "state": {
                "$ref": "#/components/schemas/deviceState"
              },
              "name": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/deviceType"
              },
              "guid": {
                "$ref": "#/components/schemas/deviceGuid"
              },
              "mac": {
                "$ref": "#/components/schemas/mac"
              },
              "ledSettings": {
                "$ref": "#/components/schemas/relayLedSettings"
              },
              "outputs": {
                "$ref": "#/components/schemas/relayOutputs"
              },
              "inputs": {
                "$ref": "#/components/schemas/relayInputs"
              },
              "wirelessConnectionState": {
                "$ref": "#/components/schemas/wirelessConnectionState"
              }
            },
            "required": [
              "id",
              "modelKey"
            ],
            "title": "relay"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/deviceId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/deviceId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/aiprocessorModelKey"
              },
              "state": {
                "$ref": "#/components/schemas/deviceState"
              },
              "name": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/deviceType"
              },
              "guid": {
                "$ref": "#/components/schemas/deviceGuid"
              },
              "mac": {
                "$ref": "#/components/schemas/mac"
              }
            },
            "required": [
              "id",
              "modelKey"
            ],
            "title": "aiProcessor"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/deviceId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/deviceId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/aiportModelKey"
              },
              "state": {
                "$ref": "#/components/schemas/deviceState"
              },
              "name": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/deviceType"
              },
              "guid": {
                "$ref": "#/components/schemas/deviceGuid"
              },
              "mac": {
                "$ref": "#/components/schemas/mac"
              }
            },
            "required": [
              "id",
              "modelKey"
            ],
            "title": "aiPort"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/linkStationId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/linkStationId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/linkstationModelKey"
              },
              "state": {
                "$ref": "#/components/schemas/deviceState"
              },
              "name": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/deviceType"
              },
              "guid": {
                "$ref": "#/components/schemas/deviceGuid"
              },
              "mac": {
                "$ref": "#/components/schemas/mac"
              },
              "isAlarmHub": {
                "$ref": "#/components/schemas/linkStationIsAlarmHub"
              },
              "ledSettings": {
                "$ref": "#/components/schemas/linkStationLedSettings"
              },
              "lastEvent": {
                "$ref": "#/components/schemas/linkStationLastEvent"
              },
              "alarmHub": {
                "$ref": "#/components/schemas/alarmHubStatus"
              }
            },
            "required": [
              "id",
              "modelKey"
            ],
            "title": "linkStation"
          }
        ]
      },
      "devicesBulkRemove": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "remove"
          },
          "item": {
            "$ref": "#/components/schemas/deviceBulkReference"
          }
        },
        "required": [
          "type",
          "item"
        ],
        "title": "devicesBulkRemove"
      },
      "deviceBulkReference": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/nvrId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/nvrId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/nvrModelKey"
              }
            },
            "required": [
              "id",
              "modelKey"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/cameraId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/cameraId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/cameraModelKey"
              }
            },
            "required": [
              "id",
              "modelKey"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/chimeId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/chimeId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/chimeModelKey"
              }
            },
            "required": [
              "id",
              "modelKey"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/lightId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/lightId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/lightModelKey"
              }
            },
            "required": [
              "id",
              "modelKey"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/viewerId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/viewerId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/viewerModelKey"
              }
            },
            "required": [
              "id",
              "modelKey"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/speakerId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/speakerId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/speakerModelKey"
              }
            },
            "required": [
              "id",
              "modelKey"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/bridgeId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/bridgeId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/bridgeModelKey"
              }
            },
            "required": [
              "id",
              "modelKey"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/sensorId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/sensorId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/sensorModelKey"
              }
            },
            "required": [
              "id",
              "modelKey"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/sirenId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/sirenId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/sirenModelKey"
              }
            },
            "required": [
              "id",
              "modelKey"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/fobId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/fobId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/fobModelKey"
              }
            },
            "required": [
              "id",
              "modelKey"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/relayId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/relayId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/relayModelKey"
              }
            },
            "required": [
              "id",
              "modelKey"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/deviceId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/deviceId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/aiprocessorModelKey"
              }
            },
            "required": [
              "id",
              "modelKey"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/deviceId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/deviceId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/aiportModelKey"
              }
            },
            "required": [
              "id",
              "modelKey"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/linkStationId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/linkStationId"
                    }
                  }
                ]
              },
              "modelKey": {
                "$ref": "#/components/schemas/linkstationModelKey"
              }
            },
            "required": [
              "id",
              "modelKey"
            ]
          }
        ]
      },
      "eventAdd": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "add"
          },
          "item": {
            "$ref": "#/components/schemas/event"
          }
        },
        "required": [
          "type",
          "item"
        ],
        "title": "eventAdd"
      },
      "event": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ringEvent"
          },
          {
            "$ref": "#/components/schemas/sensorExtremeValueEvent"
          },
          {
            "$ref": "#/components/schemas/sensorWaterLeakEvent"
          },
          {
            "$ref": "#/components/schemas/sensorTamperEvent"
          },
          {
            "$ref": "#/components/schemas/sensorBatteryLowEvent"
          },
          {
            "$ref": "#/components/schemas/sensorAlarmEvent"
          },
          {
            "$ref": "#/components/schemas/sensorVapeEvent"
          },
          {
            "$ref": "#/components/schemas/sensorOpenEvent"
          },
          {
            "$ref": "#/components/schemas/sensorClosedEvent"
          },
          {
            "$ref": "#/components/schemas/sensorSmokeTestEvent"
          },
          {
            "$ref": "#/components/schemas/sensorSmokeBatteryLowEvent"
          },
          {
            "$ref": "#/components/schemas/sensorSmokeNeedsCleaningEvent"
          },
          {
            "$ref": "#/components/schemas/sensorSmokeFaultEvent"
          },
          {
            "$ref": "#/components/schemas/sensorCoFaultEvent"
          },
          {
            "$ref": "#/components/schemas/sensorSmokeEndOfLifeEvent"
          },
          {
            "$ref": "#/components/schemas/sensorMotionEvent"
          },
          {
            "$ref": "#/components/schemas/sensorButtonPressedEvent"
          },
          {
            "$ref": "#/components/schemas/lightMotionEvent"
          },
          {
            "$ref": "#/components/schemas/cameraMotionEvent"
          },
          {
            "$ref": "#/components/schemas/cameraSmartDetectAudioEvent"
          },
          {
            "$ref": "#/components/schemas/cameraSmartDetectZoneEvent"
          },
          {
            "$ref": "#/components/schemas/cameraSmartDetectLineEvent"
          },
          {
            "$ref": "#/components/schemas/cameraSmartDetectLoiterEvent"
          },
          {
            "$ref": "#/components/schemas/relayInputChangedEvent"
          },
          {
            "$ref": "#/components/schemas/cameraDigitalInputChangedEvent"
          },
          {
            "$ref": "#/components/schemas/alarmHubMotionEvent"
          },
          {
            "$ref": "#/components/schemas/alarmHubEntryOpenedEvent"
          },
          {
            "$ref": "#/components/schemas/alarmHubEntryClosedEvent"
          },
          {
            "$ref": "#/components/schemas/alarmHubSmokeEvent"
          },
          {
            "$ref": "#/components/schemas/alarmHubGlassBreakEvent"
          },
          {
            "$ref": "#/components/schemas/alarmHubButtonPressEvent"
          },
          {
            "$ref": "#/components/schemas/alarmHubTamperEvent"
          },
          {
            "$ref": "#/components/schemas/alarmHubDeviceTamperEvent"
          },
          {
            "$ref": "#/components/schemas/alarmHubRelaySwitchedEvent"
          },
          {
            "$ref": "#/components/schemas/alarmHubBatteryLowEvent"
          },
          {
            "$ref": "#/components/schemas/alarmHubBatteryConnectedEvent"
          },
          {
            "$ref": "#/components/schemas/nfcCardScannedEvent"
          },
          {
            "$ref": "#/components/schemas/fingerprintIdentifiedEvent"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "ring": "#/components/schemas/ringEvent",
            "sensorExtremeValues": "#/components/schemas/sensorExtremeValueEvent",
            "sensorWaterLeak": "#/components/schemas/sensorWaterLeakEvent",
            "sensorTamper": "#/components/schemas/sensorTamperEvent",
            "sensorBatteryLow": "#/components/schemas/sensorBatteryLowEvent",
            "sensorAlarm": "#/components/schemas/sensorAlarmEvent",
            "sensorVape": "#/components/schemas/sensorVapeEvent",
            "sensorOpened": "#/components/schemas/sensorOpenEvent",
            "sensorClosed": "#/components/schemas/sensorClosedEvent",
            "sensorSmokeTest": "#/components/schemas/sensorSmokeTestEvent",
            "sensorSmokeBatteryLow": "#/components/schemas/sensorSmokeBatteryLowEvent",
            "sensorSmokeNeedsCleaning": "#/components/schemas/sensorSmokeNeedsCleaningEvent",
            "sensorSmokeFault": "#/components/schemas/sensorSmokeFaultEvent",
            "sensorCoFault": "#/components/schemas/sensorCoFaultEvent",
            "sensorSmokeEndOfLife": "#/components/schemas/sensorSmokeEndOfLifeEvent",
            "sensorMotion": "#/components/schemas/sensorMotionEvent",
            "sensorButtonPressed": "#/components/schemas/sensorButtonPressedEvent",
            "lightMotion": "#/components/schemas/lightMotionEvent",
            "motion": "#/components/schemas/cameraMotionEvent",
            "smartAudioDetect": "#/components/schemas/cameraSmartDetectAudioEvent",
            "smartDetectZone": "#/components/schemas/cameraSmartDetectZoneEvent",
            "smartDetectLine": "#/components/schemas/cameraSmartDetectLineEvent",
            "smartDetectLoiterZone": "#/components/schemas/cameraSmartDetectLoiterEvent",
            "relayInputChanged": "#/components/schemas/relayInputChangedEvent",
            "cameraDigitalInputChanged": "#/components/schemas/cameraDigitalInputChangedEvent",
            "alarmHubMotion": "#/components/schemas/alarmHubMotionEvent",
            "alarmHubEntryOpened": "#/components/schemas/alarmHubEntryOpenedEvent",
            "alarmHubEntryClosed": "#/components/schemas/alarmHubEntryClosedEvent",
            "alarmHubSmoke": "#/components/schemas/alarmHubSmokeEvent",
            "alarmHubGlassBreak": "#/components/schemas/alarmHubGlassBreakEvent",
            "alarmHubButtonPress": "#/components/schemas/alarmHubButtonPressEvent",
            "alarmHubTamper": "#/components/schemas/alarmHubTamperEvent",
            "alarmHubDeviceTamper": "#/components/schemas/alarmHubDeviceTamperEvent",
            "alarmHubRelaySwitched": "#/components/schemas/alarmHubRelaySwitchedEvent",
            "alarmHubBatteryLow": "#/components/schemas/alarmHubBatteryLowEvent",
            "alarmHubBatteryConnected": "#/components/schemas/alarmHubBatteryConnectedEvent",
            "nfcCardScanned": "#/components/schemas/nfcCardScannedEvent",
            "fingerprintIdentified": "#/components/schemas/fingerprintIdentifiedEvent"
          }
        }
      },
      "ringEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "ring"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device"
        ],
        "description": "A device ring button has been pressed",
        "title": "ringEvent"
      },
      "eventId": {
        "type": "string",
        "description": "The primary key of event",
        "examples": [
          "66d025b301ebc903e80003ea",
          "672094f900e26303e800062a"
        ],
        "title": "eventId"
      },
      "eventModelKey": {
        "type": "string",
        "const": "event",
        "description": "The model key of the event",
        "title": "eventModelKey"
      },
      "sensorExtremeValueEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "sensorExtremeValues"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "sensorType": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "enum": [
                      "temperature",
                      "light",
                      "humidity",
                      "aqi",
                      "vape",
                      "tvoc",
                      "pm1p0",
                      "pm2p5",
                      "pm4p0",
                      "pm10p0",
                      "nox",
                      "co2",
                      "voc"
                    ]
                  }
                },
                "required": [
                  "text"
                ],
                "description": "Name of the metric measured by the sensor",
                "examples": [
                  {
                    "text": "temperature"
                  }
                ]
              },
              "sensorValue": {
                "type": "object",
                "properties": {
                  "text": {
                    "$ref": "#/components/schemas/sensorValue"
                  }
                },
                "required": [
                  "text"
                ]
              },
              "status": {
                "type": "object",
                "properties": {
                  "text": {
                    "$ref": "#/components/schemas/sensorStatus"
                  }
                },
                "required": [
                  "text"
                ]
              }
            },
            "required": [
              "sensorType",
              "sensorValue",
              "status"
            ]
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device",
          "metadata"
        ],
        "description": "The value of a metric measured by a sensor has gone in or out of range",
        "title": "sensorExtremeValueEvent"
      },
      "sensorWaterLeakEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "sensorWaterLeak"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "sensorMountType": {
                "type": "object",
                "properties": {
                  "text": {
                    "$ref": "#/components/schemas/sensorMountType"
                  }
                },
                "required": [
                  "text"
                ]
              }
            },
            "required": [
              "sensorMountType"
            ]
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device",
          "metadata"
        ],
        "description": "Water leak in the given mount point has started or ended",
        "title": "sensorWaterLeakEvent"
      },
      "sensorTamperEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "sensorTamper"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device"
        ],
        "description": "Sensor has started or finished being tampered with",
        "title": "sensorTamperEvent"
      },
      "sensorBatteryLowEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "sensorBatteryLow"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "sensorBatteryPercentage": {
                "type": "object",
                "properties": {
                  "number": {
                    "type": "number"
                  }
                },
                "required": [
                  "number"
                ],
                "description": "Decimal value of the available sensor battery percentage",
                "examples": [
                  {
                    "number": 95
                  }
                ]
              }
            },
            "required": [
              "sensorBatteryPercentage"
            ]
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device",
          "metadata"
        ],
        "description": "Sensor battery level is getting low",
        "title": "sensorBatteryLowEvent"
      },
      "sensorAlarmEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "sensorAlarm"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "alarmType": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "enum": [
                      "smoke",
                      "CO",
                      "glassBreak",
                      "sensorButtonPress",
                      "tamper",
                      "short",
                      "cut"
                    ]
                  }
                },
                "required": [
                  "text"
                ],
                "description": "A type of sensor alarm",
                "examples": [
                  {
                    "text": "CO"
                  }
                ]
              }
            },
            "required": [
              "alarmType"
            ]
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device",
          "metadata"
        ],
        "description": "Sensor has started or finished enduring an alarming state",
        "title": "sensorAlarmEvent"
      },
      "sensorVapeEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "sensorVape"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device"
        ],
        "description": "Sensor has detected vape",
        "title": "sensorVapeEvent"
      },
      "sensorOpenEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "sensorOpened"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "sensorMountType": {
                "type": "object",
                "properties": {
                  "text": {
                    "$ref": "#/components/schemas/sensorMountType"
                  }
                },
                "required": [
                  "text"
                ]
              }
            },
            "required": [
              "sensorMountType"
            ]
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device",
          "metadata"
        ],
        "description": "Sensor in a given mount type has entered an open state",
        "title": "sensorOpenEvent"
      },
      "sensorClosedEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "sensorClosed"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "sensorMountType": {
                "type": "object",
                "properties": {
                  "text": {
                    "$ref": "#/components/schemas/sensorMountType"
                  }
                },
                "required": [
                  "text"
                ]
              }
            },
            "required": [
              "sensorMountType"
            ]
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device",
          "metadata"
        ],
        "description": "Sensor in a given mount type has entered a closed state",
        "title": "sensorClosedEvent"
      },
      "sensorSmokeTestEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "sensorSmokeTest"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string",
                "enum": [
                  "remote",
                  "local"
                ]
              }
            }
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device",
          "metadata"
        ],
        "description": "Smoke detector test has been initiated",
        "title": "sensorSmokeTestEvent"
      },
      "sensorSmokeBatteryLowEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "sensorSmokeBatteryLow"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device"
        ],
        "description": "Smoke/CO detector internal battery is low (replacement required)",
        "title": "sensorSmokeBatteryLowEvent"
      },
      "sensorSmokeNeedsCleaningEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "sensorSmokeNeedsCleaning"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device"
        ],
        "description": "Smoke sensor requires cleaning",
        "title": "sensorSmokeNeedsCleaningEvent"
      },
      "sensorSmokeFaultEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "sensorSmokeFault"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device"
        ],
        "description": "Smoke sensor fault detected",
        "title": "sensorSmokeFaultEvent"
      },
      "sensorCoFaultEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "sensorCoFault"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device"
        ],
        "description": "CO sensor fault detected",
        "title": "sensorCoFaultEvent"
      },
      "sensorSmokeEndOfLifeEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "sensorSmokeEndOfLife"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device"
        ],
        "description": "Smoke/CO detector has reached end of service life",
        "title": "sensorSmokeEndOfLifeEvent"
      },
      "sensorMotionEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "sensorMotion"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device"
        ],
        "description": "Sensor has started or finished detecting motion",
        "title": "sensorMotionEvent"
      },
      "sensorButtonPressedEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "sensorButtonPressed"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "button": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "enum": [
                      "function",
                      "alarmHubButton",
                      "arm",
                      "disarm",
                      "night",
                      "panic",
                      "left",
                      "right",
                      "input1",
                      "input2",
                      "main"
                    ]
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The button that was pressed",
                "examples": [
                  {
                    "text": "alarmHubButton"
                  }
                ]
              }
            },
            "required": [
              "button"
            ]
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device",
          "metadata"
        ],
        "description": "A sensor button has been pressed",
        "title": "sensorButtonPressedEvent"
      },
      "lightMotionEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "lightMotion"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device"
        ],
        "description": "Floodlight has encountered motion",
        "title": "lightMotionEvent"
      },
      "cameraMotionEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "motion"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device"
        ],
        "description": "Camera has started or finished detecting motion",
        "title": "cameraMotionEvent"
      },
      "cameraSmartDetectAudioEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "smartAudioDetect"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          },
          "smartDetectTypes": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "enum": [
                "alrmSmoke",
                "alrmCmonx",
                "alrmSiren",
                "alrmBabyCry",
                "alrmSpeak",
                "alrmBark",
                "alrmBurglar",
                "alrmCarHorn",
                "alrmGlassBreak"
              ],
              "description": "A type of smart detection based on the audio feed"
            }
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device",
          "smartDetectTypes"
        ],
        "description": "Camera has started or finished a smart audio-based detection",
        "title": "cameraSmartDetectAudioEvent"
      },
      "cameraSmartDetectZoneEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "smartDetectZone"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          },
          "smartDetectTypes": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "enum": [
                "person",
                "vehicle",
                "package",
                "licensePlate",
                "face",
                "animal"
              ],
              "description": "A type of smart detection based on the video feed"
            }
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device",
          "smartDetectTypes"
        ],
        "description": "Camera has started or finished a smart video-based zone detection",
        "title": "cameraSmartDetectZoneEvent"
      },
      "cameraSmartDetectLineEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "smartDetectLine"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          },
          "smartDetectTypes": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "enum": [
                "person",
                "vehicle",
                "package",
                "licensePlate",
                "face",
                "animal"
              ],
              "description": "A type of smart detection based on the video feed"
            }
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device",
          "smartDetectTypes"
        ],
        "description": "Camera has started or finished a smart video-based line detection",
        "title": "cameraSmartDetectLineEvent"
      },
      "cameraSmartDetectLoiterEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "smartDetectLoiterZone"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          },
          "smartDetectTypes": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "enum": [
                "person",
                "vehicle",
                "package",
                "licensePlate",
                "face",
                "animal"
              ],
              "description": "A type of smart detection based on the video feed"
            }
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device",
          "smartDetectTypes"
        ],
        "description": "Camera has started or finished a smart video-based loiter detection",
        "title": "cameraSmartDetectLoiterEvent"
      },
      "relayInputChangedEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "relayInputChanged"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "inputState": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "enum": [
                      "circuitClosed",
                      "circuitOpen"
                    ]
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The state of the relay input circuit",
                "examples": [
                  {
                    "text": "circuitOpen"
                  }
                ]
              },
              "inputChannel": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The channel index of the relay input",
                "examples": [
                  {
                    "text": "0"
                  }
                ]
              }
            },
            "required": [
              "inputState",
              "inputChannel"
            ]
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device",
          "metadata"
        ],
        "description": "A relay input has changed state (circuit opened or closed)",
        "title": "relayInputChangedEvent"
      },
      "cameraDigitalInputChangedEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "cameraDigitalInputChanged"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "inputState": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "enum": [
                      "circuitClosed",
                      "circuitOpen"
                    ]
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The state of the relay input circuit",
                "examples": [
                  {
                    "text": "circuitOpen"
                  }
                ]
              },
              "inputToken": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The ONVIF token of the camera digital input",
                "examples": [
                  {
                    "text": "AlarmIn_0"
                  }
                ]
              },
              "inputChannel": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The channel index of the relay input",
                "examples": [
                  {
                    "text": "0"
                  }
                ]
              }
            },
            "required": [
              "inputState"
            ]
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device",
          "metadata"
        ],
        "description": "An ONVIF camera digital input has changed state (circuit opened or closed)",
        "title": "cameraDigitalInputChangedEvent"
      },
      "alarmHubMotionEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "alarmHubMotion"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "pin": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The alarm hub input pin channel",
                "examples": [
                  {
                    "text": "0"
                  }
                ]
              },
              "status": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The status of the alarm hub input",
                "examples": [
                  {
                    "text": "alarm"
                  }
                ]
              },
              "deviceId": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The device ID of the alarm hub",
                "examples": [
                  {
                    "text": "69a83414037dec03e4009a3c"
                  }
                ]
              },
              "deviceName": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The configured name of the input",
                "examples": [
                  {
                    "text": "Front Door Sensor"
                  }
                ]
              }
            },
            "required": [
              "pin",
              "status",
              "deviceId",
              "deviceName"
            ]
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device"
        ],
        "description": "Alarm hub motion input has been triggered",
        "title": "alarmHubMotionEvent"
      },
      "alarmHubEntryOpenedEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "alarmHubEntryOpened"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "pin": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The alarm hub input pin channel",
                "examples": [
                  {
                    "text": "0"
                  }
                ]
              },
              "status": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The status of the alarm hub input",
                "examples": [
                  {
                    "text": "alarm"
                  }
                ]
              },
              "deviceId": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The device ID of the alarm hub",
                "examples": [
                  {
                    "text": "69a83414037dec03e4009a3c"
                  }
                ]
              },
              "deviceName": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The configured name of the input",
                "examples": [
                  {
                    "text": "Front Door Sensor"
                  }
                ]
              }
            },
            "required": [
              "pin",
              "status",
              "deviceId",
              "deviceName"
            ]
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device"
        ],
        "description": "Alarm hub entry sensor has opened",
        "title": "alarmHubEntryOpenedEvent"
      },
      "alarmHubEntryClosedEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "alarmHubEntryClosed"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "pin": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The alarm hub input pin channel",
                "examples": [
                  {
                    "text": "0"
                  }
                ]
              },
              "status": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The status of the alarm hub input",
                "examples": [
                  {
                    "text": "alarm"
                  }
                ]
              },
              "deviceId": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The device ID of the alarm hub",
                "examples": [
                  {
                    "text": "69a83414037dec03e4009a3c"
                  }
                ]
              },
              "deviceName": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The configured name of the input",
                "examples": [
                  {
                    "text": "Front Door Sensor"
                  }
                ]
              }
            },
            "required": [
              "pin",
              "status",
              "deviceId",
              "deviceName"
            ]
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device"
        ],
        "description": "Alarm hub entry sensor has closed",
        "title": "alarmHubEntryClosedEvent"
      },
      "alarmHubSmokeEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "alarmHubSmoke"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "pin": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The alarm hub input pin channel",
                "examples": [
                  {
                    "text": "0"
                  }
                ]
              },
              "status": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The status of the alarm hub input",
                "examples": [
                  {
                    "text": "alarm"
                  }
                ]
              },
              "alarmType": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "enum": [
                      "smoke",
                      "CO",
                      "glassBreak",
                      "sensorButtonPress",
                      "tamper",
                      "short",
                      "cut"
                    ]
                  }
                },
                "required": [
                  "text"
                ],
                "description": "A type of sensor alarm",
                "examples": [
                  {
                    "text": "CO"
                  }
                ]
              },
              "deviceId": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The device ID of the alarm hub",
                "examples": [
                  {
                    "text": "69a83414037dec03e4009a3c"
                  }
                ]
              },
              "deviceName": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The configured name of the input",
                "examples": [
                  {
                    "text": "Front Door Sensor"
                  }
                ]
              }
            },
            "required": [
              "pin",
              "status",
              "alarmType",
              "deviceId",
              "deviceName"
            ]
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device"
        ],
        "description": "Alarm hub smoke detector has been triggered",
        "title": "alarmHubSmokeEvent"
      },
      "alarmHubGlassBreakEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "alarmHubGlassBreak"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "pin": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The alarm hub input pin channel",
                "examples": [
                  {
                    "text": "0"
                  }
                ]
              },
              "status": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The status of the alarm hub input",
                "examples": [
                  {
                    "text": "alarm"
                  }
                ]
              },
              "alarmType": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "enum": [
                      "smoke",
                      "CO",
                      "glassBreak",
                      "sensorButtonPress",
                      "tamper",
                      "short",
                      "cut"
                    ]
                  }
                },
                "required": [
                  "text"
                ],
                "description": "A type of sensor alarm",
                "examples": [
                  {
                    "text": "CO"
                  }
                ]
              },
              "deviceId": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The device ID of the alarm hub",
                "examples": [
                  {
                    "text": "69a83414037dec03e4009a3c"
                  }
                ]
              },
              "deviceName": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The configured name of the input",
                "examples": [
                  {
                    "text": "Front Door Sensor"
                  }
                ]
              }
            },
            "required": [
              "pin",
              "status",
              "alarmType",
              "deviceId",
              "deviceName"
            ]
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device"
        ],
        "description": "Alarm hub glass break detector has been triggered",
        "title": "alarmHubGlassBreakEvent"
      },
      "alarmHubButtonPressEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "alarmHubButtonPress"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "pin": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The alarm hub input pin channel",
                "examples": [
                  {
                    "text": "0"
                  }
                ]
              },
              "status": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The status of the alarm hub input",
                "examples": [
                  {
                    "text": "alarm"
                  }
                ]
              },
              "button": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "enum": [
                      "function",
                      "alarmHubButton",
                      "arm",
                      "disarm",
                      "night",
                      "panic",
                      "left",
                      "right",
                      "input1",
                      "input2",
                      "main"
                    ]
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The button that was pressed",
                "examples": [
                  {
                    "text": "alarmHubButton"
                  }
                ]
              },
              "alarmType": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "enum": [
                      "smoke",
                      "CO",
                      "glassBreak",
                      "sensorButtonPress",
                      "tamper",
                      "short",
                      "cut"
                    ]
                  }
                },
                "required": [
                  "text"
                ],
                "description": "A type of sensor alarm",
                "examples": [
                  {
                    "text": "CO"
                  }
                ]
              },
              "deviceId": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The device ID of the alarm hub",
                "examples": [
                  {
                    "text": "69a83414037dec03e4009a3c"
                  }
                ]
              },
              "deviceName": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The configured name of the input",
                "examples": [
                  {
                    "text": "Front Door Sensor"
                  }
                ]
              }
            },
            "required": [
              "pin",
              "status",
              "button",
              "alarmType",
              "deviceId",
              "deviceName"
            ]
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device"
        ],
        "description": "Alarm hub emergency button has been pressed",
        "title": "alarmHubButtonPressEvent"
      },
      "alarmHubTamperEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "alarmHubTamper"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "pin": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The alarm hub input pin channel",
                "examples": [
                  {
                    "text": "0"
                  }
                ]
              },
              "status": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The status of the alarm hub input",
                "examples": [
                  {
                    "text": "alarm"
                  }
                ]
              },
              "alarmType": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "enum": [
                      "smoke",
                      "CO",
                      "glassBreak",
                      "sensorButtonPress",
                      "tamper",
                      "short",
                      "cut"
                    ]
                  }
                },
                "required": [
                  "text"
                ],
                "description": "A type of sensor alarm",
                "examples": [
                  {
                    "text": "CO"
                  }
                ]
              },
              "deviceId": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The device ID of the alarm hub",
                "examples": [
                  {
                    "text": "69a83414037dec03e4009a3c"
                  }
                ]
              },
              "deviceName": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The configured name of the input",
                "examples": [
                  {
                    "text": "Front Door Sensor"
                  }
                ]
              }
            },
            "required": [
              "pin",
              "status",
              "alarmType",
              "deviceId",
              "deviceName"
            ]
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device"
        ],
        "description": "Alarm hub input has been tampered with",
        "title": "alarmHubTamperEvent"
      },
      "alarmHubDeviceTamperEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "alarmHubDeviceTamper"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "status": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "enum": [
                      "tampered",
                      "restored"
                    ]
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The physical tamper state of the alarm hub",
                "examples": [
                  {
                    "text": "tampered"
                  }
                ]
              },
              "deviceId": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The device ID of the alarm hub",
                "examples": [
                  {
                    "text": "69a83414037dec03e4009a3c"
                  }
                ]
              },
              "deviceName": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "description": "The configured name of the alarm hub",
                "examples": [
                  {
                    "text": "Alarm Hub"
                  }
                ]
              }
            },
            "required": [
              "status",
              "deviceId"
            ]
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device"
        ],
        "description": "Alarm hub device tamper status has changed",
        "title": "alarmHubDeviceTamperEvent"
      },
      "alarmHubRelaySwitchedEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "alarmHubRelaySwitched"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device"
        ],
        "description": "Alarm hub relay output has been switched",
        "title": "alarmHubRelaySwitchedEvent"
      },
      "alarmHubBatteryLowEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "alarmHubBatteryLow"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device"
        ],
        "description": "Alarm hub battery level is low",
        "title": "alarmHubBatteryLowEvent"
      },
      "alarmHubBatteryConnectedEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "alarmHubBatteryConnected"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device"
        ],
        "description": "Alarm hub battery has been connected",
        "title": "alarmHubBatteryConnectedEvent"
      },
      "nfcCardScannedEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "nfcCardScanned"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          },
          "metadata": {
            "$ref": "#/components/schemas/nfcMetadata"
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device",
          "metadata"
        ],
        "description": "An NFC card was scanned at a device",
        "title": "nfcCardScannedEvent"
      },
      "nfcMetadata": {
        "type": "object",
        "properties": {
          "nfc": {
            "type": "object",
            "properties": {
              "ulpId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The unique id of the UniFi Identity user. Matches the id field of the corresponding UlpUser. Matches the ucoreUserId field of the corresponding Protect User. Null if the credential was not recognized.",
                "examples": [
                  "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                  null
                ]
              }
            },
            "required": [
              "ulpId"
            ]
          }
        },
        "required": [
          "nfc"
        ],
        "title": "nfcMetadata"
      },
      "fingerprintIdentifiedEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/eventId"
          },
          "modelKey": {
            "$ref": "#/components/schemas/eventModelKey"
          },
          "type": {
            "type": "string",
            "const": "fingerprintIdentified"
          },
          "start": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Unix timestamp of the start time of the event.",
            "examples": [
              1445408038748,
              1741267544209
            ]
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "description": "Unix timestamp of the end time of the event.",
            "examples": [
              1445408048748,
              1741267554209
            ]
          },
          "device": {
            "$ref": "#/components/schemas/deviceId"
          },
          "metadata": {
            "$ref": "#/components/schemas/fingerprintMetadata"
          }
        },
        "required": [
          "id",
          "modelKey",
          "type",
          "start",
          "device",
          "metadata"
        ],
        "description": "A fingerprint was scanned at a device",
        "title": "fingerprintIdentifiedEvent"
      },
      "fingerprintMetadata": {
        "type": "object",
        "properties": {
          "fingerprint": {
            "type": "object",
            "properties": {
              "ulpId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The unique id of the UniFi Identity user. Matches the id field of the corresponding UlpUser. Matches the ucoreUserId field of the corresponding Protect User. Null if the credential was not recognized.",
                "examples": [
                  "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                  null
                ]
              }
            },
            "required": [
              "ulpId"
            ]
          }
        },
        "required": [
          "fingerprint"
        ],
        "title": "fingerprintMetadata"
      },
      "eventUpdate": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "update"
          },
          "item": {
            "$ref": "#/components/schemas/event"
          }
        },
        "required": [
          "type",
          "item"
        ],
        "title": "eventUpdate"
      },
      "activePatrolSlotString": {
        "type": "string",
        "title": "activePatrolSlotString",
        "description": "The slot number (0-4) of the patrol that is currently running, or null if no patrol is running",
        "examples": [
          "0",
          "1",
          "2",
          "3",
          "4"
        ]
      },
      "alarmTriggerId": {
        "type": "string",
        "description": "User defined string used to trigger only specific alarms. Alarm should be configured with the same ID to be triggered.",
        "examples": [
          "AnyRandomString"
        ],
        "title": "alarmTriggerId"
      },
      "idRequiredError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "Error message",
            "examples": [
              "'id' is required"
            ]
          },
          "name": {
            "type": "string",
            "description": "Name of the error",
            "examples": [
              "BAD_REQUEST"
            ]
          },
          "cause": {
            "type": "object",
            "additionalProperties": {},
            "description": "An optional nested cause for the parent error",
            "examples": [
              {
                "error": "Unexpected functionality error",
                "name": "UNKNOWN_ERROR"
              }
            ]
          }
        },
        "required": [
          "error",
          "name"
        ],
        "title": "idRequiredError"
      },
      "armProfile": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/armProfileId"
          },
          "name": {
            "$ref": "#/components/schemas/armProfileName"
          },
          "automations": {
            "$ref": "#/components/schemas/automations"
          },
          "creator": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/userId"
              },
              {
                "type": "null"
              }
            ]
          },
          "schedules": {
            "$ref": "#/components/schemas/schedules"
          },
          "recordEverything": {
            "$ref": "#/components/schemas/recordEverything"
          },
          "activationDelay": {
            "$ref": "#/components/schemas/activationDelay"
          },
          "createdAt": {
            "$ref": "#/components/schemas/createdAt"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/updatedAt"
          }
        },
        "required": [
          "id",
          "name",
          "automations",
          "creator",
          "schedules",
          "recordEverything",
          "activationDelay",
          "createdAt",
          "updatedAt"
        ],
        "title": "armProfile"
      },
      "armProfileId": {
        "type": "string",
        "description": "The primary key of armProfile",
        "examples": [
          "66d025b301ebc903e80003ea",
          "672094f900e26303e800062a"
        ],
        "title": "armProfileId"
      },
      "armProfileName": {
        "type": "string",
        "minLength": 1,
        "maxLength": 255,
        "title": "armProfileName",
        "description": "Name of the arm profile.",
        "examples": [
          "Arm Profile"
        ]
      },
      "automations": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/automationId"
        },
        "title": "automations",
        "description": "List of automation IDs associated with this arm profile."
      },
      "automationId": {
        "type": "string",
        "description": "The primary key of automation",
        "examples": [
          "66d025b301ebc903e80003ea",
          "672094f900e26303e800062a"
        ],
        "title": "automationId"
      },
      "schedules": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/armSchedule"
        },
        "title": "schedules",
        "description": "List of arm schedules."
      },
      "armSchedule": {
        "type": "object",
        "properties": {
          "start": {
            "$ref": "#/components/schemas/armScheduleStart"
          },
          "end": {
            "$ref": "#/components/schemas/armScheduleEnd"
          }
        },
        "required": [
          "start",
          "end"
        ],
        "title": "armSchedule"
      },
      "armScheduleStart": {
        "type": "string",
        "title": "armScheduleStart",
        "description": "Cron expression for the start time.",
        "examples": [
          "0 0 * * *"
        ]
      },
      "armScheduleEnd": {
        "type": "string",
        "title": "armScheduleEnd",
        "description": "Cron expression for the end time.",
        "examples": [
          "0 0 * * *"
        ]
      },
      "recordEverything": {
        "type": "boolean",
        "title": "recordEverything",
        "description": "Whether to record everything when this arm profile is active.",
        "examples": [
          true,
          false
        ]
      },
      "activationDelay": {
        "anyOf": [
          {
            "type": "number",
            "const": 0
          },
          {
            "type": "number",
            "const": 60000
          },
          {
            "type": "number",
            "const": 300000
          },
          {
            "type": "number",
            "const": 600000
          }
        ],
        "title": "activationDelay",
        "description": "Activation delay in milliseconds. Allowed values: 0 (none), 60000 (1 min), 300000 (5 min), 600000 (10 min)."
      },
      "createdAt": {
        "type": "number",
        "title": "createdAt",
        "description": "Arm profile creation time."
      },
      "updatedAt": {
        "type": "number",
        "title": "updatedAt",
        "description": "Arm profile update time."
      },
      "lcdMessage": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "DO_NOT_DISTURB"
              },
              "resetAt": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "UNIX timestamp when doorbell message should be removed (if not set then `nvr.doorbellSettings.defaultMessageResetTimeoutMs` is used, if set to `null` then interpreted as \"forever\")"
              }
            },
            "required": [
              "type"
            ],
            "description": "Show a pre-defined \"do not disturb\" message on the doorbell"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "LEAVE_PACKAGE_AT_DOOR"
              },
              "resetAt": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "UNIX timestamp when doorbell message should be removed (if not set then `nvr.doorbellSettings.defaultMessageResetTimeoutMs` is used, if set to `null` then interpreted as \"forever\")"
              }
            },
            "required": [
              "type"
            ],
            "description": "Show a pre-defined \"leave package at door\" message on the doorbell"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "CUSTOM_MESSAGE"
              },
              "resetAt": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "UNIX timestamp when doorbell message should be removed (if not set then `nvr.doorbellSettings.defaultMessageResetTimeoutMs` is used, if set to `null` then interpreted as \"forever\")"
              },
              "text": {
                "type": "string",
                "description": "The custom text message to show on the doorbell",
                "examples": [
                  "Hello world!"
                ]
              }
            },
            "required": [
              "type",
              "text"
            ],
            "description": "Show a custom text message on the doorbell"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "IMAGE"
              },
              "resetAt": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "UNIX timestamp when doorbell message should be removed (if not set then `nvr.doorbellSettings.defaultMessageResetTimeoutMs` is used, if set to `null` then interpreted as \"forever\")"
              },
              "text": {
                "type": "string",
                "description": "The ID of the custom image to show on the doorbell",
                "examples": [
                  "34225b30-fe6a-11af-1690-29424bd911c2.png"
                ]
              }
            },
            "required": [
              "type",
              "text"
            ],
            "description": "Show a custom image on the doorbell"
          }
        ],
        "title": "lcdMessage"
      },
      "createdQualities": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/channelQuality"
        },
        "minItems": 1,
        "description": "Array of quality levels of RTSPS streams. All qualities (high, medium, low) are available for all cameras. The package quality is only available for cameras with hasPackageCamera: true.",
        "examples": [
          [
            "high",
            "medium"
          ]
        ],
        "title": "createdQualities"
      },
      "channelQuality": {
        "type": "string",
        "enum": [
          "high",
          "medium",
          "low",
          "package"
        ],
        "title": "channelQuality"
      },
      "createdRtspsStreams": {
        "type": "object",
        "properties": {
          "high": {
            "type": "string",
            "format": "uri"
          },
          "medium": {
            "type": "string",
            "format": "uri"
          },
          "low": {
            "type": "string",
            "format": "uri"
          },
          "package": {
            "type": "string",
            "format": "uri"
          }
        },
        "additionalProperties": false,
        "description": "The RTSPS stream URLs for the camera",
        "examples": [
          {
            "high": "rtsps://192.168.1.1:7441/5nPr7RCmueGTKMP7?enableSrtp",
            "medium": "rtsps://192.168.1.1:7441/AbUgnDb5IqIEMidk?enableSrtp"
          }
        ],
        "title": "createdRtspsStreams"
      },
      "removedQualities": {
        "anyOf": [
          {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/channelQuality"
            },
            "minItems": 1
          },
          {
            "$ref": "#/components/schemas/channelQuality"
          }
        ],
        "description": "The array of quality levels for the RTSPS streams to be removed. All qualities (high, medium, low) are available for all cameras. The package quality is only available for cameras with hasPackageCamera: true.",
        "examples": [
          [
            "high",
            "medium"
          ]
        ],
        "title": "removedQualities"
      },
      "existingRtspsStreams": {
        "type": "object",
        "properties": {
          "high": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "medium": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "low": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "package": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          }
        },
        "additionalProperties": false,
        "description": "The RTSPS stream URLs for the camera. All qualities (high, medium, low) are available for all cameras. The package quality is only available for cameras with hasPackageCamera: true.",
        "examples": [
          {
            "high": "rtsps://192.168.1.1:7441/5nPr7RCmueGTKMP7?enableSrtp",
            "medium": "rtsps://192.168.1.1:7441/AbUgnDb5IqIEMidk?enableSrtp",
            "low": null,
            "package": null
          }
        ],
        "title": "existingRtspsStreams"
      },
      "snapshotChannel": {
        "type": "string",
        "enum": [
          "main",
          "package"
        ],
        "description": "Camera channel to capture snapshot from. Use \"package\" for cameras with a package camera (hasPackageCamera: true).",
        "title": "channel"
      },
      "forceHighQuality": {
        "type": "string",
        "enum": [
          "true",
          "false"
        ],
        "description": "Whether to force 1080P or higher resolution snapshot",
        "title": "forceHighQuality"
      },
      "talkbackSession": {
        "type": "object",
        "properties": {
          "url": {
            "$ref": "#/components/schemas/talkbackStreamUrl"
          },
          "codec": {
            "$ref": "#/components/schemas/talkbackStreamCodec"
          },
          "samplingRate": {
            "$ref": "#/components/schemas/talkbackStreamSamplingRate"
          },
          "bitsPerSample": {
            "$ref": "#/components/schemas/talkbackStreamBitsPerSample"
          }
        },
        "required": [
          "url",
          "codec",
          "samplingRate",
          "bitsPerSample"
        ],
        "description": "Talkback session information",
        "examples": [
          {
            "url": "rtp://192.168.1.123:7004",
            "codec": "opus",
            "samplingRate": 24000,
            "bitsPerSample": 16
          }
        ],
        "title": "talkbackSession"
      },
      "talkbackStreamUrl": {
        "type": "string",
        "format": "uri",
        "description": "Talkback stream URL",
        "examples": [
          "rtp://192.168.1.123:7004"
        ],
        "title": "talkbackStreamUrl"
      },
      "talkbackStreamCodec": {
        "type": "string",
        "description": "Audio format to use.",
        "examples": [
          "opus",
          "aac"
        ],
        "title": "talkbackStreamCodec"
      },
      "talkbackStreamSamplingRate": {
        "type": "integer",
        "exclusiveMinimum": 0,
        "description": "Sampling Rate.",
        "examples": [
          24000,
          22050
        ],
        "title": "talkbackStreamSamplingRate"
      },
      "talkbackStreamBitsPerSample": {
        "type": "integer",
        "exclusiveMinimum": 0,
        "description": "Bits per sample.",
        "examples": [
          16
        ],
        "title": "talkbackStreamBitsPerSample"
      },
      "sirenDurationSeconds": {
        "anyOf": [
          {
            "type": "number",
            "const": 5
          },
          {
            "type": "number",
            "const": 10
          },
          {
            "type": "number",
            "const": 20
          },
          {
            "type": "number",
            "const": 30
          }
        ],
        "description": "Duration of the siren activation in seconds.",
        "examples": [
          5,
          10,
          20,
          30
        ],
        "title": "sirenDurationSeconds"
      },
      "assetFileType": {
        "type": "string",
        "enum": [
          "animations"
        ],
        "description": "Device asset file type",
        "title": "assetFileType"
      },
      "fileSchema": {
        "type": "object",
        "properties": {
          "name": {
            "$ref": "#/components/schemas/fileName"
          },
          "type": {
            "$ref": "#/components/schemas/assetFileType"
          },
          "originalName": {
            "$ref": "#/components/schemas/fileOriginalName"
          },
          "path": {
            "$ref": "#/components/schemas/filePath"
          }
        },
        "required": [
          "name",
          "type",
          "path"
        ],
        "title": "fileSchema"
      },
      "fileName": {
        "type": "string",
        "description": "Unique ID for the asset file",
        "examples": [
          "34225b30-fe6a-11af-1690-29424bd911c2.png"
        ],
        "title": "fileName"
      },
      "fileOriginalName": {
        "type": "string",
        "description": "Original filename of the uploaded file",
        "examples": [
          "welcome-animation.png"
        ],
        "title": "fileOriginalName"
      },
      "filePath": {
        "type": "string",
        "description": "Path to the file on the filesystem",
        "examples": [
          "/data/animations/34225b30-fe6a-11af-1690-29424bd911c2.png"
        ],
        "title": "filePath"
      },
      "user": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/userId"
          },
          "name": {
            "type": "string",
            "description": "The user name (first-name + last-name).",
            "examples": [
              "John Doe"
            ]
          },
          "firstName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The user first-name.",
            "examples": [
              "John"
            ]
          },
          "lastName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The user last-name.",
            "examples": [
              "Doe"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "The user email.",
            "examples": [
              "john.doe@example.com"
            ]
          },
          "ucoreUserId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The unique id of the UniFi Identity user. Matches the id field of the corresponding UlpUser.",
            "examples": [
              "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
            ]
          },
          "modelKey": {
            "$ref": "#/components/schemas/userModelKey"
          }
        },
        "required": [
          "id",
          "name",
          "firstName",
          "lastName",
          "email",
          "ucoreUserId",
          "modelKey"
        ],
        "title": "user"
      },
      "userModelKey": {
        "type": "string",
        "const": "user",
        "description": "The model key of the user",
        "title": "userModelKey"
      },
      "ulpUserId": {
        "type": "string",
        "description": "The primary key of ulpUser",
        "examples": [
          "66d025b301ebc903e80003ea",
          "672094f900e26303e800062a"
        ],
        "title": "ulpUserId"
      },
      "ulpUser": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ulpUserId"
          },
          "firstName": {
            "type": "string",
            "description": "The first name of ulp user",
            "examples": [
              "John"
            ]
          },
          "lastName": {
            "type": "string",
            "description": "The last name of ulp user",
            "examples": [
              "Doe"
            ]
          },
          "fullName": {
            "type": "string",
            "description": "Fullname of ulp user",
            "examples": [
              "John Doe"
            ]
          },
          "email": {
            "type": "string",
            "description": "Email of ulp user, empty string when none is set in UniFi Identity",
            "examples": [
              "john.doe@example.com",
              ""
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "DEACTIVATED"
            ],
            "description": "Active status of ulp user",
            "examples": [
              "ACTIVE"
            ]
          },
          "modelKey": {
            "$ref": "#/components/schemas/ulpUserModelKey"
          }
        },
        "required": [
          "id",
          "firstName",
          "lastName",
          "fullName",
          "email",
          "status",
          "modelKey"
        ],
        "title": "ulpUser"
      },
      "ulpUserModelKey": {
        "type": "string",
        "const": "ulpUser",
        "description": "The model key of the ulpUser",
        "title": "ulpUserModelKey"
      }
    }
  }
}