{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rwth-aachen-university/json-schema/rwth-aachen-university-resource-quota-dto-response-schema.json",
  "title": "ResourceQuotaDtoResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rwth-aachen-university-projectresourcequota-api-openapi.yml#/components/schemas/ResourceQuotaDtoResponse",
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/$defs/ResourceQuotaDto"
    },
    "isSuccess": {
      "type": "boolean",
      "readOnly": true
    },
    "statusCode": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int32"
    },
    "traceId": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "additionalProperties": false,
  "$defs": {
    "QuotaDto": {
      "required": [
        "unit",
        "value"
      ],
      "type": "object",
      "properties": {
        "value": {
          "type": "number",
          "description": "The value of the quota.",
          "format": "float"
        },
        "unit": {
          "$ref": "#/$defs/QuotaUnit"
        }
      },
      "additionalProperties": false,
      "description": "Represents a Data Transfer Object (DTO) for quota values."
    },
    "QuotaUnit": {
      "enum": [
        "https://qudt.org/vocab/unit/BYTE",
        "https://qudt.org/vocab/unit/KibiBYTE",
        "https://qudt.org/vocab/unit/MebiBYTE",
        "https://qudt.org/vocab/unit/GibiBYTE",
        "https://qudt.org/vocab/unit/TebiBYTE",
        "https://qudt.org/vocab/unit/PebiBYTE"
      ],
      "type": "string",
      "description": "Specifies the unit of quota."
    },
    "ResourceMinimalDto": {
      "required": [
        "id"
      ],
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier for the resource.",
          "format": "uuid"
        }
      },
      "additionalProperties": false,
      "description": "Represents a minimal Data Transfer Object (DTO) for a resource, containing essential identifiers."
    },
    "ResourceQuotaDto": {
      "required": [
        "resource"
      ],
      "type": "object",
      "properties": {
        "resource": {
          "$ref": "#/$defs/ResourceMinimalDto"
        },
        "usedPercentage": {
          "type": [
            "number",
            "null"
          ],
          "description": "The percentage of quota used by the resource.",
          "format": "float"
        },
        "used": {
          "$ref": "#/$defs/QuotaDto"
        },
        "versions": {
          "$ref": "#/$defs/QuotaDto"
        },
        "reserved": {
          "$ref": "#/$defs/QuotaDto"
        }
      },
      "additionalProperties": false,
      "description": "Represents a Data Transfer Object (DTO) containing quota information for a resource."
    }
  }
}