{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-front-door/json-schema/microsoft-azure-front-door-timeseries-schema.json",
  "title": "Timeseries",
  "description": "Defines the Timeseries",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-front-door-reports-api-openapi.yml#/components/schemas/Timeseries",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/TimeseriesProperties",
      "description": "The properties of a Timeseries",
      "x-ms-client-flatten": true
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/Resource"
    }
  ],
  "$defs": {
    "AggregationInterval": {
      "type": "string",
      "description": "The aggregation interval of the Timeseries",
      "enum": [
        "Hourly",
        "Daily"
      ],
      "x-ms-enum": {
        "name": "AggregationInterval",
        "modelAsString": true,
        "values": [
          {
            "name": "Hourly",
            "value": "Hourly",
            "description": "Hourly"
          },
          {
            "name": "Daily",
            "value": "Daily",
            "description": "Daily"
          }
        ]
      }
    },
    "Resource": {
      "type": "object",
      "description": "Common resource representation.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Resource ID.",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "Resource name.",
          "readOnly": true
        },
        "type": {
          "type": "string",
          "description": "Resource type.",
          "readOnly": true
        },
        "location": {
          "type": "string",
          "description": "Resource location."
        },
        "tags": {
          "type": "object",
          "description": "Resource tags.",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "x-ms-azure-resource": true
    },
    "TimeseriesDataPoint": {
      "type": "object",
      "description": "Defines a timeseries datapoint used in a timeseries",
      "properties": {
        "dateTimeUTC": {
          "type": "string",
          "description": "The DateTime of the Timeseries data point in UTC"
        },
        "value": {
          "type": "number",
          "format": "float",
          "description": "The Value of the Timeseries data point"
        }
      }
    },
    "TimeseriesProperties": {
      "type": "object",
      "description": "Defines the properties of a timeseries",
      "properties": {
        "endpoint": {
          "type": "string",
          "description": "The endpoint associated with the Timeseries data point"
        },
        "startDateTimeUTC": {
          "type": "string",
          "description": "The start DateTime of the Timeseries in UTC"
        },
        "endDateTimeUTC": {
          "type": "string",
          "description": "The end DateTime of the Timeseries in UTC"
        },
        "aggregationInterval": {
          "$ref": "#/$defs/AggregationInterval",
          "description": "The aggregation interval of the Timeseries"
        },
        "timeseriesType": {
          "$ref": "#/$defs/TimeseriesType",
          "description": "The type of Timeseries"
        },
        "country": {
          "type": "string",
          "description": "The country associated with the Timeseries. Values are country ISO codes as specified here- https://www.iso.org/iso-3166-country-codes.html"
        },
        "timeseriesData": {
          "type": "array",
          "description": "The set of data points for the timeseries",
          "items": {
            "$ref": "#/$defs/TimeseriesDataPoint"
          }
        }
      }
    },
    "TimeseriesType": {
      "type": "string",
      "description": "The type of Timeseries",
      "enum": [
        "MeasurementCounts",
        "LatencyP50",
        "LatencyP75",
        "LatencyP95"
      ],
      "x-ms-enum": {
        "name": "TimeseriesType",
        "modelAsString": true,
        "values": [
          {
            "name": "MeasurementCounts",
            "value": "MeasurementCounts",
            "description": "MeasurementCounts"
          },
          {
            "name": "LatencyP50",
            "value": "LatencyP50",
            "description": "LatencyP50"
          },
          {
            "name": "LatencyP75",
            "value": "LatencyP75",
            "description": "LatencyP75"
          },
          {
            "name": "LatencyP95",
            "value": "LatencyP95",
            "description": "LatencyP95"
          }
        ]
      }
    }
  }
}