{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/snow-software/json-schema/snow-software-organization-assignment-schema.json",
  "title": "OrganizationAssignment",
  "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/OrganizationAssignment",
  "allOf": [
    {
      "$ref": "#/$defs/CreatedHateoasResponse"
    },
    {
      "type": "object",
      "description": "The organization assignment.",
      "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"
        },
        "organizationId": {
          "type": "string",
          "description": "The unique ID of the organization.",
          "format": "guid"
        },
        "quantity": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The assigned quantity of licenses.",
          "format": "int32"
        },
        "isAutoAllocated": {
          "type": "boolean",
          "description": "```true``` if has auto allocate selected; otherwise, ```false```."
        }
      }
    }
  ],
  "$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."
        }
      }
    }
  }
}