{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/snow-software/json-schema/snow-software-license-cost-schema.json",
  "title": "LicenseCost",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/snow-software-costs-api-openapi.yml#/components/schemas/LicenseCost",
  "allOf": [
    {
      "$ref": "#/$defs/HateoasResource"
    },
    {
      "type": "object",
      "description": "The license cost.",
      "additionalProperties": false,
      "properties": {
        "licenseId": {
          "type": "string",
          "description": "The unique ID of the license.",
          "format": "guid"
        },
        "organizationId": {
          "type": "string",
          "description": "The unique ID of the organization.",
          "format": "guid"
        },
        "licenseQuantity": {
          "type": "integer",
          "description": "The quantity.",
          "format": "int32"
        },
        "licensePurchaseCost": {
          "type": "number",
          "description": "The license purchase value.",
          "format": "decimal"
        },
        "currentMaintenanceCost": {
          "type": "number",
          "description": "The current maintenance cost.",
          "format": "decimal"
        },
        "accumulatedMaintenanceCost": {
          "type": "number",
          "description": "The accumulated maintenance cost.",
          "format": "decimal"
        },
        "currentSupportCost": {
          "type": "number",
          "description": "The current support cost.",
          "format": "decimal"
        },
        "accumulatedSupportCost": {
          "type": "number",
          "description": "The accumulated support cost.",
          "format": "decimal"
        },
        "totalCost": {
          "type": "number",
          "description": "The total license cost.",
          "format": "decimal"
        },
        "currency": {
          "type": [
            "string",
            "null"
          ],
          "description": "The currency."
        }
      }
    }
  ],
  "$defs": {
    "HateoasResource": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "_links"
      ],
      "properties": {
        "_links": {
          "type": "array",
          "description": "A collection of links to related resources.",
          "items": {
            "$ref": "#/$defs/Link"
          }
        }
      }
    },
    "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."
        }
      }
    }
  }
}