{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/snow-software/json-schema/snow-software-maintenance-period-schema.json",
  "title": "MaintenancePeriod",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/snow-software-periods-api-openapi.yml#/components/schemas/MaintenancePeriod",
  "allOf": [
    {
      "$ref": "#/$defs/CreatedHateoasResponse"
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "validFrom": {
          "type": [
            "string",
            "null"
          ],
          "description": "The valid form date.",
          "format": "date-time"
        },
        "validTo": {
          "type": [
            "string",
            "null"
          ],
          "description": "The valid to date.",
          "format": "date-time"
        },
        "hasUpgradeRights": {
          "type": "boolean",
          "description": "```true``` if has upgrade rights; otherwise, ```false```."
        },
        "maintenanceCost": {
          "type": [
            "number",
            "null"
          ],
          "description": "The maintenance cost.",
          "format": "decimal"
        },
        "supportCost": {
          "type": [
            "number",
            "null"
          ],
          "description": "The support cost.",
          "format": "decimal"
        },
        "purchaseCurrency": {
          "type": [
            "string",
            "null"
          ],
          "description": "The purchase currency."
        },
        "invoiceReference": {
          "type": [
            "string",
            "null"
          ],
          "description": "The invoice reference."
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "description": "The notes."
        }
      }
    }
  ],
  "$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"
          }
        }
      }
    },
    "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."
        }
      }
    }
  }
}