{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/snow-software/json-schema/snow-software-computer-assignment-schema.json",
  "title": "ComputerAssignment",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/snow-software-assignments-api-openapi.yml#/components/schemas/ComputerAssignment",
  "allOf": [
    {
      "$ref": "#/$defs/CreatedHateoasResponse"
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "licenseId": {
          "type": "string",
          "description": "The unique ID of the license.",
          "format": "guid"
        },
        "applicationId": {
          "type": [
            "string",
            "null"
          ],
          "description": "The unique ID of the application.",
          "format": "guid"
        },
        "computerId": {
          "type": "string",
          "description": "The unique ID of the computer.",
          "format": "guid"
        },
        "quantity": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The assigned quantity of licenses.",
          "format": "int32"
        },
        "numberOfSupportedVirtualMachines": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The number of supported virtual machines.",
          "format": "int32"
        },
        "hasVmUseRights": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "```true``` if has VM use rights; otherwise, ```false```."
        },
        "invalidAssignmentReasons": {
          "description": "Invalid assignment reasons.",
          "oneOf": [
            {
              "$ref": "#/$defs/InvalidAssignmentReasons"
            }
          ]
        },
        "virtualMachines": {
          "type": [
            "array",
            "null"
          ],
          "description": "The virtual machines.",
          "items": {
            "type": "string",
            "format": "guid"
          }
        }
      }
    }
  ],
  "$defs": {
    "CreatedHateoasResponse": {
      "allOf": [
        {
          "$ref": "#/$defs/HateoasResponse"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "id": {
              "type": "string",
              "description": "The unique ID of the resource.",
              "format": "guid"
            }
          }
        }
      ]
    },
    "HateoasResponse": {
      "type": "object",
      "description": "Abstract class for IResource.",
      "x-abstract": true,
      "additionalProperties": false,
      "properties": {
        "_links": {
          "type": "array",
          "description": "A collection of links to related resources.",
          "items": {
            "$ref": "#/$defs/Link"
          }
        }
      }
    },
    "InvalidAssignmentReasons": {
      "type": "integer",
      "description": "The invalid assignment reason.",
      "x-enumFlags": true,
      "x-enumNames": [
        "None",
        "SubscriptionExpired",
        "Unassigned",
        "ComputerMissing",
        "InactiveComputer",
        "UserMissing",
        "DatacenterMissing",
        "InvalidMetric",
        "NoEliglibleApplicationInstalled",
        "NoEligibleApplicationIsInstalledOnAnyComputerWhereUserIsPrimary",
        "UserHasNotUsedAnyEligibleApplication",
        "Incomplete",
        "OverAssignment",
        "InvalidQuantity",
        "UserHasNotUsedAnyEligibleApplicationWithinPeriod",
        "InvalidMetricGroup",
        "InvalidProcessorCount"
      ],
      "enum": [
        0,
        1,
        2,
        4,
        8,
        16,
        32,
        64,
        128,
        256,
        512,
        1024,
        2048,
        4096,
        8192,
        16384,
        32768
      ]
    },
    "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."
        }
      }
    }
  }
}