{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ovh/json-schema/ovh-metrics-api-service-schema.json",
  "title": "metrics.api.Service",
  "description": "Structure holding the elements about a service",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ovh-v1-metrics-openapi.yml#/components/schemas/metrics.api.Service",
  "type": "object",
  "properties": {
    "description": {
      "type": "string",
      "description": "Description of a service",
      "readOnly": true
    },
    "name": {
      "type": "string",
      "description": "Name of a service",
      "readOnly": true
    },
    "offer": {
      "type": "string",
      "description": "Offer used for the service",
      "readOnly": true
    },
    "quota": {
      "allOf": [
        {
          "$ref": "#/$defs/metrics.api.Option"
        }
      ],
      "description": "Quota used for the service",
      "readOnly": true
    },
    "region": {
      "allOf": [
        {
          "$ref": "#/$defs/metrics.api.Region"
        }
      ],
      "description": "Region holding the service",
      "readOnly": true
    },
    "shouldUpgrade": {
      "type": "boolean",
      "description": "Indicator if the service should be upgraded based on current quota and offer",
      "readOnly": true
    },
    "status": {
      "allOf": [
        {
          "$ref": "#/$defs/metrics.api.ServiceStatusEnum"
        }
      ],
      "description": "Status of a service",
      "readOnly": true
    },
    "type": {
      "allOf": [
        {
          "$ref": "#/$defs/metrics.api.OfferTypeEnum"
        }
      ],
      "description": "Type of the service: cloud or live",
      "readOnly": true
    }
  },
  "$defs": {
    "metrics.api.OfferTypeEnum": {
      "type": "string",
      "description": "Type of the service",
      "enum": [
        "cloud",
        "live"
      ]
    },
    "metrics.api.Option": {
      "type": "object",
      "description": "Structure holding the options for a service",
      "properties": {
        "ddp": {
          "type": "integer",
          "description": "Daily data points",
          "readOnly": true
        },
        "lastModification": {
          "type": "string",
          "description": "Time of last modification",
          "format": "date-time",
          "readOnly": true
        },
        "mads": {
          "type": "integer",
          "description": "Monthly active device streams",
          "readOnly": true
        }
      }
    },
    "metrics.api.Region": {
      "type": "object",
      "description": "Structure holding the elements about a region",
      "properties": {
        "description": {
          "type": "string",
          "description": "Description of a region",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "Name of a region",
          "readOnly": true
        }
      }
    },
    "metrics.api.ServiceStatusEnum": {
      "type": "string",
      "description": "Status of of the service",
      "enum": [
        "alive",
        "dead",
        "disabled",
        "new"
      ]
    }
  }
}