{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/eagle-eye-networks/json-schema/eagle-eye-networks-api-paginated-available-device-response-schema.json",
  "title": "ApiPaginatedAvailableDeviceResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/eagle-eye-networks-available-devices-api-openapi.yml#/components/schemas/ApiPaginatedAvailableDeviceResponse",
  "allOf": [
    {
      "$ref": "#/$defs/PaginatedResponseWithSize"
    },
    {
      "type": "object",
      "properties": {
        "results": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ApiAvailableDevice"
          }
        }
      }
    }
  ],
  "$defs": {
    "ApiAvailableDevice": {
      "description": "Represents a device found that is available to be added to the account. Note: Schema might change for new device types, so make sure any parsing code that has strict requirements only tries to parse device types it has been written for and doesn't try to parse everything.\n",
      "type": "object",
      "properties": {
        "deviceType": {
          "$ref": "#/$defs/DeviceType1"
        },
        "guid": {
          "$ref": "#/$defs/Guid4"
        },
        "state": {
          "type": "string",
          "enum": [
            "addable",
            "notSupported",
            "inOtherAccount",
            "unknown"
          ],
          "default": "unknown",
          "description": "Indicates if and how a device can be added. *As there might be future reasons why devices cannot be added clients should be written in such a way that they can handle new values to be added. In case a client doesn't understand the state, it should handle it as it handles the \"unknown\" state, which should be to still show the device, but tell the user to contact support to help. add the device.\nThe states:\n  * `addable`: Camera can be added and should work.\n  * `notSupported`: Indicates if the device can really be added, or if it is unsupported, due to for example an\nuntested firmware version or unexpected responses from the device. Unsupported devices are reported to help users debug why they cannot add a device. The users should contact support if they wish to add the device to their account.\n  * `inOtherAccount`: Indicates if the device has already been added to a different account, and it is thus not\npossible to add it to the current account. The user should contact support to resolve this issue.\n  * `unknown`: Indicates the camera is in a state that means it is visible, but cannot be added due to some\nissue. This state cane be transient, so users should be told to try again a few minutes later. If it is still in this state, users should contact support to help resolve the issue.\n"
        },
        "unknownCredentials": {
          "type": "boolean",
          "description": "No working credentials are known for this camera, and thus the device will not work directly after adding. The user can either supply credentials while adding the device, change them after adding, or reset the device and thus its credentials.\n"
        },
        "visibleByBridges": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BridgeId4"
          }
        },
        "make": {
          "description": "The manufacturer or brand of the camera.",
          "type": [
            "string",
            "null"
          ]
        },
        "model": {
          "description": "The model of the camera.",
          "type": [
            "string",
            "null"
          ]
        },
        "firmwareVersion": {
          "type": [
            "string",
            "null"
          ]
        },
        "ipAddress": {
          "allOf": [
            {
              "$ref": "#/$defs/IpAddress2"
            },
            {
              "description": "The IP address that is used to communicate to the device."
            }
          ]
        },
        "otherIpAddress": {
          "description": "Other known IP addresses of the device.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/IpAddress2"
          }
        },
        "visibleByBridgesDetailed": {
          "type": "array",
          "x-jsoninclude-nonnull-annotation": true,
          "items": {
            "$ref": "#/$defs/Bridge"
          }
        }
      },
      "required": [
        "deviceType",
        "guid",
        "state",
        "unknownCredentials",
        "visibleByBridges"
      ]
    },
    "Bridge": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/BridgeId4"
        },
        "name": {
          "type": "string",
          "description": "Name of the bridge."
        }
      }
    },
    "BridgeId4": {
      "type": "string",
      "pattern": "^(?:0[xX])?[0-9a-fA-F]{8}$",
      "description": "Unique ID of an EEN bridge.\n"
    },
    "DeviceType1": {
      "type": "string",
      "enum": [
        "camera",
        "speaker",
        "display",
        "multiCamera"
      ]
    },
    "Guid4": {
      "type": "string"
    },
    "IpAddress2": {
      "type": "string",
      "pattern": "^(?:25[0-5]|2[0-4]\\d|[0-1]?\\d{1,2})(?:\\.(?:25[0-5]|2[0-4]\\d|[0-1]?\\d{1,2})){3}$"
    },
    "PaginatedResponseNoTotalSize": {
      "type": "object",
      "description": "Used to wrap results for a paginated response, containing information on how to retrieve further pages.\n",
      "properties": {
        "nextPageToken": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true,
          "description": "Token to retrieve the next page. The value of this token is passed into the field pageToken. This value can be null if there is no next page.\n"
        },
        "prevPageToken": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true,
          "description": "Token to retrieve the previous page. The value of this token is passed into the field pageToken. This value can be null of there is no previous page.\n"
        },
        "results": {
          "type": "array",
          "readOnly": true,
          "description": "The result set from a collection API call.",
          "items": {
            "type": "object"
          }
        }
      },
      "required": [
        "nextPageToken",
        "prevPageToken",
        "results"
      ]
    },
    "PaginatedResponseWithSize": {
      "description": "Used to wrap results for a paginated response, containing information on how to retrieve further pages and  the total number of results.  \n",
      "allOf": [
        {
          "$ref": "#/$defs/PaginatedResponseNoTotalSize"
        },
        {
          "properties": {
            "totalSize": {
              "type": "integer",
              "readOnly": true,
              "description": "Size of the total result set.\n"
            }
          },
          "required": [
            "totalSize"
          ]
        }
      ]
    }
  }
}