{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/thousandeyes/json-schema/thousandeyes-alerts-api-alert-suppression-windows-schema.json",
  "title": "Alerts_API_AlertSuppressionWindows",
  "description": "Alert suppression windows.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thousandeyes-alert-suppression-windows-api-openapi.yml#/components/schemas/Alerts_API_AlertSuppressionWindows",
  "type": "object",
  "properties": {
    "alertSuppressionWindows": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Alerts_API_AlertSuppressionWindow"
      }
    },
    "_links": {
      "$ref": "#/$defs/Alerts_API_SelfLinks"
    }
  },
  "$defs": {
    "Alerts_API_AlertSuppressionWindow": {
      "allOf": [
        {
          "$ref": "#/$defs/Alerts_API_BaseAlertSuppressionWindow"
        },
        {
          "type": "object",
          "properties": {
            "_links": {
              "$ref": "#/$defs/Alerts_API_SelfLinks"
            }
          }
        }
      ]
    },
    "Alerts_API_AlertSuppressionWindowState": {
      "type": "string",
      "enum": [
        "active",
        "inactive",
        "ended"
      ],
      "description": "Indicates the current status of the suppression window.",
      "readOnly": true
    },
    "Alerts_API_BaseAlertSuppressionWindow": {
      "type": "object",
      "description": "Alert suppression window.",
      "properties": {
        "alertSuppressionWindowId": {
          "type": "string",
          "description": "Unique ID of the alert suppression window.",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "Name of the alert suppression window."
        },
        "isEnabled": {
          "type": "boolean",
          "description": "Set to `false` for `disabled`, `true` for `enabled`."
        },
        "status": {
          "$ref": "#/$defs/Alerts_API_AlertSuppressionWindowState"
        },
        "startDate": {
          "type": "string",
          "format": "date-time",
          "description": "The date/time when the alert suppression window starts (ISO date-time format)."
        },
        "duration": {
          "type": "integer",
          "description": "Duration in seconds the suppression window is active."
        },
        "repeat": {
          "$ref": "#/$defs/Alerts_API_Repeat"
        },
        "endRepeat": {
          "$ref": "#/$defs/Alerts_API_EndRepeat"
        }
      }
    },
    "Alerts_API_DaysOfWeek": {
      "type": "string",
      "description": "Specifies the day to activate the alert suppression window. Applicable only when `intervalType` is set to `week`.",
      "enum": [
        "sun",
        "mon",
        "tue",
        "wed",
        "thu",
        "fri",
        "sat"
      ]
    },
    "Alerts_API_EndRepeat": {
      "type": "object",
      "description": "End repeat options.",
      "properties": {
        "type": {
          "$ref": "#/$defs/Alerts_API_EndRepeatType"
        },
        "count": {
          "type": "integer",
          "description": "End repeat after number of occurrences, only valid with count type option."
        },
        "date": {
          "type": "string",
          "format": "date",
          "description": "End repeat after specific date, only valid with date type option (ISO date format)."
        }
      }
    },
    "Alerts_API_EndRepeatType": {
      "type": "string",
      "description": "End repeat options type.",
      "enum": [
        "count",
        "never",
        "date"
      ]
    },
    "Alerts_API_IntervalType": {
      "type": "string",
      "description": "Repeat options interval type",
      "enum": [
        "day",
        "week",
        "month"
      ]
    },
    "Alerts_API_Link": {
      "type": "object",
      "description": "A hyperlink from the containing resource to a URI.",
      "required": [
        "href"
      ],
      "properties": {
        "href": {
          "type": "string",
          "description": "Its value is either a URI [RFC3986] or a URI template [RFC6570]."
        },
        "templated": {
          "type": "boolean",
          "description": "Should be true when the link object's \"href\" property is a URI template."
        },
        "type": {
          "type": "string",
          "description": "Used as a hint to indicate the media type expected when dereferencing the target resource."
        },
        "deprecation": {
          "type": "string",
          "description": "Its presence indicates that the link is to be deprecated at a future date. Its value is a URL that should provide further information about the deprecation."
        },
        "name": {
          "type": "string",
          "description": "Its value may be used as a secondary key for selecting link objects that share the same relation type."
        },
        "profile": {
          "type": "string",
          "description": "A URI that hints about the profile of the target resource."
        },
        "title": {
          "type": "string",
          "description": "Intended for labelling the link with a human-readable identifier"
        },
        "hreflang": {
          "type": "string",
          "description": "Indicates the language of the target resource"
        }
      }
    },
    "Alerts_API_Repeat": {
      "type": "object",
      "description": "Repeat options.",
      "properties": {
        "type": {
          "$ref": "#/$defs/Alerts_API_RepeatType"
        },
        "intervalType": {
          "$ref": "#/$defs/Alerts_API_IntervalType"
        },
        "intervalLength": {
          "type": "integer",
          "description": "Number of `intervalTypes` to wait before reactivating the alert suppression window."
        },
        "daysOfWeek": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Alerts_API_DaysOfWeek"
          }
        }
      }
    },
    "Alerts_API_RepeatType": {
      "type": "string",
      "description": "Repeat options type.",
      "enum": [
        "day",
        "week",
        "month",
        "custom"
      ]
    },
    "Alerts_API_SelfLinks": {
      "type": "object",
      "description": "A links object containing the self link.",
      "readOnly": true,
      "properties": {
        "self": {
          "$ref": "#/$defs/Alerts_API_Link"
        }
      }
    }
  }
}