{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-cognitive-services/json-schema/microsoft-cognitive-services-usage-list-result-schema.json",
  "title": "UsageListResult",
  "description": "The response to a list usage request.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/microsoft-cognitive-services-usages-api-openapi.yml#/components/schemas/UsageListResult",
  "type": "object",
  "properties": {
    "nextLink": {
      "type": "string",
      "description": "The link used to get the next page of Usages."
    },
    "value": {
      "type": "array",
      "description": "The list of usages for Cognitive Service account.",
      "items": {
        "$ref": "#/$defs/Usage"
      },
      "x-ms-identifiers": [
        "name"
      ]
    }
  },
  "$defs": {
    "MetricName": {
      "type": "object",
      "description": "A metric name.",
      "properties": {
        "value": {
          "type": "string",
          "description": "The name of the metric."
        },
        "localizedValue": {
          "type": "string",
          "description": "The friendly name of the metric."
        }
      }
    },
    "QuotaScopeType": {
      "type": "string",
      "description": "The quota scope that determines the level at which the quota is applied.",
      "enum": [
        "Regional",
        "Global",
        "DataZone",
        "Classic"
      ],
      "x-ms-enum": {
        "name": "QuotaScopeType",
        "modelAsString": true,
        "values": [
          {
            "name": "Regional",
            "value": "Regional"
          },
          {
            "name": "Global",
            "value": "Global"
          },
          {
            "name": "DataZone",
            "value": "DataZone"
          },
          {
            "name": "Classic",
            "value": "Classic"
          }
        ]
      }
    },
    "QuotaUsageStatus": {
      "type": "string",
      "description": "Cognitive Services account quota usage status.",
      "enum": [
        "Included",
        "Blocked",
        "InOverage",
        "Unknown"
      ],
      "x-ms-enum": {
        "name": "QuotaUsageStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "Included",
            "value": "Included"
          },
          {
            "name": "Blocked",
            "value": "Blocked"
          },
          {
            "name": "InOverage",
            "value": "InOverage"
          },
          {
            "name": "Unknown",
            "value": "Unknown"
          }
        ]
      }
    },
    "UnitType": {
      "type": "string",
      "description": "The unit of the metric.",
      "enum": [
        "Count",
        "Bytes",
        "Seconds",
        "Percent",
        "CountPerSecond",
        "BytesPerSecond",
        "Milliseconds"
      ],
      "x-ms-enum": {
        "name": "UnitType",
        "modelAsString": true,
        "values": [
          {
            "name": "Count",
            "value": "Count"
          },
          {
            "name": "Bytes",
            "value": "Bytes"
          },
          {
            "name": "Seconds",
            "value": "Seconds"
          },
          {
            "name": "Percent",
            "value": "Percent"
          },
          {
            "name": "CountPerSecond",
            "value": "CountPerSecond"
          },
          {
            "name": "BytesPerSecond",
            "value": "BytesPerSecond"
          },
          {
            "name": "Milliseconds",
            "value": "Milliseconds"
          }
        ]
      }
    },
    "Usage": {
      "type": "object",
      "description": "The usage data for a usage request.",
      "properties": {
        "id": {
          "type": "string",
          "format": "arm-id",
          "description": "Fully qualified resource ID for the usage. Ex - /subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/usages/{usageName}",
          "readOnly": true
        },
        "type": {
          "type": "string",
          "description": "The type of the usage resource. E.g. \"Microsoft.CognitiveServices/locations/usages\"",
          "readOnly": true
        },
        "unit": {
          "$ref": "#/$defs/UnitType",
          "description": "The unit of the metric."
        },
        "name": {
          "$ref": "#/$defs/MetricName",
          "description": "The name information for the metric."
        },
        "quotaPeriod": {
          "type": "string",
          "description": "The quota period used to summarize the usage values."
        },
        "limit": {
          "type": "number",
          "format": "double",
          "description": "Maximum value for this metric."
        },
        "currentValue": {
          "type": "number",
          "format": "double",
          "description": "Current value for this metric."
        },
        "nextResetTime": {
          "type": "string",
          "description": "Next reset time for current quota."
        },
        "status": {
          "$ref": "#/$defs/QuotaUsageStatus",
          "description": "Cognitive Services account quota usage status."
        },
        "scopeType": {
          "$ref": "#/$defs/QuotaScopeType",
          "description": "The scope type of the quota usage."
        },
        "scopeId": {
          "type": [
            "string",
            "null"
          ],
          "description": "The scope identifier of the quota usage."
        }
      }
    }
  }
}