{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Workspace that owns this record."
    },
    "period": {
      "type": "string"
    },
    "plan": {
      "type": "string"
    },
    "subscription_status": {
      "type": "string"
    },
    "check_reservations": {
      "type": "object",
      "properties": {
        "reserved": {
          "type": "number"
        },
        "consumed": {
          "type": "number"
        },
        "released": {
          "type": "number"
        },
        "note": {
          "type": "string"
        }
      },
      "required": [
        "reserved",
        "consumed",
        "released",
        "note"
      ],
      "additionalProperties": {}
    },
    "monthly_check_limit": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "check_budget": {
      "type": "object",
      "properties": {
        "period": {
          "type": "string"
        },
        "limit": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "reserved": {
          "type": "number"
        },
        "consumed": {
          "type": "number"
        },
        "remaining": {
          "anyOf": [
            {
              "type": "number",
              "description": "Check units still available after consumed and reserved units; null if the limit is unknown."
            },
            {
              "type": "null"
            }
          ],
          "description": "Check units still available after consumed and reserved units; null if the limit is unknown."
        },
        "exhausted": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "resets_at": {
          "type": "string"
        },
        "enforced_by": {
          "type": "string"
        },
        "plan_allowance_enforced": {
          "type": "boolean"
        }
      },
      "required": [
        "period",
        "limit",
        "reserved",
        "consumed",
        "remaining",
        "exhausted",
        "resets_at",
        "enforced_by",
        "plan_allowance_enforced"
      ],
      "additionalProperties": {}
    },
    "active_watch_limit": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "units": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "object",
        "properties": {
          "used": {
            "type": "number"
          },
          "included_allowance": {
            "type": "number"
          },
          "included_used": {
            "type": "number"
          },
          "chargeable": {
            "type": "number"
          },
          "rate_microusd_per_1000": {
            "type": "number"
          },
          "chargeable_microusd": {
            "type": "number"
          }
        },
        "required": [
          "used",
          "included_allowance",
          "included_used",
          "chargeable",
          "rate_microusd_per_1000",
          "chargeable_microusd"
        ],
        "additionalProperties": {}
      }
    },
    "chargeable_microusd": {
      "type": "number"
    },
    "pricing_mode": {
      "type": "string",
      "const": "estimate_only"
    },
    "at_allowance": {
      "type": "object",
      "properties": {
        "at_allowance": {
          "type": "string"
        },
        "enforced_limit": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      },
      "required": [
        "at_allowance",
        "enforced_limit",
        "note"
      ],
      "additionalProperties": {}
    },
    "checkout": {
      "type": "object",
      "properties": {
        "available": {
          "type": "boolean"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string",
              "description": "Recorded explanation; null when no explanation applies."
            },
            {
              "type": "null"
            }
          ],
          "description": "Recorded explanation; null when no explanation applies."
        }
      },
      "required": [
        "available",
        "reason"
      ],
      "additionalProperties": {}
    },
    "collected": {
      "type": "boolean",
      "const": false
    }
  },
  "required": [
    "workspace_id",
    "period",
    "plan",
    "subscription_status",
    "check_reservations",
    "monthly_check_limit",
    "check_budget",
    "active_watch_limit",
    "units",
    "chargeable_microusd",
    "pricing_mode",
    "at_allowance",
    "checkout",
    "collected"
  ],
  "additionalProperties": {}
}
