{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/onclarity-com/json-schema/onclarity-com-budget-update-request-schema.json",
  "title": "BudgetUpdateRequest",
  "description": "Partial update. Omitted fields are unchanged; an explicit ``null`` clears a nullable\nfield (``surfaces``/``lens`` → all, ``custom_*`` → none). The router merges onto the\nstored row and re-validates through :class:`BudgetCreateRequest`.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/onclarity-com-agent-costs-api-openapi.yml#/components/schemas/BudgetUpdateRequest",
  "properties": {
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Name"
    },
    "scope": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "global",
            "project"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Scope"
    },
    "project_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Project Id"
    },
    "period": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "day",
            "week",
            "month",
            "custom"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Period"
    },
    "custom_from": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Custom From"
    },
    "custom_to": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Custom To"
    },
    "surfaces": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Surfaces"
    },
    "lens": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "internal",
            "tenant"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Lens"
    },
    "usd_threshold": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Usd Threshold"
    },
    "enabled": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Enabled"
    }
  },
  "type": "object"
}