{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/eagle-eye-networks/json-schema/eagle-eye-networks-api-paginated-resource-grant-response-schema.json",
  "title": "ApiPaginatedResourceGrantResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/eagle-eye-networks-resource-grants-api-openapi.yml#/components/schemas/ApiPaginatedResourceGrantResponse",
  "allOf": [
    {
      "$ref": "#/$defs/PaginatedResponseWithSize"
    },
    {
      "type": "object",
      "properties": {
        "results": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ResourceGrantGet"
          }
        }
      }
    }
  ],
  "$defs": {
    "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"
          ]
        }
      ]
    },
    "ResourceGrant": {
      "properties": {
        "id": {
          "type": "string",
          "readOnly": true
        },
        "resourceId": {
          "type": "string"
        },
        "userId": {
          "type": "string"
        },
        "resourceType": {
          "$ref": "#/$defs/ResourceType"
        },
        "createTimestamp": {
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "options": {
          "$ref": "#/$defs/ResourceGrantOptions"
        }
      }
    },
    "ResourceGrantGet": {
      "allOf": [
        {
          "$ref": "#/$defs/ResourceGrant"
        }
      ],
      "required": [
        "id",
        "resourceId",
        "userId",
        "resourceType",
        "createTimestamp",
        "options"
      ]
    },
    "ResourceGrantOptions": {
      "type": "object",
      "properties": {
        "expirationTimestamp": {
          "type": "string",
          "format": "date-time",
          "description": "The date when access to resource ends. This can be only set for accounts."
        }
      }
    },
    "ResourceType": {
      "type": "string",
      "enum": [
        "layout",
        "camera",
        "location",
        "account",
        "speaker",
        "multiCamera"
      ]
    }
  }
}