{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/acronis/main/json-schema/acronis-offering-item-list-schema.json",
  "title": "offeringItemList",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/acronis-tenants-api-openapi.yml#/components/schemas/offeringItemList",
  "type": "object",
  "required": [
    "timestamp",
    "items"
  ],
  "properties": {
    "paging": {
      "$ref": "#/$defs/paging"
    },
    "timestamp": {
      "$ref": "#/$defs/item1"
    },
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/items_3"
      }
    }
  },
  "$defs": {
    "item1": {
      "description": "RFC3339 Formatted date.",
      "type": "string",
      "pattern": "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?([\\+\\-]\\d{2}\\:\\d{2})?",
      "minLength": 19,
      "maxLength": 32
    },
    "items_3": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "application_id",
        "name",
        "edition",
        "usage_name",
        "tenant_id",
        "status",
        "type",
        "measurement_unit"
      ],
      "properties": {
        "application_id": {
          "$ref": "#/$defs/uuid"
        },
        "name": {
          "type": "string"
        },
        "edition": {
          "description": "This field can have a null value.",
          "type": [
            "string",
            "null"
          ]
        },
        "usage_name": {
          "type": "string"
        },
        "tenant_id": {
          "$ref": "#/$defs/uuid"
        },
        "updated_at": {
          "$ref": "#/$defs/item1"
        },
        "deleted_at": {
          "description": "Soft deletion timestamp.",
          "allOf": [
            {
              "$ref": "#/$defs/item1"
            }
          ]
        },
        "status": {
          "description": "Status of offering item: 1 - item turned on, 0 - off.",
          "enum": [
            0,
            1
          ],
          "type": "integer"
        },
        "locked": {
          "description": "If true, this item status cannot be changed.",
          "type": "boolean"
        },
        "quota": {
          "$ref": "#/$defs/quota"
        },
        "type": {
          "$ref": "#/$defs/offeringItemType"
        },
        "infra_id": {
          "$ref": "#/$defs/uuid"
        },
        "measurement_unit": {
          "$ref": "#/$defs/measurementUnits"
        }
      }
    },
    "measurementUnits": {
      "description": "Measurement unit in which offering item's usages are kept.",
      "enum": [
        "bytes",
        "quantity",
        "seconds",
        "n/a"
      ],
      "type": "string"
    },
    "offeringItemType": {
      "enum": [
        "count",
        "feature",
        "infra"
      ],
      "type": "string"
    },
    "paging": {
      "title": "Generic paging parameters schema",
      "type": "object",
      "properties": {
        "cursors": {
          "type": "object",
          "properties": {
            "after": {
              "type": "string"
            }
          }
        }
      }
    },
    "quota": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "value",
        "overage",
        "version"
      ],
      "properties": {
        "value": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0
        },
        "overage": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0
        },
        "version": {
          "description": "Version of the quota. Equals to 0 if `value` and `overage` are `null`. Otherwise, contains the version number.",
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "uuid": {
      "type": "string",
      "pattern": "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}",
      "minLength": 36,
      "maxLength": 36
    }
  }
}