{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/snow-software/json-schema/snow-software-hateoas-collection-of-license-extended-coverage-schema.json",
  "title": "HateoasCollectionOfLicenseExtendedCoverage",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/snow-software-coverage-api-openapi.yml#/components/schemas/HateoasCollectionOfLicenseExtendedCoverage",
  "allOf": [
    {
      "$ref": "#/$defs/FilteredResponseOfLicenseExtendedCoverage"
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "_links"
      ],
      "properties": {
        "_links": {
          "type": "array",
          "description": "A collection of links to related resources.",
          "items": {
            "$ref": "#/$defs/Link"
          }
        }
      }
    }
  ],
  "$defs": {
    "ExtendedCoverageReason": {
      "type": "string",
      "description": "The extended coverage reason.",
      "x-enumNames": [
        "Other",
        "Passive",
        "Disaster",
        "TestingOrDevelopment"
      ],
      "enum": [
        "Other",
        "Passive",
        "Disaster",
        "TestingOrDevelopment"
      ]
    },
    "FilteredResponseOfLicenseExtendedCoverage": {
      "type": "object",
      "description": "Filtered response.",
      "additionalProperties": false,
      "required": [
        "items",
        "pagination"
      ],
      "properties": {
        "items": {
          "type": "array",
          "description": "A collection of items.",
          "items": {
            "$ref": "#/$defs/LicenseExtendedCoverage"
          }
        },
        "pagination": {
          "description": "The pagination details.",
          "oneOf": [
            {
              "$ref": "#/$defs/Pagination"
            }
          ]
        }
      }
    },
    "HateoasResource": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "_links"
      ],
      "properties": {
        "_links": {
          "type": "array",
          "description": "A collection of links to related resources.",
          "items": {
            "$ref": "#/$defs/Link"
          }
        }
      }
    },
    "LicenseExtendedCoverage": {
      "allOf": [
        {
          "$ref": "#/$defs/HateoasResource"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "id": {
              "type": "string",
              "description": "The unique ID of the license.",
              "format": "guid"
            },
            "parentComputerId": {
              "type": "string",
              "description": "The unique ID of the parent computer.",
              "format": "guid"
            },
            "isParentComputerDatacenter": {
              "type": "boolean",
              "description": "```true``` if parent is datacenter; otherwise, ```false```."
            },
            "extendedComputerId": {
              "type": "string",
              "description": "The unique ID of the extended computer.",
              "format": "guid"
            },
            "applicationId": {
              "type": "string",
              "description": "The unique ID of the application.",
              "format": "guid"
            },
            "coveredApplicationId": {
              "type": [
                "string",
                "null"
              ],
              "description": "The unique ID of the application.",
              "format": "guid"
            },
            "reason": {
              "description": "The incomplete license reason.",
              "oneOf": [
                {
                  "$ref": "#/$defs/ExtendedCoverageReason"
                }
              ]
            },
            "reasonDescription": {
              "type": [
                "string",
                "null"
              ],
              "description": "The reason description."
            }
          }
        }
      ]
    },
    "Link": {
      "type": "object",
      "description": "Represents a hypermedia link referenced from a IResource, according to HATEOAS.",
      "additionalProperties": false,
      "properties": {
        "href": {
          "type": [
            "string",
            "null"
          ],
          "description": "The associated relative URL."
        },
        "rel": {
          "type": [
            "string",
            "null"
          ],
          "description": "Specifies the relationship between the current document and the linked document/resource."
        },
        "method": {
          "type": [
            "string",
            "null"
          ],
          "description": "The method to access related resources."
        }
      }
    },
    "Pagination": {
      "type": "object",
      "description": "The pagination details.",
      "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"
        }
      }
    }
  }
}