{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/observeinc/json-schema/observeinc-monitor-mute-update-request-schema.json",
  "title": "MonitorMuteUpdateRequest",
  "description": "All fields are optional. Omitted fields are left unchanged. Sending a `target` object replaces the entire target subtree atomically; `target.kind` must match the existing value (it is immutable). Send `filter: null` to remove an existing filter.\n",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/observeinc-monitormute-api-openapi.yml#/components/schemas/MonitorMute-UpdateRequest",
  "type": "object",
  "properties": {
    "label": {
      "type": "string"
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "description": "Pass `null` to clear the description."
    },
    "target": {
      "$ref": "#/$defs/MonitorMute-TargetInput"
    },
    "schedule": {
      "$ref": "#/$defs/MonitorMute-ScheduleInput"
    },
    "filter": {
      "type": [
        "string",
        "null"
      ],
      "description": "Pass `null` to remove an existing filter."
    }
  },
  "$defs": {
    "Monitor-Brief": {
      "title": "MonitorBrief",
      "type": "object",
      "description": "Brief monitor metadata included when a reference is expanded.",
      "required": [
        "name",
        "label",
        "description"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the monitor, unique within its workspace.\n"
        },
        "label": {
          "type": "string",
          "deprecated": true,
          "description": "Same as `name`. Deprecated; read `name` instead."
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "The monitor's description. Null when no description is configured."
        }
      }
    },
    "Monitor-Ref": {
      "title": "MonitorRef",
      "type": "object",
      "description": "Reference to a monitor. Always carries the `id`. The `record` field is\npopulated with brief metadata only when `expand=true`.\n",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "$ref": "#/$defs/ObjectId"
        },
        "record": {
          "$ref": "#/$defs/Monitor-Brief"
        }
      }
    },
    "MonitorMute-CronSchedule": {
      "title": "MonitorMuteCronSchedule",
      "type": "object",
      "required": [
        "rawCron",
        "timezone"
      ],
      "properties": {
        "rawCron": {
          "type": "string",
          "description": "POSIX 5-field cron expression (`minute hour day-of-month month day-of-week`). No seconds field, no year field, no Quartz extensions, no `@daily`-style macros. Fields support `*` (any), `,` (list), `-` (range), and `/` (step). The server rejects expressions outside this dialect with `invalid_schedule`. Examples: `0 2 * * *` (daily at 02:00), `0 9-17 * * 1-5` (every hour 09:00–17:00 Mon–Fri), `0-59/15 * * * *` (every 15 min).\n"
        },
        "timezone": {
          "type": "string",
          "description": "IANA timezone name. Example: \"America/Los_Angeles\"."
        }
      }
    },
    "MonitorMute-OneTimeInput": {
      "title": "MonitorMuteOneTimeInput",
      "description": "Input shape for a one-time schedule. `startTime` is required. Omit `endTime` or pass `null` to create an open-ended mute.\n",
      "type": "object",
      "required": [
        "startTime"
      ],
      "properties": {
        "startTime": {
          "$ref": "#/$defs/Time",
          "description": "Start of the mute window."
        },
        "endTime": {
          "$ref": "#/$defs/NullableTime",
          "description": "End of the mute window. Omit or pass `null` for open-ended."
        }
      }
    },
    "MonitorMute-RecurringInput": {
      "title": "MonitorMuteRecurringInput",
      "description": "Input shape for a recurring schedule. Mirrors `MonitorMute-Recurring`; kept separate so server-computed response fields can be added to the response type without widening the write contract.\n",
      "type": "object",
      "required": [
        "cronSchedule",
        "durationSeconds"
      ],
      "properties": {
        "cronSchedule": {
          "$ref": "#/$defs/MonitorMute-CronSchedule"
        },
        "durationSeconds": {
          "type": "integer",
          "format": "int64",
          "minimum": 1,
          "description": "Wall-clock length of each fired window in seconds. Must be at least 1."
        }
      }
    },
    "MonitorMute-ScheduleInput": {
      "title": "MonitorMuteScheduleInput",
      "description": "Input shape for a schedule. `kind` is required; send only the sibling matching `kind` (`oneTime` or `recurring`).\n",
      "type": "object",
      "required": [
        "kind"
      ],
      "properties": {
        "kind": {
          "$ref": "#/$defs/MonitorMute-ScheduleKind"
        },
        "oneTime": {
          "$ref": "#/$defs/MonitorMute-OneTimeInput"
        },
        "recurring": {
          "$ref": "#/$defs/MonitorMute-RecurringInput"
        }
      }
    },
    "MonitorMute-ScheduleKind": {
      "title": "MonitorMuteScheduleKind",
      "type": "string",
      "description": "`OneTime` defines a fixed window with an explicit start and optional end. `Recurring` fires on a cron schedule for a specified duration.\n",
      "enum": [
        "OneTime",
        "Recurring"
      ]
    },
    "MonitorMute-TargetInput": {
      "title": "MonitorMuteTargetInput",
      "description": "Input shape for a mute target. `kind` is optional in PATCH — if provided it must match the existing value since `kind` is immutable after creation. `monitors` is required and non-empty when `kind` is `Monitors`; omit or leave empty when `kind` is `Global`.\n",
      "type": "object",
      "properties": {
        "kind": {
          "$ref": "#/$defs/MonitorMute-TargetKind"
        },
        "monitors": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Monitor-Ref"
          }
        }
      }
    },
    "MonitorMute-TargetKind": {
      "title": "MonitorMuteTargetKind",
      "type": "string",
      "description": "`Global` suppresses all monitors (requires a non-empty `filter`). `Monitors` targets a specific set of monitors by ID.\n",
      "enum": [
        "Global",
        "Monitors"
      ]
    },
    "NullableTime": {
      "type": [
        "string",
        "null"
      ],
      "format": "RFC3339"
    },
    "ObjectId": {
      "type": "string",
      "format": "ObjectId"
    },
    "Time": {
      "type": "string",
      "format": "RFC3339"
    }
  }
}