{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/snow-software/json-schema/snow-software-filtered-response-with-links-of-computer-application-usage-summary-schema.json",
  "title": "FilteredResponseWithLinksOfComputerApplicationUsageSummary",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/snow-software-computer-applications-api-openapi.yml#/components/schemas/FilteredResponseWithLinksOfComputerApplicationUsageSummary",
  "allOf": [
    {
      "$ref": "#/$defs/BaseResponse"
    },
    {
      "type": "object",
      "description": "Generic response class supporting filtering and including links.",
      "additionalProperties": false,
      "required": [
        "items",
        "pagination"
      ],
      "properties": {
        "items": {
          "type": "array",
          "description": "A collection of items returned in the response.",
          "items": {
            "$ref": "#/$defs/ComputerApplicationUsageSummary"
          }
        },
        "pagination": {
          "description": "The pagination details.",
          "oneOf": [
            {
              "$ref": "#/$defs/PaginationResponse"
            }
          ]
        }
      }
    }
  ],
  "$defs": {
    "BaseResponse": {
      "type": "object",
      "description": "Base response class.",
      "additionalProperties": false,
      "required": [
        "_links"
      ],
      "properties": {
        "_links": {
          "type": "array",
          "description": "A collection of links to related resources.",
          "items": {
            "$ref": "#/$defs/Link"
          }
        }
      }
    },
    "ComputerApplicationUsageSummary": {
      "allOf": [
        {
          "$ref": "#/$defs/BaseResponse"
        },
        {
          "type": "object",
          "description": "Response class for application usage summary.",
          "additionalProperties": false,
          "required": [
            "applicationId"
          ],
          "properties": {
            "applicationId": {
              "type": "string",
              "description": "The unique ID of the application.",
              "format": "guid"
            },
            "computers": {
              "type": "integer",
              "description": "The number of computers on which the application was used.",
              "format": "int32"
            },
            "users": {
              "type": "integer",
              "description": "The number of users who used the application.",
              "format": "int32"
            },
            "installations": {
              "type": "integer",
              "description": "The number of installations of the application.",
              "format": "int32"
            }
          }
        }
      ]
    },
    "Link": {
      "type": "object",
      "required": [
        "href",
        "rel",
        "method"
      ],
      "properties": {
        "href": {
          "type": "string",
          "description": "The associated relative URL."
        },
        "rel": {
          "type": "string",
          "description": "Specifies the relationship between the current document and the linked document/resource."
        },
        "method": {
          "type": "string",
          "description": "The method to access related resources."
        }
      }
    },
    "PaginationResponse": {
      "type": "object",
      "description": "Generic response class for the pagination part. Properties are annotated using DataMemberAttribute so that we're aligned with REST style guide regarding the json payload.",
      "additionalProperties": false,
      "required": [
        "page_size",
        "page_number"
      ],
      "properties": {
        "page_size": {
          "type": "integer",
          "description": "The page size you requested.",
          "format": "int32"
        },
        "page_number": {
          "type": "integer",
          "description": "The page number you requested.",
          "format": "int32"
        },
        "total_pages": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The total number of pages.",
          "format": "int32"
        },
        "total_items": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The total number of items.",
          "format": "int32"
        }
      }
    }
  }
}