{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-traffic-manager/json-schema/microsoft-azure-traffic-manager-heat-map-model-schema.json",
  "title": "HeatMapModel",
  "description": "Class representing a Traffic Manager HeatMap.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-traffic-manager-subscriptions-api-openapi.yml#/components/schemas/HeatMapModel",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/HeatMapProperties",
      "description": "The properties of the Traffic Manager HeatMap.",
      "x-ms-client-flatten": true
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/ProxyResource"
    }
  ],
  "$defs": {
    "HeatMapEndpoint": {
      "type": "object",
      "description": "Class which is a sparse representation of a Traffic Manager endpoint.",
      "properties": {
        "resourceId": {
          "type": "string",
          "description": "The ARM Resource ID of this Traffic Manager endpoint."
        },
        "endpointId": {
          "type": "integer",
          "format": "int32",
          "description": "A number uniquely identifying this endpoint in query experiences."
        }
      }
    },
    "HeatMapProperties": {
      "type": "object",
      "description": "Class representing a Traffic Manager HeatMap properties.",
      "properties": {
        "startTime": {
          "type": "string",
          "format": "date-time",
          "description": "The beginning of the time window for this HeatMap, inclusive."
        },
        "endTime": {
          "type": "string",
          "format": "date-time",
          "description": "The ending of the time window for this HeatMap, exclusive."
        },
        "endpoints": {
          "type": "array",
          "description": "The endpoints used in this HeatMap calculation.",
          "items": {
            "$ref": "#/$defs/HeatMapEndpoint"
          }
        },
        "trafficFlows": {
          "type": "array",
          "description": "The traffic flows produced in this HeatMap calculation.",
          "items": {
            "$ref": "#/$defs/TrafficFlow"
          }
        }
      }
    },
    "ProxyResource": {
      "type": "object",
      "description": "The resource model definition for a ARM proxy resource. It will have everything other than required location and tags",
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ]
    },
    "QueryExperience": {
      "type": "object",
      "description": "Class representing a Traffic Manager HeatMap query experience properties.",
      "properties": {
        "endpointId": {
          "type": "integer",
          "format": "int32",
          "description": "The id of the endpoint from the 'endpoints' array which these queries were routed to."
        },
        "queryCount": {
          "type": "integer",
          "format": "int32",
          "description": "The number of queries originating from this location."
        },
        "latency": {
          "type": "number",
          "format": "double",
          "description": "The latency experienced by queries originating from this location."
        }
      },
      "required": [
        "endpointId",
        "queryCount"
      ]
    },
    "Resource": {
      "type": "object",
      "description": "The core properties of ARM resources",
      "properties": {
        "id": {
          "type": "string",
          "format": "arm-id",
          "description": "Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}"
        },
        "name": {
          "type": "string",
          "description": "The name of the resource"
        },
        "type": {
          "type": "string",
          "description": "The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles."
        }
      },
      "x-ms-azure-resource": true
    },
    "TrafficFlow": {
      "type": "object",
      "description": "Class representing a Traffic Manager HeatMap traffic flow properties.",
      "properties": {
        "sourceIp": {
          "type": "string",
          "description": "The IP address that this query experience originated from."
        },
        "latitude": {
          "type": "number",
          "format": "double",
          "description": "The approximate latitude that these queries originated from."
        },
        "longitude": {
          "type": "number",
          "format": "double",
          "description": "The approximate longitude that these queries originated from."
        },
        "queryExperiences": {
          "type": "array",
          "description": "The query experiences produced in this HeatMap calculation.",
          "items": {
            "$ref": "#/$defs/QueryExperience"
          }
        }
      }
    }
  }
}