{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/palo-alto-networks/main/json-schema/palo-alto-networks-types-license-stats-schema.json",
  "title": "types.LicenseStats",
  "description": "LicenseStats holds the console license stats",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/palo-alto-networks-stats-api-openapi.yml#/components/schemas/types.LicenseStats",
  "properties": {
    "avg": {
      "description": "Avg is the average number of credits.\n",
      "format": "double",
      "type": "number"
    },
    "containerDefenders": {
      "description": "ContainerDefenders is the total number of container defenders.\n",
      "type": "integer"
    },
    "dailySamplesDefenders": {
      "description": "DailySamplesDefenders holds the last 30 daily credits averages.\n",
      "items": {
        "$ref": "#/$defs/float64"
      },
      "type": "array"
    },
    "exceeded": {
      "description": "Exceeded indicates the number of credits exceeded license.\n",
      "type": "boolean"
    },
    "hostDefenders": {
      "description": "HostDefenders is the total number of host defenders.\n",
      "type": "integer"
    },
    "hourAvg": {
      "description": "HourAvg is the average number of credits per hour.\n",
      "format": "double",
      "type": "number"
    },
    "hourSamples": {
      "description": "HourSamples is the number of hourly samples collected.\n",
      "format": "double",
      "type": "number"
    },
    "monthlyUsage": {
      "description": "MonthlyUsage holds the last 24 monthly usage averages.\n",
      "items": {
        "$ref": "#/$defs/types.AllDefendersUsage"
      },
      "type": "array"
    },
    "msg": {
      "description": "Msg is the license exceeded error/warning message to show.\n",
      "type": "string"
    },
    "onDemandCredits": {
      "description": "OnDemandCredits is the number of on demand credits used during the current contract.\n",
      "type": "integer"
    },
    "protectedFunctions": {
      "description": "ProtectedFunctions is the number of serverless functions that have a defender installed.\n",
      "format": "double",
      "type": "number"
    },
    "scannedFunctions": {
      "description": "ScannedFunctions is the number functions being scanned for vulnerabilities and compliance issues without a defender installed.\n",
      "format": "double",
      "type": "number"
    },
    "serverlessTimestamp": {
      "description": "ServerlessTimestamp is the timestamp for the last serverless credit calculation.\n",
      "format": "date-time",
      "type": "string"
    },
    "timestamp": {
      "description": "Timestamp is the last collection timestamp.\n",
      "format": "date-time",
      "type": "string"
    },
    "totalCreditUsage": {
      "description": "TotalCreditUsage is the total amount of credits used from the beginning of the current contract.\n",
      "type": "integer"
    }
  },
  "type": "object",
  "$defs": {
    "float64": {
      "format": "double",
      "type": "number"
    },
    "types.AllDefendersUsage": {
      "description": "AllDefendersUsage holds stats about the usage of different modules and the sample time",
      "properties": {
        "appEmbedded": {
          "$ref": "#/$defs/types.DefenderUsage"
        },
        "cloudSecurityAgent": {
          "$ref": "#/$defs/types.DefenderUsage"
        },
        "container": {
          "$ref": "#/$defs/types.DefenderUsage"
        },
        "containerAgentless": {
          "$ref": "#/$defs/types.DefenderUsage"
        },
        "host": {
          "$ref": "#/$defs/types.DefenderUsage"
        },
        "hostAgentless": {
          "$ref": "#/$defs/types.DefenderUsage"
        },
        "period": {
          "description": "Period is the date beginning of the usage period.\n",
          "format": "date-time",
          "type": "string"
        },
        "remainingCredits": {
          "description": "RemainingCredits is the amount of credits left at the beginning of the period.\n",
          "type": "integer"
        },
        "serverless": {
          "$ref": "#/$defs/types.ServerlessUsage"
        },
        "waas": {
          "$ref": "#/$defs/types.DefenderUsage"
        },
        "waasOutOfBand": {
          "$ref": "#/$defs/types.DefenderUsage"
        }
      },
      "type": "object"
    },
    "types.DefenderUsage": {
      "description": "DefenderUsage holds the number of defenders and the credits used for a specific defender type",
      "properties": {
        "creditCount": {
          "description": "CreditCount is credits that was used for this defender type.\n",
          "format": "double",
          "type": "number"
        },
        "defendersCount": {
          "description": "DefendersCount is the number of defenders that was used for this defender type.\n",
          "format": "double",
          "type": "number"
        }
      },
      "type": "object"
    },
    "types.ServerlessUsage": {
      "description": "ServerlessUsage holds the number of defenders, invocations and credits used for serverless defenders",
      "properties": {
        "creditCount": {
          "description": "CreditCount is credits that was used for this defender type.\n",
          "format": "double",
          "type": "number"
        },
        "defendersCount": {
          "description": "DefendersCount is the number of defenders that was used for this defender type.\n",
          "format": "double",
          "type": "number"
        },
        "protectedFunctions": {
          "description": "ProtectedFunctions is the number of serverless functions that have a defender installed.\n",
          "format": "double",
          "type": "number"
        },
        "scannedFunctions": {
          "description": "ScannedFunctions is the number functions being scanned for vulnerabilities and compliance issues without a defender installed.\n",
          "format": "double",
          "type": "number"
        }
      },
      "type": "object"
    }
  }
}